From 2ede4b87e477fc36d2ccba7c0edccdf425610535 Mon Sep 17 00:00:00 2001 From: "Zach A. Thomas" Date: Sun, 10 Dec 2023 09:30:36 -0500 Subject: [PATCH] feat: add Subrecipient and Project to the schema (#42) * feat: add Subrecipient and Project to the schema * fix: date logic in the the Subrecipient tests --- .../migration.sql | 49 + api/db/schema.prisma | 38 + api/src/graphql/projects.sdl.ts | 48 + api/src/graphql/subrecipients.sdl.ts | 52 + .../services/projects/projects.scenarios.ts | 79 ++ api/src/services/projects/projects.test.ts | 75 ++ api/src/services/projects/projects.ts | 55 + .../subrecipients/subrecipients.scenarios.ts | 119 ++ .../subrecipients/subrecipients.test.ts | 78 ++ .../services/subrecipients/subrecipients.ts | 59 + api/types/graphql.d.ts | 231 ++++ web/types/graphql.d.ts | 1174 +++++++++-------- 12 files changed, 1513 insertions(+), 544 deletions(-) create mode 100644 api/db/migrations/20231209145213_add_subrecipient_and_project/migration.sql create mode 100644 api/src/graphql/projects.sdl.ts create mode 100644 api/src/graphql/subrecipients.sdl.ts create mode 100644 api/src/services/projects/projects.scenarios.ts create mode 100644 api/src/services/projects/projects.test.ts create mode 100644 api/src/services/projects/projects.ts create mode 100644 api/src/services/subrecipients/subrecipients.scenarios.ts create mode 100644 api/src/services/subrecipients/subrecipients.test.ts create mode 100644 api/src/services/subrecipients/subrecipients.ts diff --git a/api/db/migrations/20231209145213_add_subrecipient_and_project/migration.sql b/api/db/migrations/20231209145213_add_subrecipient_and_project/migration.sql new file mode 100644 index 00000000..5c970691 --- /dev/null +++ b/api/db/migrations/20231209145213_add_subrecipient_and_project/migration.sql @@ -0,0 +1,49 @@ +-- CreateTable +CREATE TABLE "Subrecipient" ( + "id" SERIAL NOT NULL, + "name" TEXT NOT NULL, + "organizationId" INTEGER NOT NULL, + "startDate" DATE NOT NULL, + "endDate" DATE NOT NULL, + "certifiedAt" TIMESTAMPTZ(6), + "certifiedById" INTEGER, + "originationUploadId" INTEGER NOT NULL, + "createdAt" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMPTZ(6) NOT NULL, + + CONSTRAINT "Subrecipient_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Project" ( + "id" SERIAL NOT NULL, + "code" TEXT NOT NULL, + "name" TEXT NOT NULL, + "agencyId" INTEGER NOT NULL, + "organizationId" INTEGER NOT NULL, + "status" TEXT NOT NULL, + "description" TEXT NOT NULL, + "originationPeriodId" INTEGER NOT NULL, + "createdAt" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMPTZ(6) NOT NULL, + + CONSTRAINT "Project_pkey" PRIMARY KEY ("id") +); + +-- AddForeignKey +ALTER TABLE "Subrecipient" ADD CONSTRAINT "Subrecipient_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Subrecipient" ADD CONSTRAINT "Subrecipient_certifiedById_fkey" FOREIGN KEY ("certifiedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Subrecipient" ADD CONSTRAINT "Subrecipient_originationUploadId_fkey" FOREIGN KEY ("originationUploadId") REFERENCES "Upload"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Project" ADD CONSTRAINT "Project_agencyId_fkey" FOREIGN KEY ("agencyId") REFERENCES "Agency"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Project" ADD CONSTRAINT "Project_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Project" ADD CONSTRAINT "Project_originationPeriodId_fkey" FOREIGN KEY ("originationPeriodId") REFERENCES "ReportingPeriod"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/api/db/schema.prisma b/api/db/schema.prisma index d191b673..019c26c7 100644 --- a/api/db/schema.prisma +++ b/api/db/schema.prisma @@ -19,6 +19,7 @@ model Agency { users User[] uploads Upload[] uploadValidations UploadValidation[] + projects Project[] } model Organization { @@ -28,6 +29,8 @@ model Organization { name String uploads Upload[] uploadValidations UploadValidation[] + subrecipients Subrecipient[] + projects Project[] } model User { @@ -46,6 +49,7 @@ model User { uploaded Upload[] validated UploadValidation[] @relation("ValidatedUploads") invalidated UploadValidation[] @relation("InvalidatedUploads") + subrecipients Subrecipient[] } model Role { @@ -95,6 +99,7 @@ model ReportingPeriod { createdAt DateTime @default(now()) @db.Timestamptz(6) updatedAt DateTime @db.Timestamptz(6) uploads Upload[] + projects Project[] } model ExpenditureCategory { @@ -122,6 +127,7 @@ model Upload { createdAt DateTime @default(now()) @db.Timestamptz(6) updatedAt DateTime @db.Timestamptz(6) validations UploadValidation[] + subrecipients Subrecipient[] } model UploadValidation { @@ -144,4 +150,36 @@ model UploadValidation { invalidatedBy User? @relation("InvalidatedUploads", fields: [invalidatedById], references: [id]) createdAt DateTime @default(now()) @db.Timestamptz(6) updatedAt DateTime @db.Timestamptz(6) +} + +model Subrecipient { + id Int @id @default(autoincrement()) + name String + organizationId Int + organization Organization @relation(fields: [organizationId], references: [id]) + startDate DateTime @db.Date + endDate DateTime @db.Date + certifiedAt DateTime? @db.Timestamptz(6) + certifiedById Int? + certifiedBy User? @relation(fields: [certifiedById], references: [id]) + originationUploadId Int + originationUpload Upload @relation(fields: [originationUploadId], references: [id]) + createdAt DateTime @default(now()) @db.Timestamptz(6) + updatedAt DateTime @db.Timestamptz(6) +} + +model Project { + id Int @id @default(autoincrement()) + code String + name String + agencyId Int + agency Agency @relation(fields: [agencyId], references: [id]) + organizationId Int + organization Organization @relation(fields: [organizationId], references: [id]) + status String + description String + originationPeriodId Int + originationPeriod ReportingPeriod @relation(fields: [originationPeriodId], references: [id]) + createdAt DateTime @default(now()) @db.Timestamptz(6) + updatedAt DateTime @db.Timestamptz(6) } \ No newline at end of file diff --git a/api/src/graphql/projects.sdl.ts b/api/src/graphql/projects.sdl.ts new file mode 100644 index 00000000..3873f48e --- /dev/null +++ b/api/src/graphql/projects.sdl.ts @@ -0,0 +1,48 @@ +export const schema = gql` + type Project { + id: Int! + code: String! + name: String! + agencyId: Int! + agency: Agency! + organizationId: Int! + organization: Organization! + status: String! + description: String! + originationPeriodId: Int! + originationPeriod: ReportingPeriod! + createdAt: DateTime! + updatedAt: DateTime! + } + + type Query { + projects: [Project!]! @requireAuth + project(id: Int!): Project @requireAuth + } + + input CreateProjectInput { + code: String! + name: String! + agencyId: Int! + organizationId: Int! + status: String! + description: String! + originationPeriodId: Int! + } + + input UpdateProjectInput { + code: String + name: String + agencyId: Int + organizationId: Int + status: String + description: String + originationPeriodId: Int + } + + type Mutation { + createProject(input: CreateProjectInput!): Project! @requireAuth + updateProject(id: Int!, input: UpdateProjectInput!): Project! @requireAuth + deleteProject(id: Int!): Project! @requireAuth + } +` diff --git a/api/src/graphql/subrecipients.sdl.ts b/api/src/graphql/subrecipients.sdl.ts new file mode 100644 index 00000000..77ccd630 --- /dev/null +++ b/api/src/graphql/subrecipients.sdl.ts @@ -0,0 +1,52 @@ +export const schema = gql` + type Subrecipient { + id: Int! + name: String! + organizationId: Int! + organization: Organization! + startDate: DateTime! + endDate: DateTime! + certifiedAt: DateTime + certifiedById: Int + certifiedBy: User + originationUploadId: Int! + originationUpload: Upload! + createdAt: DateTime! + updatedAt: DateTime! + } + + type Query { + subrecipients: [Subrecipient!]! @requireAuth + subrecipient(id: Int!): Subrecipient @requireAuth + } + + input CreateSubrecipientInput { + name: String! + organizationId: Int! + startDate: DateTime! + endDate: DateTime! + certifiedAt: DateTime + certifiedById: Int + originationUploadId: Int! + } + + input UpdateSubrecipientInput { + name: String + organizationId: Int + startDate: DateTime + endDate: DateTime + certifiedAt: DateTime + certifiedById: Int + originationUploadId: Int + } + + type Mutation { + createSubrecipient(input: CreateSubrecipientInput!): Subrecipient! + @requireAuth + updateSubrecipient( + id: Int! + input: UpdateSubrecipientInput! + ): Subrecipient! @requireAuth + deleteSubrecipient(id: Int!): Subrecipient! @requireAuth + } +` diff --git a/api/src/services/projects/projects.scenarios.ts b/api/src/services/projects/projects.scenarios.ts new file mode 100644 index 00000000..7be54044 --- /dev/null +++ b/api/src/services/projects/projects.scenarios.ts @@ -0,0 +1,79 @@ +import type { Prisma, Project } from '@prisma/client' +import type { ScenarioData } from '@redwoodjs/testing/api' + +export const standard = defineScenario({ + project: { + one: { + data: { + code: 'String', + name: 'String', + status: 'String', + description: 'String', + updatedAt: '2023-12-09T14:50:29.322Z', + agency: { create: { name: 'String', code: 'String' } }, + organization: { create: { name: 'String' } }, + originationPeriod: { + create: { + name: 'String', + startDate: '2023-12-09T14:50:29.322Z', + endDate: '2023-12-09T14:50:29.322Z', + updatedAt: '2023-12-09T14:50:29.322Z', + inputTemplate: { + create: { + name: 'String', + version: 'String', + effectiveDate: '2023-12-09T14:50:29.322Z', + updatedAt: '2023-12-09T14:50:29.322Z', + }, + }, + outputTemplate: { + create: { + name: 'String', + version: 'String', + effectiveDate: '2023-12-09T14:50:29.322Z', + updatedAt: '2023-12-09T14:50:29.322Z', + }, + }, + }, + }, + }, + }, + two: { + data: { + code: 'String', + name: 'String', + status: 'String', + description: 'String', + updatedAt: '2023-12-09T14:50:29.322Z', + agency: { create: { name: 'String', code: 'String' } }, + organization: { create: { name: 'String' } }, + originationPeriod: { + create: { + name: 'String', + startDate: '2023-12-09T14:50:29.322Z', + endDate: '2023-12-09T14:50:29.322Z', + updatedAt: '2023-12-09T14:50:29.322Z', + inputTemplate: { + create: { + name: 'String', + version: 'String', + effectiveDate: '2023-12-09T14:50:29.322Z', + updatedAt: '2023-12-09T14:50:29.322Z', + }, + }, + outputTemplate: { + create: { + name: 'String', + version: 'String', + effectiveDate: '2023-12-09T14:50:29.322Z', + updatedAt: '2023-12-09T14:50:29.322Z', + }, + }, + }, + }, + }, + }, + }, +}) + +export type StandardScenario = ScenarioData diff --git a/api/src/services/projects/projects.test.ts b/api/src/services/projects/projects.test.ts new file mode 100644 index 00000000..4c234abf --- /dev/null +++ b/api/src/services/projects/projects.test.ts @@ -0,0 +1,75 @@ +import type { Project } from '@prisma/client' + +import { + projects, + project, + createProject, + updateProject, + deleteProject, +} from './projects' +import type { StandardScenario } from './projects.scenarios' + +// Generated boilerplate tests do not account for all circumstances +// and can fail without adjustments, e.g. Float. +// Please refer to the RedwoodJS Testing Docs: +// https://redwoodjs.com/docs/testing#testing-services +// https://redwoodjs.com/docs/testing#jest-expect-type-considerations + +describe('projects', () => { + scenario('returns all projects', async (scenario: StandardScenario) => { + const result = await projects() + + expect(result.length).toEqual(Object.keys(scenario.project).length) + }) + + scenario('returns a single project', async (scenario: StandardScenario) => { + const result = await project({ id: scenario.project.one.id }) + + expect(result).toEqual(scenario.project.one) + }) + + scenario('creates a project', async (scenario: StandardScenario) => { + const result = await createProject({ + input: { + code: 'String', + name: 'String', + agencyId: scenario.project.two.agencyId, + organizationId: scenario.project.two.organizationId, + status: 'String', + description: 'String', + originationPeriodId: scenario.project.two.originationPeriodId, + updatedAt: '2023-12-09T14:50:29.223Z', + }, + }) + + expect(result.code).toEqual('String') + expect(result.name).toEqual('String') + expect(result.agencyId).toEqual(scenario.project.two.agencyId) + expect(result.organizationId).toEqual(scenario.project.two.organizationId) + expect(result.status).toEqual('String') + expect(result.description).toEqual('String') + expect(result.originationPeriodId).toEqual( + scenario.project.two.originationPeriodId + ) + expect(result.updatedAt).toEqual(new Date('2023-12-09T14:50:29.223Z')) + }) + + scenario('updates a project', async (scenario: StandardScenario) => { + const original = (await project({ id: scenario.project.one.id })) as Project + const result = await updateProject({ + id: original.id, + input: { code: 'String2' }, + }) + + expect(result.code).toEqual('String2') + }) + + scenario('deletes a project', async (scenario: StandardScenario) => { + const original = (await deleteProject({ + id: scenario.project.one.id, + })) as Project + const result = await project({ id: original.id }) + + expect(result).toEqual(null) + }) +}) diff --git a/api/src/services/projects/projects.ts b/api/src/services/projects/projects.ts new file mode 100644 index 00000000..dbee06f6 --- /dev/null +++ b/api/src/services/projects/projects.ts @@ -0,0 +1,55 @@ +import type { + QueryResolvers, + MutationResolvers, + ProjectRelationResolvers, +} from 'types/graphql' + +import { db } from 'src/lib/db' + +export const projects: QueryResolvers['projects'] = () => { + return db.project.findMany() +} + +export const project: QueryResolvers['project'] = ({ id }) => { + return db.project.findUnique({ + where: { id }, + }) +} + +export const createProject: MutationResolvers['createProject'] = ({ + input, +}) => { + return db.project.create({ + data: input, + }) +} + +export const updateProject: MutationResolvers['updateProject'] = ({ + id, + input, +}) => { + return db.project.update({ + data: input, + where: { id }, + }) +} + +export const deleteProject: MutationResolvers['deleteProject'] = ({ id }) => { + return db.project.delete({ + where: { id }, + }) +} + +export const Project: ProjectRelationResolvers = { + agency: (_obj, { root }) => { + return db.project.findUnique({ where: { id: root?.id } }).agency() + }, + organization: (_obj, { root }) => { + return db.project.findUnique({ where: { id: root?.id } }).organization() + }, + originationPeriod: (_obj, { root }) => { + return db.project + .findUnique({ where: { id: root?.id } }) + .originationPeriod() + }, +} diff --git a/api/src/services/subrecipients/subrecipients.scenarios.ts b/api/src/services/subrecipients/subrecipients.scenarios.ts new file mode 100644 index 00000000..0ae6fb76 --- /dev/null +++ b/api/src/services/subrecipients/subrecipients.scenarios.ts @@ -0,0 +1,119 @@ +import type { Prisma, Subrecipient } from '@prisma/client' +import type { ScenarioData } from '@redwoodjs/testing/api' + +export const standard = defineScenario({ + subrecipient: { + one: { + data: { + name: 'String', + startDate: '2023-12-09T14:50:18.317Z', + endDate: '2023-12-09T14:50:18.317Z', + updatedAt: '2023-12-09T14:50:18.317Z', + organization: { create: { name: 'String' } }, + originationUpload: { + create: { + filename: 'String', + updatedAt: '2023-12-09T14:50:18.317Z', + uploadedBy: { + create: { + email: 'String', + updatedAt: '2023-12-09T14:50:18.317Z', + organization: { create: { name: 'String' } }, + }, + }, + agency: { create: { name: 'String', code: 'String' } }, + organizaiton: { create: { name: 'String' } }, + reportingPeriod: { + create: { + name: 'String', + startDate: '2023-12-09T14:50:18.317Z', + endDate: '2023-12-09T14:50:18.317Z', + updatedAt: '2023-12-09T14:50:18.317Z', + inputTemplate: { + create: { + name: 'String', + version: 'String', + effectiveDate: '2023-12-09T14:50:18.317Z', + updatedAt: '2023-12-09T14:50:18.317Z', + }, + }, + outputTemplate: { + create: { + name: 'String', + version: 'String', + effectiveDate: '2023-12-09T14:50:18.317Z', + updatedAt: '2023-12-09T14:50:18.317Z', + }, + }, + }, + }, + expenditureCategory: { + create: { + name: 'String', + code: 'String', + updatedAt: '2023-12-09T14:50:18.317Z', + }, + }, + }, + }, + }, + }, + two: { + data: { + name: 'String', + startDate: '2023-12-09T14:50:18.317Z', + endDate: '2023-12-09T14:50:18.317Z', + updatedAt: '2023-12-09T14:50:18.317Z', + organization: { create: { name: 'String' } }, + originationUpload: { + create: { + filename: 'String', + updatedAt: '2023-12-09T14:50:18.317Z', + uploadedBy: { + create: { + email: 'String', + updatedAt: '2023-12-09T14:50:18.317Z', + organization: { create: { name: 'String' } }, + }, + }, + agency: { create: { name: 'String', code: 'String' } }, + organizaiton: { create: { name: 'String' } }, + reportingPeriod: { + create: { + name: 'String', + startDate: '2023-12-09T14:50:18.317Z', + endDate: '2023-12-09T14:50:18.317Z', + updatedAt: '2023-12-09T14:50:18.317Z', + inputTemplate: { + create: { + name: 'String', + version: 'String', + effectiveDate: '2023-12-09T14:50:18.317Z', + updatedAt: '2023-12-09T14:50:18.317Z', + }, + }, + outputTemplate: { + create: { + name: 'String', + version: 'String', + effectiveDate: '2023-12-09T14:50:18.317Z', + updatedAt: '2023-12-09T14:50:18.317Z', + }, + }, + }, + }, + expenditureCategory: { + create: { + name: 'String', + code: 'String', + updatedAt: '2023-12-09T14:50:18.317Z', + }, + }, + }, + }, + }, + }, + }, +}) + +export type StandardScenario = ScenarioData diff --git a/api/src/services/subrecipients/subrecipients.test.ts b/api/src/services/subrecipients/subrecipients.test.ts new file mode 100644 index 00000000..dd43b560 --- /dev/null +++ b/api/src/services/subrecipients/subrecipients.test.ts @@ -0,0 +1,78 @@ +import type { Subrecipient } from '@prisma/client' + +import { + subrecipients, + subrecipient, + createSubrecipient, + updateSubrecipient, + deleteSubrecipient, +} from './subrecipients' +import type { StandardScenario } from './subrecipients.scenarios' + +// Generated boilerplate tests do not account for all circumstances +// and can fail without adjustments, e.g. Float. +// Please refer to the RedwoodJS Testing Docs: +// https://redwoodjs.com/docs/testing#testing-services +// https://redwoodjs.com/docs/testing#jest-expect-type-considerations + +describe('subrecipients', () => { + scenario('returns all subrecipients', async (scenario: StandardScenario) => { + const result = await subrecipients() + + expect(result.length).toEqual(Object.keys(scenario.subrecipient).length) + }) + + scenario( + 'returns a single subrecipient', + async (scenario: StandardScenario) => { + const result = await subrecipient({ id: scenario.subrecipient.one.id }) + + expect(result).toEqual(scenario.subrecipient.one) + } + ) + + scenario('creates a subrecipient', async (scenario: StandardScenario) => { + const result = await createSubrecipient({ + input: { + name: 'String', + organizationId: scenario.subrecipient.two.organizationId, + startDate: '2023-12-09T14:50:18.092Z', + endDate: '2023-12-09T14:50:18.092Z', + originationUploadId: scenario.subrecipient.two.originationUploadId, + updatedAt: '2023-12-09T14:50:18.092Z', + }, + }) + + expect(result.name).toEqual('String') + expect(result.organizationId).toEqual( + scenario.subrecipient.two.organizationId + ) + expect(result.startDate).toEqual(new Date('2023-12-09T00:00:00.000Z')) + expect(result.endDate).toEqual(new Date('2023-12-09T00:00:00.000Z')) + expect(result.originationUploadId).toEqual( + scenario.subrecipient.two.originationUploadId + ) + expect(result.updatedAt).toEqual(new Date('2023-12-09T14:50:18.092Z')) + }) + + scenario('updates a subrecipient', async (scenario: StandardScenario) => { + const original = (await subrecipient({ + id: scenario.subrecipient.one.id, + })) as Subrecipient + const result = await updateSubrecipient({ + id: original.id, + input: { name: 'String2' }, + }) + + expect(result.name).toEqual('String2') + }) + + scenario('deletes a subrecipient', async (scenario: StandardScenario) => { + const original = (await deleteSubrecipient({ + id: scenario.subrecipient.one.id, + })) as Subrecipient + const result = await subrecipient({ id: original.id }) + + expect(result).toEqual(null) + }) +}) diff --git a/api/src/services/subrecipients/subrecipients.ts b/api/src/services/subrecipients/subrecipients.ts new file mode 100644 index 00000000..0ad559bd --- /dev/null +++ b/api/src/services/subrecipients/subrecipients.ts @@ -0,0 +1,59 @@ +import type { + QueryResolvers, + MutationResolvers, + SubrecipientRelationResolvers, +} from 'types/graphql' + +import { db } from 'src/lib/db' + +export const subrecipients: QueryResolvers['subrecipients'] = () => { + return db.subrecipient.findMany() +} + +export const subrecipient: QueryResolvers['subrecipient'] = ({ id }) => { + return db.subrecipient.findUnique({ + where: { id }, + }) +} + +export const createSubrecipient: MutationResolvers['createSubrecipient'] = ({ + input, +}) => { + return db.subrecipient.create({ + data: input, + }) +} + +export const updateSubrecipient: MutationResolvers['updateSubrecipient'] = ({ + id, + input, +}) => { + return db.subrecipient.update({ + data: input, + where: { id }, + }) +} + +export const deleteSubrecipient: MutationResolvers['deleteSubrecipient'] = ({ + id, +}) => { + return db.subrecipient.delete({ + where: { id }, + }) +} + +export const Subrecipient: SubrecipientRelationResolvers = { + organization: (_obj, { root }) => { + return db.subrecipient + .findUnique({ where: { id: root?.id } }) + .organization() + }, + certifiedBy: (_obj, { root }) => { + return db.subrecipient.findUnique({ where: { id: root?.id } }).certifiedBy() + }, + originationUpload: (_obj, { root }) => { + return db.subrecipient + .findUnique({ where: { id: root?.id } }) + .originationUpload() + }, +} diff --git a/api/types/graphql.d.ts b/api/types/graphql.d.ts index ee9d6557..e1e409bd 100644 --- a/api/types/graphql.d.ts +++ b/api/types/graphql.d.ts @@ -12,6 +12,7 @@ export type ResolverFn = ( 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 = ( args?: TArgs, @@ -75,6 +76,16 @@ export type CreateOutputTemplateInput = { 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']; +}; + export type CreateReportingPeriodInput = { certifiedAt?: InputMaybe; certifiedById?: InputMaybe; @@ -90,6 +101,16 @@ export type CreateRoleInput = { 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']; +}; + export type CreateUploadInput = { agencyId: Scalars['Int']; expenditureCategoryId: Scalars['Int']; @@ -149,8 +170,10 @@ export type Mutation = { createInputTemplate: InputTemplate; createOrganization: Organization; createOutputTemplate: OutputTemplate; + createProject: Project; createReportingPeriod: ReportingPeriod; createRole: Role; + createSubrecipient: Subrecipient; createUpload: Upload; createUploadValidation: UploadValidation; createUser: User; @@ -159,8 +182,10 @@ export type Mutation = { deleteInputTemplate: InputTemplate; deleteOrganization: Organization; deleteOutputTemplate: OutputTemplate; + deleteProject: Project; deleteReportingPeriod: ReportingPeriod; deleteRole: Role; + deleteSubrecipient: Subrecipient; deleteUpload: Upload; deleteUploadValidation: UploadValidation; deleteUser: User; @@ -169,8 +194,10 @@ export type Mutation = { updateInputTemplate: InputTemplate; updateOrganization: Organization; updateOutputTemplate: OutputTemplate; + updateProject: Project; updateReportingPeriod: ReportingPeriod; updateRole: Role; + updateSubrecipient: Subrecipient; updateUpload: Upload; updateUploadValidation: UploadValidation; updateUser: User; @@ -202,6 +229,11 @@ export type MutationcreateOutputTemplateArgs = { }; +export type MutationcreateProjectArgs = { + input: CreateProjectInput; +}; + + export type MutationcreateReportingPeriodArgs = { input: CreateReportingPeriodInput; }; @@ -212,6 +244,11 @@ export type MutationcreateRoleArgs = { }; +export type MutationcreateSubrecipientArgs = { + input: CreateSubrecipientInput; +}; + + export type MutationcreateUploadArgs = { input: CreateUploadInput; }; @@ -252,6 +289,11 @@ export type MutationdeleteOutputTemplateArgs = { }; +export type MutationdeleteProjectArgs = { + id: Scalars['Int']; +}; + + export type MutationdeleteReportingPeriodArgs = { id: Scalars['Int']; }; @@ -262,6 +304,11 @@ export type MutationdeleteRoleArgs = { }; +export type MutationdeleteSubrecipientArgs = { + id: Scalars['Int']; +}; + + export type MutationdeleteUploadArgs = { id: Scalars['Int']; }; @@ -307,6 +354,12 @@ export type MutationupdateOutputTemplateArgs = { }; +export type MutationupdateProjectArgs = { + id: Scalars['Int']; + input: UpdateProjectInput; +}; + + export type MutationupdateReportingPeriodArgs = { id: Scalars['Int']; input: UpdateReportingPeriodInput; @@ -319,6 +372,12 @@ export type MutationupdateRoleArgs = { }; +export type MutationupdateSubrecipientArgs = { + id: Scalars['Int']; + input: UpdateSubrecipientInput; +}; + + export type MutationupdateUploadArgs = { id: Scalars['Int']; input: UpdateUploadInput; @@ -355,6 +414,23 @@ export type OutputTemplate = { 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']; +}; + /** About the Redwood queries. */ export type Query = { __typename?: 'Query'; @@ -369,12 +445,16 @@ export type Query = { 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; @@ -420,6 +500,12 @@ export type QueryoutputTemplateArgs = { }; +/** About the Redwood queries. */ +export type QueryprojectArgs = { + id: Scalars['Int']; +}; + + /** About the Redwood queries. */ export type QueryreportingPeriodArgs = { id: Scalars['Int']; @@ -432,6 +518,12 @@ export type QueryroleArgs = { }; +/** About the Redwood queries. */ +export type QuerysubrecipientArgs = { + id: Scalars['Int']; +}; + + /** About the Redwood queries. */ export type QueryuploadArgs = { id: Scalars['Int']; @@ -491,6 +583,23 @@ export type Role = { 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']; +}; + export type UpdateAgencyInput = { abbreviation?: InputMaybe; code?: InputMaybe; @@ -520,6 +629,16 @@ export type UpdateOutputTemplateInput = { version?: InputMaybe; }; +export type UpdateProjectInput = { + agencyId?: InputMaybe; + code?: InputMaybe; + description?: InputMaybe; + name?: InputMaybe; + organizationId?: InputMaybe; + originationPeriodId?: InputMaybe; + status?: InputMaybe; +}; + export type UpdateReportingPeriodInput = { certifiedAt?: InputMaybe; certifiedById?: InputMaybe; @@ -535,6 +654,16 @@ export type UpdateRoleInput = { name?: InputMaybe; }; +export type UpdateSubrecipientInput = { + certifiedAt?: InputMaybe; + certifiedById?: InputMaybe; + endDate?: InputMaybe; + name?: InputMaybe; + organizationId?: InputMaybe; + originationUploadId?: InputMaybe; + startDate?: InputMaybe; +}; + export type UpdateUploadInput = { agencyId?: InputMaybe; expenditureCategoryId?: InputMaybe; @@ -693,8 +822,10 @@ export type ResolversTypes = { CreateInputTemplateInput: CreateInputTemplateInput; CreateOrganizationInput: CreateOrganizationInput; CreateOutputTemplateInput: CreateOutputTemplateInput; + CreateProjectInput: CreateProjectInput; CreateReportingPeriodInput: CreateReportingPeriodInput; CreateRoleInput: CreateRoleInput; + CreateSubrecipientInput: CreateSubrecipientInput; CreateUploadInput: CreateUploadInput; CreateUploadValidationInput: CreateUploadValidationInput; CreateUserInput: CreateUserInput; @@ -708,19 +839,23 @@ export type ResolversTypes = { Mutation: ResolverTypeWrapper<{}>; Organization: ResolverTypeWrapper, AllMappedModels>>; OutputTemplate: ResolverTypeWrapper, AllMappedModels>>; + Project: ResolverTypeWrapper & { agency: ResolversTypes['Agency'], organization: ResolversTypes['Organization'], originationPeriod: ResolversTypes['ReportingPeriod'] }>; Query: ResolverTypeWrapper<{}>; Redwood: ResolverTypeWrapper; ReportingPeriod: ResolverTypeWrapper, AllMappedModels>>; Role: ResolverTypeWrapper, AllMappedModels>>; String: ResolverTypeWrapper; + Subrecipient: ResolverTypeWrapper & { 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; @@ -739,8 +874,10 @@ export type ResolversParentTypes = { CreateInputTemplateInput: CreateInputTemplateInput; CreateOrganizationInput: CreateOrganizationInput; CreateOutputTemplateInput: CreateOutputTemplateInput; + CreateProjectInput: CreateProjectInput; CreateReportingPeriodInput: CreateReportingPeriodInput; CreateRoleInput: CreateRoleInput; + CreateSubrecipientInput: CreateSubrecipientInput; CreateUploadInput: CreateUploadInput; CreateUploadValidationInput: CreateUploadValidationInput; CreateUserInput: CreateUserInput; @@ -754,19 +891,23 @@ export type ResolversParentTypes = { Mutation: {}; Organization: MergePrismaWithSdlTypes, AllMappedModels>; OutputTemplate: MergePrismaWithSdlTypes, AllMappedModels>; + Project: Omit & { agency: ResolversParentTypes['Agency'], organization: ResolversParentTypes['Organization'], originationPeriod: ResolversParentTypes['ReportingPeriod'] }; Query: {}; Redwood: Redwood; ReportingPeriod: MergePrismaWithSdlTypes, AllMappedModels>; Role: MergePrismaWithSdlTypes, AllMappedModels>; String: Scalars['String']; + Subrecipient: Omit & { 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; @@ -873,8 +1014,10 @@ export type MutationResolvers>; createOrganization: Resolver>; createOutputTemplate: Resolver>; + createProject: Resolver>; createReportingPeriod: Resolver>; createRole: Resolver>; + createSubrecipient: Resolver>; createUpload: Resolver>; createUploadValidation: Resolver>; createUser: Resolver>; @@ -883,8 +1026,10 @@ export type MutationResolvers>; deleteOrganization: Resolver>; deleteOutputTemplate: Resolver>; + deleteProject: Resolver>; deleteReportingPeriod: Resolver>; deleteRole: Resolver>; + deleteSubrecipient: Resolver>; deleteUpload: Resolver>; deleteUploadValidation: Resolver>; deleteUser: Resolver>; @@ -893,8 +1038,10 @@ export type MutationResolvers>; updateOrganization: Resolver>; updateOutputTemplate: Resolver>; + updateProject: Resolver>; updateReportingPeriod: Resolver>; updateRole: Resolver>; + updateSubrecipient: Resolver>; updateUpload: Resolver>; updateUploadValidation: Resolver>; updateUser: Resolver>; @@ -906,8 +1053,10 @@ export type MutationRelationResolvers>; createOrganization?: RequiredResolverFn>; createOutputTemplate?: RequiredResolverFn>; + createProject?: RequiredResolverFn>; createReportingPeriod?: RequiredResolverFn>; createRole?: RequiredResolverFn>; + createSubrecipient?: RequiredResolverFn>; createUpload?: RequiredResolverFn>; createUploadValidation?: RequiredResolverFn>; createUser?: RequiredResolverFn>; @@ -916,8 +1065,10 @@ export type MutationRelationResolvers>; deleteOrganization?: RequiredResolverFn>; deleteOutputTemplate?: RequiredResolverFn>; + deleteProject?: RequiredResolverFn>; deleteReportingPeriod?: RequiredResolverFn>; deleteRole?: RequiredResolverFn>; + deleteSubrecipient?: RequiredResolverFn>; deleteUpload?: RequiredResolverFn>; deleteUploadValidation?: RequiredResolverFn>; deleteUser?: RequiredResolverFn>; @@ -926,8 +1077,10 @@ export type MutationRelationResolvers>; updateOrganization?: RequiredResolverFn>; updateOutputTemplate?: RequiredResolverFn>; + updateProject?: RequiredResolverFn>; updateReportingPeriod?: RequiredResolverFn>; updateRole?: RequiredResolverFn>; + updateSubrecipient?: RequiredResolverFn>; updateUpload?: RequiredResolverFn>; updateUploadValidation?: RequiredResolverFn>; updateUser?: RequiredResolverFn>; @@ -971,6 +1124,40 @@ export type OutputTemplateRelationResolvers; }; +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>; @@ -983,11 +1170,15 @@ export type QueryResolvers, 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>; @@ -1008,11 +1199,15 @@ export type QueryRelationResolvers, 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>; @@ -1089,6 +1284,40 @@ export type RoleRelationResolvers; }; +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'; } @@ -1221,10 +1450,12 @@ export type Resolvers = { Mutation: MutationResolvers; Organization: OrganizationResolvers; OutputTemplate: OutputTemplateResolvers; + Project: ProjectResolvers; Query: QueryResolvers; Redwood: RedwoodResolvers; ReportingPeriod: ReportingPeriodResolvers; Role: RoleResolvers; + Subrecipient: SubrecipientResolvers; Time: GraphQLScalarType; Upload: UploadResolvers; UploadValidation: UploadValidationResolvers; diff --git a/web/types/graphql.d.ts b/web/types/graphql.d.ts index 57dfedc2..c0f9a387 100644 --- a/web/types/graphql.d.ts +++ b/web/types/graphql.d.ts @@ -1,400 +1,526 @@ -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']; +}; 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']; +}; 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; + organizationId: Scalars['Int']; + 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 - createReportingPeriod: ReportingPeriod - createRole: Role - createUpload: Upload - createUploadValidation: UploadValidation - createUser: User - deleteAgency: Agency - deleteExpenditureCategory: ExpenditureCategory - deleteInputTemplate: InputTemplate - deleteOrganization: Organization - deleteOutputTemplate: OutputTemplate - deleteReportingPeriod: ReportingPeriod - deleteRole: Role - deleteUpload: Upload - deleteUploadValidation: UploadValidation - deleteUser: User - updateAgency: Agency - updateExpenditureCategory: ExpenditureCategory - updateInputTemplate: InputTemplate - updateOrganization: Organization - updateOutputTemplate: OutputTemplate - updateReportingPeriod: ReportingPeriod - updateRole: Role - 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; +}; + export type MutationcreateReportingPeriodArgs = { - input: CreateReportingPeriodInput -} + input: CreateReportingPeriodInput; +}; + export type MutationcreateRoleArgs = { - input: CreateRoleInput -} + input: CreateRoleInput; +}; + + +export type MutationcreateSubrecipientArgs = { + 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']; +}; + export type MutationdeleteReportingPeriodArgs = { - id: Scalars['Int'] -} + id: Scalars['Int']; +}; + export type MutationdeleteRoleArgs = { - id: Scalars['Int'] -} + id: Scalars['Int']; +}; + + +export type MutationdeleteSubrecipientArgs = { + 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; +}; + 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; +}; + 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']; +}; /** 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 + __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 - 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; +}; + /** 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']; +}; + /** 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']; +}; + /** 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']; +}; /** * The RedwoodJS Root Schema @@ -402,343 +528,303 @@ 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']; +}; 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; +}; 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; +}; 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; + organizationId?: 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'] - organizaiton: 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']; + organizaiton: 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 - organizaiton: 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; + organizaiton: 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']; + name?: Maybe; + organization: Organization; + organizationId: Scalars['Int']; + role?: Maybe; + roleId?: Maybe; + updatedAt: Scalars['DateTime']; +}; 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' - id: number - 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 } }> };