@nestjs-mod/webhook
Version:
Webhook module with an error filter, guard, controller, database migrations and rest-sdk for work with module from other nodejs appliaction
87 lines • 12.5 kB
JavaScript
"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/webhook/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/webhook/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_WEBHOOK_DATABASE_URL",
"value": null
}
}
},
"inlineSchema": "generator client {\n provider = \"prisma-client\"\n\n output = \"../../../../../libs/feature/webhook/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_WEBHOOK_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 Webhook {\n /// @DtoCreateHidden\n id String @id(map: \"PK_WEBHOOK\") @default(dbgenerated(\"uuid_generate_v4()\")) @db.Uuid\n eventName String @db.VarChar(512)\n endpoint String @db.VarChar(512)\n enabled Boolean\n headers Json?\n requestTimeout Int?\n /// @DtoCreateHidden\n /// @DtoUpdateHidden\n externalTenantId String @db.Uuid\n /// @DtoCreateHidden\n /// @DtoUpdateHidden\n createdBy String @db.Uuid\n /// @DtoCreateHidden\n /// @DtoUpdateHidden\n updatedBy 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 workUntilDate DateTime? @db.Timestamp(6)\n WebhookUser_Webhook_createdByToWebhookUser WebhookUser @relation(\"Webhook_createdByToWebhookUser\", fields: [createdBy], references: [id], onDelete: NoAction, onUpdate: NoAction, map: \"FK_WEBHOOK__CREATED_BY\")\n WebhookUser_Webhook_updatedByToWebhookUser WebhookUser @relation(\"Webhook_updatedByToWebhookUser\", fields: [updatedBy], references: [id], onDelete: NoAction, onUpdate: NoAction, map: \"FK_WEBHOOK__UPDATED_BY\")\n WebhookLog WebhookLog[]\n\n @@index([externalTenantId, enabled], map: \"IDX_WEBHOOK__ENABLED\")\n @@index([externalTenantId, eventName], map: \"IDX_WEBHOOK__EVENT_NAME\")\n @@index([externalTenantId], map: \"IDX_WEBHOOK__EXTERNAL_TENANT_ID\")\n}\n\nmodel WebhookLog {\n /// @DtoCreateHidden\n id String @id(map: \"PK_WEBHOOK_LOG\") @default(dbgenerated(\"uuid_generate_v4()\")) @db.Uuid\n request Json\n responseStatus String @db.VarChar(20)\n response Json?\n webhookStatus WebhookStatus\n webhookId String @db.Uuid\n /// @DtoCreateHidden\n /// @DtoUpdateHidden\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 Webhook Webhook @relation(fields: [webhookId], references: [id], onDelete: NoAction, onUpdate: NoAction, map: \"FK_WEBHOOK__WEBHOOK_ID\")\n\n @@index([externalTenantId], map: \"IDX_WEBHOOK_LOG__EXTERNAL_TENANT_ID\")\n @@index([externalTenantId, webhookId], map: \"IDX_WEBHOOK_LOG__WEBHOOK_ID\")\n @@index([externalTenantId, webhookStatus], map: \"IDX_WEBHOOK_LOG__WEBHOOK_STATUS\")\n}\n\nmodel WebhookUser {\n /// @DtoCreateHidden\n id String @id(map: \"PK_WEBHOOK_USER\") @default(dbgenerated(\"uuid_generate_v4()\")) @db.Uuid\n externalTenantId String @db.Uuid\n externalUserId String @db.Uuid\n userRole WebhookRole\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 Webhook_Webhook_createdByToWebhookUser Webhook[] @relation(\"Webhook_createdByToWebhookUser\")\n Webhook_Webhook_updatedByToWebhookUser Webhook[] @relation(\"Webhook_updatedByToWebhookUser\")\n\n @@unique([externalTenantId, externalUserId], map: \"UQ_WEBHOOK_USER\")\n @@index([externalTenantId], map: \"IDX_WEBHOOK_USER__EXTERNAL_TENANT_ID\")\n @@index([externalTenantId, userRole], map: \"IDX_WEBHOOK_USER__USER_ROLE\")\n}\n\nmodel migrations_webhook {\n installed_rank Int @id(map: \"__migrations_webhook_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_webhook_s_idx\")\n @@map(\"__migrations_webhook\")\n}\n\nenum WebhookRole {\n Admin\n User\n}\n\nenum WebhookStatus {\n Pending\n Process\n Success\n Error\n Timeout\n}\n",
"inlineSchemaHash": "46bf03d3c21dd3776b9e5b43db35edac8b0e38cf7d175de0c3ba025e5a50953c",
"copyEngine": true,
"runtimeDataModel": {
"models": {},
"enums": {},
"types": {}
},
"dirname": ""
};
config.runtimeDataModel = JSON.parse("{\"models\":{\"Webhook\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"eventName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"endpoint\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"enabled\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"headers\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"requestTimeout\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"externalTenantId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"workUntilDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"WebhookUser_Webhook_createdByToWebhookUser\",\"kind\":\"object\",\"type\":\"WebhookUser\",\"relationName\":\"Webhook_createdByToWebhookUser\"},{\"name\":\"WebhookUser_Webhook_updatedByToWebhookUser\",\"kind\":\"object\",\"type\":\"WebhookUser\",\"relationName\":\"Webhook_updatedByToWebhookUser\"},{\"name\":\"WebhookLog\",\"kind\":\"object\",\"type\":\"WebhookLog\",\"relationName\":\"WebhookToWebhookLog\"}],\"dbName\":null},\"WebhookLog\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"request\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"responseStatus\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"response\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"webhookStatus\",\"kind\":\"enum\",\"type\":\"WebhookStatus\"},{\"name\":\"webhookId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"externalTenantId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"Webhook\",\"kind\":\"object\",\"type\":\"Webhook\",\"relationName\":\"WebhookToWebhookLog\"}],\"dbName\":null},\"WebhookUser\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"externalTenantId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"externalUserId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userRole\",\"kind\":\"enum\",\"type\":\"WebhookRole\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"Webhook_Webhook_createdByToWebhookUser\",\"kind\":\"object\",\"type\":\"Webhook\",\"relationName\":\"Webhook_createdByToWebhookUser\"},{\"name\":\"Webhook_Webhook_updatedByToWebhookUser\",\"kind\":\"object\",\"type\":\"Webhook\",\"relationName\":\"Webhook_updatedByToWebhookUser\"}],\"dbName\":null},\"migrations_webhook\":{\"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_webhook\"}},\"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