@azure/communication-sms 1.2.0-beta.2 → 1.2.0-beta.3

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 (38) hide show
  1. package/README.md +9 -9
  2. package/dist/browser/constants.js +1 -1
  3. package/dist/browser/constants.js.map +1 -1
  4. package/dist/browser/generated/src/smsApiClient.js +1 -1
  5. package/dist/browser/generated/src/smsApiClient.js.map +1 -1
  6. package/dist/browser/generated/src/tracing.js +1 -1
  7. package/dist/browser/generated/src/tracing.js.map +1 -1
  8. package/dist/browser/optOutsClient.d.ts.map +1 -1
  9. package/dist/browser/optOutsClient.js +1 -1
  10. package/dist/browser/optOutsClient.js.map +1 -1
  11. package/dist/commonjs/constants.js +1 -1
  12. package/dist/commonjs/constants.js.map +1 -1
  13. package/dist/commonjs/generated/src/smsApiClient.js +1 -1
  14. package/dist/commonjs/generated/src/smsApiClient.js.map +1 -1
  15. package/dist/commonjs/generated/src/tracing.js +1 -1
  16. package/dist/commonjs/generated/src/tracing.js.map +1 -1
  17. package/dist/commonjs/optOutsClient.d.ts.map +1 -1
  18. package/dist/commonjs/optOutsClient.js +1 -1
  19. package/dist/commonjs/optOutsClient.js.map +1 -1
  20. package/dist/esm/constants.js +1 -1
  21. package/dist/esm/constants.js.map +1 -1
  22. package/dist/esm/generated/src/smsApiClient.js +1 -1
  23. package/dist/esm/generated/src/smsApiClient.js.map +1 -1
  24. package/dist/esm/generated/src/tracing.js +1 -1
  25. package/dist/esm/generated/src/tracing.js.map +1 -1
  26. package/dist/esm/optOutsClient.d.ts.map +1 -1
  27. package/dist/esm/optOutsClient.js +1 -1
  28. package/dist/esm/optOutsClient.js.map +1 -1
  29. package/dist/react-native/constants.js +1 -1
  30. package/dist/react-native/constants.js.map +1 -1
  31. package/dist/react-native/generated/src/smsApiClient.js +1 -1
  32. package/dist/react-native/generated/src/smsApiClient.js.map +1 -1
  33. package/dist/react-native/generated/src/tracing.js +1 -1
  34. package/dist/react-native/generated/src/tracing.js.map +1 -1
  35. package/dist/react-native/optOutsClient.d.ts.map +1 -1
  36. package/dist/react-native/optOutsClient.js +1 -1
  37. package/dist/react-native/optOutsClient.js.map +1 -1
  38. package/package.json +2 -2
package/README.md CHANGED
@@ -91,12 +91,12 @@ const sendResults = await client.send(
91
91
  {
92
92
  from: "<from-phone-number>", // Your E.164 formatted phone number used to send SMS
93
93
  to: ["<to-phone-number-1>", "<to-phone-number-2>"], // The list of E.164 formatted phone numbers to which message is being sent
94
- message: "Weekly Promotion!" // The message being sent
94
+ message: "Weekly Promotion!", // The message being sent
95
95
  },
96
96
  {
97
97
  enableDeliveryReport: true,
98
- tag: "marketing"
99
- }
98
+ tag: "marketing",
99
+ },
100
100
  );
101
101
 
102
102
  for (const sendResult of sendResults) {
@@ -119,7 +119,7 @@ try {
119
119
  const sendResults = await client.send({
120
120
  from: "<from-phone-number>", // Your E.164 formatted phone number used to send SMS
121
121
  to: ["<to-phone-number-1>", "<to-phone-number-2>"], // The list of E.164 formatted phone numbers to which message is being sent
122
- message: "Hello World via SMS!" // The message being sent
122
+ message: "Hello World via SMS!", // The message being sent
123
123
  });
124
124
  for (const sendResult of sendResults) {
125
125
  if (sendResult.successful) {
@@ -147,16 +147,16 @@ If you'd like to contribute to this library, please read the [contributing guide
147
147
 
148
148
  - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
149
149
 
150
- [azure_cli]: https://docs.microsoft.com/cli/azure
150
+ [azure_cli]: https://learn.microsoft.com/cli/azure
151
151
  [azure_sub]: https://azure.microsoft.com/free/
152
152
  [azure_portal]: https://portal.azure.com
153
- [azure_powershell]: https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice
153
+ [azure_powershell]: https://learn.microsoft.com/powershell/module/az.communication/new-azcommunicationservice
154
154
  [defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
155
155
  [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
156
- [get_phone_number_az_portal]: https://docs.microsoft.com/azure/communication-services/quickstarts/telephony/get-phone-number?pivots=platform-azp
156
+ [get_phone_number_az_portal]: https://learn.microsoft.com/azure/communication-services/quickstarts/telephony/get-phone-number?pivots=platform-azp
157
157
  [azure_communication-phone-numbers]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/communication-phone-numbers
158
158
  [azure_communication-phone-numbers_readme]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/communication/communication-phone-numbers/README.md
159
- [handle_sms_events]: https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/handle-sms-events
160
- [next_steps]: https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/send?pivots=programming-language-javascript
159
+ [handle_sms_events]: https://learn.microsoft.com/azure/communication-services/quickstarts/telephony-sms/handle-sms-events
160
+ [next_steps]: https://learn.microsoft.com/azure/communication-services/quickstarts/telephony-sms/send?pivots=programming-language-javascript
161
161
 
162
162
  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcommunication%2Fcommunication-sms%2FREADME.png)
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- export const SDK_VERSION = "1.2.0-beta.2";
3
+ export const SDK_VERSION = "1.2.0-beta.3";
4
4
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/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.2.0-beta.2\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/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.2.0-beta.3\";\n"]}
@@ -25,7 +25,7 @@ export class SmsApiClient extends coreClient.ServiceClient {
25
25
  const defaults = {
26
26
  requestContentType: "application/json; charset=utf-8",
27
27
  };
28
- const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.2`;
28
+ const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.3`;
29
29
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
30
30
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
31
31
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"smsApiClient.js","sourceRoot":"","sources":["../../../../src/generated/src/smsApiClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI7D,MAAM,OAAO,YAAa,SAAQ,UAAU,CAAC,aAAa;IAIxD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAoC;;QAChE,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,GAA+B;YAC3C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACj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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 { SmsImpl, OptOutsImpl } from \"./operations/index.js\";\nimport { Sms, OptOuts } from \"./operationsInterfaces/index.js\";\nimport { SmsApiClientOptionalParams } from \"./models/index.js\";\n\nexport class SmsApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SmsApiClient class.\n * @param endpoint The communication resource, for example https://my-resource.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SmsApiClientOptionalParams) {\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: SmsApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-sms/1.2.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 || \"2024-12-10-preview\";\n this.sms = new SmsImpl(this);\n this.optOuts = new OptOutsImpl(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 sms: Sms;\n optOuts: OptOuts;\n}\n"]}
1
+ {"version":3,"file":"smsApiClient.js","sourceRoot":"","sources":["../../../../src/generated/src/smsApiClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI7D,MAAM,OAAO,YAAa,SAAQ,UAAU,CAAC,aAAa;IAIxD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAoC;;QAChE,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,GAA+B;YAC3C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;Q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,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 { SmsImpl, OptOutsImpl } from \"./operations/index.js\";\nimport { Sms, OptOuts } from \"./operationsInterfaces/index.js\";\nimport { SmsApiClientOptionalParams } from \"./models/index.js\";\n\nexport class SmsApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SmsApiClient class.\n * @param endpoint The communication resource, for example https://my-resource.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SmsApiClientOptionalParams) {\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: SmsApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.3`;\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 || \"2024-12-10-preview\";\n this.sms = new SmsImpl(this);\n this.optOuts = new OptOutsImpl(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 sms: Sms;\n optOuts: OptOuts;\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-sms",
12
- packageVersion: "1.2.0-beta.2",
12
+ packageVersion: "1.2.0-beta.3",
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,0BAA0B;IACvC,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-sms\",\n packageVersion: \"1.2.0-beta.2\",\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,0BAA0B;IACvC,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-sms\",\n packageVersion: \"1.2.0-beta.3\",\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"optOutsClient.d.ts","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC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GAAG,CACd,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EAAE,EACZ,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,eAAe,EAAE,CAAC;IAe7B;;;;;;OAMG;IACU,KAAK,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EAAE,EACZ,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAkBhC"}
@@ -21,7 +21,7 @@ export class OptOutsClient {
21
21
  async remove(from, to, options = {}) {
22
22
  const { operationOptions } = extractOperationOptions(options);
23
23
  return tracingClient.withSpan("OptOuts-Remove", operationOptions, async (updatedOptions) => {
24
- const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);
24
+ const response = await this.api.optOuts.remove(generateOptOutRequest(from, to), updatedOptions);
25
25
  return response.value.map((optOutResponseItem) => {
26
26
  var _a;
27
27
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"optOutsClient.js","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AA4EvE;;;GAGG;AACH,MAAM,OAAO,aAAa;IAGxB,YAAY,GAAiB;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,IAAY,EACZ,EAAY,EACZ,UAAyB,EAAE;QAE3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aAAa,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACzF,MAAM,QAAQ,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G,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aAAa,CAAC,QAAQ,CAAC,eAAe,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACxF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAC3C,qBAAqB,CAAC,IAAI,EAAE,EAAE,CAAC,EAC/B,cAAc,CACf,CAAC;YAEF,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,kBAAsC,EAAE,EAAE;;gBACnE,OAAO;oBACL,EAAE,EAAE,kBAAkB,CAAC,EAAE;oBACzB,UAAU,EAAE,MAAA,kBAAkB,CAAC,UAAU,mCAAI,KAAK;oBAClD,cAAc,EAAE,kBAAkB,CAAC,cAAc;oBACjD,YAAY,EAAE,MAAA,kBAAkB,CAAC,YAAY,mCAAI,EAAE;iBACpD,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { tracingClient } from \"./generated/src/tracing.js\";\nimport type { OptOutResponseItem } from \"./generated/src/index.js\";\nimport type { SmsApiClient } from \"./generated/src/smsApiClient.js\";\nimport { generateOptOutRequest } from \"./utils/smsUtils.js\";\nimport { extractOperationOptions } from \"./extractOperationOptions.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * The result of Opt Out Check request.\n */\nexport interface OptOutCheckResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * Indicates if the recipient's phone number in opted out from receiving messages or not.\n */\n isOptedOut: boolean;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Add request.\n */\nexport interface OptOutAddResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Remove request.\n */\nexport interface OptOutRemoveResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * Client options used to configure OptOuts Client API Check requests.\n */\nexport interface CheckOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Add requests.\n */\nexport interface AddOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Remove requests.\n */\nexport interface RemoveOptions extends OperationOptions {}\n\n/**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\nexport class OptOutsClient {\n private readonly api: SmsApiClient;\n\n constructor(api: SmsApiClient) {\n this.api = api;\n }\n\n /**\n * Removes phone numbers from the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async remove(\n from: string,\n to: string[],\n options: RemoveOptions = {},\n ): Promise<OptOutRemoveResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Remove\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Adds phone numbers to the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async add(\n from: string,\n to: string[],\n options: AddOptions = {},\n ): Promise<OptOutAddResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Add\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Checks if phone numbers are in the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async check(\n from: string,\n to: string[],\n options: CheckOptions = {},\n ): Promise<OptOutCheckResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Check\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.check(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n isOptedOut: optOutResponseItem.isOptedOut ?? false,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n}\n"]}
1
+ {"version":3,"file":"optOutsClient.js","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AA4EvE;;;GAGG;AACH,MAAM,OAAO,aAAa;IAGxB,YAAY,GAAiB;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,IAAY,EACZ,EAAY,EACZ,UAAyB,EAAE;QAE3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aA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I,KAAK,CAAC,KAAK,CAChB,IAAY,EACZ,EAAY,EACZ,UAAwB,EAAE;QAE1B,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aAAa,CAAC,QAAQ,CAAC,eAAe,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACxF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAC3C,qBAAqB,CAAC,IAAI,EAAE,EAAE,CAAC,EAC/B,cAAc,CACf,CAAC;YAEF,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,kBAAsC,EAAE,EAAE;;gBACnE,OAAO;oBACL,EAAE,EAAE,kBAAkB,CAAC,EAAE;oBACzB,UAAU,EAAE,MAAA,kBAAkB,CAAC,UAAU,mCAAI,KAAK;oBAClD,cAAc,EAAE,kBAAkB,CAAC,cAAc;oBACjD,YAAY,EAAE,MAAA,kBAAkB,CAAC,YAAY,mCAAI,EAAE;iBACpD,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { tracingClient } from \"./generated/src/tracing.js\";\nimport type { OptOutResponseItem } from \"./generated/src/index.js\";\nimport type { SmsApiClient } from \"./generated/src/smsApiClient.js\";\nimport { generateOptOutRequest } from \"./utils/smsUtils.js\";\nimport { extractOperationOptions } from \"./extractOperationOptions.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * The result of Opt Out Check request.\n */\nexport interface OptOutCheckResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * Indicates if the recipient's phone number in opted out from receiving messages or not.\n */\n isOptedOut: boolean;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Add request.\n */\nexport interface OptOutAddResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Remove request.\n */\nexport interface OptOutRemoveResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * Client options used to configure OptOuts Client API Check requests.\n */\nexport interface CheckOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Add requests.\n */\nexport interface AddOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Remove requests.\n */\nexport interface RemoveOptions extends OperationOptions {}\n\n/**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\nexport class OptOutsClient {\n private readonly api: SmsApiClient;\n\n constructor(api: SmsApiClient) {\n this.api = api;\n }\n\n /**\n * Removes phone numbers from the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async remove(\n from: string,\n to: string[],\n options: RemoveOptions = {},\n ): Promise<OptOutRemoveResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Remove\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.remove(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Adds phone numbers to the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async add(\n from: string,\n to: string[],\n options: AddOptions = {},\n ): Promise<OptOutAddResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Add\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Checks if phone numbers are in the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async check(\n from: string,\n to: string[],\n options: CheckOptions = {},\n ): Promise<OptOutCheckResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Check\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.check(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n isOptedOut: optOutResponseItem.isOptedOut ?? false,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n}\n"]}
@@ -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.2.0-beta.2";
6
+ exports.SDK_VERSION = "1.2.0-beta.3";
7
7
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/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.2.0-beta.2\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/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.2.0-beta.3\";\n"]}
@@ -29,7 +29,7 @@ class SmsApiClient extends coreClient.ServiceClient {
29
29
  const defaults = {
30
30
  requestContentType: "application/json; charset=utf-8",
31
31
  };
32
- const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.2`;
32
+ const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.3`;
33
33
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
34
34
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
35
35
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"smsApiClient.js","sourceRoot":"","sources":["../../../../src/generated/src/smsApiClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAMjD,oDAA6D;AAI7D,MAAa,YAAa,SAAQ,UAAU,CAAC,aAAa;IAIxD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAoC;;QAChE,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,GAA+B;YAC3C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc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;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,oCA6EC","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 { SmsImpl, OptOutsImpl } from \"./operations/index.js\";\nimport { Sms, OptOuts } from \"./operationsInterfaces/index.js\";\nimport { SmsApiClientOptionalParams } from \"./models/index.js\";\n\nexport class SmsApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SmsApiClient class.\n * @param endpoint The communication resource, for example https://my-resource.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SmsApiClientOptionalParams) {\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: SmsApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-sms/1.2.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 || \"2024-12-10-preview\";\n this.sms = new SmsImpl(this);\n this.optOuts = new OptOutsImpl(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 sms: Sms;\n optOuts: OptOuts;\n}\n"]}
1
+ {"version":3,"file":"smsApiClient.js","sourceRoot":"","sources":["../../../../src/generated/src/smsApiClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAMjD,oDAA6D;AAI7D,MAAa,YAAa,SAAQ,UAAU,CAAC,aAAa;IAIxD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAoC;;QAChE,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,GAA+B;YAC3C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,MAAM,eA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,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,oCA6EC","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 { SmsImpl, OptOutsImpl } from \"./operations/index.js\";\nimport { Sms, OptOuts } from \"./operationsInterfaces/index.js\";\nimport { SmsApiClientOptionalParams } from \"./models/index.js\";\n\nexport class SmsApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SmsApiClient class.\n * @param endpoint The communication resource, for example https://my-resource.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SmsApiClientOptionalParams) {\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: SmsApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.3`;\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 || \"2024-12-10-preview\";\n this.sms = new SmsImpl(this);\n this.optOuts = new OptOutsImpl(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 sms: Sms;\n optOuts: OptOuts;\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-sms",
15
- packageVersion: "1.2.0-beta.2",
15
+ packageVersion: "1.2.0-beta.3",
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,0BAA0B;IACvC,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-sms\",\n packageVersion: \"1.2.0-beta.2\",\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,0BAA0B;IACvC,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-sms\",\n packageVersion: \"1.2.0-beta.3\",\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"optOutsClient.d.ts","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,cAAc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eAAe,EAAE,CAAC;IAe7B;;;;;;OAMG;IACU,KAAK,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EAAE,EACZ,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAkBhC"}
@@ -24,7 +24,7 @@ class OptOutsClient {
24
24
  async remove(from, to, options = {}) {
25
25
  const { operationOptions } = (0, extractOperationOptions_js_1.extractOperationOptions)(options);
26
26
  return tracing_js_1.tracingClient.withSpan("OptOuts-Remove", operationOptions, async (updatedOptions) => {
27
- const response = await this.api.optOuts.add((0, smsUtils_js_1.generateOptOutRequest)(from, to), updatedOptions);
27
+ const response = await this.api.optOuts.remove((0, smsUtils_js_1.generateOptOutRequest)(from, to), updatedOptions);
28
28
  return response.value.map((optOutResponseItem) => {
29
29
  var _a;
30
30
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"optOutsClient.js","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,2DAA2D;AAG3D,qDAA4D;AAC5D,6EAAuE;AA4EvE;;;GAGG;AACH,MAAa,aAAa;IAGxB,YAAY,GAAiB;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,IAAY,EACZ,EAAY,EACZ,UAAyB,EAAE;QAE3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAA,oDAAuB,EAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,0BAAa,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACzF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,mCAAqB,EAAC,IAAI,EAAE,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC;YAE7F,OAAO,QAAQ,C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EAAE;YACxF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAC3C,IAAA,mCAAqB,EAAC,IAAI,EAAE,EAAE,CAAC,EAC/B,cAAc,CACf,CAAC;YAEF,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,kBAAsC,EAAE,EAAE;;gBACnE,OAAO;oBACL,EAAE,EAAE,kBAAkB,CAAC,EAAE;oBACzB,UAAU,EAAE,MAAA,kBAAkB,CAAC,UAAU,mCAAI,KAAK;oBAClD,cAAc,EAAE,kBAAkB,CAAC,cAAc;oBACjD,YAAY,EAAE,MAAA,kBAAkB,CAAC,YAAY,mCAAI,EAAE;iBACpD,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAxFD,sCAwFC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { tracingClient } from \"./generated/src/tracing.js\";\nimport type { OptOutResponseItem } from \"./generated/src/index.js\";\nimport type { SmsApiClient } from \"./generated/src/smsApiClient.js\";\nimport { generateOptOutRequest } from \"./utils/smsUtils.js\";\nimport { extractOperationOptions } from \"./extractOperationOptions.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * The result of Opt Out Check request.\n */\nexport interface OptOutCheckResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * Indicates if the recipient's phone number in opted out from receiving messages or not.\n */\n isOptedOut: boolean;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Add request.\n */\nexport interface OptOutAddResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Remove request.\n */\nexport interface OptOutRemoveResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * Client options used to configure OptOuts Client API Check requests.\n */\nexport interface CheckOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Add requests.\n */\nexport interface AddOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Remove requests.\n */\nexport interface RemoveOptions extends OperationOptions {}\n\n/**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\nexport class OptOutsClient {\n private readonly api: SmsApiClient;\n\n constructor(api: SmsApiClient) {\n this.api = api;\n }\n\n /**\n * Removes phone numbers from the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async remove(\n from: string,\n to: string[],\n options: RemoveOptions = {},\n ): Promise<OptOutRemoveResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Remove\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Adds phone numbers to the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async add(\n from: string,\n to: string[],\n options: AddOptions = {},\n ): Promise<OptOutAddResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Add\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Checks if phone numbers are in the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async check(\n from: string,\n to: string[],\n options: CheckOptions = {},\n ): Promise<OptOutCheckResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Check\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.check(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n isOptedOut: optOutResponseItem.isOptedOut ?? false,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n}\n"]}
1
+ {"version":3,"file":"optOutsClient.js","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,2DAA2D;AAG3D,qDAA4D;AAC5D,6EAAuE;AA4EvE;;;GAGG;AACH,MAAa,aAAa;IAGxB,YAAY,GAAiB;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,IAAY,EACZ,EAAY,EACZ,UAAyB,EAAE;QAE3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAA,oDAAuB,EAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,0BAAa,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACzF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAC5C,IAAA,mCAAqB,EAAC,IAAI,EAAE,EAAE,CAAC,EAC/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,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACxF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAC3C,IAAA,mCAAqB,EAAC,IAAI,EAAE,EAAE,CAAC,EAC/B,cAAc,CACf,CAAC;YAEF,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,kBAAsC,EAAE,EAAE;;gBACnE,OAAO;oBACL,EAAE,EAAE,kBAAkB,CAAC,EAAE;oBACzB,UAAU,EAAE,MAAA,kBAAkB,CAAC,UAAU,mCAAI,KAAK;oBAClD,cAAc,EAAE,kBAAkB,CAAC,cAAc;oBACjD,YAAY,EAAE,MAAA,kBAAkB,CAAC,YAAY,mCAAI,EAAE;iBACpD,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA3FD,sCA2FC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { tracingClient } from \"./generated/src/tracing.js\";\nimport type { OptOutResponseItem } from \"./generated/src/index.js\";\nimport type { SmsApiClient } from \"./generated/src/smsApiClient.js\";\nimport { generateOptOutRequest } from \"./utils/smsUtils.js\";\nimport { extractOperationOptions } from \"./extractOperationOptions.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * The result of Opt Out Check request.\n */\nexport interface OptOutCheckResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * Indicates if the recipient's phone number in opted out from receiving messages or not.\n */\n isOptedOut: boolean;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Add request.\n */\nexport interface OptOutAddResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Remove request.\n */\nexport interface OptOutRemoveResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * Client options used to configure OptOuts Client API Check requests.\n */\nexport interface CheckOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Add requests.\n */\nexport interface AddOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Remove requests.\n */\nexport interface RemoveOptions extends OperationOptions {}\n\n/**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\nexport class OptOutsClient {\n private readonly api: SmsApiClient;\n\n constructor(api: SmsApiClient) {\n this.api = api;\n }\n\n /**\n * Removes phone numbers from the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async remove(\n from: string,\n to: string[],\n options: RemoveOptions = {},\n ): Promise<OptOutRemoveResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Remove\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.remove(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Adds phone numbers to the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async add(\n from: string,\n to: string[],\n options: AddOptions = {},\n ): Promise<OptOutAddResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Add\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Checks if phone numbers are in the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async check(\n from: string,\n to: string[],\n options: CheckOptions = {},\n ): Promise<OptOutCheckResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Check\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.check(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n isOptedOut: optOutResponseItem.isOptedOut ?? false,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\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.2.0-beta.2";
3
+ export const SDK_VERSION = "1.2.0-beta.3";
4
4
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/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.2.0-beta.2\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/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.2.0-beta.3\";\n"]}
@@ -25,7 +25,7 @@ export class SmsApiClient extends coreClient.ServiceClient {
25
25
  const defaults = {
26
26
  requestContentType: "application/json; charset=utf-8",
27
27
  };
28
- const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.2`;
28
+ const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.3`;
29
29
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
30
30
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
31
31
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"smsApiClient.js","sourceRoot":"","sources":["../../../../src/generated/src/smsApiClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI7D,MAAM,OAAO,YAAa,SAAQ,UAAU,CAAC,aAAa;IAIxD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAoC;;QAChE,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,GAA+B;YAC3C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,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,K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AC,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 { SmsImpl, OptOutsImpl } from \"./operations/index.js\";\nimport { Sms, OptOuts } from \"./operationsInterfaces/index.js\";\nimport { SmsApiClientOptionalParams } from \"./models/index.js\";\n\nexport class SmsApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SmsApiClient class.\n * @param endpoint The communication resource, for example https://my-resource.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SmsApiClientOptionalParams) {\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: SmsApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-sms/1.2.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 || \"2024-12-10-preview\";\n this.sms = new SmsImpl(this);\n this.optOuts = new OptOutsImpl(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 sms: Sms;\n optOuts: OptOuts;\n}\n"]}
1
+ {"version":3,"file":"smsApiClient.js","sourceRoot":"","sources":["../../../../src/generated/src/smsApiClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI7D,MAAM,OAAO,YAAa,SAAQ,UAAU,CAAC,aAAa;IAIxD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAoC;;QAChE,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,GAA+B;YAC3C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI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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 { SmsImpl, OptOutsImpl } from \"./operations/index.js\";\nimport { Sms, OptOuts } from \"./operationsInterfaces/index.js\";\nimport { SmsApiClientOptionalParams } from \"./models/index.js\";\n\nexport class SmsApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SmsApiClient class.\n * @param endpoint The communication resource, for example https://my-resource.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SmsApiClientOptionalParams) {\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: SmsApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.3`;\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 || \"2024-12-10-preview\";\n this.sms = new SmsImpl(this);\n this.optOuts = new OptOutsImpl(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 sms: Sms;\n optOuts: OptOuts;\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-sms",
12
- packageVersion: "1.2.0-beta.2",
12
+ packageVersion: "1.2.0-beta.3",
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,0BAA0B;IACvC,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-sms\",\n packageVersion: \"1.2.0-beta.2\",\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,0BAA0B;IACvC,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-sms\",\n packageVersion: \"1.2.0-beta.3\",\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"optOutsClient.d.ts","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;O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B,OAAO,CAAC,eAAe,EAAE,CAAC;IAe7B;;;;;;OAMG;IACU,KAAK,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EAAE,EACZ,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAkBhC"}
@@ -21,7 +21,7 @@ export class OptOutsClient {
21
21
  async remove(from, to, options = {}) {
22
22
  const { operationOptions } = extractOperationOptions(options);
23
23
  return tracingClient.withSpan("OptOuts-Remove", operationOptions, async (updatedOptions) => {
24
- const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);
24
+ const response = await this.api.optOuts.remove(generateOptOutRequest(from, to), updatedOptions);
25
25
  return response.value.map((optOutResponseItem) => {
26
26
  var _a;
27
27
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"optOutsClient.js","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AA4EvE;;;GAGG;AACH,MAAM,OAAO,aAAa;IAGxB,YAAY,GAAiB;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,IAAY,EACZ,EAAY,EACZ,UAAyB,EAAE;QAE3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aAAa,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACzF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,EAAE,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BAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACxF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAC3C,qBAAqB,CAAC,IAAI,EAAE,EAAE,CAAC,EAC/B,cAAc,CACf,CAAC;YAEF,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,kBAAsC,EAAE,EAAE;;gBACnE,OAAO;oBACL,EAAE,EAAE,kBAAkB,CAAC,EAAE;oBACzB,UAAU,EAAE,MAAA,kBAAkB,CAAC,UAAU,mCAAI,KAAK;oBAClD,cAAc,EAAE,kBAAkB,CAAC,cAAc;oBACjD,YAAY,EAAE,MAAA,kBAAkB,CAAC,YAAY,mCAAI,EAAE;iBACpD,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { tracingClient } from \"./generated/src/tracing.js\";\nimport type { OptOutResponseItem } from \"./generated/src/index.js\";\nimport type { SmsApiClient } from \"./generated/src/smsApiClient.js\";\nimport { generateOptOutRequest } from \"./utils/smsUtils.js\";\nimport { extractOperationOptions } from \"./extractOperationOptions.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * The result of Opt Out Check request.\n */\nexport interface OptOutCheckResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * Indicates if the recipient's phone number in opted out from receiving messages or not.\n */\n isOptedOut: boolean;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Add request.\n */\nexport interface OptOutAddResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Remove request.\n */\nexport interface OptOutRemoveResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * Client options used to configure OptOuts Client API Check requests.\n */\nexport interface CheckOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Add requests.\n */\nexport interface AddOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Remove requests.\n */\nexport interface RemoveOptions extends OperationOptions {}\n\n/**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\nexport class OptOutsClient {\n private readonly api: SmsApiClient;\n\n constructor(api: SmsApiClient) {\n this.api = api;\n }\n\n /**\n * Removes phone numbers from the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async remove(\n from: string,\n to: string[],\n options: RemoveOptions = {},\n ): Promise<OptOutRemoveResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Remove\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Adds phone numbers to the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async add(\n from: string,\n to: string[],\n options: AddOptions = {},\n ): Promise<OptOutAddResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Add\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Checks if phone numbers are in the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async check(\n from: string,\n to: string[],\n options: CheckOptions = {},\n ): Promise<OptOutCheckResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Check\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.check(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n isOptedOut: optOutResponseItem.isOptedOut ?? false,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n}\n"]}
1
+ {"version":3,"file":"optOutsClient.js","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AA4EvE;;;GAGG;AACH,MAAM,OAAO,aAAa;IAGxB,YAAY,GAAiB;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,IAAY,EACZ,EAAY,EACZ,UAAyB,EAAE;QAE3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aAAa,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACzF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AgB,EAAE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aAAa,CAAC,QAAQ,CAAC,eAAe,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACxF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAC3C,qBAAqB,CAAC,IAAI,EAAE,EAAE,CAAC,EAC/B,cAAc,CACf,CAAC;YAEF,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,kBAAsC,EAAE,EAAE;;gBACnE,OAAO;oBACL,EAAE,EAAE,kBAAkB,CAAC,EAAE;oBACzB,UAAU,EAAE,MAAA,kBAAkB,CAAC,UAAU,mCAAI,KAAK;oBAClD,cAAc,EAAE,kBAAkB,CAAC,cAAc;oBACjD,YAAY,EAAE,MAAA,kBAAkB,CAAC,YAAY,mCAAI,EAAE;iBACpD,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { tracingClient } from \"./generated/src/tracing.js\";\nimport type { OptOutResponseItem } from \"./generated/src/index.js\";\nimport type { SmsApiClient } from \"./generated/src/smsApiClient.js\";\nimport { generateOptOutRequest } from \"./utils/smsUtils.js\";\nimport { extractOperationOptions } from \"./extractOperationOptions.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * The result of Opt Out Check request.\n */\nexport interface OptOutCheckResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * Indicates if the recipient's phone number in opted out from receiving messages or not.\n */\n isOptedOut: boolean;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Add request.\n */\nexport interface OptOutAddResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Remove request.\n */\nexport interface OptOutRemoveResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * Client options used to configure OptOuts Client API Check requests.\n */\nexport interface CheckOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Add requests.\n */\nexport interface AddOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Remove requests.\n */\nexport interface RemoveOptions extends OperationOptions {}\n\n/**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\nexport class OptOutsClient {\n private readonly api: SmsApiClient;\n\n constructor(api: SmsApiClient) {\n this.api = api;\n }\n\n /**\n * Removes phone numbers from the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async remove(\n from: string,\n to: string[],\n options: RemoveOptions = {},\n ): Promise<OptOutRemoveResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Remove\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.remove(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Adds phone numbers to the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async add(\n from: string,\n to: string[],\n options: AddOptions = {},\n ): Promise<OptOutAddResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Add\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Checks if phone numbers are in the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async check(\n from: string,\n to: string[],\n options: CheckOptions = {},\n ): Promise<OptOutCheckResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Check\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.check(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n isOptedOut: optOutResponseItem.isOptedOut ?? false,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\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.2.0-beta.2";
3
+ export const SDK_VERSION = "1.2.0-beta.3";
4
4
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/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.2.0-beta.2\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/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.2.0-beta.3\";\n"]}
@@ -25,7 +25,7 @@ export class SmsApiClient extends coreClient.ServiceClient {
25
25
  const defaults = {
26
26
  requestContentType: "application/json; charset=utf-8",
27
27
  };
28
- const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.2`;
28
+ const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.3`;
29
29
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
30
30
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
31
31
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"smsApiClient.js","sourceRoot":"","sources":["../../../../src/generated/src/smsApiClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI7D,MAAM,OAAO,YAAa,SAAQ,UAAU,CAAC,aAAa;IAIxD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAoC;;QAChE,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,GAA+B;YAC3C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,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,C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C;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 { SmsImpl, OptOutsImpl } from \"./operations/index.js\";\nimport { Sms, OptOuts } from \"./operationsInterfaces/index.js\";\nimport { SmsApiClientOptionalParams } from \"./models/index.js\";\n\nexport class SmsApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SmsApiClient class.\n * @param endpoint The communication resource, for example https://my-resource.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SmsApiClientOptionalParams) {\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: SmsApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-sms/1.2.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 || \"2024-12-10-preview\";\n this.sms = new SmsImpl(this);\n this.optOuts = new OptOutsImpl(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 sms: Sms;\n optOuts: OptOuts;\n}\n"]}
1
+ {"version":3,"file":"smsApiClient.js","sourceRoot":"","sources":["../../../../src/generated/src/smsApiClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI7D,MAAM,OAAO,YAAa,SAAQ,UAAU,CAAC,aAAa;IAIxD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAoC;;QAChE,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,GAA+B;YAC3C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM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AG,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 { SmsImpl, OptOutsImpl } from \"./operations/index.js\";\nimport { Sms, OptOuts } from \"./operationsInterfaces/index.js\";\nimport { SmsApiClientOptionalParams } from \"./models/index.js\";\n\nexport class SmsApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SmsApiClient class.\n * @param endpoint The communication resource, for example https://my-resource.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SmsApiClientOptionalParams) {\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: SmsApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.3`;\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 || \"2024-12-10-preview\";\n this.sms = new SmsImpl(this);\n this.optOuts = new OptOutsImpl(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 sms: Sms;\n optOuts: OptOuts;\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-sms",
12
- packageVersion: "1.2.0-beta.2",
12
+ packageVersion: "1.2.0-beta.3",
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,0BAA0B;IACvC,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-sms\",\n packageVersion: \"1.2.0-beta.2\",\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,0BAA0B;IACvC,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-sms\",\n packageVersion: \"1.2.0-beta.3\",\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"optOutsClient.d.ts","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;I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,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EAAE,EACZ,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,eAAe,EAAE,CAAC;IAe7B;;;;;;OAMG;IACU,KAAK,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EAAE,EACZ,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAkBhC"}
@@ -21,7 +21,7 @@ export class OptOutsClient {
21
21
  async remove(from, to, options = {}) {
22
22
  const { operationOptions } = extractOperationOptions(options);
23
23
  return tracingClient.withSpan("OptOuts-Remove", operationOptions, async (updatedOptions) => {
24
- const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);
24
+ const response = await this.api.optOuts.remove(generateOptOutRequest(from, to), updatedOptions);
25
25
  return response.value.map((optOutResponseItem) => {
26
26
  var _a;
27
27
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"optOutsClient.js","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AA4EvE;;;GAGG;AACH,MAAM,OAAO,aAAa;IAGxB,YAAY,GAAiB;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,IAAY,EACZ,EAAY,EACZ,UAAyB,EAAE;QAE3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aAAa,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACzF,MAAM,QAAQ,GAAG,MAA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,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aAAa,CAAC,QAAQ,CAAC,eAAe,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACxF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAC3C,qBAAqB,CAAC,IAAI,EAAE,EAAE,CAAC,EAC/B,cAAc,CACf,CAAC;YAEF,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,kBAAsC,EAAE,EAAE;;gBACnE,OAAO;oBACL,EAAE,EAAE,kBAAkB,CAAC,EAAE;oBACzB,UAAU,EAAE,MAAA,kBAAkB,CAAC,UAAU,mCAAI,KAAK;oBAClD,cAAc,EAAE,kBAAkB,CAAC,cAAc;oBACjD,YAAY,EAAE,MAAA,kBAAkB,CAAC,YAAY,mCAAI,EAAE;iBACpD,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { tracingClient } from \"./generated/src/tracing.js\";\nimport type { OptOutResponseItem } from \"./generated/src/index.js\";\nimport type { SmsApiClient } from \"./generated/src/smsApiClient.js\";\nimport { generateOptOutRequest } from \"./utils/smsUtils.js\";\nimport { extractOperationOptions } from \"./extractOperationOptions.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * The result of Opt Out Check request.\n */\nexport interface OptOutCheckResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * Indicates if the recipient's phone number in opted out from receiving messages or not.\n */\n isOptedOut: boolean;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Add request.\n */\nexport interface OptOutAddResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Remove request.\n */\nexport interface OptOutRemoveResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * Client options used to configure OptOuts Client API Check requests.\n */\nexport interface CheckOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Add requests.\n */\nexport interface AddOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Remove requests.\n */\nexport interface RemoveOptions extends OperationOptions {}\n\n/**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\nexport class OptOutsClient {\n private readonly api: SmsApiClient;\n\n constructor(api: SmsApiClient) {\n this.api = api;\n }\n\n /**\n * Removes phone numbers from the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async remove(\n from: string,\n to: string[],\n options: RemoveOptions = {},\n ): Promise<OptOutRemoveResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Remove\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Adds phone numbers to the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async add(\n from: string,\n to: string[],\n options: AddOptions = {},\n ): Promise<OptOutAddResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Add\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Checks if phone numbers are in the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async check(\n from: string,\n to: string[],\n options: CheckOptions = {},\n ): Promise<OptOutCheckResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Check\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.check(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n isOptedOut: optOutResponseItem.isOptedOut ?? false,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n}\n"]}
1
+ {"version":3,"file":"optOutsClient.js","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AA4EvE;;;GAGG;AACH,MAAM,OAAO,aAAa;IAGxB,YAAY,GAAiB;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,IAAY,EACZ,EAAY,EACZ,UAAyB,EAAE;QAE3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aAAa,CAAC,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AAC,KAAK,CAChB,IAAY,EACZ,EAAY,EACZ,UAAwB,EAAE;QAE1B,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aAAa,CAAC,QAAQ,CAAC,eAAe,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACxF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAC3C,qBAAqB,CAAC,IAAI,EAAE,EAAE,CAAC,EAC/B,cAAc,CACf,CAAC;YAEF,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,kBAAsC,EAAE,EAAE;;gBACnE,OAAO;oBACL,EAAE,EAAE,kBAAkB,CAAC,EAAE;oBACzB,UAAU,EAAE,MAAA,kBAAkB,CAAC,UAAU,mCAAI,KAAK;oBAClD,cAAc,EAAE,kBAAkB,CAAC,cAAc;oBACjD,YAAY,EAAE,MAAA,kBAAkB,CAAC,YAAY,mCAAI,EAAE;iBACpD,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { tracingClient } from \"./generated/src/tracing.js\";\nimport type { OptOutResponseItem } from \"./generated/src/index.js\";\nimport type { SmsApiClient } from \"./generated/src/smsApiClient.js\";\nimport { generateOptOutRequest } from \"./utils/smsUtils.js\";\nimport { extractOperationOptions } from \"./extractOperationOptions.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * The result of Opt Out Check request.\n */\nexport interface OptOutCheckResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * Indicates if the recipient's phone number in opted out from receiving messages or not.\n */\n isOptedOut: boolean;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Add request.\n */\nexport interface OptOutAddResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Remove request.\n */\nexport interface OptOutRemoveResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * Client options used to configure OptOuts Client API Check requests.\n */\nexport interface CheckOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Add requests.\n */\nexport interface AddOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Remove requests.\n */\nexport interface RemoveOptions extends OperationOptions {}\n\n/**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\nexport class OptOutsClient {\n private readonly api: SmsApiClient;\n\n constructor(api: SmsApiClient) {\n this.api = api;\n }\n\n /**\n * Removes phone numbers from the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async remove(\n from: string,\n to: string[],\n options: RemoveOptions = {},\n ): Promise<OptOutRemoveResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Remove\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.remove(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Adds phone numbers to the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async add(\n from: string,\n to: string[],\n options: AddOptions = {},\n ): Promise<OptOutAddResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Add\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Checks if phone numbers are in the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async check(\n from: string,\n to: string[],\n options: CheckOptions = {},\n ): Promise<OptOutCheckResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Check\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.check(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n isOptedOut: optOutResponseItem.isOptedOut ?? false,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-sms",
3
- "version": "1.2.0-beta.2",
3
+ "version": "1.2.0-beta.3",
4
4
  "description": "SDK for Azure Communication SMS service which facilitates the sending of SMS messages.",
5
5
  "sdk-type": "client",
6
6
  "main": "./dist/commonjs/index.js",
@@ -82,7 +82,7 @@
82
82
  "dotenv": "^16.0.0",
83
83
  "eslint": "^9.9.0",
84
84
  "playwright": "^1.48.2",
85
- "typescript": "~5.6.2",
85
+ "typescript": "~5.7.2",
86
86
  "vitest": "^2.1.4"
87
87
  },
88
88
  "//metadata": {