/**
 * Copyright (c) "Neo4j"
 * Neo4j Sweden AB [https://neo4j.com]
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { NumberOrInteger, StandardDate } from './graph-types';
import Integer from './integer';
/**
 * Represents an ISO 8601 duration. Contains both date-based values (years, months, days) and time-based values (seconds, nanoseconds).
 * Created `Duration` objects are frozen with `Object.freeze()` in constructor and thus immutable.
 */
export declare class Duration<T extends NumberOrInteger = Integer> {
    readonly months: T;
    readonly days: T;
    readonly seconds: T;
    readonly nanoseconds: T;
    /**
     * @constructor
     * @param {NumberOrInteger} months - The number of months for the new duration.
     * @param {NumberOrInteger} days - The number of days for the new duration.
     * @param {NumberOrInteger} seconds - The number of seconds for the new duration.
     * @param {NumberOrInteger} nanoseconds - The number of nanoseconds for the new duration.
     */
    constructor(months: T, days: T, seconds: T, nanoseconds: T);
    /**
     * Creates a {@link Duration} from an ISO 8601 string
     * NOTE: Bolt transmits durations as 4 integers: Months, Days, Seconds and Nanoseconds. Parsing strings like P1.5M4.3D will throw an error. P0.5Y can be sent as it can be simplified as 6 months.
     *
     * @param {string} str The string to convert
     * @returns {Duration}
     */
    static fromString(str: string): Duration;
    /**
     * @ignore
     */
    toString(): string;
}
/**
 * Test if given object is an instance of {@link Duration} class.
 * @param {Object} obj the object to test.
 * @return {boolean} `true` if given object is a {@link Duration}, `false` otherwise.
 */
export declare function isDuration<T extends NumberOrInteger = Integer>(obj: unknown): obj is Duration<T>;
/**
 * Represents an instant capturing the time of day, but not the date, nor the timezone.
 * Created {@link LocalTime} objects are frozen with `Object.freeze()` in constructor and thus immutable.
 */
export declare class LocalTime<T extends NumberOrInteger = Integer> {
    readonly hour: T;
    readonly minute: T;
    readonly second: T;
    readonly nanosecond: T;
    /**
     * @constructor
     * @param {NumberOrInteger} hour - The hour for the new local time.
     * @param {NumberOrInteger} minute - The minute for the new local time.
     * @param {NumberOrInteger} second - The second for the new local time.
     * @param {NumberOrInteger} nanosecond - The nanosecond for the new local time.
     */
    constructor(hour: T, minute: T, second: T, nanosecond: T);
    /**
     * Create a {@link LocalTime} object from the given standard JavaScript `Date` and optional nanoseconds.
     * Year, month, day and time zone offset components of the given date are ignored.
     * @param {global.Date} standardDate - The standard JavaScript date to convert.
     * @param {NumberOrInteger|undefined} nanosecond - The optional amount of nanoseconds.
     * @return {LocalTime<number>} New LocalTime.
     */
    static fromStandardDate(standardDate: StandardDate, nanosecond?: NumberOrInteger): LocalTime<number>;
    /**
     * @ignore
     */
    toString(): string;
    /**
     * Creates a {@link LocalTime} from an ISO 8601 string
     *
     * @param {string} str The string to convert
     * @returns {LocalTime}
     */
    static fromString(str: string): LocalTime;
}
/**
 * Test if given object is an instance of {@link LocalTime} class.
 * @param {Object} obj the object to test.
 * @return {boolean} `true` if given object is a {@link LocalTime}, `false` otherwise.
 */
export declare function isLocalTime<T extends NumberOrInteger = Integer>(obj: unknown): obj is LocalTime<T>;
/**
 * Represents an instant capturing the time of day, and the timezone offset in seconds, but not the date.
 * Created {@link Time} objects are frozen with `Object.freeze()` in constructor and thus immutable.
 */
export declare class Time<T extends NumberOrInteger = Integer> {
    readonly hour: T;
    readonly minute: T;
    readonly second: T;
    readonly nanosecond: T;
    readonly timeZoneOffsetSeconds: T;
    /**
     * @constructor
     * @param {NumberOrInteger} hour - The hour for the new local time.
     * @param {NumberOrInteger} minute - The minute for the new local time.
     * @param {NumberOrInteger} second - The second for the new local time.
     * @param {NumberOrInteger} nanosecond - The nanosecond for the new local time.
     * @param {NumberOrInteger} timeZoneOffsetSeconds - The time zone offset in seconds. Value represents the difference, in seconds, from UTC to local time.
     * This is different from standard JavaScript `Date.getTimezoneOffset()` which is the difference, in minutes, from local time to UTC.
     */
    constructor(hour: T, minute: T, second: T, nanosecond: T, timeZoneOffsetSeconds: T);
    /**
     * Create a {@link Time} object from the given standard JavaScript `Date` and optional nanoseconds.
     * Year, month and day components of the given date are ignored.
     * @param {global.Date} standardDate - The standard JavaScript date to convert.
     * @param {NumberOrInteger|undefined} nanosecond - The optional amount of nanoseconds.
     * @return {Time<number>} New Time.
     */
    static fromStandardDate(standardDate: StandardDate, nanosecond?: NumberOrInteger): Time<number>;
    /**
     * @ignore
     */
    toString(): string;
    /**
     * Creates a {@link Time} from an ISO 8601 string.
     *
     * @param {string} str The string to convert
     * @returns {Time}
     */
    static fromString(str: string): Time;
}
/**
 * Test if given object is an instance of {@link Time} class.
 * @param {Object} obj the object to test.
 * @return {boolean} `true` if given object is a {@link Time}, `false` otherwise.
 */
export declare function isTime<T extends NumberOrInteger = Integer>(obj: unknown): obj is Time<T>;
/**
 * Represents an instant capturing the date, but not the time, nor the timezone.
 * Created {@link Date} objects are frozen with `Object.freeze()` in constructor and thus immutable.
 */
export declare class Date<T extends NumberOrInteger = Integer> {
    readonly year: T;
    readonly month: T;
    readonly day: T;
    /**
     * @constructor
     * @param {NumberOrInteger} year - The year for the new local date.
     * @param {NumberOrInteger} month - The month for the new local date.
     * @param {NumberOrInteger} day - The day for the new local date.
     */
    constructor(year: T, month: T, day: T);
    /**
     * Create a {@link Date} object from the given standard JavaScript `Date`.
     * Hour, minute, second and millisecond components of the given date are ignored.
     *
     * NOTE: the function {@link toStandardDate} and {@link fromStandardDate} are not inverses of one another. {@link fromStandardDate} takes the Day, Month and Year in local time from the supplied JavaScript Date object, while {@link toStandardDate} creates a new JavaScript Date object at midnight UTC.
     *
     * @param {global.Date} standardDate - The standard JavaScript date to convert.
     * @return {Date} New Date.
     * @deprecated use {@link fromStandardDateLocal} which is a drop in replacement, or {@link fromStandardDateUTC} which takes the Year, Month and Date from UTC rather than Local time
     */
    static fromStandardDate(standardDate: StandardDate): Date<number>;
    /**
     * Create a {@link Date} object from the given standard JavaScript `Date` using the Year, Month and Date in Local Time.
     * Hour, minute, second and millisecond components of the given date are ignored.
     *
     * NOTE: this function and {@link toStandardDate} are not inverses of one another.
     * This takes the Day, Month and Year in local time from the supplied JavaScript Date object, while {@link toStandardDate} creates a new JavaScript Date object at midnight UTC.
     * For a more global approach, use {@link fromStandardDateUTC}, which reads the date in UTC time.
     *
     * @example
     * fromStandardDateLocal(new Date("2010-10-10T00:00:00")) // Will create a date at 2010-10-10 as JS Dates are created at local time by default
     * fromStandardDateLocal(new Date("2010-10-10T00:00:00Z")) // This may cause issues as this date is created at UTC with the trailing "Z"
     *
     * @param {global.Date} standardDate - The standard JavaScript date to convert.
     * @return {Date} New Date.
     */
    static fromStandardDateLocal(standardDate: StandardDate): Date<number>;
    /**
     * Create a {@link Date} object from the given standard JavaScript `Date` using the Year, Month and Date in UTC time.
     * Hour, minute, second and millisecond components of the given date are ignored.
     *
     * @example
     * fromStandardDateUTC(new Date("2010-10-10T00:00:00")) // This may cause issues as JS Dates are created at local time by default
     * fromStandardDateUTC(new Date("2010-10-10T00:00:00Z")) // Will create a date at 2010-10-10 as this date is created at UTC with the trailing "Z"
     *
     * @param {global.Date} standardDate - The standard JavaScript date to convert.
     * @return {Date} New Date.
     */
    static fromStandardDateUTC(standardDate: StandardDate): Date<number>;
    /**
     * Convert date to standard JavaScript `Date`.
     *
     * The time component of the returned `Date` is set to midnight
     * and the time zone is set to UTC.
     *
     * @returns {StandardDate} Standard JavaScript `Date` at `00:00:00.000` UTC.
     */
    toStandardDate(): StandardDate;
    /**
     * @ignore
     */
    toString(): string;
    /**
     * Creates a {@link Date} from an ISO 8601 string
     *
     * @param {string} str The string to convert
     * @returns {Date}
     */
    static fromString(str: string): Date;
}
/**
 * Test if given object is an instance of {@link Date} class.
 * @param {Object} obj - The object to test.
 * @return {boolean} `true` if given object is a {@link Date}, `false` otherwise.
 */
export declare function isDate<T extends NumberOrInteger = Integer>(obj: unknown): obj is Date<T>;
/**
 * Represents an instant capturing the date and the time, but not the timezone.
 * Created {@link LocalDateTime} objects are frozen with `Object.freeze()` in constructor and thus immutable.
 */
export declare class LocalDateTime<T extends NumberOrInteger = Integer> {
    readonly year: T;
    readonly month: T;
    readonly day: T;
    readonly hour: T;
    readonly minute: T;
    readonly second: T;
    readonly nanosecond: T;
    /**
     * @constructor
     * @param {NumberOrInteger} year - The year for the new local date.
     * @param {NumberOrInteger} month - The month for the new local date.
     * @param {NumberOrInteger} day - The day for the new local date.
     * @param {NumberOrInteger} hour - The hour for the new local time.
     * @param {NumberOrInteger} minute - The minute for the new local time.
     * @param {NumberOrInteger} second - The second for the new local time.
     * @param {NumberOrInteger} nanosecond - The nanosecond for the new local time.
     */
    constructor(year: T, month: T, day: T, hour: T, minute: T, second: T, nanosecond: T);
    /**
     * Create a {@link LocalDateTime} object from the given standard JavaScript `Date` and optional nanoseconds.
     * Time zone offset component of the given date is ignored.
     * @param {global.Date} standardDate - The standard JavaScript date to convert.
     * @param {NumberOrInteger|undefined} nanosecond - The optional amount of nanoseconds.
     * @return {LocalDateTime} New LocalDateTime.
     */
    static fromStandardDate(standardDate: StandardDate, nanosecond?: NumberOrInteger): LocalDateTime<number>;
    /**
     * Convert date to standard JavaScript `Date`.
     *
     * @returns {StandardDate} Standard JavaScript `Date` at the local timezone
     */
    toStandardDate(): StandardDate;
    /**
     * @ignore
     */
    toString(): string;
    /**
     * Creates a {@link LocalDateTime} from an ISO 8601 string
     *
     * @param {string} str The string to convert
     * @returns {LocalDateTime}
     */
    static fromString(str: string): LocalDateTime;
}
/**
 * Test if given object is an instance of {@link LocalDateTime} class.
 * @param {Object} obj - The object to test.
 * @return {boolean} `true` if given object is a {@link LocalDateTime}, `false` otherwise.
 */
export declare function isLocalDateTime<T extends NumberOrInteger = Integer>(obj: unknown): obj is LocalDateTime<T>;
/**
 * Represents an instant capturing the date, the time and the timezone identifier.
 * Created {@ DateTime} objects are frozen with `Object.freeze()` in constructor and thus immutable.
 */
export declare class DateTime<T extends NumberOrInteger = Integer> {
    readonly year: T;
    readonly month: T;
    readonly day: T;
    readonly hour: T;
    readonly minute: T;
    readonly second: T;
    readonly nanosecond: T;
    readonly timeZoneOffsetSeconds?: T;
    readonly timeZoneId?: string;
    /**
     * @constructor
     * @param {NumberOrInteger} year - The year for the new date-time.
     * @param {NumberOrInteger} month - The month for the new date-time.
     * @param {NumberOrInteger} day - The day for the new date-time.
     * @param {NumberOrInteger} hour - The hour for the new date-time.
     * @param {NumberOrInteger} minute - The minute for the new date-time.
     * @param {NumberOrInteger} second - The second for the new date-time.
     * @param {NumberOrInteger} nanosecond - The nanosecond for the new date-time.
     * @param {NumberOrInteger} timeZoneOffsetSeconds - The time zone offset in seconds. Either this argument or `timeZoneId` should be defined.
     * Value represents the difference, in seconds, from UTC to local time.
     * This is different from standard JavaScript `Date.getTimezoneOffset()` which is the difference, in minutes, from local time to UTC.
     * @param {string|null} timeZoneId - The time zone id for the new date-time. Either this argument or `timeZoneOffsetSeconds` should be defined.
     */
    constructor(year: T, month: T, day: T, hour: T, minute: T, second: T, nanosecond: T, timeZoneOffsetSeconds?: T, timeZoneId?: string | null);
    /**
     * Create a {@link DateTime} object from the given standard JavaScript `Date` and optional nanoseconds.
     * @param {global.Date} standardDate - The standard JavaScript date to convert.
     * @param {NumberOrInteger|undefined} nanosecond - The optional amount of nanoseconds.
     * @return {DateTime} New DateTime.
     */
    static fromStandardDate(standardDate: StandardDate, nanosecond?: NumberOrInteger): DateTime<number>;
    /**
     * Convert date to standard JavaScript `Date`.
     *
     * @returns {StandardDate} Standard JavaScript `Date` at the defined time zone offset
     * @throws {Error} If the time zone offset is not defined in the object.
     */
    toStandardDate(): StandardDate;
    /**
     * @ignore
     */
    toString(): string;
    /**
     * Creates a {@link DateTime} from an ISO 8601 string
     *
     * @param {string} str The string to convert
     * @returns {DateTime}
     */
    static fromString(str: string): DateTime;
    /**
     * @private
     * @returns {number}
     */
    private _toUTC;
}
/**
 * Test if given object is an instance of {@link DateTime} class.
 * @param {Object} obj - The object to test.
 * @return {boolean} `true` if given object is a {@link DateTime}, `false` otherwise.
 */
export declare function isDateTime<T extends NumberOrInteger = Integer>(obj: unknown): obj is DateTime<T>;
