UNPKG

webdav.client

Version:

WebDAV ajax library for opening documents from a web page and managing WebDAV servers.

1,479 lines (1,478 loc) 193 kB
// ----------------------------------------------------------------------- // IT Hit WebDAV Ajax Library v5.21.6104.0 // Copyright © 2020 IT Hit LTD. All rights reserved. // License: https://www.webdavsystem.com/ajax/ // ----------------------------------------------------------------------- export namespace ITHit{ /** * Base class for exceptions. * @api * @class ITHit.Exception */ class Exception { /** * Exception message. * @api * @property {String} ITHit.Exception.Message * @type {string} */ Message: string /** * Original exception that caused this exception. * @api * @property {ITHit.Exception} ITHit.Exception.InnerException * @type {ITHit.Exception} */ InnerException: ITHit.Exception }/** * Detects environment in which JavaScript is running, such as operating system and web browser. * @api * @class ITHit.Environment */ class Environment { }/** * Type of information being logged. * @api * @enum {number} * @class ITHit.LogLevel */ class LogLevel { }/** * Provides static methods for logging. * @api * @class ITHit.Logger */ namespace Logger{ /** * Adds log listener. * @api * @param {ITHit.Logger~EventHandler} fHandler Handler function. * @param {number} iLogLevel Log level messages capturing. */ function AddListener(fHandler: () => void, iLogLevel: number): void; /** * Removes log listener. * @api * @param {ITHit.Logger~EventHandler} fHandler Handler function. */ function RemoveListener(fHandler?: () => void | null): void; /** * Writs a message to log with a specified log level. Default log level is {@link ITHit.LogLevel#Info} * @api * @param {string} sMessage Message to be logged. * @param {number} iLogLevel Logging level. * @throws ITHit.Exceptions.LoggerException Function was expected as log listener. */ function WriteMessage(sMessage: string, iLogLevel: number): void; }class Logger { } namespace WebDAV{ /** * This namespace provides classes for accessing WebDAV server items, file structure management, properties management and items locking. * @public * @namespace ITHit.WebDAV.Client * @class ITHit.WebDAV.Client */ namespace Client{ /** * The ITHit.WebDav.Client.Exceptions namespace provides classes that represent various WebDAV client library exceptions, erroneous server responses and HTTP errors. * @namespace ITHit.WebDAV.Client.Exceptions */ namespace Exceptions{ /** * Base exception for all exceptions thrown by WebDAV client library. * Initializes a new instance of the WebDavException class with a specified error message. * @api * @class ITHit.WebDAV.Client.Exceptions.WebDavException * @extends ITHit.Exception */ class WebDavException extends ITHit.Exception { }/** * Is thrown whenever and erroneous http response is received. Initializes a new instance of the WebDavHttpException * class with a specified error message, a reference to the inner exception that is the cause of this exception, * href of the item, multistatus response and status of the response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.WebDavHttpException * @extends ITHit.WebDAV.Client.Exceptions.WebDavException */ class WebDavHttpException extends ITHit.WebDAV.Client.Exceptions.WebDavException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * Is raised whenever property processing was unsuccessfull. Initializes a new instance of the PropertyException * class with a specified error message, a reference to the inner exception that is the cause of this exception, * href of the item and multistatus response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.PropertyException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class PropertyException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Name of the property processing of which caused the exception. * @api * @type {ITHit.WebDAV.Client.PropertyName} */ PropertyName: ITHit.WebDAV.Client.PropertyName /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * Thrown when server responded with Property Not Found http response. Initializes a new instance of the * PropertyNotFoundException class with a specified error message, a reference to the inner exception that * is the cause of this exception, href of the item and multistatus response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.PropertyNotFoundException * @extends ITHit.WebDAV.Client.Exceptions.PropertyException */ class PropertyNotFoundException extends ITHit.WebDAV.Client.Exceptions.PropertyException { /** * Name of the property processing of which caused the exception. * @api * @type {ITHit.WebDAV.Client.PropertyName} */ PropertyName: ITHit.WebDAV.Client.PropertyName /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * Thrown when server responded with Property forbidden http response. Initializes a new instance of the * PropertyForbiddenException class with a specified error message, a reference to the inner exception * that is the cause of this exception, href of the item and multistatus response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.PropertyForbiddenException * @extends ITHit.WebDAV.Client.Exceptions.PropertyException */ class PropertyForbiddenException extends ITHit.WebDAV.Client.Exceptions.PropertyException { /** * Name of the property processing of which caused the exception. * @api * @type {ITHit.WebDAV.Client.PropertyName} */ PropertyName: ITHit.WebDAV.Client.PropertyName /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * Base exception for all exceptions thrown by browser extension integration. * Initializes a new instance of the IntegrationException class with a specified error message. * @api * @class ITHit.WebDAV.Client.Exceptions.IntegrationException */ class IntegrationException { }/** * Incorrect credentials provided or insufficient permissions to access the requested item. Initializes a new instance * of the UnauthorizedException class with a specified error message, a reference to the inner exception that is the * cause of this exception, href of the item and multistatus response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.UnauthorizedException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class UnauthorizedException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * The request could not be understood by the server due to malformed syntax. * Initializes a new instance of the BadRequestException class with a specified error message, a reference to the * inner exception that is the cause of this exception, href of the item and multistatus response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.BadRequestException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class BadRequestException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * The request could not be carried because of conflict on server. * Initializes a new instance of the ConflictException class with a specified error message, a reference * to the inner exception that is the cause of this exception, href of the item and multistatus response * caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.ConflictException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class ConflictException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * The item is locked. Initializes a new instance of the LockedException class with a specified error message, * a reference to the inner exception that is the cause of this exception, href of the item and multistatus * response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.LockedException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class LockedException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * The server refused to fulfill the request. Initializes a new instance of the ForbiddenException class with * a specified error message, a reference to the inner exception that is the cause of this exception, href of * the item and multistatus response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.ForbiddenException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class ForbiddenException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * The method is not allowed. Initializes a new instance of the MethodNotAllowedException class with a specified * error message, a reference to the inner exception that is the cause of this exception, href of the item and * multistatus response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.MethodNotAllowedException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class MethodNotAllowedException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * The method is not implemented. Initializes a new instance of the NotImplementedException class with a specified * error message, a reference to the inner exception that is the cause of this exception, href of the item and * multistatus response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.NotImplementedException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class NotImplementedException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * The item doesn't exist on the server. Initializes a new instance of the NotFoundException class with a specified * error message, a reference to the inner exception that is the cause of this exception, href of the item and * multistatus response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.NotFoundException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class NotFoundException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * Precondition failed. Initializes a new instance of the PreconditionFailedException class with a specified error * message, a reference to the inner exception that is the cause of this exception, href of the item and multistatus * response with error details. * @api * @class ITHit.WebDAV.Client.Exceptions.PreconditionFailedException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class PreconditionFailedException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * The method could not be performed on the resource because the requested action depended on another action * and that action failed. Initializes a new instance of the DependencyFailedException class with a specified * error message, a reference to the inner exception that is the cause of this exception, href of the item * and multistatus response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.DependencyFailedException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class DependencyFailedException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * Insufficient storage exception. Initializes a new instance of the InsufficientStorageException class with * a specified error message, a reference to the inner exception that is the cause of this exception, href of * the item and error response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.InsufficientStorageException * @extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException */ class InsufficientStorageException extends ITHit.WebDAV.Client.Exceptions.WebDavHttpException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * Quota not exceeded exception. Initializes a new instance of the QuotaNotExceededException class with a * specified error message, a reference to the inner exception that is the cause of this exception, href of * the item and error response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.QuotaNotExceededException * @extends ITHit.WebDAV.Client.Exceptions.InsufficientStorageException */ class QuotaNotExceededException extends ITHit.WebDAV.Client.Exceptions.InsufficientStorageException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }/** * Sufficient disk space exception. Initializes a new instance of the SufficientDiskSpaceException class with * a specified error message, a reference to the inner exception that is the cause of this exception, href of * the item and error response caused the error. * @api * @class ITHit.WebDAV.Client.Exceptions.SufficientDiskSpaceException * @extends ITHit.WebDAV.Client.Exceptions.InsufficientStorageException */ class SufficientDiskSpaceException extends ITHit.WebDAV.Client.Exceptions.InsufficientStorageException { /** * Multistatus Contains {@link ITHit.WebDAV.Client.Multistatus} with elements that had errors, if multistatus information was available in response. * @api * @type {ITHit.WebDAV.Client.Multistatus} */ Multistatus: ITHit.WebDAV.Client.Multistatus /** * Http status with wich request failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus /** * Uri for which request failed. * @api * @type {string} */ Uri: string /** * Error contains IError with additional info, if error information was available in response. * @api * @type {ITHit.WebDAV.Client.Error} */ Error: ITHit.WebDAV.Client.Error }}/** * Initializes new instance of PropertyName. * @classdesc Represents name of property. * @constructs * @api * @param {string} sName Name of the property. * @param {string} sNamespaceUri Namespace of the property. * @throws ITHit.Exceptions.ArgumentNullException */ class PropertyName { constructor(sName: string, sNamespaceUri: string); /** * Name of the property. * @api * @type {string} */ Name: string /** * Namespace of the property. * @api * @type {string} */ NamespaceUri: string /** * Returns string representation of current property name. * @api * @returns {string} String representation of current property name. */ toString(): string; }/** * Structure that describes HTTP response's status. * @api * @class ITHit.WebDAV.Client.HttpStatus */ namespace HttpStatus{ /** * Parses HttpStatus structure from string containing status information. * @api * @param {string} sStatus String containing status information. * @returns {ITHit.WebDAV.Client.HttpStatus} HttpStatus structure that describes current status. */ function Parse(sStatus: string): ITHit.WebDAV.Client.HttpStatus; }class HttpStatus { /** * No status defined. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static None: ITHit.WebDAV.Client.HttpStatus None: ITHit.WebDAV.Client.HttpStatus /** * The request requires user authentication. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static Unauthorized: ITHit.WebDAV.Client.HttpStatus Unauthorized: ITHit.WebDAV.Client.HttpStatus /** * The request has succeeded. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static OK: ITHit.WebDAV.Client.HttpStatus OK: ITHit.WebDAV.Client.HttpStatus /** * The request has been fulfilled and resulted in a new resource being created. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static Created: ITHit.WebDAV.Client.HttpStatus Created: ITHit.WebDAV.Client.HttpStatus /** * The server has fulfilled the request but does not need to return an entity-body, and might want to * return updated meta information. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static NoContent: ITHit.WebDAV.Client.HttpStatus NoContent: ITHit.WebDAV.Client.HttpStatus /** * The server has fulfilled the partial GET request for the resource. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static PartialContent: ITHit.WebDAV.Client.HttpStatus PartialContent: ITHit.WebDAV.Client.HttpStatus /** * This status code provides status for multiple independent operations. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static MultiStatus: ITHit.WebDAV.Client.HttpStatus MultiStatus: ITHit.WebDAV.Client.HttpStatus /** * This status code is used instead if 302 redirect. This is because 302 code is processed automatically * and there is no way to process redirect to login page. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static Redirect: ITHit.WebDAV.Client.HttpStatus Redirect: ITHit.WebDAV.Client.HttpStatus /** * The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat * the request without modifications. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static BadRequest: ITHit.WebDAV.Client.HttpStatus BadRequest: ITHit.WebDAV.Client.HttpStatus /** * The server has not found anything matching the Request-URI. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static NotFound: ITHit.WebDAV.Client.HttpStatus NotFound: ITHit.WebDAV.Client.HttpStatus /** * The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static MethodNotAllowed: ITHit.WebDAV.Client.HttpStatus MethodNotAllowed: ITHit.WebDAV.Client.HttpStatus /** * The precondition given in one or more of the request-header fields evaluated to false when it was tested * on the server. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static PreconditionFailed: ITHit.WebDAV.Client.HttpStatus PreconditionFailed: ITHit.WebDAV.Client.HttpStatus /** * The source or destination resource of a method is locked. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static Locked: ITHit.WebDAV.Client.HttpStatus Locked: ITHit.WebDAV.Client.HttpStatus /** * The method could not be performed on the resource because the requested action depended on another * action and that action failed. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static DependencyFailed: ITHit.WebDAV.Client.HttpStatus DependencyFailed: ITHit.WebDAV.Client.HttpStatus /** * The server understood the request, but is refusing to fulfill it. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static Forbidden: ITHit.WebDAV.Client.HttpStatus Forbidden: ITHit.WebDAV.Client.HttpStatus /** * The request could not be completed due to a conflict with the current state of the resource. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static Conflict: ITHit.WebDAV.Client.HttpStatus Conflict: ITHit.WebDAV.Client.HttpStatus /** * The server does not support the functionality required to fulfill the request. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static NotImplemented: ITHit.WebDAV.Client.HttpStatus NotImplemented: ITHit.WebDAV.Client.HttpStatus /** * The server, while acting as a gateway or proxy, received an invalid response from the upstream * server it accessed in attempting to fulfill the request. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static BadGateway: ITHit.WebDAV.Client.HttpStatus BadGateway: ITHit.WebDAV.Client.HttpStatus /** * The method could not be performed on the resource because the server is unable to store the * representation needed to successfully complete the request. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ static InsufficientStorage: ITHit.WebDAV.Client.HttpStatus InsufficientStorage: ITHit.WebDAV.Client.HttpStatus /** * @api * @type {number} */ Code: number /** * @api * @type {string} */ Description: string /** * Indicates whether the current HttpStatus structure is equal to another HttpStatus structure. * @api * @param {ITHit.WebDAV.Client.HttpStatus} oHttpStatus HttpStatus object to compare. * @returns {boolean} True if the current object is equal to the other parameter; otherwise, false. */ Equals(oHttpStatus: ITHit.WebDAV.Client.HttpStatus): boolean; /** * Returns true if status is successful for Create operation. * @api * @returns {boolean} Returns true if status is successful for Create operation. */ IsCreateOk(): boolean; /** * Returns true if status is successful for Delete operation. * @api * @returns {boolean} Returns true if status is successful for Delete operation. */ IsDeleteOk(): boolean; /** * Returns true if status is successful. * @api * @returns {boolean} Returns true if status is successful. */ IsOk(): boolean; /** * Returns true if status is successful for Copy or Move operation. * @api * @returns {boolean} Returns true if status is successful for Copy or Move operation. */ IsCopyMoveOk(): boolean; /** * Returns true if status is successful for Get operation. * @api * @returns {boolean} Returns true if status is successful for Get operation. */ IsGetOk(): boolean; /** * Returns true if status is successful for Put operation. * @api * @returns {boolean} Returns true if status is successful for Put operation. */ IsPutOk(): boolean; /** * Returns true if status is successful for Unlock operation. * @api * @returns {boolean} Returns true if status is successful for Unlock operation. */ IsUnlockOk(): boolean; /** * Returns true if status is successful for Head operation. * @api * @returns {boolean} Returns true if status is successful for Head operation. */ IsHeadOk(): boolean; /** * Returns true if status is successful for Proppatch operation. * @api * @returns {boolean} Returns true if status is successful for Proppatch operation. */ IsUpdateOk(): boolean; /** * Returns true if status is successful. * @api * @returns {boolean} Returns true if status is successful. */ IsSuccess(): boolean; }/** * Initializes new string valued property. * @api * @classdesc Represents custom property exposed by WebDAV hierarchy items. * @constructs * @param {string|ITHit.WebDAV.Client.PropertyName} sName Name of the property. * @param {string} [sValue] Property value. * @param {string} [sNamespace] Namespace of the property. * @throws ITHit.Exception */ class Property { constructor(sName: string | ITHit.WebDAV.Client.PropertyName, sValue?: string | null, sNamespace?: string | null); /** * Property Name. * @api * @type {string|ITHit.WebDAV.Client.PropertyName} */ Name: string | ITHit.WebDAV.Client.PropertyName /** * Property value. * @api * @type {*} */ Value: any /** * String value of the custom property. * @api * @returns {string} String value of the custom property. */ StringValue(): string; }/** * Instance of this class is passed to callback function. It provides information about success or failure of * the operation as well as you will use it to get the results of the asynchronous call. * @api * @class ITHit.WebDAV.Client.AsyncResult */ class AsyncResult { /** * Result value. Can be any type, each method may put there appropriate object which before was returned directly. * Null if request was unsuccessful. * @api * @type {*} */ Result: any /** * Flag of either async request result was successful or not. * @api * @type {boolean} */ IsSuccess: boolean /** * Error (Exception) object. Describes the type of error that occurred. Null if request was successful. * @api * @type {ITHit.WebDAV.Client.Exceptions.WebDavException|Error|null} */ Error: ITHit.WebDAV.Client.Exceptions.WebDavException | Error | null /** * Status of HTTP response retrieved either from Result or Error objects * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus }/** * Initializes new instance of OrderProperty. * @api * @classdesc WebDAV order Property. * @constructs * @param {ITHit.WebDAV.Client.PropertyName} sProperty Property name. * @param {boolean} sAscending Order direction. */ class OrderProperty { constructor(sProperty: ITHit.WebDAV.Client.PropertyName, sAscending: boolean); /** * Property name. * @api * @type {ITHit.WebDAV.Client.PropertyName} */ Property: ITHit.WebDAV.Client.PropertyName /** * Order direction. * @api * @type {boolean} */ Ascending: boolean /** * Returns string representation of current property name. * @api * @returns {string} String representation of current property name. */ toString(): string; }/** * Enumeration of the item (Resource or Folder). * @api * @enum {string} * @class ITHit.WebDAV.Client.ResourceType */ enum ResourceType{ Folder = "Folder", File = "Resource", }/** * List of WebDAV properties. * @api * @class ITHit.WebDAV.Client.PropertyList * @extends Array */ class PropertyList extends Array { /** * Returns true if the with the specified property name and namespace exists in property list. * Returns false if does not exist. * @api * @param {ITHit.WebDAV.Client.PropertyName} oPropName Property name to search for. * @param {boolean} [bIgnoreCase] Specifies if the search is case sensitive or case insensitive. * @returns {boolean} */ Has(oPropName: ITHit.WebDAV.Client.PropertyName, bIgnoreCase?: boolean | null): boolean; /** * Gets property value found by property name and namespace. Returns null if property with such name does not exist. * @api * @param {ITHit.WebDAV.Client.PropertyName} oPropName Property name to search for. * @param {boolean} [bIgnoreCase] Specifies if the search is case sensitive or case insensitive. * @returns {(string|null)} String representing property value or null if property with such name does not exist. */ Find(oPropName: ITHit.WebDAV.Client.PropertyName, bIgnoreCase?: boolean | null): string | null; }/** * Represents information about errors occurred in different elements. * @api * @class ITHit.WebDAV.Client.Multistatus */ class Multistatus { /** * Gets the generic description, if available. * @api * @type {string} */ Description: string /** * Array of the errors returned by server. * @api * @type {ITHit.WebDAV.Client.MultistatusResponse[]} */ Responses: ITHit.WebDAV.Client.MultistatusResponse[] }/** * Represents error occurred in one element. * @api * @class ITHit.WebDAV.Client.MultistatusResponse */ class MultistatusResponse { /** * Request href * @api * @type {string} */ Href: string /** * Array of the errors returned by server. * @api * @type {string} */ Description: string /** * HTTP Status of the operation. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus }/** * Provides means for finding which properties failed to update. * @api * @class ITHit.WebDAV.Client.PropertyMultistatusResponse * @extends ITHit.WebDAV.Client.MultistatusResponse */ class PropertyMultistatusResponse extends ITHit.WebDAV.Client.MultistatusResponse { /** * Name of the property, if element is property. Otherwise null. * @api * @type {ITHit.WebDAV.Client.PropertyName} */ PropertyName: ITHit.WebDAV.Client.PropertyName /** * Request href * @api * @type {string} */ Href: string /** * Array of the errors returned by server. * @api * @type {string} */ Description: string /** * HTTP Status of the operation. * @api * @type {ITHit.WebDAV.Client.HttpStatus} */ Status: ITHit.WebDAV.Client.HttpStatus }/** * Scope of the lock. * Represents exclusive or shared lock. * @api * @enum {string} * @class ITHit.WebDAV.Client.LockScope */ enum LockScope{ Exclusive = "Exclusive", Shared = "Shared", }/** * Represents pair of resource uri - lock token. Is used to access locked resources. * @api * @class ITHit.WebDAV.Client.LockUriTokenPair */ class LockUriTokenPair { /** * Path to the locked resource. * @api * @type {string} */ Href: string /** * Lock token. * @api * @type {string} */ LockToken: string }/** * Information about lock set on an item. * @api * @class ITHit.WebDAV.Client.LockInfo */ class LockInfo { /** * Scope of the lock. * @api * @type {ITHit.WebDAV.Client.LockScope} */ LockScope: ITHit.WebDAV.Client.LockScope /** * Whether lock is set on item's children. * @api * @type {boolean} */ Deep: boolean /** * Timeout until lock expires. * @api * @type {number} */ TimeOut: number /** * Owner's name. * @api * @type {string} */ Owner: string /** * Lock token. * @api * @type {ITHit.WebDAV.Client.LockUriTokenPair} */ LockToken: ITHit.WebDAV.Client.LockUriTokenPair }/** * Options of an item, described by supported HTTP extensions. * @api * @class ITHit.WebDAV.Client.OptionsInfo */ class OptionsInfo { /** * Features supported by WebDAV server. See Features Enumeration {@link ITHit.WebDAV.Client.Features}. * @api * @type {number} */ Features: number }/** * Represents features supported by WebDAV server. * @api * @enum {number} * @class ITHit.WebDAV.Client.Features */ class Features { /** * WebDAV Class 1 compliant item. * Class 1 items does not support locking. * @api * @readonly * @type {number} */ static readonly Class1: number readonly Class1: number /** * WebDAV Class 2 compliant item. * Class 2 items support locking. * @api * @readonly * @type {number} */ static readonly Class2: number readonly Class2: number /** * WebDAV Class 3 compliant item. * @api * @readonly * @type {number} */ static readonly Class3: number readonly Class3: number /** * WevDAV paging compliant item. * @api * @readonly * @type {number} */ static readonly VersionControl: number readonly VersionControl: number /** * DeltaV version-control compliant item. * @api * @readonly * @type {number} */ static readonly Paging: number readonly Paging: number /** * Checkout-in-place item support check out, check in and uncheckout operations. * @api * @readonly * @type {number} */ static readonly CheckoutInPlace: number readonly CheckoutInPlace: number /** * DeltaV Version History compliant item. * @api * @readonly * @type {number} */ static readonly VersionHistory: number readonly VersionHistory: number /** * DeltaV Update compliant item. * @api * @readonly * @type {number} */ static readonly Update: number readonly Update: number /** * The item supports resumable upload. * @api * @readonly * @type {number} */ static readonly ResumableUpload: number readonly ResumableUpload: number /** * The item supports resumable download. * @api * @readonly * @type {number} */ static readonly ResumableDownload: number readonly ResumableDownload: number /** * The item supports search. * @api * @readonly * @type {number} */ static readonly Dasl: number readonly Dasl: number /** * The item supports GSuite editing. * @api * @readonly * @type {number} */ static readonly GSuite: number readonly GSuite: number }/** * Represents one WebDAV item (file, folder or lock-null). * @api * @class ITHit.WebDAV.Client.HierarchyItem */ class HierarchyItem { /** * Current WebDAV session. * @api * @type {ITHit.WebDAV.Client.WebDavSession} */ Session: ITHit.WebDAV.Client.WebDavSession /** * This item path on the server. * @api * @type {string} */ Href: string /** * Most recent modification date. * @api * @type {Date} */ LastModified: Date /** * User friendly item name. * @api * @type {string} */ DisplayName: string /** * The date item was created. * @api * @type {Date} */ CreationDate: Date /** * Type of the item (File or Folder). * @api * @type {string} * @see ITHit.WebDAV.Client.ResourceType */ ResourceType: string /** * Retrieves information about supported locks. Item can support exclusive, shared locks or do not support * any locks. If you set exclusive lock other users will not be able to set any locks. If you set shared * lock other users will be able to set shared lock on the item. * @api * @examplecode ITHit.WebDAV.Client.Tests.Locks.CheckSupport.CheckLockSupport * @examplecode ITHit.WebDAV.Client.TSExamples.Locks.CheckSupport.CheckLockSupport * @type {Array.<string>} * @see ITHit.WebDAV.Client.LockScope */ SupportedLocks: string[] /** * List of locks applied to this item. * @examplecode ITHit.WebDAV.Client.Tests.Locks.GetLocks.GetList * @examplecode ITHit.WebDAV.Client.TSExamples.Locks.GetLocks.GetList * @api * @type {Array.<ITHit.WebDAV.Client.LockInfo>} */ ActiveLocks: ITHit.WebDAV.Client.LockInfo[] /** * List of item properties. * @api * @type {ITHit.WebDAV.Client.PropertyList} */ Properties: ITHit.WebDAV.Client.PropertyList /** * Returns true if file is under version control. Otherwise false. To detect if version control could * be enabled for this item call GetSupportedFeaturesAsync and check for VersionControl token. * To enable version control call PutUnderVersionControlAsync. * @api * @returns {boolean} Boolean, if true - versions supported */ /** * Number of bytes available for this user on server. -1 if server does not support Quota. * @api * @type {number} */ AvailableBytes: number /** * Number of bytes used by this user on server. -1 if server does not support Quota. * @api * @type {number} */ UsedBytes: number /** * Refreshes item loading data from server. * @api * @examplecode ITHit.WebDAV.Client.Tests.HierarchyItems.Refresh.Refresh * @examplecode ITHit.WebDAV.Client.TSExamples.HierarchyItems.Refresh.Refresh * @param {ITHit.WebDAV.Client.HierarchyItem~RefreshAsyncCallback} fCallback Function to call when operation is completed. * @returns {ITHit.WebDAV.Client.Request} Request object. */ RefreshAsync(fCallback?: (oResult: ITHit.WebDAV.Client.AsyncResult) => void | null): ITHit.WebDAV.Client.Request; /** * Copies this item to destination folder. * @api * @examplecode ITHit.WebDAV.Client.Tests.HierarchyItems.CopyMove.Copy * @examplecode ITHit.WebDAV.Client.TSExamples.HierarchyItems.CopyMove.Copy * @param {ITHit.WebDAV.Client.Folder} oDestinationFolder Folder to move to. * @param {string} sDestinationName Name to assign to copied item. * @param {boolean} bDeep Indicates whether children of this item should be copied. * @param {boolean} bOverwrite Whether existing destination item shall be overwritten. * @param {ITHit.WebDAV.Client.LockUriTokenPair[]} [oLockTokens] Lock tokens for destination folder. * @param {ITHit.WebDAV.Client.HierarchyItem~CopyToAsyncCallback} fCallback Function to call when operation is completed. */ CopyToAsync(oDestinationFolder: ITHit.WebDAV.Client.Folder, sDestinationName: string, bDeep: boolean, bOverwrite: boolean, oLockTokens?: ITHit.WebDAV.Client.LockUriTokenPair[] | null, fCallback?: (oResult: ITHit.WebDAV.Client.AsyncResult) => void | null): void; /** * Deletes this item. * @api * @examplecode ITHit.WebDAV.Client.Tests.HierarchyItems.Delete.Delete * @examplecode ITHit.WebDAV.Client.TSExamples.HierarchyItems.Delete.Delete * @param {ITHit.WebDAV.Client.LockUriTokenPair | null} oLockTokens Lock tokens for this item or any locked child item. * @param {ITHit.WebDAV.Client.HierarchyItem~DeleteAsyncCallback} fCallback Function to call when operation is completed. * @returns {ITHit.WebDAV.Client.Request} Request object. */ DeleteAsync(oLockTokens: ITHit.WebDAV.Client.LockUriTokenPair | null, fCallback?: (oResult: ITHit.WebDAV.Client.AsyncResult) => void | null): ITHit.WebDAV.Client.Request; /** * Returns names of all custom properties exposed by this item. * @api * @examplecode ITHit.WebDAV.Client.Tests.HierarchyProperties.GetProperties.GetPropertyNames * @examplecode ITHit.WebDAV.Client.TSExamples.HierarchyProperties.GetProperties.GetPropertyNames * @param {ITHit.WebDAV.Client.HierarchyItem~GetPropertyNamesAsyncCallback} fCallback Function to call when operation is completed. * @returns {ITHit.WebDAV.Client.Request} Request object. */ GetPropertyNamesAsync(fCallback?: (oResult: ITHit.WebDAV.Client.AsyncResult) => void | null): ITHit.WebDAV.Client.Request; /** * Retrieves values of specific properties. * @api * @examplecode ITHit.WebDAV.Client.Tests.HierarchyProperties.GetProperties.GetPropertyValues * @examplecode ITHit.WebDAV.Client.TSExamples.HierarchyProperties.GetProperties.GetPropertyValues * @param {ITHit.WebDAV.Client.PropertyName[]} aNames * @param {ITHit.WebDAV.Client.HierarchyItem~GetPropertyValuesAsyncCallback} fCallback Function to call when operation is completed. * @returns {ITHit.WebDAV.Client.Request} Request object. */ GetPropertyValuesAsync(aNames: ITHit.WebDAV.Client.PropertyName[], fCallback?: (oResult: ITHit.WebDAV.Client.AsyncResult) => void | null): ITHit.WebDAV.Client.Request; /** * Retrieves all custom properties exposed by the item. * @api * @examplecode ITHit.WebDAV.Client.Tests.HierarchyProperties.GetProperties.GetAllProperties * @examplecode ITHit.WebDAV.Client.TSExamples.HierarchyProperties.GetProperties.GetAllProperties * @param {ITHit.WebDAV.Client.HierarchyItem~GetAllPropertiesAsyncCallback} fCallback Function to call when operation is completed. * @returns {ITHit.WebDAV.Client.Request} Request object. */ GetAllPropertiesAsync(fCallback?: (oResult: ITHit.WebDAV.Client.AsyncResult) => void | null): ITHit.WebDAV.Client.Request; /** * Retrieves parent hierarchy item of this item. * @api * @examplecode ITHit.WebDAV.Client.Tests.HierarchyItems.GetParent.GetParent * @examplecode ITHit.WebDAV.Client.TSExamples.HierarchyItems.GetParent.GetParent * @param {ITHit.WebDAV.Client.PropertyName[]} aProperties Additional properties requested from server. Default is empty array. * @param {ITHit.WebDAV.Client.HierarchyItem~GetParentAsyncCallback} fCallback Function to call when operation is completed. * @returns {ITHit.WebDAV.Client.Request} Request object. */ GetParentAsync(aProperties: ITHit.WebDAV.Client.PropertyName[], fCallback?: (oResult: ITHit.WebDAV.Client.AsyncResult) => void | null): ITHit.WebDAV.Client.Request; /** * Retrieves media type independent links. * @api * @param {ITHit.WebDAV.Client.HierarchyItem~GetSourceAsyncCallback} fCallback Function to call when operation is completed. * @returns {ITHit.WebDAV.Client.Request} Request object. */ GetSourceAsync(fCallback?