-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from HealthITAU/0.4.5
- Loading branch information
Showing
2,151 changed files
with
22,213 additions
and
28,399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,3 +201,5 @@ automate_json/automate_tickets.json | |
/automate_json/ | ||
/Out/ | ||
/merged_spec.json | ||
merged_spec1.json | ||
postprocess.py |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
source venv/scripts/activate | ||
|
||
echo Enter JSON path | ||
read jsonPath | ||
echo Enter output filename/directory | ||
read output | ||
|
||
datamodel-codegen --input ${jsonPath} --output ${output} --target-python-version 3.10 --collapse-root-models --reuse-model --output-model-type pydantic_v2.BaseModel --base-class pyconnectwise.models.base.connectwise_model.ConnectWiseModel --use-union-operator --use-field-description --use-default --snake-case-field --disable-timestamp --use-standard-collections --use-schema-description --remove-special-field-name-prefix --capitalise-enum-members --set-default-enum-member --enum-field-as-literal all --use-default-kwarg --field-constraints |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,34 @@ | ||
from typing import Any | ||
|
||
from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint | ||
from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Security import AuthInformation | ||
from pyconnectwise.models.base.message_model import GenericMessageModel | ||
from pyconnectwise.models.automate import AutomateAuthInformation, AutomateTokenResult | ||
from pyconnectwise.responses.paginated_response import PaginatedResponse | ||
|
||
|
||
class ApitokenEndpoint(ConnectWiseEndpoint): | ||
def __init__(self, client, parent_endpoint=None): | ||
super().__init__(client, "Apitoken", parent_endpoint=parent_endpoint) | ||
|
||
def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AuthInformation: | ||
def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AutomateAuthInformation: | ||
""" | ||
Performs a GET request against the /Apitoken endpoint. | ||
Parameters: | ||
data (dict[str, Any]): The data to send in the request body. | ||
params (dict[str, int | str]): The parameters to send in the request query string. | ||
Returns: | ||
AuthInformation: The parsed response data. | ||
AutomateAuthInformation: The parsed response data. | ||
""" | ||
return self._parse_one(AuthInformation, super()._make_request("GET", data=data, params=params).json()) | ||
return self._parse_one(AutomateAuthInformation, super()._make_request("GET", data=data, params=params).json()) | ||
|
||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TokenResult: | ||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AutomateTokenResult: | ||
""" | ||
Performs a POST request against the /Apitoken endpoint. | ||
Parameters: | ||
data (dict[str, Any]): The data to send in the request body. | ||
params (dict[str, int | str]): The parameters to send in the request query string. | ||
Returns: | ||
TokenResult: The parsed response data. | ||
AutomateTokenResult: The parsed response data. | ||
""" | ||
return self._parse_one(TokenResult, super()._make_request("POST", data=data, params=params).json()) | ||
return self._parse_one(AutomateTokenResult, super()._make_request("POST", data=data, params=params).json()) |
1 change: 0 additions & 1 deletion
1
src/pyconnectwise/endpoints/automate/ApprovalpoliciesEndpoint.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
src/pyconnectwise/endpoints/automate/AvtemplatepoliciesEndpoint.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
from typing import Any | ||
|
||
from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint | ||
from pyconnectwise.models.automate.LabTech.Models import AVTemplatePolicy | ||
from pyconnectwise.models.base.message_model import GenericMessageModel | ||
from pyconnectwise.models.automate import LabTechAVTemplatePolicy | ||
from pyconnectwise.responses.paginated_response import PaginatedResponse | ||
|
||
|
||
class AvtemplatepoliciesEndpoint(ConnectWiseEndpoint): | ||
def __init__(self, client, parent_endpoint=None): | ||
super().__init__(client, "Avtemplatepolicies", parent_endpoint=parent_endpoint) | ||
|
||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AVTemplatePolicy: | ||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LabTechAVTemplatePolicy: | ||
""" | ||
Performs a POST request against the /Avtemplatepolicies endpoint. | ||
Parameters: | ||
data (dict[str, Any]): The data to send in the request body. | ||
params (dict[str, int | str]): The parameters to send in the request query string. | ||
Returns: | ||
AVTemplatePolicy: The parsed response data. | ||
LabTechAVTemplatePolicy: The parsed response data. | ||
""" | ||
return self._parse_one(AVTemplatePolicy, super()._make_request("POST", data=data, params=params).json()) | ||
return self._parse_one(LabTechAVTemplatePolicy, super()._make_request("POST", data=data, params=params).json()) |
11 changes: 6 additions & 5 deletions
11
src/pyconnectwise/endpoints/automate/AvtemplatepolicydataEndpoint.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
from typing import Any | ||
|
||
from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint | ||
from pyconnectwise.models.automate.LabTech.Models import AVTemplatePolicyData | ||
from pyconnectwise.models.base.message_model import GenericMessageModel | ||
from pyconnectwise.models.automate import LabTechAVTemplatePolicyData | ||
from pyconnectwise.responses.paginated_response import PaginatedResponse | ||
|
||
|
||
class AvtemplatepolicydataEndpoint(ConnectWiseEndpoint): | ||
def __init__(self, client, parent_endpoint=None): | ||
super().__init__(client, "Avtemplatepolicydata", parent_endpoint=parent_endpoint) | ||
|
||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AVTemplatePolicyData: | ||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LabTechAVTemplatePolicyData: | ||
""" | ||
Performs a POST request against the /Avtemplatepolicydata endpoint. | ||
Parameters: | ||
data (dict[str, Any]): The data to send in the request body. | ||
params (dict[str, int | str]): The parameters to send in the request query string. | ||
Returns: | ||
AVTemplatePolicyData: The parsed response data. | ||
LabTechAVTemplatePolicyData: The parsed response data. | ||
""" | ||
return self._parse_one(AVTemplatePolicyData, super()._make_request("POST", data=data, params=params).json()) | ||
return self._parse_one( | ||
LabTechAVTemplatePolicyData, super()._make_request("POST", data=data, params=params).json() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.