@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
@@ -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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AC,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,I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AAC;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,6BAA6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,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"]}
@@ -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,kBAA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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;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wB;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,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AC,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,M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AAC,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"]}
package/package.json CHANGED
@@ -1,30 +1,11 @@
1
1
  {
2
2
  "name": "@azure-tools/communication-tiering",
3
- "version": "1.0.0-alpha.20250901.2",
3
+ "version": "1.0.0-alpha.20251021.1",
4
4
  "description": "Test",
5
5
  "sdk-type": "client",
6
6
  "main": "./dist/commonjs/index.js",
7
7
  "module": "./dist/esm/index.js",
8
8
  "types": "./dist/commonjs/index.d.ts",
9
- "scripts": {
10
- "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
11
- "build:autorest": "autorest --typescript ./swagger/README.md",
12
- "build:samples": "dev-tool samples publish --force",
13
- "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
14
- "clean": "dev-tool run vendored rimraf --glob dist dist-* types *.tgz *.log",
15
- "execute:samples": "dev-tool samples run samples-dev",
16
- "extract-api": "dev-tool run build-package && dev-tool run extract-api",
17
- "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
18
- "lint": "eslint package.json src test",
19
- "lint:fix": "eslint package.json src test --fix --fix-type [problem,suggestion]",
20
- "pack": "npm pack 2>&1",
21
- "test": "npm run test:node && npm run test:browser",
22
- "test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
23
- "test:node": "dev-tool run test:vitest",
24
- "test:node:esm": "dev-tool run test:vitest --esm",
25
- "test:watch": "npm run test -- --watch --reporter min",
26
- "update-snippets": "dev-tool run update-snippets"
27
- },
28
9
  "files": [
29
10
  "dist/",
30
11
  "README.md",
@@ -48,33 +29,37 @@
48
29
  "sideEffects": false,
49
30
  "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
50
31
  "dependencies": {
51
- "@azure/abort-controller": "^2.1.2",
52
- "@azure/communication-common": "^2.3.1",
53
- "@azure/core-auth": "^1.9.0",
54
- "@azure/core-client": "^1.9.2",
32
+ "@azure/abort-controller": ">=2.1.3-alpha <2.1.3-alphb",
33
+ "@azure/communication-common": ">=2.4.2-alpha <2.4.2-alphb",
34
+ "@azure/core-auth": ">=1.10.1-alpha <1.10.1-alphb",
35
+ "@azure/core-client": ">=1.10.1-alpha <1.10.1-alphb",
55
36
  "@azure/core-lro": "^2.7.2",
56
- "@azure/core-paging": "^1.6.2",
57
- "@azure/core-rest-pipeline": "^1.18.2",
58
- "@azure/core-tracing": "^1.2.0",
59
- "@azure/logger": "^1.1.4",
37
+ "@azure/core-paging": ">=1.6.3-alpha <1.6.3-alphb",
38
+ "@azure/core-rest-pipeline": ">=1.22.1-alpha <1.22.1-alphb",
39
+ "@azure/core-tracing": ">=1.3.1-alpha <1.3.1-alphb",
40
+ "@azure/logger": ">=1.3.1-alpha <1.3.1-alphb",
60
41
  "events": "^3.3.0",
61
42
  "tslib": "^2.8.1"
62
43
  },
63
44
  "devDependencies": {
64
- "@azure-tools/test-recorder": ">=4.1.0-alpha <4.1.0-alphb",
65
- "@azure-tools/test-utils-vitest": ">=1.0.0-alpha <1.0.0-alphb",
66
- "@azure/core-util": "^1.9.0",
67
- "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
68
- "@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
69
- "@azure/identity": "^4.5.0",
70
- "@types/node": "^20.0.0",
71
- "@vitest/browser": "^3.0.9",
72
- "@vitest/coverage-istanbul": "^3.0.9",
45
+ "@azure/identity": "4.11.1",
46
+ "@types/node": "^20.19.0",
47
+ "@vitest/browser": "^3.2.3",
48
+ "@vitest/coverage-istanbul": "^3.2.3",
49
+ "cross-env": "^7.0.3",
73
50
  "dotenv": "^16.0.0",
74
- "eslint": "^9.9.0",
75
- "playwright": "^1.48.2",
76
- "typescript": "~5.8.2",
77
- "vitest": "^3.0.9"
51
+ "eslint": "^9.33.0",
52
+ "playwright": "^1.50.1",
53
+ "prettier": "^3.6.2",
54
+ "rimraf": "^6.0.1",
55
+ "tshy": "^3.0.0",
56
+ "typescript": "~5.9.3",
57
+ "vitest": "^3.2.3",
58
+ "@azure-tools/test-recorder": "^4.1.1",
59
+ "@azure-tools/test-utils-vitest": "^2.0.1",
60
+ "@azure/dev-tool": "^1.0.0",
61
+ "@azure/core-util": "^1.13.1-alpha.20251021.1",
62
+ "@azure/eslint-plugin-azure-sdk": "^3.0.0"
78
63
  },
79
64
  "//metadata": {
80
65
  "constantPaths": [
@@ -121,7 +106,7 @@
121
106
  "react-native"
122
107
  ],
123
108
  "selfLink": false,
124
- "project": "./tsconfig.src.json"
109
+ "project": "../../../tsconfig.src.build.json"
125
110
  },
126
111
  "browser": "./dist/browser/index.js",
127
112
  "exports": {
@@ -144,5 +129,23 @@
144
129
  "default": "./dist/commonjs/index.js"
145
130
  }
146
131
  }
132
+ },
133
+ "scripts": {
134
+ "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
135
+ "build:autorest": "autorest --typescript ./swagger/README.md",
136
+ "build:samples": "tsc -p tsconfig.samples.json",
137
+ "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
138
+ "clean": "rimraf --glob dist dist-* types *.tgz *.log",
139
+ "execute:samples": "dev-tool samples run samples-dev",
140
+ "extract-api": "dev-tool run build-package && dev-tool run extract-api",
141
+ "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
142
+ "lint": "eslint package.json src test",
143
+ "lint:fix": "eslint package.json src test --fix --fix-type [problem,suggestion]",
144
+ "pack": "pnpm pack 2>&1",
145
+ "test": "npm run test:node && npm run test:browser",
146
+ "test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
147
+ "test:node": "dev-tool run build-test --no-browser-test && dev-tool run test:vitest",
148
+ "test:watch": "npm run test -- --watch --reporter min",
149
+ "update-snippets": "dev-tool run update-snippets"
147
150
  }
148
- }
151
+ }