Skip to content
This repository has been archived by the owner on Jul 26, 2019. It is now read-only.

Commit

Permalink
feat: merge changes from 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
juanpicado committed Jul 25, 2019
1 parent 7c5ee2c commit 7d2d526
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,21 @@ type StringValue = string | void | null;
logger: Logger
}

type AllowAccess = {
name: string;
version?: string;
}

interface IPluginAuth<T> extends IPlugin<T> {
authenticate(user: string, password: string, cb: Callback): void;
adduser?(user: string, password: string, cb: Callback): void;
changePassword?(user: string, password: string, newPassword: string, cb: Callback): void;
allow_access?(user: RemoteUser, pkg: T & PackageAccess, cb: Callback): void;
allow_publish?(user: RemoteUser, pkg: T & PackageAccess, cb: Callback): void;
allow_access?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: Callback): void;
allow_publish?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: Callback): void;
allow_unpublish?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: Callback): void;s
apiJWTmiddleware?(helpers : any): Function;
}

interface IPluginMiddleware<T> extends IPlugin<T> {
Expand Down

0 comments on commit 7d2d526

Please sign in to comment.