/** Types generated for queries found in "src/modules/email-ingestion/providers/email-ingestion-control.provider.ts" */
export type DateOrString = Date | string;

export type Json = null | boolean | number | string | Json[] | { [key: string]: Json };

/** 'GetAliasByAlias' parameters type */
export interface IGetAliasByAliasParams {
  alias?: string | null | void;
}

/** 'GetAliasByAlias' return type */
export interface IGetAliasByAliasResult {
  owner_id: string;
}

/** 'GetAliasByAlias' query type */
export interface IGetAliasByAliasQuery {
  params: IGetAliasByAliasParams;
  result: IGetAliasByAliasResult;
}

/** 'InsertIngestGrant' parameters type */
export interface IInsertIngestGrantParams {
  action?: string | null | void;
  businessId?: string | null | void;
  expiresAt?: DateOrString | null | void;
  jti?: string | null | void;
  messageId?: string | null | void;
  ownerId?: string | null | void;
  rawMessageHash?: string | null | void;
}

/** 'InsertIngestGrant' return type */
export interface IInsertIngestGrantResult {
  action: string;
  business_id: string | null;
  expires_at: Date;
  id: string;
  jti: string;
  owner_id: string;
}

/** 'InsertIngestGrant' query type */
export interface IInsertIngestGrantQuery {
  params: IInsertIngestGrantParams;
  result: IInsertIngestGrantResult;
}

/** 'GetBusinessByEmailForIngest' parameters type */
export interface IGetBusinessByEmailForIngestParams {
  email?: string | null | void;
}

/** 'GetBusinessByEmailForIngest' return type */
export interface IGetBusinessByEmailForIngestResult {
  id: string;
  suggestion_data: Json | null;
}

/** 'GetBusinessByEmailForIngest' query type */
export interface IGetBusinessByEmailForIngestQuery {
  params: IGetBusinessByEmailForIngestParams;
  result: IGetBusinessByEmailForIngestResult;
}

/** 'GetGrantByJtiForValidation' parameters type */
export interface IGetGrantByJtiForValidationParams {
  jti?: string | null | void;
}

/** 'GetGrantByJtiForValidation' return type */
export interface IGetGrantByJtiForValidationResult {
  action: string;
  business_id: string | null;
  consumed_at: Date | null;
  expires_at: Date;
  id: string;
  jti: string;
  message_id: string;
  owner_id: string;
  raw_message_hash: string;
}

/** 'GetGrantByJtiForValidation' query type */
export interface IGetGrantByJtiForValidationQuery {
  params: IGetGrantByJtiForValidationParams;
  result: IGetGrantByJtiForValidationResult;
}

/** 'ConsumeGrantByJti' parameters type */
export interface IConsumeGrantByJtiParams {
  jti?: string | null | void;
}

/** 'ConsumeGrantByJti' return type */
export interface IConsumeGrantByJtiResult {
  id: string;
}

/** 'ConsumeGrantByJti' query type */
export interface IConsumeGrantByJtiQuery {
  params: IConsumeGrantByJtiParams;
  result: IConsumeGrantByJtiResult;
}

