Commit d25833cc authored by Neosoulink's avatar Neosoulink
Browse files

feat: add types for user

parent 6a63b443
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ import type {
	GeoLocationInterface,
	GeoLocationCreateInputInterface,
	GeoLocationInputInterface,
	LocationInterface,
} from '../types';

// TODO: Add descriptive comments for types/interfaces
@@ -20,7 +21,7 @@ export interface InviteInterface {
}

export interface InviteByCodeInputInterface {
	location: Location;
	location: LocationInterface;
	inviteCode: ScalarsInterface['String'];
	firstName?: MaybeType<ScalarsInterface['String']>;
	lastName?: MaybeType<ScalarsInterface['String']>;
+16 −21
Original line number Diff line number Diff line
import type { MaybeType, ScalarsInterface } from '../../types/index';
import type { GeoLocationCreateInputInterface } from '../types';

// TODO: Add more comments

/**
 * Minimal user info to create a user.
 */
export interface RegisterUserArgsInterface {
	registerInput: {
		user: {
			lastName: string;
			firstName: string;
			geoLocation: {
				loc: {
					coordinates: [number, number];
					type: string;
				};
				house: string;
				streetAddress: string;
				city: string;
				countryId: number;
			};
			apartment: string;
		};
	};
export interface UserCreateInputInterface {
	email?: MaybeType<ScalarsInterface['String']>;
	firstName?: MaybeType<ScalarsInterface['String']>;
	lastName?: MaybeType<ScalarsInterface['String']>;
	phone?: MaybeType<ScalarsInterface['String']>;
	image?: MaybeType<ScalarsInterface['String']>;
	geoLocation: GeoLocationCreateInputInterface;
	apartment: ScalarsInterface['String'];
}

export interface UserRegisterInputInterface {
	user: UserCreateInputInterface;
	password?: MaybeType<ScalarsInterface['String']>;
}