@azure-tools/communication-toll-free-verification 1.0.0-alpha.20250805.1 → 1.0.0-alpha.20250901.2

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 (34) hide show
  1. package/dist/browser/generated/src/operations/tollFreeVerification.js +132 -81
  2. package/dist/browser/generated/src/operations/tollFreeVerification.js.map +1 -1
  3. package/dist/browser/generated/src/pagingHelper.js +4 -2
  4. package/dist/browser/generated/src/pagingHelper.js.map +1 -1
  5. package/dist/browser/generated/src/tollFreeVerificationClient.js +3 -10
  6. package/dist/browser/generated/src/tollFreeVerificationClient.js.map +1 -1
  7. package/dist/browser/tollFreeVerificationClient.js +4 -11
  8. package/dist/browser/tollFreeVerificationClient.js.map +1 -1
  9. package/dist/commonjs/generated/src/operations/tollFreeVerification.js +131 -81
  10. package/dist/commonjs/generated/src/operations/tollFreeVerification.js.map +1 -1
  11. package/dist/commonjs/generated/src/pagingHelper.js +4 -2
  12. package/dist/commonjs/generated/src/pagingHelper.js.map +1 -1
  13. package/dist/commonjs/generated/src/tollFreeVerificationClient.js +3 -10
  14. package/dist/commonjs/generated/src/tollFreeVerificationClient.js.map +1 -1
  15. package/dist/commonjs/tollFreeVerificationClient.js +4 -11
  16. package/dist/commonjs/tollFreeVerificationClient.js.map +1 -1
  17. package/dist/commonjs/tsdoc-metadata.json +11 -11
  18. package/dist/esm/generated/src/operations/tollFreeVerification.js +132 -81
  19. package/dist/esm/generated/src/operations/tollFreeVerification.js.map +1 -1
  20. package/dist/esm/generated/src/pagingHelper.js +4 -2
  21. package/dist/esm/generated/src/pagingHelper.js.map +1 -1
  22. package/dist/esm/generated/src/tollFreeVerificationClient.js +3 -10
  23. package/dist/esm/generated/src/tollFreeVerificationClient.js.map +1 -1
  24. package/dist/esm/tollFreeVerificationClient.js +4 -11
  25. package/dist/esm/tollFreeVerificationClient.js.map +1 -1
  26. package/dist/react-native/generated/src/operations/tollFreeVerification.js +132 -81
  27. package/dist/react-native/generated/src/operations/tollFreeVerification.js.map +1 -1
  28. package/dist/react-native/generated/src/pagingHelper.js +4 -2
  29. package/dist/react-native/generated/src/pagingHelper.js.map +1 -1
  30. package/dist/react-native/generated/src/tollFreeVerificationClient.js +3 -10
  31. package/dist/react-native/generated/src/tollFreeVerificationClient.js.map +1 -1
  32. package/dist/react-native/tollFreeVerificationClient.js +4 -11
  33. package/dist/react-native/tollFreeVerificationClient.js.map +1 -1
  34. package/package.json +2 -2
@@ -8,14 +8,13 @@
8
8
  import * as coreClient from "@azure/core-client";
9
9
  import { TollFreeVerificationImpl } from "./operations/index.js";
10
10
  export class TollFreeVerificationClient extends coreClient.ServiceClient {
11
- endpoint;
12
- apiVersion;
13
11
  /**
14
12
  * Initializes a new instance of the TollFreeVerificationClient class.
15
13
  * @param endpoint The communication resource, for example https://resourcename.communication.azure.com
16
14
  * @param options The parameter options
17
15
  */
18
16
  constructor(endpoint, options) {
17
+ var _a, _b;
19
18
  if (endpoint === undefined) {
20
19
  throw new Error("'endpoint' cannot be null");
21
20
  }
@@ -30,14 +29,9 @@ export class TollFreeVerificationClient extends coreClient.ServiceClient {
30
29
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
31
30
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
32
31
  : `${packageDetails}`;
33
- const optionsWithDefaults = {
34
- ...defaults,
35
- ...options,
36
- userAgentOptions: {
32
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
37
33
  userAgentPrefix,
38
- },
39
- endpoint: options.endpoint ?? options.baseUri ?? "{endpoint}",
40
- };
34
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
41
35
  super(optionsWithDefaults);
42
36
  // Parameter assignments
43
37
  this.endpoint = endpoint;
@@ -71,6 +65,5 @@ export class TollFreeVerificationClient extends coreClient.ServiceClient {
71
65
  };
72
66
  this.pipeline.addPolicy(apiVersionPolicy);
73
67
  }
74
- tollFreeVerification;
75
68
  }
76
69
  //# sourceMappingURL=tollFreeVerificationClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tollFreeVerificationClient.js","sourceRoot":"","sources":["../../../../src/generated/src/tollFreeVerificationClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAIjE,MAAM,OAAO,0BAA2B,SAAQ,UAAU,CAAC,aAAa;IACtE,QAAQ,CAAS;IACjB,UAAU,CAAS;IAEnB;;;;OAIG;IACH,YACE,QAAgB,EAChB,OAAkD;QAElD,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,GAA6C;YACzD,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,4DAA4D,CAAC;QACpF,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,GAAG;YAC1B,GAAG,QAAQ;YACX,GAAG,OAAO;YACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB;YACD,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,IAAI,YAAY;SAC9D,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,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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 { TollFreeVerificationImpl } from \"./operations/index.js\";\nimport { TollFreeVerification } from \"./operationsInterfaces/index.js\";\nimport { TollFreeVerificationClientOptionalParams } from \"./models/index.js\";\n\nexport class TollFreeVerificationClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the TollFreeVerificationClient class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n options?: TollFreeVerificationClientOptionalParams,\n ) {\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: TollFreeVerificationClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-toll-free-verification/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"{endpoint}\",\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-01-10-preview1\";\n this.tollFreeVerification = new TollFreeVerificationImpl(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 tollFreeVerification: TollFreeVerification;\n}\n"]}
1
+ {"version":3,"file":"tollFreeVerificationClient.js","sourceRoot":"","sources":["../../../../src/generated/src/tollFreeVerificationClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAIjE,MAAM,OAAO,0BAA2B,SAAQ,UAAU,CAAC,aAAa;IAItE;;;;OAIG;IACH,YACE,QAAgB,EAChB,OAAkD;;QAElD,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,GAA6C;YACzD,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,4DAA4D,CAAC;QACpF,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,e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;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAGF","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 { TollFreeVerificationImpl } from \"./operations/index.js\";\nimport { TollFreeVerification } from \"./operationsInterfaces/index.js\";\nimport { TollFreeVerificationClientOptionalParams } from \"./models/index.js\";\n\nexport class TollFreeVerificationClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the TollFreeVerificationClient class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n options?: TollFreeVerificationClientOptionalParams,\n ) {\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: TollFreeVerificationClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-toll-free-verification/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"{endpoint}\",\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-01-10-preview1\";\n this.tollFreeVerification = new TollFreeVerificationImpl(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 tollFreeVerification: TollFreeVerification;\n}\n"]}
@@ -6,23 +6,16 @@ import { logger } from "./utils/index.js";
6
6
  import { tracingClient } from "./generated/src/tracing.js";
7
7
  const isTollFreeVerificationClientOptions = (options) => options && !isKeyCredential(options) && !isTokenCredential(options);
8
8
  export class TollFreeVerificationClient {
9
- /**
10
- * A reference to the auto-generated Toll Free Verification HTTP client.
11
- */
12
- client;
13
9
  constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
14
10
  const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);
15
11
  const options = isTollFreeVerificationClientOptions(credentialOrOptions)
16
12
  ? credentialOrOptions
17
13
  : maybeOptions;
18
- const internalPipelineOptions = {
19
- ...options,
20
- ...{
21
- loggingOptions: {
22
- logger: logger.info,
23
- },
14
+ const internalPipelineOptions = Object.assign(Object.assign({}, options), {
15
+ loggingOptions: {
16
+ logger: logger.info,
24
17
  },
25
- };
18
+ });
26
19
  this.client = new TollFreeVerificationGeneratedClient(url, internalPipelineOptions);
27
20
  const authPolicy = createCommunicationAuthPolicy(credential);
28
21
  this.client.pipeline.addPolicy(authPolicy);
@@ -1 +1 @@
1
- {"version":3,"file":"tollFreeVerificationClient.js","sourceRoot":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AAE;QAE3E,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,aAAa,CAAC,SAAS,CACtD,yDAAyD,EACzD,OAAO,CACR,CAAC;QACF,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,4BAA4B,CAClE,WAAW,EACX,eAAe,EACf,cAAc,CACf,CAAC;QACJ,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,IAAI,CAAC,SAAS,CAAC;gBACb,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,CAAC;aACT,CAAC,CAAC;YACH,MAAM,CAAC,CAAC;QACV,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,CAAC;IACH,CAAC;IAEM,0BAA0B,CAC/B,WAAmB,EACnB,eAAuB,EACvB,YAAoB,EACpB,UAAwE,EAAE;QAE1E,OAAO,aAAa,CAAC,QAAQ,CAC3B,uDAAuD,EACvD,OAAO,EACP,KAAK,EACH,cAAwF,EACxF,EAAE;YACF,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,0BAA0B,CAChE,WAAW,EACX,eAAe,EACf,YAAY,EACZ,cAAc,CACf,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\nimport type {\n AttachmentType,\n CampaignBrief,\n CampaignBriefAttachment,\n FileType,\n TollFreeVerificationCreateOrReplaceCampaignBriefAttachmentOptionalParams,\n TollFreeVerificationDeleteCampaignBriefAttachmentOptionalParams,\n TollFreeVerificationDeleteCampaignBriefOptionalParams,\n TollFreeVerificationGetCampaignBriefAttachmentOptionalParams,\n TollFreeVerificationGetCampaignBriefAttachmentsOptionalParams,\n TollFreeVerificationGetCampaignBriefOptionalParams,\n TollFreeVerificationGetAllCampaignBriefSummariesOptionalParams,\n TollFreeVerificationSubmitCampaignBriefOptionalParams,\n TollFreeVerificationSubmitCampaignBriefResponse,\n TollFreeVerificationUpsertCampaignBriefOptionalParams,\n} from \"./models.js\";\nimport type { CommonClientOptions, InternalClientPipelineOptions } from \"@azure/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { isKeyCredential, parseClientArguments } from \"@azure/communication-common\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport type { CampaignBriefSummary } from \"./generated/src/index.js\";\nimport { TollFreeVerificationClient as TollFreeVerificationGeneratedClient } from \"./generated/src/index.js\";\nimport { createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport { logger } from \"./utils/index.js\";\nimport { tracingClient } from \"./generated/src/tracing.js\";\n/**\n * Client options used to configure the TollFreeVerificationClient API requests.\n */\nexport interface TollFreeVerificationClientOptions extends CommonClientOptions {}\n\nconst isTollFreeVerificationClientOptions = (\n options: any,\n): options is TollFreeVerificationClientOptions =>\n options && !isKeyCredential(options) && !isTokenCredential(options);\n\nexport class TollFreeVerificationClient {\n /**\n * A reference to the auto-generated Toll Free Verification HTTP client.\n */\n private readonly client: TollFreeVerificationGeneratedClient;\n\n public constructor(connectionString: string, options?: TollFreeVerificationClientOptions);\n\n public constructor(\n endpoint: string,\n credential: KeyCredential,\n options?: TollFreeVerificationClientOptions,\n );\n\n public constructor(\n endpoint: string,\n credential: TokenCredential,\n options?: TollFreeVerificationClientOptions,\n );\n\n public constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | TollFreeVerificationClientOptions,\n maybeOptions: TollFreeVerificationClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isTollFreeVerificationClientOptions(credentialOrOptions)\n ? credentialOrOptions\n : maybeOptions;\n\n const internalPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n this.client = new TollFreeVerificationGeneratedClient(url, internalPipelineOptions);\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.client.pipeline.addPolicy(authPolicy);\n }\n\n public getCampaignBrief(\n campaignBriefId: string,\n countryCode: string,\n options: TollFreeVerificationGetCampaignBriefOptionalParams = {},\n ): Promise<CampaignBrief> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-getCampaignBrief\",\n options,\n async (updatedOptions: TollFreeVerificationGetCampaignBriefOptionalParams | undefined) => {\n return this.client.tollFreeVerification.getCampaignBrief(\n countryCode,\n campaignBriefId,\n updatedOptions,\n );\n },\n );\n }\n\n public listCampaignBriefs(\n options: TollFreeVerificationGetAllCampaignBriefSummariesOptionalParams = {},\n ): PagedAsyncIterableIterator<CampaignBriefSummary> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"TollFreeVerificationClient-listCampaignBriefs\",\n options,\n );\n try {\n return this.client.tollFreeVerification.listAllCampaignBriefSummaries(updatedOptions);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n public upsertCampaignBrief(\n campaignBriefId: string,\n countryCode: string,\n options: TollFreeVerificationUpsertCampaignBriefOptionalParams = {},\n ): Promise<CampaignBrief> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-upsertCampaignBrief\",\n options,\n async (updatedOptions: TollFreeVerificationUpsertCampaignBriefOptionalParams | undefined) => {\n return this.client.tollFreeVerification.upsertCampaignBrief(\n countryCode,\n campaignBriefId,\n updatedOptions,\n );\n },\n );\n }\n\n public deleteCampaignBrief(\n campaignBriefId: string,\n countryCode: string,\n options: TollFreeVerificationDeleteCampaignBriefOptionalParams = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-deleteCampaignBrief\",\n options,\n async (updatedOptions: TollFreeVerificationDeleteCampaignBriefOptionalParams | undefined) => {\n return this.client.tollFreeVerification.deleteCampaignBrief(\n countryCode,\n campaignBriefId,\n updatedOptions,\n );\n },\n );\n }\n\n public submitCampaignBrief(\n campaignBriefId: string,\n countryCode: string,\n options: TollFreeVerificationSubmitCampaignBriefOptionalParams = {},\n ): Promise<TollFreeVerificationSubmitCampaignBriefResponse> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-upsertCampaignBrief\",\n options,\n async (updatedOptions: TollFreeVerificationSubmitCampaignBriefOptionalParams | undefined) => {\n return this.client.tollFreeVerification.submitCampaignBrief(\n countryCode,\n campaignBriefId,\n updatedOptions,\n );\n },\n );\n }\n\n public upsertCampaignBriefAttachment(\n countryCode: string,\n campaignBriefId: string,\n attachmentId: string,\n attachmentType: AttachmentType,\n fileName: string,\n fileType: FileType,\n fileContentBase64: string,\n options: TollFreeVerificationCreateOrReplaceCampaignBriefAttachmentOptionalParams = {},\n ): Promise<CampaignBriefAttachment> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-upsertCampaignBriefAttachment\",\n options,\n async (\n updatedOptions:\n | TollFreeVerificationCreateOrReplaceCampaignBriefAttachmentOptionalParams\n | undefined,\n ) => {\n return this.client.tollFreeVerification.createOrReplaceCampaignBriefAttachment(\n countryCode,\n campaignBriefId,\n attachmentId,\n attachmentId,\n attachmentType,\n fileName,\n fileType,\n fileContentBase64,\n updatedOptions,\n );\n },\n );\n }\n\n public deleteCampaignBriefAttachment(\n campaignBriefId: string,\n attachmentId: string,\n countryCode: string,\n options: TollFreeVerificationDeleteCampaignBriefAttachmentOptionalParams = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-deleteCampaignBriefAttachment\",\n options,\n async (\n updatedOptions: TollFreeVerificationDeleteCampaignBriefAttachmentOptionalParams | undefined,\n ) => {\n return this.client.tollFreeVerification.deleteCampaignBriefAttachment(\n countryCode,\n campaignBriefId,\n attachmentId,\n updatedOptions,\n );\n },\n );\n }\n\n public listCampaignBriefAttachments(\n countryCode: string,\n campaignBriefId: string,\n options: TollFreeVerificationGetCampaignBriefAttachmentsOptionalParams = {},\n ): PagedAsyncIterableIterator<CampaignBrief> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"TollFreeVerificationClient-listCampaignBriefAttachments\",\n options,\n );\n try {\n return this.client.tollFreeVerification.listCampaignBriefAttachments(\n countryCode,\n campaignBriefId,\n updatedOptions,\n );\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n public getCampaignBriefAttachment(\n countryCode: string,\n campaignBriefId: string,\n attachmentId: string,\n options: TollFreeVerificationGetCampaignBriefAttachmentOptionalParams = {},\n ): Promise<CampaignBrief> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-getCampaignBriefAttachment\",\n options,\n async (\n updatedOptions: TollFreeVerificationGetCampaignBriefAttachmentOptionalParams | undefined,\n ) => {\n return this.client.tollFreeVerification.getCampaignBriefAttachment(\n countryCode,\n campaignBriefId,\n attachmentId,\n updatedOptions,\n );\n },\n );\n }\n}\n"]}
1
+ {"version":3,"file":"tollFreeVerificationClient.js","sourceRoot":"","sources":["../../src/tollFreeVerificationClient.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGpF,OAAO,EAAE,0BAA0B,IAAI,mCAAmC,EAAE,MAAM,0BAA0B,CAAC;AAC7G,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAM3D,MAAM,mCAAmC,GAAG,CAC1C,OAAY,EACkC,EAAE,CAChD,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEtE,MAAM,OAAO,0BAA0B;IAoBrC,YACE,qBAA6B,EAC7B,mBAAyF,EACz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AAC,MAAM,CAAC,oBAAoB,CAAC,0BAA0B,CAChE,WAAW,EACX,eAAe,EACf,YAAY,EACZ,cAAc,CACf,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\nimport type {\n AttachmentType,\n CampaignBrief,\n CampaignBriefAttachment,\n FileType,\n TollFreeVerificationCreateOrReplaceCampaignBriefAttachmentOptionalParams,\n TollFreeVerificationDeleteCampaignBriefAttachmentOptionalParams,\n TollFreeVerificationDeleteCampaignBriefOptionalParams,\n TollFreeVerificationGetCampaignBriefAttachmentOptionalParams,\n TollFreeVerificationGetCampaignBriefAttachmentsOptionalParams,\n TollFreeVerificationGetCampaignBriefOptionalParams,\n TollFreeVerificationGetAllCampaignBriefSummariesOptionalParams,\n TollFreeVerificationSubmitCampaignBriefOptionalParams,\n TollFreeVerificationSubmitCampaignBriefResponse,\n TollFreeVerificationUpsertCampaignBriefOptionalParams,\n} from \"./models.js\";\nimport type { CommonClientOptions, InternalClientPipelineOptions } from \"@azure/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { isKeyCredential, parseClientArguments } from \"@azure/communication-common\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport type { CampaignBriefSummary } from \"./generated/src/index.js\";\nimport { TollFreeVerificationClient as TollFreeVerificationGeneratedClient } from \"./generated/src/index.js\";\nimport { createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport { logger } from \"./utils/index.js\";\nimport { tracingClient } from \"./generated/src/tracing.js\";\n/**\n * Client options used to configure the TollFreeVerificationClient API requests.\n */\nexport interface TollFreeVerificationClientOptions extends CommonClientOptions {}\n\nconst isTollFreeVerificationClientOptions = (\n options: any,\n): options is TollFreeVerificationClientOptions =>\n options && !isKeyCredential(options) && !isTokenCredential(options);\n\nexport class TollFreeVerificationClient {\n /**\n * A reference to the auto-generated Toll Free Verification HTTP client.\n */\n private readonly client: TollFreeVerificationGeneratedClient;\n\n public constructor(connectionString: string, options?: TollFreeVerificationClientOptions);\n\n public constructor(\n endpoint: string,\n credential: KeyCredential,\n options?: TollFreeVerificationClientOptions,\n );\n\n public constructor(\n endpoint: string,\n credential: TokenCredential,\n options?: TollFreeVerificationClientOptions,\n );\n\n public constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | TollFreeVerificationClientOptions,\n maybeOptions: TollFreeVerificationClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isTollFreeVerificationClientOptions(credentialOrOptions)\n ? credentialOrOptions\n : maybeOptions;\n\n const internalPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n this.client = new TollFreeVerificationGeneratedClient(url, internalPipelineOptions);\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.client.pipeline.addPolicy(authPolicy);\n }\n\n public getCampaignBrief(\n campaignBriefId: string,\n countryCode: string,\n options: TollFreeVerificationGetCampaignBriefOptionalParams = {},\n ): Promise<CampaignBrief> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-getCampaignBrief\",\n options,\n async (updatedOptions: TollFreeVerificationGetCampaignBriefOptionalParams | undefined) => {\n return this.client.tollFreeVerification.getCampaignBrief(\n countryCode,\n campaignBriefId,\n updatedOptions,\n );\n },\n );\n }\n\n public listCampaignBriefs(\n options: TollFreeVerificationGetAllCampaignBriefSummariesOptionalParams = {},\n ): PagedAsyncIterableIterator<CampaignBriefSummary> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"TollFreeVerificationClient-listCampaignBriefs\",\n options,\n );\n try {\n return this.client.tollFreeVerification.listAllCampaignBriefSummaries(updatedOptions);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n public upsertCampaignBrief(\n campaignBriefId: string,\n countryCode: string,\n options: TollFreeVerificationUpsertCampaignBriefOptionalParams = {},\n ): Promise<CampaignBrief> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-upsertCampaignBrief\",\n options,\n async (updatedOptions: TollFreeVerificationUpsertCampaignBriefOptionalParams | undefined) => {\n return this.client.tollFreeVerification.upsertCampaignBrief(\n countryCode,\n campaignBriefId,\n updatedOptions,\n );\n },\n );\n }\n\n public deleteCampaignBrief(\n campaignBriefId: string,\n countryCode: string,\n options: TollFreeVerificationDeleteCampaignBriefOptionalParams = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-deleteCampaignBrief\",\n options,\n async (updatedOptions: TollFreeVerificationDeleteCampaignBriefOptionalParams | undefined) => {\n return this.client.tollFreeVerification.deleteCampaignBrief(\n countryCode,\n campaignBriefId,\n updatedOptions,\n );\n },\n );\n }\n\n public submitCampaignBrief(\n campaignBriefId: string,\n countryCode: string,\n options: TollFreeVerificationSubmitCampaignBriefOptionalParams = {},\n ): Promise<TollFreeVerificationSubmitCampaignBriefResponse> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-upsertCampaignBrief\",\n options,\n async (updatedOptions: TollFreeVerificationSubmitCampaignBriefOptionalParams | undefined) => {\n return this.client.tollFreeVerification.submitCampaignBrief(\n countryCode,\n campaignBriefId,\n updatedOptions,\n );\n },\n );\n }\n\n public upsertCampaignBriefAttachment(\n countryCode: string,\n campaignBriefId: string,\n attachmentId: string,\n attachmentType: AttachmentType,\n fileName: string,\n fileType: FileType,\n fileContentBase64: string,\n options: TollFreeVerificationCreateOrReplaceCampaignBriefAttachmentOptionalParams = {},\n ): Promise<CampaignBriefAttachment> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-upsertCampaignBriefAttachment\",\n options,\n async (\n updatedOptions:\n | TollFreeVerificationCreateOrReplaceCampaignBriefAttachmentOptionalParams\n | undefined,\n ) => {\n return this.client.tollFreeVerification.createOrReplaceCampaignBriefAttachment(\n countryCode,\n campaignBriefId,\n attachmentId,\n attachmentId,\n attachmentType,\n fileName,\n fileType,\n fileContentBase64,\n updatedOptions,\n );\n },\n );\n }\n\n public deleteCampaignBriefAttachment(\n campaignBriefId: string,\n attachmentId: string,\n countryCode: string,\n options: TollFreeVerificationDeleteCampaignBriefAttachmentOptionalParams = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-deleteCampaignBriefAttachment\",\n options,\n async (\n updatedOptions: TollFreeVerificationDeleteCampaignBriefAttachmentOptionalParams | undefined,\n ) => {\n return this.client.tollFreeVerification.deleteCampaignBriefAttachment(\n countryCode,\n campaignBriefId,\n attachmentId,\n updatedOptions,\n );\n },\n );\n }\n\n public listCampaignBriefAttachments(\n countryCode: string,\n campaignBriefId: string,\n options: TollFreeVerificationGetCampaignBriefAttachmentsOptionalParams = {},\n ): PagedAsyncIterableIterator<CampaignBrief> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"TollFreeVerificationClient-listCampaignBriefAttachments\",\n options,\n );\n try {\n return this.client.tollFreeVerification.listCampaignBriefAttachments(\n countryCode,\n campaignBriefId,\n updatedOptions,\n );\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n public getCampaignBriefAttachment(\n countryCode: string,\n campaignBriefId: string,\n attachmentId: string,\n options: TollFreeVerificationGetCampaignBriefAttachmentOptionalParams = {},\n ): Promise<CampaignBrief> {\n return tracingClient.withSpan(\n \"TollFreeVerificationClient-getCampaignBriefAttachment\",\n options,\n async (\n updatedOptions: TollFreeVerificationGetCampaignBriefAttachmentOptionalParams | undefined,\n ) => {\n return this.client.tollFreeVerification.getCampaignBriefAttachment(\n countryCode,\n campaignBriefId,\n attachmentId,\n updatedOptions,\n );\n },\n );\n }\n}\n"]}
@@ -5,6 +5,7 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
+ import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
8
9
  import { tracingClient } from "../tracing.js";
9
10
  import { setContinuationToken } from "../pagingHelper.js";
10
11
  import * as coreClient from "@azure/core-client";
@@ -13,7 +14,6 @@ import * as Parameters from "../models/parameters.js";
13
14
  /// <reference lib="esnext.asynciterable" />
14
15
  /** Class containing TollFreeVerification operations. */
15
16
  export class TollFreeVerificationImpl {
16
- client;
17
17
  /**
18
18
  * Initialize a new instance of the class TollFreeVerification class.
19
19
  * @param client Reference to the service client
@@ -36,35 +36,52 @@ export class TollFreeVerificationImpl {
36
36
  return this;
37
37
  },
38
38
  byPage: (settings) => {
39
- if (settings?.maxPageSize) {
39
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
40
  throw new Error("maxPageSize is not supported by this operation.");
41
41
  }
42
42
  return this.getAllCampaignBriefsByCountryCodePagingPage(countryCode, options, settings);
43
43
  },
44
44
  };
45
45
  }
46
- async *getAllCampaignBriefsByCountryCodePagingPage(countryCode, options, settings) {
47
- let result;
48
- let continuationToken = settings?.continuationToken;
49
- if (!continuationToken) {
50
- result = await this._getAllCampaignBriefsByCountryCode(countryCode, options);
51
- let page = result.campaignBriefs || [];
52
- continuationToken = result.nextLink;
53
- setContinuationToken(page, continuationToken);
54
- yield page;
55
- }
56
- while (continuationToken) {
57
- result = await this._getAllCampaignBriefsByCountryCodeNext(countryCode, continuationToken, options);
58
- continuationToken = result.nextLink;
59
- let page = result.campaignBriefs || [];
60
- setContinuationToken(page, continuationToken);
61
- yield page;
62
- }
46
+ getAllCampaignBriefsByCountryCodePagingPage(countryCode, options, settings) {
47
+ return __asyncGenerator(this, arguments, function* getAllCampaignBriefsByCountryCodePagingPage_1() {
48
+ let result;
49
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
50
+ if (!continuationToken) {
51
+ result = yield __await(this._getAllCampaignBriefsByCountryCode(countryCode, options));
52
+ let page = result.campaignBriefs || [];
53
+ continuationToken = result.nextLink;
54
+ setContinuationToken(page, continuationToken);
55
+ yield yield __await(page);
56
+ }
57
+ while (continuationToken) {
58
+ result = yield __await(this._getAllCampaignBriefsByCountryCodeNext(countryCode, continuationToken, options));
59
+ continuationToken = result.nextLink;
60
+ let page = result.campaignBriefs || [];
61
+ setContinuationToken(page, continuationToken);
62
+ yield yield __await(page);
63
+ }
64
+ });
63
65
  }
64
- async *getAllCampaignBriefsByCountryCodePagingAll(countryCode, options) {
65
- for await (const page of this.getAllCampaignBriefsByCountryCodePagingPage(countryCode, options)) {
66
- yield* page;
67
- }
66
+ getAllCampaignBriefsByCountryCodePagingAll(countryCode, options) {
67
+ return __asyncGenerator(this, arguments, function* getAllCampaignBriefsByCountryCodePagingAll_1() {
68
+ var _a, e_1, _b, _c;
69
+ try {
70
+ for (var _d = true, _e = __asyncValues(this.getAllCampaignBriefsByCountryCodePagingPage(countryCode, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
71
+ _c = _f.value;
72
+ _d = false;
73
+ const page = _c;
74
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
75
+ }
76
+ }
77
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
78
+ finally {
79
+ try {
80
+ if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
81
+ }
82
+ finally { if (e_1) throw e_1.error; }
83
+ }
84
+ });
68
85
  }
69
86
  /**
70
87
  * Get a list of Campaign Brief Summaries for the current resource.
@@ -80,35 +97,52 @@ export class TollFreeVerificationImpl {
80
97
  return this;
81
98
  },
82
99
  byPage: (settings) => {
83
- if (settings?.maxPageSize) {
100
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
84
101
  throw new Error("maxPageSize is not supported by this operation.");
85
102
  }
86
103
  return this.getAllCampaignBriefSummariesPagingPage(options, settings);
87
104
  },
88
105
  };
89
106
  }
90
- async *getAllCampaignBriefSummariesPagingPage(options, settings) {
91
- let result;
92
- let continuationToken = settings?.continuationToken;
93
- if (!continuationToken) {
94
- result = await this._getAllCampaignBriefSummaries(options);
95
- let page = result.campaignBriefSummaries || [];
96
- continuationToken = result.nextLink;
97
- setContinuationToken(page, continuationToken);
98
- yield page;
99
- }
100
- while (continuationToken) {
101
- result = await this._getAllCampaignBriefSummariesNext(continuationToken, options);
102
- continuationToken = result.nextLink;
103
- let page = result.campaignBriefSummaries || [];
104
- setContinuationToken(page, continuationToken);
105
- yield page;
106
- }
107
+ getAllCampaignBriefSummariesPagingPage(options, settings) {
108
+ return __asyncGenerator(this, arguments, function* getAllCampaignBriefSummariesPagingPage_1() {
109
+ let result;
110
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
111
+ if (!continuationToken) {
112
+ result = yield __await(this._getAllCampaignBriefSummaries(options));
113
+ let page = result.campaignBriefSummaries || [];
114
+ continuationToken = result.nextLink;
115
+ setContinuationToken(page, continuationToken);
116
+ yield yield __await(page);
117
+ }
118
+ while (continuationToken) {
119
+ result = yield __await(this._getAllCampaignBriefSummariesNext(continuationToken, options));
120
+ continuationToken = result.nextLink;
121
+ let page = result.campaignBriefSummaries || [];
122
+ setContinuationToken(page, continuationToken);
123
+ yield yield __await(page);
124
+ }
125
+ });
107
126
  }
108
- async *getAllCampaignBriefSummariesPagingAll(options) {
109
- for await (const page of this.getAllCampaignBriefSummariesPagingPage(options)) {
110
- yield* page;
111
- }
127
+ getAllCampaignBriefSummariesPagingAll(options) {
128
+ return __asyncGenerator(this, arguments, function* getAllCampaignBriefSummariesPagingAll_1() {
129
+ var _a, e_2, _b, _c;
130
+ try {
131
+ for (var _d = true, _e = __asyncValues(this.getAllCampaignBriefSummariesPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
132
+ _c = _f.value;
133
+ _d = false;
134
+ const page = _c;
135
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
136
+ }
137
+ }
138
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
139
+ finally {
140
+ try {
141
+ if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
142
+ }
143
+ finally { if (e_2) throw e_2.error; }
144
+ }
145
+ });
112
146
  }
113
147
  /**
114
148
  * Gets a list of attachments from a Campaign Brief.
@@ -126,35 +160,52 @@ export class TollFreeVerificationImpl {
126
160
  return this;
127
161
  },
128
162
  byPage: (settings) => {
129
- if (settings?.maxPageSize) {
163
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
130
164
  throw new Error("maxPageSize is not supported by this operation.");
131
165
  }
132
166
  return this.getCampaignBriefAttachmentsPagingPage(countryCode, campaignBriefId, options, settings);
133
167
  },
134
168
  };
135
169
  }
136
- async *getCampaignBriefAttachmentsPagingPage(countryCode, campaignBriefId, options, settings) {
137
- let result;
138
- let continuationToken = settings?.continuationToken;
139
- if (!continuationToken) {
140
- result = await this._getCampaignBriefAttachments(countryCode, campaignBriefId, options);
141
- let page = result.attachments || [];
142
- continuationToken = result.nextLink;
143
- setContinuationToken(page, continuationToken);
144
- yield page;
145
- }
146
- while (continuationToken) {
147
- result = await this._getCampaignBriefAttachmentsNext(countryCode, campaignBriefId, continuationToken, options);
148
- continuationToken = result.nextLink;
149
- let page = result.attachments || [];
150
- setContinuationToken(page, continuationToken);
151
- yield page;
152
- }
170
+ getCampaignBriefAttachmentsPagingPage(countryCode, campaignBriefId, options, settings) {
171
+ return __asyncGenerator(this, arguments, function* getCampaignBriefAttachmentsPagingPage_1() {
172
+ let result;
173
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
174
+ if (!continuationToken) {
175
+ result = yield __await(this._getCampaignBriefAttachments(countryCode, campaignBriefId, options));
176
+ let page = result.attachments || [];
177
+ continuationToken = result.nextLink;
178
+ setContinuationToken(page, continuationToken);
179
+ yield yield __await(page);
180
+ }
181
+ while (continuationToken) {
182
+ result = yield __await(this._getCampaignBriefAttachmentsNext(countryCode, campaignBriefId, continuationToken, options));
183
+ continuationToken = result.nextLink;
184
+ let page = result.attachments || [];
185
+ setContinuationToken(page, continuationToken);
186
+ yield yield __await(page);
187
+ }
188
+ });
153
189
  }
154
- async *getCampaignBriefAttachmentsPagingAll(countryCode, campaignBriefId, options) {
155
- for await (const page of this.getCampaignBriefAttachmentsPagingPage(countryCode, campaignBriefId, options)) {
156
- yield* page;
157
- }
190
+ getCampaignBriefAttachmentsPagingAll(countryCode, campaignBriefId, options) {
191
+ return __asyncGenerator(this, arguments, function* getCampaignBriefAttachmentsPagingAll_1() {
192
+ var _a, e_3, _b, _c;
193
+ try {
194
+ for (var _d = true, _e = __asyncValues(this.getCampaignBriefAttachmentsPagingPage(countryCode, campaignBriefId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
195
+ _c = _f.value;
196
+ _d = false;
197
+ const page = _c;
198
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
199
+ }
200
+ }
201
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
202
+ finally {
203
+ try {
204
+ if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
205
+ }
206
+ finally { if (e_3) throw e_3.error; }
207
+ }
208
+ });
158
209
  }
159
210
  /**
160
211
  * Creates or updates a Campaign Brief.
@@ -163,7 +214,7 @@ export class TollFreeVerificationImpl {
163
214
  * @param options The options parameters.
164
215
  */
165
216
  async upsertCampaignBrief(countryCode, campaignBriefId, options) {
166
- return tracingClient.withSpan("TollFreeVerificationClient.upsertCampaignBrief", options ?? {}, async (options) => {
217
+ return tracingClient.withSpan("TollFreeVerificationClient.upsertCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
167
218
  return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, upsertCampaignBriefOperationSpec);
168
219
  });
169
220
  }
@@ -174,7 +225,7 @@ export class TollFreeVerificationImpl {
174
225
  * @param options The options parameters.
175
226
  */
176
227
  async deleteCampaignBrief(countryCode, campaignBriefId, options) {
177
- return tracingClient.withSpan("TollFreeVerificationClient.deleteCampaignBrief", options ?? {}, async (options) => {
228
+ return tracingClient.withSpan("TollFreeVerificationClient.deleteCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
178
229
  return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, deleteCampaignBriefOperationSpec);
179
230
  });
180
231
  }
@@ -185,7 +236,7 @@ export class TollFreeVerificationImpl {
185
236
  * @param options The options parameters.
186
237
  */
187
238
  async getCampaignBrief(countryCode, campaignBriefId, options) {
188
- return tracingClient.withSpan("TollFreeVerificationClient.getCampaignBrief", options ?? {}, async (options) => {
239
+ return tracingClient.withSpan("TollFreeVerificationClient.getCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
189
240
  return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, getCampaignBriefOperationSpec);
190
241
  });
191
242
  }
@@ -196,7 +247,7 @@ export class TollFreeVerificationImpl {
196
247
  * @param options The options parameters.
197
248
  */
198
249
  async submitCampaignBrief(countryCode, campaignBriefId, options) {
199
- return tracingClient.withSpan("TollFreeVerificationClient.submitCampaignBrief", options ?? {}, async (options) => {
250
+ return tracingClient.withSpan("TollFreeVerificationClient.submitCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
200
251
  return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, submitCampaignBriefOperationSpec);
201
252
  });
202
253
  }
@@ -206,7 +257,7 @@ export class TollFreeVerificationImpl {
206
257
  * @param options The options parameters.
207
258
  */
208
259
  async _getAllCampaignBriefsByCountryCode(countryCode, options) {
209
- return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefsByCountryCode", options ?? {}, async (options) => {
260
+ return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefsByCountryCode", options !== null && options !== void 0 ? options : {}, async (options) => {
210
261
  return this.client.sendOperationRequest({ countryCode, options }, getAllCampaignBriefsByCountryCodeOperationSpec);
211
262
  });
212
263
  }
@@ -215,7 +266,7 @@ export class TollFreeVerificationImpl {
215
266
  * @param options The options parameters.
216
267
  */
217
268
  async _getAllCampaignBriefSummaries(options) {
218
- return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefSummaries", options ?? {}, async (options) => {
269
+ return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefSummaries", options !== null && options !== void 0 ? options : {}, async (options) => {
219
270
  return this.client.sendOperationRequest({ options }, getAllCampaignBriefSummariesOperationSpec);
220
271
  });
221
272
  }
@@ -235,7 +286,7 @@ export class TollFreeVerificationImpl {
235
286
  * @param options The options parameters.
236
287
  */
237
288
  async createOrReplaceCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, id, typeParam, fileName, fileType, fileContentBase64, options) {
238
- return tracingClient.withSpan("TollFreeVerificationClient.createOrReplaceCampaignBriefAttachment", options ?? {}, async (options) => {
289
+ return tracingClient.withSpan("TollFreeVerificationClient.createOrReplaceCampaignBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
239
290
  return this.client.sendOperationRequest({
240
291
  countryCode,
241
292
  campaignBriefId,
@@ -257,7 +308,7 @@ export class TollFreeVerificationImpl {
257
308
  * @param options The options parameters.
258
309
  */
259
310
  async deleteCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, options) {
260
- return tracingClient.withSpan("TollFreeVerificationClient.deleteCampaignBriefAttachment", options ?? {}, async (options) => {
311
+ return tracingClient.withSpan("TollFreeVerificationClient.deleteCampaignBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
261
312
  return this.client.sendOperationRequest({ countryCode, campaignBriefId, attachmentId, options }, deleteCampaignBriefAttachmentOperationSpec);
262
313
  });
263
314
  }
@@ -269,7 +320,7 @@ export class TollFreeVerificationImpl {
269
320
  * @param options The options parameters.
270
321
  */
271
322
  async getCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, options) {
272
- return tracingClient.withSpan("TollFreeVerificationClient.getCampaignBriefAttachment", options ?? {}, async (options) => {
323
+ return tracingClient.withSpan("TollFreeVerificationClient.getCampaignBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
273
324
  return this.client.sendOperationRequest({ countryCode, campaignBriefId, attachmentId, options }, getCampaignBriefAttachmentOperationSpec);
274
325
  });
275
326
  }
@@ -280,7 +331,7 @@ export class TollFreeVerificationImpl {
280
331
  * @param options The options parameters.
281
332
  */
282
333
  async _getCampaignBriefAttachments(countryCode, campaignBriefId, options) {
283
- return tracingClient.withSpan("TollFreeVerificationClient._getCampaignBriefAttachments", options ?? {}, async (options) => {
334
+ return tracingClient.withSpan("TollFreeVerificationClient._getCampaignBriefAttachments", options !== null && options !== void 0 ? options : {}, async (options) => {
284
335
  return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, getCampaignBriefAttachmentsOperationSpec);
285
336
  });
286
337
  }
@@ -292,7 +343,7 @@ export class TollFreeVerificationImpl {
292
343
  * @param options The options parameters.
293
344
  */
294
345
  async _getAllCampaignBriefsByCountryCodeNext(countryCode, nextLink, options) {
295
- return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefsByCountryCodeNext", options ?? {}, async (options) => {
346
+ return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefsByCountryCodeNext", options !== null && options !== void 0 ? options : {}, async (options) => {
296
347
  return this.client.sendOperationRequest({ countryCode, nextLink, options }, getAllCampaignBriefsByCountryCodeNextOperationSpec);
297
348
  });
298
349
  }
@@ -303,7 +354,7 @@ export class TollFreeVerificationImpl {
303
354
  * @param options The options parameters.
304
355
  */
305
356
  async _getAllCampaignBriefSummariesNext(nextLink, options) {
306
- return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefSummariesNext", options ?? {}, async (options) => {
357
+ return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefSummariesNext", options !== null && options !== void 0 ? options : {}, async (options) => {
307
358
  return this.client.sendOperationRequest({ nextLink, options }, getAllCampaignBriefSummariesNextOperationSpec);
308
359
  });
309
360
  }
@@ -316,7 +367,7 @@ export class TollFreeVerificationImpl {
316
367
  * @param options The options parameters.
317
368
  */
318
369
  async _getCampaignBriefAttachmentsNext(countryCode, campaignBriefId, nextLink, options) {
319
- return tracingClient.withSpan("TollFreeVerificationClient._getCampaignBriefAttachmentsNext", options ?? {}, async (options) => {
370
+ return tracingClient.withSpan("TollFreeVerificationClient._getCampaignBriefAttachmentsNext", options !== null && options !== void 0 ? options : {}, async (options) => {
320
371
  return this.client.sendOperationRequest({ countryCode, campaignBriefId, nextLink, options }, getCampaignBriefAttachmentsNextOperationSpec);
321
372
  });
322
373
  }
@@ -461,7 +512,7 @@ const createOrReplaceCampaignBriefAttachmentOperationSpec = {
461
512
  fileType: ["fileType"],
462
513
  fileContentBase64: ["fileContentBase64"],
463
514
  },
464
- mapper: { ...Mappers.CampaignBriefAttachment, required: true },
515
+ mapper: Object.assign(Object.assign({}, Mappers.CampaignBriefAttachment), { required: true }),
465
516
  },
466
517
  queryParameters: [Parameters.apiVersion],
467
518
  urlParameters: [