Remove typings for gitlab

This commit is contained in:
Simon Meusel
2018-11-03 11:44:41 +01:00
parent 882b31e47f
commit ed4de5dd4c
29 changed files with 6 additions and 422 deletions
+6
View File
@@ -624,6 +624,12 @@
"sourceRepoURL": "https://github.com/mikedeboer/node-github",
"asOfVersion": "7.1.0"
},
{
"libraryName": "gitlab",
"typingsPackageName": "gitlab",
"sourceRepoURL": "https://github.com/jdalrymple/node-gitlab",
"asOfVersion": "2.0.0"
},
{
"libraryName": "graphene-pk11",
"typingsPackageName": "graphene-pk11",
-31
View File
@@ -1,31 +0,0 @@
import { ApiBaseOptions } from './ApiBase';
import { Labels } from './Models/Labels';
import { Users } from './Models/Users';
import { Notes } from './Models/Notes';
import { Issues } from './Models/Issues';
import { Projects } from './Models/Projects';
import { Groups } from './Models/Groups';
export interface ApiBaseOptions {
url?: string;
token?: string;
oauth_token?: string;
base_url?: string;
auth?: any;
[key: string]: any;
}
export class ApiBase {
constructor(options: ApiBaseOptions);
readonly client: this;
readonly groups: Groups
readonly projects: Projects
readonly issues: Issues
readonly notes: Notes
readonly users: Users
readonly labels: Labels
options: ApiBaseOptions;
handleOptions(): void;
init(): object;
}
-12
View File
@@ -1,12 +0,0 @@
import { ApiBase } from './ApiBase';
export class ApiBaseHTTP extends ApiBase {
prepare_opts<T>(opts: T): T;
fn_wrapper<T extends Function>(fn: T): T;
get(path: string, fn?: Function): any;
get(path: string, query?: object, fn?: Function): any;
delete(path: string, fn?: Function): any;
post(path: string, data?: object, fn?: Function): any;
put(path: string, data?: object, fn?: Function): any;
patch(path: string, data?: object, fn?: Function): any;
}
-5
View File
@@ -1,5 +0,0 @@
import { ApiBaseHTTP } from './ApiBaseHTTP';
export class ApiV3 extends ApiBaseHTTP {
}
-17
View File
@@ -1,17 +0,0 @@
export class BaseModel {
load(model: string): object;
get(path: string, fn?: Function): any;
get(path: string, query?: object, fn?: Function): any;
delete(path: string, fn?: Function): any;
post(path: string, data?: object, fn?: Function): any;
put(path: string, data?: object, fn?: Function): any;
patch(path: string, data?: object, fn?: Function): any;
}
export interface DefParams {
page?: number;
per_page?: number;
[key: string]: any;
}
export type TId = number | string;
-27
View File
@@ -1,27 +0,0 @@
import { BaseModel, DefParams } from "../BaseModel";
interface IAccessLevels {
GUEST: number
REPORTER: number
DEVELOPER: number
MASTER: number
OWNER: number
}
export class Groups extends BaseModel {
readonly access_levels: IAccessLevels;
init(): object;
all(fn?: Function): any;
all(params?: DefParams, fn?: Function): any;
show(groupId: number, fn?: Function): any;
listProjects(groupId: number, fn?: Function): any;
listMembers(groupId: number, fn?: Function): any;
addMember(groupId: number, userId: number, accessLevel: IAccessLevels[keyof IAccessLevels], fn?: Function): any;
editMember(groupId: number, userId: number, accessLevel: IAccessLevels[keyof IAccessLevels], fn?: Function): any;
removeMember(groupId: number, userId: number, fn?: Function): any;
create(params?: object, fn?: Function): any;
addProject(groupId: number, projectId: number, fn?: Function): any;
deleteGroup(groupId: number, fn?: Function): any;
search(nameOrPath: string, fn?: Function): any;
}
-6
View File
@@ -1,6 +0,0 @@
import { BaseModel, TId, DefParams } from '../BaseModel';
export class IssueNotes extends BaseModel{
all(projectId: TId, issueId: number, fn?: Function): any
all(projectId: TId, issueId: number, params?: DefParams, fn?: Function): any
}
-12
View File
@@ -1,12 +0,0 @@
import { BaseModel, TId } from '../BaseModel';
export class Issues extends BaseModel {
all(fn?: Function): any;
all(params?: object, fn?: Function): any;
show(projectId: TId, issueId: TId, fn?: Function): any;
create(projectId: TId, params?: object, fn?: Function): any;
edit(projectId: TId, issueId: TId, params?: object, fn?: Function): any;
remove(projectId: TId, issueId: TId, fn?: Function): any;
subscribe(projectId: TId, issueId: TId, params?: object, fn?: Function): any;
unsubscribe(projectId: TId, issueId: TId, fn?: Function): any;
}
-5
View File
@@ -1,5 +0,0 @@
import { BaseModel, TId } from '../BaseModel';
export class Labels extends BaseModel {
create(projectId: TId, params?: object, fn?: Function): any;
}
-5
View File
@@ -1,5 +0,0 @@
import { BaseModel, TId } from '../BaseModel';
export class Notes extends BaseModel {
create(projectId: TId, issueId: number, params?: object, fn?: Function): any;
}
-5
View File
@@ -1,5 +0,0 @@
import { BaseModel, TId } from '../BaseModel';
export class Pipelines extends BaseModel {
all(projectId: TId, fn?: Function): any;
}
-13
View File
@@ -1,13 +0,0 @@
import { BaseModel, TId, DefParams } from '../BaseModel';
interface IShowBuildParam {
projectId: TId;
[key: string]: any;
}
export class ProjectBuilds extends BaseModel {
listBuilds(projectId: TId, fn?: Function): any;
listBuilds(projectId: TId, params?: DefParams, fn?: Function): any;
showBuild(projectId: TId, buildId: string, fn?: Function): any;
triggerBuild(params?: IShowBuildParam, fn?: Function): any;
}
-7
View File
@@ -1,7 +0,0 @@
import { BaseModel, TId } from '../BaseModel';
export class ProjectKeys extends BaseModel {
listKeys(projectId: TId, fn?: Function): any;
getKey(projectId: TId, keyId: number, fn?: Function): any;
addKey(projectId: TId, params?: object, fn?: Function): any;
}
-16
View File
@@ -1,16 +0,0 @@
import { BaseModel, TId } from '../BaseModel';
interface IAddParam {
url: string;
[key: string]: any;
}
type HooksCb = (hooks: any[]) => any;
export class ProjectHooks extends BaseModel {
list(projectId: TId, fn?: HooksCb): any;
show(projectId: TId, hookId: number, fn?: Function): any;
add(projectId: TId, params: IAddParam | string, fn?: Function): any;
update(projectId: TId, hookId: number, url: string, fn?: Function): any;
remove(projectId: TId, hookId: number, fn?: Function): any;
}
-9
View File
@@ -1,9 +0,0 @@
import { IssueNotes } from './IssueNotes';
import { BaseModel, TId, DefParams } from '../BaseModel';
export class ProjectIssues extends BaseModel {
readonly notes: IssueNotes;
list(projectId: TId, fn?: Function): any;
list(projectId: TId, params?: DefParams, fn?: Function): any;
}
-6
View File
@@ -1,6 +0,0 @@
import { BaseModel, TId, DefParams } from '../BaseModel';
export class ProjectLabels extends BaseModel {
all(projectId: TId, fn?: Function): any;
all(projectId: TId, params?: DefParams, fn?: Function): any;
}
-12
View File
@@ -1,12 +0,0 @@
import { BaseModel, TId } from '../BaseModel';
type MenberCb = (menber: any) => any;
type MenbersCb = (menbers: any[]) => any;
export class ProjectMembers extends BaseModel {
list(projectId: TId, fn?: MenbersCb): any;
show(projectId: TId, userId: number, fn?: MenberCb): any;
add(projectId: TId, userId: number, accessLevel: number,fn?: Function): any;
update(projectId: TId, userId: number, accessLevel: number, fn?: Function): any;
remove(projectId: TId, userId: number, fn?: Function): any;
}
-11
View File
@@ -1,11 +0,0 @@
import { BaseModel, TId, DefParams } from '../BaseModel';
export class ProjectMergeRequests extends BaseModel {
list(projectId: TId, fn?: Function): any;
list(projectId: TId, params?: DefParams, fn?: Function): any;
show(projectId: TId, mergerequestId: number, fn?: Function): any;
add(projectId: TId, sourceBranch: string, targetBranch: string, assigneeId: number, title: string, fn?: Function): any;
update(projectId: TId, mergerequestId: number, params: object, fn?: Function): any;
comment(projectId: TId, mergerequestId: number, note: any, fn?: Function): any;
merge(projectId: TId, mergerequestId: number, params: object, fn?: Function): any;
}
-12
View File
@@ -1,12 +0,0 @@
import { BaseModel, TId } from '../BaseModel';
type MilestonesCb = (milestones: any[]) => any;
type MilestoneCb = (milestones: any) => any;
export class ProjectMilestones extends BaseModel {
list(projectId: TId, fn?: MilestonesCb): any;
all(projectId: TId, fn?: MilestonesCb): any;
show(projectId: TId, milestoneId: number, fn?: MilestoneCb): any;
add(projectId: TId, title: string, description: string, due_date: any, fn?: Function): any;
update(projectId: TId, milestoneId: number, title: string, description: string, due_date: any, state_event: any, fn?: Function): any;
}
-39
View File
@@ -1,39 +0,0 @@
import { BaseModel, TId } from '../BaseModel';
interface ShowFileParams {
file_path: string;
ref?: any;
file_id?: any;
[key: string]: any;
}
interface AddTagParams {
id: TId;
tag_name: string;
ref: string;
message?: string;
release_description?: string;
}
export class ProjectRepository extends BaseModel {
listBranches(projectId: TId, fn?: Function): any;
showBranch(projectId: TId, branchId: string, fn?: Function): any;
protectBranch(projectId: TId, branchId: string, params: object, fn?: Function): any;
unprotectBranch(projectId: TId, branchId: string, fn?: Function): any;
createBranch(params: object, fn?: Function): any;
deleteBranch(projectId: TId, branchId: string, fn?: Function): any;
addTag(params: AddTagParams, fn?: Function): any;
deleteTag(projectId: TId, tagName: string, fn?: Function): any;
showTag(projectId: TId, tagName: string, fn?: Function): any;
listTags(projectId: TId, fn?: Function): any;
listCommits(projectId: TId, fn?: Function): any;
showCommit(projectId: TId, sha: string, fn?: Function): any;
diffCommit(projectId: TId, sha: string, fn?: Function): any;
listTree(projectId: TId, fn?: Function): any;
listTree(projectId: TId, params?: object, fn?: Function): any;
showFile(projectId: TId, fn?: Function): any;
showFile(projectId: TId, params?: ShowFileParams, fn?: Function): any;
createFile(params?: object, fn?: Function): any;
updateFile(params?: object, fn?: Function): any;
compare(params?: object, fn?: Function): any;
}
-9
View File
@@ -1,9 +0,0 @@
import { BaseModel, TId } from './../BaseModel';
type ServiceCb = (service: any) => any;
export class ProjectServices extends BaseModel {
show(projectId: TId, serviceName: string, fn?: ServiceCb): any;
update(projectId: TId, serviceName: string, params: object, fn?: ServiceCb): any;
remove(projectId: TId, serviceName: string, fn?: ServiceCb): any;
}
-55
View File
@@ -1,55 +0,0 @@
import { Runners } from './Runners';
import { Pipelines } from './Pipelines';
import { ProjectBuilds } from './ProjectBuilds';
import { ProjectMergeRequests } from './ProjectMergeRequests';
import { ProjectKeys } from './ProjectDeployKeys';
import { ProjectMilestones } from './ProjectMilestones';
import { ProjectRepository } from './ProjectRepository';
import { ProjectLabels } from './ProjectLabels';
import { ProjectIssues } from './ProjectIssues';
import { ProjectHooks } from './ProjectHooks';
import { ProjectMembers } from './ProjectMembers';
import { BaseModel, DefParams, TId } from '../BaseModel';
import { ProjectServices } from './ProjectServices';
type ProjectsCb = (projects: any[]) => any;
export class Projects extends BaseModel {
readonly members: ProjectMembers;
readonly hooks: ProjectHooks;
readonly issues: ProjectIssues;
readonly labels: ProjectLabels;
readonly repository: ProjectRepository;
readonly milestones: ProjectMilestones;
readonly deploy_keys: ProjectKeys;
readonly merge_requests: ProjectMergeRequests;
readonly services: ProjectServices;
readonly builds: ProjectBuilds;
readonly pipelines: Pipelines;
readonly runners: Runners;
all(fn?: ProjectsCb): any;
all(params?: DefParams, fn?: ProjectsCb): any;
allAdmin(fn?: Function): any;
allAdmin(params?: DefParams, fn?: Function): any;
show(projectId: TId, fn?: Function): any;
create(params: object, fn?: Function): any;
create_for_user(params: object, fn?: Function): any;
edit(projectId: TId, params: object, fn?: Function): any;
addMember(params?: object, fn?: Function): any;
editMember(params?: object, fn?: Function): any;
listMembers(params?: object, fn?: Function): any;
listCommits(params?: object, fn?: Function): any;
listTags(params?: object, fn?: Function): any;
remove(projectId: TId, fn?: Function): any;
fork(params?: object, fn?: Function): any;
share(params?: object, fn?: Function): any;
search(projectName: string, fn?: Function): any;
search(projectName: string, params?: object, fn?: Function): any;
listTriggers(projectId: TId, fn?: Function): any;
showTrigger(projectId: TId, token: string, fn?: Function): any;
createTrigger(params?: object, fn?: Function): any;
removeTrigger(projectId: TId, token: string, fn?: Function): any;
}
-11
View File
@@ -1,11 +0,0 @@
import { BaseModel, DefParams, TId } from '../BaseModel';
export class Runners extends BaseModel {
all(projectId?: TId, fn?: Function): any;
all(projectId?: TId, params?: object, fn?: Function): any;
show(runnerId: number, fn?: Function): any;
update(runnerId: number, attributes: any, fn?: Function): any;
remove(runnerId: number, projectId: any, enable: any, fn?: Function): any;
enable(projectId: TId, runnerId: number, fn?: Function): any;
disable(projectId: TId, runnerId: number, fn?: Function): any;
}
-6
View File
@@ -1,6 +0,0 @@
import { BaseModel, DefParams, TId } from '../BaseModel';
export class UserKeys extends BaseModel {
all(userId?: TId, fn?: Function): any;
addKey(userId: string, title: string, key: any, fn?: Function): any;
}
-17
View File
@@ -1,17 +0,0 @@
import { BaseModel, DefParams, TId } from '../BaseModel';
import { UserKeys } from './UserKeys';
type UsersCb = (users: any[]) => any;
type UserCb = (user: any) => any;
export class Users extends BaseModel {
readonly keys: UserKeys;
all(fn?: UsersCb): any;
all(params?: DefParams, fn?: UsersCb): any;
current(fn?: Function): any;
show(userId: number, fn?: UserCb): any;
create(params?: DefParams, fn?: Function): any;
session(email: string, password: string, fn?: Function): any;
search(emailOrUsername: string, fn?: Function): any;
}
-20
View File
@@ -1,20 +0,0 @@
import * as lib from "gitlab";
const gitlab = lib({
url: 'http://example.com',
token: 'abcdefghij123456'
});
const v3 = new lib.ApiV3({ });
// From README
// Listing users
gitlab.users.all((users) => { });
// Listing projects
gitlab.projects.all((projects) => { });
// From examples/delet-service
gitlab.projects.services.remove("pid", "name", (service) => { });
-17
View File
@@ -1,17 +0,0 @@
// Type definitions for gitlab 1.8
// Project: https://github.com/node-gitlab/node-gitlab#readme
// Definitions by: sam <https://github.com/yanqing6628780>
// AryloYeung <https://github.com/Arylo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { ApiV3 } from "./ApiV3";
import { ApiBaseOptions } from "./ApiBase";
declare namespace Gitlib {
const ApiV3: new(options: ApiBaseOptions) => ApiV3;
}
declare function Gitlib(options: ApiBaseOptions): ApiV3;
export = Gitlib;
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"gitlab-tests.ts"
]
}
-14
View File
@@ -1,14 +0,0 @@
{
"extends": "dtslint/dt.json",
"rules": {
// All are TODOs
"ban-types": false,
"interface-name": false,
"no-consecutive-blank-lines": false,
"no-padding": false,
"one-line": false,
"semicolon": false,
"strict-export-declare-modifiers": false,
"whitespace": false
}
}