import * as Types from "../../../__generated__/types.js";
import * as gm from "graphql-modules";
export namespace EmailIngestionModule {
  interface DefinedFields {
    Query: 'businessEmailConfig' | 'emailIngestionAliases';
    Mutation: 'insertEmailDocuments' | 'createEmailIngestionAlias' | 'setEmailIngestionAliasActive' | 'requestIngestControl' | 'ingestEmail';
    IngestGrant: 'id' | 'jti' | 'tenantId' | 'action' | 'expiresAt';
    IngestControlDecision: 'id' | 'tenantId' | 'decisionId' | 'auditId' | 'grant' | 'businessEmailConfig';
    IngestEmailSuccess: 'outcome' | 'ingestId' | 'existingIngestId' | 'auditId' | 'reasonCode';
    BusinessEmailConfig: 'businessId' | 'internalEmailLinks' | 'emailBody' | 'attachments';
    EmailIngestionAlias: 'id' | 'alias' | 'ownerId' | 'isActive' | 'createdAt' | 'updatedAt';
  };
  
  interface DefinedEnumValues {
    IngestOutcome: 'INSERTED' | 'DUPLICATE' | 'QUARANTINED' | 'REJECTED';
  };
  
  interface DefinedInputFields {
    IngestControlInput: 'recipientAlias' | 'messageId' | 'rawMessageHash' | 'receivedAt' | 'correlationId' | 'senderEvidence';
    SenderEvidenceInput: 'from' | 'replyTo' | 'originalFrom' | 'forwardedTo' | 'issuerCandidates';
    IngestEmailInput: 'grantJti' | 'idempotencyKey' | 'tenantId' | 'messageId' | 'rawMessageHash' | 'correlationId' | 'extractedDocuments';
    ExtractedDocumentInput: 'hash' | 'sizeBytes' | 'mimeType' | 'filename' | 'content';
    CreateEmailIngestionAliasInput: 'alias' | 'businessId';
  };
  
  export type Query = Pick<Types.Query, DefinedFields['Query']>;
  export type BusinessEmailConfig = Pick<Types.BusinessEmailConfig, DefinedFields['BusinessEmailConfig']>;
  export type EmailIngestionAlias = Pick<Types.EmailIngestionAlias, DefinedFields['EmailIngestionAlias']>;
  export type UUID = Types.Uuid;
  export type Mutation = Pick<Types.Mutation, DefinedFields['Mutation']>;
  export type FileScalar = Types.FileScalar;
  export type EmailIngestionAliasResult = Types.EmailIngestionAliasResult;
  export type CreateEmailIngestionAliasInput = Pick<Types.CreateEmailIngestionAliasInput, DefinedInputFields['CreateEmailIngestionAliasInput']>;
  export type IngestControlResult = Types.IngestControlResult;
  export type IngestControlInput = Pick<Types.IngestControlInput, DefinedInputFields['IngestControlInput']>;
  export type IngestEmailResult = Types.IngestEmailResult;
  export type IngestEmailInput = Pick<Types.IngestEmailInput, DefinedInputFields['IngestEmailInput']>;
  export type SenderEvidenceInput = Pick<Types.SenderEvidenceInput, DefinedInputFields['SenderEvidenceInput']>;
  export type IngestGrant = Pick<Types.IngestGrant, DefinedFields['IngestGrant']>;
  export type IngestControlDecision = Pick<Types.IngestControlDecision, DefinedFields['IngestControlDecision']>;
  export type CommonError = Types.CommonError;
  export type IngestOutcome = DefinedEnumValues['IngestOutcome'];
  export type IngestEmailSuccess = Pick<Types.IngestEmailSuccess, DefinedFields['IngestEmailSuccess']>;
  export type ExtractedDocumentInput = Pick<Types.ExtractedDocumentInput, DefinedInputFields['ExtractedDocumentInput']>;
  export type EmailAttachmentType = Types.EmailAttachmentType;
  
  export type QueryResolvers = Pick<Types.QueryResolvers, DefinedFields['Query']>;
  export type MutationResolvers = Pick<Types.MutationResolvers, DefinedFields['Mutation']>;
  export type IngestGrantResolvers = Pick<Types.IngestGrantResolvers, DefinedFields['IngestGrant']>;
  export type IngestControlDecisionResolvers = Pick<Types.IngestControlDecisionResolvers, DefinedFields['IngestControlDecision'] | '__isTypeOf'>;
  export type IngestEmailSuccessResolvers = Pick<Types.IngestEmailSuccessResolvers, DefinedFields['IngestEmailSuccess'] | '__isTypeOf'>;
  export type BusinessEmailConfigResolvers = Pick<Types.BusinessEmailConfigResolvers, DefinedFields['BusinessEmailConfig']>;
  export type EmailIngestionAliasResolvers = Pick<Types.EmailIngestionAliasResolvers, DefinedFields['EmailIngestionAlias'] | '__isTypeOf'>;
  
  export interface Resolvers {
    Query?: QueryResolvers;
    Mutation?: MutationResolvers;
    IngestGrant?: IngestGrantResolvers;
    IngestControlDecision?: IngestControlDecisionResolvers;
    IngestEmailSuccess?: IngestEmailSuccessResolvers;
    BusinessEmailConfig?: BusinessEmailConfigResolvers;
    EmailIngestionAlias?: EmailIngestionAliasResolvers;
  };
  
  export interface MiddlewareMap {
    '*'?: {
      '*'?: gm.Middleware[];
    };
    Query?: {
      '*'?: gm.Middleware[];
      businessEmailConfig?: gm.Middleware[];
      emailIngestionAliases?: gm.Middleware[];
    };
    Mutation?: {
      '*'?: gm.Middleware[];
      insertEmailDocuments?: gm.Middleware[];
      createEmailIngestionAlias?: gm.Middleware[];
      setEmailIngestionAliasActive?: gm.Middleware[];
      requestIngestControl?: gm.Middleware[];
      ingestEmail?: gm.Middleware[];
    };
    IngestGrant?: {
      '*'?: gm.Middleware[];
      id?: gm.Middleware[];
      jti?: gm.Middleware[];
      tenantId?: gm.Middleware[];
      action?: gm.Middleware[];
      expiresAt?: gm.Middleware[];
    };
    IngestControlDecision?: {
      '*'?: gm.Middleware[];
      id?: gm.Middleware[];
      tenantId?: gm.Middleware[];
      decisionId?: gm.Middleware[];
      auditId?: gm.Middleware[];
      grant?: gm.Middleware[];
      businessEmailConfig?: gm.Middleware[];
    };
    IngestEmailSuccess?: {
      '*'?: gm.Middleware[];
      outcome?: gm.Middleware[];
      ingestId?: gm.Middleware[];
      existingIngestId?: gm.Middleware[];
      auditId?: gm.Middleware[];
      reasonCode?: gm.Middleware[];
    };
    BusinessEmailConfig?: {
      '*'?: gm.Middleware[];
      businessId?: gm.Middleware[];
      internalEmailLinks?: gm.Middleware[];
      emailBody?: gm.Middleware[];
      attachments?: gm.Middleware[];
    };
    EmailIngestionAlias?: {
      '*'?: gm.Middleware[];
      id?: gm.Middleware[];
      alias?: gm.Middleware[];
      ownerId?: gm.Middleware[];
      isActive?: gm.Middleware[];
      createdAt?: gm.Middleware[];
      updatedAt?: gm.Middleware[];
    };
  };
}