@azure-tools/communication-toll-free-verification 1.0.0-alpha.20250730.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.
- package/dist/browser/generated/src/operations/tollFreeVerification.js +132 -81
- package/dist/browser/generated/src/operations/tollFreeVerification.js.map +1 -1
- package/dist/browser/generated/src/pagingHelper.js +4 -2
- package/dist/browser/generated/src/pagingHelper.js.map +1 -1
- package/dist/browser/generated/src/tollFreeVerificationClient.js +3 -10
- package/dist/browser/generated/src/tollFreeVerificationClient.js.map +1 -1
- package/dist/browser/tollFreeVerificationClient.js +4 -11
- package/dist/browser/tollFreeVerificationClient.js.map +1 -1
- package/dist/commonjs/generated/src/operations/tollFreeVerification.js +131 -81
- package/dist/commonjs/generated/src/operations/tollFreeVerification.js.map +1 -1
- package/dist/commonjs/generated/src/pagingHelper.js +4 -2
- package/dist/commonjs/generated/src/pagingHelper.js.map +1 -1
- package/dist/commonjs/generated/src/tollFreeVerificationClient.js +3 -10
- package/dist/commonjs/generated/src/tollFreeVerificationClient.js.map +1 -1
- package/dist/commonjs/tollFreeVerificationClient.js +4 -11
- package/dist/commonjs/tollFreeVerificationClient.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/generated/src/operations/tollFreeVerification.js +132 -81
- package/dist/esm/generated/src/operations/tollFreeVerification.js.map +1 -1
- package/dist/esm/generated/src/pagingHelper.js +4 -2
- package/dist/esm/generated/src/pagingHelper.js.map +1 -1
- package/dist/esm/generated/src/tollFreeVerificationClient.js +3 -10
- package/dist/esm/generated/src/tollFreeVerificationClient.js.map +1 -1
- package/dist/esm/tollFreeVerificationClient.js +4 -11
- package/dist/esm/tollFreeVerificationClient.js.map +1 -1
- package/dist/react-native/generated/src/operations/tollFreeVerification.js +132 -81
- package/dist/react-native/generated/src/operations/tollFreeVerification.js.map +1 -1
- package/dist/react-native/generated/src/pagingHelper.js +4 -2
- package/dist/react-native/generated/src/pagingHelper.js.map +1 -1
- package/dist/react-native/generated/src/tollFreeVerificationClient.js +3 -10
- package/dist/react-native/generated/src/tollFreeVerificationClient.js.map +1 -1
- package/dist/react-native/tollFreeVerificationClient.js +4 -11
- package/dist/react-native/tollFreeVerificationClient.js.map +1 -1
- 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;
|
|
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,g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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;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
|
-
|
|
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":"","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;IACrC;;OAEG;IACc,MAAM,CAAsC;IAgB7D,YACE,qBAA6B,EAC7B,mBAAyF,EACzF,eAAkD,EAAE;QAEpD,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;QAC7F,MAAM,OAAO,GAAG,mCAAmC,CAAC,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ACF","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,6BAA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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"]}
|
|
@@ -17,7 +17,6 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
17
17
|
/// <reference lib="esnext.asynciterable" />
|
|
18
18
|
/** Class containing TollFreeVerification operations. */
|
|
19
19
|
class TollFreeVerificationImpl {
|
|
20
|
-
client;
|
|
21
20
|
/**
|
|
22
21
|
* Initialize a new instance of the class TollFreeVerification class.
|
|
23
22
|
* @param client Reference to the service client
|
|
@@ -40,35 +39,52 @@ class TollFreeVerificationImpl {
|
|
|
40
39
|
return this;
|
|
41
40
|
},
|
|
42
41
|
byPage: (settings) => {
|
|
43
|
-
if (settings
|
|
42
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
44
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
45
44
|
}
|
|
46
45
|
return this.getAllCampaignBriefsByCountryCodePagingPage(countryCode, options, settings);
|
|
47
46
|
},
|
|
48
47
|
};
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
49
|
+
getAllCampaignBriefsByCountryCodePagingPage(countryCode, options, settings) {
|
|
50
|
+
return tslib_1.__asyncGenerator(this, arguments, function* getAllCampaignBriefsByCountryCodePagingPage_1() {
|
|
51
|
+
let result;
|
|
52
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
53
|
+
if (!continuationToken) {
|
|
54
|
+
result = yield tslib_1.__await(this._getAllCampaignBriefsByCountryCode(countryCode, options));
|
|
55
|
+
let page = result.campaignBriefs || [];
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
58
|
+
yield yield tslib_1.__await(page);
|
|
59
|
+
}
|
|
60
|
+
while (continuationToken) {
|
|
61
|
+
result = yield tslib_1.__await(this._getAllCampaignBriefsByCountryCodeNext(countryCode, continuationToken, options));
|
|
62
|
+
continuationToken = result.nextLink;
|
|
63
|
+
let page = result.campaignBriefs || [];
|
|
64
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
65
|
+
yield yield tslib_1.__await(page);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
getAllCampaignBriefsByCountryCodePagingAll(countryCode, options) {
|
|
70
|
+
return tslib_1.__asyncGenerator(this, arguments, function* getAllCampaignBriefsByCountryCodePagingAll_1() {
|
|
71
|
+
var _a, e_1, _b, _c;
|
|
72
|
+
try {
|
|
73
|
+
for (var _d = true, _e = tslib_1.__asyncValues(this.getAllCampaignBriefsByCountryCodePagingPage(countryCode, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
74
|
+
_c = _f.value;
|
|
75
|
+
_d = false;
|
|
76
|
+
const page = _c;
|
|
77
|
+
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
+
finally {
|
|
82
|
+
try {
|
|
83
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
84
|
+
}
|
|
85
|
+
finally { if (e_1) throw e_1.error; }
|
|
86
|
+
}
|
|
87
|
+
});
|
|
72
88
|
}
|
|
73
89
|
/**
|
|
74
90
|
* Get a list of Campaign Brief Summaries for the current resource.
|
|
@@ -84,35 +100,52 @@ class TollFreeVerificationImpl {
|
|
|
84
100
|
return this;
|
|
85
101
|
},
|
|
86
102
|
byPage: (settings) => {
|
|
87
|
-
if (settings
|
|
103
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
88
104
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
89
105
|
}
|
|
90
106
|
return this.getAllCampaignBriefSummariesPagingPage(options, settings);
|
|
91
107
|
},
|
|
92
108
|
};
|
|
93
109
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
getAllCampaignBriefSummariesPagingPage(options, settings) {
|
|
111
|
+
return tslib_1.__asyncGenerator(this, arguments, function* getAllCampaignBriefSummariesPagingPage_1() {
|
|
112
|
+
let result;
|
|
113
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
114
|
+
if (!continuationToken) {
|
|
115
|
+
result = yield tslib_1.__await(this._getAllCampaignBriefSummaries(options));
|
|
116
|
+
let page = result.campaignBriefSummaries || [];
|
|
117
|
+
continuationToken = result.nextLink;
|
|
118
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
119
|
+
yield yield tslib_1.__await(page);
|
|
120
|
+
}
|
|
121
|
+
while (continuationToken) {
|
|
122
|
+
result = yield tslib_1.__await(this._getAllCampaignBriefSummariesNext(continuationToken, options));
|
|
123
|
+
continuationToken = result.nextLink;
|
|
124
|
+
let page = result.campaignBriefSummaries || [];
|
|
125
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
126
|
+
yield yield tslib_1.__await(page);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
111
129
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
130
|
+
getAllCampaignBriefSummariesPagingAll(options) {
|
|
131
|
+
return tslib_1.__asyncGenerator(this, arguments, function* getAllCampaignBriefSummariesPagingAll_1() {
|
|
132
|
+
var _a, e_2, _b, _c;
|
|
133
|
+
try {
|
|
134
|
+
for (var _d = true, _e = tslib_1.__asyncValues(this.getAllCampaignBriefSummariesPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
135
|
+
_c = _f.value;
|
|
136
|
+
_d = false;
|
|
137
|
+
const page = _c;
|
|
138
|
+
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
142
|
+
finally {
|
|
143
|
+
try {
|
|
144
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
145
|
+
}
|
|
146
|
+
finally { if (e_2) throw e_2.error; }
|
|
147
|
+
}
|
|
148
|
+
});
|
|
116
149
|
}
|
|
117
150
|
/**
|
|
118
151
|
* Gets a list of attachments from a Campaign Brief.
|
|
@@ -130,35 +163,52 @@ class TollFreeVerificationImpl {
|
|
|
130
163
|
return this;
|
|
131
164
|
},
|
|
132
165
|
byPage: (settings) => {
|
|
133
|
-
if (settings
|
|
166
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
134
167
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
135
168
|
}
|
|
136
169
|
return this.getCampaignBriefAttachmentsPagingPage(countryCode, campaignBriefId, options, settings);
|
|
137
170
|
},
|
|
138
171
|
};
|
|
139
172
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
173
|
+
getCampaignBriefAttachmentsPagingPage(countryCode, campaignBriefId, options, settings) {
|
|
174
|
+
return tslib_1.__asyncGenerator(this, arguments, function* getCampaignBriefAttachmentsPagingPage_1() {
|
|
175
|
+
let result;
|
|
176
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
177
|
+
if (!continuationToken) {
|
|
178
|
+
result = yield tslib_1.__await(this._getCampaignBriefAttachments(countryCode, campaignBriefId, options));
|
|
179
|
+
let page = result.attachments || [];
|
|
180
|
+
continuationToken = result.nextLink;
|
|
181
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
182
|
+
yield yield tslib_1.__await(page);
|
|
183
|
+
}
|
|
184
|
+
while (continuationToken) {
|
|
185
|
+
result = yield tslib_1.__await(this._getCampaignBriefAttachmentsNext(countryCode, campaignBriefId, continuationToken, options));
|
|
186
|
+
continuationToken = result.nextLink;
|
|
187
|
+
let page = result.attachments || [];
|
|
188
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
189
|
+
yield yield tslib_1.__await(page);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
157
192
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
193
|
+
getCampaignBriefAttachmentsPagingAll(countryCode, campaignBriefId, options) {
|
|
194
|
+
return tslib_1.__asyncGenerator(this, arguments, function* getCampaignBriefAttachmentsPagingAll_1() {
|
|
195
|
+
var _a, e_3, _b, _c;
|
|
196
|
+
try {
|
|
197
|
+
for (var _d = true, _e = tslib_1.__asyncValues(this.getCampaignBriefAttachmentsPagingPage(countryCode, campaignBriefId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
198
|
+
_c = _f.value;
|
|
199
|
+
_d = false;
|
|
200
|
+
const page = _c;
|
|
201
|
+
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
205
|
+
finally {
|
|
206
|
+
try {
|
|
207
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
208
|
+
}
|
|
209
|
+
finally { if (e_3) throw e_3.error; }
|
|
210
|
+
}
|
|
211
|
+
});
|
|
162
212
|
}
|
|
163
213
|
/**
|
|
164
214
|
* Creates or updates a Campaign Brief.
|
|
@@ -167,7 +217,7 @@ class TollFreeVerificationImpl {
|
|
|
167
217
|
* @param options The options parameters.
|
|
168
218
|
*/
|
|
169
219
|
async upsertCampaignBrief(countryCode, campaignBriefId, options) {
|
|
170
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.upsertCampaignBrief", options
|
|
220
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.upsertCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
171
221
|
return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, upsertCampaignBriefOperationSpec);
|
|
172
222
|
});
|
|
173
223
|
}
|
|
@@ -178,7 +228,7 @@ class TollFreeVerificationImpl {
|
|
|
178
228
|
* @param options The options parameters.
|
|
179
229
|
*/
|
|
180
230
|
async deleteCampaignBrief(countryCode, campaignBriefId, options) {
|
|
181
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.deleteCampaignBrief", options
|
|
231
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.deleteCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
182
232
|
return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, deleteCampaignBriefOperationSpec);
|
|
183
233
|
});
|
|
184
234
|
}
|
|
@@ -189,7 +239,7 @@ class TollFreeVerificationImpl {
|
|
|
189
239
|
* @param options The options parameters.
|
|
190
240
|
*/
|
|
191
241
|
async getCampaignBrief(countryCode, campaignBriefId, options) {
|
|
192
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.getCampaignBrief", options
|
|
242
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.getCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
193
243
|
return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, getCampaignBriefOperationSpec);
|
|
194
244
|
});
|
|
195
245
|
}
|
|
@@ -200,7 +250,7 @@ class TollFreeVerificationImpl {
|
|
|
200
250
|
* @param options The options parameters.
|
|
201
251
|
*/
|
|
202
252
|
async submitCampaignBrief(countryCode, campaignBriefId, options) {
|
|
203
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.submitCampaignBrief", options
|
|
253
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.submitCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
204
254
|
return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, submitCampaignBriefOperationSpec);
|
|
205
255
|
});
|
|
206
256
|
}
|
|
@@ -210,7 +260,7 @@ class TollFreeVerificationImpl {
|
|
|
210
260
|
* @param options The options parameters.
|
|
211
261
|
*/
|
|
212
262
|
async _getAllCampaignBriefsByCountryCode(countryCode, options) {
|
|
213
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefsByCountryCode", options
|
|
263
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefsByCountryCode", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
214
264
|
return this.client.sendOperationRequest({ countryCode, options }, getAllCampaignBriefsByCountryCodeOperationSpec);
|
|
215
265
|
});
|
|
216
266
|
}
|
|
@@ -219,7 +269,7 @@ class TollFreeVerificationImpl {
|
|
|
219
269
|
* @param options The options parameters.
|
|
220
270
|
*/
|
|
221
271
|
async _getAllCampaignBriefSummaries(options) {
|
|
222
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefSummaries", options
|
|
272
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefSummaries", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
223
273
|
return this.client.sendOperationRequest({ options }, getAllCampaignBriefSummariesOperationSpec);
|
|
224
274
|
});
|
|
225
275
|
}
|
|
@@ -239,7 +289,7 @@ class TollFreeVerificationImpl {
|
|
|
239
289
|
* @param options The options parameters.
|
|
240
290
|
*/
|
|
241
291
|
async createOrReplaceCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, id, typeParam, fileName, fileType, fileContentBase64, options) {
|
|
242
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.createOrReplaceCampaignBriefAttachment", options
|
|
292
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.createOrReplaceCampaignBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
243
293
|
return this.client.sendOperationRequest({
|
|
244
294
|
countryCode,
|
|
245
295
|
campaignBriefId,
|
|
@@ -261,7 +311,7 @@ class TollFreeVerificationImpl {
|
|
|
261
311
|
* @param options The options parameters.
|
|
262
312
|
*/
|
|
263
313
|
async deleteCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, options) {
|
|
264
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.deleteCampaignBriefAttachment", options
|
|
314
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.deleteCampaignBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
265
315
|
return this.client.sendOperationRequest({ countryCode, campaignBriefId, attachmentId, options }, deleteCampaignBriefAttachmentOperationSpec);
|
|
266
316
|
});
|
|
267
317
|
}
|
|
@@ -273,7 +323,7 @@ class TollFreeVerificationImpl {
|
|
|
273
323
|
* @param options The options parameters.
|
|
274
324
|
*/
|
|
275
325
|
async getCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, options) {
|
|
276
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.getCampaignBriefAttachment", options
|
|
326
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient.getCampaignBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
277
327
|
return this.client.sendOperationRequest({ countryCode, campaignBriefId, attachmentId, options }, getCampaignBriefAttachmentOperationSpec);
|
|
278
328
|
});
|
|
279
329
|
}
|
|
@@ -284,7 +334,7 @@ class TollFreeVerificationImpl {
|
|
|
284
334
|
* @param options The options parameters.
|
|
285
335
|
*/
|
|
286
336
|
async _getCampaignBriefAttachments(countryCode, campaignBriefId, options) {
|
|
287
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getCampaignBriefAttachments", options
|
|
337
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getCampaignBriefAttachments", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
288
338
|
return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, getCampaignBriefAttachmentsOperationSpec);
|
|
289
339
|
});
|
|
290
340
|
}
|
|
@@ -296,7 +346,7 @@ class TollFreeVerificationImpl {
|
|
|
296
346
|
* @param options The options parameters.
|
|
297
347
|
*/
|
|
298
348
|
async _getAllCampaignBriefsByCountryCodeNext(countryCode, nextLink, options) {
|
|
299
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefsByCountryCodeNext", options
|
|
349
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefsByCountryCodeNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
300
350
|
return this.client.sendOperationRequest({ countryCode, nextLink, options }, getAllCampaignBriefsByCountryCodeNextOperationSpec);
|
|
301
351
|
});
|
|
302
352
|
}
|
|
@@ -307,7 +357,7 @@ class TollFreeVerificationImpl {
|
|
|
307
357
|
* @param options The options parameters.
|
|
308
358
|
*/
|
|
309
359
|
async _getAllCampaignBriefSummariesNext(nextLink, options) {
|
|
310
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefSummariesNext", options
|
|
360
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefSummariesNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
311
361
|
return this.client.sendOperationRequest({ nextLink, options }, getAllCampaignBriefSummariesNextOperationSpec);
|
|
312
362
|
});
|
|
313
363
|
}
|
|
@@ -320,7 +370,7 @@ class TollFreeVerificationImpl {
|
|
|
320
370
|
* @param options The options parameters.
|
|
321
371
|
*/
|
|
322
372
|
async _getCampaignBriefAttachmentsNext(countryCode, campaignBriefId, nextLink, options) {
|
|
323
|
-
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getCampaignBriefAttachmentsNext", options
|
|
373
|
+
return tracing_js_1.tracingClient.withSpan("TollFreeVerificationClient._getCampaignBriefAttachmentsNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
324
374
|
return this.client.sendOperationRequest({ countryCode, campaignBriefId, nextLink, options }, getCampaignBriefAttachmentsNextOperationSpec);
|
|
325
375
|
});
|
|
326
376
|
}
|
|
@@ -466,7 +516,7 @@ const createOrReplaceCampaignBriefAttachmentOperationSpec = {
|
|
|
466
516
|
fileType: ["fileType"],
|
|
467
517
|
fileContentBase64: ["fileContentBase64"],
|
|
468
518
|
},
|
|
469
|
-
mapper: {
|
|
519
|
+
mapper: Object.assign(Object.assign({}, Mappers.CampaignBriefAttachment), { required: true }),
|
|
470
520
|
},
|
|
471
521
|
queryParameters: [Parameters.apiVersion],
|
|
472
522
|
urlParameters: [
|