UNPKG

@nestjs-mod/two-factor

Version:

Two factor module with an error filter, guard, controller, database migrations and rest-sdk for work with module from other nodejs appliaction

87 lines 9.03 kB
"use strict"; /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // @ts-nocheck /** * WARNING: This is an internal file that is subject to change! * * 🛑 Under no circumstances should you import this file directly! 🛑 * * Please import the `PrismaClient` class from the `client.ts` file instead. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.getPrismaClientClass = getPrismaClientClass; const tslib_1 = require("tslib"); const runtime = tslib_1.__importStar(require("@prisma/client/runtime/client")); const config = { "generator": { "name": "client", "provider": { "fromEnvVar": null, "value": "prisma-client" }, "output": { "value": "/home/runner/work/nestjs-mod-contrib/nestjs-mod-contrib/libs/feature/two-factor/src/lib/generated/prisma-client", "fromEnvVar": null }, "config": { "moduleFormat": "cjs", "engineType": "client" }, "binaryTargets": [ { "fromEnvVar": null, "value": "debian-openssl-3.0.x", "native": true } ], "previewFeatures": [ "driverAdapters", "queryCompiler" ], "sourceFilePath": "/home/runner/work/nestjs-mod-contrib/nestjs-mod-contrib/libs/feature/two-factor/src/prisma/schema.prisma", "isCustomOutput": true }, "relativePath": "../../../prisma", "clientVersion": "6.9.0", "engineVersion": "81e4af48011447c3cc503a190e86995b66d2a28e", "datasourceNames": [ "db" ], "activeProvider": "postgresql", "postinstall": false, "ciName": "GitHub Actions", "inlineDatasources": { "db": { "url": { "fromEnvVar": "SINGLE_SIGN_ON_TWO_FACTOR_DATABASE_URL", "value": null } } }, "inlineSchema": "generator client {\n provider = \"prisma-client\"\n\n output = \"../../../../../libs/feature/two-factor/src/lib/generated/prisma-client\"\n\n previewFeatures = [\"queryCompiler\", \"driverAdapters\"]\n moduleFormat = \"cjs\"\n}\n\ndatasource db {\n provider = \"postgres\"\n url = env(\"SINGLE_SIGN_ON_TWO_FACTOR_DATABASE_URL\")\n}\n\ngenerator prismaClassGenerator {\n provider = \"prisma-generator-nestjs-dto\"\n output = \"../lib/generated/rest-dto\"\n annotateAllDtoProperties = \"true\"\n classValidation = \"true\"\n createDtoPrefix = \"Create\"\n definiteAssignmentAssertion = \"true\"\n dtoSuffix = \"Dto\"\n entityPrefix = \"\"\n entitySuffix = \"\"\n exportRelationModifierClasses = \"true\"\n fileNamingStyle = \"kebab\"\n flatResourceStructure = \"false\"\n noDependencies = \"false\"\n outputToNestJsResourceStructure = \"false\"\n prettier = \"true\"\n reExport = \"false\"\n updateDtoPrefix = \"Update\"\n}\n\nmodel TwoFactorUser {\n /// @DtoCreateHidden\n id String @id(map: \"PK_TWO_FACTOR_USER\") @default(dbgenerated(\"uuid_generate_v4()\")) @db.Uuid\n username String? @db.VarChar(255)\n secret String @db.VarChar(100)\n externalTenantId String @db.Uuid\n externalUserId String @db.Uuid\n /// @DtoCreateHidden\n /// @DtoUpdateHidden\n createdAt DateTime @default(now()) @db.Timestamp(6)\n /// @DtoCreateHidden\n /// @DtoUpdateHidden\n updatedAt DateTime @default(now()) @db.Timestamp(6)\n TwoFactorCode TwoFactorCode[]\n\n @@unique([externalTenantId, externalUserId], map: \"UQ_TWO_FACTOR_USER\")\n @@index([externalTenantId], map: \"IDX_TWO_FACTOR_USER__EXTERNAL_TENANT_ID\")\n}\n\nmodel TwoFactorCode {\n /// @DtoCreateHidden\n id String @id(map: \"PK_TWO_FACTOR_CODES\") @default(dbgenerated(\"uuid_generate_v4()\")) @db.Uuid\n type String @db.VarChar(512)\n operationName String @db.VarChar(512)\n code String @db.VarChar(100)\n used Boolean\n outdated Boolean\n userId String @db.Uuid\n externalTenantId String @db.Uuid\n /// @DtoCreateHidden\n /// @DtoUpdateHidden\n createdAt DateTime @default(now()) @db.Timestamp(6)\n /// @DtoCreateHidden\n /// @DtoUpdateHidden\n updatedAt DateTime @default(now()) @db.Timestamp(6)\n TwoFactorUser TwoFactorUser @relation(fields: [userId], references: [id], onDelete: NoAction, onUpdate: NoAction, map: \"FK_TWO_FACTOR_CODES__USER_ID\")\n\n @@unique([userId, operationName, type, code, externalTenantId], map: \"UQ_TWO_FACTOR_CODES\")\n @@index([userId, externalTenantId], map: \"IDX_TWO_FACTOR_CODES__USER_ID\")\n @@index([externalTenantId], map: \"IDX_TWO_FACTOR_CODES__EXTERNAL_TENANT_ID\")\n}\n\nmodel migrations_two_factor {\n installed_rank Int @id(map: \"__migrations_two_factor_pk\")\n version String? @db.VarChar(50)\n description String @db.VarChar(200)\n type String @db.VarChar(20)\n script String @db.VarChar(1000)\n checksum Int?\n installed_by String @db.VarChar(100)\n installed_on DateTime @default(now()) @db.Timestamp(6)\n execution_time Int\n success Boolean\n\n @@index([success], map: \"__migrations_two_factor_s_idx\")\n @@map(\"__migrations_two_factor\")\n}\n", "inlineSchemaHash": "fff6adb14700017dc0becfede8143bda7440dfab9fa9f369d487f9aac8fb6e5a", "copyEngine": true, "runtimeDataModel": { "models": {}, "enums": {}, "types": {} }, "dirname": "" }; config.runtimeDataModel = JSON.parse("{\"models\":{\"TwoFactorUser\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"secret\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"externalTenantId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"externalUserId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"TwoFactorCode\",\"kind\":\"object\",\"type\":\"TwoFactorCode\",\"relationName\":\"TwoFactorCodeToTwoFactorUser\"}],\"dbName\":null},\"TwoFactorCode\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"operationName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"used\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"outdated\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"externalTenantId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"TwoFactorUser\",\"kind\":\"object\",\"type\":\"TwoFactorUser\",\"relationName\":\"TwoFactorCodeToTwoFactorUser\"}],\"dbName\":null},\"migrations_two_factor\":{\"fields\":[{\"name\":\"installed_rank\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"version\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"script\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"checksum\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"installed_by\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"installed_on\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"execution_time\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"success\",\"kind\":\"scalar\",\"type\":\"Boolean\"}],\"dbName\":\"__migrations_two_factor\"}},\"enums\":{},\"types\":{}}"); config.engineWasm = undefined; config.compilerWasm = { getRuntime: async () => await Promise.resolve().then(() => tslib_1.__importStar(require("@prisma/client/runtime/query_compiler_bg.postgresql.mjs"))), getQueryCompilerWasmModule: async () => { const { readFile } = await Promise.resolve().then(() => tslib_1.__importStar(require('node:fs/promises'))); const wasmModulePath = (await Promise.resolve().then(() => tslib_1.__importStar(require('node:path')))).resolve("node_modules/@prisma/client/runtime/query_compiler_bg.postgresql.wasm"); const wasmModuleBytes = await readFile(wasmModulePath); return new globalThis.WebAssembly.Module(wasmModuleBytes); } }; function getPrismaClientClass(dirname) { config.dirname = dirname; return runtime.getPrismaClient(config); } //# sourceMappingURL=class.js.map