@accounts/types
Advanced tools
Comparing version 0.33.2 to 1.0.0-alpha-20231022085748-0910b9e1
@@ -16,2 +16,3 @@ export * from './types/database-interface'; | ||
export * from './types/session/session'; | ||
export * from './types/user/database-interface'; | ||
export * from './types/services/password/create-user'; | ||
@@ -22,1 +23,3 @@ export * from './types/services/password/database-interface'; | ||
export * from './types/services/magic-link/login-user'; | ||
export * from './types/context'; | ||
export * from './types/database-type'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
(0, tslib_1.__exportStar)(require("./types/database-interface"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/connection-informations"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/tokens"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/token-record"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/user"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/create-user"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/create-user-result"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/email-record"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/login-result"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/impersonation-result"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/login-user-identity"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/hook-listener"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/authentication-service"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/session/database-interface"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/session/session"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/services/password/create-user"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/services/password/database-interface"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/services/password/login-user"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/services/magic-link/database-interface"), exports); | ||
(0, tslib_1.__exportStar)(require("./types/services/magic-link/login-user"), exports); | ||
tslib_1.__exportStar(require("./types/database-interface"), exports); | ||
tslib_1.__exportStar(require("./types/connection-informations"), exports); | ||
tslib_1.__exportStar(require("./types/tokens"), exports); | ||
tslib_1.__exportStar(require("./types/token-record"), exports); | ||
tslib_1.__exportStar(require("./types/user"), exports); | ||
tslib_1.__exportStar(require("./types/create-user"), exports); | ||
tslib_1.__exportStar(require("./types/create-user-result"), exports); | ||
tslib_1.__exportStar(require("./types/email-record"), exports); | ||
tslib_1.__exportStar(require("./types/login-result"), exports); | ||
tslib_1.__exportStar(require("./types/impersonation-result"), exports); | ||
tslib_1.__exportStar(require("./types/login-user-identity"), exports); | ||
tslib_1.__exportStar(require("./types/hook-listener"), exports); | ||
tslib_1.__exportStar(require("./types/authentication-service"), exports); | ||
tslib_1.__exportStar(require("./types/session/database-interface"), exports); | ||
tslib_1.__exportStar(require("./types/session/session"), exports); | ||
tslib_1.__exportStar(require("./types/user/database-interface"), exports); | ||
tslib_1.__exportStar(require("./types/services/password/create-user"), exports); | ||
tslib_1.__exportStar(require("./types/services/password/database-interface"), exports); | ||
tslib_1.__exportStar(require("./types/services/password/login-user"), exports); | ||
tslib_1.__exportStar(require("./types/services/magic-link/database-interface"), exports); | ||
tslib_1.__exportStar(require("./types/services/magic-link/login-user"), exports); | ||
tslib_1.__exportStar(require("./types/context"), exports); | ||
tslib_1.__exportStar(require("./types/database-type"), exports); | ||
//# sourceMappingURL=index.js.map |
import { User } from './user'; | ||
import { DatabaseInterface } from './database-interface'; | ||
import { DatabaseInterfaceUser } from './user/database-interface'; | ||
import { DatabaseInterfaceSessions } from './session/database-interface'; | ||
export interface AuthenticationService<CustomUser extends User = User> { | ||
server: any; | ||
serviceName: string; | ||
setStore(store: DatabaseInterface): void; | ||
setUserStore(store: DatabaseInterfaceUser<CustomUser>): void; | ||
setSessionsStore(store: DatabaseInterfaceSessions): void; | ||
authenticate(params: any): Promise<CustomUser | null>; | ||
} |
import { User } from './user'; | ||
import { DatabaseInterfaceSessions } from './session/database-interface'; | ||
import { DatabaseInterfaceServicePassword } from './services/password/database-interface'; | ||
import { DatabaseInterfaceServiceMagicLink } from './services/magic-link/database-interface'; | ||
export interface DatabaseInterface<CustomUser extends User = User> extends DatabaseInterfaceSessions, DatabaseInterfaceServicePassword<CustomUser>, DatabaseInterfaceServiceMagicLink<CustomUser> { | ||
findUserById(userId: string): Promise<CustomUser | null>; | ||
findUserByServiceId(serviceName: string, serviceId: string): Promise<CustomUser | null>; | ||
setService(userId: string, serviceName: string, data: object): Promise<void>; | ||
unsetService(userId: string, serviceName: string): Promise<void>; | ||
setUserDeactivated(userId: string, deactivated: boolean): Promise<void>; | ||
import { DatabaseInterfaceUser } from './user/database-interface'; | ||
export interface DatabaseInterface<CustomUser extends User = User> extends DatabaseInterfaceSessions, DatabaseInterfaceUser<CustomUser> { | ||
} |
@@ -1,1 +0,1 @@ | ||
export declare type HookListener = (event?: any) => void; | ||
export type HookListener = (event?: any) => void; |
{ | ||
"name": "@accounts/types", | ||
"version": "0.33.2", | ||
"version": "1.0.0-alpha-20231022085748-0910b9e1", | ||
"description": "Accounts-js Types", | ||
@@ -10,2 +10,14 @@ "main": "lib/index.js", | ||
}, | ||
"scripts": { | ||
"clean": "yarn run -T rimraf lib", | ||
"start": "yarn run -T tsc --watch", | ||
"precompile": "yarn run clean", | ||
"compile": "yarn run -T tsc", | ||
"prepublishOnly": "yarn run compile", | ||
"test": "yarn run testonly", | ||
"test-ci": "yarn run lint && yarn run coverage", | ||
"testonly": "yarn run -T jest", | ||
"test:watch": "yarn run testonly --watch", | ||
"coverage": "yarn run testonly --coverage" | ||
}, | ||
"files": [ | ||
@@ -36,23 +48,8 @@ "src", | ||
"dependencies": { | ||
"tslib": "2.3.1" | ||
"tslib": "2.6.2" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "27.0.2", | ||
"@types/node": "16.11.7", | ||
"jest": "27.3.1", | ||
"rimraf": "3.0.2", | ||
"ts-jest": "27.0.7" | ||
}, | ||
"scripts": { | ||
"clean": "rimraf lib", | ||
"start": "tsc --watch", | ||
"precompile": "pnpm run clean", | ||
"compile": "tsc", | ||
"test": "pnpm run testonly", | ||
"test-ci": "pnpm run lint && pnpm run coverage", | ||
"testonly": "jest", | ||
"test:watch": "pnpm run testonly -- --watch", | ||
"coverage": "pnpm run testonly -- --coverage" | ||
}, | ||
"readme": "# @accounts/types\n\n[![npm](https://img.shields.io/npm/v/@accounts/types)](https://www.npmjs.com/package/@accounts/types)\n[![npm downloads](https://img.shields.io/npm/dm/@accounts/types)](https://www.npmjs.com/package/@accounts/types)\n[![codecov](https://img.shields.io/codecov/c/github/accounts-js/accounts)](https://codecov.io/gh/accounts-js/accounts)\n[![License](https://img.shields.io/github/license/accounts-js/accounts)](https://github.com/accounts-js/accounts/blob/master/LICENSE)\n\nThis package is a devDependency for most packages of the suite.\n\nIt contains the types used across the accounts-js Suite.\n\n## Installation\n\n```\nyarn add @accounts/types\n```\n\n## Contributing\n\nAny contribution is very welcome, read our [contributing guide](https://github.com/accounts-js/accounts/blob/master/CONTRIBUTING.md) to see how to locally setup the repository and see our development process.\n" | ||
} | ||
"graphql": "16.8.1", | ||
"graphql-modules": "3.0.0-alpha-20231018163544-36199b68" | ||
} | ||
} |
@@ -16,2 +16,3 @@ export * from './types/database-interface'; | ||
export * from './types/session/session'; | ||
export * from './types/user/database-interface'; | ||
export * from './types/services/password/create-user'; | ||
@@ -22,1 +23,3 @@ export * from './types/services/password/database-interface'; | ||
export * from './types/services/magic-link/login-user'; | ||
export * from './types/context'; | ||
export * from './types/database-type'; |
import { User } from './user'; | ||
import { DatabaseInterface } from './database-interface'; | ||
import { DatabaseInterfaceUser } from './user/database-interface'; | ||
import { DatabaseInterfaceSessions } from './session/database-interface'; | ||
@@ -10,4 +11,5 @@ // TODO : Fix circular dependency for better type checking | ||
serviceName: string; | ||
setStore(store: DatabaseInterface): void; | ||
setUserStore(store: DatabaseInterfaceUser<CustomUser>): void; | ||
setSessionsStore(store: DatabaseInterfaceSessions): void; | ||
authenticate(params: any): Promise<CustomUser | null>; | ||
} |
import { User } from './user'; | ||
import { DatabaseInterfaceSessions } from './session/database-interface'; | ||
import { DatabaseInterfaceServicePassword } from './services/password/database-interface'; | ||
import { DatabaseInterfaceServiceMagicLink } from './services/magic-link/database-interface'; | ||
import { DatabaseInterfaceUser } from './user/database-interface'; | ||
export interface DatabaseInterface<CustomUser extends User = User> | ||
extends DatabaseInterfaceSessions, | ||
DatabaseInterfaceServicePassword<CustomUser>, | ||
DatabaseInterfaceServiceMagicLink<CustomUser> { | ||
// Find user by identity fields | ||
findUserById(userId: string): Promise<CustomUser | null>; | ||
// Auth services related operations | ||
findUserByServiceId(serviceName: string, serviceId: string): Promise<CustomUser | null>; | ||
setService(userId: string, serviceName: string, data: object): Promise<void>; | ||
unsetService(userId: string, serviceName: string): Promise<void>; | ||
setUserDeactivated(userId: string, deactivated: boolean): Promise<void>; | ||
} | ||
DatabaseInterfaceUser<CustomUser> {} |
Sorry, the diff of this file is not supported yet
25606
2
98
485
+ Addedtslib@2.6.2(transitive)
- Removedtslib@2.3.1(transitive)
Updatedtslib@2.6.2