@azure-tools/communication-tiering 1.0.0-alpha.20250901.2 → 1.0.0-alpha.20251021.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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/dist/browser/generated/src/operations/numberAllotment.js +2 -1
  3. package/dist/browser/generated/src/operations/numberAllotment.js.map +1 -1
  4. package/dist/browser/generated/src/operations/tiering.js +2 -1
  5. package/dist/browser/generated/src/operations/tiering.js.map +1 -1
  6. package/dist/browser/generated/src/tieringClient.js +12 -4
  7. package/dist/browser/generated/src/tieringClient.js.map +1 -1
  8. package/dist/browser/generated/src/tracing.js +1 -1
  9. package/dist/browser/generated/src/tracing.js.map +1 -1
  10. package/dist/browser/tieringClient.js +11 -4
  11. package/dist/browser/tieringClient.js.map +1 -1
  12. package/dist/browser/utils/constants.js +1 -1
  13. package/dist/browser/utils/constants.js.map +1 -1
  14. package/dist/commonjs/generated/src/operations/numberAllotment.js +2 -1
  15. package/dist/commonjs/generated/src/operations/numberAllotment.js.map +1 -1
  16. package/dist/commonjs/generated/src/operations/tiering.js +2 -1
  17. package/dist/commonjs/generated/src/operations/tiering.js.map +1 -1
  18. package/dist/commonjs/generated/src/tieringClient.js +12 -4
  19. package/dist/commonjs/generated/src/tieringClient.js.map +1 -1
  20. package/dist/commonjs/generated/src/tracing.js +1 -1
  21. package/dist/commonjs/generated/src/tracing.js.map +1 -1
  22. package/dist/commonjs/tieringClient.js +11 -4
  23. package/dist/commonjs/tieringClient.js.map +1 -1
  24. package/dist/commonjs/tsdoc-metadata.json +11 -11
  25. package/dist/commonjs/utils/constants.js +1 -1
  26. package/dist/commonjs/utils/constants.js.map +1 -1
  27. package/dist/esm/generated/src/operations/numberAllotment.js +2 -1
  28. package/dist/esm/generated/src/operations/numberAllotment.js.map +1 -1
  29. package/dist/esm/generated/src/operations/tiering.js +2 -1
  30. package/dist/esm/generated/src/operations/tiering.js.map +1 -1
  31. package/dist/esm/generated/src/tieringClient.js +12 -4
  32. package/dist/esm/generated/src/tieringClient.js.map +1 -1
  33. package/dist/esm/generated/src/tracing.js +1 -1
  34. package/dist/esm/generated/src/tracing.js.map +1 -1
  35. package/dist/esm/tieringClient.js +11 -4
  36. package/dist/esm/tieringClient.js.map +1 -1
  37. package/dist/esm/utils/constants.js +1 -1
  38. package/dist/esm/utils/constants.js.map +1 -1
  39. package/dist/react-native/generated/src/operations/numberAllotment.js +2 -1
  40. package/dist/react-native/generated/src/operations/numberAllotment.js.map +1 -1
  41. package/dist/react-native/generated/src/operations/tiering.js +2 -1
  42. package/dist/react-native/generated/src/operations/tiering.js.map +1 -1
  43. package/dist/react-native/generated/src/tieringClient.js +12 -4
  44. package/dist/react-native/generated/src/tieringClient.js.map +1 -1
  45. package/dist/react-native/generated/src/tracing.js +1 -1
  46. package/dist/react-native/generated/src/tracing.js.map +1 -1
  47. package/dist/react-native/tieringClient.js +11 -4
  48. package/dist/react-native/tieringClient.js.map +1 -1
  49. package/dist/react-native/utils/constants.js +1 -1
  50. package/dist/react-native/utils/constants.js.map +1 -1
  51. package/package.json +46 -43
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Microsoft
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -11,6 +11,7 @@ import * as Mappers from "../models/mappers.js";
11
11
  import * as Parameters from "../models/parameters.js";
12
12
  /** Class containing NumberAllotment operations. */
13
13
  export class NumberAllotmentImpl {
14
+ client;
14
15
  /**
15
16
  * Initialize a new instance of the class NumberAllotment class.
16
17
  * @param client Reference to the service client
@@ -24,7 +25,7 @@ export class NumberAllotmentImpl {
24
25
  * @param options The options parameters.
25
26
  */
26
27
  async getAcquiredNumberLimits(resourceId, options) {
27
- return tracingClient.withSpan("TieringClient.getAcquiredNumberLimits", options !== null && options !== void 0 ? options : {}, async (options) => {
28
+ return tracingClient.withSpan("TieringClient.getAcquiredNumberLimits", options ?? {}, async (options) => {
28
29
  return this.client.sendOperationRequest({ resourceId, options }, getAcquiredNumberLimitsOperationSpec);
29
30
  });
30
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"numberAllotment.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/numberAllotment.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,uBAAuB,CAC3B,UAAkB,EAClB,OAA8D;QAE9D,OAAO,aAAa,CAAC,QAAQ,CAC3B,uCAAuC,EACvC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,UAAU,EAAE,OAAO,EAAE,EACvB,oCAAoC,CACsB,CAAC;QAC/D,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EAAE,iEAAiE;IACvE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EACR,OAAO,CAAC,8GAA8G;SACzH;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,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 { tracingClient } from \"../tracing.js\";\nimport { NumberAllotment } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { TieringClient } from \"../tieringClient.js\";\nimport {\n NumberAllotmentGetAcquiredNumberLimitsOptionalParams,\n NumberAllotmentGetAcquiredNumberLimitsResponse\n} from \"../models/index.js\";\n\n/** Class containing NumberAllotment operations. */\nexport class NumberAllotmentImpl implements NumberAllotment {\n private readonly client: TieringClient;\n\n /**\n * Initialize a new instance of the class NumberAllotment class.\n * @param client Reference to the service client\n */\n constructor(client: TieringClient) {\n this.client = client;\n }\n\n /**\n * Get acquired numbers and limits for a resource.\n * @param resourceId Resource Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getAcquiredNumberLimits(\n resourceId: string,\n options?: NumberAllotmentGetAcquiredNumberLimitsOptionalParams\n ): Promise<NumberAllotmentGetAcquiredNumberLimitsResponse> {\n return tracingClient.withSpan(\n \"TieringClient.getAcquiredNumberLimits\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { resourceId, options },\n getAcquiredNumberLimitsOperationSpec\n ) as Promise<NumberAllotmentGetAcquiredNumberLimitsResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getAcquiredNumberLimitsOperationSpec: coreClient.OperationSpec = {\n path: \"/administration/resources/{resourceId}/telephone-number-summary\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper:\n Mappers.Paths190FnhrAdministrationResourcesResourceidTelephoneNumberSummaryGetResponses200ContentApplicationJsonSchema\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.resourceId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"numberAllotment.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/numberAllotment.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IACb,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,uBAAuB,CAC3B,UAAkB,EAClB,OAA8D;QAE9D,OAAO,aAAa,CAAC,QAAQ,CAC3B,uCAAuC,EACvC,OAAO,IAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,UAAU,EAAE,OAAO,EAAE,EACvB,oCAAoC,CACsB,CAAC;QAC/D,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EAAE,iEAAiE;IACvE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EACR,OAAO,CAAC,8GAA8G;SACzH;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,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 { tracingClient } from \"../tracing.js\";\nimport { NumberAllotment } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { TieringClient } from \"../tieringClient.js\";\nimport {\n NumberAllotmentGetAcquiredNumberLimitsOptionalParams,\n NumberAllotmentGetAcquiredNumberLimitsResponse\n} from \"../models/index.js\";\n\n/** Class containing NumberAllotment operations. */\nexport class NumberAllotmentImpl implements NumberAllotment {\n private readonly client: TieringClient;\n\n /**\n * Initialize a new instance of the class NumberAllotment class.\n * @param client Reference to the service client\n */\n constructor(client: TieringClient) {\n this.client = client;\n }\n\n /**\n * Get acquired numbers and limits for a resource.\n * @param resourceId Resource Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getAcquiredNumberLimits(\n resourceId: string,\n options?: NumberAllotmentGetAcquiredNumberLimitsOptionalParams\n ): Promise<NumberAllotmentGetAcquiredNumberLimitsResponse> {\n return tracingClient.withSpan(\n \"TieringClient.getAcquiredNumberLimits\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { resourceId, options },\n getAcquiredNumberLimitsOperationSpec\n ) as Promise<NumberAllotmentGetAcquiredNumberLimitsResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getAcquiredNumberLimitsOperationSpec: coreClient.OperationSpec = {\n path: \"/administration/resources/{resourceId}/telephone-number-summary\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper:\n Mappers.Paths190FnhrAdministrationResourcesResourceidTelephoneNumberSummaryGetResponses200ContentApplicationJsonSchema\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.resourceId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -11,6 +11,7 @@ import * as Mappers from "../models/mappers.js";
11
11
  import * as Parameters from "../models/parameters.js";
12
12
  /** Class containing Tiering operations. */
13
13
  export class TieringImpl {
14
+ client;
14
15
  /**
15
16
  * Initialize a new instance of the class Tiering class.
16
17
  * @param client Reference to the service client
@@ -24,7 +25,7 @@ export class TieringImpl {
24
25
  * @param options The options parameters.
25
26
  */
26
27
  async getByResourceId(resourceId, options) {
27
- return tracingClient.withSpan("TieringClient.getByResourceId", options !== null && options !== void 0 ? options : {}, async (options) => {
28
+ return tracingClient.withSpan("TieringClient.getByResourceId", options ?? {}, async (options) => {
28
29
  return this.client.sendOperationRequest({ resourceId, options }, getByResourceIdOperationSpec);
29
30
  });
30
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tiering.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/tiering.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;IAGtB;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,eAAe,CACnB,UAAkB,EAClB,OAA8C;QAE9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,+BAA+B,EAC/B,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,UAAU,EAAE,OAAO,EAAE,EACvB,4BAA4B,CACc,CAAC;QAC/C,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EAAE,8CAA8C;IACpD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,OAAO;SAC5B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,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 { tracingClient } from \"../tracing.js\";\nimport { Tiering } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { TieringClient } from \"../tieringClient.js\";\nimport {\n TieringGetByResourceIdOptionalParams,\n TieringGetByResourceIdResponse\n} from \"../models/index.js\";\n\n/** Class containing Tiering operations. */\nexport class TieringImpl implements Tiering {\n private readonly client: TieringClient;\n\n /**\n * Initialize a new instance of the class Tiering class.\n * @param client Reference to the service client\n */\n constructor(client: TieringClient) {\n this.client = client;\n }\n\n /**\n * Get the tiering data for a given resource\n * @param resourceId Resource Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getByResourceId(\n resourceId: string,\n options?: TieringGetByResourceIdOptionalParams\n ): Promise<TieringGetByResourceIdResponse> {\n return tracingClient.withSpan(\n \"TieringClient.getByResourceId\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { resourceId, options },\n getByResourceIdOperationSpec\n ) as Promise<TieringGetByResourceIdResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getByResourceIdOperationSpec: coreClient.OperationSpec = {\n path: \"/administration/tiers/resources/{resourceId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AcsTier\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.resourceId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"tiering.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/tiering.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;IACL,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,eAAe,CACnB,UAAkB,EAClB,OAA8C;QAE9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,+BAA+B,EAC/B,OAAO,IAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,UAAU,EAAE,OAAO,EAAE,EACvB,4BAA4B,CACc,CAAC;QAC/C,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EAAE,8CAA8C;IACpD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,OAAO;SAC5B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,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 { tracingClient } from \"../tracing.js\";\nimport { Tiering } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { TieringClient } from \"../tieringClient.js\";\nimport {\n TieringGetByResourceIdOptionalParams,\n TieringGetByResourceIdResponse\n} from \"../models/index.js\";\n\n/** Class containing Tiering operations. */\nexport class TieringImpl implements Tiering {\n private readonly client: TieringClient;\n\n /**\n * Initialize a new instance of the class Tiering class.\n * @param client Reference to the service client\n */\n constructor(client: TieringClient) {\n this.client = client;\n }\n\n /**\n * Get the tiering data for a given resource\n * @param resourceId Resource Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getByResourceId(\n resourceId: string,\n options?: TieringGetByResourceIdOptionalParams\n ): Promise<TieringGetByResourceIdResponse> {\n return tracingClient.withSpan(\n \"TieringClient.getByResourceId\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { resourceId, options },\n getByResourceIdOperationSpec\n ) as Promise<TieringGetByResourceIdResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getByResourceIdOperationSpec: coreClient.OperationSpec = {\n path: \"/administration/tiers/resources/{resourceId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AcsTier\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.resourceId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -8,13 +8,14 @@
8
8
  import * as coreClient from "@azure/core-client";
9
9
  import { NumberAllotmentImpl, TieringImpl } from "./operations/index.js";
10
10
  export class TieringClient extends coreClient.ServiceClient {
11
+ endpoint;
12
+ apiVersion;
11
13
  /**
12
14
  * Initializes a new instance of the TieringClient class.
13
15
  * @param endpoint The communication resource, for example https://resourcename.communication.azure.com
14
16
  * @param options The parameter options
15
17
  */
16
18
  constructor(endpoint, options) {
17
- var _a, _b;
18
19
  if (endpoint === undefined) {
19
20
  throw new Error("'endpoint' cannot be null");
20
21
  }
@@ -25,13 +26,18 @@ export class TieringClient extends coreClient.ServiceClient {
25
26
  const defaults = {
26
27
  requestContentType: "application/json; charset=utf-8"
27
28
  };
28
- const packageDetails = `azsdk-js-communication-tiering/1.0.0-beta.1`;
29
+ const packageDetails = `azsdk-js-communication-tiering/1.0.0-beta.2`;
29
30
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
30
31
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
31
32
  : `${packageDetails}`;
32
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
33
+ const optionsWithDefaults = {
34
+ ...defaults,
35
+ ...options,
36
+ userAgentOptions: {
33
37
  userAgentPrefix
34
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
38
+ },
39
+ endpoint: options.endpoint ?? options.baseUri ?? "{endpoint}"
40
+ };
35
41
  super(optionsWithDefaults);
36
42
  // Parameter assignments
37
43
  this.endpoint = endpoint;
@@ -66,5 +72,7 @@ export class TieringClient extends coreClient.ServiceClient {
66
72
  };
67
73
  this.pipeline.addPolicy(apiVersionPolicy);
68
74
  }
75
+ numberAllotment;
76
+ tiering;
69
77
  }
70
78
  //# sourceMappingURL=tieringClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tieringClient.js","sourceRoot":"","sources":["../../../../src/generated/src/tieringClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzE,MAAM,OAAO,aAAc,SAAQ,UAAU,CAAC,aAAa;IAIzD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAqC;;QACjE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAgC;YAC5C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,6CAA6C,CAAC;QACrE,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,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,QAAQ,EAAE,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,YAAY,GAC9D,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;QACrD,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAIF","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 {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport { NumberAllotmentImpl, TieringImpl } from \"./operations/index.js\";\nimport { NumberAllotment, Tiering } from \"./operationsInterfaces/index.js\";\nimport { TieringClientOptionalParams } from \"./models/index.js\";\n\nexport class TieringClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the TieringClient class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: TieringClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: TieringClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-communication-tiering/1.0.0-beta.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: options.endpoint ?? options.baseUri ?? \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-06-15\";\n this.numberAllotment = new NumberAllotmentImpl(this);\n this.tiering = new TieringImpl(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 numberAllotment: NumberAllotment;\n tiering: Tiering;\n}\n"]}
1
+ {"version":3,"file":"tieringClient.js","sourceRoot":"","sources":["../../../../src/generated/src/tieringClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzE,MAAM,OAAO,aAAc,SAAQ,UAAU,CAAC,aAAa;IACzD,QAAQ,CAAS;IACjB,UAAU,CAAS;IAEnB;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAqC;QACjE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAgC;YAC5C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,6CAA6C,CAAC;QACrE,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,EAAE,CAAC;QAE1B,MAAM,mBAAmB,GAAG;YAC1B,GAAG,QAAQ;YACX,GAAG,OAAO;YACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB;YACD,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,IAAI,YAAY;SAC9D,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;QACrD,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,eAAe,CAAkB;IACjC,OAAO,CAAU;CAClB","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 {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport { NumberAllotmentImpl, TieringImpl } from \"./operations/index.js\";\nimport { NumberAllotment, Tiering } from \"./operationsInterfaces/index.js\";\nimport { TieringClientOptionalParams } from \"./models/index.js\";\n\nexport class TieringClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the TieringClient class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: TieringClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: TieringClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-communication-tiering/1.0.0-beta.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: options.endpoint ?? options.baseUri ?? \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-06-15\";\n this.numberAllotment = new NumberAllotmentImpl(this);\n this.tiering = new TieringImpl(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 numberAllotment: NumberAllotment;\n tiering: Tiering;\n}\n"]}
@@ -9,6 +9,6 @@ import { createTracingClient } from "@azure/core-tracing";
9
9
  export const tracingClient = createTracingClient({
10
10
  namespace: "Microsoft.Communication",
11
11
  packageName: "@azure/communication-tiering",
12
- packageVersion: "1.0.0-beta.1"
12
+ packageVersion: "1.0.0-beta.2"
13
13
  });
14
14
  //# sourceMappingURL=tracing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,8BAA8B;IAC3C,cAAc,EAAE,cAAc;CAC/B,CAAC,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 { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-tiering\",\n packageVersion: \"1.0.0-beta.1\"\n});\n"]}
1
+ {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,8BAA8B;IAC3C,cAAc,EAAE,cAAc;CAC/B,CAAC,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 { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-tiering\",\n packageVersion: \"1.0.0-beta.2\"\n});\n"]}
@@ -12,16 +12,23 @@ const isTieringClientOptions = (options) => options && !isKeyCredential(options)
12
12
  * Client class for interacting with Azure Communication Services Tiering.
13
13
  */
14
14
  export class TieringClient {
15
+ /**
16
+ * A reference to the auto-generated TieringClient HTTP client.
17
+ */
18
+ client;
15
19
  constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
16
20
  const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);
17
21
  const options = isTieringClientOptions(credentialOrOptions)
18
22
  ? credentialOrOptions
19
23
  : maybeOptions;
20
- const internalPipelineOptions = Object.assign(Object.assign({}, options), {
21
- loggingOptions: {
22
- logger: logger.info,
24
+ const internalPipelineOptions = {
25
+ ...options,
26
+ ...{
27
+ loggingOptions: {
28
+ logger: logger.info,
29
+ },
23
30
  },
24
- });
31
+ };
25
32
  this.client = new TieringGeneratedClient(url, internalPipelineOptions);
26
33
  const authPolicy = createCommunicationAuthPolicy(credential);
27
34
  this.client.pipeline.addPolicy(authPolicy);
@@ -1 +1 @@
1
- {"version":3,"file":"tieringClient.js","sourceRoot":"","sources":["../../src/tieringClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,4CAA4C;AAU5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAO3D,MAAM,sBAAsB,GAAG,CAAC,OAAY,EAAmC,EAAE,CAC/E,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAO,aAAa;IAgCxB,YACE,qBAA6B,EAC7B,mBAA4E,EAC5E,eAAqC,EAAE;QAEvC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;QAC7F,MAAM,OAAO,GAAG,sBAAsB,CAAC,mBAAmB,CAAC;YACzD,CAAC,CAAC,mBAAmB;YACrB,CAAC,CAAC,YAAY,CAAC;QAEjB,MAAM,uBAAuB,mCACxB,OAAO,GACP;YACD,cAAc,EAAE;gBACd,MAAM,EAAE,MAAM,CAAC,IAAI;aACpB;SACF,CACF,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAsB,CAAC,GAAG,EAAE,uBAAuB,CAAC,CAAC;QACvE,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,uBAAuB,CAC5B,UAAkB,EAClB,UAAgE,EAAE;QAElE,OAAO,aAAa,CAAC,QAAQ,CAC3B,yCAAyC,EACzC,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzF,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CACxB,UAAkB,EAClB,UAAgD,EAAE;QAElD,OAAO,aAAa,CAAC,QAAQ,CAAC,6BAA6B,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,EAAE;YACvF,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type {\n NumberAllotmentGetAcquiredNumberLimitsOptionalParams,\n TieringGetByResourceIdOptionalParams,\n AcsTier,\n AssetDetailsModel,\n} from \"./models.js\";\nimport type { CommonClientOptions, InternalClientPipelineOptions } from \"@azure/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport { isKeyCredential, parseClientArguments } from \"@azure/communication-common\";\nimport { TieringClient as TieringGeneratedClient } from \"./generated/src/index.js\";\nimport { logger } from \"./utils/index.js\";\nimport { tracingClient } from \"./generated/src/tracing.js\";\n\n/**\n * Client options used to configure the TieringGeneratedClient API requests.\n */\nexport interface TieringClientOptions extends CommonClientOptions {}\n\nconst isTieringClientOptions = (options: any): options is TieringClientOptions =>\n options && !isKeyCredential(options) && !isTokenCredential(options);\n\n/**\n * Client class for interacting with Azure Communication Services Tiering.\n */\nexport class TieringClient {\n /**\n * A reference to the auto-generated TieringClient HTTP client.\n */\n private readonly client: TieringGeneratedClient;\n\n /**\n * Initializes a new instance of the TieringClient class using a connection string.\n *\n * @param connectionString - Connection string to connect to an Azure Communication Service resource. (eg: endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret)\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(connectionString: string, options?: TieringClientOptions);\n\n /**\n * Initializes a new instance of the TieringClient class using an Azure KeyCredential.\n *\n * @param endpoint - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net)\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(endpoint: string, credential: KeyCredential, options?: TieringClientOptions);\n\n /**\n * Initializes a new instance of the TieringClient class using an Azure KeyCredential.\n *\n * @param endpoint - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net)\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(endpoint: string, credential: TokenCredential, options?: TieringClientOptions);\n\n public constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | TieringClientOptions,\n maybeOptions: TieringClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isTieringClientOptions(credentialOrOptions)\n ? credentialOrOptions\n : maybeOptions;\n\n const internalPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n this.client = new TieringGeneratedClient(url, internalPipelineOptions);\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.client.pipeline.addPolicy(authPolicy);\n }\n\n /**\n * Get acquired numbers and limits for a resource.\n *\n * @param options - Additional request options.\n */\n public getAcquiredNumberLimits(\n resourceId: string,\n options: NumberAllotmentGetAcquiredNumberLimitsOptionalParams = {},\n ): Promise<AssetDetailsModel> {\n return tracingClient.withSpan(\n \"numberAllotment.getAcquiredNumberLimits\",\n options,\n (updatedOptions) => {\n return this.client.numberAllotment.getAcquiredNumberLimits(resourceId, updatedOptions);\n },\n );\n }\n\n /**\n * Get tiering info for a resource.\n *\n * @param options - Additional request options.\n */\n public getTierByResourceId(\n resourceId: string,\n options: TieringGetByResourceIdOptionalParams = {},\n ): Promise<AcsTier> {\n return tracingClient.withSpan(\"tiering.getTierByResourceId\", options, (updatedOptions) => {\n return this.client.tiering.getByResourceId(resourceId, updatedOptions);\n });\n }\n}\n"]}
1
+ {"version":3,"file":"tieringClient.js","sourceRoot":"","sources":["../../src/tieringClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,4CAA4C;AAU5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAO3D,MAAM,sBAAsB,GAAG,CAAC,OAAY,EAAmC,EAAE,CAC/E,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAO,aAAa;IACxB;;OAEG;IACc,MAAM,CAAyB;IA4BhD,YACE,qBAA6B,EAC7B,mBAA4E,EAC5E,eAAqC,EAAE;QAEvC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;QAC7F,MAAM,OAAO,GAAG,sBAAsB,CAAC,mBAAmB,CAAC;YACzD,CAAC,CAAC,mBAAmB;YACrB,CAAC,CAAC,YAAY,CAAC;QAEjB,MAAM,uBAAuB,GAAkC;YAC7D,GAAG,OAAO;YACV,GAAG;gBACD,cAAc,EAAE;oBACd,MAAM,EAAE,MAAM,CAAC,IAAI;iBACpB;aACF;SACF,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAsB,CAAC,GAAG,EAAE,uBAAuB,CAAC,CAAC;QACvE,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,uBAAuB,CAC5B,UAAkB,EAClB,UAAgE,EAAE;QAElE,OAAO,aAAa,CAAC,QAAQ,CAC3B,yCAAyC,EACzC,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzF,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CACxB,UAAkB,EAClB,UAAgD,EAAE;QAElD,OAAO,aAAa,CAAC,QAAQ,CAAC,6BAA6B,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,EAAE;YACvF,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type {\n NumberAllotmentGetAcquiredNumberLimitsOptionalParams,\n TieringGetByResourceIdOptionalParams,\n AcsTier,\n AssetDetailsModel,\n} from \"./models.js\";\nimport type { CommonClientOptions, InternalClientPipelineOptions } from \"@azure/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport { isKeyCredential, parseClientArguments } from \"@azure/communication-common\";\nimport { TieringClient as TieringGeneratedClient } from \"./generated/src/index.js\";\nimport { logger } from \"./utils/index.js\";\nimport { tracingClient } from \"./generated/src/tracing.js\";\n\n/**\n * Client options used to configure the TieringGeneratedClient API requests.\n */\nexport interface TieringClientOptions extends CommonClientOptions {}\n\nconst isTieringClientOptions = (options: any): options is TieringClientOptions =>\n options && !isKeyCredential(options) && !isTokenCredential(options);\n\n/**\n * Client class for interacting with Azure Communication Services Tiering.\n */\nexport class TieringClient {\n /**\n * A reference to the auto-generated TieringClient HTTP client.\n */\n private readonly client: TieringGeneratedClient;\n\n /**\n * Initializes a new instance of the TieringClient class using a connection string.\n *\n * @param connectionString - Connection string to connect to an Azure Communication Service resource. (eg: endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret)\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(connectionString: string, options?: TieringClientOptions);\n\n /**\n * Initializes a new instance of the TieringClient class using an Azure KeyCredential.\n *\n * @param endpoint - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net)\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(endpoint: string, credential: KeyCredential, options?: TieringClientOptions);\n\n /**\n * Initializes a new instance of the TieringClient class using an Azure KeyCredential.\n *\n * @param endpoint - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net)\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(endpoint: string, credential: TokenCredential, options?: TieringClientOptions);\n\n public constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | TieringClientOptions,\n maybeOptions: TieringClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isTieringClientOptions(credentialOrOptions)\n ? credentialOrOptions\n : maybeOptions;\n\n const internalPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n this.client = new TieringGeneratedClient(url, internalPipelineOptions);\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.client.pipeline.addPolicy(authPolicy);\n }\n\n /**\n * Get acquired numbers and limits for a resource.\n *\n * @param options - Additional request options.\n */\n public getAcquiredNumberLimits(\n resourceId: string,\n options: NumberAllotmentGetAcquiredNumberLimitsOptionalParams = {},\n ): Promise<AssetDetailsModel> {\n return tracingClient.withSpan(\n \"numberAllotment.getAcquiredNumberLimits\",\n options,\n (updatedOptions) => {\n return this.client.numberAllotment.getAcquiredNumberLimits(resourceId, updatedOptions);\n },\n );\n }\n\n /**\n * Get tiering info for a resource.\n *\n * @param options - Additional request options.\n */\n public getTierByResourceId(\n resourceId: string,\n options: TieringGetByResourceIdOptionalParams = {},\n ): Promise<AcsTier> {\n return tracingClient.withSpan(\"tiering.getTierByResourceId\", options, (updatedOptions) => {\n return this.client.tiering.getByResourceId(resourceId, updatedOptions);\n });\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- export const SDK_VERSION = "1.0.0-beta.0";
3
+ export const SDK_VERSION = "1.0.0-beta.2";
4
4
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.0-beta.0\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.0-beta.2\";\n"]}
@@ -15,6 +15,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
15
15
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /** Class containing NumberAllotment operations. */
17
17
  class NumberAllotmentImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class NumberAllotment class.
20
21
  * @param client Reference to the service client
@@ -28,7 +29,7 @@ class NumberAllotmentImpl {
28
29
  * @param options The options parameters.
29
30
  */
30
31
  async getAcquiredNumberLimits(resourceId, options) {
31
- return tracing_js_1.tracingClient.withSpan("TieringClient.getAcquiredNumberLimits", options !== null && options !== void 0 ? options : {}, async (options) => {
32
+ return tracing_js_1.tracingClient.withSpan("TieringClient.getAcquiredNumberLimits", options ?? {}, async (options) => {
32
33
  return this.client.sendOperationRequest({ resourceId, options }, getAcquiredNumberLimitsOperationSpec);
33
34
  });
34
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"numberAllotment.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/numberAllotment.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,mDAAmD;AACnD,MAAa,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,uBAAuB,CAC3B,UAAkB,EAClB,OAA8D;QAE9D,OAAO,0BAAa,CAAC,QAAQ,CAC3B,uCAAuC,EACvC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,UAAU,EAAE,OAAO,EAAE,EACvB,oCAAoC,CACsB,CAAC;QAC/D,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AA/BD,kDA+BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EAAE,iEAAiE;IACvE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EACR,OAAO,CAAC,8GAA8G;SACzH;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,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 { tracingClient } from \"../tracing.js\";\nimport { NumberAllotment } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { TieringClient } from \"../tieringClient.js\";\nimport {\n NumberAllotmentGetAcquiredNumberLimitsOptionalParams,\n NumberAllotmentGetAcquiredNumberLimitsResponse\n} from \"../models/index.js\";\n\n/** Class containing NumberAllotment operations. */\nexport class NumberAllotmentImpl implements NumberAllotment {\n private readonly client: TieringClient;\n\n /**\n * Initialize a new instance of the class NumberAllotment class.\n * @param client Reference to the service client\n */\n constructor(client: TieringClient) {\n this.client = client;\n }\n\n /**\n * Get acquired numbers and limits for a resource.\n * @param resourceId Resource Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getAcquiredNumberLimits(\n resourceId: string,\n options?: NumberAllotmentGetAcquiredNumberLimitsOptionalParams\n ): Promise<NumberAllotmentGetAcquiredNumberLimitsResponse> {\n return tracingClient.withSpan(\n \"TieringClient.getAcquiredNumberLimits\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { resourceId, options },\n getAcquiredNumberLimitsOperationSpec\n ) as Promise<NumberAllotmentGetAcquiredNumberLimitsResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getAcquiredNumberLimitsOperationSpec: coreClient.OperationSpec = {\n path: \"/administration/resources/{resourceId}/telephone-number-summary\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper:\n Mappers.Paths190FnhrAdministrationResourcesResourceidTelephoneNumberSummaryGetResponses200ContentApplicationJsonSchema\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.resourceId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"numberAllotment.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/numberAllotment.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,mDAAmD;AACnD,MAAa,mBAAmB;IACb,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,uBAAuB,CAC3B,UAAkB,EAClB,OAA8D;QAE9D,OAAO,0BAAa,CAAC,QAAQ,CAC3B,uCAAuC,EACvC,OAAO,IAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,UAAU,EAAE,OAAO,EAAE,EACvB,oCAAoC,CACsB,CAAC;QAC/D,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AA/BD,kDA+BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EAAE,iEAAiE;IACvE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EACR,OAAO,CAAC,8GAA8G;SACzH;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,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 { tracingClient } from \"../tracing.js\";\nimport { NumberAllotment } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { TieringClient } from \"../tieringClient.js\";\nimport {\n NumberAllotmentGetAcquiredNumberLimitsOptionalParams,\n NumberAllotmentGetAcquiredNumberLimitsResponse\n} from \"../models/index.js\";\n\n/** Class containing NumberAllotment operations. */\nexport class NumberAllotmentImpl implements NumberAllotment {\n private readonly client: TieringClient;\n\n /**\n * Initialize a new instance of the class NumberAllotment class.\n * @param client Reference to the service client\n */\n constructor(client: TieringClient) {\n this.client = client;\n }\n\n /**\n * Get acquired numbers and limits for a resource.\n * @param resourceId Resource Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getAcquiredNumberLimits(\n resourceId: string,\n options?: NumberAllotmentGetAcquiredNumberLimitsOptionalParams\n ): Promise<NumberAllotmentGetAcquiredNumberLimitsResponse> {\n return tracingClient.withSpan(\n \"TieringClient.getAcquiredNumberLimits\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { resourceId, options },\n getAcquiredNumberLimitsOperationSpec\n ) as Promise<NumberAllotmentGetAcquiredNumberLimitsResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getAcquiredNumberLimitsOperationSpec: coreClient.OperationSpec = {\n path: \"/administration/resources/{resourceId}/telephone-number-summary\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper:\n Mappers.Paths190FnhrAdministrationResourcesResourceidTelephoneNumberSummaryGetResponses200ContentApplicationJsonSchema\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.resourceId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -15,6 +15,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
15
15
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /** Class containing Tiering operations. */
17
17
  class TieringImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class Tiering class.
20
21
  * @param client Reference to the service client
@@ -28,7 +29,7 @@ class TieringImpl {
28
29
  * @param options The options parameters.
29
30
  */
30
31
  async getByResourceId(resourceId, options) {
31
- return tracing_js_1.tracingClient.withSpan("TieringClient.getByResourceId", options !== null && options !== void 0 ? options : {}, async (options) => {
32
+ return tracing_js_1.tracingClient.withSpan("TieringClient.getByResourceId", options ?? {}, async (options) => {
32
33
  return this.client.sendOperationRequest({ resourceId, options }, getByResourceIdOperationSpec);
33
34
  });
34
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tiering.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/tiering.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,2CAA2C;AAC3C,MAAa,WAAW;IAGtB;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,eAAe,CACnB,UAAkB,EAClB,OAA8C;QAE9C,OAAO,0BAAa,CAAC,QAAQ,CAC3B,+BAA+B,EAC/B,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,UAAU,EAAE,OAAO,EAAE,EACvB,4BAA4B,CACc,CAAC;QAC/C,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AA/BD,kCA+BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EAAE,8CAA8C;IACpD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,OAAO;SAC5B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,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 { tracingClient } from \"../tracing.js\";\nimport { Tiering } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { TieringClient } from \"../tieringClient.js\";\nimport {\n TieringGetByResourceIdOptionalParams,\n TieringGetByResourceIdResponse\n} from \"../models/index.js\";\n\n/** Class containing Tiering operations. */\nexport class TieringImpl implements Tiering {\n private readonly client: TieringClient;\n\n /**\n * Initialize a new instance of the class Tiering class.\n * @param client Reference to the service client\n */\n constructor(client: TieringClient) {\n this.client = client;\n }\n\n /**\n * Get the tiering data for a given resource\n * @param resourceId Resource Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getByResourceId(\n resourceId: string,\n options?: TieringGetByResourceIdOptionalParams\n ): Promise<TieringGetByResourceIdResponse> {\n return tracingClient.withSpan(\n \"TieringClient.getByResourceId\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { resourceId, options },\n getByResourceIdOperationSpec\n ) as Promise<TieringGetByResourceIdResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getByResourceIdOperationSpec: coreClient.OperationSpec = {\n path: \"/administration/tiers/resources/{resourceId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AcsTier\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.resourceId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"tiering.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/tiering.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,2CAA2C;AAC3C,MAAa,WAAW;IACL,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,eAAe,CACnB,UAAkB,EAClB,OAA8C;QAE9C,OAAO,0BAAa,CAAC,QAAQ,CAC3B,+BAA+B,EAC/B,OAAO,IAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,UAAU,EAAE,OAAO,EAAE,EACvB,4BAA4B,CACc,CAAC;QAC/C,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AA/BD,kCA+BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EAAE,8CAA8C;IACpD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,OAAO;SAC5B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,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 { tracingClient } from \"../tracing.js\";\nimport { Tiering } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { TieringClient } from \"../tieringClient.js\";\nimport {\n TieringGetByResourceIdOptionalParams,\n TieringGetByResourceIdResponse\n} from \"../models/index.js\";\n\n/** Class containing Tiering operations. */\nexport class TieringImpl implements Tiering {\n private readonly client: TieringClient;\n\n /**\n * Initialize a new instance of the class Tiering class.\n * @param client Reference to the service client\n */\n constructor(client: TieringClient) {\n this.client = client;\n }\n\n /**\n * Get the tiering data for a given resource\n * @param resourceId Resource Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getByResourceId(\n resourceId: string,\n options?: TieringGetByResourceIdOptionalParams\n ): Promise<TieringGetByResourceIdResponse> {\n return tracingClient.withSpan(\n \"TieringClient.getByResourceId\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { resourceId, options },\n getByResourceIdOperationSpec\n ) as Promise<TieringGetByResourceIdResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getByResourceIdOperationSpec: coreClient.OperationSpec = {\n path: \"/administration/tiers/resources/{resourceId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AcsTier\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.resourceId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -12,13 +12,14 @@ const tslib_1 = require("tslib");
12
12
  const coreClient = tslib_1.__importStar(require("@azure/core-client"));
13
13
  const index_js_1 = require("./operations/index.js");
14
14
  class TieringClient extends coreClient.ServiceClient {
15
+ endpoint;
16
+ apiVersion;
15
17
  /**
16
18
  * Initializes a new instance of the TieringClient class.
17
19
  * @param endpoint The communication resource, for example https://resourcename.communication.azure.com
18
20
  * @param options The parameter options
19
21
  */
20
22
  constructor(endpoint, options) {
21
- var _a, _b;
22
23
  if (endpoint === undefined) {
23
24
  throw new Error("'endpoint' cannot be null");
24
25
  }
@@ -29,13 +30,18 @@ class TieringClient extends coreClient.ServiceClient {
29
30
  const defaults = {
30
31
  requestContentType: "application/json; charset=utf-8"
31
32
  };
32
- const packageDetails = `azsdk-js-communication-tiering/1.0.0-beta.1`;
33
+ const packageDetails = `azsdk-js-communication-tiering/1.0.0-beta.2`;
33
34
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
34
35
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
35
36
  : `${packageDetails}`;
36
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
37
+ const optionsWithDefaults = {
38
+ ...defaults,
39
+ ...options,
40
+ userAgentOptions: {
37
41
  userAgentPrefix
38
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
42
+ },
43
+ endpoint: options.endpoint ?? options.baseUri ?? "{endpoint}"
44
+ };
39
45
  super(optionsWithDefaults);
40
46
  // Parameter assignments
41
47
  this.endpoint = endpoint;
@@ -70,6 +76,8 @@ class TieringClient extends coreClient.ServiceClient {
70
76
  };
71
77
  this.pipeline.addPolicy(apiVersionPolicy);
72
78
  }
79
+ numberAllotment;
80
+ tiering;
73
81
  }
74
82
  exports.TieringClient = TieringClient;
75
83
  //# sourceMappingURL=tieringClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tieringClient.js","sourceRoot":"","sources":["../../../../src/generated/src/tieringClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAMjD,oDAAyE;AAIzE,MAAa,aAAc,SAAQ,UAAU,CAAC,aAAa;IAIzD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAqC;;QACjE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAgC;YAC5C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,6CAA6C,CAAC;QACrE,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,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,QAAQ,EAAE,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,YAAY,GAC9D,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;QACrD,IAAI,CAAC,eAAe,GAAG,IAAI,8BAAmB,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,IAAI,sBAAW,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAIF;AA7ED,sCA6EC","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 {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport { NumberAllotmentImpl, TieringImpl } from \"./operations/index.js\";\nimport { NumberAllotment, Tiering } from \"./operationsInterfaces/index.js\";\nimport { TieringClientOptionalParams } from \"./models/index.js\";\n\nexport class TieringClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the TieringClient class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: TieringClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: TieringClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-communication-tiering/1.0.0-beta.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: options.endpoint ?? options.baseUri ?? \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-06-15\";\n this.numberAllotment = new NumberAllotmentImpl(this);\n this.tiering = new TieringImpl(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 numberAllotment: NumberAllotment;\n tiering: Tiering;\n}\n"]}
1
+ {"version":3,"file":"tieringClient.js","sourceRoot":"","sources":["../../../../src/generated/src/tieringClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAMjD,oDAAyE;AAIzE,MAAa,aAAc,SAAQ,UAAU,CAAC,aAAa;IACzD,QAAQ,CAAS;IACjB,UAAU,CAAS;IAEnB;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAqC;QACjE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAgC;YAC5C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,6CAA6C,CAAC;QACrE,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,EAAE,CAAC;QAE1B,MAAM,mBAAmB,GAAG;YAC1B,GAAG,QAAQ;YACX,GAAG,OAAO;YACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB;YACD,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,IAAI,YAAY;SAC9D,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;QACrD,IAAI,CAAC,eAAe,GAAG,IAAI,8BAAmB,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,IAAI,sBAAW,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,eAAe,CAAkB;IACjC,OAAO,CAAU;CAClB;AA7ED,sCA6EC","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 {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport { NumberAllotmentImpl, TieringImpl } from \"./operations/index.js\";\nimport { NumberAllotment, Tiering } from \"./operationsInterfaces/index.js\";\nimport { TieringClientOptionalParams } from \"./models/index.js\";\n\nexport class TieringClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the TieringClient class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: TieringClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: TieringClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-communication-tiering/1.0.0-beta.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: options.endpoint ?? options.baseUri ?? \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-06-15\";\n this.numberAllotment = new NumberAllotmentImpl(this);\n this.tiering = new TieringImpl(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 numberAllotment: NumberAllotment;\n tiering: Tiering;\n}\n"]}
@@ -12,6 +12,6 @@ const core_tracing_1 = require("@azure/core-tracing");
12
12
  exports.tracingClient = (0, core_tracing_1.createTracingClient)({
13
13
  namespace: "Microsoft.Communication",
14
14
  packageName: "@azure/communication-tiering",
15
- packageVersion: "1.0.0-beta.1"
15
+ packageVersion: "1.0.0-beta.2"
16
16
  });
17
17
  //# sourceMappingURL=tracing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,sDAA0D;AAE7C,QAAA,aAAa,GAAG,IAAA,kCAAmB,EAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,8BAA8B;IAC3C,cAAc,EAAE,cAAc;CAC/B,CAAC,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 { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-tiering\",\n packageVersion: \"1.0.0-beta.1\"\n});\n"]}
1
+ {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,sDAA0D;AAE7C,QAAA,aAAa,GAAG,IAAA,kCAAmB,EAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,8BAA8B;IAC3C,cAAc,EAAE,cAAc;CAC/B,CAAC,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 { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-tiering\",\n packageVersion: \"1.0.0-beta.2\"\n});\n"]}
@@ -15,16 +15,23 @@ const isTieringClientOptions = (options) => options && !(0, communication_common
15
15
  * Client class for interacting with Azure Communication Services Tiering.
16
16
  */
17
17
  class TieringClient {
18
+ /**
19
+ * A reference to the auto-generated TieringClient HTTP client.
20
+ */
21
+ client;
18
22
  constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
19
23
  const { url, credential } = (0, communication_common_2.parseClientArguments)(connectionStringOrUrl, credentialOrOptions);
20
24
  const options = isTieringClientOptions(credentialOrOptions)
21
25
  ? credentialOrOptions
22
26
  : maybeOptions;
23
- const internalPipelineOptions = Object.assign(Object.assign({}, options), {
24
- loggingOptions: {
25
- logger: index_js_2.logger.info,
27
+ const internalPipelineOptions = {
28
+ ...options,
29
+ ...{
30
+ loggingOptions: {
31
+ logger: index_js_2.logger.info,
32
+ },
26
33
  },
27
- });
34
+ };
28
35
  this.client = new index_js_1.TieringClient(url, internalPipelineOptions);
29
36
  const authPolicy = (0, communication_common_1.createCommunicationAuthPolicy)(credential);
30
37
  this.client.pipeline.addPolicy(authPolicy);
@@ -1 +1 @@
1
- {"version":3,"file":"tieringClient.js","sourceRoot":"","sources":["../../src/tieringClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,4CAA4C;;;AAU5C,gDAAqD;AACrD,sEAA4E;AAC5E,sEAAoF;AACpF,uDAAmF;AACnF,+CAA0C;AAC1C,2DAA2D;AAO3D,MAAM,sBAAsB,GAAG,CAAC,OAAY,EAAmC,EAAE,CAC/E,OAAO,IAAI,CAAC,IAAA,sCAAe,EAAC,OAAO,CAAC,IAAI,CAAC,IAAA,6BAAiB,EAAC,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAa,aAAa;IAgCxB,YACE,qBAA6B,EAC7B,mBAA4E,EAC5E,eAAqC,EAAE;QAEvC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAA,2CAAoB,EAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;QAC7F,MAAM,OAAO,GAAG,sBAAsB,CAAC,mBAAmB,CAAC;YACzD,CAAC,CAAC,mBAAmB;YACrB,CAAC,CAAC,YAAY,CAAC;QAEjB,MAAM,uBAAuB,mCACxB,OAAO,GACP;YACD,cAAc,EAAE;gBACd,MAAM,EAAE,iBAAM,CAAC,IAAI;aACpB;SACF,CACF,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,IAAI,wBAAsB,CAAC,GAAG,EAAE,uBAAuB,CAAC,CAAC;QACvE,MAAM,UAAU,GAAG,IAAA,oDAA6B,EAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,uBAAuB,CAC5B,UAAkB,EAClB,UAAgE,EAAE;QAElE,OAAO,0BAAa,CAAC,QAAQ,CAC3B,yCAAyC,EACzC,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzF,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CACxB,UAAkB,EAClB,UAAgD,EAAE;QAElD,OAAO,0BAAa,CAAC,QAAQ,CAAC,6BAA6B,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,EAAE;YACvF,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAvFD,sCAuFC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type {\n NumberAllotmentGetAcquiredNumberLimitsOptionalParams,\n TieringGetByResourceIdOptionalParams,\n AcsTier,\n AssetDetailsModel,\n} from \"./models.js\";\nimport type { CommonClientOptions, InternalClientPipelineOptions } from \"@azure/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport { isKeyCredential, parseClientArguments } from \"@azure/communication-common\";\nimport { TieringClient as TieringGeneratedClient } from \"./generated/src/index.js\";\nimport { logger } from \"./utils/index.js\";\nimport { tracingClient } from \"./generated/src/tracing.js\";\n\n/**\n * Client options used to configure the TieringGeneratedClient API requests.\n */\nexport interface TieringClientOptions extends CommonClientOptions {}\n\nconst isTieringClientOptions = (options: any): options is TieringClientOptions =>\n options && !isKeyCredential(options) && !isTokenCredential(options);\n\n/**\n * Client class for interacting with Azure Communication Services Tiering.\n */\nexport class TieringClient {\n /**\n * A reference to the auto-generated TieringClient HTTP client.\n */\n private readonly client: TieringGeneratedClient;\n\n /**\n * Initializes a new instance of the TieringClient class using a connection string.\n *\n * @param connectionString - Connection string to connect to an Azure Communication Service resource. (eg: endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret)\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(connectionString: string, options?: TieringClientOptions);\n\n /**\n * Initializes a new instance of the TieringClient class using an Azure KeyCredential.\n *\n * @param endpoint - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net)\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(endpoint: string, credential: KeyCredential, options?: TieringClientOptions);\n\n /**\n * Initializes a new instance of the TieringClient class using an Azure KeyCredential.\n *\n * @param endpoint - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net)\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(endpoint: string, credential: TokenCredential, options?: TieringClientOptions);\n\n public constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | TieringClientOptions,\n maybeOptions: TieringClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isTieringClientOptions(credentialOrOptions)\n ? credentialOrOptions\n : maybeOptions;\n\n const internalPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n this.client = new TieringGeneratedClient(url, internalPipelineOptions);\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.client.pipeline.addPolicy(authPolicy);\n }\n\n /**\n * Get acquired numbers and limits for a resource.\n *\n * @param options - Additional request options.\n */\n public getAcquiredNumberLimits(\n resourceId: string,\n options: NumberAllotmentGetAcquiredNumberLimitsOptionalParams = {},\n ): Promise<AssetDetailsModel> {\n return tracingClient.withSpan(\n \"numberAllotment.getAcquiredNumberLimits\",\n options,\n (updatedOptions) => {\n return this.client.numberAllotment.getAcquiredNumberLimits(resourceId, updatedOptions);\n },\n );\n }\n\n /**\n * Get tiering info for a resource.\n *\n * @param options - Additional request options.\n */\n public getTierByResourceId(\n resourceId: string,\n options: TieringGetByResourceIdOptionalParams = {},\n ): Promise<AcsTier> {\n return tracingClient.withSpan(\"tiering.getTierByResourceId\", options, (updatedOptions) => {\n return this.client.tiering.getByResourceId(resourceId, updatedOptions);\n });\n }\n}\n"]}
1
+ {"version":3,"file":"tieringClient.js","sourceRoot":"","sources":["../../src/tieringClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,4CAA4C;;;AAU5C,gDAAqD;AACrD,sEAA4E;AAC5E,sEAAoF;AACpF,uDAAmF;AACnF,+CAA0C;AAC1C,2DAA2D;AAO3D,MAAM,sBAAsB,GAAG,CAAC,OAAY,EAAmC,EAAE,CAC/E,OAAO,IAAI,CAAC,IAAA,sCAAe,EAAC,OAAO,CAAC,IAAI,CAAC,IAAA,6BAAiB,EAAC,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAa,aAAa;IACxB;;OAEG;IACc,MAAM,CAAyB;IA4BhD,YACE,qBAA6B,EAC7B,mBAA4E,EAC5E,eAAqC,EAAE;QAEvC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAA,2CAAoB,EAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;QAC7F,MAAM,OAAO,GAAG,sBAAsB,CAAC,mBAAmB,CAAC;YACzD,CAAC,CAAC,mBAAmB;YACrB,CAAC,CAAC,YAAY,CAAC;QAEjB,MAAM,uBAAuB,GAAkC;YAC7D,GAAG,OAAO;YACV,GAAG;gBACD,cAAc,EAAE;oBACd,MAAM,EAAE,iBAAM,CAAC,IAAI;iBACpB;aACF;SACF,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,IAAI,wBAAsB,CAAC,GAAG,EAAE,uBAAuB,CAAC,CAAC;QACvE,MAAM,UAAU,GAAG,IAAA,oDAA6B,EAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,uBAAuB,CAC5B,UAAkB,EAClB,UAAgE,EAAE;QAElE,OAAO,0BAAa,CAAC,QAAQ,CAC3B,yCAAyC,EACzC,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzF,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CACxB,UAAkB,EAClB,UAAgD,EAAE;QAElD,OAAO,0BAAa,CAAC,QAAQ,CAAC,6BAA6B,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,EAAE;YACvF,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAvFD,sCAuFC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type {\n NumberAllotmentGetAcquiredNumberLimitsOptionalParams,\n TieringGetByResourceIdOptionalParams,\n AcsTier,\n AssetDetailsModel,\n} from \"./models.js\";\nimport type { CommonClientOptions, InternalClientPipelineOptions } from \"@azure/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport { isKeyCredential, parseClientArguments } from \"@azure/communication-common\";\nimport { TieringClient as TieringGeneratedClient } from \"./generated/src/index.js\";\nimport { logger } from \"./utils/index.js\";\nimport { tracingClient } from \"./generated/src/tracing.js\";\n\n/**\n * Client options used to configure the TieringGeneratedClient API requests.\n */\nexport interface TieringClientOptions extends CommonClientOptions {}\n\nconst isTieringClientOptions = (options: any): options is TieringClientOptions =>\n options && !isKeyCredential(options) && !isTokenCredential(options);\n\n/**\n * Client class for interacting with Azure Communication Services Tiering.\n */\nexport class TieringClient {\n /**\n * A reference to the auto-generated TieringClient HTTP client.\n */\n private readonly client: TieringGeneratedClient;\n\n /**\n * Initializes a new instance of the TieringClient class using a connection string.\n *\n * @param connectionString - Connection string to connect to an Azure Communication Service resource. (eg: endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret)\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(connectionString: string, options?: TieringClientOptions);\n\n /**\n * Initializes a new instance of the TieringClient class using an Azure KeyCredential.\n *\n * @param endpoint - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net)\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(endpoint: string, credential: KeyCredential, options?: TieringClientOptions);\n\n /**\n * Initializes a new instance of the TieringClient class using an Azure KeyCredential.\n *\n * @param endpoint - The endpoint of the service (eg: https://contoso.eastus.communications.azure.net)\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(endpoint: string, credential: TokenCredential, options?: TieringClientOptions);\n\n public constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | TieringClientOptions,\n maybeOptions: TieringClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isTieringClientOptions(credentialOrOptions)\n ? credentialOrOptions\n : maybeOptions;\n\n const internalPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n this.client = new TieringGeneratedClient(url, internalPipelineOptions);\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.client.pipeline.addPolicy(authPolicy);\n }\n\n /**\n * Get acquired numbers and limits for a resource.\n *\n * @param options - Additional request options.\n */\n public getAcquiredNumberLimits(\n resourceId: string,\n options: NumberAllotmentGetAcquiredNumberLimitsOptionalParams = {},\n ): Promise<AssetDetailsModel> {\n return tracingClient.withSpan(\n \"numberAllotment.getAcquiredNumberLimits\",\n options,\n (updatedOptions) => {\n return this.client.numberAllotment.getAcquiredNumberLimits(resourceId, updatedOptions);\n },\n );\n }\n\n /**\n * Get tiering info for a resource.\n *\n * @param options - Additional request options.\n */\n public getTierByResourceId(\n resourceId: string,\n options: TieringGetByResourceIdOptionalParams = {},\n ): Promise<AcsTier> {\n return tracingClient.withSpan(\"tiering.getTierByResourceId\", options, (updatedOptions) => {\n return this.client.tiering.getByResourceId(resourceId, updatedOptions);\n });\n }\n}\n"]}
@@ -1,11 +1,11 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.8"
9
- }
10
- ]
11
- }
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.53.1"
9
+ }
10
+ ]
11
+ }
@@ -3,5 +3,5 @@
3
3
  // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.SDK_VERSION = void 0;
6
- exports.SDK_VERSION = "1.0.0-beta.0";
6
+ exports.SDK_VERSION = "1.0.0-beta.2";
7
7
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,WAAW,GAAW,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.0-beta.0\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,WAAW,GAAW,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.0-beta.2\";\n"]}
@@ -11,6 +11,7 @@ import * as Mappers from "../models/mappers.js";
11
11
  import * as Parameters from "../models/parameters.js";
12
12
  /** Class containing NumberAllotment operations. */
13
13
  export class NumberAllotmentImpl {
14
+ client;
14
15
  /**
15
16
  * Initialize a new instance of the class NumberAllotment class.
16
17
  * @param client Reference to the service client
@@ -24,7 +25,7 @@ export class NumberAllotmentImpl {
24
25
  * @param options The options parameters.
25
26
  */
26
27
  async getAcquiredNumberLimits(resourceId, options) {
27
- return tracingClient.withSpan("TieringClient.getAcquiredNumberLimits", options !== null && options !== void 0 ? options : {}, async (options) => {
28
+ return tracingClient.withSpan("TieringClient.getAcquiredNumberLimits", options ?? {}, async (options) => {
28
29
  return this.client.sendOperationRequest({ resourceId, options }, getAcquiredNumberLimitsOperationSpec);
29
30
  });
30
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"numberAllotment.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/numberAllotment.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,uBAAuB,CAC3B,UAAkB,EAClB,OAA8D;QAE9D,OAAO,aAAa,CAAC,QAAQ,CAC3B,uCAAuC,EACvC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,UAAU,EAAE,OAAO,EAAE,EACvB,oCAAoC,CACsB,CAAC;QAC/D,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EAAE,iEAAiE;IACvE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EACR,OAAO,CAAC,8GAA8G;SACzH;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,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 { tracingClient } from \"../tracing.js\";\nimport { NumberAllotment } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { TieringClient } from \"../tieringClient.js\";\nimport {\n NumberAllotmentGetAcquiredNumberLimitsOptionalParams,\n NumberAllotmentGetAcquiredNumberLimitsResponse\n} from \"../models/index.js\";\n\n/** Class containing NumberAllotment operations. */\nexport class NumberAllotmentImpl implements NumberAllotment {\n private readonly client: TieringClient;\n\n /**\n * Initialize a new instance of the class NumberAllotment class.\n * @param client Reference to the service client\n */\n constructor(client: TieringClient) {\n this.client = client;\n }\n\n /**\n * Get acquired numbers and limits for a resource.\n * @param resourceId Resource Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getAcquiredNumberLimits(\n resourceId: string,\n options?: NumberAllotmentGetAcquiredNumberLimitsOptionalParams\n ): Promise<NumberAllotmentGetAcquiredNumberLimitsResponse> {\n return tracingClient.withSpan(\n \"TieringClient.getAcquiredNumberLimits\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { resourceId, options },\n getAcquiredNumberLimitsOperationSpec\n ) as Promise<NumberAllotmentGetAcquiredNumberLimitsResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getAcquiredNumberLimitsOperationSpec: coreClient.OperationSpec = {\n path: \"/administration/resources/{resourceId}/telephone-number-summary\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper:\n Mappers.Paths190FnhrAdministrationResourcesResourceidTelephoneNumberSummaryGetResponses200ContentApplicationJsonSchema\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.resourceId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"numberAllotment.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/numberAllotment.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IACb,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,uBAAuB,CAC3B,UAAkB,EAClB,OAA8D;QAE9D,OAAO,aAAa,CAAC,QAAQ,CAC3B,uCAAuC,EACvC,OAAO,IAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,UAAU,EAAE,OAAO,EAAE,EACvB,oCAAoC,CACsB,CAAC;QAC/D,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EAAE,iEAAiE;IACvE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EACR,OAAO,CAAC,8GAA8G;SACzH;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,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 { tracingClient } from \"../tracing.js\";\nimport { NumberAllotment } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { TieringClient } from \"../tieringClient.js\";\nimport {\n NumberAllotmentGetAcquiredNumberLimitsOptionalParams,\n NumberAllotmentGetAcquiredNumberLimitsResponse\n} from \"../models/index.js\";\n\n/** Class containing NumberAllotment operations. */\nexport class NumberAllotmentImpl implements NumberAllotment {\n private readonly client: TieringClient;\n\n /**\n * Initialize a new instance of the class NumberAllotment class.\n * @param client Reference to the service client\n */\n constructor(client: TieringClient) {\n this.client = client;\n }\n\n /**\n * Get acquired numbers and limits for a resource.\n * @param resourceId Resource Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getAcquiredNumberLimits(\n resourceId: string,\n options?: NumberAllotmentGetAcquiredNumberLimitsOptionalParams\n ): Promise<NumberAllotmentGetAcquiredNumberLimitsResponse> {\n return tracingClient.withSpan(\n \"TieringClient.getAcquiredNumberLimits\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { resourceId, options },\n getAcquiredNumberLimitsOperationSpec\n ) as Promise<NumberAllotmentGetAcquiredNumberLimitsResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getAcquiredNumberLimitsOperationSpec: coreClient.OperationSpec = {\n path: \"/administration/resources/{resourceId}/telephone-number-summary\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper:\n Mappers.Paths190FnhrAdministrationResourcesResourceidTelephoneNumberSummaryGetResponses200ContentApplicationJsonSchema\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.resourceId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -11,6 +11,7 @@ import * as Mappers from "../models/mappers.js";
11
11
  import * as Parameters from "../models/parameters.js";
12
12
  /** Class containing Tiering operations. */
13
13
  export class TieringImpl {
14
+ client;
14
15
  /**
15
16
  * Initialize a new instance of the class Tiering class.
16
17
  * @param client Reference to the service client
@@ -24,7 +25,7 @@ export class TieringImpl {
24
25
  * @param options The options parameters.
25
26
  */
26
27
  async getByResourceId(resourceId, options) {
27
- return tracingClient.withSpan("TieringClient.getByResourceId", options !== null && options !== void 0 ? options : {}, async (options) => {
28
+ return tracingClient.withSpan("TieringClient.getByResourceId", options ?? {}, async (options) => {
28
29
  return this.client.sendOperationRequest({ resourceId, options }, getByResourceIdOperationSpec);
29
30
  });
30
31
  }