layrz-sdk 3.1.47__py3-none-any.whl → 3.1.49__py3-none-any.whl

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.

Potentially problematic release.


This version of layrz-sdk might be problematic. Click here for more details.

@@ -8,6 +8,8 @@ from .asset import Asset
8
8
  from .asset_constants import AssetConstants
9
9
  from .asset_contact import AssetContact
10
10
  from .asset_operation_mode import AssetOperationMode
11
+ from .ats_exit_history import AtsExitExecutionHistory
12
+ from .ats_possible_exit import AtsPossibleExit
11
13
  from .ats_reception import AtsReception
12
14
  from .broadcast import (
13
15
  BroadcastPayload,
@@ -53,6 +55,7 @@ from .command_series_ticket import CommandSeriesTicket, CommandSeriesTicketStatu
53
55
  from .comment import Comment
54
56
  from .custom_field import CustomField
55
57
  from .custom_report_page import CustomReportPage
58
+ from .destination_phone import DestinationPhone
56
59
  from .device import Device
57
60
  from .event import Event
58
61
  from .exchange_service import ExchangeService
@@ -65,7 +68,7 @@ from .modbus import ModbusConfig, ModbusParameter, ModbusSchema, ModbusStatus, M
65
68
  from .notification_type import TwilioNotificationType
66
69
  from .operation import Operation
67
70
  from .operation_case_payload import OperationCaseCommentPayload, OperationCasePayload
68
- from .operation_payload import OperationPayload, TwilioHostPhone
71
+ from .operation_payload import OperationPayload
69
72
  from .operation_type import OperationType
70
73
  from .outbound_service import OutboundService
71
74
  from .platform import Platform
@@ -102,6 +105,8 @@ __all__ = [
102
105
  'AssetContact',
103
106
  'AssetMessage',
104
107
  'AssetOperationMode',
108
+ 'AtsExitExecutionHistory',
109
+ 'AtsPossibleExit',
105
110
  'AtsReception',
106
111
  'AxisConfig',
107
112
  'BarChart',
@@ -190,7 +195,7 @@ __all__ = [
190
195
  'TriggerCommentPattern',
191
196
  'TriggerGeofenceKind',
192
197
  'TriggerKind',
193
- 'TwilioHostPhone',
198
+ 'DestinationPhone',
194
199
  'TwilioNotificationType',
195
200
  'User',
196
201
  'Waypoint',
@@ -0,0 +1,58 @@
1
+ """Exit Execution History"""
2
+
3
+ from datetime import datetime
4
+ from typing import Literal, Optional
5
+
6
+ from pydantic import (
7
+ BaseModel,
8
+ ConfigDict,
9
+ Field,
10
+ PositiveInt, # useful if you later want a non-nullable positive int
11
+ conint,
12
+ )
13
+
14
+
15
+ class AtsExitExecutionHistory(BaseModel):
16
+ pk: int = Field(description='Primary key of the Exit Execution History')
17
+
18
+ from_asset: int = Field(
19
+ description='ID of the asset from which the exit is initiated',
20
+ )
21
+ to_asset: int = Field(
22
+ description='ID of the asset to which the exit is directed',
23
+ )
24
+
25
+ status: Literal['PENDING', 'FAILED', 'SUCCESS'] = Field(
26
+ default='PENDING',
27
+ )
28
+ from_app: Optional[Literal['ATSWEB', 'ATSMOBILE', 'NFC']] = Field(
29
+ default=None,
30
+ description='Application from which the exit was initiated',
31
+ )
32
+
33
+ error_response: Optional[str] = Field(
34
+ default=None,
35
+ description='Error response received during the exit process',
36
+ )
37
+
38
+ generated_by: int = Field(
39
+ description='ID of the user or system that initiated the exit',
40
+ )
41
+
42
+ queue_id: Optional[int] = Field(
43
+ default=None,
44
+ description='ID of the queue associated with the exit',
45
+ )
46
+ to_asset_mileage: Optional[float] = Field(
47
+ default=None,
48
+ description='Mileage of the asset to which the exit is directed',
49
+ )
50
+
51
+ created_at: datetime = Field(
52
+ description='Timestamp when the exit was created',
53
+ )
54
+ updated_at: datetime = Field(
55
+ description='Timestamp when the exit was last updated',
56
+ )
57
+
58
+ model_config = ConfigDict(from_attributes=True)
@@ -0,0 +1,78 @@
1
+ """Ats Exit entity"""
2
+
3
+ from datetime import datetime
4
+ from typing import Optional
5
+
6
+ from pydantic import (
7
+ BaseModel,
8
+ ConfigDict,
9
+ Field,
10
+ PositiveInt, # useful if you later want a non-nullable positive int
11
+ conint,
12
+ )
13
+
14
+
15
+ class AtsPossibleExit(BaseModel):
16
+ """AtsPossibleExit entity"""
17
+
18
+ pk: int = Field(description='Defines the primary key of the AtsPossibleExit')
19
+
20
+ # Nullable “positive big integer” identifier
21
+ identifier: Optional[conint(ge=0)] = Field( # type: ignore
22
+ default=None,
23
+ description='Nullable positive big integer identifier for the exit',
24
+ )
25
+
26
+ # Volume / gauge snapshots
27
+ initial_tank_volume: Optional[float] = Field(
28
+ default=None,
29
+ description='Initial tank volume in liters',
30
+ )
31
+ initial_fluxometer: Optional[float] = Field(
32
+ default=None,
33
+ description='Initial fluxometer reading in liters',
34
+ )
35
+ total_liters: float = Field(
36
+ default=0.0,
37
+ description='Total liters of fuel involved in the exit',
38
+ )
39
+
40
+ # Status flags
41
+ is_ready: bool = Field(
42
+ default=False,
43
+ description='Indicates if the exit is ready',
44
+ )
45
+ in_progress: bool = Field(
46
+ default=False,
47
+ description='Indicates if the exit is in progress',
48
+ )
49
+ is_validated: bool = Field(
50
+ default=False,
51
+ description='Indicates if the exit is validated',
52
+ )
53
+
54
+ # Lifecycle timestamps
55
+ start_at: datetime = Field(
56
+ default_factory=datetime.now,
57
+ description='Timestamp when the exit started',
58
+ )
59
+ end_at: Optional[datetime] = Field(
60
+ default=None,
61
+ description='Timestamp when the exit ended',
62
+ )
63
+
64
+ # Derived / bookkeeping flags
65
+ is_recalculated: bool = Field(
66
+ default=False,
67
+ description='Indicates if the exit has been recalculated',
68
+ )
69
+ is_blackbox: Optional[bool] = Field(
70
+ default=False,
71
+ description='Indicates if the exit is a blackbox',
72
+ )
73
+ false_positive_count: Optional[int] = Field(
74
+ default=0,
75
+ description='Count of false positives detected',
76
+ )
77
+
78
+ model_config = ConfigDict(from_attributes=True) # enables .from_orm()
@@ -0,0 +1,29 @@
1
+ import sys
2
+
3
+ if sys.version_info >= (3, 11):
4
+ from typing import Self
5
+ else:
6
+ from typing_extensions import Self
7
+
8
+ from pydantic import BaseModel, Field
9
+
10
+
11
+ class DestinationPhone(BaseModel):
12
+ """Destination Phone"""
13
+
14
+ phone_number: str = Field(
15
+ ...,
16
+ description='Defines the phone number for Twilio notifications',
17
+ alias='phoneNumber',
18
+ )
19
+
20
+ country_code: str = Field(
21
+ ...,
22
+ description='Defines the country code for the phone number',
23
+ alias='countryCode',
24
+ )
25
+
26
+ @property
27
+ def formatted_phone_number(self: Self) -> str:
28
+ """Returns the formatted phone number"""
29
+ return f'{self.country_code}{self.phone_number}'
@@ -5,6 +5,7 @@ from typing import Any
5
5
 
6
6
  from pydantic import BaseModel, Field
7
7
 
8
+ from .destination_phone import DestinationPhone
8
9
  from .notification_type import TwilioNotificationType
9
10
  from .operation_type import OperationType
10
11
  from .platform import Platform
@@ -99,7 +100,7 @@ class Operation(BaseModel):
99
100
  alias='notification_type',
100
101
  )
101
102
 
102
- host_phone: str | None = Field(
103
+ host_phone: DestinationPhone | None = Field(
103
104
  default=None,
104
105
  description='Defines the host phone number for Twilio notifications',
105
106
  )
@@ -114,7 +115,7 @@ class Operation(BaseModel):
114
115
  description='Defines the token for the operation, used for authentication in some cases',
115
116
  )
116
117
 
117
- destination_phones: list[str] = Field(
118
+ destination_phones: list[DestinationPhone] = Field(
118
119
  default_factory=list,
119
120
  description='Defines the destination phone numbers for Twilio notifications',
120
121
  )
@@ -4,6 +4,8 @@ import sys
4
4
  from datetime import datetime, timedelta
5
5
  from typing import Any
6
6
 
7
+ from layrz_sdk.entities.destination_phone import DestinationPhone
8
+
7
9
  if sys.version_info >= (3, 11):
8
10
  from typing import Self
9
11
  else:
@@ -24,27 +26,6 @@ from layrz_sdk.entities.sound_effect import SoundEffect
24
26
  from layrz_sdk.entities.trigger import Trigger
25
27
 
26
28
 
27
- class TwilioHostPhone(BaseModel):
28
- """Twilio Host Phone entity"""
29
-
30
- phone_number: str = Field(
31
- ...,
32
- description='Defines the phone number for Twilio notifications',
33
- alias='phoneNumber',
34
- )
35
-
36
- country_code: str = Field(
37
- ...,
38
- description='Defines the country code for the phone number',
39
- alias='countryCode',
40
- )
41
-
42
- @property
43
- def formatted_phone_number(self: Self) -> str:
44
- """Returns the formatted phone number"""
45
- return f'{self.country_code}{self.phone_number}'
46
-
47
-
48
29
  class OperationPayload(BaseModel):
49
30
  """Operation Payload entity"""
50
31
 
@@ -225,12 +206,12 @@ class OperationPayload(BaseModel):
225
206
  )
226
207
 
227
208
  ## For usage of Twilio operations
228
- destinations: list[TwilioHostPhone] = Field(
209
+ destinations: list[DestinationPhone] = Field(
229
210
  default_factory=list,
230
211
  description='Defines the destination phone numbers for Twilio notifications',
231
212
  )
232
213
 
233
- twilio_host_phone: TwilioHostPhone | None = Field(
214
+ twilio_host_phone: DestinationPhone | None = Field(
234
215
  default=None,
235
216
  description='Defines the host phone number for Twilio notifications',
236
217
  alias='hostPhone',
@@ -9,3 +9,7 @@ class Sensor(BaseModel):
9
9
  pk: int = Field(description='Defines the primary key of the sensor')
10
10
  name: str = Field(description='Defines the name of the sensor')
11
11
  slug: str = Field(description='Defines the slug of the sensor')
12
+ formula: str = Field(
13
+ default='',
14
+ description='Defines the formula of the sensor, used for calculations',
15
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: layrz-sdk
3
- Version: 3.1.47
3
+ Version: 3.1.49
4
4
  Summary: Layrz SDK for Python
5
5
  Author-email: "Golden M, Inc." <software@goldenm.com>
6
6
  Maintainer-email: Kenny Mochizuki <kenny@goldenm.com>, Luis Reyes <lreyes@goldenm.com>, Kasen Li <kli@goldenm.com>, Miguel Zauzich <miguel@goldenm.com>, Angel Prieto <aprieto@goldenm.com>
@@ -2,7 +2,7 @@ layrz_sdk/__init__.py,sha256=OutylN0QazaeDVIA5NRDVyzwfYnZkAwVQzT-2F6iX2M,28
2
2
  layrz_sdk/backwards.py,sha256=f_DUxvbZs-p287-wGwxx0NVUK7Gha-cNP_hHRAJWAq0,85
3
3
  layrz_sdk/constants.py,sha256=guXfIsVAcex76OEMv6DAJy1km1A_WUfWJuUO2Lo3kXE,344
4
4
  layrz_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- layrz_sdk/entities/__init__.py,sha256=LBHHRML6XLUofjamv_HcYIMLinO6sFdNyd4kLBH-Z-s,5779
5
+ layrz_sdk/entities/__init__.py,sha256=zVbcAEYzGIzqd_un63qKm-p9lv3xS2nTsBYflYn4ghE,5962
6
6
  layrz_sdk/entities/action.py,sha256=QTe2L2NCJqxCUn-kb-qgjgQ9gn9nGT-qXcVyHvjXF20,2089
7
7
  layrz_sdk/entities/action_geofence_ownership.py,sha256=PHu6495IUb9biKLXGEy4ESyrzmpP2AQbJiquYk9Kz7c,678
8
8
  layrz_sdk/entities/action_kind.py,sha256=u5CI9y86f6-zHKSf4gRhoqcK5azle1UAHqa8-033x88,1277
@@ -11,6 +11,8 @@ layrz_sdk/entities/asset.py,sha256=b8dCfQRsZsze-7X8Ydwi_lhBh7VEPx-KHalYSofUC40,2
11
11
  layrz_sdk/entities/asset_constants.py,sha256=dqBK9mq6N-WJLd-RQ7rgDSmcBchR1hYjhOKwd3O7PqQ,600
12
12
  layrz_sdk/entities/asset_contact.py,sha256=ptxItpob4VdQeM6qMUtSZgZxBw5DfKp3kVfBVlXpujo,422
13
13
  layrz_sdk/entities/asset_operation_mode.py,sha256=1RLRpbUm6jwxivdKbB2O6wdnrhyqaccQ_moA-wrnzdQ,639
14
+ layrz_sdk/entities/ats_exit_history.py,sha256=znbBI-rYLF8_1ojsetID4F7gkce-FV-pVzNSs7pmqzA,1523
15
+ layrz_sdk/entities/ats_possible_exit.py,sha256=ZJKu2-a5w0PXV7_GsPrY8LiPoKZoAI0pMGPnpG_nqfk,2016
14
16
  layrz_sdk/entities/ats_reception.py,sha256=yog5b5vvWKOHj67YMamJ_m7zodLcrYSSEwdXxtaLDCk,596
15
17
  layrz_sdk/entities/case.py,sha256=0dSfZCezDuEEED42rws-zntqa_Em9oFevlXSPrIeIC8,1877
16
18
  layrz_sdk/entities/case_ignored_status.py,sha256=9nRIKJqaZ9EBXYuI4j4v2hCd0C6GtWPDKsbdE2Srt1g,517
@@ -20,6 +22,7 @@ layrz_sdk/entities/command_series_ticket.py,sha256=Bn1j7q9qsnr-Kq8rvYOtJe8cTRySh
20
22
  layrz_sdk/entities/comment.py,sha256=1YSWVxXlpoicVVHv3mvkNlfUTfcOMxZYfb4YmwrxchY,414
21
23
  layrz_sdk/entities/custom_field.py,sha256=jurONu01Ph-Qq8uuxdzxoQ6i7BqbZe64vO2ESvQDSFg,277
22
24
  layrz_sdk/entities/custom_report_page.py,sha256=eqtoFOgip0z4_cMql1tHgaR4JiVEYlfbzd9ZJ7ZLyrM,1231
25
+ layrz_sdk/entities/destination_phone.py,sha256=Wr8p27dyqVfYFKf8-bP6aJVAFwcJ6LvP_0Qp3Ov31A4,645
23
26
  layrz_sdk/entities/device.py,sha256=rqBJf0L-cIfxE6ONwGHVx_L0StyQL-ycvSVzug4iIwQ,732
24
27
  layrz_sdk/entities/event.py,sha256=IDcPwtKbqvX8S2QQei3yFbA2M8NeSYGFoXo3AaSmdHI,720
25
28
  layrz_sdk/entities/exchange_service.py,sha256=DOSffjwxZ7tcRA6nk0QCf-dpO981jqP9FX_wjvviSGI,665
@@ -29,9 +32,9 @@ layrz_sdk/entities/geofence_category.py,sha256=YtUx7z-NmnQhYL8GedQRMR4xsis_BnPNy
29
32
  layrz_sdk/entities/last_message.py,sha256=QNgF0xCQ6uLFDMmKQCjSRhGS1Bq7akw5pv6ZIiFlwfY,268
30
33
  layrz_sdk/entities/message.py,sha256=eFID7CEBnwp6-MsfhK09JPSJzp7iRbQibJOe_ELgQ9A,563
31
34
  layrz_sdk/entities/notification_type.py,sha256=yfuQhiIDaOfWCc8p9fZp8umaOU4ELdGrA_b5MWYHA5U,757
32
- layrz_sdk/entities/operation.py,sha256=xXD_-dqLW5c6J3aRMRxJh9tebaDKl7WPOoq0Q-chyjA,4887
35
+ layrz_sdk/entities/operation.py,sha256=qTtPyNjpEzdnfxuX88iviyhfHBlMGdFgf9bPSkrKLDA,4961
33
36
  layrz_sdk/entities/operation_case_payload.py,sha256=ZOimwmt3fRz01U5Mz0KqeKbS9AGdIDJvZBhPI3c50xQ,2657
34
- layrz_sdk/entities/operation_payload.py,sha256=wJ1_0A5Ml-NNLwZ-rnhMqS-sFCIIJmWK9s87cgloc5U,8786
37
+ layrz_sdk/entities/operation_payload.py,sha256=SOkg6xlj70C9iFZmvOchTm0GdZtbwC7-ISv4dHoWmo8,8356
35
38
  layrz_sdk/entities/operation_type.py,sha256=I7wzqvc-JlqmPxYbigAV32Sb5IXFeZ65Z156imC-MXk,1027
36
39
  layrz_sdk/entities/outbound_service.py,sha256=AUivyq_AuA1ZPBOYOfRoQsGrMCYNLGiHX1QycDFn230,651
37
40
  layrz_sdk/entities/platform.py,sha256=4nEXvBorqH2LndQ6iYBmvdqAL-ELGTftEzvIsjej0p0,714
@@ -47,7 +50,7 @@ layrz_sdk/entities/report_header.py,sha256=ChsxCqHe-Ik2t3DO3kxyja2WgILzxg12NPFcr
47
50
  layrz_sdk/entities/report_page.py,sha256=ebhFEI6dYRM2jZzjedyIJSyPBAggySpmZjtcaILltxA,550
48
51
  layrz_sdk/entities/report_row.py,sha256=t2Rk7LeforU-sD5abqnTQES2Oac8dmEXMLLo_18xg6Y,788
49
52
  layrz_sdk/entities/request_type.py,sha256=xOD33EOpHRy8307w5h_4axBPLuIgKTNNLid4hnvp2TQ,496
50
- layrz_sdk/entities/sensor.py,sha256=9Q6RGb9qDvyLS4tELZOZtPlaiWi9An5Vf0gGLGWIRhE,312
53
+ layrz_sdk/entities/sensor.py,sha256=_S8xND8JyS-edS73Cnj29GHWqncdN3e7599C7URmHLc,432
51
54
  layrz_sdk/entities/sound_effect.py,sha256=lsGK3keNXyuZ7MEEFlxt-BoiRhurq8-hWpGFYE_Qzqo,1151
52
55
  layrz_sdk/entities/static_position.py,sha256=xTbTWRPQLZqTgPQnyIMOoMHiNi42AzmVRfgDMM4m03c,365
53
56
  layrz_sdk/entities/text_alignment.py,sha256=YqUqj07c4XzHZLdaqNw1FEUpneWoJU5UU3eicC5-Sps,496
@@ -105,8 +108,8 @@ layrz_sdk/helpers/__init__.py,sha256=5iW3z2m3jrYhvTfxX-p-QTkR9X9oTKfEsbtVOg9jFFY
105
108
  layrz_sdk/helpers/color.py,sha256=dlpMafbM-4Wd9D9hMbbnZJf4ALkpie_ZmBR2Vz_YCmM,1203
106
109
  layrz_sdk/lcl/__init__.py,sha256=U967AWANkL3u_YVxMNAYlh8jkZ6hqHfStacz7yz6sOA,89
107
110
  layrz_sdk/lcl/core.py,sha256=T80A3hL7SeqRNSfl5SrPAgwIEf-enoAVv9ldwJNzqsA,24786
108
- layrz_sdk-3.1.47.dist-info/licenses/LICENSE,sha256=d5ZrU--lIPER7QByXDKcrtOTOMk1JvN_9FdYDuoWi7Y,1057
109
- layrz_sdk-3.1.47.dist-info/METADATA,sha256=rU1CIC_hQpIRJ1hlEgbOReYB4JWWzhq16EO7ymoJEXU,2109
110
- layrz_sdk-3.1.47.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
111
- layrz_sdk-3.1.47.dist-info/top_level.txt,sha256=yUTMMzfdZ0HDWQH5TaSlFM4xtwmP1fSGxmlL1dmu4l4,10
112
- layrz_sdk-3.1.47.dist-info/RECORD,,
111
+ layrz_sdk-3.1.49.dist-info/licenses/LICENSE,sha256=d5ZrU--lIPER7QByXDKcrtOTOMk1JvN_9FdYDuoWi7Y,1057
112
+ layrz_sdk-3.1.49.dist-info/METADATA,sha256=IifviDhXVKKVspYWArzX15bhfYguN8lvBVJrPL7soDs,2109
113
+ layrz_sdk-3.1.49.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
114
+ layrz_sdk-3.1.49.dist-info/top_level.txt,sha256=yUTMMzfdZ0HDWQH5TaSlFM4xtwmP1fSGxmlL1dmu4l4,10
115
+ layrz_sdk-3.1.49.dist-info/RECORD,,