/// <reference types="mongoose/types/aggregate" />
/// <reference types="mongoose/types/callback" />
/// <reference types="mongoose/types/collection" />
/// <reference types="mongoose/types/connection" />
/// <reference types="mongoose/types/cursor" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/error" />
/// <reference types="mongoose/types/expressions" />
/// <reference types="mongoose/types/helpers" />
/// <reference types="mongoose/types/middlewares" />
/// <reference types="mongoose/types/indexes" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/mongooseoptions" />
/// <reference types="mongoose/types/pipelinestage" />
/// <reference types="mongoose/types/populate" />
/// <reference types="mongoose/types/query" />
/// <reference types="mongoose/types/schemaoptions" />
/// <reference types="mongoose/types/schematypes" />
/// <reference types="mongoose/types/session" />
/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/utility" />
/// <reference types="mongoose/types/validation" />
/// <reference types="mongoose/types/virtuals" />
/// <reference types="mongoose/types/inferschematype" />
import { Schema } from "mongoose";
import type { HiddenBodyKeys } from "../interfaces";
import type { GitProviderType } from "../interfaces/SystemTypes";
import type { IBase } from "./Base";
export declare const bitbucketAuthFlow: readonly ["app_password", "oauth_consumer"];
export type BitbucketAuthFlow = (typeof bitbucketAuthFlow)[number];
export declare const githubAuthFlow: readonly ["personal_access_token", "oauth_app"];
export type GithubAuthFlow = (typeof githubAuthFlow)[number];
export interface BitbucketOAuthOptions {
    /**
     * The CONSUMER_KEY for Bitbucket authentication:
     * to create new repo, commit, pull & push changes to the repositories.
     *
     * @type {string}
     * @memberof IGitProvider
     */
    consumer_key?: string;
    /**
     * The CONSUMER_SECRET for Bitbucket authentication:
     * to create new repo, commit, pull & push changes to the repositories.
     *
     * @type {string}
     * @memberof IGitProvider
     */
    consumer_secret?: string;
    /**
     * Your Bitbucket account's username
     */
    username?: string;
    /**
     * The APP_PASSWORD for Bitbucket authentication:
     * to create new repo, commit, pull & push changes to the repositories.
     *
     * @type {string}
     * @memberof IGitProvider
     */
    app_password?: string;
    /**
     * `TRUE` if the REST API calling was successfully.
     */
    verified?: boolean;
}
export interface GithubOAuthOptions {
    /**
     * The app's CLIENT_ID for Github authentication:
     * to create new repo, commit, pull & push changes to the repositories.
     *
     * @type {string}
     * @memberof IGitProvider
     */
    client_id?: string;
    /**
     * The app's CLIENT_SECRET for Github authentication:
     * to create new repo, commit, pull & push changes to the repositories.
     *
     * @link https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app
     * @type {string}
     * @memberof IGitProvider
     */
    client_secret?: string;
    /**
     * Your Github account's username
     */
    username?: string;
    /**
     * The PERSONAL ACCESS TOKEN for Github authentication:
     * to create new repo, commit, pull & push changes to the repositories.
     *
     * @link https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
     * @type {string}
     * @memberof IGitProvider
     */
    personal_access_token?: string;
    /**
     * `TRUE` if the REST API calling was successfully.
     */
    verified?: boolean;
}
/**
 * An interface that extends IBase and describes the properties of a Git provider.
 *
 * @interface IGitProvider
 * @extends {IBase}
 */
export interface IGitProvider extends IBase {
    /**
     * The name of the Git provider.
     *
     * @type {string}
     * @memberof IGitProvider
     */
    name?: string;
    /**
     * Is this a default git provider
     */
    isDefault?: boolean;
    /**
     * The host of the Git provider.
     *
     * @type {string}
     * @memberof IGitProvider
     */
    host?: string;
    /**
     * The Git workspace (ORG) of the Git provider.
     *
     * @type {string}
     * @memberof IGitProvider
     */
    org?: string;
    /**
     * Alias of `org` field, will be remove soon.
     * @deprecated
     */
    gitWorkspace?: string;
    /**
     * The repository of the Git provider.
     *
     * @type {{
     *     url?: string;
     *     sshPrefix?: string;
     *   }}
     * @memberof IGitProvider
     */
    repo?: {
        /**
         * The URL of the repository of the Git provider.
         *
         * @type {string}
         */
        url?: string;
        /**
         * The SSH prefix of the repository of the Git provider.
         *
         * @type {string}
         */
        sshPrefix?: string;
    };
    /**
     * - `TRUE` if the git provider which connected by "Administrator"
     * - `FALSE` if it was connected by workspace's members and won't be displayed on the dashboard.
     */
    isOrg?: boolean;
    /**
     * The type of the Git provider.
     *
     * @type {GitProviderType}
     * @memberof IGitProvider
     */
    type?: GitProviderType;
    /**
     * Bitbucket OAuth Information
     */
    bitbucket_oauth?: BitbucketOAuthOptions;
    /**
     * Github OAuth Information
     */
    github_oauth?: GithubOAuthOptions;
    /**
     * Authorization header method
     */
    method?: "bearer" | "basic";
    /**
     * The API access token of the Git provider,
     * to create new repo, commit, pull & push changes to the repositories.
     *
     * @type {string}
     * @memberof IGitProvider
     */
    access_token?: string;
    /**
     * The API refresh token of the Git provider,
     * to obtain new access token if it's expired
     *
     * @type {string}
     * @memberof IGitProvider
     */
    refresh_token?: string;
    /**
     * Verify status, `true` is successfully connected with the git workspace REST API.
     *
     * @type {boolean}
     * @memberof IGitProvider
     */
    verified?: boolean;
}
export type GitProviderDto = Omit<IGitProvider, keyof HiddenBodyKeys>;
export declare const gitProviderSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
    collection: string;
    timestamps: true;
}, {
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    public: boolean;
    active: boolean;
    createdAt: Date;
    updatedAt: Date;
    isDefault: boolean;
    isOrg: boolean;
    workspace?: import("mongoose").Types.ObjectId;
    workspaceId?: import("mongoose").Types.ObjectId;
    org?: string;
    name?: string;
    slug?: string;
    host?: string;
    project?: import("mongoose").Types.ObjectId;
    projectId?: import("mongoose").Types.ObjectId;
    method?: "bearer" | "basic";
    access_token?: string;
    refresh_token?: string;
    type?: "bitbucket" | "github";
    owner?: import("mongoose").Types.ObjectId;
    metadata?: any;
    ownerSlug?: string;
    ownerId?: import("mongoose").Types.ObjectId;
    workspaceSlug?: string;
    updatedBy?: import("mongoose").Types.ObjectId;
    updatedById?: import("mongoose").Types.ObjectId;
    deletedBy?: import("mongoose").Types.ObjectId;
    deletedById?: import("mongoose").Types.ObjectId;
    deletedAt?: Date;
    migratedAt?: Date;
    verified?: boolean;
    gitWorkspace?: string;
    repo?: {
        url?: string;
        sshPrefix?: string;
    };
    bitbucket_oauth?: {
        username?: string;
        verified?: boolean;
        personal_access_token?: string;
        client_id?: string;
        client_secret?: string;
    };
    github_oauth?: {
        username?: string;
        verified?: boolean;
        app_password?: string;
        consumer_key?: string;
        consumer_secret?: string;
    };
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    public: boolean;
    active: boolean;
    createdAt: Date;
    updatedAt: Date;
    isDefault: boolean;
    isOrg: boolean;
    workspace?: import("mongoose").Types.ObjectId;
    workspaceId?: import("mongoose").Types.ObjectId;
    org?: string;
    name?: string;
    slug?: string;
    host?: string;
    project?: import("mongoose").Types.ObjectId;
    projectId?: import("mongoose").Types.ObjectId;
    method?: "bearer" | "basic";
    access_token?: string;
    refresh_token?: string;
    type?: "bitbucket" | "github";
    owner?: import("mongoose").Types.ObjectId;
    metadata?: any;
    ownerSlug?: string;
    ownerId?: import("mongoose").Types.ObjectId;
    workspaceSlug?: string;
    updatedBy?: import("mongoose").Types.ObjectId;
    updatedById?: import("mongoose").Types.ObjectId;
    deletedBy?: import("mongoose").Types.ObjectId;
    deletedById?: import("mongoose").Types.ObjectId;
    deletedAt?: Date;
    migratedAt?: Date;
    verified?: boolean;
    gitWorkspace?: string;
    repo?: {
        url?: string;
        sshPrefix?: string;
    };
    bitbucket_oauth?: {
        username?: string;
        verified?: boolean;
        personal_access_token?: string;
        client_id?: string;
        client_secret?: string;
    };
    github_oauth?: {
        username?: string;
        verified?: boolean;
        app_password?: string;
        consumer_key?: string;
        consumer_secret?: string;
    };
}>> & import("mongoose").FlatRecord<{
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    public: boolean;
    active: boolean;
    createdAt: Date;
    updatedAt: Date;
    isDefault: boolean;
    isOrg: boolean;
    workspace?: import("mongoose").Types.ObjectId;
    workspaceId?: import("mongoose").Types.ObjectId;
    org?: string;
    name?: string;
    slug?: string;
    host?: string;
    project?: import("mongoose").Types.ObjectId;
    projectId?: import("mongoose").Types.ObjectId;
    method?: "bearer" | "basic";
    access_token?: string;
    refresh_token?: string;
    type?: "bitbucket" | "github";
    owner?: import("mongoose").Types.ObjectId;
    metadata?: any;
    ownerSlug?: string;
    ownerId?: import("mongoose").Types.ObjectId;
    workspaceSlug?: string;
    updatedBy?: import("mongoose").Types.ObjectId;
    updatedById?: import("mongoose").Types.ObjectId;
    deletedBy?: import("mongoose").Types.ObjectId;
    deletedById?: import("mongoose").Types.ObjectId;
    deletedAt?: Date;
    migratedAt?: Date;
    verified?: boolean;
    gitWorkspace?: string;
    repo?: {
        url?: string;
        sshPrefix?: string;
    };
    bitbucket_oauth?: {
        username?: string;
        verified?: boolean;
        personal_access_token?: string;
        client_id?: string;
        client_secret?: string;
    };
    github_oauth?: {
        username?: string;
        verified?: boolean;
        app_password?: string;
        consumer_key?: string;
        consumer_secret?: string;
    };
}> & {
    _id: import("mongoose").Types.ObjectId;
}>;
export declare const GitProviderModel: import("mongoose").Model<{
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    public: boolean;
    active: boolean;
    createdAt: Date;
    updatedAt: Date;
    isDefault: boolean;
    isOrg: boolean;
    workspace?: import("mongoose").Types.ObjectId;
    workspaceId?: import("mongoose").Types.ObjectId;
    org?: string;
    name?: string;
    slug?: string;
    host?: string;
    project?: import("mongoose").Types.ObjectId;
    projectId?: import("mongoose").Types.ObjectId;
    method?: "bearer" | "basic";
    access_token?: string;
    refresh_token?: string;
    type?: "bitbucket" | "github";
    owner?: import("mongoose").Types.ObjectId;
    metadata?: any;
    ownerSlug?: string;
    ownerId?: import("mongoose").Types.ObjectId;
    workspaceSlug?: string;
    updatedBy?: import("mongoose").Types.ObjectId;
    updatedById?: import("mongoose").Types.ObjectId;
    deletedBy?: import("mongoose").Types.ObjectId;
    deletedById?: import("mongoose").Types.ObjectId;
    deletedAt?: Date;
    migratedAt?: Date;
    verified?: boolean;
    gitWorkspace?: string;
    repo?: {
        url?: string;
        sshPrefix?: string;
    };
    bitbucket_oauth?: {
        username?: string;
        verified?: boolean;
        personal_access_token?: string;
        client_id?: string;
        client_secret?: string;
    };
    github_oauth?: {
        username?: string;
        verified?: boolean;
        app_password?: string;
        consumer_key?: string;
        consumer_secret?: string;
    };
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    public: boolean;
    active: boolean;
    createdAt: Date;
    updatedAt: Date;
    isDefault: boolean;
    isOrg: boolean;
    workspace?: import("mongoose").Types.ObjectId;
    workspaceId?: import("mongoose").Types.ObjectId;
    org?: string;
    name?: string;
    slug?: string;
    host?: string;
    project?: import("mongoose").Types.ObjectId;
    projectId?: import("mongoose").Types.ObjectId;
    method?: "bearer" | "basic";
    access_token?: string;
    refresh_token?: string;
    type?: "bitbucket" | "github";
    owner?: import("mongoose").Types.ObjectId;
    metadata?: any;
    ownerSlug?: string;
    ownerId?: import("mongoose").Types.ObjectId;
    workspaceSlug?: string;
    updatedBy?: import("mongoose").Types.ObjectId;
    updatedById?: import("mongoose").Types.ObjectId;
    deletedBy?: import("mongoose").Types.ObjectId;
    deletedById?: import("mongoose").Types.ObjectId;
    deletedAt?: Date;
    migratedAt?: Date;
    verified?: boolean;
    gitWorkspace?: string;
    repo?: {
        url?: string;
        sshPrefix?: string;
    };
    bitbucket_oauth?: {
        username?: string;
        verified?: boolean;
        personal_access_token?: string;
        client_id?: string;
        client_secret?: string;
    };
    github_oauth?: {
        username?: string;
        verified?: boolean;
        app_password?: string;
        consumer_key?: string;
        consumer_secret?: string;
    };
}> & {
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    public: boolean;
    active: boolean;
    createdAt: Date;
    updatedAt: Date;
    isDefault: boolean;
    isOrg: boolean;
    workspace?: import("mongoose").Types.ObjectId;
    workspaceId?: import("mongoose").Types.ObjectId;
    org?: string;
    name?: string;
    slug?: string;
    host?: string;
    project?: import("mongoose").Types.ObjectId;
    projectId?: import("mongoose").Types.ObjectId;
    method?: "bearer" | "basic";
    access_token?: string;
    refresh_token?: string;
    type?: "bitbucket" | "github";
    owner?: import("mongoose").Types.ObjectId;
    metadata?: any;
    ownerSlug?: string;
    ownerId?: import("mongoose").Types.ObjectId;
    workspaceSlug?: string;
    updatedBy?: import("mongoose").Types.ObjectId;
    updatedById?: import("mongoose").Types.ObjectId;
    deletedBy?: import("mongoose").Types.ObjectId;
    deletedById?: import("mongoose").Types.ObjectId;
    deletedAt?: Date;
    migratedAt?: Date;
    verified?: boolean;
    gitWorkspace?: string;
    repo?: {
        url?: string;
        sshPrefix?: string;
    };
    bitbucket_oauth?: {
        username?: string;
        verified?: boolean;
        personal_access_token?: string;
        client_id?: string;
        client_secret?: string;
    };
    github_oauth?: {
        username?: string;
        verified?: boolean;
        app_password?: string;
        consumer_key?: string;
        consumer_secret?: string;
    };
} & {
    _id: import("mongoose").Types.ObjectId;
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
    collection: string;
    timestamps: true;
}, {
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    public: boolean;
    active: boolean;
    createdAt: Date;
    updatedAt: Date;
    isDefault: boolean;
    isOrg: boolean;
    workspace?: import("mongoose").Types.ObjectId;
    workspaceId?: import("mongoose").Types.ObjectId;
    org?: string;
    name?: string;
    slug?: string;
    host?: string;
    project?: import("mongoose").Types.ObjectId;
    projectId?: import("mongoose").Types.ObjectId;
    method?: "bearer" | "basic";
    access_token?: string;
    refresh_token?: string;
    type?: "bitbucket" | "github";
    owner?: import("mongoose").Types.ObjectId;
    metadata?: any;
    ownerSlug?: string;
    ownerId?: import("mongoose").Types.ObjectId;
    workspaceSlug?: string;
    updatedBy?: import("mongoose").Types.ObjectId;
    updatedById?: import("mongoose").Types.ObjectId;
    deletedBy?: import("mongoose").Types.ObjectId;
    deletedById?: import("mongoose").Types.ObjectId;
    deletedAt?: Date;
    migratedAt?: Date;
    verified?: boolean;
    gitWorkspace?: string;
    repo?: {
        url?: string;
        sshPrefix?: string;
    };
    bitbucket_oauth?: {
        username?: string;
        verified?: boolean;
        personal_access_token?: string;
        client_id?: string;
        client_secret?: string;
    };
    github_oauth?: {
        username?: string;
        verified?: boolean;
        app_password?: string;
        consumer_key?: string;
        consumer_secret?: string;
    };
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    public: boolean;
    active: boolean;
    createdAt: Date;
    updatedAt: Date;
    isDefault: boolean;
    isOrg: boolean;
    workspace?: import("mongoose").Types.ObjectId;
    workspaceId?: import("mongoose").Types.ObjectId;
    org?: string;
    name?: string;
    slug?: string;
    host?: string;
    project?: import("mongoose").Types.ObjectId;
    projectId?: import("mongoose").Types.ObjectId;
    method?: "bearer" | "basic";
    access_token?: string;
    refresh_token?: string;
    type?: "bitbucket" | "github";
    owner?: import("mongoose").Types.ObjectId;
    metadata?: any;
    ownerSlug?: string;
    ownerId?: import("mongoose").Types.ObjectId;
    workspaceSlug?: string;
    updatedBy?: import("mongoose").Types.ObjectId;
    updatedById?: import("mongoose").Types.ObjectId;
    deletedBy?: import("mongoose").Types.ObjectId;
    deletedById?: import("mongoose").Types.ObjectId;
    deletedAt?: Date;
    migratedAt?: Date;
    verified?: boolean;
    gitWorkspace?: string;
    repo?: {
        url?: string;
        sshPrefix?: string;
    };
    bitbucket_oauth?: {
        username?: string;
        verified?: boolean;
        personal_access_token?: string;
        client_id?: string;
        client_secret?: string;
    };
    github_oauth?: {
        username?: string;
        verified?: boolean;
        app_password?: string;
        consumer_key?: string;
        consumer_secret?: string;
    };
}>> & import("mongoose").FlatRecord<{
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    public: boolean;
    active: boolean;
    createdAt: Date;
    updatedAt: Date;
    isDefault: boolean;
    isOrg: boolean;
    workspace?: import("mongoose").Types.ObjectId;
    workspaceId?: import("mongoose").Types.ObjectId;
    org?: string;
    name?: string;
    slug?: string;
    host?: string;
    project?: import("mongoose").Types.ObjectId;
    projectId?: import("mongoose").Types.ObjectId;
    method?: "bearer" | "basic";
    access_token?: string;
    refresh_token?: string;
    type?: "bitbucket" | "github";
    owner?: import("mongoose").Types.ObjectId;
    metadata?: any;
    ownerSlug?: string;
    ownerId?: import("mongoose").Types.ObjectId;
    workspaceSlug?: string;
    updatedBy?: import("mongoose").Types.ObjectId;
    updatedById?: import("mongoose").Types.ObjectId;
    deletedBy?: import("mongoose").Types.ObjectId;
    deletedById?: import("mongoose").Types.ObjectId;
    deletedAt?: Date;
    migratedAt?: Date;
    verified?: boolean;
    gitWorkspace?: string;
    repo?: {
        url?: string;
        sshPrefix?: string;
    };
    bitbucket_oauth?: {
        username?: string;
        verified?: boolean;
        personal_access_token?: string;
        client_id?: string;
        client_secret?: string;
    };
    github_oauth?: {
        username?: string;
        verified?: boolean;
        app_password?: string;
        consumer_key?: string;
        consumer_secret?: string;
    };
}> & {
    _id: import("mongoose").Types.ObjectId;
}>>;
//# sourceMappingURL=GitProvider.d.ts.map