neris-api-client 1.5.4__tar.gz → 1.5.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neris_api_client
3
- Version: 1.5.4
3
+ Version: 1.5.6
4
4
  Summary: NERIS API Client
5
5
  Author-email: Ben Coleman <ben.coleman@ul.org>, Joseph Pagani <joseph.pagani@ul.org>, Daniel Liu <daniel.liu@ul.org>
6
6
  Project-URL: Homepage, https://github.com/ulfsri/neris-api-client
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "neris_api_client"
7
- version = "1.5.4"
7
+ version = "1.5.6"
8
8
  authors = [
9
9
  { name="Ben Coleman", email="ben.coleman@ul.org" },
10
10
  { name="Joseph Pagani", email="joseph.pagani@ul.org"},
@@ -120,7 +120,7 @@ class _NerisApiClient:
120
120
  },
121
121
  )
122
122
 
123
- if not res:
123
+ if res is None:
124
124
  return
125
125
 
126
126
  while True:
@@ -139,7 +139,7 @@ class _NerisApiClient:
139
139
  ),
140
140
  )
141
141
 
142
- got: dict = res.json()
142
+ got: dict = res.json() if res.status_code in (HTTPStatus.OK, HTTPStatus.ACCEPTED) else None
143
143
 
144
144
  # Successfully generated tokens
145
145
  if res.status_code == HTTPStatus.OK:
@@ -153,18 +153,51 @@ class _NerisApiClient:
153
153
 
154
154
  # Respond to MFA challenge
155
155
  elif res.status_code == HTTPStatus.ACCEPTED:
156
- code: str = input(f"Provide MFA code for {got['challenge_name']}: ")
157
-
158
- res = self._session.post(
159
- token_url,
160
- headers={"Content-Type": "application/x-www-form-urlencoded"},
161
- data={
162
- "grant_type": got["challenge_name"],
163
- "username": self.config.username,
164
- "session": got["session"],
165
- got["challenge_name"]: code,
166
- },
167
- )
156
+ challenge_name = got["challenge_name"]
157
+ session = got["session"]
158
+
159
+ # TOTP codes (software_token_mfa) rotate every ~30s, so a code
160
+ # can expire between being generated and submitted. Allow a
161
+ # few attempts with a freshly entered code before giving up.
162
+ max_mfa_attempts = 3
163
+ for mfa_attempt in range(1, max_mfa_attempts + 1):
164
+ code: str = input(f"Provide MFA code for {challenge_name}: ").strip()
165
+
166
+ res = self._session.post(
167
+ token_url,
168
+ headers={"Content-Type": "application/x-www-form-urlencoded"},
169
+ data={
170
+ "grant_type": challenge_name,
171
+ "username": self.config.username,
172
+ "session": session,
173
+ challenge_name: code,
174
+ },
175
+ )
176
+
177
+ if res.status_code in (HTTPStatus.OK, HTTPStatus.ACCEPTED):
178
+ break
179
+
180
+ try:
181
+ detail = res.json()
182
+ except requests.exceptions.JSONDecodeError:
183
+ detail = res.text
184
+
185
+ if mfa_attempt < max_mfa_attempts:
186
+ print(f"✗ MFA code rejected (HTTP {res.status_code}): {detail}. Please try again.")
187
+ else:
188
+ raise RuntimeError(
189
+ f"MFA verification failed after {max_mfa_attempts} attempts: {detail}"
190
+ )
191
+
192
+ # Any other response (e.g. bad credentials) is an error. Without
193
+ # this, the loop above would spin forever re-reading the same
194
+ # rejected response.
195
+ else:
196
+ try:
197
+ detail = res.json()
198
+ except requests.exceptions.JSONDecodeError:
199
+ detail = res.text
200
+ raise RuntimeError(f"Authentication failed (HTTP {res.status_code}): {detail}")
168
201
 
169
202
  def _call(
170
203
  self,
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: openapi.json
3
- # timestamp: 2026-06-25T22:57:56+00:00
3
+ # timestamp: 2026-07-22T18:30:10+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -332,6 +332,24 @@ class BodyUpsertLogoEntityNerisIdEntityLogoPut(BaseModel):
332
332
  )
333
333
 
334
334
 
335
+ class BuildingInfo(BaseModel):
336
+ primary_building_area: Optional[int] = Field(
337
+ None,
338
+ description="The primary building footprint area in square feet",
339
+ title="Primary Building Area",
340
+ )
341
+ primary_building_height_avg: Optional[int] = Field(
342
+ None,
343
+ description="The primary building average height in feet",
344
+ title="Primary Building Height Avg",
345
+ )
346
+ secondary_building_count: Optional[int] = Field(
347
+ None,
348
+ description="The number of secondary buildings",
349
+ title="Secondary Building Count",
350
+ )
351
+
352
+
335
353
  class Type(Enum):
336
354
  FF = "FF"
337
355
  NONFF = "NONFF"
@@ -552,12 +570,6 @@ class CrossStreetResponse(BaseModel):
552
570
  examples=['"A" in "A19 Calle 117, Toa Alta, PR"'],
553
571
  title="Number Prefix",
554
572
  )
555
- number: Optional[int] = Field(
556
- None,
557
- description="Integer identifier of a location along a thoroughfare or within a defined community.",
558
- examples=['"123" in "123 Main Street"'],
559
- title="Number",
560
- )
561
573
  number_suffix: Optional[constr(min_length=1, max_length=255)] = Field(
562
574
  None,
563
575
  description="Identifier in the portion of the complete address number that follows the integer Address Number in order to further specify a location along a thoroughfare or within a defined area.",
@@ -576,6 +588,12 @@ class CrossStreetResponse(BaseModel):
576
588
  examples=['"Milepost 1303" in "Milepost 1303, Alaska Highway"'],
577
589
  title="Distance Marker",
578
590
  )
591
+ number: Optional[int] = Field(
592
+ None,
593
+ description="Integer identifier of a location along a thoroughfare or within a defined community.",
594
+ examples=['"123" in "123 Main Street"'],
595
+ title="Number",
596
+ )
579
597
  street_prefix_modifier: Optional[constr(min_length=1, max_length=255)] = Field(
580
598
  None,
581
599
  description="Word or phrase that precedes and modifies the Street Name element but is separated from it by a Street Name Pre Type or a Street Name Pre Directional or both.",
@@ -1713,6 +1731,15 @@ class IncidentAnalysisBaseResponse(BaseModel):
1713
1731
  )
1714
1732
 
1715
1733
 
1734
+ class Status(Enum):
1735
+ APPROVED = "APPROVED"
1736
+ DELETED = "DELETED"
1737
+ FAILED = "FAILED"
1738
+ PENDING_APPROVAL = "PENDING_APPROVAL"
1739
+ REJECTED = "REJECTED"
1740
+ SUBMITTED = "SUBMITTED"
1741
+
1742
+
1716
1743
  class IncidentAnalysisStatusResponse(BaseModel):
1717
1744
  last_modified: AwareDatetime = Field(
1718
1745
  ...,
@@ -1725,16 +1752,16 @@ class IncidentAnalysisStatusResponse(BaseModel):
1725
1752
  ],
1726
1753
  title="Last Modified",
1727
1754
  )
1755
+ status: Status = Field(
1756
+ ...,
1757
+ description="Status of the incident analysis in the administrative approval process.",
1758
+ title="Status",
1759
+ )
1728
1760
  created_by: UUID = Field(
1729
1761
  ...,
1730
1762
  description="That account that created or last modified the incident analysis record.",
1731
1763
  title="Created By",
1732
1764
  )
1733
- status: str = Field(
1734
- ...,
1735
- description="Status of the incident analysis in the administrative approval process.",
1736
- title="Status",
1737
- )
1738
1765
 
1739
1766
 
1740
1767
  class IncidentAnalysisUpdatedResponse(BaseModel):
@@ -2116,7 +2143,7 @@ class IncidentFilterType(Enum):
2116
2143
  UNDETERMINED = "UNDETERMINED"
2117
2144
 
2118
2145
 
2119
- class Status(Enum):
2146
+ class Status1(Enum):
2120
2147
  APPROVED = "APPROVED"
2121
2148
  DELETED = "DELETED"
2122
2149
  FAILED = "FAILED"
@@ -2156,7 +2183,7 @@ class IncidentHistoryItemResponse(BaseModel):
2156
2183
  description="The client id of the integration if the account was an integration account",
2157
2184
  title="Client Id",
2158
2185
  )
2159
- status: Status = Field(
2186
+ status: Status1 = Field(
2160
2187
  ...,
2161
2188
  description="Status of the incident in the administrativie approval process.",
2162
2189
  title="Status",
@@ -2197,7 +2224,7 @@ class IncidentStatusResponse(BaseModel):
2197
2224
  description="That account that created or last modified the incident record.",
2198
2225
  title="Created By",
2199
2226
  )
2200
- status: Status = Field(
2227
+ status: Status1 = Field(
2201
2228
  ...,
2202
2229
  description="Status of the incident in the administrativie approval process.",
2203
2230
  title="Status",
@@ -5496,6 +5523,10 @@ class TypeAutoMakeValue(Enum):
5496
5523
  ACURA = "ACURA"
5497
5524
  AGCO = "AGCO"
5498
5525
  ALFA_ROMEO = "ALFA_ROMEO"
5526
+ ALPINA = "ALPINA"
5527
+ ALPINE = "ALPINE"
5528
+ AMC = "AMC"
5529
+ ARIEL = "ARIEL"
5499
5530
  ASTON_MARTIN = "ASTON_MARTIN"
5500
5531
  AUDI = "AUDI"
5501
5532
  BENTLEY_MOTORS = "BENTLEY_MOTORS"
@@ -5503,34 +5534,57 @@ class TypeAutoMakeValue(Enum):
5503
5534
  BOLLINGER_MOTORS = "BOLLINGER_MOTORS"
5504
5535
  BUGATTI = "BUGATTI"
5505
5536
  BUICK = "BUICK"
5537
+ BYD = "BYD"
5506
5538
  CADILLAC = "CADILLAC"
5507
5539
  CANOO = "CANOO"
5508
5540
  CASE_IH = "CASE_IH"
5541
+ CATERHAM = "CATERHAM"
5509
5542
  CHEVROLET = "CHEVROLET"
5510
5543
  CHRYSLER = "CHRYSLER"
5544
+ CITROEN = "CITROEN"
5511
5545
  CLAAS = "CLAAS"
5546
+ CUPRA = "CUPRA"
5547
+ CZINGER = "CZINGER"
5548
+ DACIA = "DACIA"
5549
+ DAEWOO = "DAEWOO"
5550
+ DAF = "DAF"
5551
+ DAIHATSU = "DAIHATSU"
5552
+ DATSUN = "DATSUN"
5512
5553
  DELOREAN_MOTOR_COMPANY = "DELOREAN_MOTOR_COMPANY"
5513
5554
  DEUTZ_FAHR = "DEUTZ_FAHR"
5514
5555
  DODGE = "DODGE"
5556
+ DONKERVOORT = "DONKERVOORT"
5557
+ EAGLE = "EAGLE"
5558
+ FARADAY_FUTURE = "FARADAY_FUTURE"
5515
5559
  FENDT = "FENDT"
5516
5560
  FERRARI = "FERRARI"
5517
5561
  FIAT = "FIAT"
5518
5562
  FISKER = "FISKER"
5519
5563
  FORD = "FORD"
5564
+ FREIGHTLINER = "FREIGHTLINER"
5520
5565
  GENESIS = "GENESIS"
5566
+ GEO = "GEO"
5521
5567
  GMC = "GMC"
5568
+ HARLEY_DAVIDSON = "HARLEY_DAVIDSON"
5569
+ HENNESSEY = "HENNESSEY"
5522
5570
  HONDA = "HONDA"
5523
5571
  HUMMER = "HUMMER"
5524
5572
  HYUNDAI = "HYUNDAI"
5525
5573
  INEOS = "INEOS"
5526
5574
  INFINITI = "INFINITI"
5575
+ INTERNATIONAL = "INTERNATIONAL"
5576
+ ISUZU = "ISUZU"
5577
+ IVECO = "IVECO"
5527
5578
  JAGUAR = "JAGUAR"
5528
5579
  JEEP = "JEEP"
5529
5580
  JOHN_DEERE = "JOHN_DEERE"
5530
5581
  KARMA = "KARMA"
5531
5582
  KIA = "KIA"
5583
+ KOENIGSEGG = "KOENIGSEGG"
5532
5584
  KUBOTA = "KUBOTA"
5585
+ LADA = "LADA"
5533
5586
  LAMBORGHINI = "LAMBORGHINI"
5587
+ LANCIA = "LANCIA"
5534
5588
  LAND_ROVER = "LAND_ROVER"
5535
5589
  LEXUS = "LEXUS"
5536
5590
  LINCOLN = "LINCOLN"
@@ -5538,6 +5592,7 @@ class TypeAutoMakeValue(Enum):
5538
5592
  LOTUS = "LOTUS"
5539
5593
  LUCID_MOTORS = "LUCID_MOTORS"
5540
5594
  MAHINDRA_AND_MAHINDRA = "MAHINDRA_AND_MAHINDRA"
5595
+ MAN = "MAN"
5541
5596
  MASERATI = "MASERATI"
5542
5597
  MASSEY_FERGUSON = "MASSEY_FERGUSON"
5543
5598
  MAYBACH = "MAYBACH"
@@ -5546,30 +5601,51 @@ class TypeAutoMakeValue(Enum):
5546
5601
  MERCEDES_AMG = "MERCEDES_AMG"
5547
5602
  MERCEDES_BENZ = "MERCEDES_BENZ"
5548
5603
  MERCURY = "MERCURY"
5604
+ MG = "MG"
5549
5605
  MINI = "MINI"
5550
5606
  MITSUBISHI = "MITSUBISHI"
5607
+ MORGAN = "MORGAN"
5608
+ MULLEN = "MULLEN"
5551
5609
  NEW_HOLLAND = "NEW_HOLLAND"
5552
5610
  NISSAN = "NISSAN"
5553
5611
  OLDSMOBILE = "OLDSMOBILE"
5612
+ OPEL = "OPEL"
5554
5613
  OTHER = "OTHER"
5614
+ PAGANI = "PAGANI"
5615
+ PEUGEOT = "PEUGEOT"
5555
5616
  PLYMOUTH = "PLYMOUTH"
5617
+ POLARIS = "POLARIS"
5556
5618
  POLESTAR = "POLESTAR"
5557
5619
  PONTIAC = "PONTIAC"
5558
5620
  PORSCHE = "PORSCHE"
5621
+ PROTON = "PROTON"
5559
5622
  RAM = "RAM"
5623
+ RENAULT = "RENAULT"
5624
+ RIMAC = "RIMAC"
5560
5625
  RIVIAN = "RIVIAN"
5561
5626
  ROLLS_ROYCE = "ROLLS_ROYCE"
5562
5627
  SAAB = "SAAB"
5628
+ SALEEN = "SALEEN"
5563
5629
  SATURN = "SATURN"
5630
+ SCANIA = "SCANIA"
5564
5631
  SCION = "SCION"
5632
+ SEAT = "SEAT"
5633
+ SKODA = "SKODA"
5565
5634
  SMART = "SMART"
5635
+ SPYKER = "SPYKER"
5636
+ SRT = "SRT"
5637
+ SSC_NORTH_AMERICA = "SSC_NORTH_AMERICA"
5566
5638
  SUBARU = "SUBARU"
5567
5639
  SUZUKI = "SUZUKI"
5568
5640
  TESLA = "TESLA"
5569
5641
  TOYOTA = "TOYOTA"
5642
+ TVR = "TVR"
5643
+ VAUXHALL = "VAUXHALL"
5570
5644
  VINFAST = "VINFAST"
5571
5645
  VOLKSWAGEN = "VOLKSWAGEN"
5572
5646
  VOLVO = "VOLVO"
5647
+ YAMAHA = "YAMAHA"
5648
+ YUGO = "YUGO"
5573
5649
 
5574
5650
 
5575
5651
  class TypeBatteryCellValue(Enum):
@@ -6242,6 +6318,11 @@ class TypeHumanFactorsValue(Enum):
6242
6318
  PHYSICAL_DISABILITY = "PHYSICAL_DISABILITY"
6243
6319
 
6244
6320
 
6321
+ class TypeIncidentAnalysisStatusPayloadValue(Enum):
6322
+ APPROVED = "APPROVED"
6323
+ REJECTED = "REJECTED"
6324
+
6325
+
6245
6326
  class TypeIncidentComplexityValue(Enum):
6246
6327
  ICS_TYPE_1 = "ICS_TYPE_1"
6247
6328
  ICS_TYPE_2 = "ICS_TYPE_2"
@@ -8854,6 +8935,11 @@ class WeatherResponse(BaseModel):
8854
8935
  )
8855
8936
 
8856
8937
 
8938
+ class YesOrNo(Enum):
8939
+ Y = "Y"
8940
+ N = "N"
8941
+
8942
+
8857
8943
  class FieldPatchCommentActionProperties(BaseModel):
8858
8944
  model_config = ConfigDict(
8859
8945
  extra="forbid",
@@ -9719,6 +9805,39 @@ class AppendOtherPowergenHazardAction(BaseModel):
9719
9805
  value: OtherPowergenHazardPayload
9720
9806
 
9721
9807
 
9808
+ class AssessmentInfo(BaseModel):
9809
+ primary_year_built: Optional[int] = Field(
9810
+ None,
9811
+ description="The year the primary structure on the property was built",
9812
+ title="Primary Year Built",
9813
+ )
9814
+ primary_zoning: Optional[str] = Field(
9815
+ None,
9816
+ description="Actual city zoning, unique to each incorporated area as reported to the County. Please note that it is not always current, nor reported",
9817
+ examples=["RP", "NT"],
9818
+ title="Primary Zoning",
9819
+ )
9820
+ primary_use: Optional[str] = Field(
9821
+ None,
9822
+ description="Description of the Standardized Land Use Code",
9823
+ examples=["OFFICE_BUILDING"],
9824
+ title="Primary Use",
9825
+ )
9826
+ primary_owner_occupied: Optional[YesOrNo] = Field(
9827
+ None, description="Indicates if the property is occupied by the owner"
9828
+ )
9829
+ primary_assessment_land: Optional[float] = Field(
9830
+ None,
9831
+ description="The assessed land value in dollars",
9832
+ title="Primary Assessment Land",
9833
+ )
9834
+ computed_loss: Optional[int] = Field(
9835
+ None,
9836
+ description="The estimated, computed value lost due to structure fire based on damage type. Value is in dollars.",
9837
+ title="Computed Loss",
9838
+ )
9839
+
9840
+
9722
9841
  class BatteryPayload(BaseModel):
9723
9842
  model_config = ConfigDict(
9724
9843
  extra="forbid",
@@ -9946,12 +10065,6 @@ class CrossStreetPayload(BaseModel):
9946
10065
  examples=['"A" in "A19 Calle 117, Toa Alta, PR"'],
9947
10066
  title="Number Prefix",
9948
10067
  )
9949
- number: Optional[int] = Field(
9950
- None,
9951
- description="Integer identifier of a location along a thoroughfare or within a defined community.",
9952
- examples=['"123" in "123 Main Street"'],
9953
- title="Number",
9954
- )
9955
10068
  number_suffix: Optional[constr(min_length=1, max_length=255)] = Field(
9956
10069
  None,
9957
10070
  description="Identifier in the portion of the complete address number that follows the integer Address Number in order to further specify a location along a thoroughfare or within a defined area.",
@@ -9970,6 +10083,12 @@ class CrossStreetPayload(BaseModel):
9970
10083
  examples=['"Milepost 1303" in "Milepost 1303, Alaska Highway"'],
9971
10084
  title="Distance Marker",
9972
10085
  )
10086
+ number: Optional[conint(ge=0, le=1000000)] = Field(
10087
+ None,
10088
+ description="Integer identifier of a location along a thoroughfare or within a defined community.",
10089
+ examples=['"123" in "123 Main Street"'],
10090
+ title="Number",
10091
+ )
9973
10092
  street_prefix_modifier: Optional[constr(min_length=1, max_length=255)] = Field(
9974
10093
  None,
9975
10094
  description="Word or phrase that precedes and modifies the Street Name element but is separated from it by a Street Name Pre Type or a Street Name Pre Directional or both.",
@@ -10632,12 +10751,6 @@ class GeocodedLocationResponse(BaseModel):
10632
10751
  examples=['"A" in "A19 Calle 117, Toa Alta, PR"'],
10633
10752
  title="Number Prefix",
10634
10753
  )
10635
- number: Optional[int] = Field(
10636
- None,
10637
- description="Integer identifier of a location along a thoroughfare or within a defined community.",
10638
- examples=['"123" in "123 Main Street"'],
10639
- title="Number",
10640
- )
10641
10754
  number_suffix: Optional[constr(min_length=1, max_length=255)] = Field(
10642
10755
  None,
10643
10756
  description="Identifier in the portion of the complete address number that follows the integer Address Number in order to further specify a location along a thoroughfare or within a defined area.",
@@ -10656,6 +10769,12 @@ class GeocodedLocationResponse(BaseModel):
10656
10769
  examples=['"Milepost 1303" in "Milepost 1303, Alaska Highway"'],
10657
10770
  title="Distance Marker",
10658
10771
  )
10772
+ number: Optional[int] = Field(
10773
+ None,
10774
+ description="Integer identifier of a location along a thoroughfare or within a defined community.",
10775
+ examples=['"123" in "123 Main Street"'],
10776
+ title="Number",
10777
+ )
10659
10778
  structure: Optional[constr(min_length=1, max_length=255)] = Field(
10660
10779
  None,
10661
10780
  description="A built feature which has a vertical dimension, including both conventional buildings which have walls, doors, and a roof, and other kinds of infrastructure such as cell towers, transformer stations, fuel tanks, and so on. ",
@@ -10862,6 +10981,16 @@ class Vehicles1(RootModel[Union[VehicleAutomobileResponse, VehicleOtherResponse]
10862
10981
  root: Union[VehicleAutomobileResponse, VehicleOtherResponse] = Field(..., discriminator="type")
10863
10982
 
10864
10983
 
10984
+ class IncidentAnalysisStatusPayload(BaseModel):
10985
+ model_config = ConfigDict(
10986
+ extra="forbid",
10987
+ )
10988
+ status: TypeIncidentAnalysisStatusPayloadValue = Field(
10989
+ ...,
10990
+ description="Status of the incident analysis in the administrative approval process.",
10991
+ )
10992
+
10993
+
10865
10994
  class IncidentCreatedResponse(BaseModel):
10866
10995
  neris_id: constr(pattern=r"^FD\d{8}\|[\w\-\:]+\|\d{10}$") = Field(
10867
10996
  ...,
@@ -11169,12 +11298,6 @@ class LocationPayload(BaseModel):
11169
11298
  examples=['"A" in "A19 Calle 117, Toa Alta, PR"'],
11170
11299
  title="Number Prefix",
11171
11300
  )
11172
- number: Optional[int] = Field(
11173
- None,
11174
- description="Integer identifier of a location along a thoroughfare or within a defined community.",
11175
- examples=['"123" in "123 Main Street"'],
11176
- title="Number",
11177
- )
11178
11301
  number_suffix: Optional[constr(min_length=1, max_length=255)] = Field(
11179
11302
  None,
11180
11303
  description="Identifier in the portion of the complete address number that follows the integer Address Number in order to further specify a location along a thoroughfare or within a defined area.",
@@ -11193,6 +11316,12 @@ class LocationPayload(BaseModel):
11193
11316
  examples=['"Milepost 1303" in "Milepost 1303, Alaska Highway"'],
11194
11317
  title="Distance Marker",
11195
11318
  )
11319
+ number: Optional[conint(ge=0, le=1000000)] = Field(
11320
+ None,
11321
+ description="Integer identifier of a location along a thoroughfare or within a defined community.",
11322
+ examples=['"123" in "123 Main Street"'],
11323
+ title="Number",
11324
+ )
11196
11325
  structure: Optional[constr(min_length=1, max_length=255)] = Field(
11197
11326
  None,
11198
11327
  description="A built feature which has a vertical dimension, including both conventional buildings which have walls, doors, and a roof, and other kinds of infrastructure such as cell towers, transformer stations, fuel tanks, and so on. ",
@@ -11420,12 +11549,6 @@ class LocationResponse(BaseModel):
11420
11549
  examples=['"A" in "A19 Calle 117, Toa Alta, PR"'],
11421
11550
  title="Number Prefix",
11422
11551
  )
11423
- number: Optional[int] = Field(
11424
- None,
11425
- description="Integer identifier of a location along a thoroughfare or within a defined community.",
11426
- examples=['"123" in "123 Main Street"'],
11427
- title="Number",
11428
- )
11429
11552
  number_suffix: Optional[constr(min_length=1, max_length=255)] = Field(
11430
11553
  None,
11431
11554
  description="Identifier in the portion of the complete address number that follows the integer Address Number in order to further specify a location along a thoroughfare or within a defined area.",
@@ -11444,6 +11567,12 @@ class LocationResponse(BaseModel):
11444
11567
  examples=['"Milepost 1303" in "Milepost 1303, Alaska Highway"'],
11445
11568
  title="Distance Marker",
11446
11569
  )
11570
+ number: Optional[int] = Field(
11571
+ None,
11572
+ description="Integer identifier of a location along a thoroughfare or within a defined community.",
11573
+ examples=['"123" in "123 Main Street"'],
11574
+ title="Number",
11575
+ )
11447
11576
  structure: Optional[constr(min_length=1, max_length=255)] = Field(
11448
11577
  None,
11449
11578
  description="A built feature which has a vertical dimension, including both conventional buildings which have walls, doors, and a roof, and other kinds of infrastructure such as cell towers, transformer stations, fuel tanks, and so on. ",
@@ -11695,6 +11824,13 @@ class OutsideFirePayload(BaseModel):
11695
11824
  )
11696
11825
 
11697
11826
 
11827
+ class ParcelSummary(BaseModel):
11828
+ building: Optional[BuildingInfo] = Field(
11829
+ None, description="Building information for the parcel"
11830
+ )
11831
+ assessment: Optional[AssessmentInfo] = Field(None, description="Assessment for the parcel")
11832
+
11833
+
11698
11834
  class PatchCommentAction(BaseModel):
11699
11835
  model_config = ConfigDict(
11700
11836
  extra="forbid",
@@ -13746,44 +13882,6 @@ class ExposurePayload(BaseModel):
13746
13882
  )
13747
13883
 
13748
13884
 
13749
- class ExposureResponse(BaseModel):
13750
- neris_uid: Optional[int] = Field(
13751
- None, description="The NERIS unique identifier for the item.", title="Neris Uid"
13752
- )
13753
- last_modified: AwareDatetime = Field(
13754
- ...,
13755
- description="The date and time the top-level item was created or updated in the system.",
13756
- examples=[
13757
- "2024-06-13T21:14:02.162497-07:00",
13758
- "1718338442.162497",
13759
- 1718338442.162497,
13760
- 1718338442,
13761
- ],
13762
- title="Last Modified",
13763
- )
13764
- people_present: Optional[bool] = Field(
13765
- None,
13766
- description="Whether people were present at the time of the incident.",
13767
- title="People Present",
13768
- )
13769
- displacement_count: Optional[int] = Field(
13770
- None,
13771
- description=" Number of people/businesses displaced.",
13772
- title="Displacement Count",
13773
- )
13774
- location_detail: Union[ExternalExposureResponse, InternalExposureResponse] = Field(
13775
- ..., title="Location Detail"
13776
- )
13777
- location: LocationResponse
13778
- location_use: Optional[LocationUseResponse] = None
13779
- damage_type: str = Field(..., title="Damage Type")
13780
- point: Optional[Union[GeoPoint, GeoMultipolygon, str]] = Field(None, title="Point")
13781
- polygon: Optional[Union[GeoPoint, GeoMultipolygon, str]] = Field(None, title="Polygon")
13782
- displacement_causes: Optional[List[str]] = Field(
13783
- None, description="Causes of displacement.", title="Displacement Causes"
13784
- )
13785
-
13786
-
13787
13885
  class FfRescuePayload(BaseModel):
13788
13886
  model_config = ConfigDict(
13789
13887
  extra="forbid",
@@ -13965,92 +14063,6 @@ class IncidentBaseResponse(BaseModel):
13965
14063
  polygon: Optional[Union[GeoPoint, GeoMultipolygon, str]] = Field(None, title="Polygon")
13966
14064
 
13967
14065
 
13968
- class IncidentResponse(BaseModel):
13969
- neris_id: constr(pattern=r"^FD\d{8}\|[\w\-\:]+\|\d{10}$") = Field(
13970
- ...,
13971
- description="NERIS ID of the incident. This is comprised of the department NERIS ID concatenated with `dispatch.incident_number` and the epoch time of `dispatch.call_create` in the record as initially submitted. An incident's NERIS_ID is immutable, and so should not be relied upon for extraction of `incident_number` or `call_create`, as these attributes could have been updated.",
13972
- examples=[
13973
- "FD12345678|abc123xyz|1729023498",
13974
- "FD24027334|incident42:f-tiw|1729023498",
13975
- "FD12345678|0457812893477|1729023498",
13976
- ],
13977
- title="Neris Id",
13978
- )
13979
- last_modified: AwareDatetime = Field(
13980
- ...,
13981
- description="The date and time the top-level item was created or updated in the system.",
13982
- examples=[
13983
- "2024-06-13T21:14:02.162497-07:00",
13984
- "1718338442.162497",
13985
- 1718338442.162497,
13986
- 1718338442,
13987
- ],
13988
- title="Last Modified",
13989
- )
13990
- department: Optional[NerisApiIncidentModelsDepartmentTimeZoneResponse] = None
13991
- submitter_account_type: TypeAccountValue
13992
- base: IncidentBaseResponse
13993
- incident_types: List[IncidentTypeResponse] = Field(
13994
- ...,
13995
- description="\n - Incidents with a `FIRE` type require all fire suppression and alarm modules: smoke_alarm, fire_alarm, other_alarm, fire_suppression.\n - Incidents with a `FIRE||STRUCTURE_FIRE||CONFINED_COOKING_APPLIANCE_FIRE` type require the cooking_fire_suppression module.\n ",
13996
- title="Incident Types",
13997
- )
13998
- incident_status: IncidentStatusResponse
13999
- special_modifiers: Optional[List[SpecialModifierResponse]] = Field(
14000
- None, title="Special Modifiers"
14001
- )
14002
- aids: Optional[List[AidResponse]] = Field(None, title="Aids")
14003
- nonfd_aids: Optional[List[NonfdAidResponse]] = Field(None, title="Nonfd Aids")
14004
- actions_tactics: Optional[ActionTacticResponse] = None
14005
- dispatch: DispatchResponse
14006
- tactic_timestamps: Optional[IncidentTacticTimestampsResponse] = None
14007
- unit_responses: Optional[List[UnitResponseResponse]] = Field(None, title="Unit Responses")
14008
- exposures: Optional[List[ExposureResponse]] = Field(None, title="Exposures")
14009
- casualty_rescues: Optional[List[CasualtyRescueResponse]] = Field(None, title="Casualty Rescues")
14010
- fire_detail: Optional[FireResponse] = Field(
14011
- None,
14012
- description="Fire module. Only possible if at least one `FIRE` incident type is present",
14013
- )
14014
- hazsit_detail: Optional[HazsitResponse] = Field(
14015
- None,
14016
- description="Hazsit module. Only possible if at least one `HAZSIT` incident type is present",
14017
- )
14018
- medical_details: Optional[List[MedicalResponse]] = Field(
14019
- None,
14020
- description="Medical module(s). Only possible if at least one `MEDICAL` incident type is present",
14021
- title="Medical Details",
14022
- )
14023
- smoke_alarm: Optional[SmokeAlarmResponse] = None
14024
- fire_alarm: Optional[FireAlarmResponse] = None
14025
- other_alarm: Optional[OtherAlarmResponse] = None
14026
- fire_suppression: Optional[FireSuppressionResponse] = None
14027
- cooking_fire_suppression: Optional[CookingFireSuppressionResponse] = None
14028
- electric_hazards: Optional[List[ElectricHazardResponse]] = Field(None, title="Electric Hazards")
14029
- powergen_hazards: Optional[List[PowergenHazardResponse]] = Field(None, title="Powergen Hazards")
14030
- csst_hazard: Optional[CsstHazardResponse] = None
14031
- medical_oxygen_hazard: Optional[MedicalOxygenHazardResponse] = None
14032
- weather: Optional[WeatherResponse] = Field(
14033
- None,
14034
- description="Weather conditions at the time of `dispatch.call_create`, if available",
14035
- )
14036
- census_tract: Optional[CensusTractResponse] = Field(
14037
- None, description="Census tract information, if available"
14038
- )
14039
- incident_analysis_neris_id: Optional[constr(pattern=r"^IA\|FD\d{8}\|[\w\-\:]+\|\d{10}$")] = (
14040
- Field(
14041
- None,
14042
- description="Unique identifier of incident analysis, if present.",
14043
- title="Incident Analysis Neris Id",
14044
- )
14045
- )
14046
-
14047
-
14048
- class ListIncidentsResponse(BaseModel):
14049
- incidents: List[IncidentResponse] = Field(..., title="Incidents")
14050
- prev_cursor: Optional[str] = Field(None, title="Prev Cursor")
14051
- next_cursor: Optional[str] = Field(None, title="Next Cursor")
14052
-
14053
-
14054
14066
  class ListUserInfoResponse(BaseModel):
14055
14067
  page_size: int = Field(..., title="Page Size")
14056
14068
  page_count: int = Field(..., title="Page Count")
@@ -14068,6 +14080,24 @@ class OtherAlarmPayload(BaseModel):
14068
14080
  )
14069
14081
 
14070
14082
 
14083
+ class ParcelResponse(BaseModel):
14084
+ neris_uid: Optional[int] = Field(
14085
+ None, description="The NERIS unique identifier for the item.", title="Neris Uid"
14086
+ )
14087
+ last_modified: AwareDatetime = Field(
14088
+ ...,
14089
+ description="The date and time the top-level item was created or updated in the system.",
14090
+ examples=[
14091
+ "2024-06-13T21:14:02.162497-07:00",
14092
+ "1718338442.162497",
14093
+ 1718338442.162497,
14094
+ 1718338442,
14095
+ ],
14096
+ title="Last Modified",
14097
+ )
14098
+ summary: Optional[ParcelSummary] = Field(None, description="Summary information for the parcel")
14099
+
14100
+
14071
14101
  class PatchActionAction(BaseModel):
14072
14102
  model_config = ConfigDict(
14073
14103
  extra="forbid",
@@ -15160,6 +15190,48 @@ class CreateDepartmentPayload(BaseModel):
15160
15190
  )
15161
15191
 
15162
15192
 
15193
+ class ExposureResponse(BaseModel):
15194
+ neris_uid: Optional[int] = Field(
15195
+ None, description="The NERIS unique identifier for the item.", title="Neris Uid"
15196
+ )
15197
+ last_modified: AwareDatetime = Field(
15198
+ ...,
15199
+ description="The date and time the top-level item was created or updated in the system.",
15200
+ examples=[
15201
+ "2024-06-13T21:14:02.162497-07:00",
15202
+ "1718338442.162497",
15203
+ 1718338442.162497,
15204
+ 1718338442,
15205
+ ],
15206
+ title="Last Modified",
15207
+ )
15208
+ people_present: Optional[bool] = Field(
15209
+ None,
15210
+ description="Whether people were present at the time of the incident.",
15211
+ title="People Present",
15212
+ )
15213
+ displacement_count: Optional[int] = Field(
15214
+ None,
15215
+ description=" Number of people/businesses displaced.",
15216
+ title="Displacement Count",
15217
+ )
15218
+ location_detail: Union[ExternalExposureResponse, InternalExposureResponse] = Field(
15219
+ ..., title="Location Detail"
15220
+ )
15221
+ location: LocationResponse
15222
+ location_use: Optional[LocationUseResponse] = None
15223
+ damage_type: str = Field(..., title="Damage Type")
15224
+ point: Optional[Union[GeoPoint, GeoMultipolygon, str]] = Field(None, title="Point")
15225
+ polygon: Optional[Union[GeoPoint, GeoMultipolygon, str]] = Field(None, title="Polygon")
15226
+ displacement_causes: Optional[List[str]] = Field(
15227
+ None, description="Causes of displacement.", title="Displacement Causes"
15228
+ )
15229
+ parcel: Optional[ParcelResponse] = Field(
15230
+ None,
15231
+ description="Parcel information for the exposure coordinates, if available",
15232
+ )
15233
+
15234
+
15163
15235
  class FireSuppressionPayload(BaseModel):
15164
15236
  model_config = ConfigDict(
15165
15237
  extra="forbid",
@@ -15193,6 +15265,7 @@ class IncidentAnalysisResponse(BaseModel):
15193
15265
  )
15194
15266
  department: Optional[NerisApiIncidentAnalysisModelsDepartmentTimeZoneResponse] = None
15195
15267
  base: IncidentAnalysisBaseResponse
15268
+ incident_analysis_status: IncidentAnalysisStatusResponse
15196
15269
  hazsit: Optional[HazsitWithReleaseFactorsResponse] = Field(
15197
15270
  None, description="The hazmat/hazsit analysis for the incident."
15198
15271
  )
@@ -15261,6 +15334,96 @@ class IncidentPayload(BaseModel):
15261
15334
  medical_oxygen_hazard: Optional[MedicalOxygenHazardPayload] = None
15262
15335
 
15263
15336
 
15337
+ class IncidentResponse(BaseModel):
15338
+ neris_id: constr(pattern=r"^FD\d{8}\|[\w\-\:]+\|\d{10}$") = Field(
15339
+ ...,
15340
+ description="NERIS ID of the incident. This is comprised of the department NERIS ID concatenated with `dispatch.incident_number` and the epoch time of `dispatch.call_create` in the record as initially submitted. An incident's NERIS_ID is immutable, and so should not be relied upon for extraction of `incident_number` or `call_create`, as these attributes could have been updated.",
15341
+ examples=[
15342
+ "FD12345678|abc123xyz|1729023498",
15343
+ "FD24027334|incident42:f-tiw|1729023498",
15344
+ "FD12345678|0457812893477|1729023498",
15345
+ ],
15346
+ title="Neris Id",
15347
+ )
15348
+ last_modified: AwareDatetime = Field(
15349
+ ...,
15350
+ description="The date and time the top-level item was created or updated in the system.",
15351
+ examples=[
15352
+ "2024-06-13T21:14:02.162497-07:00",
15353
+ "1718338442.162497",
15354
+ 1718338442.162497,
15355
+ 1718338442,
15356
+ ],
15357
+ title="Last Modified",
15358
+ )
15359
+ department: Optional[NerisApiIncidentModelsDepartmentTimeZoneResponse] = None
15360
+ submitter_account_type: TypeAccountValue
15361
+ base: IncidentBaseResponse
15362
+ incident_types: List[IncidentTypeResponse] = Field(
15363
+ ...,
15364
+ description="\n - Incidents with a `FIRE` type require all fire suppression and alarm modules: smoke_alarm, fire_alarm, other_alarm, fire_suppression.\n - Incidents with a `FIRE||STRUCTURE_FIRE||CONFINED_COOKING_APPLIANCE_FIRE` type require the cooking_fire_suppression module.\n ",
15365
+ title="Incident Types",
15366
+ )
15367
+ incident_status: IncidentStatusResponse
15368
+ special_modifiers: Optional[List[SpecialModifierResponse]] = Field(
15369
+ None, title="Special Modifiers"
15370
+ )
15371
+ aids: Optional[List[AidResponse]] = Field(None, title="Aids")
15372
+ nonfd_aids: Optional[List[NonfdAidResponse]] = Field(None, title="Nonfd Aids")
15373
+ actions_tactics: Optional[ActionTacticResponse] = None
15374
+ dispatch: DispatchResponse
15375
+ tactic_timestamps: Optional[IncidentTacticTimestampsResponse] = None
15376
+ unit_responses: Optional[List[UnitResponseResponse]] = Field(None, title="Unit Responses")
15377
+ exposures: Optional[List[ExposureResponse]] = Field(None, title="Exposures")
15378
+ casualty_rescues: Optional[List[CasualtyRescueResponse]] = Field(None, title="Casualty Rescues")
15379
+ fire_detail: Optional[FireResponse] = Field(
15380
+ None,
15381
+ description="Fire module. Only possible if at least one `FIRE` incident type is present",
15382
+ )
15383
+ hazsit_detail: Optional[HazsitResponse] = Field(
15384
+ None,
15385
+ description="Hazsit module. Only possible if at least one `HAZSIT` incident type is present",
15386
+ )
15387
+ medical_details: Optional[List[MedicalResponse]] = Field(
15388
+ None,
15389
+ description="Medical module(s). Only possible if at least one `MEDICAL` incident type is present",
15390
+ title="Medical Details",
15391
+ )
15392
+ smoke_alarm: Optional[SmokeAlarmResponse] = None
15393
+ fire_alarm: Optional[FireAlarmResponse] = None
15394
+ other_alarm: Optional[OtherAlarmResponse] = None
15395
+ fire_suppression: Optional[FireSuppressionResponse] = None
15396
+ cooking_fire_suppression: Optional[CookingFireSuppressionResponse] = None
15397
+ electric_hazards: Optional[List[ElectricHazardResponse]] = Field(None, title="Electric Hazards")
15398
+ powergen_hazards: Optional[List[PowergenHazardResponse]] = Field(None, title="Powergen Hazards")
15399
+ csst_hazard: Optional[CsstHazardResponse] = None
15400
+ medical_oxygen_hazard: Optional[MedicalOxygenHazardResponse] = None
15401
+ weather: Optional[WeatherResponse] = Field(
15402
+ None,
15403
+ description="Weather conditions at the time of `dispatch.call_create`, if available",
15404
+ )
15405
+ census_tract: Optional[CensusTractResponse] = Field(
15406
+ None, description="Census tract information, if available"
15407
+ )
15408
+ parcel: Optional[ParcelResponse] = Field(
15409
+ None,
15410
+ description="Parcel information for the incident coordinates, if available",
15411
+ )
15412
+ incident_analysis_neris_id: Optional[constr(pattern=r"^IA\|FD\d{8}\|[\w\-\:]+\|\d{10}$")] = (
15413
+ Field(
15414
+ None,
15415
+ description="Unique identifier of incident analysis, if present.",
15416
+ title="Incident Analysis Neris Id",
15417
+ )
15418
+ )
15419
+
15420
+
15421
+ class ListIncidentsResponse(BaseModel):
15422
+ incidents: List[IncidentResponse] = Field(..., title="Incidents")
15423
+ prev_cursor: Optional[str] = Field(None, title="Prev Cursor")
15424
+ next_cursor: Optional[str] = Field(None, title="Next Cursor")
15425
+
15426
+
15264
15427
  class PatchActionTacticAction(BaseModel):
15265
15428
  model_config = ConfigDict(
15266
15429
  extra="forbid",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neris_api_client
3
- Version: 1.5.4
3
+ Version: 1.5.6
4
4
  Summary: NERIS API Client
5
5
  Author-email: Ben Coleman <ben.coleman@ul.org>, Joseph Pagani <joseph.pagani@ul.org>, Daniel Liu <daniel.liu@ul.org>
6
6
  Project-URL: Homepage, https://github.com/ulfsri/neris-api-client