---
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { ConversationInFirestore } from '@collections'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
import { FieldError } from './FieldError'
|
||||
|
||||
@ObjectType()
|
||||
export class CreateConversationResponse {
|
||||
@Field(() => [FieldError], { nullable: true })
|
||||
errors?: FieldError[]
|
||||
|
||||
@Field(() => ConversationInFirestore, { nullable: true })
|
||||
conversation?: ConversationInFirestore
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { FileUpload, GraphQLUpload } from 'graphql-upload'
|
||||
import { Field, InputType } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class EducationItemInput {
|
||||
@Field({ nullable: true })
|
||||
school?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
status?: string
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
startDate?: Date
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
endDate?: Date
|
||||
|
||||
@Field(() => GraphQLUpload, { nullable: true })
|
||||
photo?: Promise<FileUpload>
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { EducationItem } from '@entities'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
import { FieldError } from './FieldError'
|
||||
|
||||
@ObjectType()
|
||||
export class EducationItemResponse {
|
||||
@Field(() => [FieldError], { nullable: true })
|
||||
errors?: FieldError[]
|
||||
|
||||
@Field(() => EducationItem, { nullable: true })
|
||||
educationItem?: EducationItem
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { FileUpload, GraphQLUpload } from 'graphql-upload'
|
||||
import { Field, InputType } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class ExperienceInput {
|
||||
@Field({ nullable: true })
|
||||
title?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
workplace?: string
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
startDate?: Date
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
endDate?: Date
|
||||
|
||||
@Field(() => GraphQLUpload, { nullable: true })
|
||||
photo?: Promise<FileUpload>
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Experience } from '@entities'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
import { FieldError } from './FieldError'
|
||||
|
||||
@ObjectType()
|
||||
export class ExperienceResponse {
|
||||
@Field(() => [FieldError], { nullable: true })
|
||||
errors?: FieldError[]
|
||||
|
||||
@Field(() => Experience, { nullable: true })
|
||||
experience?: Experience
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { ObjectType, Field } from 'type-graphql'
|
||||
|
||||
@ObjectType()
|
||||
export class FieldError {
|
||||
@Field()
|
||||
field: string
|
||||
|
||||
@Field()
|
||||
message: string
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { ObjectType, Field } from 'type-graphql'
|
||||
import { FieldError } from './FieldError'
|
||||
|
||||
@ObjectType()
|
||||
export class ForgotPasswordResponse {
|
||||
@Field(() => [FieldError], { nullable: true })
|
||||
errors?: FieldError[]
|
||||
|
||||
@Field(() => Boolean)
|
||||
success: boolean
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { User } from '@entities'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
|
||||
@ObjectType()
|
||||
export class InboxResponse {
|
||||
@Field(() => String)
|
||||
firestoreCollectionId: string
|
||||
|
||||
@Field(() => User)
|
||||
partner: User
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { Field, Float, InputType } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class Location {
|
||||
@Field(() => Float, { nullable: true })
|
||||
latitude?: number
|
||||
|
||||
@Field(() => Float, { nullable: true })
|
||||
longitude?: number
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { FileUpload, GraphQLUpload } from 'graphql-upload'
|
||||
import { Field, InputType } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class MessageInput {
|
||||
@Field(() => String)
|
||||
type!: 'text' | 'image' | 'video' | 'audio' | 'file'
|
||||
|
||||
@Field(() => GraphQLUpload, { nullable: true })
|
||||
upload?: Promise<FileUpload>
|
||||
|
||||
@Field(() => String, { nullable: true })
|
||||
text?: string
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
import { FileUpload, GraphQLUpload } from 'graphql-upload'
|
||||
import { Field, InputType, Int } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class OfferInputCreate {
|
||||
@Field(() => Int, { nullable: true })
|
||||
pageId?: number
|
||||
|
||||
@Field({ nullable: true })
|
||||
spaceName?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
title?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
workplace?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
address?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
recruiting?: boolean
|
||||
|
||||
@Field({ nullable: true })
|
||||
employmentType?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
salaryRange?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
department?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
requirements?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
benefits?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
description?: string
|
||||
|
||||
@Field(() => GraphQLUpload, { nullable: true })
|
||||
photo?: Promise<FileUpload>
|
||||
}
|
||||
|
||||
@InputType()
|
||||
export class OfferInputUpdate {
|
||||
@Field({ nullable: true })
|
||||
title?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
workplace?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
address?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
recruiting?: boolean
|
||||
|
||||
@Field({ nullable: true })
|
||||
employmentType?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
salaryRange?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
department?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
requirements?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
benefits?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
description?: string
|
||||
|
||||
@Field(() => GraphQLUpload, { nullable: true })
|
||||
photo?: Promise<FileUpload>
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Offer } from '@entities'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
import { FieldError } from './FieldError'
|
||||
|
||||
@ObjectType()
|
||||
export class OfferResponse {
|
||||
@Field(() => [FieldError], { nullable: true })
|
||||
errors?: FieldError[]
|
||||
|
||||
@Field(() => Offer, { nullable: true })
|
||||
offer?: Offer
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { Field, InputType } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class PageInfo {
|
||||
@Field({ nullable: true })
|
||||
fullPageName?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
headline?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
address?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
about?: string
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Page } from '@entities'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
import { FieldError } from './FieldError'
|
||||
|
||||
@ObjectType()
|
||||
export class PageResponse {
|
||||
@Field(() => [FieldError], { nullable: true })
|
||||
errors?: FieldError[]
|
||||
|
||||
@Field(() => Page, { nullable: true })
|
||||
page?: Page
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Comment } from '@entities'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
|
||||
@ObjectType()
|
||||
export class PaginatedComments {
|
||||
@Field(() => [Comment])
|
||||
comments: Comment[]
|
||||
|
||||
@Field(() => Boolean)
|
||||
hasMore: boolean
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Offer } from '@entities'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
|
||||
@ObjectType()
|
||||
export class PaginatedOffers {
|
||||
@Field(() => [Offer])
|
||||
offers: Offer[]
|
||||
|
||||
@Field(() => Boolean)
|
||||
hasMore: boolean
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Post } from '@entities'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
|
||||
@ObjectType()
|
||||
export class PaginatedPosts {
|
||||
@Field(() => [Post])
|
||||
posts: Post[]
|
||||
|
||||
@Field(() => Boolean)
|
||||
hasMore: boolean
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { ObjectType, Field } from 'type-graphql'
|
||||
|
||||
@ObjectType()
|
||||
export class PhotoResponse {
|
||||
@Field(() => String, { nullable: true })
|
||||
key?: string
|
||||
|
||||
@Field(() => String, { nullable: true })
|
||||
url?: string
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Field, InputType, Int } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class PostInputCreate {
|
||||
@Field(() => Int, { nullable: true })
|
||||
pageId?: number
|
||||
|
||||
@Field({ nullable: true })
|
||||
spaceName?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
title?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
text?: string
|
||||
|
||||
@Field(() => [Int], { nullable: true })
|
||||
tags?: number[]
|
||||
}
|
||||
|
||||
@InputType()
|
||||
export class PostInputUpdate {
|
||||
@Field({ nullable: true })
|
||||
title?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
text?: string
|
||||
|
||||
@Field(() => [Int], { nullable: true })
|
||||
tags?: number[]
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Post } from '@entities'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
import { FieldError } from './FieldError'
|
||||
|
||||
@ObjectType()
|
||||
export class PostResponse {
|
||||
@Field(() => [FieldError], { nullable: true })
|
||||
errors?: FieldError[]
|
||||
|
||||
@Field(() => Post, { nullable: true })
|
||||
post?: Post
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { FileUpload, GraphQLUpload } from 'graphql-upload'
|
||||
import { Field, InputType } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class QualificationInput {
|
||||
@Field()
|
||||
name!: string
|
||||
|
||||
@Field()
|
||||
issuingOrganisation!: string
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
issuanceDate?: Date
|
||||
|
||||
@Field()
|
||||
expire: boolean
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
expirationDate?: Date
|
||||
|
||||
@Field({ nullable: true })
|
||||
credentialID?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
credentialURL?: string
|
||||
|
||||
@Field(() => GraphQLUpload, { nullable: true })
|
||||
photo?: Promise<FileUpload>
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Qualification } from '@entities'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
import { FieldError } from './FieldError'
|
||||
|
||||
@ObjectType()
|
||||
export class QualificationResponse {
|
||||
@Field(() => [FieldError], { nullable: true })
|
||||
errors?: FieldError[]
|
||||
|
||||
@Field(() => Qualification, { nullable: true })
|
||||
qualification?: Qualification
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { Field, InputType } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class SpaceInfo {
|
||||
@Field({ nullable: true })
|
||||
fullSpaceName?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
headline?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
rules?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
about?: string
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Space } from '@entities'
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
import { FieldError } from './FieldError'
|
||||
|
||||
@ObjectType()
|
||||
export class SpaceResponse {
|
||||
@Field(() => [FieldError], { nullable: true })
|
||||
errors?: FieldError[]
|
||||
|
||||
@Field(() => Space, { nullable: true })
|
||||
space?: Space
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { Field, ObjectType } from 'type-graphql'
|
||||
|
||||
@ObjectType()
|
||||
export class UploadedFileResponse {
|
||||
@Field()
|
||||
filename!: String
|
||||
|
||||
@Field()
|
||||
mimetype!: String
|
||||
|
||||
@Field()
|
||||
encoding!: String
|
||||
|
||||
@Field()
|
||||
url!: String
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { Field, InputType } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class UserInfo {
|
||||
@Field({ nullable: true })
|
||||
fullName?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
headline?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
address?: string
|
||||
|
||||
@Field({ nullable: true })
|
||||
about?: string
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { User } from '../entities'
|
||||
import { ObjectType, Field } from 'type-graphql'
|
||||
import { FieldError } from './FieldError'
|
||||
|
||||
@ObjectType() // ObjectType is for return values
|
||||
export class UserResponse {
|
||||
@Field(() => [FieldError], { nullable: true })
|
||||
errors?: FieldError[]
|
||||
|
||||
@Field(() => User, { nullable: true })
|
||||
user?: User
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
export * from './FieldError'
|
||||
export * from './UserResponse'
|
||||
export * from './ForgotPasswordResponse'
|
||||
export * from './PaginatedPosts'
|
||||
export * from './PostInput'
|
||||
export * from './PostResponse'
|
||||
export * from './PaginatedComments'
|
||||
export * from './OfferResponse'
|
||||
export * from './OfferInput'
|
||||
export * from './PaginatedOffers'
|
||||
export * from './UploadedFileResponse'
|
||||
export * from './MessageInput'
|
||||
export * from './PhotoResponse'
|
||||
export * from './PageResponse'
|
||||
export * from './SpaceResponse'
|
||||
export * from './UserInfo'
|
||||
export * from './EducationItemResponse'
|
||||
export * from './EducationItemInput'
|
||||
export * from './ExperienceInput'
|
||||
export * from './ExperienceResponse'
|
||||
export * from './QualificationInput'
|
||||
export * from './QualificationResponse'
|
||||
export * from './PageInfo'
|
||||
export * from './SpaceInfo'
|
||||
export * from './InboxResponse'
|
||||
export * from './CreateConversationReponse'
|
||||
export * from './Location'
|
||||
Reference in New Issue
Block a user