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 { Injectable } from '@nestjs/common'; | |
| import { | |
| ValidationArguments, | |
| ValidatorConstraint, | |
| ValidatorConstraintInterface, | |
| } from 'class-validator'; | |
| import { ComparisonValidatorType } from '@/app/enums/comparison-validator-type.enum'; | |
| export type ComparisonValidatorConstraint<T extends object> = [ | |
| keyof T, |
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 { | |
| EntityManager, | |
| EntityTarget, | |
| ObjectLiteral, | |
| SelectQueryBuilder, | |
| } from 'typeorm'; | |
| import { Injectable } from '@nestjs/common'; | |
| import { | |
| ValidationArguments, | |
| ValidatorConstraint, |
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 { | |
| Catch, | |
| ExceptionFilter, | |
| HttpException, | |
| HttpStatus, | |
| } from '@nestjs/common'; | |
| import { QueryFailedError } from 'typeorm'; | |
| import { camelCase } from 'typeorm/util/StringUtils'; | |
| export enum PostgresErrorCode { |
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 { | |
| Injectable, | |
| ExecutionContext, | |
| CallHandler, | |
| ClassSerializerInterceptor, | |
| PlainLiteralObject, | |
| } from '@nestjs/common'; | |
| import { Request } from 'express'; | |
| import { Observable } from 'rxjs'; | |
| import { map } from 'rxjs/operators'; |
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 { getJwtToken, removeJwtToken, setJwtToken } from '@/providers/auth-provider.ts'; | |
| import { backendUrl } from '@/utils/config.ts'; | |
| import type { JwtTokenModel } from '@/utils/models.ts'; | |
| export interface FetcherResponse<TData> { | |
| message: string; | |
| statusCode: number; | |
| data?: TData; | |
| error?: string; | |
| page?: number; |
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 nodemailer from 'nodemailer'; | |
| import { FindOptionsWhere, IsNull, Like, Not, Repository } from 'typeorm'; | |
| import { User } from '@/user/entities/user.entity'; | |
| import { Notification } from '@/common/entities/notification.entity'; | |
| import { InjectRepository } from '@nestjs/typeorm'; | |
| import { | |
| forwardRef, | |
| Inject, | |
| Injectable, | |
| NotFoundException, |
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
| // This must be in a top-level module as a provider (e.g. AppModule or a shared module marked as Global) | |
| import { Inject, Injectable, Scope } from '@nestjs/common'; | |
| import { REQUEST } from '@nestjs/core'; | |
| import { Request } from 'express'; | |
| import { DataSource, EntityTarget, ObjectLiteral } from 'typeorm'; | |
| import { ActiveScopeRepository } from '@/common/repositories/active-scope.repository'; | |
| @Injectable({ | |
| scope: Scope.REQUEST, |
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 'dart:async'; | |
| import 'dart:convert'; | |
| import 'package:dart_pusher_channels/dart_pusher_channels.dart'; | |
| import 'package:gql_exec/gql_exec.dart'; | |
| import 'package:gql_link/gql_link.dart'; | |
| typedef WsEventDecoder = | |
| FutureOr<Map<String, dynamic>?> Function(ChannelReadEvent event); |
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
| <?php | |
| if (! class_exists('FetchResponse')) { | |
| class FetchResponse | |
| { | |
| private int $status; | |
| private string $body; | |
| private ?string $error; | |
| private array $headers; |
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
| <?php | |
| function async(Closure $task): Closure | |
| { | |
| static $resolved = []; | |
| if ( ! extension_loaded('pcntl') || ! extension_loaded('posix')) { | |
| return $task; | |
| } |