-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
525 lines (491 loc) · 13.3 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
/* eslint-disable @typescript-eslint/indent */
import type * as bbLookups from './lookups/bbLookups.js'
import type * as ccLookups from './lookups/ccLookups.js'
import type * as ddLookups from './lookups/ddLookups.js'
import type * as ggLookups from './lookups/ggLookups.js'
import type * as paLookups from './lookups/paLookups.js'
export type RecordType =
| 'AA'
| 'BB'
| 'CC'
| 'DD'
| 'GG'
| 'HH'
| 'JJ'
| 'KK'
| 'LL'
| 'MM'
| 'PA'
| 'PB'
| 'PC'
| 'PD'
| 'PI'
export interface RawYetfRecord {
rollNumber: string
recordType: RecordType
}
export interface FormattedYetfRecord extends RawYetfRecord {
rollNumberCounty: string
rollNumberMunicipality: string
rollNumberMunicipalityName?: string
rollNumberMapArea: string
rollNumberMapDivision: string
rollNumberMapSubdivision: string
rollNumberParcel: string
rollNumberParcelSub: string
rollNumberPrimarySubordinate: string
rollNumberIsPrimary: boolean
}
/**
* AA Record
* - Roll Entry Creation
*/
export interface RawYetfRecordAA extends RawYetfRecord {
recordType: 'AA'
ward: string
poll: string
pollSuffix: string
highSchoolCode: string
publicSchoolCode: string
separateSchoolCode: string
specialRateArea: string
pacCode: string
previousRollNumber: string
frenchPublicSchoolCode: string
frenchSeparateSchoolCode: string
}
/**
* AA Record
* - Roll Entry Creation
*/
export interface FormattedYetfRecordAA
extends RawYetfRecordAA,
FormattedYetfRecord {
recordType: 'AA'
pollSuffix: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
highSchoolCode: '00' | '01'
publicSchoolCode: '00' | '01'
separateSchoolCode: '00' | '01'
frenchPublicSchoolCode: '00' | '01'
frenchSeparateSchoolCode: '00' | '01'
}
/**
* BB Record
* - Property Data
*/
export interface RawYetfRecordBB extends RawYetfRecord {
recordType: 'BB'
frontage: string
siteArea: string
unitOfMeasurement: string
depth: string
siteImprovement: string
propertyCode: string
zoningUFFI: string
services: string
access: string
}
/**
* BB Record
* - Property Data
*/
export interface FormattedYetfRecordBB
extends RawYetfRecordBB,
FormattedYetfRecord {
recordType: 'BB'
frontageFeet?: number
frontageMetres?: number
siteAreaSquareFeet?: number
siteAreaAcres?: number
unitOfMeasurement: '' | 'N' | 'F' | 'A'
depthFeet?: number
depthMetres?: number
farmForestryExemptionAcres?: number
siteImprovementHasBoathouse: boolean
siteImprovementHasSiteImprovements: boolean
siteImprovementHasOther: boolean
siteImprovementHasAccessibleFacilities: boolean
siteImprovementHasPool: boolean
siteImprovementHasElevator: boolean
siteImprovementHasSauna: boolean
siteImprovementHasMultiple: boolean
siteImprovementHasTennisCourts: boolean
propertyCode: string // for performance
propertyCodeClass?: typeof bbLookups.propertyCodeClasses[keyof typeof bbLookups.propertyCodeClasses]
propertyCodeName?: string // for performance
services: '' | keyof typeof bbLookups.serviceCodeNames
servicesName?: typeof bbLookups.serviceCodeNames[keyof typeof bbLookups.serviceCodeNames]
access: '' | keyof typeof bbLookups.accessCodeNames
accessName?: typeof bbLookups.accessCodeNames[keyof typeof bbLookups.accessCodeNames]
}
/**
* CC Record
* - Structure Data
*/
export interface RawYetfRecordCC extends RawYetfRecord {
recordType: 'CC'
sequenceNumber: string
characterOfConstruction: string
quality: string
shape: string
yearBuilt: string
yearBuiltCode: string
condition: string
fullStoreys: string
partStoreys: string
heightEffectiveYearBuilt: string
split: string
grossArea: string
totalBasementArea: string
finishedBasementArea: string
basementFinish: string
fullBaths: string
halfBaths: string
numberOfBedrooms: string
numberOfFireplaces: string
heatingType: string
airConditioning: string
garageType: string
garageSpaces: string
structureCode: string
}
/**
* CC Record
* - Structure Data
*/
export interface FormattedYetfRecordCC
extends RawYetfRecordCC,
FormattedYetfRecord {
recordType: 'CC'
// eslint-disable-next-line @typescript-eslint/key-spacing
characterOfConstruction:
| ''
| keyof typeof ccLookups.characterOfConstructionDescriptions
characterOfConstructionDescription?: string
characterOfConstructionFramingDescription?: string
characterOfConstructionFloorDescription?: string
characterOfConstructionRoofDescription?: string
characterOfConstructionWallsDescription?: string
qualityOutOf10?: number
shape: '' | 'A' | 'B' | 'C' | 'D' | 'N'
yearBuiltCode: '' | keyof typeof ccLookups.yearBuiltCodeNames
yearBuiltCodeName?: typeof ccLookups.yearBuiltCodeNames[keyof typeof ccLookups.yearBuiltCodeNames]
condition: '' | keyof typeof ccLookups.conditionCodes
conditionName?: string
conditionRankingOutOf5?: number
partStoreys: '' | keyof typeof ccLookups.partStoreyCodeNames
partStoreysName?: typeof ccLookups.partStoreyCodeNames[keyof typeof ccLookups.partStoreyCodeNames]
heightFeet?: number
effectiveYearBuilt?: number
split: '' | keyof typeof ccLookups.splitCodeNames
splitName?: typeof ccLookups.splitCodeNames[keyof typeof ccLookups.splitCodeNames]
grossAreaSquareFeet?: number
totalBasementAreaSquareFeet?: number
finishedBasementAreaSquareFeet?: number
basementFinish: '' | keyof typeof ccLookups.basementFinishCodeNames
basementFinishName?: typeof ccLookups.basementFinishCodeNames[keyof typeof ccLookups.basementFinishCodeNames]
heatingType: '' | keyof typeof ccLookups.heatingTypeCodeNames
heatingTypeName?: typeof ccLookups.heatingTypeCodeNames[keyof typeof ccLookups.heatingTypeCodeNames]
garageType: '' | keyof typeof ccLookups.garageTypeCodeNames
garageTypeName?: typeof ccLookups.garageTypeCodeNames[keyof typeof ccLookups.garageTypeCodeNames]
structureCode: string // for performance
structureCodeClass?: typeof ccLookups.structureCodeClasses[keyof typeof ccLookups.structureCodeClasses]
structureCodeName?: string // for performance
}
/**
* DD Record
* - Land Data
*/
export interface RawYetfRecordDD extends RawYetfRecord {
recordType: 'DD'
sequenceNumber: string
acres: string
texture: string
soilClass: string
tiling: string
climaticZone: string
woodedAcreage: string
orchardAcreage: string
}
/**
* DD Record
* - Land Data
*/
export interface FormattedYetfRecordDD
extends RawYetfRecordDD,
FormattedYetfRecord {
recordType: 'DD'
texture: '' | keyof typeof ddLookups.textureCodeNames
textureName?: typeof ddLookups.textureCodeNames[keyof typeof ddLookups.textureCodeNames]
soilClass: '' | keyof typeof ddLookups.soilClassPointsRemaining
soilClassPointsRemainingMin?: number
soilClassPointsRemainingMax?: number
}
/**
* GG Record
* - Name Data
*/
export interface RawYetfRecordGG extends RawYetfRecord {
recordType: 'GG'
sequenceNumber: string
name: string
identifier: string
occupancyStatus: string
religion: string
schoolSupport: string
residencyCode: string
citizenship: string
designatedRatepayerCode: string
yearOfBirth: string
monthOfBirth: string
frenchLanguageEducationRights: string
}
/**
* GG Record
* - Name Data
*/
export interface FormattedYetfRecordGG
extends RawYetfRecordGG,
FormattedYetfRecord {
recordType: 'GG'
identifier: '' | keyof typeof ggLookups.identifierNames
identifierName?: string
occupancyStatus: '' | keyof typeof ggLookups.occupancyStatusNames
occupancyStatusName?: string
schoolSupport: '' | keyof typeof ggLookups.schoolSupportNames
schoolSupportName?: string
residencyCode: '' | keyof typeof ggLookups.residencyCodeDescriptions
residencyCodeDescription?: string
monthOfBirth: '' | keyof typeof ggLookups.monthOfBirthNames
monthOfBirthName?: typeof ggLookups.monthOfBirthNames[keyof typeof ggLookups.monthOfBirthNames]
}
/**
* HH Record
* - Mailing Address
*/
export interface RawYetfRecordHH extends RawYetfRecord {
recordType: 'HH'
sequenceNumber: string
mailingAddress: string
}
/**
* HH Record
* - Mailing Address
*/
export interface FormattedYetfRecordHH
extends RawYetfRecordHH,
FormattedYetfRecord {
recordType: 'HH'
sequenceNumber: '1' | '2' | '3'
}
/**
* JJ Record
* - City/Province Mailing Address
*/
export interface RawYetfRecordJJ extends RawYetfRecord {
recordType: 'JJ'
cityProvinceCountry: string
postalCode: string
}
/**
* JJ Record
* - City/Province Mailing Address
*/
export interface FormattedYetfRecordJJ
extends RawYetfRecordJJ,
FormattedYetfRecord {
recordType: 'JJ'
}
/**
* KK Record
* - Property Location
*/
export interface RawYetfRecordKK extends RawYetfRecord {
recordType: 'KK'
streetNumber: string
upperStreetNumber: string
qualifier: string
streetName: string
unitNumber: string
}
/**
* KK Record
* - Property Location
*/
export interface FormattedYetfRecordKK
extends RawYetfRecordKK,
FormattedYetfRecord {
recordType: 'KK'
civicAddress?: string
}
/**
* LL Record
* - Legal Description
*/
export interface RawYetfRecordLL extends RawYetfRecord {
recordType: 'LL'
sequenceNumber: string
legalDescription: string
}
/**
* LL Record
* - Legal Description
*/
export interface FormattedYetfRecordLL
extends RawYetfRecordLL,
FormattedYetfRecord {
recordType: 'LL'
sequenceNumber: '1' | '2' | '3' | '4' | '5'
}
/**
* MM Record
* - Comments and Site Dimensions
*/
export interface RawYetfRecordMM extends RawYetfRecord {
recordType: 'MM'
sequenceNumber: string
commentsSiteDimensions: string
}
/**
* MM Record
* - Comments and Site Dimensions
*/
export interface FormattedYetfRecordMM
extends RawYetfRecordMM,
FormattedYetfRecord {
recordType: 'MM'
sequenceNumber: '1' | '2' | '3' | '4' | '5'
}
/**
* PA Record
* - Assessment Control
*/
export interface RawYetfRecordPA extends RawYetfRecord {
recordType: 'PA'
sequenceNumber: string
phaseInValue: string
unitClass: string
realtyTaxClass: string
realtyTaxQualifier: string
tenantTaxLiability: string
noticeIssued: string
previousYearAssessment: string
unitSupport: string
pooledTaxesUnit: string
partnershipCode: string
propertyType: string
propertyTotal: string
realtyPortionTotal: string
}
/**
* PA Record
* - Assessment Control
*/
export interface FormattedYetfRecordPA
extends RawYetfRecordPA,
FormattedYetfRecord {
recordType: 'PA'
phaseInValueDollars: number
unitClass: '' | keyof typeof paLookups.unitClassDescriptions
unitClassDescription?: typeof paLookups.unitClassDescriptions[keyof typeof paLookups.unitClassDescriptions]
realtyTaxClass: '' | keyof typeof paLookups.realtyTaxClassNames
realtyTaxClassName?: typeof paLookups.realtyTaxClassNames[keyof typeof paLookups.realtyTaxClassNames]
realtyTaxQualifier: '' | keyof typeof paLookups.realtyTaxQualifiers
realtyTaxQualifierClass?: 'Taxable' | 'Payment in Lieu'
realtyTaxQualifierName?: string
previousYearAssessmentDollars: number
unitSupport: '' | keyof typeof paLookups.unitSupportNames
unitSupportName?: typeof paLookups.unitSupportNames[keyof typeof paLookups.unitSupportNames]
propertyType: '' | keyof typeof paLookups.propertyTypeNames
propertyTypeName?: typeof paLookups.propertyTypeNames[keyof typeof paLookups.propertyTypeNames]
propertyTotalDollars: number
realtyPortionTotalDollars: number
}
/**
* PB Record
* - Assessment Value English Public, English Separate, No School Support
*/
export interface RawYetfRecordPB extends RawYetfRecord {
recordType: 'PB'
sequenceNumber: string
realtyPortionEnglishPublic: string
realtyPortionEnglishSeparate: string
realtyPortionNoSupport: string
}
/**
* PB Record
* - Assessment Value English Public, English Separate, No School Support
*/
export interface FormattedYetfRecordPB
extends RawYetfRecordPB,
FormattedYetfRecord {
recordType: 'PB'
sequenceNumber: '1'
realtyPortionEnglishPublicDollars: number
realtyPortionEnglishSeparateDollars: number
realtyPortionNoSupportDollars: number
}
/**
* PC Record
* - Assessment Value French Public, French Separate School Support
*/
export interface RawYetfRecordPC extends RawYetfRecord {
recordType: 'PC'
sequenceNumber: string
realtyPortionFrenchPublic: string
realtyPortionFrenchSeparate: string
}
/**
* PC Record
* - Assessment Value French Public, French Separate School Support
*/
export interface FormattedYetfRecordPC
extends RawYetfRecordPC,
FormattedYetfRecord {
recordType: 'PC'
sequenceNumber: '1'
realtyPortionFrenchPublicDollars: number
realtyPortionFrenchSeparateDollars: number
}
/**
* PD Record
* - Assessment Value Protestant Separate School Support
*/
export interface RawYetfRecordPD extends RawYetfRecord {
recordType: 'PD'
sequenceNumber: string
realtyPortionProtestantSeparate: string
}
/**
* PD Record
* - Assessment Value Protestant Separate School Support
*/
export interface FormattedYetfRecordPD
extends RawYetfRecordPD,
FormattedYetfRecord {
recordType: 'PD'
sequenceNumber: '1'
realtyPortionProtestantSeparateDollars: number
}
/**
* PI Record
* - Phase-In
*/
export interface RawYetfRecordPI extends RawYetfRecord {
recordType: 'PI'
phaseInStartingPoint: string
phaseInValue: string
phaseInDestinationValue: string
}
/**
* PI Record
* - Phase-In
*/
export interface FormattedYetfRecordPI
extends RawYetfRecordPI,
FormattedYetfRecord {
recordType: 'PI'
phaseInStartingPointDollars: number
phaseInValueDollars: number
phaseInDestinationValueDollars: number
}