repository-provider
Version:
abstract interface to git repository providers like github, bitbucket and gitlab
114 lines (113 loc) • 2.99 kB
text/typescript
/**
* @typedef {import('./base-provider.mjs').BaseProvider} BaseProvider
* @typedef {import('./repository.mjs').Repository} Repository
*/
/**
* Named Object registering itself in the owner.
*/
export class OwnedObject extends NamedObject {
/**
* Method name to be called to register one instance in the owner.
* sample: Application => _addApplication
* @return {string}
*/
static get addMethodName(): string;
/**
* Method name to be called to unregister one instance in the owner.
* sample: Application => _deleteApplication
* @return {string}
*/
static get deleteMethodName(): string;
constructor(owner: any, name: any, options: any, additionalProperties: any);
owner: any;
/**
* Removes the receiver from the owner.
*/
delete(): void;
/**
* Check for equality.
* @param {OwnedObject} other
* @return {boolean} true if receiver and owner are equal
*/
equals(other: OwnedObject): boolean;
/**
* Url of home page.
* @see {@link Repository#homePageURL}
* @return {string|undefined} as provided from the owner
*/
get homePageURL(): string | undefined;
/**
* Url of issue tracking system.
* @see {@link Repository#issuesURL}
* @return {string|undefined} as provided from the repository
*/
get issuesURL(): string | undefined;
/**
* Forwarded from the owner.
* @return {boolean}
*/
get isLocked(): boolean;
/**
* Forwarded from the owner.
* @return {boolean}
*/
get isArchived(): boolean;
/**
* Forwarded from the owner.
* @return {boolean}
*/
get isDisabled(): boolean;
/**
* API as given by the owner.
* @return {string} url
*/
get api(): string;
/**
* API as given by the owner.
* @return {string} url
*/
get slug(): string;
/**
* URL as given by the owner.
* @return {string} url
*/
get url(): string;
/**
* The provider we live in.
* @return {BaseProvider}
*/
get provider(): BaseProvider;
/**
* Forwarded to the owner.
* @param {...any} args
*/
trace(...args: any[]): any;
/**
* Forwarded to the owner.
* @param {...any} args
*/
info(...args: any[]): any;
/**
* Forwarded to the owner.
* @param {...any} args
*/
warn(...args: any[]): any;
/**
* Forwarded to the owner.
* @param {...any} args
*/
error(...args: any[]): any;
/**
* Forwarded to the owner.
* @param {...any} args
*/
debug(...args: any[]): any;
get repositoryClass(): any;
get pullRequestClass(): any;
get branchClass(): any;
get tagClass(): any;
get hookClass(): any;
}
export type BaseProvider = import("./base-provider.mjs").BaseProvider;
export type Repository = import("./repository.mjs").Repository;
import { NamedObject } from "./named-object.mjs";