repository-provider
Version:
abstract interface to git repository providers like github, bitbucket and gitlab
84 lines (83 loc) • 2.19 kB
text/typescript
/**
* Creates an instance of BaseObject.
* @param {Object} [options]
* @param {string} [options.id]
* @param {string} [options.description]
* @param {Object} [additionalProperties]
*
* @property {string?} id
* @property {string?} description
*/
export class BaseObject {
/**
* @return {string} type we represent
*/
static get type(): string;
/**
* ```
* Tag -> tags
* Repository -> repositories
* ```
* @return {string} name of the collection holding us in the owner
*/
static get collectionName(): string;
/**
* Attributes definitions.
* @return {Object}
*/
static get attributes(): any;
/**
* User modifyable attributes.
* @return {Object} writable attributes
*/
static get writableAttributes(): any;
/**
* Map attributes between external and internal representation.
* @return {Object}
*/
static get attributeMapping(): any;
/**
* Creates an instance of BaseObject.
* @param {Object} [options]
* @param {string} [options.id]
* @param {string} [options.description]
* @param {Object} [additionalProperties]
*/
constructor(options?: {
id?: string;
description?: string;
}, additionalProperties?: any);
/** @type {string} */ id: string;
/** @type {string} */ description: string;
/**
* Takes values from options.
* @param {Object} [options]
* @param {Object} [additionalProperties]
*/
updateAttributes(options?: any, additionalProperties?: any): void;
/**
* Save object attributes in the backing store.
*/
update(): Promise<void>;
/**
* @return {string} fullName
*/
toString(): string;
/**
* Complete name in the hierachy.
* @return {string}
*/
get fullName(): string;
get identifier(): string;
/**
* By default cannot be written to.
* @return {boolean} false
*/
get isWritable(): boolean;
/**
* Check for equality
* @param {BaseObject|undefined} other
* @return {boolean} true if other is present
*/
equals(other: BaseObject | undefined): boolean;
}