diff --git a/api/db/migrations/20231211050651_update_user_database_timestamps/migration.sql b/api/db/migrations/20231211050651_update_user_database_timestamps/migration.sql new file mode 100644 index 00000000..bcc37f30 --- /dev/null +++ b/api/db/migrations/20231211050651_update_user_database_timestamps/migration.sql @@ -0,0 +1,3 @@ +-- AlterTable +ALTER TABLE "User" ALTER COLUMN "createdAt" SET DATA TYPE TIMESTAMPTZ(6), +ALTER COLUMN "updatedAt" SET DATA TYPE TIMESTAMPTZ(6); diff --git a/api/db/migrations/20231212224549_update_organization_id_to_optional_for_user/migration.sql b/api/db/migrations/20231212224549_update_organization_id_to_optional_for_user/migration.sql new file mode 100644 index 00000000..1316b69b --- /dev/null +++ b/api/db/migrations/20231212224549_update_organization_id_to_optional_for_user/migration.sql @@ -0,0 +1,8 @@ +-- DropForeignKey +ALTER TABLE "User" DROP CONSTRAINT "User_organizationId_fkey"; + +-- AlterTable +ALTER TABLE "User" ALTER COLUMN "organizationId" DROP NOT NULL; + +-- AddForeignKey +ALTER TABLE "User" ADD CONSTRAINT "User_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/api/db/schema.prisma b/api/db/schema.prisma index e8face87..75dd3ac2 100644 --- a/api/db/schema.prisma +++ b/api/db/schema.prisma @@ -38,12 +38,12 @@ model User { email String name String? agencyId Int? - organizationId Int + organizationId Int? roleId Int? - createdAt DateTime @default(now()) - updatedAt DateTime + createdAt DateTime @default(now()) @db.Timestamptz(6) + updatedAt DateTime @updatedAt @db.Timestamptz(6) agency Agency? @relation(fields: [agencyId], references: [id]) - organization Organization @relation(fields: [organizationId], references: [id]) + organization Organization? @relation(fields: [organizationId], references: [id]) role Role? @relation(fields: [roleId], references: [id]) certified ReportingPeriod[] uploaded Upload[] diff --git a/api/src/graphql/users.sdl.ts b/api/src/graphql/users.sdl.ts index 7773b75b..a80124a7 100644 --- a/api/src/graphql/users.sdl.ts +++ b/api/src/graphql/users.sdl.ts @@ -12,10 +12,14 @@ export const schema = gql` organization: Organization! role: Role certified: [ReportingPeriod]! + uploaded: [Upload]! + validated: [UploadValidation]! + invalidated: [UploadValidation]! } type Query { users: [User!]! @requireAuth + usersByOrganization(organizationId: Int!): [User!]! @requireAuth user(id: Int!): User @requireAuth } @@ -23,7 +27,6 @@ export const schema = gql` email: String! name: String agencyId: Int - organizationId: Int! roleId: Int } @@ -31,7 +34,6 @@ export const schema = gql` email: String name: String agencyId: Int - organizationId: Int roleId: Int } diff --git a/api/src/services/users/users.scenarios.ts b/api/src/services/users/users.scenarios.ts index 8cf2a34e..a36be647 100644 --- a/api/src/services/users/users.scenarios.ts +++ b/api/src/services/users/users.scenarios.ts @@ -7,14 +7,14 @@ export const standard = defineScenario({ one: { data: { email: 'String', - updatedAt: '2023-12-07T18:20:20.679Z', + updatedAt: '2023-12-10T00:37:26.049Z', organization: { create: { name: 'String' } }, }, }, two: { data: { email: 'String', - updatedAt: '2023-12-07T18:20:20.679Z', + updatedAt: '2023-12-10T00:37:26.049Z', organization: { create: { name: 'String' } }, }, }, diff --git a/api/src/services/users/users.test.ts b/api/src/services/users/users.test.ts index db6e89e8..0fafc9c0 100644 --- a/api/src/services/users/users.test.ts +++ b/api/src/services/users/users.test.ts @@ -27,13 +27,13 @@ describe('users', () => { input: { email: 'String', organizationId: scenario.user.two.organizationId, - updatedAt: '2023-12-07T18:20:20.664Z', + updatedAt: '2023-12-10T00:37:26.029Z', }, }) expect(result.email).toEqual('String') expect(result.organizationId).toEqual(scenario.user.two.organizationId) - expect(result.updatedAt).toEqual(new Date('2023-12-07T18:20:20.664Z')) + expect(result.updatedAt).toEqual(new Date('2023-12-10T00:37:26.029Z')) }) scenario('updates a user', async (scenario: StandardScenario) => { diff --git a/api/src/services/users/users.ts b/api/src/services/users/users.ts index 55873686..b0308888 100644 --- a/api/src/services/users/users.ts +++ b/api/src/services/users/users.ts @@ -35,6 +35,20 @@ export const deleteUser: MutationResolvers['deleteUser'] = ({ id }) => { }) } +export const usersByOrganization: QueryResolvers['usersByOrganization'] = + async ({ organizationId }) => { + try { + const users = await db.user.findMany({ + where: { organizationId }, + }) + return users || [] // Return an empty array if null is received + } catch (error) { + console.error(error) + // Handle the error appropriately; maybe log it and return an empty array + return [] + } + } + export const User: UserRelationResolvers = { agency: (_obj, { root }) => { return db.user.findUnique({ where: { id: root?.id } }).agency() @@ -48,4 +62,13 @@ export const User: UserRelationResolvers = { certified: (_obj, { root }) => { return db.user.findUnique({ where: { id: root?.id } }).certified() }, + uploaded: (_obj, { root }) => { + return db.user.findUnique({ where: { id: root?.id } }).uploaded() + }, + validated: (_obj, { root }) => { + return db.user.findUnique({ where: { id: root?.id } }).validated() + }, + invalidated: (_obj, { root }) => { + return db.user.findUnique({ where: { id: root?.id } }).invalidated() + }, } diff --git a/api/types/graphql.d.ts b/api/types/graphql.d.ts index 51afe9a3..250e7590 100644 --- a/api/types/graphql.d.ts +++ b/api/types/graphql.d.ts @@ -1,544 +1,535 @@ -import { Prisma } from "@prisma/client" +import { Prisma } from '@prisma/client' +import { + Agency as PrismaAgency, + Organization as PrismaOrganization, + User as PrismaUser, + Role as PrismaRole, + InputTemplate as PrismaInputTemplate, + OutputTemplate as PrismaOutputTemplate, + ReportingPeriod as PrismaReportingPeriod, + ExpenditureCategory as PrismaExpenditureCategory, + Upload as PrismaUpload, + UploadValidation as PrismaUploadValidation, +} from '@prisma/client' +import { + GraphQLResolveInfo, + GraphQLScalarType, + GraphQLScalarTypeConfig, +} from 'graphql' + import { MergePrismaWithSdlTypes, MakeRelationsOptional } from '@redwoodjs/api' -import { Agency as PrismaAgency, Organization as PrismaOrganization, User as PrismaUser, Role as PrismaRole, InputTemplate as PrismaInputTemplate, OutputTemplate as PrismaOutputTemplate, ReportingPeriod as PrismaReportingPeriod, ExpenditureCategory as PrismaExpenditureCategory, Upload as PrismaUpload, UploadValidation as PrismaUploadValidation, Subrecipient as PrismaSubrecipient, Project as PrismaProject } from '@prisma/client' -import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'; -import { RedwoodGraphQLContext } from '@redwoodjs/graphql-server/dist/types'; -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +import { RedwoodGraphQLContext } from '@redwoodjs/graphql-server/dist/types' +export type Maybe = T | null +export type InputMaybe = Maybe +export type Exact = { + [K in keyof T]: T[K] +} +export type MakeOptional = Omit & { + [SubKey in K]?: Maybe +} +export type MakeMaybe = Omit & { + [SubKey in K]: Maybe +} export type ResolverFn = ( - args?: TArgs, - obj?: { root: TParent; context: TContext; info: GraphQLResolveInfo } - ) => TResult | Promise -export type RequireFields = Omit & { [P in K]-?: NonNullable }; -export type OptArgsResolverFn = ( - args?: TArgs, - obj?: { root: TParent; context: TContext; info: GraphQLResolveInfo } - ) => TResult | Promise - - export type RequiredResolverFn = ( - args: TArgs, - obj: { root: TParent; context: TContext; info: GraphQLResolveInfo } - ) => TResult | Promise + args?: TArgs, + obj?: { root: TParent; context: TContext; info: GraphQLResolveInfo } +) => TResult | Promise +export type Omit = Pick> +export type RequireFields = Omit & { + [P in K]-?: NonNullable +} +export type OptArgsResolverFn< + TResult, + TParent = {}, + TContext = {}, + TArgs = {} +> = ( + args?: TArgs, + obj?: { root: TParent; context: TContext; info: GraphQLResolveInfo } +) => TResult | Promise + +export type RequiredResolverFn< + TResult, + TParent = {}, + TContext = {}, + TArgs = {} +> = ( + args: TArgs, + obj: { root: TParent; context: TContext; info: GraphQLResolveInfo } +) => TResult | Promise /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - BigInt: number; - Date: Date | string; - DateTime: Date | string; - JSON: Prisma.JsonValue; - JSONObject: Prisma.JsonObject; - Time: Date | string; -}; + ID: string + String: string + Boolean: boolean + Int: number + Float: number + BigInt: number + Date: Date | string + DateTime: Date | string + JSON: Prisma.JsonValue + JSONObject: Prisma.JsonObject + Time: Date | string +} export type Agency = { - __typename?: 'Agency'; - abbreviation?: Maybe; - code: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; - organizationId: Scalars['Int']; -}; + __typename?: 'Agency' + abbreviation?: Maybe + code: Scalars['String'] + id: Scalars['Int'] + name: Scalars['String'] + organizationId: Scalars['Int'] +} export type CreateAgencyInput = { - abbreviation?: InputMaybe; - code: Scalars['String']; - name: Scalars['String']; -}; + abbreviation?: InputMaybe + code: Scalars['String'] + name: Scalars['String'] +} export type CreateExpenditureCategoryInput = { - code: Scalars['String']; - name: Scalars['String']; -}; + code: Scalars['String'] + name: Scalars['String'] +} export type CreateInputTemplateInput = { - effectiveDate: Scalars['DateTime']; - name: Scalars['String']; - rulesGeneratedAt: Scalars['DateTime']; - version: Scalars['String']; -}; + effectiveDate: Scalars['DateTime'] + name: Scalars['String'] + rulesGeneratedAt: Scalars['DateTime'] + version: Scalars['String'] +} export type CreateOrganizationInput = { - name: Scalars['String']; -}; + name: Scalars['String'] +} export type CreateOutputTemplateInput = { - effectiveDate: Scalars['DateTime']; - name: Scalars['String']; - rulesGeneratedAt: Scalars['DateTime']; - version: Scalars['String']; -}; + effectiveDate: Scalars['DateTime'] + name: Scalars['String'] + rulesGeneratedAt: Scalars['DateTime'] + version: Scalars['String'] +} export type CreateProjectInput = { - agencyId: Scalars['Int']; - code: Scalars['String']; - description: Scalars['String']; - name: Scalars['String']; - organizationId: Scalars['Int']; - originationPeriodId: Scalars['Int']; - status: Scalars['String']; -}; + agencyId: Scalars['Int'] + code: Scalars['String'] + description: Scalars['String'] + name: Scalars['String'] + organizationId: Scalars['Int'] + originationPeriodId: Scalars['Int'] + status: Scalars['String'] +} export type CreateReportingPeriodInput = { - certifiedAt?: InputMaybe; - certifiedById?: InputMaybe; - endDate: Scalars['DateTime']; - inputTemplateId: Scalars['Int']; - isCurrentPeriod: Scalars['Boolean']; - name: Scalars['String']; - outputTemplateId: Scalars['Int']; - startDate: Scalars['DateTime']; -}; + certifiedAt?: InputMaybe + certifiedById?: InputMaybe + endDate: Scalars['DateTime'] + inputTemplateId: Scalars['Int'] + isCurrentPeriod: Scalars['Boolean'] + name: Scalars['String'] + outputTemplateId: Scalars['Int'] + startDate: Scalars['DateTime'] +} export type CreateRoleInput = { - name: Scalars['String']; -}; + name: Scalars['String'] +} export type CreateSubrecipientInput = { - certifiedAt?: InputMaybe; - certifiedById?: InputMaybe; - endDate: Scalars['DateTime']; - name: Scalars['String']; - organizationId: Scalars['Int']; - originationUploadId: Scalars['Int']; - startDate: Scalars['DateTime']; -}; + certifiedAt?: InputMaybe + certifiedById?: InputMaybe + endDate: Scalars['DateTime'] + name: Scalars['String'] + organizationId: Scalars['Int'] + originationUploadId: Scalars['Int'] + startDate: Scalars['DateTime'] +} export type CreateUploadInput = { - agencyId: Scalars['Int']; - expenditureCategoryId: Scalars['Int']; - filename: Scalars['String']; - organizationId: Scalars['Int']; - reportingPeriodId: Scalars['Int']; - uploadedById: Scalars['Int']; -}; + agencyId: Scalars['Int'] + expenditureCategoryId: Scalars['Int'] + filename: Scalars['String'] + organizationId: Scalars['Int'] + reportingPeriodId: Scalars['Int'] + uploadedById: Scalars['Int'] +} export type CreateUploadValidationInput = { - agencyId: Scalars['Int']; - inputTemplateId: Scalars['Int']; - invalidatedAt?: InputMaybe; - invalidatedById?: InputMaybe; - invalidationResults?: InputMaybe; - organizationId: Scalars['Int']; - uploadId: Scalars['Int']; - validatedAt?: InputMaybe; - validatedById?: InputMaybe; - validationResults?: InputMaybe; -}; + agencyId: Scalars['Int'] + inputTemplateId: Scalars['Int'] + invalidatedAt?: InputMaybe + invalidatedById?: InputMaybe + invalidationResults?: InputMaybe + organizationId: Scalars['Int'] + uploadId: Scalars['Int'] + validatedAt?: InputMaybe + validatedById?: InputMaybe + validationResults?: InputMaybe +} export type CreateUserInput = { - agencyId?: InputMaybe; - email: Scalars['String']; - name?: InputMaybe; - organizationId: Scalars['Int']; - roleId?: InputMaybe; -}; + agencyId?: InputMaybe + email: Scalars['String'] + name?: InputMaybe + roleId?: InputMaybe +} export type ExpenditureCategory = { - __typename?: 'ExpenditureCategory'; - Uploads: Array>; - code: Scalars['String']; - createdAt: Scalars['DateTime']; - id: Scalars['Int']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; -}; + __typename?: 'ExpenditureCategory' + Uploads: Array> + code: Scalars['String'] + createdAt: Scalars['DateTime'] + id: Scalars['Int'] + name: Scalars['String'] + updatedAt: Scalars['DateTime'] +} export type InputTemplate = { - __typename?: 'InputTemplate'; - createdAt: Scalars['DateTime']; - effectiveDate: Scalars['DateTime']; - id: Scalars['Int']; - name: Scalars['String']; - reportingPeriods: Array>; - rulesGeneratedAt: Scalars['DateTime']; - updatedAt: Scalars['DateTime']; - version: Scalars['String']; -}; + __typename?: 'InputTemplate' + createdAt: Scalars['DateTime'] + effectiveDate: Scalars['DateTime'] + id: Scalars['Int'] + name: Scalars['String'] + reportingPeriods: Array> + rulesGeneratedAt: Scalars['DateTime'] + updatedAt: Scalars['DateTime'] + version: Scalars['String'] +} export type Mutation = { - __typename?: 'Mutation'; - createAgency: Agency; - createExpenditureCategory: ExpenditureCategory; - createInputTemplate: InputTemplate; - createOrganization: Organization; - createOutputTemplate: OutputTemplate; - createProject: Project; - createReportingPeriod: ReportingPeriod; - createRole: Role; - createSubrecipient: Subrecipient; - createUpload: Upload; - createUploadValidation: UploadValidation; - createUser: User; - deleteAgency: Agency; - deleteExpenditureCategory: ExpenditureCategory; - deleteInputTemplate: InputTemplate; - deleteOrganization: Organization; - deleteOutputTemplate: OutputTemplate; - deleteProject: Project; - deleteReportingPeriod: ReportingPeriod; - deleteRole: Role; - deleteSubrecipient: Subrecipient; - deleteUpload: Upload; - deleteUploadValidation: UploadValidation; - deleteUser: User; - updateAgency: Agency; - updateExpenditureCategory: ExpenditureCategory; - updateInputTemplate: InputTemplate; - updateOrganization: Organization; - updateOutputTemplate: OutputTemplate; - updateProject: Project; - updateReportingPeriod: ReportingPeriod; - updateRole: Role; - updateSubrecipient: Subrecipient; - updateUpload: Upload; - updateUploadValidation: UploadValidation; - updateUser: User; -}; - + __typename?: 'Mutation' + createAgency: Agency + createExpenditureCategory: ExpenditureCategory + createInputTemplate: InputTemplate + createOrganization: Organization + createOutputTemplate: OutputTemplate + createProject: Project + createReportingPeriod: ReportingPeriod + createRole: Role + createSubrecipient: Subrecipient + createUpload: Upload + createUploadValidation: UploadValidation + createUser: User + deleteAgency: Agency + deleteExpenditureCategory: ExpenditureCategory + deleteInputTemplate: InputTemplate + deleteOrganization: Organization + deleteOutputTemplate: OutputTemplate + deleteProject: Project + deleteReportingPeriod: ReportingPeriod + deleteRole: Role + deleteSubrecipient: Subrecipient + deleteUpload: Upload + deleteUploadValidation: UploadValidation + deleteUser: User + updateAgency: Agency + updateExpenditureCategory: ExpenditureCategory + updateInputTemplate: InputTemplate + updateOrganization: Organization + updateOutputTemplate: OutputTemplate + updateProject: Project + updateReportingPeriod: ReportingPeriod + updateRole: Role + updateSubrecipient: Subrecipient + updateUpload: Upload + updateUploadValidation: UploadValidation + updateUser: User +} export type MutationcreateAgencyArgs = { - input: CreateAgencyInput; -}; - + input: CreateAgencyInput +} export type MutationcreateExpenditureCategoryArgs = { - input: CreateExpenditureCategoryInput; -}; - + input: CreateExpenditureCategoryInput +} export type MutationcreateInputTemplateArgs = { - input: CreateInputTemplateInput; -}; - + input: CreateInputTemplateInput +} export type MutationcreateOrganizationArgs = { - input: CreateOrganizationInput; -}; - + input: CreateOrganizationInput +} export type MutationcreateOutputTemplateArgs = { - input: CreateOutputTemplateInput; -}; - + input: CreateOutputTemplateInput +} export type MutationcreateProjectArgs = { - input: CreateProjectInput; -}; - + input: CreateProjectInput +} export type MutationcreateReportingPeriodArgs = { - input: CreateReportingPeriodInput; -}; - + input: CreateReportingPeriodInput +} export type MutationcreateRoleArgs = { - input: CreateRoleInput; -}; - + input: CreateRoleInput +} export type MutationcreateSubrecipientArgs = { - input: CreateSubrecipientInput; -}; - + input: CreateSubrecipientInput +} export type MutationcreateUploadArgs = { - input: CreateUploadInput; -}; - + input: CreateUploadInput +} export type MutationcreateUploadValidationArgs = { - input: CreateUploadValidationInput; -}; - + input: CreateUploadValidationInput +} export type MutationcreateUserArgs = { - input: CreateUserInput; -}; - + input: CreateUserInput +} export type MutationdeleteAgencyArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteExpenditureCategoryArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteInputTemplateArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteOrganizationArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteOutputTemplateArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteProjectArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteReportingPeriodArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteRoleArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteSubrecipientArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteUploadArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteUploadValidationArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteUserArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationupdateAgencyArgs = { - id: Scalars['Int']; - input: UpdateAgencyInput; -}; - + id: Scalars['Int'] + input: UpdateAgencyInput +} export type MutationupdateExpenditureCategoryArgs = { - id: Scalars['Int']; - input: UpdateExpenditureCategoryInput; -}; - + id: Scalars['Int'] + input: UpdateExpenditureCategoryInput +} export type MutationupdateInputTemplateArgs = { - id: Scalars['Int']; - input: UpdateInputTemplateInput; -}; - + id: Scalars['Int'] + input: UpdateInputTemplateInput +} export type MutationupdateOrganizationArgs = { - id: Scalars['Int']; - input: UpdateOrganizationInput; -}; - + id: Scalars['Int'] + input: UpdateOrganizationInput +} export type MutationupdateOutputTemplateArgs = { - id: Scalars['Int']; - input: UpdateOutputTemplateInput; -}; - + id: Scalars['Int'] + input: UpdateOutputTemplateInput +} export type MutationupdateProjectArgs = { - id: Scalars['Int']; - input: UpdateProjectInput; -}; - + id: Scalars['Int'] + input: UpdateProjectInput +} export type MutationupdateReportingPeriodArgs = { - id: Scalars['Int']; - input: UpdateReportingPeriodInput; -}; - + id: Scalars['Int'] + input: UpdateReportingPeriodInput +} export type MutationupdateRoleArgs = { - id: Scalars['Int']; - input: UpdateRoleInput; -}; - + id: Scalars['Int'] + input: UpdateRoleInput +} export type MutationupdateSubrecipientArgs = { - id: Scalars['Int']; - input: UpdateSubrecipientInput; -}; - + id: Scalars['Int'] + input: UpdateSubrecipientInput +} export type MutationupdateUploadArgs = { - id: Scalars['Int']; - input: UpdateUploadInput; -}; - + id: Scalars['Int'] + input: UpdateUploadInput +} export type MutationupdateUploadValidationArgs = { - id: Scalars['Int']; - input: UpdateUploadValidationInput; -}; - + id: Scalars['Int'] + input: UpdateUploadValidationInput +} export type MutationupdateUserArgs = { - id: Scalars['Int']; - input: UpdateUserInput; -}; + id: Scalars['Int'] + input: UpdateUserInput +} export type Organization = { - __typename?: 'Organization'; - agencies: Array>; - id: Scalars['Int']; - name: Scalars['String']; -}; + __typename?: 'Organization' + agencies: Array> + id: Scalars['Int'] + name: Scalars['String'] +} export type OutputTemplate = { - __typename?: 'OutputTemplate'; - createdAt: Scalars['DateTime']; - effectiveDate: Scalars['DateTime']; - id: Scalars['Int']; - name: Scalars['String']; - reportingPeriods: Array>; - rulesGeneratedAt: Scalars['DateTime']; - updatedAt: Scalars['DateTime']; - version: Scalars['String']; -}; + __typename?: 'OutputTemplate' + createdAt: Scalars['DateTime'] + effectiveDate: Scalars['DateTime'] + id: Scalars['Int'] + name: Scalars['String'] + reportingPeriods: Array> + rulesGeneratedAt: Scalars['DateTime'] + updatedAt: Scalars['DateTime'] + version: Scalars['String'] +} export type Project = { - __typename?: 'Project'; - agency: Agency; - agencyId: Scalars['Int']; - code: Scalars['String']; - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; - organization: Organization; - organizationId: Scalars['Int']; - originationPeriod: ReportingPeriod; - originationPeriodId: Scalars['Int']; - status: Scalars['String']; - updatedAt: Scalars['DateTime']; -}; + __typename?: 'Project' + agency: Agency + agencyId: Scalars['Int'] + code: Scalars['String'] + createdAt: Scalars['DateTime'] + description: Scalars['String'] + id: Scalars['Int'] + name: Scalars['String'] + organization: Organization + organizationId: Scalars['Int'] + originationPeriod: ReportingPeriod + originationPeriodId: Scalars['Int'] + status: Scalars['String'] + updatedAt: Scalars['DateTime'] +} /** About the Redwood queries. */ export type Query = { - __typename?: 'Query'; - agencies: Array; - agenciesByOrganization: Array; - agency?: Maybe; - expenditureCategories: Array; - expenditureCategory?: Maybe; - inputTemplate?: Maybe; - inputTemplates: Array; - organization?: Maybe; - organizations: Array; - outputTemplate?: Maybe; - outputTemplates: Array; - project?: Maybe; - projects: Array; + __typename?: 'Query' + agencies: Array + agenciesByOrganization: Array + agency?: Maybe + expenditureCategories: Array + expenditureCategory?: Maybe + inputTemplate?: Maybe + inputTemplates: Array + organization?: Maybe + organizations: Array + outputTemplate?: Maybe + outputTemplates: Array + project?: Maybe + projects: Array /** Fetches the Redwood root schema. */ - redwood?: Maybe; - reportingPeriod?: Maybe; - reportingPeriods: Array; - role?: Maybe; - roles: Array; - subrecipient?: Maybe; - subrecipients: Array; - upload?: Maybe; - uploadValidation?: Maybe; - uploadValidations: Array; - uploads: Array; - user?: Maybe; - users: Array; -}; - + redwood?: Maybe + reportingPeriod?: Maybe + reportingPeriods: Array + role?: Maybe + roles: Array + subrecipient?: Maybe + subrecipients: Array + upload?: Maybe + uploadValidation?: Maybe + uploadValidations: Array + uploads: Array + user?: Maybe + users: Array + usersByOrganization: Array +} /** About the Redwood queries. */ export type QueryagenciesByOrganizationArgs = { - organizationId: Scalars['Int']; -}; - + organizationId: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryagencyArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryexpenditureCategoryArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryinputTemplateArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryorganizationArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryoutputTemplateArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryprojectArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryreportingPeriodArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryroleArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QuerysubrecipientArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryuploadArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryuploadValidationArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryuserArgs = { - id: Scalars['Int']; -}; + id: Scalars['Int'] +} + +/** About the Redwood queries. */ +export type QueryusersByOrganizationArgs = { + organizationId: Scalars['Int'] +} /** * The RedwoodJS Root Schema @@ -546,922 +537,2545 @@ export type QueryuserArgs = { * Defines details about RedwoodJS such as the current user and version information. */ export type Redwood = { - __typename?: 'Redwood'; + __typename?: 'Redwood' /** The current user. */ - currentUser?: Maybe; + currentUser?: Maybe /** The version of Prisma. */ - prismaVersion?: Maybe; + prismaVersion?: Maybe /** The version of Redwood. */ - version?: Maybe; -}; + version?: Maybe +} export type ReportingPeriod = { - __typename?: 'ReportingPeriod'; - certifiedAt?: Maybe; - certifiedBy?: Maybe; - certifiedById?: Maybe; - createdAt: Scalars['DateTime']; - endDate: Scalars['DateTime']; - id: Scalars['Int']; - inputTemplate: InputTemplate; - inputTemplateId: Scalars['Int']; - isCurrentPeriod: Scalars['Boolean']; - name: Scalars['String']; - outputTemplate: OutputTemplate; - outputTemplateId: Scalars['Int']; - startDate: Scalars['DateTime']; - updatedAt: Scalars['DateTime']; -}; + __typename?: 'ReportingPeriod' + certifiedAt?: Maybe + certifiedBy?: Maybe + certifiedById?: Maybe + createdAt: Scalars['DateTime'] + endDate: Scalars['DateTime'] + id: Scalars['Int'] + inputTemplate: InputTemplate + inputTemplateId: Scalars['Int'] + isCurrentPeriod: Scalars['Boolean'] + name: Scalars['String'] + outputTemplate: OutputTemplate + outputTemplateId: Scalars['Int'] + startDate: Scalars['DateTime'] + updatedAt: Scalars['DateTime'] +} export type Role = { - __typename?: 'Role'; - createdAt: Scalars['DateTime']; - id: Scalars['Int']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; - users: Array>; -}; + __typename?: 'Role' + createdAt: Scalars['DateTime'] + id: Scalars['Int'] + name: Scalars['String'] + updatedAt: Scalars['DateTime'] + users: Array> +} export type Subrecipient = { - __typename?: 'Subrecipient'; - certifiedAt?: Maybe; - certifiedBy?: Maybe; - certifiedById?: Maybe; - createdAt: Scalars['DateTime']; - endDate: Scalars['DateTime']; - id: Scalars['Int']; - name: Scalars['String']; - organization: Organization; - organizationId: Scalars['Int']; - originationUpload: Upload; - originationUploadId: Scalars['Int']; - startDate: Scalars['DateTime']; - updatedAt: Scalars['DateTime']; -}; + __typename?: 'Subrecipient' + certifiedAt?: Maybe + certifiedBy?: Maybe + certifiedById?: Maybe + createdAt: Scalars['DateTime'] + endDate: Scalars['DateTime'] + id: Scalars['Int'] + name: Scalars['String'] + organization: Organization + organizationId: Scalars['Int'] + originationUpload: Upload + originationUploadId: Scalars['Int'] + startDate: Scalars['DateTime'] + updatedAt: Scalars['DateTime'] +} export type UpdateAgencyInput = { - abbreviation?: InputMaybe; - code?: InputMaybe; - name?: InputMaybe; -}; + abbreviation?: InputMaybe + code?: InputMaybe + name?: InputMaybe +} export type UpdateExpenditureCategoryInput = { - code?: InputMaybe; - name?: InputMaybe; -}; + code?: InputMaybe + name?: InputMaybe +} export type UpdateInputTemplateInput = { - effectiveDate?: InputMaybe; - name?: InputMaybe; - rulesGeneratedAt?: InputMaybe; - version?: InputMaybe; -}; + effectiveDate?: InputMaybe + name?: InputMaybe + rulesGeneratedAt?: InputMaybe + version?: InputMaybe +} export type UpdateOrganizationInput = { - name?: InputMaybe; -}; + name?: InputMaybe +} export type UpdateOutputTemplateInput = { - effectiveDate?: InputMaybe; - name?: InputMaybe; - rulesGeneratedAt?: InputMaybe; - version?: InputMaybe; -}; + effectiveDate?: InputMaybe + name?: InputMaybe + rulesGeneratedAt?: InputMaybe + version?: InputMaybe +} export type UpdateProjectInput = { - agencyId?: InputMaybe; - code?: InputMaybe; - description?: InputMaybe; - name?: InputMaybe; - organizationId?: InputMaybe; - originationPeriodId?: InputMaybe; - status?: InputMaybe; -}; + agencyId?: InputMaybe + code?: InputMaybe + description?: InputMaybe + name?: InputMaybe + organizationId?: InputMaybe + originationPeriodId?: InputMaybe + status?: InputMaybe +} export type UpdateReportingPeriodInput = { - certifiedAt?: InputMaybe; - certifiedById?: InputMaybe; - endDate?: InputMaybe; - inputTemplateId?: InputMaybe; - isCurrentPeriod?: InputMaybe; - name?: InputMaybe; - outputTemplateId?: InputMaybe; - startDate?: InputMaybe; -}; + certifiedAt?: InputMaybe + certifiedById?: InputMaybe + endDate?: InputMaybe + inputTemplateId?: InputMaybe + isCurrentPeriod?: InputMaybe + name?: InputMaybe + outputTemplateId?: InputMaybe + startDate?: InputMaybe +} export type UpdateRoleInput = { - name?: InputMaybe; -}; + name?: InputMaybe +} export type UpdateSubrecipientInput = { - certifiedAt?: InputMaybe; - certifiedById?: InputMaybe; - endDate?: InputMaybe; - name?: InputMaybe; - organizationId?: InputMaybe; - originationUploadId?: InputMaybe; - startDate?: InputMaybe; -}; + certifiedAt?: InputMaybe + certifiedById?: InputMaybe + endDate?: InputMaybe + name?: InputMaybe + organizationId?: InputMaybe + originationUploadId?: InputMaybe + startDate?: InputMaybe +} export type UpdateUploadInput = { - agencyId?: InputMaybe; - expenditureCategoryId?: InputMaybe; - filename?: InputMaybe; - organizationId?: InputMaybe; - reportingPeriodId?: InputMaybe; - uploadedById?: InputMaybe; -}; + agencyId?: InputMaybe + expenditureCategoryId?: InputMaybe + filename?: InputMaybe + organizationId?: InputMaybe + reportingPeriodId?: InputMaybe + uploadedById?: InputMaybe +} export type UpdateUploadValidationInput = { - agencyId?: InputMaybe; - inputTemplateId?: InputMaybe; - invalidatedAt?: InputMaybe; - invalidatedById?: InputMaybe; - invalidationResults?: InputMaybe; - organizationId?: InputMaybe; - uploadId?: InputMaybe; - validatedAt?: InputMaybe; - validatedById?: InputMaybe; - validationResults?: InputMaybe; -}; + agencyId?: InputMaybe + inputTemplateId?: InputMaybe + invalidatedAt?: InputMaybe + invalidatedById?: InputMaybe + invalidationResults?: InputMaybe + organizationId?: InputMaybe + uploadId?: InputMaybe + validatedAt?: InputMaybe + validatedById?: InputMaybe + validationResults?: InputMaybe +} export type UpdateUserInput = { - agencyId?: InputMaybe; - email?: InputMaybe; - name?: InputMaybe; - organizationId?: InputMaybe; - roleId?: InputMaybe; -}; + agencyId?: InputMaybe + email?: InputMaybe + name?: InputMaybe + roleId?: InputMaybe +} export type Upload = { - __typename?: 'Upload'; - agency: Agency; - agencyId: Scalars['Int']; - createdAt: Scalars['DateTime']; - expenditureCategory: ExpenditureCategory; - expenditureCategoryId: Scalars['Int']; - filename: Scalars['String']; - id: Scalars['Int']; - organization: Organization; - organizationId: Scalars['Int']; - reportingPeriod: ReportingPeriod; - reportingPeriodId: Scalars['Int']; - updatedAt: Scalars['DateTime']; - uploadedBy: User; - uploadedById: Scalars['Int']; - validations: Array>; -}; + __typename?: 'Upload' + agency: Agency + agencyId: Scalars['Int'] + createdAt: Scalars['DateTime'] + expenditureCategory: ExpenditureCategory + expenditureCategoryId: Scalars['Int'] + filename: Scalars['String'] + id: Scalars['Int'] + organization: Organization + organizationId: Scalars['Int'] + reportingPeriod: ReportingPeriod + reportingPeriodId: Scalars['Int'] + updatedAt: Scalars['DateTime'] + uploadedBy: User + uploadedById: Scalars['Int'] + validations: Array> +} export type UploadValidation = { - __typename?: 'UploadValidation'; - agency: Agency; - agencyId: Scalars['Int']; - createdAt: Scalars['DateTime']; - id: Scalars['Int']; - inputTemplate: InputTemplate; - inputTemplateId: Scalars['Int']; - invalidatedAt?: Maybe; - invalidatedBy?: Maybe; - invalidatedById?: Maybe; - invalidationResults?: Maybe; - organization: Organization; - organizationId: Scalars['Int']; - updatedAt: Scalars['DateTime']; - upload: Upload; - uploadId: Scalars['Int']; - validatedAt?: Maybe; - validatedBy?: Maybe; - validatedById?: Maybe; - validationResults?: Maybe; -}; + __typename?: 'UploadValidation' + agency: Agency + agencyId: Scalars['Int'] + createdAt: Scalars['DateTime'] + id: Scalars['Int'] + inputTemplate: InputTemplate + inputTemplateId: Scalars['Int'] + invalidatedAt?: Maybe + invalidatedBy?: Maybe + invalidatedById?: Maybe + invalidationResults?: Maybe + organization: Organization + organizationId: Scalars['Int'] + updatedAt: Scalars['DateTime'] + upload: Upload + uploadId: Scalars['Int'] + validatedAt?: Maybe + validatedBy?: Maybe + validatedById?: Maybe + validationResults?: Maybe +} export type User = { - __typename?: 'User'; - agency?: Maybe; - agencyId?: Maybe; - certified: Array>; - createdAt: Scalars['DateTime']; - email: Scalars['String']; - id: Scalars['Int']; - name?: Maybe; - organization: Organization; - organizationId: Scalars['Int']; - role?: Maybe; - roleId?: Maybe; - updatedAt: Scalars['DateTime']; -}; - -type MaybeOrArrayOfMaybe = T | Maybe | Maybe[]; -type AllMappedModels = MaybeOrArrayOfMaybe - - -export type ResolverTypeWrapper = Promise | T; + __typename?: 'User' + agency?: Maybe + agencyId?: Maybe + certified: Array> + createdAt: Scalars['DateTime'] + email: Scalars['String'] + id: Scalars['Int'] + invalidated: Array> + name?: Maybe + organization: Organization + organizationId: Scalars['Int'] + role?: Maybe + roleId?: Maybe + updatedAt: Scalars['DateTime'] + uploaded: Array> + validated: Array> +} -export type Resolver = ResolverFn; +type MaybeOrArrayOfMaybe = T | Maybe | Maybe[] +type AllMappedModels = MaybeOrArrayOfMaybe< + | Agency + | ExpenditureCategory + | InputTemplate + | Organization + | OutputTemplate + | ReportingPeriod + | Role + | Upload + | UploadValidation + | User +> + +export type ResolverTypeWrapper = Promise | T + +export type Resolver< + TResult, + TParent = {}, + TContext = {}, + TArgs = {} +> = ResolverFn export type SubscriptionSubscribeFn = ( parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo -) => AsyncIterable | Promise>; +) => AsyncIterable | Promise> export type SubscriptionResolveFn = ( parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo -) => TResult | Promise; - -export interface SubscriptionSubscriberObject { - subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>; - resolve?: SubscriptionResolveFn; +) => TResult | Promise + +export interface SubscriptionSubscriberObject< + TResult, + TKey extends string, + TParent, + TContext, + TArgs +> { + subscribe: SubscriptionSubscribeFn< + { [key in TKey]: TResult }, + TParent, + TContext, + TArgs + > + resolve?: SubscriptionResolveFn< + TResult, + { [key in TKey]: TResult }, + TContext, + TArgs + > } export interface SubscriptionResolverObject { - subscribe: SubscriptionSubscribeFn; - resolve: SubscriptionResolveFn; + subscribe: SubscriptionSubscribeFn + resolve: SubscriptionResolveFn } -export type SubscriptionObject = +export type SubscriptionObject< + TResult, + TKey extends string, + TParent, + TContext, + TArgs +> = | SubscriptionSubscriberObject - | SubscriptionResolverObject; - -export type SubscriptionResolver = - | ((...args: any[]) => SubscriptionObject) - | SubscriptionObject; + | SubscriptionResolverObject + +export type SubscriptionResolver< + TResult, + TKey extends string, + TParent = {}, + TContext = {}, + TArgs = {} +> = + | (( + ...args: any[] + ) => SubscriptionObject) + | SubscriptionObject export type TypeResolveFn = ( parent: TParent, context: TContext, info: GraphQLResolveInfo -) => Maybe | Promise>; +) => Maybe | Promise> -export type IsTypeOfResolverFn = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise; +export type IsTypeOfResolverFn = ( + obj: T, + context: TContext, + info: GraphQLResolveInfo +) => boolean | Promise -export type NextResolverFn = () => Promise; +export type NextResolverFn = () => Promise -export type DirectiveResolverFn = ( +export type DirectiveResolverFn< + TResult = {}, + TParent = {}, + TContext = {}, + TArgs = {} +> = ( next: NextResolverFn, parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo -) => TResult | Promise; - - +) => TResult | Promise /** Mapping between all available schema types and the resolvers types */ export type ResolversTypes = { - Agency: ResolverTypeWrapper, AllMappedModels>>; - BigInt: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; - CreateAgencyInput: CreateAgencyInput; - CreateExpenditureCategoryInput: CreateExpenditureCategoryInput; - CreateInputTemplateInput: CreateInputTemplateInput; - CreateOrganizationInput: CreateOrganizationInput; - CreateOutputTemplateInput: CreateOutputTemplateInput; - CreateProjectInput: CreateProjectInput; - CreateReportingPeriodInput: CreateReportingPeriodInput; - CreateRoleInput: CreateRoleInput; - CreateSubrecipientInput: CreateSubrecipientInput; - CreateUploadInput: CreateUploadInput; - CreateUploadValidationInput: CreateUploadValidationInput; - CreateUserInput: CreateUserInput; - Date: ResolverTypeWrapper; - DateTime: ResolverTypeWrapper; - ExpenditureCategory: ResolverTypeWrapper, AllMappedModels>>; - InputTemplate: ResolverTypeWrapper, AllMappedModels>>; - Int: ResolverTypeWrapper; - JSON: ResolverTypeWrapper; - JSONObject: ResolverTypeWrapper; - Mutation: ResolverTypeWrapper<{}>; - Organization: ResolverTypeWrapper, AllMappedModels>>; - OutputTemplate: ResolverTypeWrapper, AllMappedModels>>; - Project: ResolverTypeWrapper, AllMappedModels>>; - Query: ResolverTypeWrapper<{}>; - Redwood: ResolverTypeWrapper; - ReportingPeriod: ResolverTypeWrapper, AllMappedModels>>; - Role: ResolverTypeWrapper, AllMappedModels>>; - String: ResolverTypeWrapper; - Subrecipient: ResolverTypeWrapper, AllMappedModels>>; - Time: ResolverTypeWrapper; - UpdateAgencyInput: UpdateAgencyInput; - UpdateExpenditureCategoryInput: UpdateExpenditureCategoryInput; - UpdateInputTemplateInput: UpdateInputTemplateInput; - UpdateOrganizationInput: UpdateOrganizationInput; - UpdateOutputTemplateInput: UpdateOutputTemplateInput; - UpdateProjectInput: UpdateProjectInput; - UpdateReportingPeriodInput: UpdateReportingPeriodInput; - UpdateRoleInput: UpdateRoleInput; - UpdateSubrecipientInput: UpdateSubrecipientInput; - UpdateUploadInput: UpdateUploadInput; - UpdateUploadValidationInput: UpdateUploadValidationInput; - UpdateUserInput: UpdateUserInput; - Upload: ResolverTypeWrapper, AllMappedModels>>; - UploadValidation: ResolverTypeWrapper, AllMappedModels>>; - User: ResolverTypeWrapper, AllMappedModels>>; -}; + Agency: ResolverTypeWrapper< + MergePrismaWithSdlTypes< + PrismaAgency, + MakeRelationsOptional, + AllMappedModels + > + > + BigInt: ResolverTypeWrapper + Boolean: ResolverTypeWrapper + CreateAgencyInput: CreateAgencyInput + CreateExpenditureCategoryInput: CreateExpenditureCategoryInput + CreateInputTemplateInput: CreateInputTemplateInput + CreateOrganizationInput: CreateOrganizationInput + CreateOutputTemplateInput: CreateOutputTemplateInput + CreateProjectInput: CreateProjectInput + CreateReportingPeriodInput: CreateReportingPeriodInput + CreateRoleInput: CreateRoleInput + CreateSubrecipientInput: CreateSubrecipientInput + CreateUploadInput: CreateUploadInput + CreateUploadValidationInput: CreateUploadValidationInput + CreateUserInput: CreateUserInput + Date: ResolverTypeWrapper + DateTime: ResolverTypeWrapper + ExpenditureCategory: ResolverTypeWrapper< + MergePrismaWithSdlTypes< + PrismaExpenditureCategory, + MakeRelationsOptional, + AllMappedModels + > + > + InputTemplate: ResolverTypeWrapper< + MergePrismaWithSdlTypes< + PrismaInputTemplate, + MakeRelationsOptional, + AllMappedModels + > + > + Int: ResolverTypeWrapper + JSON: ResolverTypeWrapper + JSONObject: ResolverTypeWrapper + Mutation: ResolverTypeWrapper<{}> + Organization: ResolverTypeWrapper< + MergePrismaWithSdlTypes< + PrismaOrganization, + MakeRelationsOptional, + AllMappedModels + > + > + OutputTemplate: ResolverTypeWrapper< + MergePrismaWithSdlTypes< + PrismaOutputTemplate, + MakeRelationsOptional, + AllMappedModels + > + > + Project: ResolverTypeWrapper< + Omit & { + agency: ResolversTypes['Agency'] + organization: ResolversTypes['Organization'] + originationPeriod: ResolversTypes['ReportingPeriod'] + } + > + Query: ResolverTypeWrapper<{}> + Redwood: ResolverTypeWrapper + ReportingPeriod: ResolverTypeWrapper< + MergePrismaWithSdlTypes< + PrismaReportingPeriod, + MakeRelationsOptional, + AllMappedModels + > + > + Role: ResolverTypeWrapper< + MergePrismaWithSdlTypes< + PrismaRole, + MakeRelationsOptional, + AllMappedModels + > + > + String: ResolverTypeWrapper + Subrecipient: ResolverTypeWrapper< + Omit & { + certifiedBy: Maybe + organization: ResolversTypes['Organization'] + originationUpload: ResolversTypes['Upload'] + } + > + Time: ResolverTypeWrapper + UpdateAgencyInput: UpdateAgencyInput + UpdateExpenditureCategoryInput: UpdateExpenditureCategoryInput + UpdateInputTemplateInput: UpdateInputTemplateInput + UpdateOrganizationInput: UpdateOrganizationInput + UpdateOutputTemplateInput: UpdateOutputTemplateInput + UpdateProjectInput: UpdateProjectInput + UpdateReportingPeriodInput: UpdateReportingPeriodInput + UpdateRoleInput: UpdateRoleInput + UpdateSubrecipientInput: UpdateSubrecipientInput + UpdateUploadInput: UpdateUploadInput + UpdateUploadValidationInput: UpdateUploadValidationInput + UpdateUserInput: UpdateUserInput + Upload: ResolverTypeWrapper< + MergePrismaWithSdlTypes< + PrismaUpload, + MakeRelationsOptional, + AllMappedModels + > + > + UploadValidation: ResolverTypeWrapper< + MergePrismaWithSdlTypes< + PrismaUploadValidation, + MakeRelationsOptional, + AllMappedModels + > + > + User: ResolverTypeWrapper< + MergePrismaWithSdlTypes< + PrismaUser, + MakeRelationsOptional, + AllMappedModels + > + > +} /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { - Agency: MergePrismaWithSdlTypes, AllMappedModels>; - BigInt: Scalars['BigInt']; - Boolean: Scalars['Boolean']; - CreateAgencyInput: CreateAgencyInput; - CreateExpenditureCategoryInput: CreateExpenditureCategoryInput; - CreateInputTemplateInput: CreateInputTemplateInput; - CreateOrganizationInput: CreateOrganizationInput; - CreateOutputTemplateInput: CreateOutputTemplateInput; - CreateProjectInput: CreateProjectInput; - CreateReportingPeriodInput: CreateReportingPeriodInput; - CreateRoleInput: CreateRoleInput; - CreateSubrecipientInput: CreateSubrecipientInput; - CreateUploadInput: CreateUploadInput; - CreateUploadValidationInput: CreateUploadValidationInput; - CreateUserInput: CreateUserInput; - Date: Scalars['Date']; - DateTime: Scalars['DateTime']; - ExpenditureCategory: MergePrismaWithSdlTypes, AllMappedModels>; - InputTemplate: MergePrismaWithSdlTypes, AllMappedModels>; - Int: Scalars['Int']; - JSON: Scalars['JSON']; - JSONObject: Scalars['JSONObject']; - Mutation: {}; - Organization: MergePrismaWithSdlTypes, AllMappedModels>; - OutputTemplate: MergePrismaWithSdlTypes, AllMappedModels>; - Project: MergePrismaWithSdlTypes, AllMappedModels>; - Query: {}; - Redwood: Redwood; - ReportingPeriod: MergePrismaWithSdlTypes, AllMappedModels>; - Role: MergePrismaWithSdlTypes, AllMappedModels>; - String: Scalars['String']; - Subrecipient: MergePrismaWithSdlTypes, AllMappedModels>; - Time: Scalars['Time']; - UpdateAgencyInput: UpdateAgencyInput; - UpdateExpenditureCategoryInput: UpdateExpenditureCategoryInput; - UpdateInputTemplateInput: UpdateInputTemplateInput; - UpdateOrganizationInput: UpdateOrganizationInput; - UpdateOutputTemplateInput: UpdateOutputTemplateInput; - UpdateProjectInput: UpdateProjectInput; - UpdateReportingPeriodInput: UpdateReportingPeriodInput; - UpdateRoleInput: UpdateRoleInput; - UpdateSubrecipientInput: UpdateSubrecipientInput; - UpdateUploadInput: UpdateUploadInput; - UpdateUploadValidationInput: UpdateUploadValidationInput; - UpdateUserInput: UpdateUserInput; - Upload: MergePrismaWithSdlTypes, AllMappedModels>; - UploadValidation: MergePrismaWithSdlTypes, AllMappedModels>; - User: MergePrismaWithSdlTypes, AllMappedModels>; -}; + Agency: MergePrismaWithSdlTypes< + PrismaAgency, + MakeRelationsOptional, + AllMappedModels + > + BigInt: Scalars['BigInt'] + Boolean: Scalars['Boolean'] + CreateAgencyInput: CreateAgencyInput + CreateExpenditureCategoryInput: CreateExpenditureCategoryInput + CreateInputTemplateInput: CreateInputTemplateInput + CreateOrganizationInput: CreateOrganizationInput + CreateOutputTemplateInput: CreateOutputTemplateInput + CreateProjectInput: CreateProjectInput + CreateReportingPeriodInput: CreateReportingPeriodInput + CreateRoleInput: CreateRoleInput + CreateSubrecipientInput: CreateSubrecipientInput + CreateUploadInput: CreateUploadInput + CreateUploadValidationInput: CreateUploadValidationInput + CreateUserInput: CreateUserInput + Date: Scalars['Date'] + DateTime: Scalars['DateTime'] + ExpenditureCategory: MergePrismaWithSdlTypes< + PrismaExpenditureCategory, + MakeRelationsOptional, + AllMappedModels + > + InputTemplate: MergePrismaWithSdlTypes< + PrismaInputTemplate, + MakeRelationsOptional, + AllMappedModels + > + Int: Scalars['Int'] + JSON: Scalars['JSON'] + JSONObject: Scalars['JSONObject'] + Mutation: {} + Organization: MergePrismaWithSdlTypes< + PrismaOrganization, + MakeRelationsOptional, + AllMappedModels + > + OutputTemplate: MergePrismaWithSdlTypes< + PrismaOutputTemplate, + MakeRelationsOptional, + AllMappedModels + > + Project: Omit & { + agency: ResolversParentTypes['Agency'] + organization: ResolversParentTypes['Organization'] + originationPeriod: ResolversParentTypes['ReportingPeriod'] + } + Query: {} + Redwood: Redwood + ReportingPeriod: MergePrismaWithSdlTypes< + PrismaReportingPeriod, + MakeRelationsOptional, + AllMappedModels + > + Role: MergePrismaWithSdlTypes< + PrismaRole, + MakeRelationsOptional, + AllMappedModels + > + String: Scalars['String'] + Subrecipient: Omit< + Subrecipient, + 'certifiedBy' | 'organization' | 'originationUpload' + > & { + certifiedBy: Maybe + organization: ResolversParentTypes['Organization'] + originationUpload: ResolversParentTypes['Upload'] + } + Time: Scalars['Time'] + UpdateAgencyInput: UpdateAgencyInput + UpdateExpenditureCategoryInput: UpdateExpenditureCategoryInput + UpdateInputTemplateInput: UpdateInputTemplateInput + UpdateOrganizationInput: UpdateOrganizationInput + UpdateOutputTemplateInput: UpdateOutputTemplateInput + UpdateProjectInput: UpdateProjectInput + UpdateReportingPeriodInput: UpdateReportingPeriodInput + UpdateRoleInput: UpdateRoleInput + UpdateSubrecipientInput: UpdateSubrecipientInput + UpdateUploadInput: UpdateUploadInput + UpdateUploadValidationInput: UpdateUploadValidationInput + UpdateUserInput: UpdateUserInput + Upload: MergePrismaWithSdlTypes< + PrismaUpload, + MakeRelationsOptional, + AllMappedModels + > + UploadValidation: MergePrismaWithSdlTypes< + PrismaUploadValidation, + MakeRelationsOptional, + AllMappedModels + > + User: MergePrismaWithSdlTypes< + PrismaUser, + MakeRelationsOptional, + AllMappedModels + > +} export type requireAuthDirectiveArgs = { - roles?: Maybe>>; -}; - -export type requireAuthDirectiveResolver = DirectiveResolverFn; - -export type skipAuthDirectiveArgs = { }; - -export type skipAuthDirectiveResolver = DirectiveResolverFn; - -export type AgencyResolvers = { - abbreviation: OptArgsResolverFn, ParentType, ContextType>; - code: OptArgsResolverFn; - id: OptArgsResolverFn; - name: OptArgsResolverFn; - organizationId: OptArgsResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type AgencyRelationResolvers = { - abbreviation?: RequiredResolverFn, ParentType, ContextType>; - code?: RequiredResolverFn; - id?: RequiredResolverFn; - name?: RequiredResolverFn; - organizationId?: RequiredResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export interface BigIntScalarConfig extends GraphQLScalarTypeConfig { - name: 'BigInt'; -} - -export interface DateScalarConfig extends GraphQLScalarTypeConfig { - name: 'Date'; -} - -export interface DateTimeScalarConfig extends GraphQLScalarTypeConfig { - name: 'DateTime'; -} - -export type ExpenditureCategoryResolvers = { - Uploads: OptArgsResolverFn>, ParentType, ContextType>; - code: OptArgsResolverFn; - createdAt: OptArgsResolverFn; - id: OptArgsResolverFn; - name: OptArgsResolverFn; - updatedAt: OptArgsResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type ExpenditureCategoryRelationResolvers = { - Uploads?: RequiredResolverFn>, ParentType, ContextType>; - code?: RequiredResolverFn; - createdAt?: RequiredResolverFn; - id?: RequiredResolverFn; - name?: RequiredResolverFn; - updatedAt?: RequiredResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type InputTemplateResolvers = { - createdAt: OptArgsResolverFn; - effectiveDate: OptArgsResolverFn; - id: OptArgsResolverFn; - name: OptArgsResolverFn; - reportingPeriods: OptArgsResolverFn>, ParentType, ContextType>; - rulesGeneratedAt: OptArgsResolverFn; - updatedAt: OptArgsResolverFn; - version: OptArgsResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type InputTemplateRelationResolvers = { - createdAt?: RequiredResolverFn; - effectiveDate?: RequiredResolverFn; - id?: RequiredResolverFn; - name?: RequiredResolverFn; - reportingPeriods?: RequiredResolverFn>, ParentType, ContextType>; - rulesGeneratedAt?: RequiredResolverFn; - updatedAt?: RequiredResolverFn; - version?: RequiredResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export interface JSONScalarConfig extends GraphQLScalarTypeConfig { - name: 'JSON'; -} - -export interface JSONObjectScalarConfig extends GraphQLScalarTypeConfig { - name: 'JSONObject'; -} - -export type MutationResolvers = { - createAgency: Resolver>; - createExpenditureCategory: Resolver>; - createInputTemplate: Resolver>; - createOrganization: Resolver>; - createOutputTemplate: Resolver>; - createProject: Resolver>; - createReportingPeriod: Resolver>; - createRole: Resolver>; - createSubrecipient: Resolver>; - createUpload: Resolver>; - createUploadValidation: Resolver>; - createUser: Resolver>; - deleteAgency: Resolver>; - deleteExpenditureCategory: Resolver>; - deleteInputTemplate: Resolver>; - deleteOrganization: Resolver>; - deleteOutputTemplate: Resolver>; - deleteProject: Resolver>; - deleteReportingPeriod: Resolver>; - deleteRole: Resolver>; - deleteSubrecipient: Resolver>; - deleteUpload: Resolver>; - deleteUploadValidation: Resolver>; - deleteUser: Resolver>; - updateAgency: Resolver>; - updateExpenditureCategory: Resolver>; - updateInputTemplate: Resolver>; - updateOrganization: Resolver>; - updateOutputTemplate: Resolver>; - updateProject: Resolver>; - updateReportingPeriod: Resolver>; - updateRole: Resolver>; - updateSubrecipient: Resolver>; - updateUpload: Resolver>; - updateUploadValidation: Resolver>; - updateUser: Resolver>; -}; - -export type MutationRelationResolvers = { - createAgency?: RequiredResolverFn>; - createExpenditureCategory?: RequiredResolverFn>; - createInputTemplate?: RequiredResolverFn>; - createOrganization?: RequiredResolverFn>; - createOutputTemplate?: RequiredResolverFn>; - createProject?: RequiredResolverFn>; - createReportingPeriod?: RequiredResolverFn>; - createRole?: RequiredResolverFn>; - createSubrecipient?: RequiredResolverFn>; - createUpload?: RequiredResolverFn>; - createUploadValidation?: RequiredResolverFn>; - createUser?: RequiredResolverFn>; - deleteAgency?: RequiredResolverFn>; - deleteExpenditureCategory?: RequiredResolverFn>; - deleteInputTemplate?: RequiredResolverFn>; - deleteOrganization?: RequiredResolverFn>; - deleteOutputTemplate?: RequiredResolverFn>; - deleteProject?: RequiredResolverFn>; - deleteReportingPeriod?: RequiredResolverFn>; - deleteRole?: RequiredResolverFn>; - deleteSubrecipient?: RequiredResolverFn>; - deleteUpload?: RequiredResolverFn>; - deleteUploadValidation?: RequiredResolverFn>; - deleteUser?: RequiredResolverFn>; - updateAgency?: RequiredResolverFn>; - updateExpenditureCategory?: RequiredResolverFn>; - updateInputTemplate?: RequiredResolverFn>; - updateOrganization?: RequiredResolverFn>; - updateOutputTemplate?: RequiredResolverFn>; - updateProject?: RequiredResolverFn>; - updateReportingPeriod?: RequiredResolverFn>; - updateRole?: RequiredResolverFn>; - updateSubrecipient?: RequiredResolverFn>; - updateUpload?: RequiredResolverFn>; - updateUploadValidation?: RequiredResolverFn>; - updateUser?: RequiredResolverFn>; -}; - -export type OrganizationResolvers = { - agencies: OptArgsResolverFn>, ParentType, ContextType>; - id: OptArgsResolverFn; - name: OptArgsResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type OrganizationRelationResolvers = { - agencies?: RequiredResolverFn>, ParentType, ContextType>; - id?: RequiredResolverFn; - name?: RequiredResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type OutputTemplateResolvers = { - createdAt: OptArgsResolverFn; - effectiveDate: OptArgsResolverFn; - id: OptArgsResolverFn; - name: OptArgsResolverFn; - reportingPeriods: OptArgsResolverFn>, ParentType, ContextType>; - rulesGeneratedAt: OptArgsResolverFn; - updatedAt: OptArgsResolverFn; - version: OptArgsResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type OutputTemplateRelationResolvers = { - createdAt?: RequiredResolverFn; - effectiveDate?: RequiredResolverFn; - id?: RequiredResolverFn; - name?: RequiredResolverFn; - reportingPeriods?: RequiredResolverFn>, ParentType, ContextType>; - rulesGeneratedAt?: RequiredResolverFn; - updatedAt?: RequiredResolverFn; - version?: RequiredResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type ProjectResolvers = { - agency: OptArgsResolverFn; - agencyId: OptArgsResolverFn; - code: OptArgsResolverFn; - createdAt: OptArgsResolverFn; - description: OptArgsResolverFn; - id: OptArgsResolverFn; - name: OptArgsResolverFn; - organization: OptArgsResolverFn; - organizationId: OptArgsResolverFn; - originationPeriod: OptArgsResolverFn; - originationPeriodId: OptArgsResolverFn; - status: OptArgsResolverFn; - updatedAt: OptArgsResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type ProjectRelationResolvers = { - agency?: RequiredResolverFn; - agencyId?: RequiredResolverFn; - code?: RequiredResolverFn; - createdAt?: RequiredResolverFn; - description?: RequiredResolverFn; - id?: RequiredResolverFn; - name?: RequiredResolverFn; - organization?: RequiredResolverFn; - organizationId?: RequiredResolverFn; - originationPeriod?: RequiredResolverFn; - originationPeriodId?: RequiredResolverFn; - status?: RequiredResolverFn; - updatedAt?: RequiredResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type QueryResolvers = { - agencies: OptArgsResolverFn, ParentType, ContextType>; - agenciesByOrganization: Resolver, ParentType, ContextType, RequireFields>; - agency: Resolver, ParentType, ContextType, RequireFields>; - expenditureCategories: OptArgsResolverFn, ParentType, ContextType>; - expenditureCategory: Resolver, ParentType, ContextType, RequireFields>; - inputTemplate: Resolver, ParentType, ContextType, RequireFields>; - inputTemplates: OptArgsResolverFn, ParentType, ContextType>; - organization: Resolver, ParentType, ContextType, RequireFields>; - organizations: OptArgsResolverFn, ParentType, ContextType>; - outputTemplate: Resolver, ParentType, ContextType, RequireFields>; - outputTemplates: OptArgsResolverFn, ParentType, ContextType>; - project: Resolver, ParentType, ContextType, RequireFields>; - projects: OptArgsResolverFn, ParentType, ContextType>; - redwood: OptArgsResolverFn, ParentType, ContextType>; - reportingPeriod: Resolver, ParentType, ContextType, RequireFields>; - reportingPeriods: OptArgsResolverFn, ParentType, ContextType>; - role: Resolver, ParentType, ContextType, RequireFields>; - roles: OptArgsResolverFn, ParentType, ContextType>; - subrecipient: Resolver, ParentType, ContextType, RequireFields>; - subrecipients: OptArgsResolverFn, ParentType, ContextType>; - upload: Resolver, ParentType, ContextType, RequireFields>; - uploadValidation: Resolver, ParentType, ContextType, RequireFields>; - uploadValidations: OptArgsResolverFn, ParentType, ContextType>; - uploads: OptArgsResolverFn, ParentType, ContextType>; - user: Resolver, ParentType, ContextType, RequireFields>; - users: OptArgsResolverFn, ParentType, ContextType>; -}; - -export type QueryRelationResolvers = { - agencies?: RequiredResolverFn, ParentType, ContextType>; - agenciesByOrganization?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - agency?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - expenditureCategories?: RequiredResolverFn, ParentType, ContextType>; - expenditureCategory?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - inputTemplate?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - inputTemplates?: RequiredResolverFn, ParentType, ContextType>; - organization?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - organizations?: RequiredResolverFn, ParentType, ContextType>; - outputTemplate?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - outputTemplates?: RequiredResolverFn, ParentType, ContextType>; - project?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - projects?: RequiredResolverFn, ParentType, ContextType>; - redwood?: RequiredResolverFn, ParentType, ContextType>; - reportingPeriod?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - reportingPeriods?: RequiredResolverFn, ParentType, ContextType>; - role?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - roles?: RequiredResolverFn, ParentType, ContextType>; - subrecipient?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - subrecipients?: RequiredResolverFn, ParentType, ContextType>; - upload?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - uploadValidation?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - uploadValidations?: RequiredResolverFn, ParentType, ContextType>; - uploads?: RequiredResolverFn, ParentType, ContextType>; - user?: RequiredResolverFn, ParentType, ContextType, RequireFields>; - users?: RequiredResolverFn, ParentType, ContextType>; -}; - -export type RedwoodResolvers = { - currentUser: OptArgsResolverFn, ParentType, ContextType>; - prismaVersion: OptArgsResolverFn, ParentType, ContextType>; - version: OptArgsResolverFn, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type RedwoodRelationResolvers = { - currentUser?: RequiredResolverFn, ParentType, ContextType>; - prismaVersion?: RequiredResolverFn, ParentType, ContextType>; - version?: RequiredResolverFn, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type ReportingPeriodResolvers = { - certifiedAt: OptArgsResolverFn, ParentType, ContextType>; - certifiedBy: OptArgsResolverFn, ParentType, ContextType>; - certifiedById: OptArgsResolverFn, ParentType, ContextType>; - createdAt: OptArgsResolverFn; - endDate: OptArgsResolverFn; - id: OptArgsResolverFn; - inputTemplate: OptArgsResolverFn; - inputTemplateId: OptArgsResolverFn; - isCurrentPeriod: OptArgsResolverFn; - name: OptArgsResolverFn; - outputTemplate: OptArgsResolverFn; - outputTemplateId: OptArgsResolverFn; - startDate: OptArgsResolverFn; - updatedAt: OptArgsResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type ReportingPeriodRelationResolvers = { - certifiedAt?: RequiredResolverFn, ParentType, ContextType>; - certifiedBy?: RequiredResolverFn, ParentType, ContextType>; - certifiedById?: RequiredResolverFn, ParentType, ContextType>; - createdAt?: RequiredResolverFn; - endDate?: RequiredResolverFn; - id?: RequiredResolverFn; - inputTemplate?: RequiredResolverFn; - inputTemplateId?: RequiredResolverFn; - isCurrentPeriod?: RequiredResolverFn; - name?: RequiredResolverFn; - outputTemplate?: RequiredResolverFn; - outputTemplateId?: RequiredResolverFn; - startDate?: RequiredResolverFn; - updatedAt?: RequiredResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type RoleResolvers = { - createdAt: OptArgsResolverFn; - id: OptArgsResolverFn; - name: OptArgsResolverFn; - updatedAt: OptArgsResolverFn; - users: OptArgsResolverFn>, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type RoleRelationResolvers = { - createdAt?: RequiredResolverFn; - id?: RequiredResolverFn; - name?: RequiredResolverFn; - updatedAt?: RequiredResolverFn; - users?: RequiredResolverFn>, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type SubrecipientResolvers = { - certifiedAt: OptArgsResolverFn, ParentType, ContextType>; - certifiedBy: OptArgsResolverFn, ParentType, ContextType>; - certifiedById: OptArgsResolverFn, ParentType, ContextType>; - createdAt: OptArgsResolverFn; - endDate: OptArgsResolverFn; - id: OptArgsResolverFn; - name: OptArgsResolverFn; - organization: OptArgsResolverFn; - organizationId: OptArgsResolverFn; - originationUpload: OptArgsResolverFn; - originationUploadId: OptArgsResolverFn; - startDate: OptArgsResolverFn; - updatedAt: OptArgsResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type SubrecipientRelationResolvers = { - certifiedAt?: RequiredResolverFn, ParentType, ContextType>; - certifiedBy?: RequiredResolverFn, ParentType, ContextType>; - certifiedById?: RequiredResolverFn, ParentType, ContextType>; - createdAt?: RequiredResolverFn; - endDate?: RequiredResolverFn; - id?: RequiredResolverFn; - name?: RequiredResolverFn; - organization?: RequiredResolverFn; - organizationId?: RequiredResolverFn; - originationUpload?: RequiredResolverFn; - originationUploadId?: RequiredResolverFn; - startDate?: RequiredResolverFn; - updatedAt?: RequiredResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export interface TimeScalarConfig extends GraphQLScalarTypeConfig { - name: 'Time'; -} - -export type UploadResolvers = { - agency: OptArgsResolverFn; - agencyId: OptArgsResolverFn; - createdAt: OptArgsResolverFn; - expenditureCategory: OptArgsResolverFn; - expenditureCategoryId: OptArgsResolverFn; - filename: OptArgsResolverFn; - id: OptArgsResolverFn; - organization: OptArgsResolverFn; - organizationId: OptArgsResolverFn; - reportingPeriod: OptArgsResolverFn; - reportingPeriodId: OptArgsResolverFn; - updatedAt: OptArgsResolverFn; - uploadedBy: OptArgsResolverFn; - uploadedById: OptArgsResolverFn; - validations: OptArgsResolverFn>, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type UploadRelationResolvers = { - agency?: RequiredResolverFn; - agencyId?: RequiredResolverFn; - createdAt?: RequiredResolverFn; - expenditureCategory?: RequiredResolverFn; - expenditureCategoryId?: RequiredResolverFn; - filename?: RequiredResolverFn; - id?: RequiredResolverFn; - organization?: RequiredResolverFn; - organizationId?: RequiredResolverFn; - reportingPeriod?: RequiredResolverFn; - reportingPeriodId?: RequiredResolverFn; - updatedAt?: RequiredResolverFn; - uploadedBy?: RequiredResolverFn; - uploadedById?: RequiredResolverFn; - validations?: RequiredResolverFn>, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type UploadValidationResolvers = { - agency: OptArgsResolverFn; - agencyId: OptArgsResolverFn; - createdAt: OptArgsResolverFn; - id: OptArgsResolverFn; - inputTemplate: OptArgsResolverFn; - inputTemplateId: OptArgsResolverFn; - invalidatedAt: OptArgsResolverFn, ParentType, ContextType>; - invalidatedBy: OptArgsResolverFn, ParentType, ContextType>; - invalidatedById: OptArgsResolverFn, ParentType, ContextType>; - invalidationResults: OptArgsResolverFn, ParentType, ContextType>; - organization: OptArgsResolverFn; - organizationId: OptArgsResolverFn; - updatedAt: OptArgsResolverFn; - upload: OptArgsResolverFn; - uploadId: OptArgsResolverFn; - validatedAt: OptArgsResolverFn, ParentType, ContextType>; - validatedBy: OptArgsResolverFn, ParentType, ContextType>; - validatedById: OptArgsResolverFn, ParentType, ContextType>; - validationResults: OptArgsResolverFn, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type UploadValidationRelationResolvers = { - agency?: RequiredResolverFn; - agencyId?: RequiredResolverFn; - createdAt?: RequiredResolverFn; - id?: RequiredResolverFn; - inputTemplate?: RequiredResolverFn; - inputTemplateId?: RequiredResolverFn; - invalidatedAt?: RequiredResolverFn, ParentType, ContextType>; - invalidatedBy?: RequiredResolverFn, ParentType, ContextType>; - invalidatedById?: RequiredResolverFn, ParentType, ContextType>; - invalidationResults?: RequiredResolverFn, ParentType, ContextType>; - organization?: RequiredResolverFn; - organizationId?: RequiredResolverFn; - updatedAt?: RequiredResolverFn; - upload?: RequiredResolverFn; - uploadId?: RequiredResolverFn; - validatedAt?: RequiredResolverFn, ParentType, ContextType>; - validatedBy?: RequiredResolverFn, ParentType, ContextType>; - validatedById?: RequiredResolverFn, ParentType, ContextType>; - validationResults?: RequiredResolverFn, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type UserResolvers = { - agency: OptArgsResolverFn, ParentType, ContextType>; - agencyId: OptArgsResolverFn, ParentType, ContextType>; - certified: OptArgsResolverFn>, ParentType, ContextType>; - createdAt: OptArgsResolverFn; - email: OptArgsResolverFn; - id: OptArgsResolverFn; - name: OptArgsResolverFn, ParentType, ContextType>; - organization: OptArgsResolverFn; - organizationId: OptArgsResolverFn; - role: OptArgsResolverFn, ParentType, ContextType>; - roleId: OptArgsResolverFn, ParentType, ContextType>; - updatedAt: OptArgsResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type UserRelationResolvers = { - agency?: RequiredResolverFn, ParentType, ContextType>; - agencyId?: RequiredResolverFn, ParentType, ContextType>; - certified?: RequiredResolverFn>, ParentType, ContextType>; - createdAt?: RequiredResolverFn; - email?: RequiredResolverFn; - id?: RequiredResolverFn; - name?: RequiredResolverFn, ParentType, ContextType>; - organization?: RequiredResolverFn; - organizationId?: RequiredResolverFn; - role?: RequiredResolverFn, ParentType, ContextType>; - roleId?: RequiredResolverFn, ParentType, ContextType>; - updatedAt?: RequiredResolverFn; - __isTypeOf?: IsTypeOfResolverFn; -}; + roles?: Maybe>> +} + +export type requireAuthDirectiveResolver< + Result, + Parent, + ContextType = RedwoodGraphQLContext, + Args = requireAuthDirectiveArgs +> = DirectiveResolverFn + +export type skipAuthDirectiveArgs = {} + +export type skipAuthDirectiveResolver< + Result, + Parent, + ContextType = RedwoodGraphQLContext, + Args = skipAuthDirectiveArgs +> = DirectiveResolverFn + +export type AgencyResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Agency'] = ResolversParentTypes['Agency'] +> = { + abbreviation: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + code: OptArgsResolverFn + id: OptArgsResolverFn + name: OptArgsResolverFn + organizationId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type AgencyRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Agency'] = ResolversParentTypes['Agency'] +> = { + abbreviation?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + code?: RequiredResolverFn + id?: RequiredResolverFn + name?: RequiredResolverFn + organizationId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export interface BigIntScalarConfig + extends GraphQLScalarTypeConfig { + name: 'BigInt' +} + +export interface DateScalarConfig + extends GraphQLScalarTypeConfig { + name: 'Date' +} + +export interface DateTimeScalarConfig + extends GraphQLScalarTypeConfig { + name: 'DateTime' +} + +export type ExpenditureCategoryResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['ExpenditureCategory'] = ResolversParentTypes['ExpenditureCategory'] +> = { + Uploads: OptArgsResolverFn< + Array>, + ParentType, + ContextType + > + code: OptArgsResolverFn + createdAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id: OptArgsResolverFn + name: OptArgsResolverFn + updatedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type ExpenditureCategoryRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['ExpenditureCategory'] = ResolversParentTypes['ExpenditureCategory'] +> = { + Uploads?: RequiredResolverFn< + Array>, + ParentType, + ContextType + > + code?: RequiredResolverFn + createdAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id?: RequiredResolverFn + name?: RequiredResolverFn + updatedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type InputTemplateResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['InputTemplate'] = ResolversParentTypes['InputTemplate'] +> = { + createdAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + effectiveDate: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id: OptArgsResolverFn + name: OptArgsResolverFn + reportingPeriods: OptArgsResolverFn< + Array>, + ParentType, + ContextType + > + rulesGeneratedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + updatedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + version: OptArgsResolverFn + __isTypeOf?: IsTypeOfResolverFn +} + +export type InputTemplateRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['InputTemplate'] = ResolversParentTypes['InputTemplate'] +> = { + createdAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + effectiveDate?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id?: RequiredResolverFn + name?: RequiredResolverFn + reportingPeriods?: RequiredResolverFn< + Array>, + ParentType, + ContextType + > + rulesGeneratedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + updatedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + version?: RequiredResolverFn< + ResolversTypes['String'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export interface JSONScalarConfig + extends GraphQLScalarTypeConfig { + name: 'JSON' +} + +export interface JSONObjectScalarConfig + extends GraphQLScalarTypeConfig { + name: 'JSONObject' +} + +export type MutationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Mutation'] = ResolversParentTypes['Mutation'] +> = { + createAgency: Resolver< + ResolversTypes['Agency'], + ParentType, + ContextType, + RequireFields + > + createExpenditureCategory: Resolver< + ResolversTypes['ExpenditureCategory'], + ParentType, + ContextType, + RequireFields + > + createInputTemplate: Resolver< + ResolversTypes['InputTemplate'], + ParentType, + ContextType, + RequireFields + > + createOrganization: Resolver< + ResolversTypes['Organization'], + ParentType, + ContextType, + RequireFields + > + createOutputTemplate: Resolver< + ResolversTypes['OutputTemplate'], + ParentType, + ContextType, + RequireFields + > + createProject: Resolver< + ResolversTypes['Project'], + ParentType, + ContextType, + RequireFields + > + createReportingPeriod: Resolver< + ResolversTypes['ReportingPeriod'], + ParentType, + ContextType, + RequireFields + > + createRole: Resolver< + ResolversTypes['Role'], + ParentType, + ContextType, + RequireFields + > + createSubrecipient: Resolver< + ResolversTypes['Subrecipient'], + ParentType, + ContextType, + RequireFields + > + createUpload: Resolver< + ResolversTypes['Upload'], + ParentType, + ContextType, + RequireFields + > + createUploadValidation: Resolver< + ResolversTypes['UploadValidation'], + ParentType, + ContextType, + RequireFields + > + createUser: Resolver< + ResolversTypes['User'], + ParentType, + ContextType, + RequireFields + > + deleteAgency: Resolver< + ResolversTypes['Agency'], + ParentType, + ContextType, + RequireFields + > + deleteExpenditureCategory: Resolver< + ResolversTypes['ExpenditureCategory'], + ParentType, + ContextType, + RequireFields + > + deleteInputTemplate: Resolver< + ResolversTypes['InputTemplate'], + ParentType, + ContextType, + RequireFields + > + deleteOrganization: Resolver< + ResolversTypes['Organization'], + ParentType, + ContextType, + RequireFields + > + deleteOutputTemplate: Resolver< + ResolversTypes['OutputTemplate'], + ParentType, + ContextType, + RequireFields + > + deleteProject: Resolver< + ResolversTypes['Project'], + ParentType, + ContextType, + RequireFields + > + deleteReportingPeriod: Resolver< + ResolversTypes['ReportingPeriod'], + ParentType, + ContextType, + RequireFields + > + deleteRole: Resolver< + ResolversTypes['Role'], + ParentType, + ContextType, + RequireFields + > + deleteSubrecipient: Resolver< + ResolversTypes['Subrecipient'], + ParentType, + ContextType, + RequireFields + > + deleteUpload: Resolver< + ResolversTypes['Upload'], + ParentType, + ContextType, + RequireFields + > + deleteUploadValidation: Resolver< + ResolversTypes['UploadValidation'], + ParentType, + ContextType, + RequireFields + > + deleteUser: Resolver< + ResolversTypes['User'], + ParentType, + ContextType, + RequireFields + > + updateAgency: Resolver< + ResolversTypes['Agency'], + ParentType, + ContextType, + RequireFields + > + updateExpenditureCategory: Resolver< + ResolversTypes['ExpenditureCategory'], + ParentType, + ContextType, + RequireFields + > + updateInputTemplate: Resolver< + ResolversTypes['InputTemplate'], + ParentType, + ContextType, + RequireFields + > + updateOrganization: Resolver< + ResolversTypes['Organization'], + ParentType, + ContextType, + RequireFields + > + updateOutputTemplate: Resolver< + ResolversTypes['OutputTemplate'], + ParentType, + ContextType, + RequireFields + > + updateProject: Resolver< + ResolversTypes['Project'], + ParentType, + ContextType, + RequireFields + > + updateReportingPeriod: Resolver< + ResolversTypes['ReportingPeriod'], + ParentType, + ContextType, + RequireFields + > + updateRole: Resolver< + ResolversTypes['Role'], + ParentType, + ContextType, + RequireFields + > + updateSubrecipient: Resolver< + ResolversTypes['Subrecipient'], + ParentType, + ContextType, + RequireFields + > + updateUpload: Resolver< + ResolversTypes['Upload'], + ParentType, + ContextType, + RequireFields + > + updateUploadValidation: Resolver< + ResolversTypes['UploadValidation'], + ParentType, + ContextType, + RequireFields + > + updateUser: Resolver< + ResolversTypes['User'], + ParentType, + ContextType, + RequireFields + > +} + +export type MutationRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Mutation'] = ResolversParentTypes['Mutation'] +> = { + createAgency?: RequiredResolverFn< + ResolversTypes['Agency'], + ParentType, + ContextType, + RequireFields + > + createExpenditureCategory?: RequiredResolverFn< + ResolversTypes['ExpenditureCategory'], + ParentType, + ContextType, + RequireFields + > + createInputTemplate?: RequiredResolverFn< + ResolversTypes['InputTemplate'], + ParentType, + ContextType, + RequireFields + > + createOrganization?: RequiredResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType, + RequireFields + > + createOutputTemplate?: RequiredResolverFn< + ResolversTypes['OutputTemplate'], + ParentType, + ContextType, + RequireFields + > + createProject?: RequiredResolverFn< + ResolversTypes['Project'], + ParentType, + ContextType, + RequireFields + > + createReportingPeriod?: RequiredResolverFn< + ResolversTypes['ReportingPeriod'], + ParentType, + ContextType, + RequireFields + > + createRole?: RequiredResolverFn< + ResolversTypes['Role'], + ParentType, + ContextType, + RequireFields + > + createSubrecipient?: RequiredResolverFn< + ResolversTypes['Subrecipient'], + ParentType, + ContextType, + RequireFields + > + createUpload?: RequiredResolverFn< + ResolversTypes['Upload'], + ParentType, + ContextType, + RequireFields + > + createUploadValidation?: RequiredResolverFn< + ResolversTypes['UploadValidation'], + ParentType, + ContextType, + RequireFields + > + createUser?: RequiredResolverFn< + ResolversTypes['User'], + ParentType, + ContextType, + RequireFields + > + deleteAgency?: RequiredResolverFn< + ResolversTypes['Agency'], + ParentType, + ContextType, + RequireFields + > + deleteExpenditureCategory?: RequiredResolverFn< + ResolversTypes['ExpenditureCategory'], + ParentType, + ContextType, + RequireFields + > + deleteInputTemplate?: RequiredResolverFn< + ResolversTypes['InputTemplate'], + ParentType, + ContextType, + RequireFields + > + deleteOrganization?: RequiredResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType, + RequireFields + > + deleteOutputTemplate?: RequiredResolverFn< + ResolversTypes['OutputTemplate'], + ParentType, + ContextType, + RequireFields + > + deleteProject?: RequiredResolverFn< + ResolversTypes['Project'], + ParentType, + ContextType, + RequireFields + > + deleteReportingPeriod?: RequiredResolverFn< + ResolversTypes['ReportingPeriod'], + ParentType, + ContextType, + RequireFields + > + deleteRole?: RequiredResolverFn< + ResolversTypes['Role'], + ParentType, + ContextType, + RequireFields + > + deleteSubrecipient?: RequiredResolverFn< + ResolversTypes['Subrecipient'], + ParentType, + ContextType, + RequireFields + > + deleteUpload?: RequiredResolverFn< + ResolversTypes['Upload'], + ParentType, + ContextType, + RequireFields + > + deleteUploadValidation?: RequiredResolverFn< + ResolversTypes['UploadValidation'], + ParentType, + ContextType, + RequireFields + > + deleteUser?: RequiredResolverFn< + ResolversTypes['User'], + ParentType, + ContextType, + RequireFields + > + updateAgency?: RequiredResolverFn< + ResolversTypes['Agency'], + ParentType, + ContextType, + RequireFields + > + updateExpenditureCategory?: RequiredResolverFn< + ResolversTypes['ExpenditureCategory'], + ParentType, + ContextType, + RequireFields + > + updateInputTemplate?: RequiredResolverFn< + ResolversTypes['InputTemplate'], + ParentType, + ContextType, + RequireFields + > + updateOrganization?: RequiredResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType, + RequireFields + > + updateOutputTemplate?: RequiredResolverFn< + ResolversTypes['OutputTemplate'], + ParentType, + ContextType, + RequireFields + > + updateProject?: RequiredResolverFn< + ResolversTypes['Project'], + ParentType, + ContextType, + RequireFields + > + updateReportingPeriod?: RequiredResolverFn< + ResolversTypes['ReportingPeriod'], + ParentType, + ContextType, + RequireFields + > + updateRole?: RequiredResolverFn< + ResolversTypes['Role'], + ParentType, + ContextType, + RequireFields + > + updateSubrecipient?: RequiredResolverFn< + ResolversTypes['Subrecipient'], + ParentType, + ContextType, + RequireFields + > + updateUpload?: RequiredResolverFn< + ResolversTypes['Upload'], + ParentType, + ContextType, + RequireFields + > + updateUploadValidation?: RequiredResolverFn< + ResolversTypes['UploadValidation'], + ParentType, + ContextType, + RequireFields + > + updateUser?: RequiredResolverFn< + ResolversTypes['User'], + ParentType, + ContextType, + RequireFields + > +} + +export type OrganizationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Organization'] = ResolversParentTypes['Organization'] +> = { + agencies: OptArgsResolverFn< + Array>, + ParentType, + ContextType + > + id: OptArgsResolverFn + name: OptArgsResolverFn + __isTypeOf?: IsTypeOfResolverFn +} + +export type OrganizationRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Organization'] = ResolversParentTypes['Organization'] +> = { + agencies?: RequiredResolverFn< + Array>, + ParentType, + ContextType + > + id?: RequiredResolverFn + name?: RequiredResolverFn + __isTypeOf?: IsTypeOfResolverFn +} + +export type OutputTemplateResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['OutputTemplate'] = ResolversParentTypes['OutputTemplate'] +> = { + createdAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + effectiveDate: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id: OptArgsResolverFn + name: OptArgsResolverFn + reportingPeriods: OptArgsResolverFn< + Array>, + ParentType, + ContextType + > + rulesGeneratedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + updatedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + version: OptArgsResolverFn + __isTypeOf?: IsTypeOfResolverFn +} + +export type OutputTemplateRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['OutputTemplate'] = ResolversParentTypes['OutputTemplate'] +> = { + createdAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + effectiveDate?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id?: RequiredResolverFn + name?: RequiredResolverFn + reportingPeriods?: RequiredResolverFn< + Array>, + ParentType, + ContextType + > + rulesGeneratedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + updatedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + version?: RequiredResolverFn< + ResolversTypes['String'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type ProjectResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Project'] = ResolversParentTypes['Project'] +> = { + agency: OptArgsResolverFn + agencyId: OptArgsResolverFn + code: OptArgsResolverFn + createdAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + description: OptArgsResolverFn< + ResolversTypes['String'], + ParentType, + ContextType + > + id: OptArgsResolverFn + name: OptArgsResolverFn + organization: OptArgsResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType + > + organizationId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + originationPeriod: OptArgsResolverFn< + ResolversTypes['ReportingPeriod'], + ParentType, + ContextType + > + originationPeriodId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + status: OptArgsResolverFn + updatedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type ProjectRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Project'] = ResolversParentTypes['Project'] +> = { + agency?: RequiredResolverFn + agencyId?: RequiredResolverFn + code?: RequiredResolverFn + createdAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + description?: RequiredResolverFn< + ResolversTypes['String'], + ParentType, + ContextType + > + id?: RequiredResolverFn + name?: RequiredResolverFn + organization?: RequiredResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType + > + organizationId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + originationPeriod?: RequiredResolverFn< + ResolversTypes['ReportingPeriod'], + ParentType, + ContextType + > + originationPeriodId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + status?: RequiredResolverFn + updatedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type QueryResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Query'] = ResolversParentTypes['Query'] +> = { + agencies: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + agenciesByOrganization: Resolver< + Array, + ParentType, + ContextType, + RequireFields + > + agency: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + expenditureCategories: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + expenditureCategory: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + inputTemplate: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + inputTemplates: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + organization: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + organizations: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + outputTemplate: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + outputTemplates: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + project: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + projects: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + redwood: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + reportingPeriod: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + reportingPeriods: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + role: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + roles: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + subrecipient: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + subrecipients: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + upload: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + uploadValidation: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + uploadValidations: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + uploads: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + user: Resolver< + Maybe, + ParentType, + ContextType, + RequireFields + > + users: OptArgsResolverFn< + Array, + ParentType, + ContextType + > + usersByOrganization: Resolver< + Array, + ParentType, + ContextType, + RequireFields + > +} + +export type QueryRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Query'] = ResolversParentTypes['Query'] +> = { + agencies?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + agenciesByOrganization?: RequiredResolverFn< + Array, + ParentType, + ContextType, + RequireFields + > + agency?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + expenditureCategories?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + expenditureCategory?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + inputTemplate?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + inputTemplates?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + organization?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + organizations?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + outputTemplate?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + outputTemplates?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + project?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + projects?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + redwood?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + reportingPeriod?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + reportingPeriods?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + role?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + roles?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + subrecipient?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + subrecipients?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + upload?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + uploadValidation?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + uploadValidations?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + uploads?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + user?: RequiredResolverFn< + Maybe, + ParentType, + ContextType, + RequireFields + > + users?: RequiredResolverFn< + Array, + ParentType, + ContextType + > + usersByOrganization?: RequiredResolverFn< + Array, + ParentType, + ContextType, + RequireFields + > +} + +export type RedwoodResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Redwood'] = ResolversParentTypes['Redwood'] +> = { + currentUser: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + prismaVersion: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + version: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type RedwoodRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Redwood'] = ResolversParentTypes['Redwood'] +> = { + currentUser?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + prismaVersion?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + version?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type ReportingPeriodResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['ReportingPeriod'] = ResolversParentTypes['ReportingPeriod'] +> = { + certifiedAt: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + certifiedBy: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + certifiedById: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + createdAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + endDate: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id: OptArgsResolverFn + inputTemplate: OptArgsResolverFn< + ResolversTypes['InputTemplate'], + ParentType, + ContextType + > + inputTemplateId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + isCurrentPeriod: OptArgsResolverFn< + ResolversTypes['Boolean'], + ParentType, + ContextType + > + name: OptArgsResolverFn + outputTemplate: OptArgsResolverFn< + ResolversTypes['OutputTemplate'], + ParentType, + ContextType + > + outputTemplateId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + startDate: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + updatedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type ReportingPeriodRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['ReportingPeriod'] = ResolversParentTypes['ReportingPeriod'] +> = { + certifiedAt?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + certifiedBy?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + certifiedById?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + createdAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + endDate?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id?: RequiredResolverFn + inputTemplate?: RequiredResolverFn< + ResolversTypes['InputTemplate'], + ParentType, + ContextType + > + inputTemplateId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + isCurrentPeriod?: RequiredResolverFn< + ResolversTypes['Boolean'], + ParentType, + ContextType + > + name?: RequiredResolverFn + outputTemplate?: RequiredResolverFn< + ResolversTypes['OutputTemplate'], + ParentType, + ContextType + > + outputTemplateId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + startDate?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + updatedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type RoleResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Role'] = ResolversParentTypes['Role'] +> = { + createdAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id: OptArgsResolverFn + name: OptArgsResolverFn + updatedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + users: OptArgsResolverFn< + Array>, + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type RoleRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Role'] = ResolversParentTypes['Role'] +> = { + createdAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id?: RequiredResolverFn + name?: RequiredResolverFn + updatedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + users?: RequiredResolverFn< + Array>, + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type SubrecipientResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Subrecipient'] = ResolversParentTypes['Subrecipient'] +> = { + certifiedAt: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + certifiedBy: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + certifiedById: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + createdAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + endDate: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id: OptArgsResolverFn + name: OptArgsResolverFn + organization: OptArgsResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType + > + organizationId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + originationUpload: OptArgsResolverFn< + ResolversTypes['Upload'], + ParentType, + ContextType + > + originationUploadId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + startDate: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + updatedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type SubrecipientRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Subrecipient'] = ResolversParentTypes['Subrecipient'] +> = { + certifiedAt?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + certifiedBy?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + certifiedById?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + createdAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + endDate?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id?: RequiredResolverFn + name?: RequiredResolverFn + organization?: RequiredResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType + > + organizationId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + originationUpload?: RequiredResolverFn< + ResolversTypes['Upload'], + ParentType, + ContextType + > + originationUploadId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + startDate?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + updatedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export interface TimeScalarConfig + extends GraphQLScalarTypeConfig { + name: 'Time' +} + +export type UploadResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Upload'] = ResolversParentTypes['Upload'] +> = { + agency: OptArgsResolverFn + agencyId: OptArgsResolverFn + createdAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + expenditureCategory: OptArgsResolverFn< + ResolversTypes['ExpenditureCategory'], + ParentType, + ContextType + > + expenditureCategoryId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + filename: OptArgsResolverFn + id: OptArgsResolverFn + organization: OptArgsResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType + > + organizationId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + reportingPeriod: OptArgsResolverFn< + ResolversTypes['ReportingPeriod'], + ParentType, + ContextType + > + reportingPeriodId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + updatedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + uploadedBy: OptArgsResolverFn + uploadedById: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + validations: OptArgsResolverFn< + Array>, + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type UploadRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['Upload'] = ResolversParentTypes['Upload'] +> = { + agency?: RequiredResolverFn + agencyId?: RequiredResolverFn + createdAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + expenditureCategory?: RequiredResolverFn< + ResolversTypes['ExpenditureCategory'], + ParentType, + ContextType + > + expenditureCategoryId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + filename?: RequiredResolverFn< + ResolversTypes['String'], + ParentType, + ContextType + > + id?: RequiredResolverFn + organization?: RequiredResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType + > + organizationId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + reportingPeriod?: RequiredResolverFn< + ResolversTypes['ReportingPeriod'], + ParentType, + ContextType + > + reportingPeriodId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + updatedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + uploadedBy?: RequiredResolverFn< + ResolversTypes['User'], + ParentType, + ContextType + > + uploadedById?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + validations?: RequiredResolverFn< + Array>, + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type UploadValidationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['UploadValidation'] = ResolversParentTypes['UploadValidation'] +> = { + agency: OptArgsResolverFn + agencyId: OptArgsResolverFn + createdAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id: OptArgsResolverFn + inputTemplate: OptArgsResolverFn< + ResolversTypes['InputTemplate'], + ParentType, + ContextType + > + inputTemplateId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + invalidatedAt: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + invalidatedBy: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + invalidatedById: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + invalidationResults: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + organization: OptArgsResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType + > + organizationId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + updatedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + upload: OptArgsResolverFn + uploadId: OptArgsResolverFn + validatedAt: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + validatedBy: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + validatedById: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + validationResults: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type UploadValidationRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['UploadValidation'] = ResolversParentTypes['UploadValidation'] +> = { + agency?: RequiredResolverFn + agencyId?: RequiredResolverFn + createdAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + id?: RequiredResolverFn + inputTemplate?: RequiredResolverFn< + ResolversTypes['InputTemplate'], + ParentType, + ContextType + > + inputTemplateId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + invalidatedAt?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + invalidatedBy?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + invalidatedById?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + invalidationResults?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + organization?: RequiredResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType + > + organizationId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + updatedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + upload?: RequiredResolverFn + uploadId?: RequiredResolverFn + validatedAt?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + validatedBy?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + validatedById?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + validationResults?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type UserResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['User'] = ResolversParentTypes['User'] +> = { + agency: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + agencyId: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + certified: OptArgsResolverFn< + Array>, + ParentType, + ContextType + > + createdAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + email: OptArgsResolverFn + id: OptArgsResolverFn + invalidated: OptArgsResolverFn< + Array>, + ParentType, + ContextType + > + name: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + organization: OptArgsResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType + > + organizationId: OptArgsResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + role: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + roleId: OptArgsResolverFn< + Maybe, + ParentType, + ContextType + > + updatedAt: OptArgsResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + uploaded: OptArgsResolverFn< + Array>, + ParentType, + ContextType + > + validated: OptArgsResolverFn< + Array>, + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} + +export type UserRelationResolvers< + ContextType = RedwoodGraphQLContext, + ParentType extends ResolversParentTypes['User'] = ResolversParentTypes['User'] +> = { + agency?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + agencyId?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + certified?: RequiredResolverFn< + Array>, + ParentType, + ContextType + > + createdAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + email?: RequiredResolverFn + id?: RequiredResolverFn + invalidated?: RequiredResolverFn< + Array>, + ParentType, + ContextType + > + name?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + organization?: RequiredResolverFn< + ResolversTypes['Organization'], + ParentType, + ContextType + > + organizationId?: RequiredResolverFn< + ResolversTypes['Int'], + ParentType, + ContextType + > + role?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + roleId?: RequiredResolverFn< + Maybe, + ParentType, + ContextType + > + updatedAt?: RequiredResolverFn< + ResolversTypes['DateTime'], + ParentType, + ContextType + > + uploaded?: RequiredResolverFn< + Array>, + ParentType, + ContextType + > + validated?: RequiredResolverFn< + Array>, + ParentType, + ContextType + > + __isTypeOf?: IsTypeOfResolverFn +} export type Resolvers = { - Agency: AgencyResolvers; - BigInt: GraphQLScalarType; - Date: GraphQLScalarType; - DateTime: GraphQLScalarType; - ExpenditureCategory: ExpenditureCategoryResolvers; - InputTemplate: InputTemplateResolvers; - JSON: GraphQLScalarType; - JSONObject: GraphQLScalarType; - Mutation: MutationResolvers; - Organization: OrganizationResolvers; - OutputTemplate: OutputTemplateResolvers; - Project: ProjectResolvers; - Query: QueryResolvers; - Redwood: RedwoodResolvers; - ReportingPeriod: ReportingPeriodResolvers; - Role: RoleResolvers; - Subrecipient: SubrecipientResolvers; - Time: GraphQLScalarType; - Upload: UploadResolvers; - UploadValidation: UploadValidationResolvers; - User: UserResolvers; -}; + Agency: AgencyResolvers + BigInt: GraphQLScalarType + Date: GraphQLScalarType + DateTime: GraphQLScalarType + ExpenditureCategory: ExpenditureCategoryResolvers + InputTemplate: InputTemplateResolvers + JSON: GraphQLScalarType + JSONObject: GraphQLScalarType + Mutation: MutationResolvers + Organization: OrganizationResolvers + OutputTemplate: OutputTemplateResolvers + Project: ProjectResolvers + Query: QueryResolvers + Redwood: RedwoodResolvers + ReportingPeriod: ReportingPeriodResolvers + Role: RoleResolvers + Subrecipient: SubrecipientResolvers + Time: GraphQLScalarType + Upload: UploadResolvers + UploadValidation: UploadValidationResolvers + User: UserResolvers +} export type DirectiveResolvers = { - requireAuth: requireAuthDirectiveResolver; - skipAuth: skipAuthDirectiveResolver; -}; + requireAuth: requireAuthDirectiveResolver + skipAuth: skipAuthDirectiveResolver +} diff --git a/web/src/Routes.tsx b/web/src/Routes.tsx index 590b5442..4d8040e3 100644 --- a/web/src/Routes.tsx +++ b/web/src/Routes.tsx @@ -22,6 +22,12 @@ const Routes = () => { + + + + + + diff --git a/web/src/components/User/EditUserCell/EditUserCell.tsx b/web/src/components/User/EditUserCell/EditUserCell.tsx new file mode 100644 index 00000000..2e669e2b --- /dev/null +++ b/web/src/components/User/EditUserCell/EditUserCell.tsx @@ -0,0 +1,72 @@ +import type { EditUserById, UpdateUserInput } from 'types/graphql' + +import { navigate, routes } from '@redwoodjs/router' +import type { CellSuccessProps, CellFailureProps } from '@redwoodjs/web' +import { useMutation } from '@redwoodjs/web' +import { toast } from '@redwoodjs/web/toast' + +import UserForm from 'src/components/User/UserForm' + +export const QUERY = gql` + query EditUserById($id: Int!) { + user: user(id: $id) { + id + email + name + agencyId + organizationId + roleId + createdAt + updatedAt + } + } +` +const UPDATE_USER_MUTATION = gql` + mutation UpdateUserMutation($id: Int!, $input: UpdateUserInput!) { + updateUser(id: $id, input: $input) { + id + email + name + agencyId + organizationId + roleId + createdAt + updatedAt + } + } +` + +export const Loading = () =>
Loading...
+ +export const Failure = ({ error }: CellFailureProps) => ( +
{error?.message}
+) + +export const Success = ({ user }: CellSuccessProps) => { + const [updateUser, { loading, error }] = useMutation(UPDATE_USER_MUTATION, { + onCompleted: () => { + toast.success('User updated') + navigate(routes.users()) + }, + onError: (error) => { + toast.error(error.message) + }, + }) + + const onSave = (input: UpdateUserInput, id: EditUserById['user']['id']) => { + updateUser({ variables: { id, input } }) + } + + return ( +
+
+

+ Edit User {user?.id} +

+
+
+ +
+
+ ) +} diff --git a/web/src/components/User/NewUser/NewUser.tsx b/web/src/components/User/NewUser/NewUser.tsx new file mode 100644 index 00000000..150bea77 --- /dev/null +++ b/web/src/components/User/NewUser/NewUser.tsx @@ -0,0 +1,44 @@ +import type { CreateUserInput } from 'types/graphql' + +import { navigate, routes } from '@redwoodjs/router' +import { useMutation } from '@redwoodjs/web' +import { toast } from '@redwoodjs/web/toast' + +import UserForm from 'src/components/User/UserForm' + +const CREATE_USER_MUTATION = gql` + mutation CreateUserMutation($input: CreateUserInput!) { + createUser(input: $input) { + id + } + } +` + +const NewUser = () => { + const [createUser, { loading, error }] = useMutation(CREATE_USER_MUTATION, { + onCompleted: () => { + toast.success('User created') + navigate(routes.users()) + }, + onError: (error) => { + toast.error(error.message) + }, + }) + + const onSave = (input: CreateUserInput) => { + createUser({ variables: { input } }) + } + + return ( +
+
+

New User

+
+
+ +
+
+ ) +} + +export default NewUser diff --git a/web/src/components/User/User/User.tsx b/web/src/components/User/User/User.tsx new file mode 100644 index 00000000..b03f02f5 --- /dev/null +++ b/web/src/components/User/User/User.tsx @@ -0,0 +1,102 @@ +import type { DeleteUserMutationVariables, FindUserById } from 'types/graphql' + +import { Link, routes, navigate } from '@redwoodjs/router' +import { useMutation } from '@redwoodjs/web' +import { toast } from '@redwoodjs/web/toast' + +import { timeTag } from 'src/lib/formatters' + +const DELETE_USER_MUTATION = gql` + mutation DeleteUserMutation($id: Int!) { + deleteUser(id: $id) { + id + } + } +` + +interface Props { + user: NonNullable +} + +const User = ({ user }: Props) => { + const [deleteUser] = useMutation(DELETE_USER_MUTATION, { + onCompleted: () => { + toast.success('User deleted') + navigate(routes.users()) + }, + onError: (error) => { + toast.error(error.message) + }, + }) + + const onDeleteClick = (id: DeleteUserMutationVariables['id']) => { + if (confirm('Are you sure you want to delete user ' + id + '?')) { + deleteUser({ variables: { id } }) + } + } + + return ( + <> +
+
+

+ User {user.id} Detail +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Id{user.id}
Email{user.email}
Name{user.name}
Agency id{user.agencyId}
Organization id{user.organizationId}
Role id{user.roleId}
Created at{timeTag(user.createdAt)}
Updated at{timeTag(user.updatedAt)}
+
+ + + ) +} + +export default User diff --git a/web/src/components/User/UserCell/UserCell.tsx b/web/src/components/User/UserCell/UserCell.tsx new file mode 100644 index 00000000..a4757c2f --- /dev/null +++ b/web/src/components/User/UserCell/UserCell.tsx @@ -0,0 +1,32 @@ +import type { FindUserById } from 'types/graphql' + +import type { CellSuccessProps, CellFailureProps } from '@redwoodjs/web' + +import User from 'src/components/User/User' + +export const QUERY = gql` + query FindUserById($id: Int!) { + user: user(id: $id) { + id + email + name + agencyId + organizationId + roleId + createdAt + updatedAt + } + } +` + +export const Loading = () =>
Loading...
+ +export const Empty = () =>
User not found
+ +export const Failure = ({ error }: CellFailureProps) => ( +
{error?.message}
+) + +export const Success = ({ user }: CellSuccessProps) => { + return +} diff --git a/web/src/components/User/UserForm/UserForm.tsx b/web/src/components/User/UserForm/UserForm.tsx new file mode 100644 index 00000000..69d65f26 --- /dev/null +++ b/web/src/components/User/UserForm/UserForm.tsx @@ -0,0 +1,188 @@ +import { Button } from 'react-bootstrap' +import { useForm, UseFormReturn } from 'react-hook-form' +import type { EditUserById, UpdateUserInput } from 'types/graphql' + +import { + Form, + FormError, + FieldError, + Label, + TextField, + NumberField, + Submit, +} from '@redwoodjs/forms' +import type { RWGqlError } from '@redwoodjs/forms' + +type FormUser = NonNullable + +interface UserFormProps { + user?: EditUserById['user'] + onSave: (data: UpdateUserInput, id?: FormUser['id']) => void + error: RWGqlError + loading: boolean +} + +const UserForm = (props: UserFormProps) => { + const { user, onSave, error, loading } = props + const formMethods: UseFormReturn = useForm() + const hasErrors = Object.keys(formMethods.formState.errors).length > 0 + + // Resets the form to the previous values when editing the existing user + // Clears out the form when creating a new user + const onReset = () => { + formMethods.reset() + } + const onSubmit = (data: FormUser) => { + onSave(data, props?.user?.id) + } + + return ( + + onSubmit={onSubmit} + formMethods={formMethods} + error={error} + className={hasErrors ? 'was-validated' : ''} + > + {user && ( +
+ +
+ +
+
+ )} + + {user && ( +
+ +
+ +
+
+ )} + + + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + Save + + +
+
+ + ) +} + +export default UserForm diff --git a/web/src/components/User/Users/Users.tsx b/web/src/components/User/Users/Users.tsx new file mode 100644 index 00000000..c215c3b6 --- /dev/null +++ b/web/src/components/User/Users/Users.tsx @@ -0,0 +1,54 @@ +import Button from 'react-bootstrap/Button' +import Table from 'react-bootstrap/Table' +import type { FindUsersByOrganizationId } from 'types/graphql' + +import { Link, routes } from '@redwoodjs/router' + +import { timeTag, truncate } from 'src/lib/formatters' + +const UsersList = ({ usersByOrganization }: FindUsersByOrganizationId) => { + return ( + + + + + + + + + + + + + {usersByOrganization.map((user) => ( + + + + + + + + + ))} + +
EmailNameAgency idRole idCreated atActions
{truncate(user.email)}{truncate(user.name)} + {truncate(user.agencyId)} + {truncate(user.roleId)} + {timeTag(user.createdAt)} + + +
+ ) +} + +export default UsersList diff --git a/web/src/components/User/UsersCell/UsersCell.tsx b/web/src/components/User/UsersCell/UsersCell.tsx new file mode 100644 index 00000000..c1d86ada --- /dev/null +++ b/web/src/components/User/UsersCell/UsersCell.tsx @@ -0,0 +1,44 @@ +import type { FindUsersByOrganizationId } from 'types/graphql' + +import { Link, routes } from '@redwoodjs/router' +import type { CellSuccessProps, CellFailureProps } from '@redwoodjs/web' + +import Users from 'src/components/User/Users' + +export const QUERY = gql` + query FindUsersByOrganizationId($organizationId: Int!) { + usersByOrganization(organizationId: $organizationId) { + id + email + name + agencyId + organizationId + roleId + createdAt + updatedAt + } + } +` + +export const Loading = () =>
Loading...
+ +export const Empty = () => { + return ( +
+ {'No users yet. '} + + {'Create one?'} + +
+ ) +} + +export const Failure = ({ error }: CellFailureProps) => ( +
{error?.message}
+) + +export const Success = ({ + usersByOrganization, +}: CellSuccessProps) => { + return +} diff --git a/web/src/pages/User/EditUserPage/EditUserPage.tsx b/web/src/pages/User/EditUserPage/EditUserPage.tsx new file mode 100644 index 00000000..8e2a3570 --- /dev/null +++ b/web/src/pages/User/EditUserPage/EditUserPage.tsx @@ -0,0 +1,11 @@ +import EditUserCell from 'src/components/User/EditUserCell' + +type UserPageProps = { + id: number +} + +const EditUserPage = ({ id }: UserPageProps) => { + return +} + +export default EditUserPage diff --git a/web/src/pages/User/NewUserPage/NewUserPage.tsx b/web/src/pages/User/NewUserPage/NewUserPage.tsx new file mode 100644 index 00000000..c9b6dceb --- /dev/null +++ b/web/src/pages/User/NewUserPage/NewUserPage.tsx @@ -0,0 +1,7 @@ +import NewUser from 'src/components/User/NewUser' + +const NewUserPage = () => { + return +} + +export default NewUserPage diff --git a/web/src/pages/User/UserPage/UserPage.tsx b/web/src/pages/User/UserPage/UserPage.tsx new file mode 100644 index 00000000..3f298a4e --- /dev/null +++ b/web/src/pages/User/UserPage/UserPage.tsx @@ -0,0 +1,11 @@ +import UserCell from 'src/components/User/UserCell' + +type UserPageProps = { + id: number +} + +const UserPage = ({ id }: UserPageProps) => { + return +} + +export default UserPage diff --git a/web/src/pages/User/UsersPage/UsersPage.tsx b/web/src/pages/User/UsersPage/UsersPage.tsx new file mode 100644 index 00000000..cb573ef1 --- /dev/null +++ b/web/src/pages/User/UsersPage/UsersPage.tsx @@ -0,0 +1,24 @@ +import Button from 'react-bootstrap/Button' + +import { Link, routes } from '@redwoodjs/router' + +import UsersCell from 'src/components/User/UsersCell' + +const UsersPage = () => { + // temporarily hardcode organizationId to 1 + const organizationIdOfUser = 1 + + return ( +
+

Users

+ + + + +
+ ) +} + +export default UsersPage diff --git a/web/types/graphql.d.ts b/web/types/graphql.d.ts index d0d6c99f..327fb539 100644 --- a/web/types/graphql.d.ts +++ b/web/types/graphql.d.ts @@ -1,526 +1,488 @@ -import { Prisma } from "@prisma/client" -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +import { Prisma } from '@prisma/client' +export type Maybe = T | null +export type InputMaybe = Maybe +export type Exact = { + [K in keyof T]: T[K] +} +export type MakeOptional = Omit & { + [SubKey in K]?: Maybe +} +export type MakeMaybe = Omit & { + [SubKey in K]: Maybe +} /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - BigInt: number; - Date: string; - DateTime: string; - JSON: Prisma.JsonValue; - JSONObject: Prisma.JsonObject; - Time: string; -}; + ID: string + String: string + Boolean: boolean + Int: number + Float: number + BigInt: number + Date: string + DateTime: string + JSON: Prisma.JsonValue + JSONObject: Prisma.JsonObject + Time: string +} export type Agency = { - __typename?: 'Agency'; - abbreviation?: Maybe; - code: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; - organizationId: Scalars['Int']; -}; + __typename?: 'Agency' + abbreviation?: Maybe + code: Scalars['String'] + id: Scalars['Int'] + name: Scalars['String'] + organizationId: Scalars['Int'] +} export type CreateAgencyInput = { - abbreviation?: InputMaybe; - code: Scalars['String']; - name: Scalars['String']; -}; + abbreviation?: InputMaybe + code: Scalars['String'] + name: Scalars['String'] +} export type CreateExpenditureCategoryInput = { - code: Scalars['String']; - name: Scalars['String']; -}; + code: Scalars['String'] + name: Scalars['String'] +} export type CreateInputTemplateInput = { - effectiveDate: Scalars['DateTime']; - name: Scalars['String']; - rulesGeneratedAt: Scalars['DateTime']; - version: Scalars['String']; -}; + effectiveDate: Scalars['DateTime'] + name: Scalars['String'] + rulesGeneratedAt: Scalars['DateTime'] + version: Scalars['String'] +} export type CreateOrganizationInput = { - name: Scalars['String']; -}; + name: Scalars['String'] +} export type CreateOutputTemplateInput = { - effectiveDate: Scalars['DateTime']; - name: Scalars['String']; - rulesGeneratedAt: Scalars['DateTime']; - version: Scalars['String']; -}; + effectiveDate: Scalars['DateTime'] + name: Scalars['String'] + rulesGeneratedAt: Scalars['DateTime'] + version: Scalars['String'] +} export type CreateProjectInput = { - agencyId: Scalars['Int']; - code: Scalars['String']; - description: Scalars['String']; - name: Scalars['String']; - organizationId: Scalars['Int']; - originationPeriodId: Scalars['Int']; - status: Scalars['String']; -}; + agencyId: Scalars['Int'] + code: Scalars['String'] + description: Scalars['String'] + name: Scalars['String'] + organizationId: Scalars['Int'] + originationPeriodId: Scalars['Int'] + status: Scalars['String'] +} export type CreateReportingPeriodInput = { - certifiedAt?: InputMaybe; - certifiedById?: InputMaybe; - endDate: Scalars['DateTime']; - inputTemplateId: Scalars['Int']; - isCurrentPeriod: Scalars['Boolean']; - name: Scalars['String']; - outputTemplateId: Scalars['Int']; - startDate: Scalars['DateTime']; -}; + certifiedAt?: InputMaybe + certifiedById?: InputMaybe + endDate: Scalars['DateTime'] + inputTemplateId: Scalars['Int'] + isCurrentPeriod: Scalars['Boolean'] + name: Scalars['String'] + outputTemplateId: Scalars['Int'] + startDate: Scalars['DateTime'] +} export type CreateRoleInput = { - name: Scalars['String']; -}; + name: Scalars['String'] +} export type CreateSubrecipientInput = { - certifiedAt?: InputMaybe; - certifiedById?: InputMaybe; - endDate: Scalars['DateTime']; - name: Scalars['String']; - organizationId: Scalars['Int']; - originationUploadId: Scalars['Int']; - startDate: Scalars['DateTime']; -}; + certifiedAt?: InputMaybe + certifiedById?: InputMaybe + endDate: Scalars['DateTime'] + name: Scalars['String'] + organizationId: Scalars['Int'] + originationUploadId: Scalars['Int'] + startDate: Scalars['DateTime'] +} export type CreateUploadInput = { - agencyId: Scalars['Int']; - expenditureCategoryId: Scalars['Int']; - filename: Scalars['String']; - organizationId: Scalars['Int']; - reportingPeriodId: Scalars['Int']; - uploadedById: Scalars['Int']; -}; + agencyId: Scalars['Int'] + expenditureCategoryId: Scalars['Int'] + filename: Scalars['String'] + organizationId: Scalars['Int'] + reportingPeriodId: Scalars['Int'] + uploadedById: Scalars['Int'] +} export type CreateUploadValidationInput = { - agencyId: Scalars['Int']; - inputTemplateId: Scalars['Int']; - invalidatedAt?: InputMaybe; - invalidatedById?: InputMaybe; - invalidationResults?: InputMaybe; - organizationId: Scalars['Int']; - uploadId: Scalars['Int']; - validatedAt?: InputMaybe; - validatedById?: InputMaybe; - validationResults?: InputMaybe; -}; + agencyId: Scalars['Int'] + inputTemplateId: Scalars['Int'] + invalidatedAt?: InputMaybe + invalidatedById?: InputMaybe + invalidationResults?: InputMaybe + organizationId: Scalars['Int'] + uploadId: Scalars['Int'] + validatedAt?: InputMaybe + validatedById?: InputMaybe + validationResults?: InputMaybe +} export type CreateUserInput = { - agencyId?: InputMaybe; - email: Scalars['String']; - name?: InputMaybe; - organizationId: Scalars['Int']; - roleId?: InputMaybe; -}; + agencyId?: InputMaybe + email: Scalars['String'] + name?: InputMaybe + roleId?: InputMaybe +} export type ExpenditureCategory = { - __typename?: 'ExpenditureCategory'; - Uploads: Array>; - code: Scalars['String']; - createdAt: Scalars['DateTime']; - id: Scalars['Int']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; -}; + __typename?: 'ExpenditureCategory' + Uploads: Array> + code: Scalars['String'] + createdAt: Scalars['DateTime'] + id: Scalars['Int'] + name: Scalars['String'] + updatedAt: Scalars['DateTime'] +} export type InputTemplate = { - __typename?: 'InputTemplate'; - createdAt: Scalars['DateTime']; - effectiveDate: Scalars['DateTime']; - id: Scalars['Int']; - name: Scalars['String']; - reportingPeriods: Array>; - rulesGeneratedAt: Scalars['DateTime']; - updatedAt: Scalars['DateTime']; - version: Scalars['String']; -}; + __typename?: 'InputTemplate' + createdAt: Scalars['DateTime'] + effectiveDate: Scalars['DateTime'] + id: Scalars['Int'] + name: Scalars['String'] + reportingPeriods: Array> + rulesGeneratedAt: Scalars['DateTime'] + updatedAt: Scalars['DateTime'] + version: Scalars['String'] +} export type Mutation = { - __typename?: 'Mutation'; - createAgency: Agency; - createExpenditureCategory: ExpenditureCategory; - createInputTemplate: InputTemplate; - createOrganization: Organization; - createOutputTemplate: OutputTemplate; - createProject: Project; - createReportingPeriod: ReportingPeriod; - createRole: Role; - createSubrecipient: Subrecipient; - createUpload: Upload; - createUploadValidation: UploadValidation; - createUser: User; - deleteAgency: Agency; - deleteExpenditureCategory: ExpenditureCategory; - deleteInputTemplate: InputTemplate; - deleteOrganization: Organization; - deleteOutputTemplate: OutputTemplate; - deleteProject: Project; - deleteReportingPeriod: ReportingPeriod; - deleteRole: Role; - deleteSubrecipient: Subrecipient; - deleteUpload: Upload; - deleteUploadValidation: UploadValidation; - deleteUser: User; - updateAgency: Agency; - updateExpenditureCategory: ExpenditureCategory; - updateInputTemplate: InputTemplate; - updateOrganization: Organization; - updateOutputTemplate: OutputTemplate; - updateProject: Project; - updateReportingPeriod: ReportingPeriod; - updateRole: Role; - updateSubrecipient: Subrecipient; - updateUpload: Upload; - updateUploadValidation: UploadValidation; - updateUser: User; -}; - + __typename?: 'Mutation' + createAgency: Agency + createExpenditureCategory: ExpenditureCategory + createInputTemplate: InputTemplate + createOrganization: Organization + createOutputTemplate: OutputTemplate + createProject: Project + createReportingPeriod: ReportingPeriod + createRole: Role + createSubrecipient: Subrecipient + createUpload: Upload + createUploadValidation: UploadValidation + createUser: User + deleteAgency: Agency + deleteExpenditureCategory: ExpenditureCategory + deleteInputTemplate: InputTemplate + deleteOrganization: Organization + deleteOutputTemplate: OutputTemplate + deleteProject: Project + deleteReportingPeriod: ReportingPeriod + deleteRole: Role + deleteSubrecipient: Subrecipient + deleteUpload: Upload + deleteUploadValidation: UploadValidation + deleteUser: User + updateAgency: Agency + updateExpenditureCategory: ExpenditureCategory + updateInputTemplate: InputTemplate + updateOrganization: Organization + updateOutputTemplate: OutputTemplate + updateProject: Project + updateReportingPeriod: ReportingPeriod + updateRole: Role + updateSubrecipient: Subrecipient + updateUpload: Upload + updateUploadValidation: UploadValidation + updateUser: User +} export type MutationcreateAgencyArgs = { - input: CreateAgencyInput; -}; - + input: CreateAgencyInput +} export type MutationcreateExpenditureCategoryArgs = { - input: CreateExpenditureCategoryInput; -}; - + input: CreateExpenditureCategoryInput +} export type MutationcreateInputTemplateArgs = { - input: CreateInputTemplateInput; -}; - + input: CreateInputTemplateInput +} export type MutationcreateOrganizationArgs = { - input: CreateOrganizationInput; -}; - + input: CreateOrganizationInput +} export type MutationcreateOutputTemplateArgs = { - input: CreateOutputTemplateInput; -}; - + input: CreateOutputTemplateInput +} export type MutationcreateProjectArgs = { - input: CreateProjectInput; -}; - + input: CreateProjectInput +} export type MutationcreateReportingPeriodArgs = { - input: CreateReportingPeriodInput; -}; - + input: CreateReportingPeriodInput +} export type MutationcreateRoleArgs = { - input: CreateRoleInput; -}; - + input: CreateRoleInput +} export type MutationcreateSubrecipientArgs = { - input: CreateSubrecipientInput; -}; - + input: CreateSubrecipientInput +} export type MutationcreateUploadArgs = { - input: CreateUploadInput; -}; - + input: CreateUploadInput +} export type MutationcreateUploadValidationArgs = { - input: CreateUploadValidationInput; -}; - + input: CreateUploadValidationInput +} export type MutationcreateUserArgs = { - input: CreateUserInput; -}; - + input: CreateUserInput +} export type MutationdeleteAgencyArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteExpenditureCategoryArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteInputTemplateArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteOrganizationArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteOutputTemplateArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteProjectArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteReportingPeriodArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteRoleArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteSubrecipientArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteUploadArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteUploadValidationArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationdeleteUserArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} export type MutationupdateAgencyArgs = { - id: Scalars['Int']; - input: UpdateAgencyInput; -}; - + id: Scalars['Int'] + input: UpdateAgencyInput +} export type MutationupdateExpenditureCategoryArgs = { - id: Scalars['Int']; - input: UpdateExpenditureCategoryInput; -}; - + id: Scalars['Int'] + input: UpdateExpenditureCategoryInput +} export type MutationupdateInputTemplateArgs = { - id: Scalars['Int']; - input: UpdateInputTemplateInput; -}; - + id: Scalars['Int'] + input: UpdateInputTemplateInput +} export type MutationupdateOrganizationArgs = { - id: Scalars['Int']; - input: UpdateOrganizationInput; -}; - + id: Scalars['Int'] + input: UpdateOrganizationInput +} export type MutationupdateOutputTemplateArgs = { - id: Scalars['Int']; - input: UpdateOutputTemplateInput; -}; - + id: Scalars['Int'] + input: UpdateOutputTemplateInput +} export type MutationupdateProjectArgs = { - id: Scalars['Int']; - input: UpdateProjectInput; -}; - + id: Scalars['Int'] + input: UpdateProjectInput +} export type MutationupdateReportingPeriodArgs = { - id: Scalars['Int']; - input: UpdateReportingPeriodInput; -}; - + id: Scalars['Int'] + input: UpdateReportingPeriodInput +} export type MutationupdateRoleArgs = { - id: Scalars['Int']; - input: UpdateRoleInput; -}; - + id: Scalars['Int'] + input: UpdateRoleInput +} export type MutationupdateSubrecipientArgs = { - id: Scalars['Int']; - input: UpdateSubrecipientInput; -}; - + id: Scalars['Int'] + input: UpdateSubrecipientInput +} export type MutationupdateUploadArgs = { - id: Scalars['Int']; - input: UpdateUploadInput; -}; - + id: Scalars['Int'] + input: UpdateUploadInput +} export type MutationupdateUploadValidationArgs = { - id: Scalars['Int']; - input: UpdateUploadValidationInput; -}; - + id: Scalars['Int'] + input: UpdateUploadValidationInput +} export type MutationupdateUserArgs = { - id: Scalars['Int']; - input: UpdateUserInput; -}; + id: Scalars['Int'] + input: UpdateUserInput +} export type Organization = { - __typename?: 'Organization'; - agencies: Array>; - id: Scalars['Int']; - name: Scalars['String']; -}; + __typename?: 'Organization' + agencies: Array> + id: Scalars['Int'] + name: Scalars['String'] +} export type OutputTemplate = { - __typename?: 'OutputTemplate'; - createdAt: Scalars['DateTime']; - effectiveDate: Scalars['DateTime']; - id: Scalars['Int']; - name: Scalars['String']; - reportingPeriods: Array>; - rulesGeneratedAt: Scalars['DateTime']; - updatedAt: Scalars['DateTime']; - version: Scalars['String']; -}; + __typename?: 'OutputTemplate' + createdAt: Scalars['DateTime'] + effectiveDate: Scalars['DateTime'] + id: Scalars['Int'] + name: Scalars['String'] + reportingPeriods: Array> + rulesGeneratedAt: Scalars['DateTime'] + updatedAt: Scalars['DateTime'] + version: Scalars['String'] +} export type Project = { - __typename?: 'Project'; - agency: Agency; - agencyId: Scalars['Int']; - code: Scalars['String']; - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; - organization: Organization; - organizationId: Scalars['Int']; - originationPeriod: ReportingPeriod; - originationPeriodId: Scalars['Int']; - status: Scalars['String']; - updatedAt: Scalars['DateTime']; -}; + __typename?: 'Project' + agency: Agency + agencyId: Scalars['Int'] + code: Scalars['String'] + createdAt: Scalars['DateTime'] + description: Scalars['String'] + id: Scalars['Int'] + name: Scalars['String'] + organization: Organization + organizationId: Scalars['Int'] + originationPeriod: ReportingPeriod + originationPeriodId: Scalars['Int'] + status: Scalars['String'] + updatedAt: Scalars['DateTime'] +} /** About the Redwood queries. */ export type Query = { - __typename?: 'Query'; - agencies: Array; - agenciesByOrganization: Array; - agency?: Maybe; - expenditureCategories: Array; - expenditureCategory?: Maybe; - inputTemplate?: Maybe; - inputTemplates: Array; - organization?: Maybe; - organizations: Array; - outputTemplate?: Maybe; - outputTemplates: Array; - project?: Maybe; - projects: Array; + __typename?: 'Query' + agencies: Array + agenciesByOrganization: Array + agency?: Maybe + expenditureCategories: Array + expenditureCategory?: Maybe + inputTemplate?: Maybe + inputTemplates: Array + organization?: Maybe + organizations: Array + outputTemplate?: Maybe + outputTemplates: Array + project?: Maybe + projects: Array /** Fetches the Redwood root schema. */ - redwood?: Maybe; - reportingPeriod?: Maybe; - reportingPeriods: Array; - role?: Maybe; - roles: Array; - subrecipient?: Maybe; - subrecipients: Array; - upload?: Maybe; - uploadValidation?: Maybe; - uploadValidations: Array; - uploads: Array; - user?: Maybe; - users: Array; -}; - + redwood?: Maybe + reportingPeriod?: Maybe + reportingPeriods: Array + role?: Maybe + roles: Array + subrecipient?: Maybe + subrecipients: Array + upload?: Maybe + uploadValidation?: Maybe + uploadValidations: Array + uploads: Array + user?: Maybe + users: Array + usersByOrganization: Array +} /** About the Redwood queries. */ export type QueryagenciesByOrganizationArgs = { - organizationId: Scalars['Int']; -}; - + organizationId: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryagencyArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryexpenditureCategoryArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryinputTemplateArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryorganizationArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryoutputTemplateArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryprojectArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryreportingPeriodArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryroleArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QuerysubrecipientArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryuploadArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryuploadValidationArgs = { - id: Scalars['Int']; -}; - + id: Scalars['Int'] +} /** About the Redwood queries. */ export type QueryuserArgs = { - id: Scalars['Int']; -}; + id: Scalars['Int'] +} + +/** About the Redwood queries. */ +export type QueryusersByOrganizationArgs = { + organizationId: Scalars['Int'] +} /** * The RedwoodJS Root Schema @@ -528,344 +490,577 @@ export type QueryuserArgs = { * Defines details about RedwoodJS such as the current user and version information. */ export type Redwood = { - __typename?: 'Redwood'; + __typename?: 'Redwood' /** The current user. */ - currentUser?: Maybe; + currentUser?: Maybe /** The version of Prisma. */ - prismaVersion?: Maybe; + prismaVersion?: Maybe /** The version of Redwood. */ - version?: Maybe; -}; + version?: Maybe +} export type ReportingPeriod = { - __typename?: 'ReportingPeriod'; - certifiedAt?: Maybe; - certifiedBy?: Maybe; - certifiedById?: Maybe; - createdAt: Scalars['DateTime']; - endDate: Scalars['DateTime']; - id: Scalars['Int']; - inputTemplate: InputTemplate; - inputTemplateId: Scalars['Int']; - isCurrentPeriod: Scalars['Boolean']; - name: Scalars['String']; - outputTemplate: OutputTemplate; - outputTemplateId: Scalars['Int']; - startDate: Scalars['DateTime']; - updatedAt: Scalars['DateTime']; -}; + __typename?: 'ReportingPeriod' + certifiedAt?: Maybe + certifiedBy?: Maybe + certifiedById?: Maybe + createdAt: Scalars['DateTime'] + endDate: Scalars['DateTime'] + id: Scalars['Int'] + inputTemplate: InputTemplate + inputTemplateId: Scalars['Int'] + isCurrentPeriod: Scalars['Boolean'] + name: Scalars['String'] + outputTemplate: OutputTemplate + outputTemplateId: Scalars['Int'] + startDate: Scalars['DateTime'] + updatedAt: Scalars['DateTime'] +} export type Role = { - __typename?: 'Role'; - createdAt: Scalars['DateTime']; - id: Scalars['Int']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; - users: Array>; -}; + __typename?: 'Role' + createdAt: Scalars['DateTime'] + id: Scalars['Int'] + name: Scalars['String'] + updatedAt: Scalars['DateTime'] + users: Array> +} export type Subrecipient = { - __typename?: 'Subrecipient'; - certifiedAt?: Maybe; - certifiedBy?: Maybe; - certifiedById?: Maybe; - createdAt: Scalars['DateTime']; - endDate: Scalars['DateTime']; - id: Scalars['Int']; - name: Scalars['String']; - organization: Organization; - organizationId: Scalars['Int']; - originationUpload: Upload; - originationUploadId: Scalars['Int']; - startDate: Scalars['DateTime']; - updatedAt: Scalars['DateTime']; -}; + __typename?: 'Subrecipient' + certifiedAt?: Maybe + certifiedBy?: Maybe + certifiedById?: Maybe + createdAt: Scalars['DateTime'] + endDate: Scalars['DateTime'] + id: Scalars['Int'] + name: Scalars['String'] + organization: Organization + organizationId: Scalars['Int'] + originationUpload: Upload + originationUploadId: Scalars['Int'] + startDate: Scalars['DateTime'] + updatedAt: Scalars['DateTime'] +} export type UpdateAgencyInput = { - abbreviation?: InputMaybe; - code?: InputMaybe; - name?: InputMaybe; -}; + abbreviation?: InputMaybe + code?: InputMaybe + name?: InputMaybe +} export type UpdateExpenditureCategoryInput = { - code?: InputMaybe; - name?: InputMaybe; -}; + code?: InputMaybe + name?: InputMaybe +} export type UpdateInputTemplateInput = { - effectiveDate?: InputMaybe; - name?: InputMaybe; - rulesGeneratedAt?: InputMaybe; - version?: InputMaybe; -}; + effectiveDate?: InputMaybe + name?: InputMaybe + rulesGeneratedAt?: InputMaybe + version?: InputMaybe +} export type UpdateOrganizationInput = { - name?: InputMaybe; -}; + name?: InputMaybe +} export type UpdateOutputTemplateInput = { - effectiveDate?: InputMaybe; - name?: InputMaybe; - rulesGeneratedAt?: InputMaybe; - version?: InputMaybe; -}; + effectiveDate?: InputMaybe + name?: InputMaybe + rulesGeneratedAt?: InputMaybe + version?: InputMaybe +} export type UpdateProjectInput = { - agencyId?: InputMaybe; - code?: InputMaybe; - description?: InputMaybe; - name?: InputMaybe; - organizationId?: InputMaybe; - originationPeriodId?: InputMaybe; - status?: InputMaybe; -}; + agencyId?: InputMaybe + code?: InputMaybe + description?: InputMaybe + name?: InputMaybe + organizationId?: InputMaybe + originationPeriodId?: InputMaybe + status?: InputMaybe +} export type UpdateReportingPeriodInput = { - certifiedAt?: InputMaybe; - certifiedById?: InputMaybe; - endDate?: InputMaybe; - inputTemplateId?: InputMaybe; - isCurrentPeriod?: InputMaybe; - name?: InputMaybe; - outputTemplateId?: InputMaybe; - startDate?: InputMaybe; -}; + certifiedAt?: InputMaybe + certifiedById?: InputMaybe + endDate?: InputMaybe + inputTemplateId?: InputMaybe + isCurrentPeriod?: InputMaybe + name?: InputMaybe + outputTemplateId?: InputMaybe + startDate?: InputMaybe +} export type UpdateRoleInput = { - name?: InputMaybe; -}; + name?: InputMaybe +} export type UpdateSubrecipientInput = { - certifiedAt?: InputMaybe; - certifiedById?: InputMaybe; - endDate?: InputMaybe; - name?: InputMaybe; - organizationId?: InputMaybe; - originationUploadId?: InputMaybe; - startDate?: InputMaybe; -}; + certifiedAt?: InputMaybe + certifiedById?: InputMaybe + endDate?: InputMaybe + name?: InputMaybe + organizationId?: InputMaybe + originationUploadId?: InputMaybe + startDate?: InputMaybe +} export type UpdateUploadInput = { - agencyId?: InputMaybe; - expenditureCategoryId?: InputMaybe; - filename?: InputMaybe; - organizationId?: InputMaybe; - reportingPeriodId?: InputMaybe; - uploadedById?: InputMaybe; -}; + agencyId?: InputMaybe + expenditureCategoryId?: InputMaybe + filename?: InputMaybe + organizationId?: InputMaybe + reportingPeriodId?: InputMaybe + uploadedById?: InputMaybe +} export type UpdateUploadValidationInput = { - agencyId?: InputMaybe; - inputTemplateId?: InputMaybe; - invalidatedAt?: InputMaybe; - invalidatedById?: InputMaybe; - invalidationResults?: InputMaybe; - organizationId?: InputMaybe; - uploadId?: InputMaybe; - validatedAt?: InputMaybe; - validatedById?: InputMaybe; - validationResults?: InputMaybe; -}; + agencyId?: InputMaybe + inputTemplateId?: InputMaybe + invalidatedAt?: InputMaybe + invalidatedById?: InputMaybe + invalidationResults?: InputMaybe + organizationId?: InputMaybe + uploadId?: InputMaybe + validatedAt?: InputMaybe + validatedById?: InputMaybe + validationResults?: InputMaybe +} export type UpdateUserInput = { - agencyId?: InputMaybe; - email?: InputMaybe; - name?: InputMaybe; - organizationId?: InputMaybe; - roleId?: InputMaybe; -}; + agencyId?: InputMaybe + email?: InputMaybe + name?: InputMaybe + roleId?: InputMaybe +} export type Upload = { - __typename?: 'Upload'; - agency: Agency; - agencyId: Scalars['Int']; - createdAt: Scalars['DateTime']; - expenditureCategory: ExpenditureCategory; - expenditureCategoryId: Scalars['Int']; - filename: Scalars['String']; - id: Scalars['Int']; - organization: Organization; - organizationId: Scalars['Int']; - reportingPeriod: ReportingPeriod; - reportingPeriodId: Scalars['Int']; - updatedAt: Scalars['DateTime']; - uploadedBy: User; - uploadedById: Scalars['Int']; - validations: Array>; -}; + __typename?: 'Upload' + agency: Agency + agencyId: Scalars['Int'] + createdAt: Scalars['DateTime'] + expenditureCategory: ExpenditureCategory + expenditureCategoryId: Scalars['Int'] + filename: Scalars['String'] + id: Scalars['Int'] + organization: Organization + organizationId: Scalars['Int'] + reportingPeriod: ReportingPeriod + reportingPeriodId: Scalars['Int'] + updatedAt: Scalars['DateTime'] + uploadedBy: User + uploadedById: Scalars['Int'] + validations: Array> +} export type UploadValidation = { - __typename?: 'UploadValidation'; - agency: Agency; - agencyId: Scalars['Int']; - createdAt: Scalars['DateTime']; - id: Scalars['Int']; - inputTemplate: InputTemplate; - inputTemplateId: Scalars['Int']; - invalidatedAt?: Maybe; - invalidatedBy?: Maybe; - invalidatedById?: Maybe; - invalidationResults?: Maybe; - organization: Organization; - organizationId: Scalars['Int']; - updatedAt: Scalars['DateTime']; - upload: Upload; - uploadId: Scalars['Int']; - validatedAt?: Maybe; - validatedBy?: Maybe; - validatedById?: Maybe; - validationResults?: Maybe; -}; + __typename?: 'UploadValidation' + agency: Agency + agencyId: Scalars['Int'] + createdAt: Scalars['DateTime'] + id: Scalars['Int'] + inputTemplate: InputTemplate + inputTemplateId: Scalars['Int'] + invalidatedAt?: Maybe + invalidatedBy?: Maybe + invalidatedById?: Maybe + invalidationResults?: Maybe + organization: Organization + organizationId: Scalars['Int'] + updatedAt: Scalars['DateTime'] + upload: Upload + uploadId: Scalars['Int'] + validatedAt?: Maybe + validatedBy?: Maybe + validatedById?: Maybe + validationResults?: Maybe +} export type User = { - __typename?: 'User'; - agency?: Maybe; - agencyId?: Maybe; - certified: Array>; - createdAt: Scalars['DateTime']; - email: Scalars['String']; - id: Scalars['Int']; - name?: Maybe; - organization: Organization; - organizationId: Scalars['Int']; - role?: Maybe; - roleId?: Maybe; - updatedAt: Scalars['DateTime']; -}; + __typename?: 'User' + agency?: Maybe + agencyId?: Maybe + certified: Array> + createdAt: Scalars['DateTime'] + email: Scalars['String'] + id: Scalars['Int'] + invalidated: Array> + name?: Maybe + organization: Organization + organizationId: Scalars['Int'] + role?: Maybe + roleId?: Maybe + updatedAt: Scalars['DateTime'] + uploaded: Array> + validated: Array> +} export type FindAgenciesByOrganizationIdVariables = Exact<{ - organizationId: Scalars['Int']; -}>; - - -export type FindAgenciesByOrganizationId = { __typename?: 'Query', agenciesByOrganization: Array<{ __typename?: 'Agency', id: number, name: string, abbreviation?: string | null, code: string }> }; + organizationId: Scalars['Int'] +}> + +export type FindAgenciesByOrganizationId = { + __typename?: 'Query' + agenciesByOrganization: Array<{ + __typename?: 'Agency' + id: number + name: string + abbreviation?: string | null + code: string + }> +} export type DeleteAgencyMutationVariables = Exact<{ - id: Scalars['Int']; -}>; + id: Scalars['Int'] +}> - -export type DeleteAgencyMutation = { __typename?: 'Mutation', deleteAgency: { __typename?: 'Agency', id: number } }; +export type DeleteAgencyMutation = { + __typename?: 'Mutation' + deleteAgency: { __typename?: 'Agency'; id: number } +} export type FindAgencyByIdVariables = Exact<{ - id: Scalars['Int']; -}>; - - -export type FindAgencyById = { __typename?: 'Query', agency?: { __typename?: 'Agency', id: number, name: string, abbreviation?: string | null, code: string } | null }; + id: Scalars['Int'] +}> + +export type FindAgencyById = { + __typename?: 'Query' + agency?: { + __typename?: 'Agency' + id: number + name: string + abbreviation?: string | null + code: string + } | null +} export type EditAgencyByIdVariables = Exact<{ - id: Scalars['Int']; -}>; - - -export type EditAgencyById = { __typename?: 'Query', agency?: { __typename?: 'Agency', id: number, name: string, abbreviation?: string | null, code: string } | null }; + id: Scalars['Int'] +}> + +export type EditAgencyById = { + __typename?: 'Query' + agency?: { + __typename?: 'Agency' + id: number + name: string + abbreviation?: string | null + code: string + } | null +} export type UpdateAgencyMutationVariables = Exact<{ - id: Scalars['Int']; - input: UpdateAgencyInput; -}>; - - -export type UpdateAgencyMutation = { __typename?: 'Mutation', updateAgency: { __typename?: 'Agency', id: number, name: string, abbreviation?: string | null, code: string } }; + id: Scalars['Int'] + input: UpdateAgencyInput +}> + +export type UpdateAgencyMutation = { + __typename?: 'Mutation' + updateAgency: { + __typename?: 'Agency' + id: number + name: string + abbreviation?: string | null + code: string + } +} export type CreateAgencyMutationVariables = Exact<{ - input: CreateAgencyInput; -}>; - + input: CreateAgencyInput +}> -export type CreateAgencyMutation = { __typename?: 'Mutation', createAgency: { __typename?: 'Agency', id: number } }; +export type CreateAgencyMutation = { + __typename?: 'Mutation' + createAgency: { __typename?: 'Agency'; id: number } +} export type EditOrganizationByIdVariables = Exact<{ - id: Scalars['Int']; -}>; - - -export type EditOrganizationById = { __typename?: 'Query', organization?: { __typename?: 'Organization', id: number, name: string } | null }; + id: Scalars['Int'] +}> + +export type EditOrganizationById = { + __typename?: 'Query' + organization?: { + __typename?: 'Organization' + id: number + name: string + } | null +} export type UpdateOrganizationMutationVariables = Exact<{ - id: Scalars['Int']; - input: UpdateOrganizationInput; -}>; - + id: Scalars['Int'] + input: UpdateOrganizationInput +}> -export type UpdateOrganizationMutation = { __typename?: 'Mutation', updateOrganization: { __typename?: 'Organization', id: number, name: string } }; +export type UpdateOrganizationMutation = { + __typename?: 'Mutation' + updateOrganization: { __typename?: 'Organization'; id: number; name: string } +} export type CreateOrganizationMutationVariables = Exact<{ - input: CreateOrganizationInput; -}>; + input: CreateOrganizationInput +}> - -export type CreateOrganizationMutation = { __typename?: 'Mutation', createOrganization: { __typename?: 'Organization', id: number } }; +export type CreateOrganizationMutation = { + __typename?: 'Mutation' + createOrganization: { __typename?: 'Organization'; id: number } +} export type DeleteOrganizationMutationVariables = Exact<{ - id: Scalars['Int']; -}>; - + id: Scalars['Int'] +}> -export type DeleteOrganizationMutation = { __typename?: 'Mutation', deleteOrganization: { __typename?: 'Organization', id: number } }; +export type DeleteOrganizationMutation = { + __typename?: 'Mutation' + deleteOrganization: { __typename?: 'Organization'; id: number } +} export type FindOrganizationByIdVariables = Exact<{ - id: Scalars['Int']; -}>; - - -export type FindOrganizationById = { __typename?: 'Query', organization?: { __typename?: 'Organization', id: number, name: string } | null }; - -export type FindOrganizationsVariables = Exact<{ [key: string]: never; }>; - - -export type FindOrganizations = { __typename?: 'Query', organizations: Array<{ __typename?: 'Organization', id: number, name: string }> }; + id: Scalars['Int'] +}> + +export type FindOrganizationById = { + __typename?: 'Query' + organization?: { + __typename?: 'Organization' + id: number + name: string + } | null +} + +export type FindOrganizationsVariables = Exact<{ [key: string]: never }> + +export type FindOrganizations = { + __typename?: 'Query' + organizations: Array<{ + __typename?: 'Organization' + id: number + name: string + }> +} export type FindReportingPeriodQueryVariables = Exact<{ - id: Scalars['Int']; -}>; - - -export type FindReportingPeriodQuery = { __typename?: 'Query', reportingPeriod?: { __typename?: 'ReportingPeriod', name: string } | null }; - -export type ReportingPeriodsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ReportingPeriodsQuery = { __typename?: 'Query', reportingPeriods: Array<{ __typename?: 'ReportingPeriod', id: number, startDate: string, endDate: string, isCurrentPeriod: boolean, certifiedAt?: string | null, certifiedBy?: { __typename?: 'User', email: string } | null, inputTemplate: { __typename?: 'InputTemplate', name: string } }> }; + id: Scalars['Int'] +}> + +export type FindReportingPeriodQuery = { + __typename?: 'Query' + reportingPeriod?: { __typename?: 'ReportingPeriod'; name: string } | null +} + +export type ReportingPeriodsQueryVariables = Exact<{ [key: string]: never }> + +export type ReportingPeriodsQuery = { + __typename?: 'Query' + reportingPeriods: Array<{ + __typename?: 'ReportingPeriod' + id: number + startDate: string + endDate: string + isCurrentPeriod: boolean + certifiedAt?: string | null + certifiedBy?: { __typename?: 'User'; email: string } | null + inputTemplate: { __typename?: 'InputTemplate'; name: string } + }> +} export type EditUploadByIdVariables = Exact<{ - id: Scalars['Int']; -}>; - - -export type EditUploadById = { __typename?: 'Query', upload?: { __typename?: 'Upload', id: number, filename: string, uploadedById: number, agencyId: number, organizationId: number, reportingPeriodId: number, expenditureCategoryId: number, createdAt: string, updatedAt: string } | null }; + id: Scalars['Int'] +}> + +export type EditUploadById = { + __typename?: 'Query' + upload?: { + __typename?: 'Upload' + id: number + filename: string + uploadedById: number + agencyId: number + organizationId: number + reportingPeriodId: number + expenditureCategoryId: number + createdAt: string + updatedAt: string + } | null +} export type UpdateUploadMutationVariables = Exact<{ - id: Scalars['Int']; - input: UpdateUploadInput; -}>; - - -export type UpdateUploadMutation = { __typename?: 'Mutation', updateUpload: { __typename?: 'Upload', id: number, filename: string, uploadedById: number, agencyId: number, organizationId: number, reportingPeriodId: number, expenditureCategoryId: number, createdAt: string, updatedAt: string } }; + id: Scalars['Int'] + input: UpdateUploadInput +}> + +export type UpdateUploadMutation = { + __typename?: 'Mutation' + updateUpload: { + __typename?: 'Upload' + id: number + filename: string + uploadedById: number + agencyId: number + organizationId: number + reportingPeriodId: number + expenditureCategoryId: number + createdAt: string + updatedAt: string + } +} export type CreateUploadMutationVariables = Exact<{ - input: CreateUploadInput; -}>; + input: CreateUploadInput +}> - -export type CreateUploadMutation = { __typename?: 'Mutation', createUpload: { __typename?: 'Upload', id: number } }; +export type CreateUploadMutation = { + __typename?: 'Mutation' + createUpload: { __typename?: 'Upload'; id: number } +} export type DeleteUploadMutationVariables = Exact<{ - id: Scalars['Int']; -}>; - + id: Scalars['Int'] +}> -export type DeleteUploadMutation = { __typename?: 'Mutation', deleteUpload: { __typename?: 'Upload', id: number } }; +export type DeleteUploadMutation = { + __typename?: 'Mutation' + deleteUpload: { __typename?: 'Upload'; id: number } +} export type FindUploadByIdVariables = Exact<{ - id: Scalars['Int']; -}>; - - -export type FindUploadById = { __typename?: 'Query', upload?: { __typename?: 'Upload', id: number, filename: string, uploadedById: number, agencyId: number, organizationId: number, reportingPeriodId: number, expenditureCategoryId: number, createdAt: string, updatedAt: string } | null }; - -export type FindUploadsVariables = Exact<{ [key: string]: never; }>; - - -export type FindUploads = { __typename?: 'Query', uploads: Array<{ __typename?: 'Upload', id: number, filename: string, createdAt: string, updatedAt: string, uploadedBy: { __typename?: 'User', id: number, email: string }, agency: { __typename?: 'Agency', id: number, code: string }, expenditureCategory: { __typename?: 'ExpenditureCategory', id: number, code: string }, validations: Array<{ __typename?: 'UploadValidation', invalidatedAt?: string | null, validatedAt?: string | null } | null> }> }; + id: Scalars['Int'] +}> + +export type FindUploadById = { + __typename?: 'Query' + upload?: { + __typename?: 'Upload' + id: number + filename: string + uploadedById: number + agencyId: number + organizationId: number + reportingPeriodId: number + expenditureCategoryId: number + createdAt: string + updatedAt: string + } | null +} + +export type FindUploadsVariables = Exact<{ [key: string]: never }> + +export type FindUploads = { + __typename?: 'Query' + uploads: Array<{ + __typename?: 'Upload' + id: number + filename: string + createdAt: string + updatedAt: string + uploadedBy: { __typename?: 'User'; id: number; email: string } + agency: { __typename?: 'Agency'; id: number; code: string } + expenditureCategory: { + __typename?: 'ExpenditureCategory' + id: number + code: string + } + validations: Array<{ + __typename?: 'UploadValidation' + invalidatedAt?: string | null + validatedAt?: string | null + } | null> + }> +} + +export type EditUserByIdVariables = Exact<{ + id: Scalars['Int'] +}> + +export type EditUserById = { + __typename?: 'Query' + user?: { + __typename?: 'User' + id: number + email: string + name?: string | null + agencyId?: number | null + organizationId: number + roleId?: number | null + createdAt: string + updatedAt: string + } | null +} + +export type UpdateUserMutationVariables = Exact<{ + id: Scalars['Int'] + input: UpdateUserInput +}> + +export type UpdateUserMutation = { + __typename?: 'Mutation' + updateUser: { + __typename?: 'User' + id: number + email: string + name?: string | null + agencyId?: number | null + organizationId: number + roleId?: number | null + createdAt: string + updatedAt: string + } +} + +export type CreateUserMutationVariables = Exact<{ + input: CreateUserInput +}> + +export type CreateUserMutation = { + __typename?: 'Mutation' + createUser: { __typename?: 'User'; id: number } +} + +export type DeleteUserMutationVariables = Exact<{ + id: Scalars['Int'] +}> + +export type DeleteUserMutation = { + __typename?: 'Mutation' + deleteUser: { __typename?: 'User'; id: number } +} + +export type FindUserByIdVariables = Exact<{ + id: Scalars['Int'] +}> + +export type FindUserById = { + __typename?: 'Query' + user?: { + __typename?: 'User' + id: number + email: string + name?: string | null + agencyId?: number | null + organizationId: number + roleId?: number | null + createdAt: string + updatedAt: string + } | null +} + +export type FindUsersByOrganizationIdVariables = Exact<{ + organizationId: Scalars['Int'] +}> + +export type FindUsersByOrganizationId = { + __typename?: 'Query' + usersByOrganization: Array<{ + __typename?: 'User' + id: number + email: string + name?: string | null + agencyId?: number | null + organizationId: number + roleId?: number | null + createdAt: string + updatedAt: string + }> +}