layrz-sdk 3.1.44__py3-none-any.whl → 3.1.46__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.

@@ -6,6 +6,7 @@ from .action_kind import ActionKind
6
6
  from .action_subkind import ActionSubKind
7
7
  from .asset import Asset
8
8
  from .asset_constants import AssetConstants
9
+ from .asset_contact import AssetContact
9
10
  from .asset_operation_mode import AssetOperationMode
10
11
  from .ats_reception import AtsReception
11
12
  from .broadcast import (
@@ -64,7 +65,7 @@ from .modbus import ModbusConfig, ModbusParameter, ModbusSchema, ModbusStatus, M
64
65
  from .notification_type import TwilioNotificationType
65
66
  from .operation import Operation
66
67
  from .operation_case_payload import OperationCaseCommentPayload, OperationCasePayload
67
- from .operation_payload import OperationPayload
68
+ from .operation_payload import OperationPayload, TwilioHostPhone
68
69
  from .operation_type import OperationType
69
70
  from .outbound_service import OutboundService
70
71
  from .platform import Platform
@@ -92,19 +93,27 @@ from .waypoint import Waypoint, WaypointKind, WaypointRef
92
93
  from .weekday import Weekday
93
94
 
94
95
  __all__ = [
96
+ 'Action',
97
+ 'ActionGeofenceOwnership',
98
+ 'ActionKind',
99
+ 'ActionSubKind',
95
100
  'Asset',
101
+ 'AssetConstants',
102
+ 'AssetContact',
103
+ 'AssetMessage',
96
104
  'AssetOperationMode',
105
+ 'AtsReception',
106
+ 'AxisConfig',
107
+ 'BarChart',
108
+ 'BroadcastPayload',
97
109
  'BroadcastRequest',
98
110
  'BroadcastResponse',
99
111
  'BroadcastResult',
100
- 'BroadcastStatus',
101
112
  'BroadcastService',
102
- 'BroadcastPayload',
113
+ 'BroadcastStatus',
103
114
  'Case',
104
115
  'CaseIgnoredStatus',
105
116
  'CaseStatus',
106
- 'AxisConfig',
107
- 'BarChart',
108
117
  'ChartAlignment',
109
118
  'ChartColor',
110
119
  'ChartConfiguration',
@@ -112,37 +121,49 @@ __all__ = [
112
121
  'ChartDataSerieType',
113
122
  'ChartDataType',
114
123
  'ChartRenderTechnology',
115
- 'ColumnChart',
116
- 'HTMLChart',
117
- 'LineChart',
118
- 'MapCenterType',
119
- 'MapChart',
120
- 'MapPoint',
121
- 'NumberChart',
122
- 'PieChart',
123
- 'RadarChart',
124
- 'RadialBarChart',
125
- 'ScatterChart',
126
- 'ScatterSerie',
127
- 'ScatterSerieItem',
128
- 'TableChart',
129
- 'TableHeader',
130
- 'TableRow',
131
- 'TimelineChart',
132
- 'TimelineSerie',
133
- 'TimelineSerieItem',
134
124
  'Checkpoint',
125
+ 'CheckpointOperationMode',
126
+ 'CheckpointRef',
127
+ 'ColumnChart',
128
+ 'CommandSeriesTicket',
129
+ 'CommandSeriesTicketStatus',
135
130
  'Comment',
136
131
  'CustomField',
137
132
  'CustomReportPage',
138
133
  'Device',
134
+ 'DeviceMessage',
139
135
  'Event',
136
+ 'ExchangeService',
137
+ 'Function',
140
138
  'Geofence',
139
+ 'GeofenceCategory',
140
+ 'HTMLChart',
141
+ 'HttpRequestType',
141
142
  'LastMessage',
143
+ 'LineChart',
144
+ 'MapCenterType',
145
+ 'MapChart',
146
+ 'MapPoint',
142
147
  'Message',
148
+ 'ModbusConfig',
149
+ 'ModbusParameter',
150
+ 'ModbusSchema',
151
+ 'ModbusStatus',
152
+ 'ModbusWait',
153
+ 'NumberChart',
154
+ 'Operation',
155
+ 'OperationCaseCommentPayload',
156
+ 'OperationCasePayload',
157
+ 'OperationPayload',
158
+ 'OperationType',
143
159
  'OutboundService',
160
+ 'PieChart',
161
+ 'Platform',
144
162
  'Position',
145
163
  'PresenceType',
164
+ 'Preset',
165
+ 'RadarChart',
166
+ 'RadialBarChart',
146
167
  'Report',
147
168
  'ReportCol',
148
169
  'ReportConfiguration',
@@ -151,47 +172,29 @@ __all__ = [
151
172
  'ReportHeader',
152
173
  'ReportPage',
153
174
  'ReportRow',
175
+ 'ScatterChart',
176
+ 'ScatterSerie',
177
+ 'ScatterSerieItem',
154
178
  'Sensor',
179
+ 'SoundEffect',
180
+ 'TableChart',
181
+ 'TableHeader',
182
+ 'TableRow',
155
183
  'TextAlignment',
184
+ 'TimelineChart',
185
+ 'TimelineSerie',
186
+ 'TimelineSerieItem',
187
+ 'Timezone',
156
188
  'Trigger',
157
- 'User',
158
- 'Waypoint',
159
- 'ModbusConfig',
160
- 'ModbusParameter',
161
- 'ModbusSchema',
162
- 'ModbusStatus',
163
- 'ModbusWait',
164
- 'AssetMessage',
165
- 'DeviceMessage',
166
- 'AssetConstants',
167
- 'Function',
168
- 'TriggerKind',
169
- 'TriggerGeofenceKind',
170
189
  'TriggerCaseKind',
171
190
  'TriggerCommentPattern',
172
- 'Weekday',
173
- 'AtsReception',
174
- 'Action',
175
- 'ActionKind',
176
- 'ActionSubKind',
177
- 'GeofenceCategory',
178
- 'ActionGeofenceOwnership',
179
- 'SoundEffect',
180
- 'OperationType',
181
- 'Operation',
191
+ 'TriggerGeofenceKind',
192
+ 'TriggerKind',
193
+ 'TwilioHostPhone',
182
194
  'TwilioNotificationType',
183
- 'HttpRequestType',
184
- 'Platform',
185
- 'Timezone',
186
- 'OperationCasePayload',
187
- 'OperationCaseCommentPayload',
188
- 'OperationPayload',
189
- 'ExchangeService',
190
- 'CommandSeriesTicket',
191
- 'CommandSeriesTicketStatus',
192
- 'Preset',
193
- 'CheckpointOperationMode',
194
- 'CheckpointRef',
195
+ 'User',
196
+ 'Waypoint',
195
197
  'WaypointKind',
196
198
  'WaypointRef',
199
+ 'Weekday',
197
200
  ]
@@ -10,6 +10,7 @@ if sys.version_info >= (3, 11):
10
10
  else:
11
11
  from typing_extensions import Self
12
12
 
13
+ from .asset_contact import AssetContact
13
14
  from .asset_operation_mode import AssetOperationMode
14
15
  from .custom_field import CustomField
15
16
  from .device import Device
@@ -75,7 +76,7 @@ class Asset(BaseModel):
75
76
 
76
77
  return None
77
78
 
78
- contacts: list[str] = Field(
79
+ contacts: list[AssetContact] = Field(
79
80
  default_factory=list,
80
81
  description='Defines the list of contacts of the asset, used for notifications',
81
82
  )
@@ -0,0 +1,11 @@
1
+ """Asset contact information"""
2
+
3
+ from pydantic import BaseModel, Field
4
+
5
+
6
+ class AssetContact(BaseModel):
7
+ """Asset contact information"""
8
+
9
+ name: str = Field(default='', description='Name of the contact person for the asset')
10
+ phone: str = Field(default='', description='Phone number of the contact person for the asset')
11
+ email: str = Field(default='', description='Email address of the contact person for the asset')
@@ -1,8 +1,14 @@
1
1
  """Operation Payload entity"""
2
2
 
3
+ import sys
3
4
  from datetime import datetime, timedelta
4
5
  from typing import Any
5
6
 
7
+ if sys.version_info >= (3, 11):
8
+ from typing import Self
9
+ else:
10
+ from typing_extensions import Self
11
+
6
12
  from pydantic import BaseModel, Field, field_validator
7
13
 
8
14
  from layrz_sdk.entities.asset import Asset
@@ -18,6 +24,27 @@ from layrz_sdk.entities.sound_effect import SoundEffect
18
24
  from layrz_sdk.entities.trigger import Trigger
19
25
 
20
26
 
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
+
21
48
  class OperationPayload(BaseModel):
22
49
  """Operation Payload entity"""
23
50
 
@@ -203,7 +230,7 @@ class OperationPayload(BaseModel):
203
230
  description='Defines the destination phone numbers for Twilio notifications',
204
231
  )
205
232
 
206
- twilio_host_phone: str | None = Field(
233
+ twilio_host_phone: TwilioHostPhone | None = Field(
207
234
  default=None,
208
235
  description='Defines the host phone number for Twilio notifications',
209
236
  alias='hostPhone',
@@ -27,11 +27,12 @@ class Waypoint(BaseModel):
27
27
  """Waypoint entity definition"""
28
28
 
29
29
  pk: int = Field(description='Waypoint ID')
30
- geofence: Geofence = Field(description='Geofence object')
31
- start_at: datetime = Field(description='Waypoint start date')
32
- end_at: datetime = Field(description='Waypoint end date')
33
- sequence_real: int = Field(description='Real sequence number')
34
- sequence_ideal: int = Field(description='Ideal sequence number')
30
+ geofence: Geofence | None = Field(default=None, description='Geofence object')
31
+ geofence_id: int | None = Field(default=None, description='Geofence ID')
32
+ start_at: datetime | None = Field(default=None, description='Waypoint start date')
33
+ end_at: datetime | None = Field(default=None, description='Waypoint end date')
34
+ sequence_real: int = Field(..., description='Real sequence number')
35
+ sequence_ideal: int = Field(..., description='Ideal sequence number')
35
36
 
36
37
 
37
38
  class WaypointRef(BaseModel):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: layrz-sdk
3
- Version: 3.1.44
3
+ Version: 3.1.46
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,13 +2,14 @@ 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=7NvPkpA0PdO3X8p70AXz0g3f1kRSRJMDi8i6JSxA0zQ,5683
5
+ layrz_sdk/entities/__init__.py,sha256=LBHHRML6XLUofjamv_HcYIMLinO6sFdNyd4kLBH-Z-s,5779
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
9
9
  layrz_sdk/entities/action_subkind.py,sha256=7aL8j_JrIN4TcXdcPu25wxZJIHZmEa5NrGIm21PJp1A,723
10
- layrz_sdk/entities/asset.py,sha256=0m0v46zeVO2tchFk4BAzjz4bE2LgPlZJ589aA7xZNl8,2813
10
+ layrz_sdk/entities/asset.py,sha256=b8dCfQRsZsze-7X8Ydwi_lhBh7VEPx-KHalYSofUC40,2862
11
11
  layrz_sdk/entities/asset_constants.py,sha256=dqBK9mq6N-WJLd-RQ7rgDSmcBchR1hYjhOKwd3O7PqQ,600
12
+ layrz_sdk/entities/asset_contact.py,sha256=ptxItpob4VdQeM6qMUtSZgZxBw5DfKp3kVfBVlXpujo,422
12
13
  layrz_sdk/entities/asset_operation_mode.py,sha256=1RLRpbUm6jwxivdKbB2O6wdnrhyqaccQ_moA-wrnzdQ,639
13
14
  layrz_sdk/entities/ats_reception.py,sha256=yog5b5vvWKOHj67YMamJ_m7zodLcrYSSEwdXxtaLDCk,596
14
15
  layrz_sdk/entities/case.py,sha256=0dSfZCezDuEEED42rws-zntqa_Em9oFevlXSPrIeIC8,1877
@@ -30,7 +31,7 @@ layrz_sdk/entities/message.py,sha256=eFID7CEBnwp6-MsfhK09JPSJzp7iRbQibJOe_ELgQ9A
30
31
  layrz_sdk/entities/notification_type.py,sha256=yfuQhiIDaOfWCc8p9fZp8umaOU4ELdGrA_b5MWYHA5U,757
31
32
  layrz_sdk/entities/operation.py,sha256=xXD_-dqLW5c6J3aRMRxJh9tebaDKl7WPOoq0Q-chyjA,4887
32
33
  layrz_sdk/entities/operation_case_payload.py,sha256=ZOimwmt3fRz01U5Mz0KqeKbS9AGdIDJvZBhPI3c50xQ,2657
33
- layrz_sdk/entities/operation_payload.py,sha256=p_Zqb-pcYbt4DvmAGWphdxM74k8XQIh7CKiS1xBX_nI,8150
34
+ layrz_sdk/entities/operation_payload.py,sha256=gklGruSQ2NNGu1g5f58moSIkZGQj7dTGjIGOmSz8lOQ,8774
34
35
  layrz_sdk/entities/operation_type.py,sha256=I7wzqvc-JlqmPxYbigAV32Sb5IXFeZ65Z156imC-MXk,1027
35
36
  layrz_sdk/entities/outbound_service.py,sha256=AUivyq_AuA1ZPBOYOfRoQsGrMCYNLGiHX1QycDFn230,651
36
37
  layrz_sdk/entities/platform.py,sha256=4nEXvBorqH2LndQ6iYBmvdqAL-ELGTftEzvIsjej0p0,714
@@ -54,7 +55,7 @@ layrz_sdk/entities/timezone.py,sha256=VhS3o9miktQmThz22KJfatjvqzSONHy73_eBUtjI8i
54
55
  layrz_sdk/entities/trigger.py,sha256=patZ_GE6GAlqfJJ33ddt_bLKtBNeD-5CQ4Jp2dPB9OY,3658
55
56
  layrz_sdk/entities/trigger_kind.py,sha256=Sk7iNndnMSMgjGR_2ouB1eLNPTH7WyPszQofbY0J-I8,1783
56
57
  layrz_sdk/entities/user.py,sha256=S2mJoW44xbBe-O3I_ajy5l4V9-azVLUfKvcfsuqfodQ,236
57
- layrz_sdk/entities/waypoint.py,sha256=FIh4OHojuQhMJxnVP_aKUr4fLgf5TPmVpndvIG9jhys,1497
58
+ layrz_sdk/entities/waypoint.py,sha256=cwVOP9dmkLnkWSxMWMu7Qm28HfDKWF5P1hpkY9zS7z0,1645
58
59
  layrz_sdk/entities/weekday.py,sha256=5y5BTMVvxi1ujUa5e1iRb8cpxzTQIBTvzmzfiPC8poI,506
59
60
  layrz_sdk/entities/broadcast/__init__.py,sha256=Q1fIeDj1oAL63Q0JDddkW_FuP826-Im6ScwUUwAZIOM,372
60
61
  layrz_sdk/entities/broadcast/payload.py,sha256=ugD5m3zVFZVDfBMkR2WlZTWunn9gZSQ1Ej8YXbeA8Wk,1417
@@ -104,8 +105,8 @@ layrz_sdk/helpers/__init__.py,sha256=5iW3z2m3jrYhvTfxX-p-QTkR9X9oTKfEsbtVOg9jFFY
104
105
  layrz_sdk/helpers/color.py,sha256=dlpMafbM-4Wd9D9hMbbnZJf4ALkpie_ZmBR2Vz_YCmM,1203
105
106
  layrz_sdk/lcl/__init__.py,sha256=U967AWANkL3u_YVxMNAYlh8jkZ6hqHfStacz7yz6sOA,89
106
107
  layrz_sdk/lcl/core.py,sha256=T80A3hL7SeqRNSfl5SrPAgwIEf-enoAVv9ldwJNzqsA,24786
107
- layrz_sdk-3.1.44.dist-info/licenses/LICENSE,sha256=d5ZrU--lIPER7QByXDKcrtOTOMk1JvN_9FdYDuoWi7Y,1057
108
- layrz_sdk-3.1.44.dist-info/METADATA,sha256=eBhfgT-C2sXwXUQJfMfdM85aKSCmUXkJ2TLKepzQDzM,2109
109
- layrz_sdk-3.1.44.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
110
- layrz_sdk-3.1.44.dist-info/top_level.txt,sha256=yUTMMzfdZ0HDWQH5TaSlFM4xtwmP1fSGxmlL1dmu4l4,10
111
- layrz_sdk-3.1.44.dist-info/RECORD,,
108
+ layrz_sdk-3.1.46.dist-info/licenses/LICENSE,sha256=d5ZrU--lIPER7QByXDKcrtOTOMk1JvN_9FdYDuoWi7Y,1057
109
+ layrz_sdk-3.1.46.dist-info/METADATA,sha256=Bp3RQGpVYvjGffhalb9E35nMJMfITdpi80k7zMS4qsU,2109
110
+ layrz_sdk-3.1.46.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
111
+ layrz_sdk-3.1.46.dist-info/top_level.txt,sha256=yUTMMzfdZ0HDWQH5TaSlFM4xtwmP1fSGxmlL1dmu4l4,10
112
+ layrz_sdk-3.1.46.dist-info/RECORD,,