layrz-sdk 3.1.32__py3-none-any.whl → 3.1.34__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 +10 -0
- layrz_sdk/entities/action.py +81 -0
- layrz_sdk/entities/action_geofence_ownership.py +32 -0
- layrz_sdk/entities/action_kind.py +53 -0
- layrz_sdk/entities/action_subkind.py +35 -0
- layrz_sdk/entities/geofence_category.py +47 -0
- layrz_sdk/entities/trigger.py +12 -1
- {layrz_sdk-3.1.32.dist-info → layrz_sdk-3.1.34.dist-info}/METADATA +1 -1
- {layrz_sdk-3.1.32.dist-info → layrz_sdk-3.1.34.dist-info}/RECORD +12 -7
- {layrz_sdk-3.1.32.dist-info → layrz_sdk-3.1.34.dist-info}/WHEEL +0 -0
- {layrz_sdk-3.1.32.dist-info → layrz_sdk-3.1.34.dist-info}/licenses/LICENSE +0 -0
- {layrz_sdk-3.1.32.dist-info → layrz_sdk-3.1.34.dist-info}/top_level.txt +0 -0
layrz_sdk/entities/__init__.py
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"""Init file"""
|
|
2
2
|
|
|
3
|
+
from .action import Action
|
|
4
|
+
from .action_geofence_ownership import ActionGeofenceOwnership
|
|
5
|
+
from .action_kind import ActionKind
|
|
6
|
+
from .action_subkind import ActionSubKind
|
|
3
7
|
from .asset import Asset
|
|
4
8
|
from .asset_constants import AssetConstants
|
|
5
9
|
from .asset_operation_mode import AssetOperationMode
|
|
@@ -51,6 +55,7 @@ from .device import Device
|
|
|
51
55
|
from .event import Event
|
|
52
56
|
from .function import Function
|
|
53
57
|
from .geofence import Geofence
|
|
58
|
+
from .geofence_category import GeofenceCategory
|
|
54
59
|
from .last_message import LastMessage
|
|
55
60
|
from .message import Message
|
|
56
61
|
from .modbus import ModbusConfig, ModbusParameter, ModbusSchema, ModbusStatus, ModbusWait
|
|
@@ -154,4 +159,9 @@ __all__ = [
|
|
|
154
159
|
'TriggerCommentPattern',
|
|
155
160
|
'Weekday',
|
|
156
161
|
'AtsReception',
|
|
162
|
+
'Action',
|
|
163
|
+
'ActionKind',
|
|
164
|
+
'ActionSubKind',
|
|
165
|
+
'GeofenceCategory',
|
|
166
|
+
'ActionGeofenceOwnership',
|
|
157
167
|
]
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""Action entity"""
|
|
2
|
+
|
|
3
|
+
from datetime import timedelta
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, Field
|
|
6
|
+
|
|
7
|
+
from .action_geofence_ownership import ActionGeofenceOwnership
|
|
8
|
+
from .action_kind import ActionKind
|
|
9
|
+
from .action_subkind import ActionSubKind
|
|
10
|
+
from .geofence_category import GeofenceCategory
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Action(BaseModel):
|
|
14
|
+
"""Action entity"""
|
|
15
|
+
|
|
16
|
+
model_config = {
|
|
17
|
+
'json_encoders': {
|
|
18
|
+
timedelta: lambda v: v.total_seconds(),
|
|
19
|
+
ActionKind: lambda v: v.value,
|
|
20
|
+
ActionSubKind: lambda v: v.value,
|
|
21
|
+
GeofenceCategory: lambda v: v.value,
|
|
22
|
+
ActionGeofenceOwnership: lambda v: v.value,
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
pk: int = Field(
|
|
27
|
+
...,
|
|
28
|
+
description='Primary key of the action entity',
|
|
29
|
+
alias='id',
|
|
30
|
+
)
|
|
31
|
+
name: str = Field(
|
|
32
|
+
...,
|
|
33
|
+
description='Name of the action',
|
|
34
|
+
)
|
|
35
|
+
kind: ActionKind = Field(
|
|
36
|
+
...,
|
|
37
|
+
description='Kind of the action',
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
command_id: int | None = Field(
|
|
41
|
+
default=None,
|
|
42
|
+
description='Tag ID associated with the action to send commands to primary devices',
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
subkind: ActionSubKind = Field(
|
|
46
|
+
default=ActionSubKind.UNUSED,
|
|
47
|
+
description='Subkind of the action',
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
wait_for_image: bool = Field(
|
|
51
|
+
default=False,
|
|
52
|
+
description='Whether to wait for an image to be taken before executing the action',
|
|
53
|
+
alias='watch_image',
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
geofence_cateogry: GeofenceCategory = Field(
|
|
57
|
+
default=GeofenceCategory.NONE,
|
|
58
|
+
description='Geofence category of the action',
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
geofence_name_formula: str | None = Field(
|
|
62
|
+
default=None,
|
|
63
|
+
description='Formula to generate the geofence name',
|
|
64
|
+
alias='geofence_name',
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
geofence_radius: float | None = Field(
|
|
68
|
+
default=None,
|
|
69
|
+
description='Radius of the geofence in meters',
|
|
70
|
+
alias='geofence_radius',
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
mappit_route_id: str | None = Field(
|
|
74
|
+
default=None,
|
|
75
|
+
description='Route ID for Mappit integration',
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
new_geofence_ownership: ActionGeofenceOwnership = Field(
|
|
79
|
+
default=ActionGeofenceOwnership.NONE,
|
|
80
|
+
description='Ownership of the new geofence created by the action',
|
|
81
|
+
)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Action geofence ownership"""
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
from enum import Enum
|
|
5
|
+
|
|
6
|
+
if sys.version_info >= (3, 11):
|
|
7
|
+
from typing import Self
|
|
8
|
+
else:
|
|
9
|
+
from typing_extensions import Self
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ActionGeofenceOwnership(str, Enum):
|
|
13
|
+
"""
|
|
14
|
+
Action geofence ownership definition
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
NONE = 'NONE'
|
|
18
|
+
""" Not assigned to any owner (Orphan) """
|
|
19
|
+
|
|
20
|
+
ASSET = 'ASSET'
|
|
21
|
+
""" Assigns the geofence to the owner of the asset """
|
|
22
|
+
|
|
23
|
+
ACTION = 'ACTION'
|
|
24
|
+
""" Assigns the geofence to the owner of the action """
|
|
25
|
+
|
|
26
|
+
def __str__(self: Self) -> str:
|
|
27
|
+
"""Readable property"""
|
|
28
|
+
return self.name
|
|
29
|
+
|
|
30
|
+
def __repr__(self: Self) -> str:
|
|
31
|
+
"""Readable property"""
|
|
32
|
+
return f'ActionGeofenceOwnership.{self.name}'
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Action kind"""
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
from enum import Enum
|
|
5
|
+
|
|
6
|
+
if sys.version_info >= (3, 11):
|
|
7
|
+
from typing import Self
|
|
8
|
+
else:
|
|
9
|
+
from typing_extensions import Self
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ActionKind(str, Enum):
|
|
13
|
+
"""
|
|
14
|
+
Action kind definition
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
LINK = 'LINK'
|
|
18
|
+
""" Links or unkinks an asset or device to the parent asset """
|
|
19
|
+
|
|
20
|
+
PERFORM_OPERATION = 'PERFORMOPERATION'
|
|
21
|
+
""" Performs an operation over the activation """
|
|
22
|
+
|
|
23
|
+
SEND_TO_OUTBOUND = 'SENDTOOMEGA'
|
|
24
|
+
""" Send to Outbound services """
|
|
25
|
+
|
|
26
|
+
PERFORM_COMMAND = 'PERFORMCOMMAND'
|
|
27
|
+
""" Performs a command over the activation """
|
|
28
|
+
|
|
29
|
+
TO_MONITOR_CENTER = 'TOMONITORCENTER'
|
|
30
|
+
""" Sends the activation to the monitor center """
|
|
31
|
+
|
|
32
|
+
TO_CHECKPOINT_ROUTE = 'TOCHECKPOINTROUTE'
|
|
33
|
+
""" Sends the activation to the checkpoint route """
|
|
34
|
+
|
|
35
|
+
CORE_PROCESS = 'COREPROCESS'
|
|
36
|
+
""" Core process of the action """
|
|
37
|
+
|
|
38
|
+
CREATE_GEOFENCE = 'CREATE_GEOFENCE'
|
|
39
|
+
""" Creates a geofence for the action """
|
|
40
|
+
|
|
41
|
+
PURCHASE_ORDER_STATUS = 'PURCHASEORDERSTATUS'
|
|
42
|
+
""" Updates the purchase order status for the action """
|
|
43
|
+
|
|
44
|
+
EXCHANGE = 'EXCHANGE'
|
|
45
|
+
""" Sends the activation to the exchange service """
|
|
46
|
+
|
|
47
|
+
def __str__(self: Self) -> str:
|
|
48
|
+
"""Readable property"""
|
|
49
|
+
return self.name
|
|
50
|
+
|
|
51
|
+
def __repr__(self: Self) -> str:
|
|
52
|
+
"""Readable property"""
|
|
53
|
+
return f'ActionKind.{self.name}'
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Action sub kind"""
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
from enum import Enum
|
|
5
|
+
|
|
6
|
+
if sys.version_info >= (3, 11):
|
|
7
|
+
from typing import Self
|
|
8
|
+
else:
|
|
9
|
+
from typing_extensions import Self
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ActionSubKind(str, Enum):
|
|
13
|
+
"""
|
|
14
|
+
Action sub kind definition
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
UNUSED = 'UNUSED'
|
|
18
|
+
""" Unused action sub kind, not linked to any action kind """
|
|
19
|
+
|
|
20
|
+
LINK = 'LINK'
|
|
21
|
+
""" Link asset or user to the parent asset """
|
|
22
|
+
|
|
23
|
+
UNLINK = 'UNLINK'
|
|
24
|
+
""" Unlink asset or user from the parent asset """
|
|
25
|
+
|
|
26
|
+
BOTH = 'BOTH'
|
|
27
|
+
""" Link and unlink asset or user to the parent asset """
|
|
28
|
+
|
|
29
|
+
def __str__(self: Self) -> str:
|
|
30
|
+
"""Readable property"""
|
|
31
|
+
return self.name
|
|
32
|
+
|
|
33
|
+
def __repr__(self: Self) -> str:
|
|
34
|
+
"""Readable property"""
|
|
35
|
+
return f'ActionSubKind.{self.name}'
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Geofence category"""
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
from enum import Enum
|
|
5
|
+
|
|
6
|
+
if sys.version_info >= (3, 11):
|
|
7
|
+
from typing import Self
|
|
8
|
+
else:
|
|
9
|
+
from typing_extensions import Self
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GeofenceCategory(str, Enum):
|
|
13
|
+
"""
|
|
14
|
+
Geofence category definition
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
NONE = 'NONE'
|
|
18
|
+
""" Classic or uncategorized geofence """
|
|
19
|
+
|
|
20
|
+
CUSTOM = 'CUSTOM'
|
|
21
|
+
""" Geofence with non-standard category """
|
|
22
|
+
|
|
23
|
+
ADMINISTRATIVE = 'ADMINISTRATIVE'
|
|
24
|
+
""" Geofence as administrative area """
|
|
25
|
+
|
|
26
|
+
CUSTOMER = 'CUSTOMER'
|
|
27
|
+
""" Geofence as customer location """
|
|
28
|
+
|
|
29
|
+
PROSPECT = 'PROSPECT'
|
|
30
|
+
""" Similar to customer location but not yet a customer """
|
|
31
|
+
|
|
32
|
+
OTHER = 'OTHER'
|
|
33
|
+
""" Other geofence category """
|
|
34
|
+
|
|
35
|
+
POLYGON = 'POLYGON'
|
|
36
|
+
""" Geofence as search geozone """
|
|
37
|
+
|
|
38
|
+
LEAD = 'LEAD'
|
|
39
|
+
""" Geofence as lead location, not yet a prospect or customer """
|
|
40
|
+
|
|
41
|
+
def __str__(self: Self) -> str:
|
|
42
|
+
"""Readable property"""
|
|
43
|
+
return self.name
|
|
44
|
+
|
|
45
|
+
def __repr__(self: Self) -> str:
|
|
46
|
+
"""Readable property"""
|
|
47
|
+
return f'GeofenceCategory.{self.name}'
|
layrz_sdk/entities/trigger.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Trigger entity"""
|
|
2
2
|
|
|
3
|
-
from datetime import
|
|
3
|
+
from datetime import time, timedelta
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
@@ -12,6 +12,17 @@ from .weekday import Weekday
|
|
|
12
12
|
class Trigger(BaseModel):
|
|
13
13
|
"""Trigger entity"""
|
|
14
14
|
|
|
15
|
+
model_config = {
|
|
16
|
+
'json_encoders': {
|
|
17
|
+
timedelta: lambda v: v.total_seconds(),
|
|
18
|
+
TriggerCaseKind: lambda v: v.value,
|
|
19
|
+
TriggerGeofenceKind: lambda v: v.value,
|
|
20
|
+
TriggerKind: lambda v: v.value,
|
|
21
|
+
TriggerCommentPattern: lambda v: v.value,
|
|
22
|
+
Weekday: lambda v: v.value,
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
15
26
|
pk: int = Field(description='Defines the primary key of the trigger')
|
|
16
27
|
name: str = Field(description='Defines the name of the trigger')
|
|
17
28
|
code: str = Field(description='Defines the code of the trigger')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: layrz-sdk
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.34
|
|
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,11 @@ 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=b5Mo2-NaWDHUhO9vCi2Vv5gIK-JESXVPRKnAdl37ISI,4675
|
|
6
|
+
layrz_sdk/entities/action.py,sha256=6H_HJGYPbgV-7Gq-82rrOgTCo7X3byfhYw3op_1wvOE,2006
|
|
7
|
+
layrz_sdk/entities/action_geofence_ownership.py,sha256=PHu6495IUb9biKLXGEy4ESyrzmpP2AQbJiquYk9Kz7c,678
|
|
8
|
+
layrz_sdk/entities/action_kind.py,sha256=u5CI9y86f6-zHKSf4gRhoqcK5azle1UAHqa8-033x88,1277
|
|
9
|
+
layrz_sdk/entities/action_subkind.py,sha256=7aL8j_JrIN4TcXdcPu25wxZJIHZmEa5NrGIm21PJp1A,723
|
|
6
10
|
layrz_sdk/entities/asset.py,sha256=9dVnNXeBP_CnpXUU2KH7LiQxCWBXZzok13HMkN9diaI,2583
|
|
7
11
|
layrz_sdk/entities/asset_constants.py,sha256=dqBK9mq6N-WJLd-RQ7rgDSmcBchR1hYjhOKwd3O7PqQ,600
|
|
8
12
|
layrz_sdk/entities/asset_operation_mode.py,sha256=1RLRpbUm6jwxivdKbB2O6wdnrhyqaccQ_moA-wrnzdQ,639
|
|
@@ -18,6 +22,7 @@ layrz_sdk/entities/device.py,sha256=rqBJf0L-cIfxE6ONwGHVx_L0StyQL-ycvSVzug4iIwQ,
|
|
|
18
22
|
layrz_sdk/entities/event.py,sha256=IDcPwtKbqvX8S2QQei3yFbA2M8NeSYGFoXo3AaSmdHI,720
|
|
19
23
|
layrz_sdk/entities/function.py,sha256=n1E72233GM7kSZEUVj8e9IiV7XyeirGMlwrqsNf_xAc,865
|
|
20
24
|
layrz_sdk/entities/geofence.py,sha256=jPuG5OCknkM37Q4h5haOXdV4OpVyd4gX77dFjd-FaP4,326
|
|
25
|
+
layrz_sdk/entities/geofence_category.py,sha256=YtUx7z-NmnQhYL8GedQRMR4xsis_BnPNyNR4hq-dJds,988
|
|
21
26
|
layrz_sdk/entities/last_message.py,sha256=QNgF0xCQ6uLFDMmKQCjSRhGS1Bq7akw5pv6ZIiFlwfY,268
|
|
22
27
|
layrz_sdk/entities/message.py,sha256=eFID7CEBnwp6-MsfhK09JPSJzp7iRbQibJOe_ELgQ9A,563
|
|
23
28
|
layrz_sdk/entities/outbound_service.py,sha256=_AzIKB3i86FhpSaxxdMYmCCG8JHtBi2PdzzDzMODerw,225
|
|
@@ -34,7 +39,7 @@ layrz_sdk/entities/report_row.py,sha256=t2Rk7LeforU-sD5abqnTQES2Oac8dmEXMLLo_18x
|
|
|
34
39
|
layrz_sdk/entities/sensor.py,sha256=9Q6RGb9qDvyLS4tELZOZtPlaiWi9An5Vf0gGLGWIRhE,312
|
|
35
40
|
layrz_sdk/entities/static_position.py,sha256=xTbTWRPQLZqTgPQnyIMOoMHiNi42AzmVRfgDMM4m03c,365
|
|
36
41
|
layrz_sdk/entities/text_alignment.py,sha256=YqUqj07c4XzHZLdaqNw1FEUpneWoJU5UU3eicC5-Sps,496
|
|
37
|
-
layrz_sdk/entities/trigger.py,sha256=
|
|
42
|
+
layrz_sdk/entities/trigger.py,sha256=makyynoCZk-Cywv-ZQJfEQct8TP3geKmij8AgT-z_hw,3575
|
|
38
43
|
layrz_sdk/entities/trigger_kind.py,sha256=Sk7iNndnMSMgjGR_2ouB1eLNPTH7WyPszQofbY0J-I8,1783
|
|
39
44
|
layrz_sdk/entities/user.py,sha256=S2mJoW44xbBe-O3I_ajy5l4V9-azVLUfKvcfsuqfodQ,236
|
|
40
45
|
layrz_sdk/entities/waypoint.py,sha256=Wx4uFzKVXKTuSgu8wiDpvqGFtG3c1_owk1-M9APlpj8,550
|
|
@@ -87,8 +92,8 @@ layrz_sdk/helpers/__init__.py,sha256=5iW3z2m3jrYhvTfxX-p-QTkR9X9oTKfEsbtVOg9jFFY
|
|
|
87
92
|
layrz_sdk/helpers/color.py,sha256=dlpMafbM-4Wd9D9hMbbnZJf4ALkpie_ZmBR2Vz_YCmM,1203
|
|
88
93
|
layrz_sdk/lcl/__init__.py,sha256=U967AWANkL3u_YVxMNAYlh8jkZ6hqHfStacz7yz6sOA,89
|
|
89
94
|
layrz_sdk/lcl/core.py,sha256=T80A3hL7SeqRNSfl5SrPAgwIEf-enoAVv9ldwJNzqsA,24786
|
|
90
|
-
layrz_sdk-3.1.
|
|
91
|
-
layrz_sdk-3.1.
|
|
92
|
-
layrz_sdk-3.1.
|
|
93
|
-
layrz_sdk-3.1.
|
|
94
|
-
layrz_sdk-3.1.
|
|
95
|
+
layrz_sdk-3.1.34.dist-info/licenses/LICENSE,sha256=d5ZrU--lIPER7QByXDKcrtOTOMk1JvN_9FdYDuoWi7Y,1057
|
|
96
|
+
layrz_sdk-3.1.34.dist-info/METADATA,sha256=ola_WlxSl-BwL_ZZV0iIdWnjZRQTx6dbnXWRxXcIg60,2109
|
|
97
|
+
layrz_sdk-3.1.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
98
|
+
layrz_sdk-3.1.34.dist-info/top_level.txt,sha256=yUTMMzfdZ0HDWQH5TaSlFM4xtwmP1fSGxmlL1dmu4l4,10
|
|
99
|
+
layrz_sdk-3.1.34.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|