import { Field, InputType, ObjectType } from 'type-graphql'; import { Click } from '../../entities'; @InputType({ description: 'Input for the addClick mutation.', }) export class AddClickInput { @Field(() => String, { nullable: true, description: 'Identifies which url was clicked.', }) url?: string; @Field(() => String, { nullable: true, description: 'Identifies which page to attribute the click to.', }) pageFirebaseId?: string; @Field(() => String, { nullable: true, description: 'Identifies which page the referral to the page that was clicked.', }) refPageFirebaseId?: string; @Field(() => String, { nullable: true, description: 'Identifies which product groups the page that was clicked.', }) productFirebaseId?: string; @Field(() => String, { nullable: true, description: 'Short name for which retailer this click belongs to.', }) retailer?: string; } @ObjectType({ description: 'Click response', }) export class AddClickResponse { @Field(() => Click, { description: 'The click that was added.' }) click!: Click; @Field(() => Boolean, { nullable: false, description: 'Whether or not the click was added.', }) success!: boolean; }