import { EndpointsInputConfig , EndpointsResolvedConfig , RegionInputConfig , RegionResolvedConfig , resolveEndpointsConfig , resolveRegionConfig , } from "@aws-sdk/config-resolver" ; import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length" ; import { getHostHeaderPlugin , HostHeaderInputConfig , HostHeaderResolvedConfig , resolveHostHeaderConfig , } from "@aws-sdk/middleware-host-header" ; import { getLoggerPlugin } from "@aws-sdk/middleware-logger" ; import { getRetryPlugin , resolveRetryConfig , RetryInputConfig , RetryResolvedConfig } from "@aws-sdk/middleware-retry" ; import { AwsAuthInputConfig , AwsAuthResolvedConfig , getAwsAuthPlugin , resolveAwsAuthConfig , } from "@aws-sdk/middleware-signing" ; import { getUserAgentPlugin , resolveUserAgentConfig , UserAgentInputConfig , UserAgentResolvedConfig , } from "@aws-sdk/middleware-user-agent" ; import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http" ; import { Client as __Client , DefaultsMode , SmithyConfiguration as __SmithyConfiguration , SmithyResolvedConfiguration as __SmithyResolvedConfiguration , } from "@aws-sdk/smithy-client" ; import { Credentials as __Credentials , Decoder as __Decoder , Encoder as __Encoder , Hash as __Hash , HashConstructor as __HashConstructor , HttpHandlerOptions as __HttpHandlerOptions , Logger as __Logger , Provider as __Provider , Provider , RegionInfoProvider , StreamCollector as __StreamCollector , UrlParser as __UrlParser , UserAgent as __UserAgent , } from "@aws-sdk/types" ; import { AbortDocumentVersionUploadCommandInput , AbortDocumentVersionUploadCommandOutput , } from "./commands/AbortDocumentVersionUploadCommand" ; import { ActivateUserCommandInput , ActivateUserCommandOutput } from "./commands/ActivateUserCommand" ; import { AddResourcePermissionsCommandInput , AddResourcePermissionsCommandOutput , } from "./commands/AddResourcePermissionsCommand" ; import { CreateCommentCommandInput , CreateCommentCommandOutput } from "./commands/CreateCommentCommand" ; import { CreateCustomMetadataCommandInput , CreateCustomMetadataCommandOutput , } from "./commands/CreateCustomMetadataCommand" ; import { CreateFolderCommandInput , CreateFolderCommandOutput } from "./commands/CreateFolderCommand" ; import { CreateLabelsCommandInput , CreateLabelsCommandOutput } from "./commands/CreateLabelsCommand" ; import { CreateNotificationSubscriptionCommandInput , CreateNotificationSubscriptionCommandOutput , } from "./commands/CreateNotificationSubscriptionCommand" ; import { CreateUserCommandInput , CreateUserCommandOutput } from "./commands/CreateUserCommand" ; import { DeactivateUserCommandInput , DeactivateUserCommandOutput } from "./commands/DeactivateUserCommand" ; import { DeleteCommentCommandInput , DeleteCommentCommandOutput } from "./commands/DeleteCommentCommand" ; import { DeleteCustomMetadataCommandInput , DeleteCustomMetadataCommandOutput , } from "./commands/DeleteCustomMetadataCommand" ; import { DeleteDocumentCommandInput , DeleteDocumentCommandOutput } from "./commands/DeleteDocumentCommand" ; import { DeleteFolderCommandInput , DeleteFolderCommandOutput } from "./commands/DeleteFolderCommand" ; import { DeleteFolderContentsCommandInput , DeleteFolderContentsCommandOutput , } from "./commands/DeleteFolderContentsCommand" ; import { DeleteLabelsCommandInput , DeleteLabelsCommandOutput } from "./commands/DeleteLabelsCommand" ; import { DeleteNotificationSubscriptionCommandInput , DeleteNotificationSubscriptionCommandOutput , } from "./commands/DeleteNotificationSubscriptionCommand" ; import { DeleteUserCommandInput , DeleteUserCommandOutput } from "./commands/DeleteUserCommand" ; import { DescribeActivitiesCommandInput , DescribeActivitiesCommandOutput } from "./commands/DescribeActivitiesCommand" ; import { DescribeCommentsCommandInput , DescribeCommentsCommandOutput } from "./commands/DescribeCommentsCommand" ; import { DescribeDocumentVersionsCommandInput , DescribeDocumentVersionsCommandOutput , } from "./commands/DescribeDocumentVersionsCommand" ; import { DescribeFolderContentsCommandInput , DescribeFolderContentsCommandOutput , } from "./commands/DescribeFolderContentsCommand" ; import { DescribeGroupsCommandInput , DescribeGroupsCommandOutput } from "./commands/DescribeGroupsCommand" ; import { DescribeNotificationSubscriptionsCommandInput , DescribeNotificationSubscriptionsCommandOutput , } from "./commands/DescribeNotificationSubscriptionsCommand" ; import { DescribeResourcePermissionsCommandInput , DescribeResourcePermissionsCommandOutput , } from "./commands/DescribeResourcePermissionsCommand" ; import { DescribeRootFoldersCommandInput , DescribeRootFoldersCommandOutput , } from "./commands/DescribeRootFoldersCommand" ; import { DescribeUsersCommandInput , DescribeUsersCommandOutput } from "./commands/DescribeUsersCommand" ; import { GetCurrentUserCommandInput , GetCurrentUserCommandOutput } from "./commands/GetCurrentUserCommand" ; import { GetDocumentCommandInput , GetDocumentCommandOutput } from "./commands/GetDocumentCommand" ; import { GetDocumentPathCommandInput , GetDocumentPathCommandOutput } from "./commands/GetDocumentPathCommand" ; import { GetDocumentVersionCommandInput , GetDocumentVersionCommandOutput } from "./commands/GetDocumentVersionCommand" ; import { GetFolderCommandInput , GetFolderCommandOutput } from "./commands/GetFolderCommand" ; import { GetFolderPathCommandInput , GetFolderPathCommandOutput } from "./commands/GetFolderPathCommand" ; import { GetResourcesCommandInput , GetResourcesCommandOutput } from "./commands/GetResourcesCommand" ; import { InitiateDocumentVersionUploadCommandInput , InitiateDocumentVersionUploadCommandOutput , } from "./commands/InitiateDocumentVersionUploadCommand" ; import { RemoveAllResourcePermissionsCommandInput , RemoveAllResourcePermissionsCommandOutput , } from "./commands/RemoveAllResourcePermissionsCommand" ; import { RemoveResourcePermissionCommandInput , RemoveResourcePermissionCommandOutput , } from "./commands/RemoveResourcePermissionCommand" ; import { UpdateDocumentCommandInput , UpdateDocumentCommandOutput } from "./commands/UpdateDocumentCommand" ; import { UpdateDocumentVersionCommandInput , UpdateDocumentVersionCommandOutput , } from "./commands/UpdateDocumentVersionCommand" ; import { UpdateFolderCommandInput , UpdateFolderCommandOutput } from "./commands/UpdateFolderCommand" ; import { UpdateUserCommandInput , UpdateUserCommandOutput } from "./commands/UpdateUserCommand" ; import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig" ; export type ServiceInputTypes = AbortDocumentVersionUploadCommandInput | ActivateUserCommandInput | AddResourcePermissionsCommandInput | CreateCommentCommandInput | CreateCustomMetadataCommandInput | CreateFolderCommandInput | CreateLabelsCommandInput | CreateNotificationSubscriptionCommandInput | CreateUserCommandInput | DeactivateUserCommandInput | DeleteCommentCommandInput | DeleteCustomMetadataCommandInput | DeleteDocumentCommandInput | DeleteFolderCommandInput | DeleteFolderContentsCommandInput | DeleteLabelsCommandInput | DeleteNotificationSubscriptionCommandInput | DeleteUserCommandInput | DescribeActivitiesCommandInput | DescribeCommentsCommandInput | DescribeDocumentVersionsCommandInput | DescribeFolderContentsCommandInput | DescribeGroupsCommandInput | DescribeNotificationSubscriptionsCommandInput | DescribeResourcePermissionsCommandInput | DescribeRootFoldersCommandInput | DescribeUsersCommandInput | GetCurrentUserCommandInput | GetDocumentCommandInput | GetDocumentPathCommandInput | GetDocumentVersionCommandInput | GetFolderCommandInput | GetFolderPathCommandInput | GetResourcesCommandInput | InitiateDocumentVersionUploadCommandInput | RemoveAllResourcePermissionsCommandInput | RemoveResourcePermissionCommandInput | UpdateDocumentCommandInput | UpdateDocumentVersionCommandInput | UpdateFolderCommandInput | UpdateUserCommandInput ; export type ServiceOutputTypes = AbortDocumentVersionUploadCommandOutput | ActivateUserCommandOutput | AddResourcePermissionsCommandOutput | CreateCommentCommandOutput | CreateCustomMetadataCommandOutput | CreateFolderCommandOutput | CreateLabelsCommandOutput | CreateNotificationSubscriptionCommandOutput | CreateUserCommandOutput | DeactivateUserCommandOutput | DeleteCommentCommandOutput | DeleteCustomMetadataCommandOutput | DeleteDocumentCommandOutput | DeleteFolderCommandOutput | DeleteFolderContentsCommandOutput | DeleteLabelsCommandOutput | DeleteNotificationSubscriptionCommandOutput | DeleteUserCommandOutput | DescribeActivitiesCommandOutput | DescribeCommentsCommandOutput | DescribeDocumentVersionsCommandOutput | DescribeFolderContentsCommandOutput | DescribeGroupsCommandOutput | DescribeNotificationSubscriptionsCommandOutput | DescribeResourcePermissionsCommandOutput | DescribeRootFoldersCommandOutput | DescribeUsersCommandOutput | GetCurrentUserCommandOutput | GetDocumentCommandOutput | GetDocumentPathCommandOutput | GetDocumentVersionCommandOutput | GetFolderCommandOutput | GetFolderPathCommandOutput | GetResourcesCommandOutput | InitiateDocumentVersionUploadCommandOutput | RemoveAllResourcePermissionsCommandOutput | RemoveResourcePermissionCommandOutput | UpdateDocumentCommandOutput | UpdateDocumentVersionCommandOutput | UpdateFolderCommandOutput | UpdateUserCommandOutput ; export interface ClientDefaults extends Partial < __SmithyResolvedConfiguration < __HttpHandlerOptions > > { /**
     * The HTTP handler to use. Fetch in browser and Https in Nodejs.
     */ requestHandler ? : __HttpHandler ; /**
     * A constructor for a class implementing the  __Hash interface
     * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
     *  internal sha256 ? : __HashConstructor ; internal urlParser ? : __UrlParser ; internal bodyLengthChecker ? : ( body : any ) => number | undefined ; internal streamCollector ? : __StreamCollector ; internal base64Decoder ? : __Decoder ; internal base64Encoder ? : __Encoder ; internal utf8Decoder ? : __Decoder ; internal utf8Encoder ? : __Encoder ; internal runtime ? : string ; /**
     * Disable dyanamically changing the endpoint of the client based on the hostPrefix
     * trait of an operation.
     */ disableHostPrefix ? : boolean ; /**
     * Value for how many times a request will be made at most in case of retry.
     */ maxAttempts ? : number | __Provider < number > ; /**
     * Specifies which retry algorithm to use.
     */ retryMode ? : string | __Provider < string > ; /**
     * Optional logger for logging debug/info/warn/error.
     */ logger ? : __Logger ; /**
     * Enables IPv6/IPv4 dualstack endpoint.
     */ useDualstackEndpoint ? : boolean | __Provider < boolean > ; /**
     * Enables FIPS compatible endpoints.
     */ useFipsEndpoint ? : boolean | __Provider < boolean > ; internal serviceId ? : string ; /**
     * The AWS region to which this client will send requests
     */ region ? : string | __Provider < string > ; internal credentialDefaultProvider ? : ( input : any ) => __Provider < __Credentials > ; internal regionInfoProvider ? : RegionInfoProvider ; internal defaultUserAgentProvider ? : Provider < __UserAgent > ; /**
     * The  DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK.
      defaultsMode ? : DefaultsMode | Provider < DefaultsMode > ; } type WorkDocsClientConfigType = Partial < __SmithyConfiguration < __HttpHandlerOptions > > & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig ; /**
 * The configuration interface of WorkDocsClient class constructor that set the region, credentials and other options.
 */ export interface WorkDocsClientConfig extends WorkDocsClientConfigType { } type WorkDocsClientResolvedConfigType = __SmithyResolvedConfiguration < __HttpHandlerOptions > & Required < ClientDefaults > & RegionResolvedConfig & EndpointsResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig ; /**
 * The resolved configuration interface of WorkDocsClient class. This is resolved and normalized from the  WorkDocsClientConfig .
  export interface WorkDocsClientResolvedConfig extends WorkDocsClientResolvedConfigType { } /**
 * <p>The WorkDocs API is designed for the following use cases:</p>
 *         <ul>
 *             <li>
 *                 <p>File Migration: File migration applications are supported for users who
 *                     want to migrate their files from an on-premises or off-premises file system or
 *                     service. Users can insert files into a user directory structure, as well as
 *                     allow for basic metadata changes, such as modifications to the permissions of
 *                     files.</p>
 *             </li>
 *             <li>
 *                 <p>Security: Support security applications are supported for users who have
 *                     additional security needs, such as antivirus or data loss prevention. The API
 *                     actions, along with AWS CloudTrail, allow these applications to detect when
 *                     changes occur in Amazon WorkDocs. Then, the application can take the necessary
 *                     actions and replace the target file. If the target file violates the policy, the
 *                     application can also choose to email the user.</p>
 *             </li>
 *             <li>
 *                 <p>eDiscovery/Analytics: General administrative applications are supported,
 *                     such as eDiscovery and analytics. These applications can choose to mimic or
 *                     record the actions in an Amazon WorkDocs site, along with AWS CloudTrail, to
 *                     replicate data for eDiscovery, backup, or analytical applications.</p>
 *             </li>
 *          </ul>
 *         <p>All Amazon WorkDocs API actions are Amazon authenticated and certificate-signed.
 *             They not only require the use of the AWS SDK, but also allow for the exclusive use of
 *             IAM users and roles to help facilitate access, trust, and permission policies. By
 *             creating a role and allowing an IAM user to access the Amazon WorkDocs site, the IAM
 *             user gains full administrative visibility into the entire Amazon WorkDocs site (or as
 *             set in the IAM policy). This includes, but is not limited to, the ability to modify file
 *             permissions and upload any file to any user. This allows developers to perform the three
 *             use cases above, as well as give users the ability to grant access on a selective basis
 *             using the IAM model.</p>
 */ export class WorkDocsClient extends __Client < __HttpHandlerOptions , ServiceInputTypes , ServiceOutputTypes , WorkDocsClientResolvedConfig > { /**
     * The resolved configuration of WorkDocsClient class. This is resolved and normalized from the  WorkDocsClientConfig .
      readonly config : WorkDocsClientResolvedConfig ; constructor ( configuration ) { const _config_0 = __getRuntimeConfig ( configuration ) ; const _config_1 = resolveRegionConfig ( _config_0 ) ; const _config_2 = resolveEndpointsConfig ( _config_1 ) ; const _config_3 = resolveRetryConfig ( _config_2 ) ; const _config_4 = resolveHostHeaderConfig ( _config_3 ) ; const _config_5 = resolveAwsAuthConfig ( _config_4 ) ; const _config_6 = resolveUserAgentConfig ( _config_5 ) ; super ( _config_6 ) ; this . config = _config_6 ; this . middlewareStack . use ( getRetryPlugin ( this . config ) ) ; this . middlewareStack . use ( getContentLengthPlugin ( this . config ) ) ; this . middlewareStack . use ( getHostHeaderPlugin ( this . config ) ) ; this . middlewareStack . use ( getLoggerPlugin ( this . config ) ) ; this . middlewareStack . use ( getAwsAuthPlugin ( this . config ) ) ; this . middlewareStack . use ( getUserAgentPlugin ( this . config ) ) ; } /**
     * Destroy underlying resources, like sockets. It's usually not necessary to do this.
     * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
     * Otherwise, sockets might stay open for quite a long time before the server terminates them.
     */ destroy ( ) { super . destroy ( ) ; } }