@azure-tools/communication-domain-verification
Version:
SDK for Azure Communication Domain Verification
84 lines (75 loc) • 3.84 kB
TypeScript
import { CommonClientOptions } from '@azure/core-client';
import { KeyCredential } from '@azure/core-auth';
import { OperationOptions } from '@azure/core-client';
import { TokenCredential } from '@azure/core-auth';
/**
* Additional options for the Create Domain Ownership Challenge
*/
export declare interface CreateDomainOwnershipChallengeOptions extends OperationOptions {
}
/** Represents Domain that was verified */
export declare interface DomainOwnership {
/** Status of domain verification */
status: DomainVerificationStatus;
}
/** Represents Domain ownership verification challenge */
export declare interface DomainOwnershipChallenge {
/** Expected verification value */
value: string;
}
/**
* A DomainVerificationClient represents a Client to the Azure Communication Domain Verification service allowing you
* to verify domain.
*/
export declare class DomainVerificationClient {
private client;
/**
* Initializes a new instance of the DomainVerificationClient class
* @param connectionString - Connection string to connect to an Azure Communication Service resource.
* Example: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret";
* @param options - Optional. Options to configure the HTTP pipeline.
*/
constructor(connectionString: string, options?: DomainVerificationClientOptions);
/**
* Initializes a new instance of the DomainVerificationClient class using an Azure KeyCredential.
* @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).
* @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.
* @param options - Optional. Options to configure the HTTP pipeline.
*/
constructor(endpoint: string, credential: KeyCredential, options?: DomainVerificationClientOptions);
/**
* Initializes a new instance of the DomainVerificationClient class using a TokenCredential.
* @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).
* @param credential - TokenCredential that is used to authenticate requests to the service.
* @param options - Optional. Options to configure the HTTP pipeline.
*/
constructor(endpoint: string, credential: TokenCredential, options?: DomainVerificationClientOptions);
/**
* Create Domain ownership challenge
* @param domain - Domain uri (ex: contoso.com)
* @param options - Additional request options
* @returns - Returns challenge value of DNS record as string (ex: MS12345)
*/
createDomainOwnershipChallenge(domain: string, options?: CreateDomainOwnershipChallengeOptions): Promise<DomainOwnershipChallenge>;
/**
* Verify domain ownership
* @param domain - Domain uri (ex: contoso.com)
* @param challengeType - Type of DNS record, now only TXT is supported
* @param options - Additional request options
* @returns - Returns Status of verification (ex: Verified | NotVerified | VerificationPending)
*/
verifyDomainOwnership(domain: string, options?: VerifyDomainOwnershipOptions): Promise<DomainOwnership>;
}
/**
* Client options used to configure DomainVerification Client API requests.
*/
export declare interface DomainVerificationClientOptions extends CommonClientOptions {
}
/** Defines values for Status. */
export declare type DomainVerificationStatus = "Verified" | "NotVerified" | "VerificationPending";
/**
* Additional options for the Verify Domain Ownership
*/
export declare interface VerifyDomainOwnershipOptions extends OperationOptions {
}
export { }