UNPKG

moleculer-iam

Version:

Centralized IAM module for moleculer. Including a certified OIDC provider and an Identity provider for user profile, credentials, and custom claims management. Custom claims could be defined/updated by declarative schema which contains claims validation a

73 lines (72 loc) 2.36 kB
import { DownToOptions, UpDownMigrationsOptions, UpToOptions } from "umzug"; import { Sequelize, Options, Model, ModelAttributes, ModelOptions } from "sequelize"; import { Logger, LogLevel } from "./logger"; export * from "sequelize"; export declare type RDBMSManagerProps = { migrationTableName: string; migrationDirPath: string; logger?: Logger; }; export declare type RDBMSManagerOptions = Omit<Options, "define" | "query" | "set" | "sync" | "operatorsAliases" | "minifyAliases" | "hooks" | "logging"> & { sqlLogLevel?: LogLevel | "none"; migrationLockTimeoutSeconds?: number; }; export declare type ModelClass = typeof Model & (new () => Model) & { sync: never; }; export declare class RDBMSManager { private readonly props; private readonly opts; private readonly seq; private readonly migrator; private readonly logger; private readonly models; private readonly rl; static readonly operatorsAliases: { $eq: symbol; $ne: symbol; $gte: symbol; $gt: symbol; $lte: symbol; $lt: symbol; $not: symbol; $in: symbol; $notIn: symbol; $is: symbol; $like: symbol; $notLike: symbol; $iLike: symbol; $notILike: symbol; $regexp: symbol; $notRegexp: symbol; $iRegexp: symbol; $notIRegexp: symbol; $between: symbol; $notBetween: symbol; $overlap: symbol; $contains: symbol; $contained: symbol; $adjacent: symbol; $strictLeft: symbol; $strictRight: symbol; $noExtendRight: symbol; $noExtendLeft: symbol; $and: symbol; $or: symbol; $any: symbol; $all: symbol; $values: symbol; $col: symbol; }; constructor(props: RDBMSManagerProps, opts?: RDBMSManagerOptions); get sequelize(): Sequelize; define(name: string, attr: ModelAttributes, opts?: ModelOptions): ModelClass; getModel(name: string): ModelClass | undefined; migrate(opts?: UpToOptions | UpDownMigrationsOptions): Promise<void>; rollback(opts?: DownToOptions | UpDownMigrationsOptions): Promise<unknown>; dispose(): Promise<void>; private get lockTableName(); private get migrationTableLabel(); private acquireLock; private releaseLock; }