generated from NYCPlanning/ae-remix-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3901a69
commit 8123436
Showing
43 changed files
with
1,158 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Parameters<typeof client>[0]> = {}, | ||
): Promise<ResponseConfig<FindCapitalCommitmentTypesQueryResponse>["data"]> { | ||
const res = await client<FindCapitalCommitmentTypesQueryResponse>({ | ||
method: "get", | ||
url: `/capital-commitment-types`, | ||
...options, | ||
}); | ||
return res.data; | ||
} |
28 changes: 28 additions & 0 deletions
28
app/gen/axios/findCapitalProjectGeoJsonByManagingCodeCapitalProjectId.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Parameters<typeof client>[0]> = {}, | ||
): Promise< | ||
ResponseConfig<FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponse>["data"] | ||
> { | ||
const res = | ||
await client<FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponse>( | ||
{ | ||
method: "get", | ||
url: `/capital-projects/${managingCode}/${capitalProjectId}/geojson`, | ||
...options, | ||
}, | ||
); | ||
return res.data; | ||
} |
27 changes: 27 additions & 0 deletions
27
app/gen/axios/findCityCouncilDistrictGeoJsonByCityCouncilDistrictId.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Parameters<typeof client>[0]> = {}, | ||
): Promise< | ||
ResponseConfig<FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponse>["data"] | ||
> { | ||
const res = | ||
await client<FindCityCouncilDistrictGeoJsonByCityCouncilDistrictIdQueryResponse>( | ||
{ | ||
method: "get", | ||
url: `/city-council-districts/${cityCouncilDistrictId}/geojson`, | ||
...options, | ||
}, | ||
); | ||
return res.data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
app/gen/axios/findCommunityDistrictGeoJsonByBoroughIdCommunityDistrictId.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Parameters<typeof client>[0]> = {}, | ||
): Promise< | ||
ResponseConfig<FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponse>["data"] | ||
> { | ||
const res = | ||
await client<FindCommunityDistrictGeoJsonByBoroughIdCommunityDistrictIdQueryResponse>( | ||
{ | ||
method: "get", | ||
url: `/boroughs/${boroughId}/community-districts/${communityDistrictId}/geojson`, | ||
...options, | ||
}, | ||
); | ||
return res.data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Partial<CapitalCommitmentType>> = {}, | ||
): NonNullable<CapitalCommitmentType> { | ||
return { | ||
...{ code: faker.string.alpha(), description: faker.string.alpha() }, | ||
...data, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Partial<CapitalProjectBudgetedGeoJson>> = {}, | ||
): NonNullable<CapitalProjectBudgetedGeoJson> { | ||
return { | ||
...{ | ||
id: faker.string.alpha(), | ||
type: faker.helpers.arrayElement<any>(["Feature"]), | ||
geometry: faker.helpers.arrayElement<any>([ | ||
createMultiPoint(), | ||
createMultiPolygon(), | ||
]), | ||
properties: createCapitalProjectBudgeted(), | ||
}, | ||
...data, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Partial<CityCouncilDistrictGeoJson>> = {}, | ||
): NonNullable<CityCouncilDistrictGeoJson> { | ||
return { | ||
...{ | ||
id: faker.helpers.arrayElement<any>([ | ||
faker.string.alpha(), | ||
new RandExp("^([0-9]{1,2})$").gen(), | ||
]), | ||
type: faker.helpers.arrayElement<any>(["Feature"]), | ||
properties: createCityCouncilDistrict(), | ||
geometry: createMultiPolygon(), | ||
}, | ||
...data, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Partial<CommunityDistrictGeoJson>> = {}, | ||
): NonNullable<CommunityDistrictGeoJson> { | ||
return { | ||
...{ | ||
id: faker.helpers.arrayElement<any>([ | ||
faker.string.alpha(), | ||
new RandExp("^([0-9]{3})$").gen(), | ||
]), | ||
type: faker.helpers.arrayElement<any>(["Feature"]), | ||
properties: createCommunityDistrict(), | ||
geometry: createMultiPolygon(), | ||
}, | ||
...data, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<FindCapitalCommitmentTypes200> { | ||
return { | ||
capitalCommitmentTypes: faker.helpers.arrayElements([ | ||
createCapitalCommitmentType(), | ||
]) as any, | ||
}; | ||
} | ||
|
||
/** | ||
* @description Invalid client request | ||
*/ | ||
export function createFindCapitalCommitmentTypes400(): NonNullable<FindCapitalCommitmentTypes400> { | ||
return createError(); | ||
} | ||
|
||
/** | ||
* @description Server side error | ||
*/ | ||
export function createFindCapitalCommitmentTypes500(): NonNullable<FindCapitalCommitmentTypes500> { | ||
return createError(); | ||
} | ||
|
||
/** | ||
* @description An object containing all capital commitment types. | ||
*/ | ||
export function createFindCapitalCommitmentTypesQueryResponse(): NonNullable<FindCapitalCommitmentTypesQueryResponse> { | ||
return { | ||
capitalCommitmentTypes: faker.helpers.arrayElements([ | ||
createCapitalCommitmentType(), | ||
]) as any, | ||
}; | ||
} |
57 changes: 57 additions & 0 deletions
57
app/gen/mocks/createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdPathParams> { | ||
return { | ||
managingCode: faker.helpers.arrayElement<any>([ | ||
faker.string.alpha(), | ||
new RandExp("^([0-9]{3})$").gen(), | ||
]), | ||
capitalProjectId: faker.string.alpha(), | ||
}; | ||
} | ||
|
||
/** | ||
* @description A capital project geojson object | ||
*/ | ||
export function createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId200(): NonNullable<FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId200> { | ||
return createCapitalProjectBudgetedGeoJson(); | ||
} | ||
|
||
/** | ||
* @description Invalid client request | ||
*/ | ||
export function createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId400(): NonNullable<FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId400> { | ||
return createError(); | ||
} | ||
|
||
/** | ||
* @description Requested resource does not exist or is not available | ||
*/ | ||
export function createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId404(): NonNullable<FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId404> { | ||
return createError(); | ||
} | ||
|
||
/** | ||
* @description Server side error | ||
*/ | ||
export function createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectId500(): NonNullable<FindCapitalProjectGeoJsonByManagingCodeCapitalProjectId500> { | ||
return createError(); | ||
} | ||
|
||
/** | ||
* @description A capital project geojson object | ||
*/ | ||
export function createFindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponse(): NonNullable<FindCapitalProjectGeoJsonByManagingCodeCapitalProjectIdQueryResponse> { | ||
return createCapitalProjectBudgetedGeoJson(); | ||
} |
Oops, something went wrong.