UNPKG

gitea-repository-provider

Version:
77 lines (76 loc) 2.5 kB
/** * * */ export class GiteaBranch extends Branch { static get attributeMapping(): { full_name: string; }; entries(patterns: any): AsyncGenerator<CollectionEntry | GiteaMasterOnlyContentEntry | GiteaContentEntry, void, unknown>; removeEntries(entries: any): Promise<void>; sha(path: any): Promise<any>; /** * Writes content into the branch. * @param {ContentEntry} entry * @param {string} message * @return {Promise<ContentEntry>} written content with sha values set */ writeEntry(entry: ContentEntry, message: string): Promise<ContentEntry>; /** * Commit entries. * @param {string} message commit message * @param {ContentEntry[]} entries content to be commited * @param {Object} [options] * @return {Promise<CommitResult>} */ commit(message: string, entries: ContentEntry[], options?: any): Promise<CommitResult>; } import { Branch } from "repository-provider"; import { CollectionEntry } from "content-entry"; declare const GiteaMasterOnlyContentEntry_base: { new (): { [x: string]: any; readonly buffer: Promise<Uint8Array>; readonly string: Promise<string>; getString(options?: { encoding: string; }): Promise<string>; setString(value: any, options?: { encoding: string; }): Promise<any>; getBuffer(options: any): Promise<Uint8Array<any>>; setBuffer(value: any, options: any): Promise<any>; setBufferOrString(value: any, options: any): Promise<any>; }; [x: string]: any; }; /** * only works for master branch * */ declare class GiteaMasterOnlyContentEntry extends GiteaMasterOnlyContentEntry_base { constructor(name: any, options: any, branch: any); branch: any; get provider(): any; get readStream(): Promise<any>; getReadStream(): Promise<any>; getString(): Promise<string>; } /** * works for all branches * */ declare class GiteaContentEntry extends BufferContentEntry { constructor(name: any, options: any, branch: any); branch: any; get provider(): any; set buffer(value: Promise<Buffer<ArrayBuffer>>); get buffer(): Promise<Buffer<ArrayBuffer>>; getBuffer(): Promise<Buffer<ArrayBuffer>>; getString(): Promise<string>; get string(): Promise<string>; } import { ContentEntry } from "content-entry"; import { CommitResult } from "repository-provider"; import { BufferContentEntry } from "content-entry"; export {};