import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
  ID: { input: string; output: string; }
  String: { input: string; output: string; }
  Boolean: { input: boolean; output: boolean; }
  Int: { input: number; output: number; }
  Float: { input: number; output: number; }
  Date: { input: any; output: any; }
  DateTime: { input: string; output: string; }
  Decimal: { input: any; output: any; }
  JSONString: { input: any; output: any; }
};

export type CreateOffer = {
  __typename?: 'CreateOffer';
  message?: Maybe<Scalars['String']['output']>;
  offerUuid?: Maybe<Scalars['String']['output']>;
  success?: Maybe<Scalars['Boolean']['output']>;
  workflowId?: Maybe<Scalars['String']['output']>;
};

export type CreateRequest = {
  __typename?: 'CreateRequest';
  request?: Maybe<RequestType>;
};

export type DeleteOffer = {
  __typename?: 'DeleteOffer';
  success?: Maybe<Scalars['Boolean']['output']>;
};

export type OfferInput = {
  categoryName?: InputMaybe<Scalars['String']['input']>;
  currency?: InputMaybe<Scalars['String']['input']>;
  description?: InputMaybe<Scalars['String']['input']>;
  locationCountry?: InputMaybe<Scalars['String']['input']>;
  locationCountryCode?: InputMaybe<Scalars['String']['input']>;
  locationLatitude?: InputMaybe<Scalars['Float']['input']>;
  locationLongitude?: InputMaybe<Scalars['Float']['input']>;
  locationName?: InputMaybe<Scalars['String']['input']>;
  locationUuid?: InputMaybe<Scalars['String']['input']>;
  pricePerUnit?: InputMaybe<Scalars['Decimal']['input']>;
  productName: Scalars['String']['input'];
  productUuid: Scalars['String']['input'];
  quantity: Scalars['Decimal']['input'];
  teamUuid: Scalars['String']['input'];
  terminusPayload?: InputMaybe<Scalars['JSONString']['input']>;
  terminusSchemaId?: InputMaybe<Scalars['String']['input']>;
  unit?: InputMaybe<Scalars['String']['input']>;
  validUntil?: InputMaybe<Scalars['Date']['input']>;
};

export type OfferType = {
  __typename?: 'OfferType';
  categoryName: Scalars['String']['output'];
  createdAt: Scalars['DateTime']['output'];
  currency: Scalars['String']['output'];
  description: Scalars['String']['output'];
  id: Scalars['ID']['output'];
  locationCountry: Scalars['String']['output'];
  locationCountryCode: Scalars['String']['output'];
  locationLatitude?: Maybe<Scalars['Float']['output']>;
  locationLongitude?: Maybe<Scalars['Float']['output']>;
  locationName: Scalars['String']['output'];
  locationUuid: Scalars['String']['output'];
  pricePerUnit?: Maybe<Scalars['Decimal']['output']>;
  productName: Scalars['String']['output'];
  productUuid: Scalars['String']['output'];
  quantity: Scalars['Decimal']['output'];
  status: OffersOfferStatusChoices;
  teamUuid: Scalars['String']['output'];
  terminusDocumentId: Scalars['String']['output'];
  terminusSchemaId: Scalars['String']['output'];
  unit: Scalars['String']['output'];
  updatedAt: Scalars['DateTime']['output'];
  uuid: Scalars['String']['output'];
  validUntil?: Maybe<Scalars['Date']['output']>;
  workflowError: Scalars['String']['output'];
  workflowStatus: OffersOfferWorkflowStatusChoices;
};

/** An enumeration. */
export enum OffersOfferStatusChoices {
  /** Активно */
  Active = 'ACTIVE',
  /** Отменено */
  Cancelled = 'CANCELLED',
  /** Закрыто */
  Closed = 'CLOSED',
  /** Черновик */
  Draft = 'DRAFT'
}

/** An enumeration. */
export enum OffersOfferWorkflowStatusChoices {
  /** Активен */
  Active = 'ACTIVE',
  /** Ошибка */
  Error = 'ERROR',
  /** Ожидает обработки */
  Pending = 'PENDING'
}

export type RequestInput = {
  productUuid: Scalars['String']['input'];
  quantity: Scalars['Decimal']['input'];
  sourceLocationUuid: Scalars['String']['input'];
  userId: Scalars['String']['input'];
};

export type RequestType = {
  __typename?: 'RequestType';
  createdAt: Scalars['DateTime']['output'];
  id: Scalars['ID']['output'];
  productUuid: Scalars['String']['output'];
  quantity: Scalars['Decimal']['output'];
  sourceLocationUuid: Scalars['String']['output'];
  updatedAt: Scalars['DateTime']['output'];
  userId: Scalars['String']['output'];
  uuid: Scalars['String']['output'];
};

/** Team mutations - Team Access Token authentication */
export type TeamMutation = {
  __typename?: 'TeamMutation';
  createOffer?: Maybe<CreateOffer>;
  createRequest?: Maybe<CreateRequest>;
  deleteOffer?: Maybe<DeleteOffer>;
  updateOffer?: Maybe<UpdateOffer>;
};


/** Team mutations - Team Access Token authentication */
export type TeamMutationCreateOfferArgs = {
  input: OfferInput;
};


/** Team mutations - Team Access Token authentication */
export type TeamMutationCreateRequestArgs = {
  input: RequestInput;
};


/** Team mutations - Team Access Token authentication */
export type TeamMutationDeleteOfferArgs = {
  uuid: Scalars['String']['input'];
};


/** Team mutations - Team Access Token authentication */
export type TeamMutationUpdateOfferArgs = {
  input: OfferInput;
  uuid: Scalars['String']['input'];
};

/** Team schema - Team Access Token authentication */
export type TeamQuery = {
  __typename?: 'TeamQuery';
  getRequest?: Maybe<RequestType>;
  getRequests?: Maybe<Array<Maybe<RequestType>>>;
  getTeamOffers?: Maybe<Array<Maybe<OfferType>>>;
};


/** Team schema - Team Access Token authentication */
export type TeamQueryGetRequestArgs = {
  uuid: Scalars['String']['input'];
};


/** Team schema - Team Access Token authentication */
export type TeamQueryGetRequestsArgs = {
  userId: Scalars['String']['input'];
};


/** Team schema - Team Access Token authentication */
export type TeamQueryGetTeamOffersArgs = {
  teamUuid: Scalars['String']['input'];
};

export type UpdateOffer = {
  __typename?: 'UpdateOffer';
  offer?: Maybe<OfferType>;
};

export type CreateOfferMutationVariables = Exact<{
  input: OfferInput;
}>;


export type CreateOfferMutation = { __typename?: 'TeamMutation', createOffer?: { __typename?: 'CreateOffer', success?: boolean | null, message?: string | null, workflowId?: string | null, offerUuid?: string | null } | null };

export type CreateRequestMutationVariables = Exact<{
  input: RequestInput;
}>;


export type CreateRequestMutation = { __typename?: 'TeamMutation', createRequest?: { __typename?: 'CreateRequest', request?: { __typename?: 'RequestType', uuid: string, productUuid: string, quantity: any, sourceLocationUuid: string, userId: string } | null } | null };

export type GetRequestsQueryVariables = Exact<{
  userId: Scalars['String']['input'];
}>;


export type GetRequestsQuery = { __typename?: 'TeamQuery', getRequests?: Array<{ __typename?: 'RequestType', uuid: string, productUuid: string, quantity: any, sourceLocationUuid: string, userId: string } | null> | null };


export const CreateOfferDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOffer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"OfferInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOffer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"workflowId"}},{"kind":"Field","name":{"kind":"Name","value":"offerUuid"}}]}}]}}]} as unknown as DocumentNode<CreateOfferMutation, CreateOfferMutationVariables>;
export const CreateRequestDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateRequest"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"RequestInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createRequest"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"request"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}}]}}]}}]}}]} as unknown as DocumentNode<CreateRequestMutation, CreateRequestMutationVariables>;
export const GetRequestsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRequests"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getRequests"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"userId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}}]}}]}}]} as unknown as DocumentNode<GetRequestsQuery, GetRequestsQueryVariables>;