layrz-sdk 3.1.46__py3-none-any.whl → 3.1.48__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.
- layrz_sdk/entities/__init__.py +3 -2
- layrz_sdk/entities/destination_phone.py +29 -0
- layrz_sdk/entities/operation.py +3 -2
- layrz_sdk/entities/operation_payload.py +4 -23
- {layrz_sdk-3.1.46.dist-info → layrz_sdk-3.1.48.dist-info}/METADATA +1 -1
- {layrz_sdk-3.1.46.dist-info → layrz_sdk-3.1.48.dist-info}/RECORD +9 -8
- {layrz_sdk-3.1.46.dist-info → layrz_sdk-3.1.48.dist-info}/WHEEL +0 -0
- {layrz_sdk-3.1.46.dist-info → layrz_sdk-3.1.48.dist-info}/licenses/LICENSE +0 -0
- {layrz_sdk-3.1.46.dist-info → layrz_sdk-3.1.48.dist-info}/top_level.txt +0 -0
layrz_sdk/entities/__init__.py
CHANGED
|
@@ -53,6 +53,7 @@ from .command_series_ticket import CommandSeriesTicket, CommandSeriesTicketStatu
|
|
|
53
53
|
from .comment import Comment
|
|
54
54
|
from .custom_field import CustomField
|
|
55
55
|
from .custom_report_page import CustomReportPage
|
|
56
|
+
from .destination_phone import DestinationPhone
|
|
56
57
|
from .device import Device
|
|
57
58
|
from .event import Event
|
|
58
59
|
from .exchange_service import ExchangeService
|
|
@@ -65,7 +66,7 @@ from .modbus import ModbusConfig, ModbusParameter, ModbusSchema, ModbusStatus, M
|
|
|
65
66
|
from .notification_type import TwilioNotificationType
|
|
66
67
|
from .operation import Operation
|
|
67
68
|
from .operation_case_payload import OperationCaseCommentPayload, OperationCasePayload
|
|
68
|
-
from .operation_payload import OperationPayload
|
|
69
|
+
from .operation_payload import OperationPayload
|
|
69
70
|
from .operation_type import OperationType
|
|
70
71
|
from .outbound_service import OutboundService
|
|
71
72
|
from .platform import Platform
|
|
@@ -190,7 +191,7 @@ __all__ = [
|
|
|
190
191
|
'TriggerCommentPattern',
|
|
191
192
|
'TriggerGeofenceKind',
|
|
192
193
|
'TriggerKind',
|
|
193
|
-
'
|
|
194
|
+
'DestinationPhone',
|
|
194
195
|
'TwilioNotificationType',
|
|
195
196
|
'User',
|
|
196
197
|
'Waypoint',
|
|
@@ -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}'
|
layrz_sdk/entities/operation.py
CHANGED
|
@@ -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:
|
|
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[
|
|
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[
|
|
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:
|
|
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',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: layrz-sdk
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.48
|
|
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=
|
|
5
|
+
layrz_sdk/entities/__init__.py,sha256=wPlm21pNTa8d627SGYku10vo3Lvb7qudzTp3-TsBzhk,5811
|
|
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
|
|
@@ -20,6 +20,7 @@ layrz_sdk/entities/command_series_ticket.py,sha256=Bn1j7q9qsnr-Kq8rvYOtJe8cTRySh
|
|
|
20
20
|
layrz_sdk/entities/comment.py,sha256=1YSWVxXlpoicVVHv3mvkNlfUTfcOMxZYfb4YmwrxchY,414
|
|
21
21
|
layrz_sdk/entities/custom_field.py,sha256=jurONu01Ph-Qq8uuxdzxoQ6i7BqbZe64vO2ESvQDSFg,277
|
|
22
22
|
layrz_sdk/entities/custom_report_page.py,sha256=eqtoFOgip0z4_cMql1tHgaR4JiVEYlfbzd9ZJ7ZLyrM,1231
|
|
23
|
+
layrz_sdk/entities/destination_phone.py,sha256=Wr8p27dyqVfYFKf8-bP6aJVAFwcJ6LvP_0Qp3Ov31A4,645
|
|
23
24
|
layrz_sdk/entities/device.py,sha256=rqBJf0L-cIfxE6ONwGHVx_L0StyQL-ycvSVzug4iIwQ,732
|
|
24
25
|
layrz_sdk/entities/event.py,sha256=IDcPwtKbqvX8S2QQei3yFbA2M8NeSYGFoXo3AaSmdHI,720
|
|
25
26
|
layrz_sdk/entities/exchange_service.py,sha256=DOSffjwxZ7tcRA6nk0QCf-dpO981jqP9FX_wjvviSGI,665
|
|
@@ -29,9 +30,9 @@ layrz_sdk/entities/geofence_category.py,sha256=YtUx7z-NmnQhYL8GedQRMR4xsis_BnPNy
|
|
|
29
30
|
layrz_sdk/entities/last_message.py,sha256=QNgF0xCQ6uLFDMmKQCjSRhGS1Bq7akw5pv6ZIiFlwfY,268
|
|
30
31
|
layrz_sdk/entities/message.py,sha256=eFID7CEBnwp6-MsfhK09JPSJzp7iRbQibJOe_ELgQ9A,563
|
|
31
32
|
layrz_sdk/entities/notification_type.py,sha256=yfuQhiIDaOfWCc8p9fZp8umaOU4ELdGrA_b5MWYHA5U,757
|
|
32
|
-
layrz_sdk/entities/operation.py,sha256=
|
|
33
|
+
layrz_sdk/entities/operation.py,sha256=qTtPyNjpEzdnfxuX88iviyhfHBlMGdFgf9bPSkrKLDA,4961
|
|
33
34
|
layrz_sdk/entities/operation_case_payload.py,sha256=ZOimwmt3fRz01U5Mz0KqeKbS9AGdIDJvZBhPI3c50xQ,2657
|
|
34
|
-
layrz_sdk/entities/operation_payload.py,sha256=
|
|
35
|
+
layrz_sdk/entities/operation_payload.py,sha256=SOkg6xlj70C9iFZmvOchTm0GdZtbwC7-ISv4dHoWmo8,8356
|
|
35
36
|
layrz_sdk/entities/operation_type.py,sha256=I7wzqvc-JlqmPxYbigAV32Sb5IXFeZ65Z156imC-MXk,1027
|
|
36
37
|
layrz_sdk/entities/outbound_service.py,sha256=AUivyq_AuA1ZPBOYOfRoQsGrMCYNLGiHX1QycDFn230,651
|
|
37
38
|
layrz_sdk/entities/platform.py,sha256=4nEXvBorqH2LndQ6iYBmvdqAL-ELGTftEzvIsjej0p0,714
|
|
@@ -105,8 +106,8 @@ layrz_sdk/helpers/__init__.py,sha256=5iW3z2m3jrYhvTfxX-p-QTkR9X9oTKfEsbtVOg9jFFY
|
|
|
105
106
|
layrz_sdk/helpers/color.py,sha256=dlpMafbM-4Wd9D9hMbbnZJf4ALkpie_ZmBR2Vz_YCmM,1203
|
|
106
107
|
layrz_sdk/lcl/__init__.py,sha256=U967AWANkL3u_YVxMNAYlh8jkZ6hqHfStacz7yz6sOA,89
|
|
107
108
|
layrz_sdk/lcl/core.py,sha256=T80A3hL7SeqRNSfl5SrPAgwIEf-enoAVv9ldwJNzqsA,24786
|
|
108
|
-
layrz_sdk-3.1.
|
|
109
|
-
layrz_sdk-3.1.
|
|
110
|
-
layrz_sdk-3.1.
|
|
111
|
-
layrz_sdk-3.1.
|
|
112
|
-
layrz_sdk-3.1.
|
|
109
|
+
layrz_sdk-3.1.48.dist-info/licenses/LICENSE,sha256=d5ZrU--lIPER7QByXDKcrtOTOMk1JvN_9FdYDuoWi7Y,1057
|
|
110
|
+
layrz_sdk-3.1.48.dist-info/METADATA,sha256=egp4v4OSHyMOxYE_THcl-9JV89vNqwGzvEkAoYuIjWU,2109
|
|
111
|
+
layrz_sdk-3.1.48.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
112
|
+
layrz_sdk-3.1.48.dist-info/top_level.txt,sha256=yUTMMzfdZ0HDWQH5TaSlFM4xtwmP1fSGxmlL1dmu4l4,10
|
|
113
|
+
layrz_sdk-3.1.48.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|