// Code generated by Prisma (prisma@1.25.7). DO NOT EDIT.
// Please don't change this file manually but run `prisma generate` to update it.
// For more information, please read the docs: https://www.prisma.io/docs/prisma-client/

import { DocumentNode } from "graphql";
import {
  makePrismaClientClass,
  BaseClientOptions,
  Model
} from "prisma-client-lib";
import { typeDefs } from "./prisma-schema";

export type AtLeastOne<T, U = { [K in keyof T]: Pick<T, K> }> = Partial<T> &
  U[keyof U];

export interface Exists {
  request: (where?: RequestWhereInput) => Promise<boolean>;
  user: (where?: UserWhereInput) => Promise<boolean>;
}

export interface Node {}

export type FragmentableArray<T> = Promise<Array<T>> & Fragmentable;

export interface Fragmentable {
  $fragment<T>(fragment: string | DocumentNode): Promise<T>;
}

export interface Prisma {
  $exists: Exists;
  $graphql: <T = any>(
    query: string,
    variables?: { [key: string]: any }
  ) => Promise<T>;

  /**
   * Queries
   */

  request: (where: RequestWhereUniqueInput) => RequestPromise;
  requests: (args?: {
    where?: RequestWhereInput;
    orderBy?: RequestOrderByInput;
    skip?: Int;
    after?: String;
    before?: String;
    first?: Int;
    last?: Int;
  }) => FragmentableArray<Request>;
  requestsConnection: (args?: {
    where?: RequestWhereInput;
    orderBy?: RequestOrderByInput;
    skip?: Int;
    after?: String;
    before?: String;
    first?: Int;
    last?: Int;
  }) => RequestConnectionPromise;
  user: (where: UserWhereUniqueInput) => UserPromise;
  users: (args?: {
    where?: UserWhereInput;
    orderBy?: UserOrderByInput;
    skip?: Int;
    after?: String;
    before?: String;
    first?: Int;
    last?: Int;
  }) => FragmentableArray<User>;
  usersConnection: (args?: {
    where?: UserWhereInput;
    orderBy?: UserOrderByInput;
    skip?: Int;
    after?: String;
    before?: String;
    first?: Int;
    last?: Int;
  }) => UserConnectionPromise;
  node: (args: { id: ID_Output }) => Node;

  /**
   * Mutations
   */

  createRequest: (data: RequestCreateInput) => RequestPromise;
  updateRequest: (args: {
    data: RequestUpdateInput;
    where: RequestWhereUniqueInput;
  }) => RequestPromise;
  updateManyRequests: (args: {
    data: RequestUpdateManyMutationInput;
    where?: RequestWhereInput;
  }) => BatchPayloadPromise;
  upsertRequest: (args: {
    where: RequestWhereUniqueInput;
    create: RequestCreateInput;
    update: RequestUpdateInput;
  }) => RequestPromise;
  deleteRequest: (where: RequestWhereUniqueInput) => RequestPromise;
  deleteManyRequests: (where?: RequestWhereInput) => BatchPayloadPromise;
  createUser: (data: UserCreateInput) => UserPromise;
  updateUser: (args: {
    data: UserUpdateInput;
    where: UserWhereUniqueInput;
  }) => UserPromise;
  updateManyUsers: (args: {
    data: UserUpdateManyMutationInput;
    where?: UserWhereInput;
  }) => BatchPayloadPromise;
  upsertUser: (args: {
    where: UserWhereUniqueInput;
    create: UserCreateInput;
    update: UserUpdateInput;
  }) => UserPromise;
  deleteUser: (where: UserWhereUniqueInput) => UserPromise;
  deleteManyUsers: (where?: UserWhereInput) => BatchPayloadPromise;

  /**
   * Subscriptions
   */

  $subscribe: Subscription;
}

export interface Subscription {
  request: (
    where?: RequestSubscriptionWhereInput
  ) => RequestSubscriptionPayloadSubscription;
  user: (
    where?: UserSubscriptionWhereInput
  ) => UserSubscriptionPayloadSubscription;
}

export interface ClientConstructor<T> {
  new (options?: BaseClientOptions): T;
}

/**
 * Types
 */

export type ROLE = "USER" | "ADMIN";

export type STATUS = "PENDING" | "APPROVED" | "DISAPPROVED" | "RESOLVED";

export type RequestOrderByInput =
  | "id_ASC"
  | "id_DESC"
  | "createdAt_ASC"
  | "createdAt_DESC"
  | "updatedAt_ASC"
  | "updatedAt_DESC"
  | "title_ASC"
  | "title_DESC"
  | "device_ASC"
  | "device_DESC"
  | "description_ASC"
  | "description_DESC"
  | "status_ASC"
  | "status_DESC";

export type UserOrderByInput =
  | "id_ASC"
  | "id_DESC"
  | "createdAt_ASC"
  | "createdAt_DESC"
  | "updatedAt_ASC"
  | "updatedAt_DESC"
  | "firstName_ASC"
  | "firstName_DESC"
  | "lastName_ASC"
  | "lastName_DESC"
  | "email_ASC"
  | "email_DESC"
  | "username_ASC"
  | "username_DESC"
  | "password_ASC"
  | "password_DESC"
  | "role_ASC"
  | "role_DESC";

export type MutationType = "CREATED" | "UPDATED" | "DELETED";

export interface RequestUpdateInput {
  title?: String;
  device?: String;
  description?: String;
  status?: STATUS;
  owner?: UserUpdateOneRequiredWithoutRequestsInput;
}

export type RequestWhereUniqueInput = AtLeastOne<{
  id: ID_Input;
}>;

export interface RequestUpdateManyWithoutOwnerInput {
  create?: RequestCreateWithoutOwnerInput[] | RequestCreateWithoutOwnerInput;
  delete?: RequestWhereUniqueInput[] | RequestWhereUniqueInput;
  connect?: RequestWhereUniqueInput[] | RequestWhereUniqueInput;
  disconnect?: RequestWhereUniqueInput[] | RequestWhereUniqueInput;
  update?:
    | RequestUpdateWithWhereUniqueWithoutOwnerInput[]
    | RequestUpdateWithWhereUniqueWithoutOwnerInput;
  upsert?:
    | RequestUpsertWithWhereUniqueWithoutOwnerInput[]
    | RequestUpsertWithWhereUniqueWithoutOwnerInput;
  deleteMany?: RequestScalarWhereInput[] | RequestScalarWhereInput;
  updateMany?:
    | RequestUpdateManyWithWhereNestedInput[]
    | RequestUpdateManyWithWhereNestedInput;
}

export interface UserCreateInput {
  firstName?: String;
  lastName?: String;
  email: String;
  username: String;
  password: String;
  role?: ROLE;
  requests?: RequestCreateManyWithoutOwnerInput;
}

export interface UserUpdateInput {
  firstName?: String;
  lastName?: String;
  email?: String;
  username?: String;
  password?: String;
  role?: ROLE;
  requests?: RequestUpdateManyWithoutOwnerInput;
}

export interface UserUpsertWithoutRequestsInput {
  update: UserUpdateWithoutRequestsDataInput;
  create: UserCreateWithoutRequestsInput;
}

export interface UserSubscriptionWhereInput {
  mutation_in?: MutationType[] | MutationType;
  updatedFields_contains?: String;
  updatedFields_contains_every?: String[] | String;
  updatedFields_contains_some?: String[] | String;
  node?: UserWhereInput;
  AND?: UserSubscriptionWhereInput[] | UserSubscriptionWhereInput;
  OR?: UserSubscriptionWhereInput[] | UserSubscriptionWhereInput;
  NOT?: UserSubscriptionWhereInput[] | UserSubscriptionWhereInput;
}

export interface UserUpdateManyMutationInput {
  firstName?: String;
  lastName?: String;
  email?: String;
  username?: String;
  password?: String;
  role?: ROLE;
}

export interface RequestCreateInput {
  title: String;
  device: String;
  description: String;
  status?: STATUS;
  owner: UserCreateOneWithoutRequestsInput;
}

export interface RequestUpdateManyWithWhereNestedInput {
  where: RequestScalarWhereInput;
  data: RequestUpdateManyDataInput;
}

export interface UserCreateOneWithoutRequestsInput {
  create?: UserCreateWithoutRequestsInput;
  connect?: UserWhereUniqueInput;
}

export interface RequestUpsertWithWhereUniqueWithoutOwnerInput {
  where: RequestWhereUniqueInput;
  update: RequestUpdateWithoutOwnerDataInput;
  create: RequestCreateWithoutOwnerInput;
}

export interface UserCreateWithoutRequestsInput {
  firstName?: String;
  lastName?: String;
  email: String;
  username: String;
  password: String;
  role?: ROLE;
}

export interface RequestUpdateWithoutOwnerDataInput {
  title?: String;
  device?: String;
  description?: String;
  status?: STATUS;
}

export interface RequestCreateWithoutOwnerInput {
  title: String;
  device: String;
  description: String;
  status?: STATUS;
}

export interface UserWhereInput {
  id?: ID_Input;
  id_not?: ID_Input;
  id_in?: ID_Input[] | ID_Input;
  id_not_in?: ID_Input[] | ID_Input;
  id_lt?: ID_Input;
  id_lte?: ID_Input;
  id_gt?: ID_Input;
  id_gte?: ID_Input;
  id_contains?: ID_Input;
  id_not_contains?: ID_Input;
  id_starts_with?: ID_Input;
  id_not_starts_with?: ID_Input;
  id_ends_with?: ID_Input;
  id_not_ends_with?: ID_Input;
  createdAt?: DateTimeInput;
  createdAt_not?: DateTimeInput;
  createdAt_in?: DateTimeInput[] | DateTimeInput;
  createdAt_not_in?: DateTimeInput[] | DateTimeInput;
  createdAt_lt?: DateTimeInput;
  createdAt_lte?: DateTimeInput;
  createdAt_gt?: DateTimeInput;
  createdAt_gte?: DateTimeInput;
  updatedAt?: DateTimeInput;
  updatedAt_not?: DateTimeInput;
  updatedAt_in?: DateTimeInput[] | DateTimeInput;
  updatedAt_not_in?: DateTimeInput[] | DateTimeInput;
  updatedAt_lt?: DateTimeInput;
  updatedAt_lte?: DateTimeInput;
  updatedAt_gt?: DateTimeInput;
  updatedAt_gte?: DateTimeInput;
  firstName?: String;
  firstName_not?: String;
  firstName_in?: String[] | String;
  firstName_not_in?: String[] | String;
  firstName_lt?: String;
  firstName_lte?: String;
  firstName_gt?: String;
  firstName_gte?: String;
  firstName_contains?: String;
  firstName_not_contains?: String;
  firstName_starts_with?: String;
  firstName_not_starts_with?: String;
  firstName_ends_with?: String;
  firstName_not_ends_with?: String;
  lastName?: String;
  lastName_not?: String;
  lastName_in?: String[] | String;
  lastName_not_in?: String[] | String;
  lastName_lt?: String;
  lastName_lte?: String;
  lastName_gt?: String;
  lastName_gte?: String;
  lastName_contains?: String;
  lastName_not_contains?: String;
  lastName_starts_with?: String;
  lastName_not_starts_with?: String;
  lastName_ends_with?: String;
  lastName_not_ends_with?: String;
  email?: String;
  email_not?: String;
  email_in?: String[] | String;
  email_not_in?: String[] | String;
  email_lt?: String;
  email_lte?: String;
  email_gt?: String;
  email_gte?: String;
  email_contains?: String;
  email_not_contains?: String;
  email_starts_with?: String;
  email_not_starts_with?: String;
  email_ends_with?: String;
  email_not_ends_with?: String;
  username?: String;
  username_not?: String;
  username_in?: String[] | String;
  username_not_in?: String[] | String;
  username_lt?: String;
  username_lte?: String;
  username_gt?: String;
  username_gte?: String;
  username_contains?: String;
  username_not_contains?: String;
  username_starts_with?: String;
  username_not_starts_with?: String;
  username_ends_with?: String;
  username_not_ends_with?: String;
  password?: String;
  password_not?: String;
  password_in?: String[] | String;
  password_not_in?: String[] | String;
  password_lt?: String;
  password_lte?: String;
  password_gt?: String;
  password_gte?: String;
  password_contains?: String;
  password_not_contains?: String;
  password_starts_with?: String;
  password_not_starts_with?: String;
  password_ends_with?: String;
  password_not_ends_with?: String;
  role?: ROLE;
  role_not?: ROLE;
  role_in?: ROLE[] | ROLE;
  role_not_in?: ROLE[] | ROLE;
  requests_every?: RequestWhereInput;
  requests_some?: RequestWhereInput;
  requests_none?: RequestWhereInput;
  AND?: UserWhereInput[] | UserWhereInput;
  OR?: UserWhereInput[] | UserWhereInput;
  NOT?: UserWhereInput[] | UserWhereInput;
}

export interface UserUpdateOneRequiredWithoutRequestsInput {
  create?: UserCreateWithoutRequestsInput;
  update?: UserUpdateWithoutRequestsDataInput;
  upsert?: UserUpsertWithoutRequestsInput;
  connect?: UserWhereUniqueInput;
}

export interface RequestUpdateManyDataInput {
  title?: String;
  device?: String;
  description?: String;
  status?: STATUS;
}

export interface RequestCreateManyWithoutOwnerInput {
  create?: RequestCreateWithoutOwnerInput[] | RequestCreateWithoutOwnerInput;
  connect?: RequestWhereUniqueInput[] | RequestWhereUniqueInput;
}

export interface RequestUpdateManyMutationInput {
  title?: String;
  device?: String;
  description?: String;
  status?: STATUS;
}

export interface RequestWhereInput {
  id?: ID_Input;
  id_not?: ID_Input;
  id_in?: ID_Input[] | ID_Input;
  id_not_in?: ID_Input[] | ID_Input;
  id_lt?: ID_Input;
  id_lte?: ID_Input;
  id_gt?: ID_Input;
  id_gte?: ID_Input;
  id_contains?: ID_Input;
  id_not_contains?: ID_Input;
  id_starts_with?: ID_Input;
  id_not_starts_with?: ID_Input;
  id_ends_with?: ID_Input;
  id_not_ends_with?: ID_Input;
  createdAt?: DateTimeInput;
  createdAt_not?: DateTimeInput;
  createdAt_in?: DateTimeInput[] | DateTimeInput;
  createdAt_not_in?: DateTimeInput[] | DateTimeInput;
  createdAt_lt?: DateTimeInput;
  createdAt_lte?: DateTimeInput;
  createdAt_gt?: DateTimeInput;
  createdAt_gte?: DateTimeInput;
  updatedAt?: DateTimeInput;
  updatedAt_not?: DateTimeInput;
  updatedAt_in?: DateTimeInput[] | DateTimeInput;
  updatedAt_not_in?: DateTimeInput[] | DateTimeInput;
  updatedAt_lt?: DateTimeInput;
  updatedAt_lte?: DateTimeInput;
  updatedAt_gt?: DateTimeInput;
  updatedAt_gte?: DateTimeInput;
  title?: String;
  title_not?: String;
  title_in?: String[] | String;
  title_not_in?: String[] | String;
  title_lt?: String;
  title_lte?: String;
  title_gt?: String;
  title_gte?: String;
  title_contains?: String;
  title_not_contains?: String;
  title_starts_with?: String;
  title_not_starts_with?: String;
  title_ends_with?: String;
  title_not_ends_with?: String;
  device?: String;
  device_not?: String;
  device_in?: String[] | String;
  device_not_in?: String[] | String;
  device_lt?: String;
  device_lte?: String;
  device_gt?: String;
  device_gte?: String;
  device_contains?: String;
  device_not_contains?: String;
  device_starts_with?: String;
  device_not_starts_with?: String;
  device_ends_with?: String;
  device_not_ends_with?: String;
  description?: String;
  description_not?: String;
  description_in?: String[] | String;
  description_not_in?: String[] | String;
  description_lt?: String;
  description_lte?: String;
  description_gt?: String;
  description_gte?: String;
  description_contains?: String;
  description_not_contains?: String;
  description_starts_with?: String;
  description_not_starts_with?: String;
  description_ends_with?: String;
  description_not_ends_with?: String;
  status?: STATUS;
  status_not?: STATUS;
  status_in?: STATUS[] | STATUS;
  status_not_in?: STATUS[] | STATUS;
  owner?: UserWhereInput;
  AND?: RequestWhereInput[] | RequestWhereInput;
  OR?: RequestWhereInput[] | RequestWhereInput;
  NOT?: RequestWhereInput[] | RequestWhereInput;
}

export interface UserUpdateWithoutRequestsDataInput {
  firstName?: String;
  lastName?: String;
  email?: String;
  username?: String;
  password?: String;
  role?: ROLE;
}

export interface RequestScalarWhereInput {
  id?: ID_Input;
  id_not?: ID_Input;
  id_in?: ID_Input[] | ID_Input;
  id_not_in?: ID_Input[] | ID_Input;
  id_lt?: ID_Input;
  id_lte?: ID_Input;
  id_gt?: ID_Input;
  id_gte?: ID_Input;
  id_contains?: ID_Input;
  id_not_contains?: ID_Input;
  id_starts_with?: ID_Input;
  id_not_starts_with?: ID_Input;
  id_ends_with?: ID_Input;
  id_not_ends_with?: ID_Input;
  createdAt?: DateTimeInput;
  createdAt_not?: DateTimeInput;
  createdAt_in?: DateTimeInput[] | DateTimeInput;
  createdAt_not_in?: DateTimeInput[] | DateTimeInput;
  createdAt_lt?: DateTimeInput;
  createdAt_lte?: DateTimeInput;
  createdAt_gt?: DateTimeInput;
  createdAt_gte?: DateTimeInput;
  updatedAt?: DateTimeInput;
  updatedAt_not?: DateTimeInput;
  updatedAt_in?: DateTimeInput[] | DateTimeInput;
  updatedAt_not_in?: DateTimeInput[] | DateTimeInput;
  updatedAt_lt?: DateTimeInput;
  updatedAt_lte?: DateTimeInput;
  updatedAt_gt?: DateTimeInput;
  updatedAt_gte?: DateTimeInput;
  title?: String;
  title_not?: String;
  title_in?: String[] | String;
  title_not_in?: String[] | String;
  title_lt?: String;
  title_lte?: String;
  title_gt?: String;
  title_gte?: String;
  title_contains?: String;
  title_not_contains?: String;
  title_starts_with?: String;
  title_not_starts_with?: String;
  title_ends_with?: String;
  title_not_ends_with?: String;
  device?: String;
  device_not?: String;
  device_in?: String[] | String;
  device_not_in?: String[] | String;
  device_lt?: String;
  device_lte?: String;
  device_gt?: String;
  device_gte?: String;
  device_contains?: String;
  device_not_contains?: String;
  device_starts_with?: String;
  device_not_starts_with?: String;
  device_ends_with?: String;
  device_not_ends_with?: String;
  description?: String;
  description_not?: String;
  description_in?: String[] | String;
  description_not_in?: String[] | String;
  description_lt?: String;
  description_lte?: String;
  description_gt?: String;
  description_gte?: String;
  description_contains?: String;
  description_not_contains?: String;
  description_starts_with?: String;
  description_not_starts_with?: String;
  description_ends_with?: String;
  description_not_ends_with?: String;
  status?: STATUS;
  status_not?: STATUS;
  status_in?: STATUS[] | STATUS;
  status_not_in?: STATUS[] | STATUS;
  AND?: RequestScalarWhereInput[] | RequestScalarWhereInput;
  OR?: RequestScalarWhereInput[] | RequestScalarWhereInput;
  NOT?: RequestScalarWhereInput[] | RequestScalarWhereInput;
}

export interface RequestSubscriptionWhereInput {
  mutation_in?: MutationType[] | MutationType;
  updatedFields_contains?: String;
  updatedFields_contains_every?: String[] | String;
  updatedFields_contains_some?: String[] | String;
  node?: RequestWhereInput;
  AND?: RequestSubscriptionWhereInput[] | RequestSubscriptionWhereInput;
  OR?: RequestSubscriptionWhereInput[] | RequestSubscriptionWhereInput;
  NOT?: RequestSubscriptionWhereInput[] | RequestSubscriptionWhereInput;
}

export interface RequestUpdateWithWhereUniqueWithoutOwnerInput {
  where: RequestWhereUniqueInput;
  data: RequestUpdateWithoutOwnerDataInput;
}

export type UserWhereUniqueInput = AtLeastOne<{
  id: ID_Input;
  email?: String;
  username?: String;
}>;

export interface NodeNode {
  id: ID_Output;
}

export interface UserPreviousValues {
  id: ID_Output;
  createdAt: DateTimeOutput;
  updatedAt: DateTimeOutput;
  firstName?: String;
  lastName?: String;
  email: String;
  username: String;
  password: String;
  role: ROLE;
}

export interface UserPreviousValuesPromise
  extends Promise<UserPreviousValues>,
    Fragmentable {
  id: () => Promise<ID_Output>;
  createdAt: () => Promise<DateTimeOutput>;
  updatedAt: () => Promise<DateTimeOutput>;
  firstName: () => Promise<String>;
  lastName: () => Promise<String>;
  email: () => Promise<String>;
  username: () => Promise<String>;
  password: () => Promise<String>;
  role: () => Promise<ROLE>;
}

export interface UserPreviousValuesSubscription
  extends Promise<AsyncIterator<UserPreviousValues>>,
    Fragmentable {
  id: () => Promise<AsyncIterator<ID_Output>>;
  createdAt: () => Promise<AsyncIterator<DateTimeOutput>>;
  updatedAt: () => Promise<AsyncIterator<DateTimeOutput>>;
  firstName: () => Promise<AsyncIterator<String>>;
  lastName: () => Promise<AsyncIterator<String>>;
  email: () => Promise<AsyncIterator<String>>;
  username: () => Promise<AsyncIterator<String>>;
  password: () => Promise<AsyncIterator<String>>;
  role: () => Promise<AsyncIterator<ROLE>>;
}

export interface AggregateRequest {
  count: Int;
}

export interface AggregateRequestPromise
  extends Promise<AggregateRequest>,
    Fragmentable {
  count: () => Promise<Int>;
}

export interface AggregateRequestSubscription
  extends Promise<AsyncIterator<AggregateRequest>>,
    Fragmentable {
  count: () => Promise<AsyncIterator<Int>>;
}

export interface Request {
  id: ID_Output;
  createdAt: DateTimeOutput;
  updatedAt: DateTimeOutput;
  title: String;
  device: String;
  description: String;
  status: STATUS;
}

export interface RequestPromise extends Promise<Request>, Fragmentable {
  id: () => Promise<ID_Output>;
  createdAt: () => Promise<DateTimeOutput>;
  updatedAt: () => Promise<DateTimeOutput>;
  title: () => Promise<String>;
  device: () => Promise<String>;
  description: () => Promise<String>;
  status: () => Promise<STATUS>;
  owner: <T = UserPromise>() => T;
}

export interface RequestSubscription
  extends Promise<AsyncIterator<Request>>,
    Fragmentable {
  id: () => Promise<AsyncIterator<ID_Output>>;
  createdAt: () => Promise<AsyncIterator<DateTimeOutput>>;
  updatedAt: () => Promise<AsyncIterator<DateTimeOutput>>;
  title: () => Promise<AsyncIterator<String>>;
  device: () => Promise<AsyncIterator<String>>;
  description: () => Promise<AsyncIterator<String>>;
  status: () => Promise<AsyncIterator<STATUS>>;
  owner: <T = UserSubscription>() => T;
}

export interface RequestEdge {
  node: Request;
  cursor: String;
}

export interface RequestEdgePromise extends Promise<RequestEdge>, Fragmentable {
  node: <T = RequestPromise>() => T;
  cursor: () => Promise<String>;
}

export interface RequestEdgeSubscription
  extends Promise<AsyncIterator<RequestEdge>>,
    Fragmentable {
  node: <T = RequestSubscription>() => T;
  cursor: () => Promise<AsyncIterator<String>>;
}

export interface User {
  id: ID_Output;
  createdAt: DateTimeOutput;
  updatedAt: DateTimeOutput;
  firstName?: String;
  lastName?: String;
  email: String;
  username: String;
  password: String;
  role: ROLE;
}

export interface UserPromise extends Promise<User>, Fragmentable {
  id: () => Promise<ID_Output>;
  createdAt: () => Promise<DateTimeOutput>;
  updatedAt: () => Promise<DateTimeOutput>;
  firstName: () => Promise<String>;
  lastName: () => Promise<String>;
  email: () => Promise<String>;
  username: () => Promise<String>;
  password: () => Promise<String>;
  role: () => Promise<ROLE>;
  requests: <T = FragmentableArray<Request>>(args?: {
    where?: RequestWhereInput;
    orderBy?: RequestOrderByInput;
    skip?: Int;
    after?: String;
    before?: String;
    first?: Int;
    last?: Int;
  }) => T;
}

export interface UserSubscription
  extends Promise<AsyncIterator<User>>,
    Fragmentable {
  id: () => Promise<AsyncIterator<ID_Output>>;
  createdAt: () => Promise<AsyncIterator<DateTimeOutput>>;
  updatedAt: () => Promise<AsyncIterator<DateTimeOutput>>;
  firstName: () => Promise<AsyncIterator<String>>;
  lastName: () => Promise<AsyncIterator<String>>;
  email: () => Promise<AsyncIterator<String>>;
  username: () => Promise<AsyncIterator<String>>;
  password: () => Promise<AsyncIterator<String>>;
  role: () => Promise<AsyncIterator<ROLE>>;
  requests: <T = Promise<AsyncIterator<RequestSubscription>>>(args?: {
    where?: RequestWhereInput;
    orderBy?: RequestOrderByInput;
    skip?: Int;
    after?: String;
    before?: String;
    first?: Int;
    last?: Int;
  }) => T;
}

export interface AggregateUser {
  count: Int;
}

export interface AggregateUserPromise
  extends Promise<AggregateUser>,
    Fragmentable {
  count: () => Promise<Int>;
}

export interface AggregateUserSubscription
  extends Promise<AsyncIterator<AggregateUser>>,
    Fragmentable {
  count: () => Promise<AsyncIterator<Int>>;
}

export interface RequestSubscriptionPayload {
  mutation: MutationType;
  node: Request;
  updatedFields: String[];
  previousValues: RequestPreviousValues;
}

export interface RequestSubscriptionPayloadPromise
  extends Promise<RequestSubscriptionPayload>,
    Fragmentable {
  mutation: () => Promise<MutationType>;
  node: <T = RequestPromise>() => T;
  updatedFields: () => Promise<String[]>;
  previousValues: <T = RequestPreviousValuesPromise>() => T;
}

export interface RequestSubscriptionPayloadSubscription
  extends Promise<AsyncIterator<RequestSubscriptionPayload>>,
    Fragmentable {
  mutation: () => Promise<AsyncIterator<MutationType>>;
  node: <T = RequestSubscription>() => T;
  updatedFields: () => Promise<AsyncIterator<String[]>>;
  previousValues: <T = RequestPreviousValuesSubscription>() => T;
}

export interface RequestConnection {
  pageInfo: PageInfo;
  edges: RequestEdge[];
}

export interface RequestConnectionPromise
  extends Promise<RequestConnection>,
    Fragmentable {
  pageInfo: <T = PageInfoPromise>() => T;
  edges: <T = FragmentableArray<RequestEdge>>() => T;
  aggregate: <T = AggregateRequestPromise>() => T;
}

export interface RequestConnectionSubscription
  extends Promise<AsyncIterator<RequestConnection>>,
    Fragmentable {
  pageInfo: <T = PageInfoSubscription>() => T;
  edges: <T = Promise<AsyncIterator<RequestEdgeSubscription>>>() => T;
  aggregate: <T = AggregateRequestSubscription>() => T;
}

export interface PageInfo {
  hasNextPage: Boolean;
  hasPreviousPage: Boolean;
  startCursor?: String;
  endCursor?: String;
}

export interface PageInfoPromise extends Promise<PageInfo>, Fragmentable {
  hasNextPage: () => Promise<Boolean>;
  hasPreviousPage: () => Promise<Boolean>;
  startCursor: () => Promise<String>;
  endCursor: () => Promise<String>;
}

export interface PageInfoSubscription
  extends Promise<AsyncIterator<PageInfo>>,
    Fragmentable {
  hasNextPage: () => Promise<AsyncIterator<Boolean>>;
  hasPreviousPage: () => Promise<AsyncIterator<Boolean>>;
  startCursor: () => Promise<AsyncIterator<String>>;
  endCursor: () => Promise<AsyncIterator<String>>;
}

export interface BatchPayload {
  count: Long;
}

export interface BatchPayloadPromise
  extends Promise<BatchPayload>,
    Fragmentable {
  count: () => Promise<Long>;
}

export interface BatchPayloadSubscription
  extends Promise<AsyncIterator<BatchPayload>>,
    Fragmentable {
  count: () => Promise<AsyncIterator<Long>>;
}

export interface UserEdge {
  node: User;
  cursor: String;
}

export interface UserEdgePromise extends Promise<UserEdge>, Fragmentable {
  node: <T = UserPromise>() => T;
  cursor: () => Promise<String>;
}

export interface UserEdgeSubscription
  extends Promise<AsyncIterator<UserEdge>>,
    Fragmentable {
  node: <T = UserSubscription>() => T;
  cursor: () => Promise<AsyncIterator<String>>;
}

export interface UserSubscriptionPayload {
  mutation: MutationType;
  node: User;
  updatedFields: String[];
  previousValues: UserPreviousValues;
}

export interface UserSubscriptionPayloadPromise
  extends Promise<UserSubscriptionPayload>,
    Fragmentable {
  mutation: () => Promise<MutationType>;
  node: <T = UserPromise>() => T;
  updatedFields: () => Promise<String[]>;
  previousValues: <T = UserPreviousValuesPromise>() => T;
}

export interface UserSubscriptionPayloadSubscription
  extends Promise<AsyncIterator<UserSubscriptionPayload>>,
    Fragmentable {
  mutation: () => Promise<AsyncIterator<MutationType>>;
  node: <T = UserSubscription>() => T;
  updatedFields: () => Promise<AsyncIterator<String[]>>;
  previousValues: <T = UserPreviousValuesSubscription>() => T;
}

export interface RequestPreviousValues {
  id: ID_Output;
  createdAt: DateTimeOutput;
  updatedAt: DateTimeOutput;
  title: String;
  device: String;
  description: String;
  status: STATUS;
}

export interface RequestPreviousValuesPromise
  extends Promise<RequestPreviousValues>,
    Fragmentable {
  id: () => Promise<ID_Output>;
  createdAt: () => Promise<DateTimeOutput>;
  updatedAt: () => Promise<DateTimeOutput>;
  title: () => Promise<String>;
  device: () => Promise<String>;
  description: () => Promise<String>;
  status: () => Promise<STATUS>;
}

export interface RequestPreviousValuesSubscription
  extends Promise<AsyncIterator<RequestPreviousValues>>,
    Fragmentable {
  id: () => Promise<AsyncIterator<ID_Output>>;
  createdAt: () => Promise<AsyncIterator<DateTimeOutput>>;
  updatedAt: () => Promise<AsyncIterator<DateTimeOutput>>;
  title: () => Promise<AsyncIterator<String>>;
  device: () => Promise<AsyncIterator<String>>;
  description: () => Promise<AsyncIterator<String>>;
  status: () => Promise<AsyncIterator<STATUS>>;
}

export interface UserConnection {
  pageInfo: PageInfo;
  edges: UserEdge[];
}

export interface UserConnectionPromise
  extends Promise<UserConnection>,
    Fragmentable {
  pageInfo: <T = PageInfoPromise>() => T;
  edges: <T = FragmentableArray<UserEdge>>() => T;
  aggregate: <T = AggregateUserPromise>() => T;
}

export interface UserConnectionSubscription
  extends Promise<AsyncIterator<UserConnection>>,
    Fragmentable {
  pageInfo: <T = PageInfoSubscription>() => T;
  edges: <T = Promise<AsyncIterator<UserEdgeSubscription>>>() => T;
  aggregate: <T = AggregateUserSubscription>() => T;
}

/*
The `Boolean` scalar type represents `true` or `false`.
*/
export type Boolean = boolean;

export type Long = string;

/*
The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.
*/
export type ID_Input = string | number;
export type ID_Output = string;

/*
The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
*/
export type String = string;

/*
DateTime scalar input type, allowing Date
*/
export type DateTimeInput = Date | string;

/*
DateTime scalar output type, which is always a string
*/
export type DateTimeOutput = string;

/*
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. 
*/
export type Int = number;

/**
 * Model Metadata
 */

export const models: Model[] = [
  {
    name: "ROLE",
    embedded: false
  },
  {
    name: "Request",
    embedded: false
  },
  {
    name: "STATUS",
    embedded: false
  },
  {
    name: "User",
    embedded: false
  }
];

/**
 * Type Defs
 */

export const Prisma = makePrismaClientClass<ClientConstructor<Prisma>>({
  typeDefs,
  models,
  endpoint: `${process.env["PRISMA_ENDPOINT"]}`
});
export const prisma = new Prisma();
