This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as fs from 'fs'; | |
| import * as path from 'path'; | |
| import { MongoClient, ObjectId } from 'mongodb'; | |
| function toPlainJson(doc: unknown): unknown { | |
| if (doc === null || doc === undefined) return doc; | |
| if (typeof doc !== 'object') return doc; | |
| if (doc instanceof ObjectId) return doc.toString(); | |
| if (doc instanceof Date) return doc.toISOString(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export type Operations = | |
| | 'aggregate' | |
| | 'count' | |
| | 'create' | |
| | 'createMany' | |
| | 'delete' | |
| | 'deleteMany' | |
| | 'findFirst' | |
| | 'findMany' | |
| | 'findUnique' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| BadRequestException, | |
| NotFoundException, | |
| ConflictException, | |
| InternalServerErrorException, | |
| } from '@nestjs/common'; | |
| export enum PrismaErrorCode { | |
| P2000 = 'P2000', |