repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
marcosbaima/eat-tasty | api/src/modules/customer/dtos/ICreateOrderDTO.ts | <filename>api/src/modules/customer/dtos/ICreateOrderDTO.ts<gh_stars>0
export default interface ICreateOrderDTO {
customer_id: string;
restaurant_id:string;
items:string[];
subtotal:string;
fees:string;
delivery_price: string;
total:string;
} |
marcosbaima/eat-tasty | api/src/modules/groups/service/UpdateGroupService.ts | import { getRepository } from 'typeorm';
import AppError from '@shared/errors/AppError';
import Group from '@modules/groups/infra/typeorm/models/Group';
import ICreateGroupRepository from '../repositories/groups'
import {inject,injectable} from 'tsyringe';
interface Request {
type: string;
description: string;
c... |
marcosbaima/eat-tasty | api/src/modules/groups/dtos/ICreateGroupDTO.ts | export default interface IcreateGroupDTO{
type: string;
description: string;
cm1: string;
cm1u: string;
cm1r1: string;
cm1r2: string;
cm1e: string;
cm2: string;
cm2c: string;
cm2e: string;
cm2r: string;
cm2u: string;
cm2d: string;
cm3: string;
cm3a1: string;
... |
marcosbaima/eat-tasty | api/src/modules/customer/Repositories/IMenuRepository.ts | import menuRest from '../infra/typeorm/models/Restaurant'
import IExcludeMenuDTO from '../dtos/IExcludeMenuDTO'
export default interface IExcludeMenuRepository{
findById(id:string): Promise<menuRest | undefined>
findByEmail(email:string): Promise<menuRest | undefined>
findByMarket(marketplaceId:string): Pro... |
marcosbaima/eat-tasty | api/src/shared/container/index.ts | import { container } from 'tsyringe';
import ICustomerRepository from '@modules/customer/Repositories/ICustomerRepository';
import CustomerRepository from '@modules/customer/infra/typeorm/repositories/CustomerRepository';
import IUsersRepository from '@modules/users/Repositories/IUsersRepository';
import UsersReposit... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/typeorm/models/Order.ts | import {
Entity,
Column,
PrimaryGeneratedColumn,ManyToOne,JoinColumn
} from 'typeorm';
import restaurant from './Restaurant';
import customer from './Customer';
@Entity('orders')
class orders {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
items: string;
@Column()
subtotal: number;
@C... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/routes/customer.route.ts | import { Router } from 'express';
import { celebrate, Segments, Joi } from 'celebrate';
import ensureAuthenticaated from '@modules/users/infra/http/middlewares/ensureAuthenticate';
import customerController from '../controller/custumerController';
const CustomerRouter = Router();
CustomerRouter.use(ensureAuthenticaat... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/routes/menu.route.ts | <reponame>marcosbaima/eat-tasty
import { Router } from 'express';
import { celebrate, Segments, Joi } from 'celebrate';
import ensureAuthenticaated from '@modules/users/infra/http/middlewares/ensureAuthenticate';
import menuController from '../controller/menuController';
const menuRouter = Router();
menuRouter.use(en... |
marcosbaima/eat-tasty | api/src/shared/typeorm/migrations/1600723079008-RelationUserGroup.ts | import { MigrationInterface, QueryRunner } from 'typeorm';
export default class RelationUserGroup1600723079008
implements MigrationInterface {
name = 'RelationUserGroup1600723079008';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "users" ADD "groupsId" uuid ... |
marcosbaima/eat-tasty | api/src/shared/container/providers/StorageProvider/models/IStorageProvider.ts | export default interface IStorageProvider{
saveFile(file:string):Promise<string>;
deleteFile(file:string):Promise<void>;
}
|
marcosbaima/eat-tasty | api/src/modules/customer/Repositories/IRestaurantRepository.ts | <reponame>marcosbaima/eat-tasty<gh_stars>0
import Restaurant from '../infra/typeorm/models/Restaurant';
import ICreateRestaurantDTO from '../dtos/ICreateRestaurantDTO';
export default interface IRestaurantRepository{
findById(id:string): Promise<Restaurant | undefined>
findByEmail(email:string): Promise<Restaur... |
marcosbaima/eat-tasty | api/src/modules/customer/dtos/ICreateRestaurantDTO.ts | export default interface ICreateRestaurantDTO{
name:string;
email:string;
password_hash?:string;
description?:string;
restaurant_name:string;
restaurant_address:string;
restaurant_city:string;
culinary:string;
delivery_price:number;
logo_path:string;
banner_path:string;
} |
marcosbaima/eat-tasty | api/src/modules/users/infra/http/controllers/ResetPasswordController.ts | import { Request, Response } from 'express';
import { container } from 'tsyringe';
import ResetPasswordService from '@modules/users/service/ResetPasswordService';
export default class ResetPasswordController {
public async create(request:Request, response:Response):Promise<Response>{
const { password, token } =... |
marcosbaima/eat-tasty | api/src/modules/groups/service/CreateGroupService.ts | import { getRepository } from 'typeorm';
import AppError from '@shared/errors/AppError';
import Group from '@modules/groups/infra/typeorm/models/Group';
import ICreateGroupRepository from '../repositories/groups'
import {inject,injectable} from 'tsyringe';
interface Request {
type: string;
description: string;
c... |
marcosbaima/eat-tasty | api/src/modules/users/infra/http/routes/users.route.ts | <gh_stars>0
import { Router, Request, Response } from 'express';
import { celebrate, Segments, Joi } from 'celebrate';
import paginate from 'express-paginate';
import multer from 'multer';
import { getRepository, getCustomRepository, Connection } from 'typeorm';
import uploadConfig from '@config/upload';
import { conta... |
marcosbaima/eat-tasty | api/src/shared/typeorm/migrations/1600294147671-CreateGroup.ts | import { MigrationInterface, QueryRunner, Table } from 'typeorm';
export default class CreateGroup1600294147671 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: 'group',
columns: [
{
... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/routes/restaurant.route.ts | <gh_stars>0
import { Router } from 'express';
import ensureAuthenticaated from '@modules/users/infra/http/middlewares/ensureAuthenticate';
import { celebrate, Joi, Segments } from 'celebrate'
import restaurantController from '../controller/restaurantController';
const RestaurantRouter = Router();
RestaurantRouter.use(... |
marcosbaima/eat-tasty | api/src/modules/users/Repositories/IUpdateUsersRepository.ts | import User from '../infra/typeorm/models/UsersUpdate'
import IUpdateUserDTO from '../dtos/IUpdateUsersDTO'
export default interface IUpdateUsersRepository{
findById(id:string): Promise<User | undefined>
findByEmail(email:string): Promise<User | undefined>
find(date:IUpdateUserDTO):Promise<User>;
create(date:IU... |
marcosbaima/eat-tasty | api/src/modules/users/infra/typeorm/repositories/UserTokensRepository.ts | <reponame>marcosbaima/eat-tasty
import { getRepository, Repository } from 'typeorm';
import IUserTokensRepository from '@modules/users/Repositories/IUserTokensRepository';
import UserToken from '@modules/users/infra/typeorm/models/UserToken';
class UserTokensRepository implements IUserTokensRepository {
private ormR... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/routes/orders.route.ts | import { Router } from 'express';
import { celebrate, Segments, Joi } from 'celebrate';
import ensureAuthenticaated from '@modules/users/infra/http/middlewares/ensureAuthenticate';
import orderController from '../controller/orderController';
const OrderRouter = Router();
OrderRouter.use(ensureAuthenticaated);
const ... |
marcosbaima/eat-tasty | api/src/modules/customer/service/CreateOrderService.ts | import {inject,injectable} from 'tsyringe';
import AppError from '@shared/errors/AppError';
import Order from '@modules/customer/infra/typeorm/models/Order';
import IOrderRepository from '../Repositories/IOrderRepository';
interface Request {
customer_id: string;
restaurant_id:string;
items:string[];
s... |
marcosbaima/eat-tasty | api/src/shared/infra/http/server.ts | import 'reflect-metadata';
import 'dotenv/config';
import express, { Request, Response, NextFunction } from 'express';
import { errors } from 'celebrate';
import cors from 'cors';
import 'express-async-errors';
import routes from './routes';
import AppError from '../../errors/AppError';
import '@shared/typeorm';
impo... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/controller/menuController.ts | <gh_stars>0
import { Router,Request, Response} from 'express';
import { getRepository } from 'typeorm';
import ExcludeMenuService from '@modules/customer/service/ExcludeMenuService';
import Items from '@modules/customer/infra/typeorm/models/Item';
import {container} from 'tsyringe';
export default class menuControll... |
marcosbaima/eat-tasty | api/src/modules/users/service/ResetPasswordService.ts | import {inject,injectable} from 'tsyringe';
import { addHours, isAfter } from 'date-fns';
import IUsersRepository from '../Repositories/IUsersRepository';
import IUserTokensRepository from '../Repositories/IUserTokensRepository'
import IHashProvider from '../providers/HashProvider/models/IHashProvider'
import AppErro... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/typeorm/repositories/OrderRepository.ts | import { getRepository, Repository } from 'typeorm';
import IOrderRepository from '@modules/customer/Repositories/IOrderRepository';
import IOrderDTO from '@modules/customer/dtos/ICreateOrderDTO';
import orders from '@modules/customer/infra/typeorm/models/Order';
import order from '@modules/customer/infra/typeorm/model... |
marcosbaima/eat-tasty | api/src/shared/typeorm/migrations/1626505338906-create-restaurant.ts | <gh_stars>0
import {MigrationInterface, QueryRunner,Table} from "typeorm";
export default class createRestaurant1626505338906 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: 'restaurant',
... |
marcosbaima/eat-tasty | api/src/modules/users/infra/typeorm/repositories/usersUpdate.ts | import { getRepository, Repository } from 'typeorm';
import IUsersUpdateRepository from '@modules/users/Repositories/IUpdateUsersRepository';
import IUpdateUserDTO from '@modules/users/dtos/IUpdateUsersDTO';
import User from '@modules/users/infra/typeorm/models/UsersUpdate';
class UserUpdateRepository implements IUse... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/controller/custumerController.ts | <reponame>marcosbaima/eat-tasty
import { Router,Request, Response} from 'express';
import CreateCustomerService from '@modules/customer/service/CreateCustomerService';
import {container} from 'tsyringe';
export default class customerController{
public async create(request:Request, response:Response):Promise<Res... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/controller/signupController.ts | import { Request,Response} from 'express'
import { container } from 'tsyringe';
import Customer from '@modules/customer/service/CreateCustomerService';
export default class singnupController{
public async create(request:Request, response:Response):Promise<Response> {
try{
const {
email,
n... |
marcosbaima/eat-tasty | api/src/modules/customer/service/UpdateApiOwnerService.ts | import {inject,injectable} from 'tsyringe';
import AppError from '@shared/errors/AppError';
import apiOwner from '@modules/apiOwner/infra/typeorm/models/apiOwner';
import IApiOwnerRepository from '../Repositories/IApiOwnerRepository';
interface Request {
marketplaceId: string;
description: string; ... |
marcosbaima/eat-tasty | api/src/shared/container/providers/StorageProvider/Implementations/DiskStorageProvider.ts | import fs from 'fs';
import path from 'path';
import uploadConfig from '@config/upload';
import IStorageProvide from '../models/IStorageProvider'
class DiskStorageProvider implements IStorageProvide {
public async saveFile(file:string):Promise<string>{
await fs.promises.rename(
path.resolve(uploadConfig.tm... |
marcosbaima/eat-tasty | api/src/modules/customer/service/AuthenticateUserSession.ts | <gh_stars>0
import { sign } from 'jsonwebtoken';
import IHashProvider from '../providers/HashProvider/models/IHashProvider';
import AppError from '@shared/errors/AppError';
import ICustomersRepository from '@modules/customer/Repositories/ICustomerRepository';
import Customer from '@modules/customer/infra/typeorm/mode... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/typeorm/models/Restaurant.ts | <gh_stars>0
import {
Entity,
Column,
PrimaryGeneratedColumn,ManyToOne,JoinColumn
} from 'typeorm';
@Entity('restaurant')
class restaurant {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
active: boolean;
@Column()
name: string;
@Column()
email: string;
@Column()
password_hash:s... |
marcosbaima/eat-tasty | api/src/modules/users/infra/typeorm/models/Users.ts | <reponame>marcosbaima/eat-tasty<filename>api/src/modules/users/infra/typeorm/models/Users.ts
import {
Entity,
Column,
PrimaryGeneratedColumn,
CreateDateColumn,
UpdateDateColumn,
JoinTable,
ManyToOne,
} from 'typeorm';
import Group from '@modules/groups/infra/typeorm/models/Group';
@Entity('users')
class ... |
marcosbaima/eat-tasty | api/src/shared/typeorm/migrations/1626508494163-create-dashboard.ts | <filename>api/src/shared/typeorm/migrations/1626508494163-create-dashboard.ts
import {MigrationInterface, QueryRunner,Table,TableForeignKey} from "typeorm";
export default class createDashboard1626508494163 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await qu... |
marcosbaima/eat-tasty | api/src/modules/customer/Repositories/IOrderRepository.ts | <reponame>marcosbaima/eat-tasty
import Order from '../infra/typeorm/models/Order'
import ICreateOrderDTO from '../dtos/ICreateOrderDTO'
export default interface IOrderRepository{
findById(id:string): Promise<Order | undefined>
findByEmail(email:string): Promise<Order | undefined>
findByMarket(marketplaceId:... |
marcosbaima/eat-tasty | api/src/shared/typeorm/migrations/1626506859932-create-items-rest.ts | import {MigrationInterface, QueryRunner,Table,TableForeignKey} from "typeorm";
export default class createItemsRest1626506859932 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: 'items',
... |
marcosbaima/eat-tasty | api/src/modules/customer/dtos/IExcludeMenuDTO.ts | <filename>api/src/modules/customer/dtos/IExcludeMenuDTO.ts
export default interface ICreateCustomerRestDTO{
id:string,
} |
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/controller/customerResturantController.ts | <reponame>marcosbaima/eat-tasty
import { Request, Response} from 'express';
import { getRepository } from 'typeorm';
import customer from '@modules/customer/infra/typeorm/models/Customer';
import Order from '@modules/customer/infra/typeorm/models/Order';
export default class customesRestaurantController{
publ... |
marcosbaima/eat-tasty | api/src/modules/users/service/UpdateUsersService.ts |
import AppError from '@shared/errors/AppError';
import Users from '@modules/users/infra/typeorm/models/UsersUpdate';
import IUpdateUsersRepository from '../Repositories/IUpdateUsersRepository';
import { injectable, inject} from 'tsyringe';
import IHashProvider from '@modules/users/providers/HashProvider/models/IHashPr... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/controller/orderController.ts | <filename>api/src/modules/customer/infra/http/controller/orderController.ts
import {Request,Response} from 'express';
import { getRepository } from 'typeorm';
import Orders from '@modules/customer/service/CreateOrderService';
import Item from '@modules/customer/infra/typeorm/models/Item';
import Restaurant from '@modu... |
marcosbaima/eat-tasty | api/src/modules/groups/infra/typeorm/repositories/Group.ts | import { getRepository, Repository } from 'typeorm';
import ICreateGroupRepository from '@modules/groups/repositories/groups'
import Group from '../models/Group';
import Groups from '../models/Group';
import IcreateGroupDTO from '@modules/groups/dtos/ICreateGroupDTO';
class GroupRepository implements ICreateGroupRep... |
marcosbaima/eat-tasty | api/src/modules/groups/repositories/groups.ts | import Group from '../infra/typeorm/models/Group'
import ICreateGroupDTO from '../dtos/ICreateGroupDTO'
export default interface ICreateGroupRepository{
findById(id:string): Promise<Group | undefined>
findByType(type:string): Promise<Group | undefined>
//find(date:ICreatePlanRecurrenceDTO):Promise<Plans>;
cre... |
marcosbaima/eat-tasty | api/src/config/mail.ts | interface IMailConfig{
driver: 'ethereal' | 'ses';
defauts:{
from:{
email:string;
name: string;
}
};
}
export default {
driver:process.env.APP_MAIL_DRIVER || 'ethereal',
defauts:{
from:{
email:'<EMAIL>',
name: '<NAME>.'
}
},
} as IMailConfig
|
marcosbaima/eat-tasty | api/src/modules/customer/infra/typeorm/models/Dashboard.ts | import {
Entity,
Column,
PrimaryGeneratedColumn,ManyToOne,JoinColumn
} from 'typeorm';
import restaurant from './Restaurant'
@Entity('dashboard')
class dashboard {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
balance: number;
@Column()
delivery_balance: number;
@Column()
total_orde... |
marcosbaima/eat-tasty | api/src/modules/groups/infra/typeorm/models/Group.ts | import {
Entity,
Column,
PrimaryGeneratedColumn,
CreateDateColumn,
UpdateDateColumn,
OneToMany,
} from 'typeorm';
import User from '@modules/users/infra/typeorm/models/Users';
@Entity('group')
class Group {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
description: string;
@Column()
t... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/typeorm/models/Item.ts | <gh_stars>0
import {
Entity,
Column,
PrimaryGeneratedColumn,ManyToOne,JoinColumn
} from 'typeorm';
import restaurant from './Restaurant'
@Entity('items')
class items {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
title: string;
@Column()
description: string;
@Column()
price: stri... |
marcosbaima/eat-tasty | api/src/modules/groups/infra/http/routes/group.router.ts | <gh_stars>0
import { Router } from 'express';
import { celebrate, Segments, Joi } from 'celebrate';
import ensureAuthenticated from '@modules/users/infra/http/middlewares/ensureAuthenticate';
import groupsController from '../controllers/groupController';
const groupRouter = Router();
//groupRouter.use(ensureAuthenti... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/routes/ordersInformations.route.ts | import { Router } from 'express';
import { celebrate, Segments, Joi } from 'celebrate';
import ensureAuthenticaated from '@modules/users/infra/http/middlewares/ensureAuthenticate';
import customerRestaurantController from '../controller/customerResturantController';
const CustomerRestauratRouter = Router();
CustomerR... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/typeorm/models/Customer.ts | import {
Entity,
Column,
PrimaryGeneratedColumn,
} from 'typeorm';
@Entity('customers')
class Customers {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
name:string;
@Column()
email:string;
@Column()
password_hash: string;
@Column()
... |
marcosbaima/eat-tasty | api/src/modules/customer/service/ExcludeMenuService.ts | <filename>api/src/modules/customer/service/ExcludeMenuService.ts
import {inject,injectable} from 'tsyringe';
import AppError from '@shared/errors/AppError';
import IMenuRepository from '../Repositories/IMenuRepository';
interface Request {
id:string;
}
@injectable()
class MenuService{
constructor(... |
marcosbaima/eat-tasty | api/src/shared/container/providers/index.ts | <filename>api/src/shared/container/providers/index.ts
import { container } from 'tsyringe';
import mailConfig from '@config/mail';
import IStorageProvider from './StorageProvider/models/IStorageProvider';
import DiskStorageProvider from './StorageProvider/Implementations/DiskStorageProvider';
container.registerSingle... |
marcosbaima/eat-tasty | api/src/modules/users/service/UpdateUserAvatarService.ts |
import AppError from '@shared/errors/AppError';
import User from '@modules/users/infra/typeorm/models/Users';
import IUsersRepository from '../Repositories/IUsersRepository';
import { injectable, inject} from 'tsyringe';
import IStorageProvider from '@shared/container/providers/StorageProvider/models/IStorageProvider'... |
marcosbaima/eat-tasty | api/src/modules/customer/dtos/ICreateCustomerDTO.ts | <gh_stars>0
export default interface ICreateCustomerDTO{
name:string;
email:string;
password_hash?:<PASSWORD>;
address:string;
district:string;
} |
marcosbaima/eat-tasty | api/src/modules/customer/Repositories/ICustomerRepository.ts | import customer from '../infra/typeorm/models/Customer'
import ICreateCustomerDTO from '../dtos/ICreateCustomerDTO'
export default interface ICustomerRepository{
findById(id:string): Promise<customer | undefined>
findByEmail(email:string): Promise<customer | undefined>
findByMarket(marketplaceId:string): Pr... |
marcosbaima/eat-tasty | api/src/modules/users/dtos/IUpdateUsersDTO.ts |
export default interface IUpdateUserDTO{
user_id?:string;
name: string;
email: string;
groupsId: string;
powerUser:boolean;
}
|
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/routes/sessions.routers.ts | import { Router } from 'express';
import SessionController from '@modules/customer/infra/http/controller/SessionController'
const sessionsRouter = Router();
const sessionController = new SessionController()
sessionsRouter.post('/',sessionController.update)
export default sessionsRouter;
|
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/routes/singnup.route.ts | <gh_stars>0
import { Router } from 'express';
import { celebrate, Segments, Joi } from 'celebrate';
import ensureAuthenticaated from '@modules/users/infra/http/middlewares/ensureAuthenticate';
import singnupController from '../controller/signupController';
const singnupRouter = Router();
//singnupRouter.use(ensureAut... |
marcosbaima/eat-tasty | api/src/modules/users/service/ShowProfileService.ts |
import AppError from '@shared/errors/AppError';
import User from '@modules/users/infra/typeorm/models/Users';
import IUsersRepository from '../Repositories/IUsersRepository';
import { injectable, inject} from 'tsyringe';
interface Request {
user_id:string;
}
@injectable()
class ShowProfileService {
constructor(
... |
marcosbaima/eat-tasty | api/src/shared/infra/http/routes/index.ts | <gh_stars>0
import { Router } from 'express';
import usersRouter from '@modules/users/infra/http/routes/users.route';
import profileRouter from '@modules/users/infra/http/routes/profile.routers';
import groupRouter from '@modules/groups/infra/http/routes/group.router';
import signupController from '@modules/custome... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/typeorm/repositories/RestaurantRepository.ts | import { getRepository, Repository } from 'typeorm';
import IRestaurantRepository from '@modules/customer/Repositories/IRestaurantRepository';
import IRestaurantDTO from '@modules/customer/dtos/ICreateRestaurantDTO';
import Restaurants from '@modules/customer/infra/typeorm/models/Restaurant';
import Restaurant from '@m... |
marcosbaima/eat-tasty | api/src/modules/users/Repositories/FakeUsersRepository.ts |
import IUsersRepository from '../../users/Repositories/IUsersRepository';
import IcreateUserDTO from '../../users/dtos/ICreateUsersDTO';
import User from '../../users/infra/typeorm/models/Users';
import { uuid } from 'uuidv4';
class FakeUsersRepository implements IUsersRepository {
private user: User[]=[];
p... |
marcosbaima/eat-tasty | api/src/modules/users/providers/HashProvider/models/IHashProvider.ts | <gh_stars>0
export default interface IHashProvider{
generateHash(payload:string):Promise<string>;
compareHash(payload:string,hashed:string):Promise<boolean>;
}
|
marcosbaima/eat-tasty | api/src/modules/customer/infra/typeorm/repositories/CustomerRepository.ts | <gh_stars>0
import { getRepository, Repository } from 'typeorm';
import ICustomerRepository from '@modules/customer/Repositories/ICustomerRepository';
import ICustomerDTO from '@modules/customer/dtos/ICreateCustomerDTO';
import customers from '@modules/customer/infra/typeorm/models/Customer';
import customer from '@mod... |
marcosbaima/eat-tasty | api/src/modules/users/service/UpdateProfileService.ts |
import AppError from '@shared/errors/AppError';
import User from '@modules/users/infra/typeorm/models/Users';
import IUsersRepository from '../Repositories/IUsersRepository';
import { injectable, inject} from 'tsyringe';
import IHashProvider from '@modules/users/providers/HashProvider/models/IHashProvider';
interface ... |
marcosbaima/eat-tasty | api/src/modules/users/Repositories/IUsersRepository.ts | <reponame>marcosbaima/eat-tasty
import User from '../infra/typeorm/models/Users'
import ICreateUserDTO from '../dtos/ICreateUsersDTO'
export default interface IUsersRepository{
findById(id:string): Promise<User | undefined>
findByEmail(email:string): Promise<User | undefined>
find(date:ICreateUserDTO):Promise<Use... |
marcosbaima/eat-tasty | api/src/modules/users/infra/http/routes/profile.routers.ts | <reponame>marcosbaima/eat-tasty
import { Router } from 'express';
import { celebrate, Segments, Joi } from 'celebrate';
import ProfileController from '../controllers/ProfileController';
import ensureAuthticated from '../middlewares/ensureAuthenticate';
const profileRouter = Router()
const profileController = new Pr... |
marcosbaima/eat-tasty | api/src/modules/customer/infra/http/controller/restaurantController.ts | import { Request, Response} from 'express';
import { getRepository } from 'typeorm';
import Restaurants from '@modules/customer/infra/typeorm/models/Restaurant';
import Restaurant from '@modules/customer/service/CreateRestaurantService';
import { container } from 'tsyringe';
export default class restaurantController{
... |
marcosbaima/eat-tasty | api/src/modules/users/Repositories/IUserTokensRepository.ts | import UserToken from '../infra/typeorm/models/UserToken';
export default interface IUserTokensRepository{
generate(user_id:string):Promise<UserToken>;
findByToken(token:string):Promise<UserToken | undefined>;
}
|
nitrictech/node-sdk | src/api/storage/v0/storage.ts | // Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... |
nitrictech/node-sdk | src/faas/v0/start.ts | // Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... |
nitrictech/node-sdk | src/api/queues/v0/queues.ts | <reponame>nitrictech/node-sdk
// Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// U... |
nitrictech/node-sdk | src/faas/v0/handler.ts | <gh_stars>1-10
// Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required ... |
nitrictech/node-sdk | src/api/documents/v0/documents.ts | // Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... |
nitrictech/node-sdk | src/api/documents/v0/collection-group-ref.ts | <gh_stars>1-10
// Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required ... |
nitrictech/node-sdk | src/api/events/v0/events.ts | <reponame>nitrictech/node-sdk
// Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// U... |
nitrictech/node-sdk | src/api/documents/v0/collection-ref.ts | // Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... |
nitrictech/node-sdk | src/types.ts | // Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... |
nitrictech/node-sdk | src/api/documents/v0/query.ts | // Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... |
nitrictech/node-sdk | src/api/documents/v0/query.test.ts | <filename>src/api/documents/v0/query.test.ts
// Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICE... |
nitrictech/node-sdk | src/api/documents/v0/document-snapshot.ts | // Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... |
idahogurl/wikipediaViewer | typescript/index.ts | <reponame>idahogurl/wikipediaViewer<gh_stars>0
// Type definitions for axios 0.9.1
// Project: https://github.com/mzabriskie/axios
// Definitions by: <NAME> <https://github.com/marcelbuesing>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace Axios {
interface IThenable<R> {
... |
Hydrawisk793/kaphein-js-memoization | src/memoize.d.ts | export declare function memoize<
F extends (...args : any[]) => any
>(
func : F,
option? : MemoizationOption<F>
) : F;
export declare interface MemoizationOption<
F extends (...args : any[]) => any
>
{
thisArg? : any;
equalComparer? : (
lhs : any,
rhs : any
) => boolean;
... |
JMDelight/angular-meal-tracker | app/add-food.component.ts | import { Component, EventEmitter} from 'angular2/core';
import { Food } from './food.model';
@Component({
selector: 'add-food',
outputs: ['onSubmit'],
template: `
<div>
<h3>Add New Food</h3>
<label for="name">Add Food</label>
<input placeholder="Name" #newName id="name">
<label for="details">De... |
JMDelight/angular-meal-tracker | app/calorie.pipe.ts | <reponame>JMDelight/angular-meal-tracker<filename>app/calorie.pipe.ts
import {Pipe, PipeTransform} from 'angular2/core';
import {Food} from './food.model';
@Pipe({
name: "calorie",
pure: false
})
export class CaloriePipe implements PipeTransform {
transform(input: Food[], args) {
var desiredCalorieLevel: num... |
JMDelight/angular-meal-tracker | app/food-list.component.ts | <reponame>JMDelight/angular-meal-tracker
import { Component } from 'angular2/core';
import { Food } from './food.model';
import { FoodComponent } from './food.component';
import { AddFoodComponent } from './add-food.component';
import { EditFoodComponent } from './edit-food.component';
import { CaloriePipe } from './ca... |
Syncinus/AX121-Server | node_modules/typewiz-core/dist/compiler-helper.d.ts | import * as ts from 'typescript';
export interface ICompilerOptions {
/**
* If given, all the file paths in the collected type info will be resolved relative to this directory.
*/
rootDir?: string;
/**
* Path to your project's tsconfig file
*/
tsConfig?: string;
tsConfigHost?: ts... |
Syncinus/AX121-Server | node_modules/typewiz-core/dist/configuration-parser.d.ts | import { IApplyTypesOptions } from './apply-types';
import { ICompilerOptions } from './compiler-helper';
import { IInstrumentOptions } from './instrument';
export interface ITypewizConfigFile {
common?: Partial<ICompilerOptions>;
instrument?: Partial<IInstrumentOptions>;
applyTypes?: Partial<IApplyTypesOpt... |
Syncinus/AX121-Server | node_modules/typewiz-node/dist/node-register.d.ts | <reponame>Syncinus/AX121-Server
export interface IRegisterOptions {
typewizConfig?: string;
extensions?: string[];
}
export declare function register(options?: IRegisterOptions): () => void;
|
Syncinus/AX121-Server | node_modules/typewiz-core/dist/replacement.d.ts | <filename>node_modules/typewiz-core/dist/replacement.d.ts<gh_stars>1-10
export declare class Replacement {
readonly start: number;
readonly end: number;
readonly text: string;
readonly priority: number;
static insert(pos: number, text: string, priority?: number): Replacement;
static delete(start... |
Syncinus/AX121-Server | node_modules/typewiz-core/dist/apply-types.d.ts | import * as ts from 'typescript';
import { ICompilerOptions } from './compiler-helper';
import { ICollectedTypeInfo } from './type-collector-snippet';
export interface IApplyTypesOptions extends ICompilerOptions {
/**
* A prefix that will be added in front of each type applied. You can use a javascript comment... |
Syncinus/AX121-Server | node_modules/typewiz-core/dist/instrument.d.ts | <filename>node_modules/typewiz-core/dist/instrument.d.ts
import { ICompilerOptions } from './compiler-helper';
export interface IInstrumentOptions extends ICompilerOptions {
instrumentCallExpressions?: boolean;
instrumentImplicitThis?: boolean;
skipTwizDeclarations?: boolean;
}
export interface IExtraOption... |
Syncinus/AX121-Server | node_modules/typewiz-core/dist/typewiz-error.d.ts | <filename>node_modules/typewiz-core/dist/typewiz-error.d.ts
export declare class TypewizError extends Error {
}
|
Syncinus/AX121-Server | node_modules/typewiz-core/dist/transformer.d.ts | import * as ts from 'typescript';
import { IInstrumentOptions } from './instrument';
export declare function typewizTransformer(options: IInstrumentOptions, program?: ts.Program): (ctx: ts.TransformationContext) => ts.Transformer<ts.SourceFile>;
export declare function transformSourceFile(sourceFile: ts.SourceFile, opt... |
Syncinus/AX121-Server | node_modules/typewiz-core/dist/type-collector-snippet.ts | <reponame>Syncinus/AX121-Server
import { IExtraOptions } from './instrument';
class NestError extends Error {}
export type ISourceLocation = [string, number]; /* filename, offset */
export type ICollectedTypeEntry = [
string /* filename */,
number /* offset */,
Array<[string | undefined, ISourceLocation ... |
Syncinus/AX121-Server | node_modules/typewiz-core/dist/type-collector.d.ts | export declare function getTypeCollectorSnippet(): string;
|
Syncinus/AX121-Server | node_modules/typewiz-core/dist/type-coverage.d.ts | <reponame>Syncinus/AX121-Server
import * as ts from 'typescript';
export declare function typeCoverage(program: ts.Program): {
knownTypes: number;
percentage: number;
totalTypes: number;
};
|
Syncinus/AX121-Server | node_modules/typewiz-node/dist/index.d.ts | <filename>node_modules/typewiz-node/dist/index.d.ts
import * as tsnode from 'ts-node';
import * as typewiz from 'typewiz-core';
export interface IOptions {
typewizConfig?: string;
applyOnExit?: boolean;
tsNode?: tsnode.Options;
}
export declare function getCollectedTypes(): [string, number, [string | undefi... |
Syncinus/AX121-Server | node_modules/typewiz-core/dist/type-collector-snippet.d.ts | import { IExtraOptions } from './instrument';
export declare type ISourceLocation = [string, number];
export declare type ICollectedTypeEntry = [string, number, Array<[string | undefined, ISourceLocation | undefined]>, IExtraOptions];
export declare type ICollectedTypeInfo = ICollectedTypeEntry[];
export declare functi... |
faruh-narzullaev/type-script | examples/config/core.ts | <filename>examples/config/core.ts
// core.ts
module Http {
export interface HttpRequest {
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.