args types

This commit is contained in:
Ulf Gebhardt 2021-10-01 21:58:58 +02:00
parent 0449beb19b
commit ca3f930c5e
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
8 changed files with 111 additions and 1 deletions

View File

@ -0,0 +1,13 @@
import { ArgsType, Field } from 'type-graphql'
@ArgsType()
export default class ChangePasswordArgs {
@Field(() => Number)
sessionId: number
@Field(() => String)
email: string
@Field(() => String)
password: string
}

View File

@ -0,0 +1,10 @@
import { ArgsType, Field } from 'type-graphql'
@ArgsType()
export default class CheckUsernameArgs {
@Field(() => String)
username: string
@Field(() => Number, { nullable: true })
groupId?: number
}

View File

@ -0,0 +1,19 @@
import { ArgsType, Field } from 'type-graphql'
@ArgsType()
export default class CreateUserArgs {
@Field(() => String)
email: string
@Field(() => String)
firstName: string
@Field(() => String)
lastName: string
@Field(() => String)
password: string
@Field(() => String)
language: string
}

View File

@ -0,0 +1,14 @@
import { ArgsType, Field, Int } from 'type-graphql'
import { Order } from '../enum/Order'
@ArgsType()
export default class Paginated {
@Field(() => Int, { nullable: true })
currentPage?: number
@Field(() => Int, { nullable: true })
pageSize?: number
@Field(() => Order, { nullable: true })
order?: Order
}

View File

@ -1,7 +1,7 @@
import { ArgsType, Field } from 'type-graphql'
@ArgsType()
export class SubscribeNewsletterArguments {
export default class SubscribeNewsletterArgs {
@Field(() => String)
email: string

View File

@ -0,0 +1,13 @@
import { ArgsType, Field } from 'type-graphql'
@ArgsType()
export default class TransactionSendArgs {
@Field(() => String)
email: string
@Field(() => Number)
amount: number
@Field(() => String)
memo: string
}

View File

@ -0,0 +1,10 @@
import { ArgsType, Field } from 'type-graphql'
@ArgsType()
export default class UnsecureLoginArgs {
@Field(() => String)
email: string
@Field(() => String)
password: string
}

View File

@ -0,0 +1,31 @@
import { ArgsType, Field } from 'type-graphql'
@ArgsType()
export default class UpdateUserInfosArgs {
@Field(() => String)
email!: string
@Field({ nullable: true })
firstName?: string
@Field({ nullable: true })
lastName?: string
@Field({ nullable: true })
description?: string
@Field({ nullable: true })
username?: string
@Field({ nullable: true })
language?: string
@Field({ nullable: true })
publisherId?: number
@Field({ nullable: true })
password?: string
@Field({ nullable: true })
passwordNew?: string
}