-
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
Showing
22 changed files
with
399 additions
and
4 deletions.
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,14 @@ | ||
export type Agency = { | ||
/** | ||
* @description A string of variable length containing the initials of the agency. | ||
* @type string | ||
* @example DOT | ||
*/ | ||
initials: string; | ||
/** | ||
* @description The full name of the agency. | ||
* @type string | ||
* @example Department of Transportation | ||
*/ | ||
name: string; | ||
}; |
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,50 @@ | ||
export type CapitalCommitment = { | ||
/** | ||
* @description A uuid used to refer to the capital commitment. | ||
* @type string | undefined uuid | ||
*/ | ||
id?: string; | ||
/** | ||
* @description A four character string used to refer to the commitment type. | ||
* @type string | undefined | ||
* @example DSGN | ||
*/ | ||
type?: string; | ||
/** | ||
* @description A string used to refer to the date when the commitment is projected to be committed. | ||
* @type string | undefined date | ||
* @example 2012-04-23 | ||
*/ | ||
plannedDate?: string; | ||
/** | ||
* @description A string used to refer to the budget line. | ||
* @type string | undefined | ||
* @example HW | ||
*/ | ||
budgetLineCode?: string; | ||
/** | ||
* @description A string used to refer to the budget line. | ||
* @type string | undefined | ||
* @example 0002Q | ||
*/ | ||
budgetLineId?: string; | ||
/** | ||
* @description A string of variable length containing the initials of the sponsoring agency. | ||
* @type string | undefined | ||
* @example DOT | ||
*/ | ||
sponsoringAgencyInitials?: string; | ||
/** | ||
* @description A string of variable length denoting the type of budget. | ||
* @type string | undefined | ||
* @example Highways | ||
*/ | ||
budgetType?: string; | ||
/** | ||
* @description A numeric string used to refer to the amount of total planned commitments. | ||
* @type number | undefined | ||
* @example 1600000 | ||
*/ | ||
totalValue?: number; | ||
required?: any; | ||
}; |
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,41 @@ | ||
import type { CapitalProjectCategory } from "./CapitalProjectCategory"; | ||
|
||
export type CapitalProject = { | ||
/** | ||
* @description The id for the project, which combines with the managing code to make a unique id | ||
* @type string | ||
* @example HWPEDSF5 | ||
*/ | ||
id: string; | ||
/** | ||
* @description The capital project title. | ||
* @type string | ||
* @example Multi-Site Pedestrian Safety Phase 5 | ||
*/ | ||
description: string; | ||
/** | ||
* @description Three character string of numbers representing managing agency | ||
* @type string | ||
* @example 850 | ||
*/ | ||
managingCode: string; | ||
/** | ||
* @description The managing agency name abbreviation or acronym | ||
* @type string | ||
* @example DOT | ||
*/ | ||
managingAgencyInitials: string; | ||
/** | ||
* @description The starting date of the capital project | ||
* @type date | ||
* @example 2024-05-15T14:20:03.842Z | ||
*/ | ||
minDate: any; | ||
/** | ||
* @description The ending date of the capital project | ||
* @type date | ||
* @example 2024-05-15T14:20:03.842Z | ||
*/ | ||
maxDate: any; | ||
category?: CapitalProjectCategory; | ||
}; |
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 type { CapitalProject } from "./CapitalProject"; | ||
|
||
export type CapitalProjectBudgeted = CapitalProject & { | ||
/** | ||
* @description The sum total of commitments for the capital project | ||
* @type number | ||
* @example 200000 | ||
*/ | ||
commitmentsTotal: number; | ||
/** | ||
* @description An array containing string values representing the sponsoring agencies initials. | ||
* @type array | ||
* @example DOT | ||
*/ | ||
sponsoringAgencyInitials: string[]; | ||
/** | ||
* @description An array containing string values representing the budget types. | ||
* @type array | ||
* @example Highways,Highway Bridges | ||
*/ | ||
budgetType: string[]; | ||
}; |
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,7 @@ | ||
export const capitalProjectCategory = { | ||
"Fixed Asset": "Fixed Asset", | ||
"Lump Sum": "Lump Sum", | ||
"ITT, Vehicles and Equipment": "ITT, Vehicles and Equipment", | ||
} as const; | ||
export type CapitalProjectCategory = | ||
(typeof capitalProjectCategory)[keyof typeof capitalProjectCategory]; |
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,8 @@ | ||
export type CityCouncilDistrict = { | ||
/** | ||
* @description One or two character code to represent city council districts. | ||
* @type string | ||
* @example 25 | ||
*/ | ||
id: string; | ||
}; |
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,15 @@ | ||
export type CommunityDistrict = { | ||
/** | ||
* @description The two character numeric string containing the number used to refer to the community district. | ||
* @type string | undefined | ||
* @example 1 | ||
*/ | ||
id?: string; | ||
/** | ||
* @description A single character numeric string containing the common number used to refer to the borough. Possible values are 1-5. | ||
* @type string | undefined | ||
* @example 1 | ||
*/ | ||
boroughId?: string; | ||
required?: any; | ||
}; |
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,16 @@ | ||
import type { Error } from "./Error"; | ||
import type { Agency } from "./Agency"; | ||
|
||
export type FindAgencies400 = Error; | ||
|
||
export type FindAgencies500 = Error; | ||
|
||
/** | ||
* @description An object containing all agencies. | ||
*/ | ||
export type FindAgenciesQueryResponse = { | ||
/** | ||
* @type array | ||
*/ | ||
agencies: Agency[]; | ||
}; |
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 type { Error } from "./Error"; | ||
import type { CommunityDistrict } from "./CommunityDistrict"; | ||
|
||
export type FindCommunityDistrictsByBoroughIdPathParams = { | ||
/** | ||
* @description A single character numeric string containing the common number used to refer to the borough. Possible values are 1-5. | ||
* @type string | ||
* @example 1 | ||
*/ | ||
boroughId: string; | ||
}; | ||
|
||
export type FindCommunityDistrictsByBoroughId400 = Error; | ||
|
||
export type FindCommunityDistrictsByBoroughId404 = Error; | ||
|
||
export type FindCommunityDistrictsByBoroughId500 = Error; | ||
|
||
/** | ||
* @description An object of community district schemas for the borough | ||
*/ | ||
export type FindCommunityDistrictsByBoroughIdQueryResponse = { | ||
/** | ||
* @type array | ||
*/ | ||
communityDistricts: CommunityDistrict[]; | ||
}; |
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,10 @@ | ||
import { z } from "zod"; | ||
|
||
export const agencySchema = z.object({ | ||
initials: z | ||
.string() | ||
.describe( | ||
`A string of variable length containing the initials of the agency.`, | ||
), | ||
name: z.string().describe(`The full name of the agency.`), | ||
}); |
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,45 @@ | ||
import { z } from "zod"; | ||
|
||
export const capitalCommitmentSchema = z.object({ | ||
id: z | ||
.string() | ||
.describe(`A uuid used to refer to the capital commitment.`) | ||
.uuid() | ||
.optional(), | ||
type: z | ||
.string() | ||
.describe(`A four character string used to refer to the commitment type.`) | ||
.regex(new RegExp("^([A-z]{4})$")) | ||
.optional(), | ||
plannedDate: z | ||
.string() | ||
.describe( | ||
`A string used to refer to the date when the commitment is projected to be committed.`, | ||
) | ||
.optional(), | ||
budgetLineCode: z | ||
.string() | ||
.describe(`A string used to refer to the budget line.`) | ||
.optional(), | ||
budgetLineId: z | ||
.string() | ||
.describe(`A string used to refer to the budget line.`) | ||
.optional(), | ||
sponsoringAgencyInitials: z | ||
.string() | ||
.describe( | ||
`A string of variable length containing the initials of the sponsoring agency.`, | ||
) | ||
.optional(), | ||
budgetType: z | ||
.string() | ||
.describe(`A string of variable length denoting the type of budget.`) | ||
.optional(), | ||
totalValue: z | ||
.number() | ||
.describe( | ||
`A numeric string used to refer to the amount of total planned commitments.`, | ||
) | ||
.optional(), | ||
required: z.any().optional(), | ||
}); |
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 { z } from "zod"; | ||
|
||
import { capitalProjectSchema } from "./capitalProjectSchema"; | ||
|
||
export const capitalProjectBudgetedSchema = z | ||
.lazy(() => capitalProjectSchema) | ||
.schema.and( | ||
z.object({ | ||
commitmentsTotal: z | ||
.number() | ||
.describe(`The sum total of commitments for the capital project`), | ||
sponsoringAgencyInitials: z | ||
.array(z.string()) | ||
.describe( | ||
`An array containing string values representing the sponsoring agencies initials.`, | ||
), | ||
budgetType: z | ||
.array(z.string()) | ||
.describe( | ||
`An array containing string values representing the budget types.`, | ||
), | ||
}), | ||
); |
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,7 @@ | ||
import { z } from "zod"; | ||
|
||
export const capitalProjectCategorySchema = z.enum([ | ||
`Fixed Asset`, | ||
`Lump Sum`, | ||
`ITT, Vehicles and Equipment`, | ||
]); |
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 { z } from "zod"; | ||
|
||
import { capitalProjectCategorySchema } from "./capitalProjectCategorySchema"; | ||
|
||
export const capitalProjectSchema = z.object({ | ||
id: z | ||
.string() | ||
.describe( | ||
`The id for the project, which combines with the managing code to make a unique id`, | ||
), | ||
description: z.string().describe(`The capital project title.`), | ||
managingCode: z | ||
.string() | ||
.describe(`Three character string of numbers representing managing agency`) | ||
.regex(new RegExp("^([0-9]{3})$")), | ||
managingAgencyInitials: z | ||
.string() | ||
.describe(`The managing agency name abbreviation or acronym`), | ||
minDate: z.any().describe(`The starting date of the capital project`), | ||
maxDate: z.any().describe(`The ending date of the capital project`), | ||
category: z.lazy(() => capitalProjectCategorySchema).schema.optional(), | ||
}); |
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,8 @@ | ||
import { z } from "zod"; | ||
|
||
export const cityCouncilDistrictSchema = z.object({ | ||
id: z | ||
.string() | ||
.describe(`One or two character code to represent city council districts.`) | ||
.regex(new RegExp("^([0-9]{1,2})$")), | ||
}); |
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,19 @@ | ||
import { z } from "zod"; | ||
|
||
export const communityDistrictSchema = z.object({ | ||
id: z | ||
.string() | ||
.describe( | ||
`The two character numeric string containing the number used to refer to the community district.`, | ||
) | ||
.regex(new RegExp("^([0-9]{2})$")) | ||
.optional(), | ||
boroughId: z | ||
.string() | ||
.describe( | ||
`A single character numeric string containing the common number used to refer to the borough. Possible values are 1-5.`, | ||
) | ||
.regex(new RegExp("\\b[1-9]\\b")) | ||
.optional(), | ||
required: z.any().optional(), | ||
}); |
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,14 @@ | ||
import { z } from "zod"; | ||
|
||
import { errorSchema } from "./errorSchema"; | ||
import { agencySchema } from "./agencySchema"; | ||
|
||
export const findAgencies400Schema = z.lazy(() => errorSchema).schema; | ||
export const findAgencies500Schema = z.lazy(() => errorSchema).schema; | ||
|
||
/** | ||
* @description An object containing all agencies. | ||
*/ | ||
export const findAgenciesQueryResponseSchema = z.object({ | ||
agencies: z.array(z.lazy(() => agencySchema).schema), | ||
}); |
Oops, something went wrong.