Skip to content

Commit

Permalink
🔥 ✨ regen endpoints to support new features
Browse files Browse the repository at this point in the history
No breaking changes.
  • Loading branch information
Yoshify committed Oct 13, 2023
1 parent 40dc9ff commit 37a3bd4
Show file tree
Hide file tree
Showing 1,991 changed files with 6,956 additions and 2,567 deletions.
4 changes: 3 additions & 1 deletion src/pyconnectwise/endpoints/automate/ApitokenEndpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ApitokenEndpoint(
IPostable[AutomateTokenResult, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Apitoken", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Apitoken", parent_endpoint=parent_endpoint)
IGettable.__init__(self, AutomateAuthInformation)
IPostable.__init__(self, AutomateTokenResult)

def get(
self, data: JSON | None = None, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

class ApprovalpoliciesEndpoint(ConnectWiseEndpoint):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Approvalpolicies", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Approvalpolicies", parent_endpoint=parent_endpoint)
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class AvtemplatepoliciesEndpoint(
ConnectWiseEndpoint, IPostable[LabTechAVTemplatePolicy, ConnectWiseAutomateRequestParams]
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Avtemplatepolicies", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Avtemplatepolicies", parent_endpoint=parent_endpoint)
IPostable.__init__(self, LabTechAVTemplatePolicy)

def post(
self, data: JSON | None = None, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class AvtemplatepolicydataEndpoint(
ConnectWiseEndpoint, IPostable[LabTechAVTemplatePolicyData, ConnectWiseAutomateRequestParams]
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Avtemplatepolicydata", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Avtemplatepolicydata", parent_endpoint=parent_endpoint)
IPostable.__init__(self, LabTechAVTemplatePolicyData)

def post(
self, data: JSON | None = None, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
5 changes: 4 additions & 1 deletion src/pyconnectwise/endpoints/automate/ClientsEndpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ class ClientsEndpoint(
IPaginateable[LabTechClient, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Clients", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Clients", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechClient])
IPostable.__init__(self, LabTechClient)
IPaginateable.__init__(self, LabTechClient)

def id(self, id: int) -> ClientsIdEndpoint:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ClientsIdDocumentsEndpoint(
IPaginateable[LabTechDocument, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Documents", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Documents", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechDocument])
IPaginateable.__init__(self, LabTechDocument)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
6 changes: 4 additions & 2 deletions src/pyconnectwise/endpoints/automate/ClientsIdEndpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ class ClientsIdEndpoint(
IPaginateable[LabTechClient, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "{id}", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "{id}", parent_endpoint=parent_endpoint)
IGettable.__init__(self, LabTechClient)
IPaginateable.__init__(self, LabTechClient)

self.permissions = self._register_child_endpoint(ClientsIdPermissionsEndpoint(client, parent_endpoint=self))
self.licenses = self._register_child_endpoint(ClientsIdLicensesEndpoint(client, parent_endpoint=self))
self.documents = self._register_child_endpoint(ClientsIdDocumentsEndpoint(client, parent_endpoint=self))
self.permissions = self._register_child_endpoint(ClientsIdPermissionsEndpoint(client, parent_endpoint=self))
self.productkeys = self._register_child_endpoint(ClientsIdProductkeysEndpoint(client, parent_endpoint=self))

def paginated(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ class ClientsIdLicensesEndpoint(
IPaginateable[LabTechManagedLicense, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Licenses", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Licenses", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechManagedLicense])
IPostable.__init__(self, LabTechManagedLicense)
IPaginateable.__init__(self, LabTechManagedLicense)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class ClientsIdPermissionsEndpoint(ConnectWiseEndpoint):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Permissions", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Permissions", parent_endpoint=parent_endpoint)

def id(self, id: int) -> ClientsIdPermissionsIdEndpoint:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class ClientsIdPermissionsIdEndpoint(ConnectWiseEndpoint):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "{id}", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "{id}", parent_endpoint=parent_endpoint)

def delete(self, data: JSON | None = None, params: ConnectWiseAutomateRequestParams | None = None) -> None:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ class ClientsIdProductkeysEndpoint(
IPaginateable[LabTechProductKey, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Productkeys", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Productkeys", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechProductKey])
IPostable.__init__(self, LabTechProductKey)
IPaginateable.__init__(self, LabTechProductKey)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
4 changes: 3 additions & 1 deletion src/pyconnectwise/endpoints/automate/CommandsEndpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class CommandsEndpoint(
IPaginateable[LabTechCommand, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Commands", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Commands", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechCommand])
IPaginateable.__init__(self, LabTechCommand)

def id(self, id: int) -> CommandsIdEndpoint:
"""
Expand Down
4 changes: 3 additions & 1 deletion src/pyconnectwise/endpoints/automate/CommandsIdEndpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class CommandsIdEndpoint(
IPaginateable[LabTechCommand, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "{id}", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "{id}", parent_endpoint=parent_endpoint)
IGettable.__init__(self, LabTechCommand)
IPaginateable.__init__(self, LabTechCommand)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ class ComputermenusEndpoint(
IPaginateable[LabTechComputerMenu, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Computermenus", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Computermenus", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechComputerMenu])
IPostable.__init__(self, LabTechComputerMenu)
IPaginateable.__init__(self, LabTechComputerMenu)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ComputersChassisEndpoint(
IPaginateable[LabTechComputerChassis, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Chassis", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Chassis", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechComputerChassis])
IPaginateable.__init__(self, LabTechComputerChassis)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ComputersDrivesEndpoint(
IPaginateable[LabTechComputerDrive, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Drives", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Drives", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechComputerDrive])
IPaginateable.__init__(self, LabTechComputerDrive)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
12 changes: 7 additions & 5 deletions src/pyconnectwise/endpoints/automate/ComputersEndpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ class ComputersEndpoint(
IPaginateable[LabTechComputer, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Computers", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Computers", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechComputer])
IPaginateable.__init__(self, LabTechComputer)

self.memoryslots = self._register_child_endpoint(ComputersMemoryslotsEndpoint(client, parent_endpoint=self))
self.software = self._register_child_endpoint(ComputersSoftwareEndpoint(client, parent_endpoint=self))
self.drives = self._register_child_endpoint(ComputersDrivesEndpoint(client, parent_endpoint=self))
self.chassis = self._register_child_endpoint(ComputersChassisEndpoint(client, parent_endpoint=self))
self.maintenancemodes = self._register_child_endpoint(
ComputersMaintenancemodesEndpoint(client, parent_endpoint=self)
)
self.chassis = self._register_child_endpoint(ComputersChassisEndpoint(client, parent_endpoint=self))
self.drives = self._register_child_endpoint(ComputersDrivesEndpoint(client, parent_endpoint=self))
self.software = self._register_child_endpoint(ComputersSoftwareEndpoint(client, parent_endpoint=self))
self.memoryslots = self._register_child_endpoint(ComputersMemoryslotsEndpoint(client, parent_endpoint=self))

def id(self, id: int) -> ComputersIdEndpoint:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

class ComputersIdAlertsEndpoint(ConnectWiseEndpoint):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Alerts", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Alerts", parent_endpoint=parent_endpoint)
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

class ComputersIdAlertsuspensionsEndpoint(ConnectWiseEndpoint):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Alertsuspensions", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Alertsuspensions", parent_endpoint=parent_endpoint)

self.maintenancewindow = self._register_child_endpoint(
ComputersIdAlertsuspensionsMaintenancewindowEndpoint(client, parent_endpoint=self)
)
self.templatediversion = self._register_child_endpoint(
ComputersIdAlertsuspensionsTemplatediversionEndpoint(client, parent_endpoint=self)
)
self.maintenancewindow = self._register_child_endpoint(
ComputersIdAlertsuspensionsMaintenancewindowEndpoint(client, parent_endpoint=self)
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

class ComputersIdAlertsuspensionsMaintenancewindowEndpoint(ConnectWiseEndpoint):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Maintenancewindow", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Maintenancewindow", parent_endpoint=parent_endpoint)
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

class ComputersIdAlertsuspensionsTemplatediversionEndpoint(ConnectWiseEndpoint):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Templatediversion", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Templatediversion", parent_endpoint=parent_endpoint)
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ComputersIdBiosEndpoint(
IPaginateable[LabTechComputerBios, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Bios", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Bios", parent_endpoint=parent_endpoint)
IGettable.__init__(self, LabTechComputerBios)
IPaginateable.__init__(self, LabTechComputerBios)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ class ComputersIdCommandexecuteEndpoint(
IPaginateable[LabTechCommandExecute, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Commandexecute", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Commandexecute", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechCommandExecute])
IPostable.__init__(self, LabTechCommandExecute)
IPaginateable.__init__(self, LabTechCommandExecute)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ComputersIdCommandhistoryEndpoint(
IPaginateable[AutomateCommandHistory, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Commandhistory", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Commandhistory", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[AutomateCommandHistory])
IPaginateable.__init__(self, AutomateCommandHistory)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ComputersIdComputerpatchingpoliciesEndpoint(
IPaginateable[LabTechComputerPatchingPolicy, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Computerpatchingpolicies", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Computerpatchingpolicies", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechComputerPatchingPolicy])
IPaginateable.__init__(self, LabTechComputerPatchingPolicy)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ComputersIdDevicesEndpoint(
IPaginateable[LabTechComputerDevice, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Devices", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Devices", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechComputerDevice])
IPaginateable.__init__(self, LabTechComputerDevice)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ComputersIdDriversEndpoint(
IPaginateable[LabTechComputerDriver, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Drivers", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Drivers", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechComputerDriver])
IPaginateable.__init__(self, LabTechComputerDriver)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class ComputersIdDrivesEndpoint(ConnectWiseEndpoint):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Drives", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Drives", parent_endpoint=parent_endpoint)

def id(self, id: int) -> ComputersIdDrivesIdEndpoint:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class ComputersIdDrivesIdEndpoint(ConnectWiseEndpoint):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "{id}", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "{id}", parent_endpoint=parent_endpoint)

self.smartdata = self._register_child_endpoint(
ComputersIdDrivesIdSmartdataEndpoint(client, parent_endpoint=self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ComputersIdDrivesIdSmartdataEndpoint(
IPaginateable[LabTechSmartData, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Smartdata", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Smartdata", parent_endpoint=parent_endpoint)
IGettable.__init__(self, list[LabTechSmartData])
IPaginateable.__init__(self, LabTechSmartData)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ComputersIdEffectivepatchingpolicyEndpoint(
IPaginateable[LabTechComputerEffectivePatchingPolicy, ConnectWiseAutomateRequestParams],
):
def __init__(self, client, parent_endpoint=None):
super().__init__(client, "Effectivepatchingpolicy", parent_endpoint=parent_endpoint)
ConnectWiseEndpoint.__init__(self, client, "Effectivepatchingpolicy", parent_endpoint=parent_endpoint)
IGettable.__init__(self, LabTechComputerEffectivePatchingPolicy)
IPaginateable.__init__(self, LabTechComputerEffectivePatchingPolicy)

def paginated(
self, page: int, page_size: int, params: ConnectWiseAutomateRequestParams | None = None
Expand Down
Loading

0 comments on commit 37a3bd4

Please sign in to comment.