UNPKG

@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

163 lines (162 loc) 7.18 kB
/** * 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. */ import * as runtime from "@prisma/client/runtime/client"; import type * as Prisma from "./prismaNamespace"; export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never; export interface PrismaClientConstructor { /** * ## Prisma Client * * Type-safe database client for TypeScript * @example * ``` * const prisma = new PrismaClient() * // Fetch zero or more Webhooks * const webhooks = await prisma.webhook.findMany() * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ new <ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, U = LogOptions<ClientOptions>, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs>(options?: Prisma.Subset<ClientOptions, Prisma.PrismaClientOptions>): PrismaClient<ClientOptions, U, ExtArgs>; } /** * ## Prisma Client * * Type-safe database client for TypeScript * @example * ``` * const prisma = new PrismaClient() * // Fetch zero or more Webhooks * const webhooks = await prisma.webhook.findMany() * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ export interface PrismaClient<ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, U = LogOptions<ClientOptions>, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> { [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other']; }; $on<V extends U>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; /** * Connect with the database */ $connect(): runtime.Types.Utils.JsPromise<void>; /** * Disconnect from the database */ $disconnect(): runtime.Types.Utils.JsPromise<void>; /** * Add a middleware * @deprecated since 4.16.0. For new code, prefer client extensions instead. * @see https://pris.ly/d/extensions */ $use(cb: Prisma.Middleware): void; /** * Executes a prepared raw query and returns the number of affected rows. * @example * ``` * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>; /** * Executes a raw query and returns the number of affected rows. * Susceptible to SQL injections, see documentation. * @example * ``` * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>; /** * Performs a prepared raw query and returns the `SELECT` data. * @example * ``` * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>; /** * Performs a raw query and returns the `SELECT` data. * Susceptible to SQL injections, see documentation. * @example * ``` * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>; /** * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. * @example * ``` * const [george, bob, alice] = await prisma.$transaction([ * prisma.user.create({ data: { name: 'George' } }), * prisma.user.create({ data: { name: 'Bob' } }), * prisma.user.create({ data: { name: 'Alice' } }), * ]) * ``` * * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). */ $transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel; }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>; $transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>, options?: { maxWait?: number; timeout?: number; isolationLevel?: Prisma.TransactionIsolationLevel; }): runtime.Types.Utils.JsPromise<R>; $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<ClientOptions>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<ClientOptions>, { extArgs: ExtArgs; }>>; /** * `prisma.webhook`: Exposes CRUD operations for the **Webhook** model. * Example usage: * ```ts * // Fetch zero or more Webhooks * const webhooks = await prisma.webhook.findMany() * ``` */ get webhook(): Prisma.WebhookDelegate<ExtArgs, ClientOptions>; /** * `prisma.webhookLog`: Exposes CRUD operations for the **WebhookLog** model. * Example usage: * ```ts * // Fetch zero or more WebhookLogs * const webhookLogs = await prisma.webhookLog.findMany() * ``` */ get webhookLog(): Prisma.WebhookLogDelegate<ExtArgs, ClientOptions>; /** * `prisma.webhookUser`: Exposes CRUD operations for the **WebhookUser** model. * Example usage: * ```ts * // Fetch zero or more WebhookUsers * const webhookUsers = await prisma.webhookUser.findMany() * ``` */ get webhookUser(): Prisma.WebhookUserDelegate<ExtArgs, ClientOptions>; /** * `prisma.migrations_webhook`: Exposes CRUD operations for the **migrations_webhook** model. * Example usage: * ```ts * // Fetch zero or more Migrations_webhooks * const migrations_webhooks = await prisma.migrations_webhook.findMany() * ``` */ get migrations_webhook(): Prisma.migrations_webhookDelegate<ExtArgs, ClientOptions>; } export declare function getPrismaClientClass(dirname: string): PrismaClientConstructor;