diff --git a/app/gen/axios/findCapitalCommitmentTypes.ts b/app/gen/axios/findCapitalCommitmentTypes.ts new file mode 100644 index 0000000..4ffbb4f --- /dev/null +++ b/app/gen/axios/findCapitalCommitmentTypes.ts @@ -0,0 +1,18 @@ +import client from "@kubb/swagger-client/client"; +import type { ResponseConfig } from "@kubb/swagger-client/client"; +import type { FindCapitalCommitmentTypesQueryResponse } from "../types/FindCapitalCommitmentTypes"; + +/** + * @summary Capital Commitment Types + * @link /capital-commitment-types + */ +export async function findCapitalCommitmentTypes( + options: Partial[0]> = {}, +): Promise["data"]> { + const res = await client({ + method: "get", + url: `/capital-commitment-types`, + ...options, + }); + return res.data; +} diff --git a/app/gen/axios/findCapitalProjectGeoJsonByManagingCodeCapitalProjectId.ts b/app/gen/axios/findCapitalProjectGeoJsonByManagingCodeCapitalProjectId.ts new file mode 100644 index 0000000..acc6676 --- /dev/null +++ b/app/gen/axios/findCapitalProjectGeoJsonByManagingCodeCapitalProjectId.ts @@ -0,0 +1,28 @@ +import client from "@kubb/swagger-client/client"; +import type { ResponseConfig } from "@kubb/swagger-client/client"; +import type { + FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponse, + FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdPathParams, +} from "../types/FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId"; + +/** + * @summary Find a single capital project as a geojson feature + * @link /capital-projects/:managingCode/:capitalProjectId/geojson + */ +export async function findCapitalProjectGeoJsonByManagingCodeCapitalProjectId( + managingCode: FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdPathParams["managingCode"], + capitalProjectId: FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdPathParams["capitalProjectId"], + options: Partial[0]> = {}, +): Promise< + ResponseConfig["data"] +> { + const res = + await client( + { + method: "get", + url: `/capital-projects/${managingCode}/${capitalProjectId}/geojson`, + ...options, + }, + ); + return res.data; +} diff --git a/app/gen/axios/findCityCouncilDistrictGeoJsonByCityCouncilDistrictId.ts b/app/gen/axios/findCityCouncilDistrictGeoJsonByCityCouncilDistrictId.ts new file mode 100644 index 0000000..58e1048 --- /dev/null +++ b/app/gen/axios/findCityCouncilDistrictGeoJsonByCityCouncilDistrictId.ts @@ -0,0 +1,27 @@ +import client from "@kubb/swagger-client/client"; +import type { ResponseConfig } from "@kubb/swagger-client/client"; +import type { + FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponse, + FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdPathParams, +} from "../types/FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId"; + +/** + * @summary Find GeoJson for a specific city council district + * @link /city-council-districts/:cityCouncilDistrictId/geojson + */ +export async function findCityCouncilDistrictGeoJsonByCityCouncilDistrictId( + cityCouncilDistrictId: FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdPathParams["cityCouncilDistrictId"], + options: Partial[0]> = {}, +): Promise< + ResponseConfig["data"] +> { + const res = + await client( + { + method: "get", + url: `/city-council-districts/${cityCouncilDistrictId}/geojson`, + ...options, + }, + ); + return res.data; +} diff --git a/app/gen/axios/findCityCouncilDistrictTiles.ts b/app/gen/axios/findCityCouncilDistrictTiles.ts index 9b2c132..d2fc8e9 100644 --- a/app/gen/axios/findCityCouncilDistrictTiles.ts +++ b/app/gen/axios/findCityCouncilDistrictTiles.ts @@ -6,7 +6,7 @@ import type { } from "../types/FindCityCouncilDistrictTiles"; /** - * @summary 🚧 Mapbox Vector Tiles for city council districts + * @summary Mapbox Vector Tiles for city council districts * @link /city-council-districts/:z/:x/:y.pbf */ export async function findCityCouncilDistrictTiles( diff --git a/app/gen/axios/findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId.ts b/app/gen/axios/findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId.ts new file mode 100644 index 0000000..1c06d45 --- /dev/null +++ b/app/gen/axios/findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId.ts @@ -0,0 +1,28 @@ +import client from "@kubb/swagger-client/client"; +import type { ResponseConfig } from "@kubb/swagger-client/client"; +import type { + FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponse, + FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdPathParams, +} from "../types/FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId"; + +/** + * @summary Find GeoJson for a specific community district + * @link /boroughs/:boroughId/community-districts/:communityDistrictId/geojson + */ +export async function findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId( + boroughId: FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdPathParams["boroughId"], + communityDistrictId: FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdPathParams["communityDistrictId"], + options: Partial[0]> = {}, +): Promise< + ResponseConfig["data"] +> { + const res = + await client( + { + method: "get", + url: `/boroughs/${boroughId}/community-districts/${communityDistrictId}/geojson`, + ...options, + }, + ); + return res.data; +} diff --git a/app/gen/axios/index.ts b/app/gen/axios/index.ts index 2164506..d9e1b62 100644 --- a/app/gen/axios/index.ts +++ b/app/gen/axios/index.ts @@ -1,12 +1,16 @@ export * from "./findAgencies"; export * from "./findBoroughs"; +export * from "./findCapitalCommitmentTypes"; export * from "./findCapitalCommitmentsByManagingCodeCapitalProjectId"; export * from "./findCapitalProjectByManagingCodeCapitalProjectId"; +export * from "./findCapitalProjectGeoJsonByManagingCodeCapitalProjectId"; export * from "./findCapitalProjectTiles"; export * from "./findCapitalProjectsByBoroughIdCommunityDistrictId"; export * from "./findCapitalProjectsByCityCouncilId"; +export * from "./findCityCouncilDistrictGeoJsonByCityCouncilDistrictId"; export * from "./findCityCouncilDistrictTiles"; export * from "./findCityCouncilDistricts"; +export * from "./findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId"; export * from "./findCommunityDistrictTiles"; export * from "./findCommunityDistrictsByBoroughId"; export * from "./findLandUses"; diff --git a/app/gen/axios/operations.ts b/app/gen/axios/operations.ts index 4ff9b57..12729c9 100644 --- a/app/gen/axios/operations.ts +++ b/app/gen/axios/operations.ts @@ -11,14 +11,26 @@ export const operations = { path: "/boroughs/:boroughId/community-districts", method: "get", }, + findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId: { + path: "/boroughs/:boroughId/community-districts/:communityDistrictId/geojson", + method: "get", + }, findCapitalProjectsByBoroughIdCommunityDistrictId: { path: "/boroughs/:boroughId/community-districts/:communityDistrictId/capital-projects", method: "get", }, + findCapitalCommitmentTypes: { + path: "/capital-commitment-types", + method: "get", + }, findCapitalCommitmentsByManagingCodeCapitalProjectId: { path: "/capital-projects/:managingCode/:capitalProjectId/capital-commitments", method: "get", }, + findCapitalProjectGeoJsonByManagingCodeCapitalProjectId: { + path: "/capital-projects/:managingCode/:capitalProjectId/geojson", + method: "get", + }, findCapitalProjectByManagingCodeCapitalProjectId: { path: "/capital-projects/:managingCode/:capitalProjectId", method: "get", @@ -31,6 +43,10 @@ export const operations = { path: "/city-council-districts", method: "get", }, + findCityCouncilDistrictGeoJsonByCityCouncilDistrictId: { + path: "/city-council-districts/:cityCouncilDistrictId/geojson", + method: "get", + }, findCapitalProjectsByCityCouncilId: { path: "/city-council-districts/:cityCouncilDistrictId/capital-projects", method: "get", diff --git a/app/gen/mocks/createCapitalCommitmentType.ts b/app/gen/mocks/createCapitalCommitmentType.ts new file mode 100644 index 0000000..97c48a0 --- /dev/null +++ b/app/gen/mocks/createCapitalCommitmentType.ts @@ -0,0 +1,12 @@ +import { faker } from "@faker-js/faker"; +import RandExp from "randexp"; +import type { CapitalCommitmentType } from "../types/CapitalCommitmentType"; + +export function createCapitalCommitmentType( + data: NonNullable> = {}, +): NonNullable { + return { + ...{ code: faker.string.alpha(), description: faker.string.alpha() }, + ...data, + }; +} diff --git a/app/gen/mocks/createCapitalProjectBudgetedGeoJson.ts b/app/gen/mocks/createCapitalProjectBudgetedGeoJson.ts new file mode 100644 index 0000000..6cb3e26 --- /dev/null +++ b/app/gen/mocks/createCapitalProjectBudgetedGeoJson.ts @@ -0,0 +1,23 @@ +import { createMultiPoint } from "./createMultiPoint"; +import { createMultiPolygon } from "./createMultiPolygon"; +import { createCapitalProjectBudgeted } from "./createCapitalProjectBudgeted"; +import { faker } from "@faker-js/faker"; +import RandExp from "randexp"; +import type { CapitalProjectBudgetedGeoJson } from "../types/CapitalProjectBudgetedGeoJson"; + +export function createCapitalProjectBudgetedGeoJson( + data: NonNullable> = {}, +): NonNullable { + return { + ...{ + id: faker.string.alpha(), + type: faker.helpers.arrayElement(["Feature"]), + geometry: faker.helpers.arrayElement([ + createMultiPoint(), + createMultiPolygon(), + ]), + properties: createCapitalProjectBudgeted(), + }, + ...data, + }; +} diff --git a/app/gen/mocks/createCityCouncilDistrictGeoJson.ts b/app/gen/mocks/createCityCouncilDistrictGeoJson.ts new file mode 100644 index 0000000..bdd2e71 --- /dev/null +++ b/app/gen/mocks/createCityCouncilDistrictGeoJson.ts @@ -0,0 +1,22 @@ +import { createCityCouncilDistrict } from "./createCityCouncilDistrict"; +import { createMultiPolygon } from "./createMultiPolygon"; +import { faker } from "@faker-js/faker"; +import RandExp from "randexp"; +import type { CityCouncilDistrictGeoJson } from "../types/CityCouncilDistrictGeoJson"; + +export function createCityCouncilDistrictGeoJson( + data: NonNullable> = {}, +): NonNullable { + return { + ...{ + id: faker.helpers.arrayElement([ + faker.string.alpha(), + new RandExp("^([0-9]{1,2})$").gen(), + ]), + type: faker.helpers.arrayElement(["Feature"]), + properties: createCityCouncilDistrict(), + geometry: createMultiPolygon(), + }, + ...data, + }; +} diff --git a/app/gen/mocks/createCommunityDistrictGeoJson.ts b/app/gen/mocks/createCommunityDistrictGeoJson.ts new file mode 100644 index 0000000..290b86c --- /dev/null +++ b/app/gen/mocks/createCommunityDistrictGeoJson.ts @@ -0,0 +1,22 @@ +import { createCommunityDistrict } from "./createCommunityDistrict"; +import { createMultiPolygon } from "./createMultiPolygon"; +import { faker } from "@faker-js/faker"; +import RandExp from "randexp"; +import type { CommunityDistrictGeoJson } from "../types/CommunityDistrictGeoJson"; + +export function createCommunityDistrictGeoJson( + data: NonNullable> = {}, +): NonNullable { + return { + ...{ + id: faker.helpers.arrayElement([ + faker.string.alpha(), + new RandExp("^([0-9]{3})$").gen(), + ]), + type: faker.helpers.arrayElement(["Feature"]), + properties: createCommunityDistrict(), + geometry: createMultiPolygon(), + }, + ...data, + }; +} diff --git a/app/gen/mocks/createFindCapitalCommitmentTypes.ts b/app/gen/mocks/createFindCapitalCommitmentTypes.ts new file mode 100644 index 0000000..49962b1 --- /dev/null +++ b/app/gen/mocks/createFindCapitalCommitmentTypes.ts @@ -0,0 +1,46 @@ +import { faker } from "@faker-js/faker"; +import RandExp from "randexp"; +import { createCapitalCommitmentType } from "./createCapitalCommitmentType"; +import { createError } from "./createError"; +import type { + FindCapitalCommitmentTypes200, + FindCapitalCommitmentTypes400, + FindCapitalCommitmentTypes500, + FindCapitalCommitmentTypesQueryResponse, +} from "../types/FindCapitalCommitmentTypes"; + +/** + * @description An object containing all capital commitment types. + */ +export function createFindCapitalCommitmentTypes200(): NonNullable { + return { + capitalCommitmentTypes: faker.helpers.arrayElements([ + createCapitalCommitmentType(), + ]) as any, + }; +} + +/** + * @description Invalid client request + */ +export function createFindCapitalCommitmentTypes400(): NonNullable { + return createError(); +} + +/** + * @description Server side error + */ +export function createFindCapitalCommitmentTypes500(): NonNullable { + return createError(); +} + +/** + * @description An object containing all capital commitment types. + */ +export function createFindCapitalCommitmentTypesQueryResponse(): NonNullable { + return { + capitalCommitmentTypes: faker.helpers.arrayElements([ + createCapitalCommitmentType(), + ]) as any, + }; +} diff --git a/app/gen/mocks/createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId.ts b/app/gen/mocks/createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId.ts new file mode 100644 index 0000000..72ae0e8 --- /dev/null +++ b/app/gen/mocks/createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId.ts @@ -0,0 +1,57 @@ +import { faker } from "@faker-js/faker"; +import RandExp from "randexp"; +import { createCapitalProjectBudgetedGeoJson } from "./createCapitalProjectBudgetedGeoJson"; +import { createError } from "./createError"; +import type { + FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdPathParams, + FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId200, + FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId400, + FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId404, + FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId500, + FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponse, +} from "../types/FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId"; + +export function createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdPathParams(): NonNullable { + return { + managingCode: faker.helpers.arrayElement([ + faker.string.alpha(), + new RandExp("^([0-9]{3})$").gen(), + ]), + capitalProjectId: faker.string.alpha(), + }; +} + +/** + * @description A capital project geojson object + */ +export function createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId200(): NonNullable { + return createCapitalProjectBudgetedGeoJson(); +} + +/** + * @description Invalid client request + */ +export function createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId400(): NonNullable { + return createError(); +} + +/** + * @description Requested resource does not exist or is not available + */ +export function createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId404(): NonNullable { + return createError(); +} + +/** + * @description Server side error + */ +export function createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId500(): NonNullable { + return createError(); +} + +/** + * @description A capital project geojson object + */ +export function createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponse(): NonNullable { + return createCapitalProjectBudgetedGeoJson(); +} diff --git a/app/gen/mocks/createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictId.ts b/app/gen/mocks/createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictId.ts new file mode 100644 index 0000000..023d8d2 --- /dev/null +++ b/app/gen/mocks/createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictId.ts @@ -0,0 +1,56 @@ +import { faker } from "@faker-js/faker"; +import RandExp from "randexp"; +import { createCityCouncilDistrictGeoJson } from "./createCityCouncilDistrictGeoJson"; +import { createError } from "./createError"; +import type { + FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdPathParams, + FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId200, + FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId400, + FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId404, + FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId500, + FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponse, +} from "../types/FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId"; + +export function createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdPathParams(): NonNullable { + return { + cityCouncilDistrictId: faker.helpers.arrayElement([ + faker.string.alpha(), + new RandExp("^([0-9]{1,2})$").gen(), + ]), + }; +} + +/** + * @description a city council district geojson object + */ +export function createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictId200(): NonNullable { + return createCityCouncilDistrictGeoJson(); +} + +/** + * @description Invalid client request + */ +export function createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictId400(): NonNullable { + return createError(); +} + +/** + * @description Requested resource does not exist or is not available + */ +export function createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictId404(): NonNullable { + return createError(); +} + +/** + * @description Server side error + */ +export function createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictId500(): NonNullable { + return createError(); +} + +/** + * @description a city council district geojson object + */ +export function createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponse(): NonNullable { + return createCityCouncilDistrictGeoJson(); +} diff --git a/app/gen/mocks/createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId.ts b/app/gen/mocks/createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId.ts new file mode 100644 index 0000000..ee21136 --- /dev/null +++ b/app/gen/mocks/createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId.ts @@ -0,0 +1,60 @@ +import { faker } from "@faker-js/faker"; +import RandExp from "randexp"; +import { createCommunityDistrictGeoJson } from "./createCommunityDistrictGeoJson"; +import { createError } from "./createError"; +import type { + FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdPathParams, + FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId200, + FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId400, + FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId404, + FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId500, + FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponse, +} from "../types/FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId"; + +export function createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdPathParams(): NonNullable { + return { + boroughId: faker.helpers.arrayElement([ + faker.string.alpha(), + new RandExp("^([0-9]{1})$").gen(), + ]), + communityDistrictId: faker.helpers.arrayElement([ + faker.string.alpha(), + new RandExp("^([0-9]{2})$").gen(), + ]), + }; +} + +/** + * @description a community district geojson object + */ +export function createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId200(): NonNullable { + return createCommunityDistrictGeoJson(); +} + +/** + * @description Invalid client request + */ +export function createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId400(): NonNullable { + return createError(); +} + +/** + * @description Requested resource does not exist or is not available + */ +export function createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId404(): NonNullable { + return createError(); +} + +/** + * @description Server side error + */ +export function createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId500(): NonNullable { + return createError(); +} + +/** + * @description a community district geojson object + */ +export function createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponse(): NonNullable { + return createCommunityDistrictGeoJson(); +} diff --git a/app/gen/mocks/createMultiPoint.ts b/app/gen/mocks/createMultiPoint.ts new file mode 100644 index 0000000..7774d0c --- /dev/null +++ b/app/gen/mocks/createMultiPoint.ts @@ -0,0 +1,19 @@ +import { createPosition } from "./createPosition"; +import { faker } from "@faker-js/faker"; +import RandExp from "randexp"; +import type { MultiPoint } from "../types/MultiPoint"; + +/** + * @description A geojson implementation of a MultiPoint Simple Feature + */ +export function createMultiPoint( + data: NonNullable> = {}, +): NonNullable { + return { + ...{ + type: faker.helpers.arrayElement(["MultiPoint"]), + coordinates: faker.helpers.arrayElements([createPosition()]) as any, + }, + ...data, + }; +} diff --git a/app/gen/mocks/findCapitalCommitmentTypesHandler.ts b/app/gen/mocks/findCapitalCommitmentTypesHandler.ts new file mode 100644 index 0000000..9f9f801 --- /dev/null +++ b/app/gen/mocks/findCapitalCommitmentTypesHandler.ts @@ -0,0 +1,16 @@ +import { http } from "msw"; +import { createFindCapitalCommitmentTypesQueryResponse } from "./createFindCapitalCommitmentTypes"; + +export const findCapitalCommitmentTypesHandler = http.get( + "*/capital-commitment-types", + function handler(info) { + return new Response( + JSON.stringify(createFindCapitalCommitmentTypesQueryResponse()), + { + headers: { + "Content-Type": "application/json", + }, + }, + ); + }, +); diff --git a/app/gen/mocks/findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdHandler.ts b/app/gen/mocks/findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdHandler.ts new file mode 100644 index 0000000..540d592 --- /dev/null +++ b/app/gen/mocks/findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdHandler.ts @@ -0,0 +1,19 @@ +import { http } from "msw"; +import { createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponse } from "./createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId"; + +export const findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdHandler = + http.get( + "*/capital-projects/:managingCode/:capitalProjectId/geojson", + function handler(info) { + return new Response( + JSON.stringify( + createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponse(), + ), + { + headers: { + "Content-Type": "application/json", + }, + }, + ); + }, + ); diff --git a/app/gen/mocks/findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdHandler.ts b/app/gen/mocks/findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdHandler.ts new file mode 100644 index 0000000..b95d786 --- /dev/null +++ b/app/gen/mocks/findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdHandler.ts @@ -0,0 +1,19 @@ +import { http } from "msw"; +import { createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponse } from "./createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictId"; + +export const findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdHandler = + http.get( + "*/city-council-districts/:cityCouncilDistrictId/geojson", + function handler(info) { + return new Response( + JSON.stringify( + createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponse(), + ), + { + headers: { + "Content-Type": "application/json", + }, + }, + ); + }, + ); diff --git a/app/gen/mocks/findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdHandler.ts b/app/gen/mocks/findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdHandler.ts new file mode 100644 index 0000000..6bc2f98 --- /dev/null +++ b/app/gen/mocks/findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdHandler.ts @@ -0,0 +1,19 @@ +import { http } from "msw"; +import { createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponse } from "./createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId"; + +export const findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdHandler = + http.get( + "*/boroughs/:boroughId/community-districts/:communityDistrictId/geojson", + function handler(info) { + return new Response( + JSON.stringify( + createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponse(), + ), + { + headers: { + "Content-Type": "application/json", + }, + }, + ); + }, + ); diff --git a/app/gen/mocks/handlers.ts b/app/gen/mocks/handlers.ts index c9a308d..526591b 100644 --- a/app/gen/mocks/handlers.ts +++ b/app/gen/mocks/handlers.ts @@ -1,11 +1,15 @@ import { findAgenciesHandler } from "./findAgenciesHandler"; import { findBoroughsHandler } from "./findBoroughsHandler"; import { findCommunityDistrictsByBoroughIdHandler } from "./findCommunityDistrictsByBoroughIdHandler"; +import { findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdHandler } from "./findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdHandler"; import { findCapitalProjectsByBoroughIdCommunityDistrictIdHandler } from "./findCapitalProjectsByBoroughIdCommunityDistrictIdHandler"; +import { findCapitalCommitmentTypesHandler } from "./findCapitalCommitmentTypesHandler"; import { findCapitalCommitmentsByManagingCodeCapitalProjectIdHandler } from "./findCapitalCommitmentsByManagingCodeCapitalProjectIdHandler"; +import { findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdHandler } from "./findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdHandler"; import { findCapitalProjectByManagingCodeCapitalProjectIdHandler } from "./findCapitalProjectByManagingCodeCapitalProjectIdHandler"; import { findCapitalProjectTilesHandler } from "./findCapitalProjectTilesHandler"; import { findCityCouncilDistrictsHandler } from "./findCityCouncilDistrictsHandler"; +import { findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdHandler } from "./findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdHandler"; import { findCapitalProjectsByCityCouncilIdHandler } from "./findCapitalProjectsByCityCouncilIdHandler"; import { findCityCouncilDistrictTilesHandler } from "./findCityCouncilDistrictTilesHandler"; import { findCommunityDistrictTilesHandler } from "./findCommunityDistrictTilesHandler"; @@ -25,11 +29,15 @@ export const handlers = [ findAgenciesHandler, findBoroughsHandler, findCommunityDistrictsByBoroughIdHandler, + findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdHandler, findCapitalProjectsByBoroughIdCommunityDistrictIdHandler, + findCapitalCommitmentTypesHandler, findCapitalCommitmentsByManagingCodeCapitalProjectIdHandler, + findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdHandler, findCapitalProjectByManagingCodeCapitalProjectIdHandler, findCapitalProjectTilesHandler, findCityCouncilDistrictsHandler, + findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdHandler, findCapitalProjectsByCityCouncilIdHandler, findCityCouncilDistrictTilesHandler, findCommunityDistrictTilesHandler, diff --git a/app/gen/mocks/index.ts b/app/gen/mocks/index.ts index 11bfc3b..c40fed1 100644 --- a/app/gen/mocks/index.ts +++ b/app/gen/mocks/index.ts @@ -2,22 +2,30 @@ export * from "./createAgency"; export * from "./createBadRequest"; export * from "./createBorough"; export * from "./createCapitalCommitment"; +export * from "./createCapitalCommitmentType"; export * from "./createCapitalProject"; export * from "./createCapitalProjectBudgeted"; +export * from "./createCapitalProjectBudgetedGeoJson"; export * from "./createCapitalProjectCategory"; export * from "./createCapitalProjectPage"; export * from "./createCityCouncilDistrict"; +export * from "./createCityCouncilDistrictGeoJson"; export * from "./createCommunityDistrict"; +export * from "./createCommunityDistrictGeoJson"; export * from "./createError"; export * from "./createFindAgencies"; export * from "./createFindBoroughs"; +export * from "./createFindCapitalCommitmentTypes"; export * from "./createFindCapitalCommitmentsByManagingCodeCapitalProjectId"; export * from "./createFindCapitalProjectByManagingCodeCapitalProjectId"; +export * from "./createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId"; export * from "./createFindCapitalProjectTiles"; export * from "./createFindCapitalProjectsByBoroughIdCommunityDistrictId"; export * from "./createFindCapitalProjectsByCityCouncilId"; +export * from "./createFindCityCouncilDistrictGeoJsonByCityCouncilDistrictId"; export * from "./createFindCityCouncilDistrictTiles"; export * from "./createFindCityCouncilDistricts"; +export * from "./createFindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId"; export * from "./createFindCommunityDistrictTiles"; export * from "./createFindCommunityDistrictsByBoroughId"; export * from "./createFindLandUses"; @@ -33,6 +41,7 @@ export * from "./createFindZoningDistrictClassesByZoningDistrictId"; export * from "./createFindZoningDistrictsByTaxLotBbl"; export * from "./createInternalServerError"; export * from "./createLandUse"; +export * from "./createMultiPoint"; export * from "./createMultiPolygon"; export * from "./createMvt"; export * from "./createNotFound"; @@ -48,13 +57,17 @@ export * from "./createZoningDistrictClassCategory"; export * from "./createZoningDistrictClassCategoryColor"; export * from "./findAgenciesHandler"; export * from "./findBoroughsHandler"; +export * from "./findCapitalCommitmentTypesHandler"; export * from "./findCapitalCommitmentsByManagingCodeCapitalProjectIdHandler"; export * from "./findCapitalProjectByManagingCodeCapitalProjectIdHandler"; +export * from "./findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdHandler"; export * from "./findCapitalProjectTilesHandler"; export * from "./findCapitalProjectsByBoroughIdCommunityDistrictIdHandler"; export * from "./findCapitalProjectsByCityCouncilIdHandler"; +export * from "./findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdHandler"; export * from "./findCityCouncilDistrictTilesHandler"; export * from "./findCityCouncilDistrictsHandler"; +export * from "./findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdHandler"; export * from "./findCommunityDistrictTilesHandler"; export * from "./findCommunityDistrictsByBoroughIdHandler"; export * from "./findLandUsesHandler"; diff --git a/app/gen/types/CapitalCommitmentType.ts b/app/gen/types/CapitalCommitmentType.ts new file mode 100644 index 0000000..816c36d --- /dev/null +++ b/app/gen/types/CapitalCommitmentType.ts @@ -0,0 +1,12 @@ +export type CapitalCommitmentType = { + /** + * @description The four character code to represent the capital commitment type + * @type string + */ + code: string; + /** + * @description The description of the capital commitment type. + * @type string + */ + description: string; +}; diff --git a/app/gen/types/CapitalProjectBudgetedGeoJson.ts b/app/gen/types/CapitalProjectBudgetedGeoJson.ts new file mode 100644 index 0000000..480649a --- /dev/null +++ b/app/gen/types/CapitalProjectBudgetedGeoJson.ts @@ -0,0 +1,22 @@ +import { MultiPoint } from "./MultiPoint"; +import { MultiPolygon } from "./MultiPolygon"; +import { CapitalProjectBudgeted } from "./CapitalProjectBudgeted"; + +export const capitalProjectBudgetedGeoJsonType = { + Feature: "Feature", +} as const; +export type CapitalProjectBudgetedGeoJsonType = + (typeof capitalProjectBudgetedGeoJsonType)[keyof typeof capitalProjectBudgetedGeoJsonType]; +export type CapitalProjectBudgetedGeoJson = { + /** + * @description The concatenation of the managing code and capital project id. + * @type string + */ + id: string; + /** + * @type string + */ + type: CapitalProjectBudgetedGeoJsonType; + geometry: MultiPoint | MultiPolygon; + properties: CapitalProjectBudgeted; +}; diff --git a/app/gen/types/CityCouncilDistrictGeoJson.ts b/app/gen/types/CityCouncilDistrictGeoJson.ts new file mode 100644 index 0000000..71ba9b1 --- /dev/null +++ b/app/gen/types/CityCouncilDistrictGeoJson.ts @@ -0,0 +1,21 @@ +import { CityCouncilDistrict } from "./CityCouncilDistrict"; +import { MultiPolygon } from "./MultiPolygon"; + +export const cityCouncilDistrictGeoJsonType = { + Feature: "Feature", +} as const; +export type CityCouncilDistrictGeoJsonType = + (typeof cityCouncilDistrictGeoJsonType)[keyof typeof cityCouncilDistrictGeoJsonType]; +export type CityCouncilDistrictGeoJson = { + /** + * @description One or two character code to represent city council districts. + * @type string + */ + id: string; + /** + * @type string + */ + type: CityCouncilDistrictGeoJsonType; + properties: CityCouncilDistrict; + geometry: MultiPolygon; +}; diff --git a/app/gen/types/CommunityDistrictGeoJson.ts b/app/gen/types/CommunityDistrictGeoJson.ts new file mode 100644 index 0000000..8ae4394 --- /dev/null +++ b/app/gen/types/CommunityDistrictGeoJson.ts @@ -0,0 +1,21 @@ +import { CommunityDistrict } from "./CommunityDistrict"; +import { MultiPolygon } from "./MultiPolygon"; + +export const communityDistrictGeoJsonType = { + Feature: "Feature", +} as const; +export type CommunityDistrictGeoJsonType = + (typeof communityDistrictGeoJsonType)[keyof typeof communityDistrictGeoJsonType]; +export type CommunityDistrictGeoJson = { + /** + * @description Three character code to represent a borough and community district. + * @type string + */ + id: string; + /** + * @type string + */ + type: CommunityDistrictGeoJsonType; + properties: CommunityDistrict; + geometry: MultiPolygon; +}; diff --git a/app/gen/types/FindCapitalCommitmentTypes.ts b/app/gen/types/FindCapitalCommitmentTypes.ts new file mode 100644 index 0000000..b67cad1 --- /dev/null +++ b/app/gen/types/FindCapitalCommitmentTypes.ts @@ -0,0 +1,33 @@ +import type { Error } from "./Error"; +import type { CapitalCommitmentType } from "./CapitalCommitmentType"; + +/** + * @description An object containing all capital commitment types. + */ +export type FindCapitalCommitmentTypes200 = { + /** + * @type array + */ + capitalCommitmentTypes: CapitalCommitmentType[]; +}; +/** + * @description Invalid client request + */ +export type FindCapitalCommitmentTypes400 = Error; +/** + * @description Server side error + */ +export type FindCapitalCommitmentTypes500 = Error; +/** + * @description An object containing all capital commitment types. + */ +export type FindCapitalCommitmentTypesQueryResponse = { + /** + * @type array + */ + capitalCommitmentTypes: CapitalCommitmentType[]; +}; +export type FindCapitalCommitmentTypesQuery = { + Response: FindCapitalCommitmentTypesQueryResponse; + Errors: FindCapitalCommitmentTypes400 | FindCapitalCommitmentTypes500; +}; diff --git a/app/gen/types/FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId.ts b/app/gen/types/FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId.ts new file mode 100644 index 0000000..af47981 --- /dev/null +++ b/app/gen/types/FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId.ts @@ -0,0 +1,46 @@ +import type { Error } from "./Error"; +import type { CapitalProjectBudgetedGeoJson } from "./CapitalProjectBudgetedGeoJson"; + +export type FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdPathParams = + { + /** + * @description Three character string of numbers representing managing agency + * @type string + */ + managingCode: string; + /** + * @description The id for the project, which combines with the managing code to make a unique id + * @type string + */ + capitalProjectId: string; + }; +/** + * @description A capital project geojson object + */ +export type FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId200 = + CapitalProjectBudgetedGeoJson; +/** + * @description Invalid client request + */ +export type FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId400 = Error; +/** + * @description Requested resource does not exist or is not available + */ +export type FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId404 = Error; +/** + * @description Server side error + */ +export type FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId500 = Error; +/** + * @description A capital project geojson object + */ +export type FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponse = + CapitalProjectBudgetedGeoJson; +export type FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQuery = { + Response: FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponse; + PathParams: FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdPathParams; + Errors: + | FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId400 + | FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId404 + | FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId500; +}; diff --git a/app/gen/types/FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId.ts b/app/gen/types/FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId.ts new file mode 100644 index 0000000..d1773b8 --- /dev/null +++ b/app/gen/types/FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId.ts @@ -0,0 +1,40 @@ +import type { Error } from "./Error"; +import type { CityCouncilDistrictGeoJson } from "./CityCouncilDistrictGeoJson"; + +export type FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdPathParams = { + /** + * @description One or two character code to represent city council districts. + * @type string + */ + cityCouncilDistrictId: string; +}; +/** + * @description a city council district geojson object + */ +export type FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId200 = + CityCouncilDistrictGeoJson; +/** + * @description Invalid client request + */ +export type FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId400 = Error; +/** + * @description Requested resource does not exist or is not available + */ +export type FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId404 = Error; +/** + * @description Server side error + */ +export type FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId500 = Error; +/** + * @description a city council district geojson object + */ +export type FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponse = + CityCouncilDistrictGeoJson; +export type FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQuery = { + Response: FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponse; + PathParams: FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdPathParams; + Errors: + | FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId400 + | FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId404 + | FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId500; +}; diff --git a/app/gen/types/FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId.ts b/app/gen/types/FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId.ts new file mode 100644 index 0000000..ab7cd9e --- /dev/null +++ b/app/gen/types/FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId.ts @@ -0,0 +1,49 @@ +import type { Error } from "./Error"; +import type { CommunityDistrictGeoJson } from "./CommunityDistrictGeoJson"; + +export type FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdPathParams = + { + /** + * @description A single character numeric string containing the common number used to refer to the borough. Possible values are 1-5. + * @type string + */ + boroughId: string; + /** + * @description The two character numeric string containing the number used to refer to the community district. + * @type string + */ + communityDistrictId: string; + }; +/** + * @description a community district geojson object + */ +export type FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId200 = + CommunityDistrictGeoJson; +/** + * @description Invalid client request + */ +export type FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId400 = + Error; +/** + * @description Requested resource does not exist or is not available + */ +export type FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId404 = + Error; +/** + * @description Server side error + */ +export type FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId500 = + Error; +/** + * @description a community district geojson object + */ +export type FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponse = + CommunityDistrictGeoJson; +export type FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQuery = { + Response: FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponse; + PathParams: FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdPathParams; + Errors: + | FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId400 + | FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId404 + | FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId500; +}; diff --git a/app/gen/types/MultiPoint.ts b/app/gen/types/MultiPoint.ts new file mode 100644 index 0000000..4015a0b --- /dev/null +++ b/app/gen/types/MultiPoint.ts @@ -0,0 +1,21 @@ +import { Position } from "./Position"; + +export const multiPointType = { + MultiPoint: "MultiPoint", +} as const; +export type MultiPointType = + (typeof multiPointType)[keyof typeof multiPointType]; +/** + * @description A geojson implementation of a MultiPoint Simple Feature + */ +export type MultiPoint = { + /** + * @type string + */ + type: MultiPointType; + /** + * @description Array of position coordinate arrays. + * @type array + */ + coordinates: Position[]; +}; diff --git a/app/gen/types/index.ts b/app/gen/types/index.ts index 534e0f1..c2de845 100644 --- a/app/gen/types/index.ts +++ b/app/gen/types/index.ts @@ -2,22 +2,30 @@ export * from "./Agency"; export * from "./BadRequest"; export * from "./Borough"; export * from "./CapitalCommitment"; +export * from "./CapitalCommitmentType"; export * from "./CapitalProject"; export * from "./CapitalProjectBudgeted"; +export * from "./CapitalProjectBudgetedGeoJson"; export * from "./CapitalProjectCategory"; export * from "./CapitalProjectPage"; export * from "./CityCouncilDistrict"; +export * from "./CityCouncilDistrictGeoJson"; export * from "./CommunityDistrict"; +export * from "./CommunityDistrictGeoJson"; export * from "./Error"; export * from "./FindAgencies"; export * from "./FindBoroughs"; +export * from "./FindCapitalCommitmentTypes"; export * from "./FindCapitalCommitmentsByManagingCodeCapitalProjectId"; export * from "./FindCapitalProjectByManagingCodeCapitalProjectId"; +export * from "./FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId"; export * from "./FindCapitalProjectTiles"; export * from "./FindCapitalProjectsByBoroughIdCommunityDistrictId"; export * from "./FindCapitalProjectsByCityCouncilId"; +export * from "./FindCityCouncilDistrictGeoJsonByCityCouncilDistrictId"; export * from "./FindCityCouncilDistrictTiles"; export * from "./FindCityCouncilDistricts"; +export * from "./FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId"; export * from "./FindCommunityDistrictTiles"; export * from "./FindCommunityDistrictsByBoroughId"; export * from "./FindLandUses"; @@ -33,6 +41,7 @@ export * from "./FindZoningDistrictClassesByZoningDistrictId"; export * from "./FindZoningDistrictsByTaxLotBbl"; export * from "./InternalServerError"; export * from "./LandUse"; +export * from "./MultiPoint"; export * from "./MultiPolygon"; export * from "./Mvt"; export * from "./NotFound"; diff --git a/app/gen/zod/capitalCommitmentTypeSchema.ts b/app/gen/zod/capitalCommitmentTypeSchema.ts new file mode 100644 index 0000000..78bef19 --- /dev/null +++ b/app/gen/zod/capitalCommitmentTypeSchema.ts @@ -0,0 +1,14 @@ +import { z } from "zod"; + +export const capitalCommitmentTypeSchema = z.object({ + code: z + .string() + .min(4) + .max(4) + .describe( + "The four character code to represent the capital commitment type", + ), + description: z + .string() + .describe("The description of the capital commitment type."), +}); diff --git a/app/gen/zod/capitalProjectBudgetedGeoJsonSchema.ts b/app/gen/zod/capitalProjectBudgetedGeoJsonSchema.ts new file mode 100644 index 0000000..51add77 --- /dev/null +++ b/app/gen/zod/capitalProjectBudgetedGeoJsonSchema.ts @@ -0,0 +1,16 @@ +import { multiPointSchema } from "./multiPointSchema"; +import { multiPolygonSchema } from "./multiPolygonSchema"; +import { capitalProjectBudgetedSchema } from "./capitalProjectBudgetedSchema"; +import { z } from "zod"; + +export const capitalProjectBudgetedGeoJsonSchema = z.object({ + id: z + .string() + .describe("The concatenation of the managing code and capital project id."), + type: z.enum(["Feature"]), + geometry: z.union([ + z.lazy(() => multiPointSchema), + z.lazy(() => multiPolygonSchema), + ]), + properties: z.lazy(() => capitalProjectBudgetedSchema), +}); diff --git a/app/gen/zod/cityCouncilDistrictGeoJsonSchema.ts b/app/gen/zod/cityCouncilDistrictGeoJsonSchema.ts new file mode 100644 index 0000000..106a937 --- /dev/null +++ b/app/gen/zod/cityCouncilDistrictGeoJsonSchema.ts @@ -0,0 +1,13 @@ +import { cityCouncilDistrictSchema } from "./cityCouncilDistrictSchema"; +import { multiPolygonSchema } from "./multiPolygonSchema"; +import { z } from "zod"; + +export const cityCouncilDistrictGeoJsonSchema = z.object({ + id: z + .string() + .regex(new RegExp("^([0-9]{1,2})$")) + .describe("One or two character code to represent city council districts."), + type: z.enum(["Feature"]), + properties: z.lazy(() => cityCouncilDistrictSchema), + geometry: z.lazy(() => multiPolygonSchema), +}); diff --git a/app/gen/zod/communityDistrictGeoJsonSchema.ts b/app/gen/zod/communityDistrictGeoJsonSchema.ts new file mode 100644 index 0000000..6d6a18b --- /dev/null +++ b/app/gen/zod/communityDistrictGeoJsonSchema.ts @@ -0,0 +1,15 @@ +import { communityDistrictSchema } from "./communityDistrictSchema"; +import { multiPolygonSchema } from "./multiPolygonSchema"; +import { z } from "zod"; + +export const communityDistrictGeoJsonSchema = z.object({ + id: z + .string() + .regex(new RegExp("^([0-9]{3})$")) + .describe( + "Three character code to represent a borough and community district.", + ), + type: z.enum(["Feature"]), + properties: z.lazy(() => communityDistrictSchema), + geometry: z.lazy(() => multiPolygonSchema), +}); diff --git a/app/gen/zod/findCapitalCommitmentTypesSchema.ts b/app/gen/zod/findCapitalCommitmentTypesSchema.ts new file mode 100644 index 0000000..e1ba494 --- /dev/null +++ b/app/gen/zod/findCapitalCommitmentTypesSchema.ts @@ -0,0 +1,24 @@ +import { z } from "zod"; +import { capitalCommitmentTypeSchema } from "./capitalCommitmentTypeSchema"; +import { errorSchema } from "./errorSchema"; + +/** + * @description An object containing all capital commitment types. + */ +export const findCapitalCommitmentTypes200Schema = z.object({ + capitalCommitmentTypes: z.array(z.lazy(() => capitalCommitmentTypeSchema)), +}); +/** + * @description Invalid client request + */ +export const findCapitalCommitmentTypes400Schema = z.lazy(() => errorSchema); +/** + * @description Server side error + */ +export const findCapitalCommitmentTypes500Schema = z.lazy(() => errorSchema); +/** + * @description An object containing all capital commitment types. + */ +export const findCapitalCommitmentTypesQueryResponseSchema = z.object({ + capitalCommitmentTypes: z.array(z.lazy(() => capitalCommitmentTypeSchema)), +}); diff --git a/app/gen/zod/findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdSchema.ts b/app/gen/zod/findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdSchema.ts new file mode 100644 index 0000000..ab4b76a --- /dev/null +++ b/app/gen/zod/findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdSchema.ts @@ -0,0 +1,43 @@ +import { z } from "zod"; +import { capitalProjectBudgetedGeoJsonSchema } from "./capitalProjectBudgetedGeoJsonSchema"; +import { errorSchema } from "./errorSchema"; + +export const findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdPathParamsSchema = + z.object({ + managingCode: z + .string() + .regex(new RegExp("^([0-9]{3})$")) + .describe( + "Three character string of numbers representing managing agency", + ), + capitalProjectId: z + .string() + .describe( + "The id for the project, which combines with the managing code to make a unique id", + ), + }); +/** + * @description A capital project geojson object + */ +export const findCapitalProjectGeoJsonByManagingCodeCapitalProjectId200Schema = + z.lazy(() => capitalProjectBudgetedGeoJsonSchema); +/** + * @description Invalid client request + */ +export const findCapitalProjectGeoJsonByManagingCodeCapitalProjectId400Schema = + z.lazy(() => errorSchema); +/** + * @description Requested resource does not exist or is not available + */ +export const findCapitalProjectGeoJsonByManagingCodeCapitalProjectId404Schema = + z.lazy(() => errorSchema); +/** + * @description Server side error + */ +export const findCapitalProjectGeoJsonByManagingCodeCapitalProjectId500Schema = + z.lazy(() => errorSchema); +/** + * @description A capital project geojson object + */ +export const findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponseSchema = + z.lazy(() => capitalProjectBudgetedGeoJsonSchema); diff --git a/app/gen/zod/findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdSchema.ts b/app/gen/zod/findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdSchema.ts new file mode 100644 index 0000000..81d3a19 --- /dev/null +++ b/app/gen/zod/findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdSchema.ts @@ -0,0 +1,38 @@ +import { z } from "zod"; +import { cityCouncilDistrictGeoJsonSchema } from "./cityCouncilDistrictGeoJsonSchema"; +import { errorSchema } from "./errorSchema"; + +export const findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdPathParamsSchema = + z.object({ + cityCouncilDistrictId: z + .string() + .regex(new RegExp("^([0-9]{1,2})$")) + .describe( + "One or two character code to represent city council districts.", + ), + }); +/** + * @description a city council district geojson object + */ +export const findCityCouncilDistrictGeoJsonByCityCouncilDistrictId200Schema = + z.lazy(() => cityCouncilDistrictGeoJsonSchema); +/** + * @description Invalid client request + */ +export const findCityCouncilDistrictGeoJsonByCityCouncilDistrictId400Schema = + z.lazy(() => errorSchema); +/** + * @description Requested resource does not exist or is not available + */ +export const findCityCouncilDistrictGeoJsonByCityCouncilDistrictId404Schema = + z.lazy(() => errorSchema); +/** + * @description Server side error + */ +export const findCityCouncilDistrictGeoJsonByCityCouncilDistrictId500Schema = + z.lazy(() => errorSchema); +/** + * @description a city council district geojson object + */ +export const findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponseSchema = + z.lazy(() => cityCouncilDistrictGeoJsonSchema); diff --git a/app/gen/zod/findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdSchema.ts b/app/gen/zod/findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdSchema.ts new file mode 100644 index 0000000..5aabc3d --- /dev/null +++ b/app/gen/zod/findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdSchema.ts @@ -0,0 +1,44 @@ +import { z } from "zod"; +import { communityDistrictGeoJsonSchema } from "./communityDistrictGeoJsonSchema"; +import { errorSchema } from "./errorSchema"; + +export const findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdPathParamsSchema = + z.object({ + boroughId: z + .string() + .regex(new RegExp("^([0-9]{1})$")) + .describe( + "A single character numeric string containing the common number used to refer to the borough. Possible values are 1-5.", + ), + communityDistrictId: z + .string() + .regex(new RegExp("^([0-9]{2})$")) + .describe( + "The two character numeric string containing the number used to refer to the community district.", + ), + }); +/** + * @description a community district geojson object + */ +export const findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId200Schema = + z.lazy(() => communityDistrictGeoJsonSchema); +/** + * @description Invalid client request + */ +export const findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId400Schema = + z.lazy(() => errorSchema); +/** + * @description Requested resource does not exist or is not available + */ +export const findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId404Schema = + z.lazy(() => errorSchema); +/** + * @description Server side error + */ +export const findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId500Schema = + z.lazy(() => errorSchema); +/** + * @description a community district geojson object + */ +export const findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponseSchema = + z.lazy(() => communityDistrictGeoJsonSchema); diff --git a/app/gen/zod/index.ts b/app/gen/zod/index.ts index 2dddaea..a0f4125 100644 --- a/app/gen/zod/index.ts +++ b/app/gen/zod/index.ts @@ -2,22 +2,30 @@ export * from "./agencySchema"; export * from "./badRequestSchema"; export * from "./boroughSchema"; export * from "./capitalCommitmentSchema"; +export * from "./capitalCommitmentTypeSchema"; +export * from "./capitalProjectBudgetedGeoJsonSchema"; export * from "./capitalProjectBudgetedSchema"; export * from "./capitalProjectCategorySchema"; export * from "./capitalProjectPageSchema"; export * from "./capitalProjectSchema"; +export * from "./cityCouncilDistrictGeoJsonSchema"; export * from "./cityCouncilDistrictSchema"; +export * from "./communityDistrictGeoJsonSchema"; export * from "./communityDistrictSchema"; export * from "./errorSchema"; export * from "./findAgenciesSchema"; export * from "./findBoroughsSchema"; +export * from "./findCapitalCommitmentTypesSchema"; export * from "./findCapitalCommitmentsByManagingCodeCapitalProjectIdSchema"; export * from "./findCapitalProjectByManagingCodeCapitalProjectIdSchema"; +export * from "./findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdSchema"; export * from "./findCapitalProjectTilesSchema"; export * from "./findCapitalProjectsByBoroughIdCommunityDistrictIdSchema"; export * from "./findCapitalProjectsByCityCouncilIdSchema"; +export * from "./findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdSchema"; export * from "./findCityCouncilDistrictTilesSchema"; export * from "./findCityCouncilDistrictsSchema"; +export * from "./findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdSchema"; export * from "./findCommunityDistrictTilesSchema"; export * from "./findCommunityDistrictsByBoroughIdSchema"; export * from "./findLandUsesSchema"; @@ -33,6 +41,7 @@ export * from "./findZoningDistrictClassesSchema"; export * from "./findZoningDistrictsByTaxLotBblSchema"; export * from "./internalServerErrorSchema"; export * from "./landUseSchema"; +export * from "./multiPointSchema"; export * from "./multiPolygonSchema"; export * from "./mvtSchema"; export * from "./notFoundSchema"; diff --git a/app/gen/zod/multiPointSchema.ts b/app/gen/zod/multiPointSchema.ts new file mode 100644 index 0000000..2327871 --- /dev/null +++ b/app/gen/zod/multiPointSchema.ts @@ -0,0 +1,14 @@ +import { positionSchema } from "./positionSchema"; +import { z } from "zod"; + +/** + * @description A geojson implementation of a MultiPoint Simple Feature + */ +export const multiPointSchema = z + .object({ + type: z.enum(["MultiPoint"]), + coordinates: z + .array(z.lazy(() => positionSchema)) + .describe("Array of position coordinate arrays."), + }) + .describe("A geojson implementation of a MultiPoint Simple Feature"); diff --git a/app/gen/zod/operations.ts b/app/gen/zod/operations.ts index 5c18fb1..4e7c160 100644 --- a/app/gen/zod/operations.ts +++ b/app/gen/zod/operations.ts @@ -15,6 +15,13 @@ import { findCommunityDistrictsByBoroughId500Schema, findCommunityDistrictsByBoroughIdPathParamsSchema, } from "./findCommunityDistrictsByBoroughIdSchema"; +import { + findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponseSchema, + findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId400Schema, + findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId404Schema, + findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId500Schema, + findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdPathParamsSchema, +} from "./findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdSchema"; import { findCapitalProjectsByBoroughIdCommunityDistrictIdQueryResponseSchema, findCapitalProjectsByBoroughIdCommunityDistrictId400Schema, @@ -23,6 +30,11 @@ import { findCapitalProjectsByBoroughIdCommunityDistrictIdPathParamsSchema, findCapitalProjectsByBoroughIdCommunityDistrictIdQueryParamsSchema, } from "./findCapitalProjectsByBoroughIdCommunityDistrictIdSchema"; +import { + findCapitalCommitmentTypesQueryResponseSchema, + findCapitalCommitmentTypes400Schema, + findCapitalCommitmentTypes500Schema, +} from "./findCapitalCommitmentTypesSchema"; import { findCapitalCommitmentsByManagingCodeCapitalProjectIdQueryResponseSchema, findCapitalCommitmentsByManagingCodeCapitalProjectId400Schema, @@ -30,6 +42,13 @@ import { findCapitalCommitmentsByManagingCodeCapitalProjectId500Schema, findCapitalCommitmentsByManagingCodeCapitalProjectIdPathParamsSchema, } from "./findCapitalCommitmentsByManagingCodeCapitalProjectIdSchema"; +import { + findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponseSchema, + findCapitalProjectGeoJsonByManagingCodeCapitalProjectId400Schema, + findCapitalProjectGeoJsonByManagingCodeCapitalProjectId404Schema, + findCapitalProjectGeoJsonByManagingCodeCapitalProjectId500Schema, + findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdPathParamsSchema, +} from "./findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdSchema"; import { findCapitalProjectByManagingCodeCapitalProjectIdQueryResponseSchema, findCapitalProjectByManagingCodeCapitalProjectId400Schema, @@ -48,6 +67,13 @@ import { findCityCouncilDistricts400Schema, findCityCouncilDistricts500Schema, } from "./findCityCouncilDistrictsSchema"; +import { + findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponseSchema, + findCityCouncilDistrictGeoJsonByCityCouncilDistrictId400Schema, + findCityCouncilDistrictGeoJsonByCityCouncilDistrictId404Schema, + findCityCouncilDistrictGeoJsonByCityCouncilDistrictId500Schema, + findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdPathParamsSchema, +} from "./findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdSchema"; import { findCapitalProjectsByCityCouncilIdQueryResponseSchema, findCapitalProjectsByCityCouncilId400Schema, @@ -196,6 +222,27 @@ export const operations = { 500: findCommunityDistrictsByBoroughId500Schema, }, }, + findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId: { + request: undefined, + parameters: { + path: findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdPathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponseSchema, + 400: findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId400Schema, + 404: findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId404Schema, + 500: findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId500Schema, + default: + findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponseSchema, + }, + errors: { + 400: findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId400Schema, + 404: findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId404Schema, + 500: findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId500Schema, + }, + }, findCapitalProjectsByBoroughIdCommunityDistrictId: { request: undefined, parameters: { @@ -217,6 +264,24 @@ export const operations = { 500: findCapitalProjectsByBoroughIdCommunityDistrictId500Schema, }, }, + findCapitalCommitmentTypes: { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined, + }, + responses: { + 200: findCapitalCommitmentTypesQueryResponseSchema, + 400: findCapitalCommitmentTypes400Schema, + 500: findCapitalCommitmentTypes500Schema, + default: findCapitalCommitmentTypesQueryResponseSchema, + }, + errors: { + 400: findCapitalCommitmentTypes400Schema, + 500: findCapitalCommitmentTypes500Schema, + }, + }, findCapitalCommitmentsByManagingCodeCapitalProjectId: { request: undefined, parameters: { @@ -238,6 +303,27 @@ export const operations = { 500: findCapitalCommitmentsByManagingCodeCapitalProjectId500Schema, }, }, + findCapitalProjectGeoJsonByManagingCodeCapitalProjectId: { + request: undefined, + parameters: { + path: findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdPathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponseSchema, + 400: findCapitalProjectGeoJsonByManagingCodeCapitalProjectId400Schema, + 404: findCapitalProjectGeoJsonByManagingCodeCapitalProjectId404Schema, + 500: findCapitalProjectGeoJsonByManagingCodeCapitalProjectId500Schema, + default: + findCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponseSchema, + }, + errors: { + 400: findCapitalProjectGeoJsonByManagingCodeCapitalProjectId400Schema, + 404: findCapitalProjectGeoJsonByManagingCodeCapitalProjectId404Schema, + 500: findCapitalProjectGeoJsonByManagingCodeCapitalProjectId500Schema, + }, + }, findCapitalProjectByManagingCodeCapitalProjectId: { request: undefined, parameters: { @@ -295,6 +381,27 @@ export const operations = { 500: findCityCouncilDistricts500Schema, }, }, + findCityCouncilDistrictGeoJsonByCityCouncilDistrictId: { + request: undefined, + parameters: { + path: findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdPathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponseSchema, + 400: findCityCouncilDistrictGeoJsonByCityCouncilDistrictId400Schema, + 404: findCityCouncilDistrictGeoJsonByCityCouncilDistrictId404Schema, + 500: findCityCouncilDistrictGeoJsonByCityCouncilDistrictId500Schema, + default: + findCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponseSchema, + }, + errors: { + 400: findCityCouncilDistrictGeoJsonByCityCouncilDistrictId400Schema, + 404: findCityCouncilDistrictGeoJsonByCityCouncilDistrictId404Schema, + 500: findCityCouncilDistrictGeoJsonByCityCouncilDistrictId500Schema, + }, + }, findCapitalProjectsByCityCouncilId: { request: undefined, parameters: { @@ -575,13 +682,24 @@ export const paths = { "/boroughs/{boroughId}/community-districts": { get: operations["findCommunityDistrictsByBoroughId"], }, + "/boroughs/{boroughId}/community-districts/{communityDistrictId}/geojson": { + get: operations[ + "findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId" + ], + }, "/boroughs/{boroughId}/community-districts/{communityDistrictId}/capital-projects": { get: operations["findCapitalProjectsByBoroughIdCommunityDistrictId"], }, + "/capital-commitment-types": { + get: operations["findCapitalCommitmentTypes"], + }, "/capital-projects/{managingCode}/{capitalProjectId}/capital-commitments": { get: operations["findCapitalCommitmentsByManagingCodeCapitalProjectId"], }, + "/capital-projects/{managingCode}/{capitalProjectId}/geojson": { + get: operations["findCapitalProjectGeoJsonByManagingCodeCapitalProjectId"], + }, "/capital-projects/{managingCode}/{capitalProjectId}": { get: operations["findCapitalProjectByManagingCodeCapitalProjectId"], }, @@ -591,6 +709,9 @@ export const paths = { "/city-council-districts": { get: operations["findCityCouncilDistricts"], }, + "/city-council-districts/{cityCouncilDistrictId}/geojson": { + get: operations["findCityCouncilDistrictGeoJsonByCityCouncilDistrictId"], + }, "/city-council-districts/{cityCouncilDistrictId}/capital-projects": { get: operations["findCapitalProjectsByCityCouncilId"], },