hatchet-sdk 1.20.0__py3-none-any.whl → 1.20.2__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 hatchet-sdk might be problematic. Click here for more details.
- hatchet_sdk/clients/rest/__init__.py +11 -3
- hatchet_sdk/clients/rest/api/task_api.py +27 -0
- hatchet_sdk/clients/rest/api/tenant_api.py +345 -0
- hatchet_sdk/clients/rest/api/user_api.py +9 -0
- hatchet_sdk/clients/rest/api/webhook_api.py +323 -8
- hatchet_sdk/clients/rest/api/workflow_api.py +327 -0
- hatchet_sdk/clients/rest/api/workflow_runs_api.py +408 -0
- hatchet_sdk/clients/rest/configuration.py +8 -0
- hatchet_sdk/clients/rest/models/__init__.py +11 -3
- hatchet_sdk/clients/rest/models/create_tenant_request.py +19 -1
- hatchet_sdk/clients/rest/models/registered_workflow.py +86 -0
- hatchet_sdk/clients/rest/models/tenant.py +6 -0
- hatchet_sdk/clients/rest/models/tenant_environment.py +38 -0
- hatchet_sdk/clients/rest/models/update_cron_workflow_trigger_request.py +83 -0
- hatchet_sdk/clients/rest/models/update_tenant_member_request.py +85 -0
- hatchet_sdk/clients/rest/models/v1_filter.py +8 -1
- hatchet_sdk/clients/rest/models/v1_update_webhook_request.py +86 -0
- hatchet_sdk/clients/rest/models/v1_webhook_source_name.py +2 -0
- hatchet_sdk/clients/rest/models/worker.py +22 -0
- hatchet_sdk/features/runs.py +224 -0
- hatchet_sdk/utils/iterables.py +9 -0
- {hatchet_sdk-1.20.0.dist-info → hatchet_sdk-1.20.2.dist-info}/METADATA +4 -6
- {hatchet_sdk-1.20.0.dist-info → hatchet_sdk-1.20.2.dist-info}/RECORD +25 -19
- {hatchet_sdk-1.20.0.dist-info → hatchet_sdk-1.20.2.dist-info}/WHEEL +0 -0
- {hatchet_sdk-1.20.0.dist-info → hatchet_sdk-1.20.2.dist-info}/entry_points.txt +0 -0
|
@@ -640,6 +640,414 @@ class WorkflowRunsApi:
|
|
|
640
640
|
_request_auth=_request_auth,
|
|
641
641
|
)
|
|
642
642
|
|
|
643
|
+
@validate_call
|
|
644
|
+
def v1_workflow_run_external_ids_list(
|
|
645
|
+
self,
|
|
646
|
+
tenant: Annotated[
|
|
647
|
+
str,
|
|
648
|
+
Field(
|
|
649
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
650
|
+
),
|
|
651
|
+
],
|
|
652
|
+
since: Annotated[datetime, Field(description="The earliest date to filter by")],
|
|
653
|
+
statuses: Annotated[
|
|
654
|
+
Optional[List[V1TaskStatus]],
|
|
655
|
+
Field(description="A list of statuses to filter by"),
|
|
656
|
+
] = None,
|
|
657
|
+
until: Annotated[
|
|
658
|
+
Optional[datetime], Field(description="The latest date to filter by")
|
|
659
|
+
] = None,
|
|
660
|
+
additional_metadata: Annotated[
|
|
661
|
+
Optional[List[StrictStr]],
|
|
662
|
+
Field(description="Additional metadata k-v pairs to filter by"),
|
|
663
|
+
] = None,
|
|
664
|
+
workflow_ids: Annotated[
|
|
665
|
+
Optional[
|
|
666
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]
|
|
667
|
+
],
|
|
668
|
+
Field(description="The workflow ids to find runs for"),
|
|
669
|
+
] = None,
|
|
670
|
+
_request_timeout: Union[
|
|
671
|
+
None,
|
|
672
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
673
|
+
Tuple[
|
|
674
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
675
|
+
],
|
|
676
|
+
] = None,
|
|
677
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
678
|
+
_content_type: Optional[StrictStr] = None,
|
|
679
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
680
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
681
|
+
) -> List[str]:
|
|
682
|
+
"""List workflow run external ids
|
|
683
|
+
|
|
684
|
+
Lists external ids for workflow runs matching filters
|
|
685
|
+
|
|
686
|
+
:param tenant: The tenant id (required)
|
|
687
|
+
:type tenant: str
|
|
688
|
+
:param since: The earliest date to filter by (required)
|
|
689
|
+
:type since: datetime
|
|
690
|
+
:param statuses: A list of statuses to filter by
|
|
691
|
+
:type statuses: List[V1TaskStatus]
|
|
692
|
+
:param until: The latest date to filter by
|
|
693
|
+
:type until: datetime
|
|
694
|
+
:param additional_metadata: Additional metadata k-v pairs to filter by
|
|
695
|
+
:type additional_metadata: List[str]
|
|
696
|
+
:param workflow_ids: The workflow ids to find runs for
|
|
697
|
+
:type workflow_ids: List[str]
|
|
698
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
699
|
+
number provided, it will be total request
|
|
700
|
+
timeout. It can also be a pair (tuple) of
|
|
701
|
+
(connection, read) timeouts.
|
|
702
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
703
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
704
|
+
request; this effectively ignores the
|
|
705
|
+
authentication in the spec for a single request.
|
|
706
|
+
:type _request_auth: dict, optional
|
|
707
|
+
:param _content_type: force content-type for the request.
|
|
708
|
+
:type _content_type: str, Optional
|
|
709
|
+
:param _headers: set to override the headers for a single
|
|
710
|
+
request; this effectively ignores the headers
|
|
711
|
+
in the spec for a single request.
|
|
712
|
+
:type _headers: dict, optional
|
|
713
|
+
:param _host_index: set to override the host_index for a single
|
|
714
|
+
request; this effectively ignores the host_index
|
|
715
|
+
in the spec for a single request.
|
|
716
|
+
:type _host_index: int, optional
|
|
717
|
+
:return: Returns the result object.
|
|
718
|
+
""" # noqa: E501
|
|
719
|
+
|
|
720
|
+
_param = self._v1_workflow_run_external_ids_list_serialize(
|
|
721
|
+
tenant=tenant,
|
|
722
|
+
since=since,
|
|
723
|
+
statuses=statuses,
|
|
724
|
+
until=until,
|
|
725
|
+
additional_metadata=additional_metadata,
|
|
726
|
+
workflow_ids=workflow_ids,
|
|
727
|
+
_request_auth=_request_auth,
|
|
728
|
+
_content_type=_content_type,
|
|
729
|
+
_headers=_headers,
|
|
730
|
+
_host_index=_host_index,
|
|
731
|
+
)
|
|
732
|
+
|
|
733
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
734
|
+
"200": "List[str]",
|
|
735
|
+
"400": "APIErrors",
|
|
736
|
+
"403": "APIErrors",
|
|
737
|
+
"501": "APIErrors",
|
|
738
|
+
}
|
|
739
|
+
response_data = self.api_client.call_api(
|
|
740
|
+
*_param, _request_timeout=_request_timeout
|
|
741
|
+
)
|
|
742
|
+
response_data.read()
|
|
743
|
+
return self.api_client.response_deserialize(
|
|
744
|
+
response_data=response_data,
|
|
745
|
+
response_types_map=_response_types_map,
|
|
746
|
+
).data
|
|
747
|
+
|
|
748
|
+
@validate_call
|
|
749
|
+
def v1_workflow_run_external_ids_list_with_http_info(
|
|
750
|
+
self,
|
|
751
|
+
tenant: Annotated[
|
|
752
|
+
str,
|
|
753
|
+
Field(
|
|
754
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
755
|
+
),
|
|
756
|
+
],
|
|
757
|
+
since: Annotated[datetime, Field(description="The earliest date to filter by")],
|
|
758
|
+
statuses: Annotated[
|
|
759
|
+
Optional[List[V1TaskStatus]],
|
|
760
|
+
Field(description="A list of statuses to filter by"),
|
|
761
|
+
] = None,
|
|
762
|
+
until: Annotated[
|
|
763
|
+
Optional[datetime], Field(description="The latest date to filter by")
|
|
764
|
+
] = None,
|
|
765
|
+
additional_metadata: Annotated[
|
|
766
|
+
Optional[List[StrictStr]],
|
|
767
|
+
Field(description="Additional metadata k-v pairs to filter by"),
|
|
768
|
+
] = None,
|
|
769
|
+
workflow_ids: Annotated[
|
|
770
|
+
Optional[
|
|
771
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]
|
|
772
|
+
],
|
|
773
|
+
Field(description="The workflow ids to find runs for"),
|
|
774
|
+
] = None,
|
|
775
|
+
_request_timeout: Union[
|
|
776
|
+
None,
|
|
777
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
778
|
+
Tuple[
|
|
779
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
780
|
+
],
|
|
781
|
+
] = None,
|
|
782
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
783
|
+
_content_type: Optional[StrictStr] = None,
|
|
784
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
785
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
786
|
+
) -> ApiResponse[List[str]]:
|
|
787
|
+
"""List workflow run external ids
|
|
788
|
+
|
|
789
|
+
Lists external ids for workflow runs matching filters
|
|
790
|
+
|
|
791
|
+
:param tenant: The tenant id (required)
|
|
792
|
+
:type tenant: str
|
|
793
|
+
:param since: The earliest date to filter by (required)
|
|
794
|
+
:type since: datetime
|
|
795
|
+
:param statuses: A list of statuses to filter by
|
|
796
|
+
:type statuses: List[V1TaskStatus]
|
|
797
|
+
:param until: The latest date to filter by
|
|
798
|
+
:type until: datetime
|
|
799
|
+
:param additional_metadata: Additional metadata k-v pairs to filter by
|
|
800
|
+
:type additional_metadata: List[str]
|
|
801
|
+
:param workflow_ids: The workflow ids to find runs for
|
|
802
|
+
:type workflow_ids: List[str]
|
|
803
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
804
|
+
number provided, it will be total request
|
|
805
|
+
timeout. It can also be a pair (tuple) of
|
|
806
|
+
(connection, read) timeouts.
|
|
807
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
808
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
809
|
+
request; this effectively ignores the
|
|
810
|
+
authentication in the spec for a single request.
|
|
811
|
+
:type _request_auth: dict, optional
|
|
812
|
+
:param _content_type: force content-type for the request.
|
|
813
|
+
:type _content_type: str, Optional
|
|
814
|
+
:param _headers: set to override the headers for a single
|
|
815
|
+
request; this effectively ignores the headers
|
|
816
|
+
in the spec for a single request.
|
|
817
|
+
:type _headers: dict, optional
|
|
818
|
+
:param _host_index: set to override the host_index for a single
|
|
819
|
+
request; this effectively ignores the host_index
|
|
820
|
+
in the spec for a single request.
|
|
821
|
+
:type _host_index: int, optional
|
|
822
|
+
:return: Returns the result object.
|
|
823
|
+
""" # noqa: E501
|
|
824
|
+
|
|
825
|
+
_param = self._v1_workflow_run_external_ids_list_serialize(
|
|
826
|
+
tenant=tenant,
|
|
827
|
+
since=since,
|
|
828
|
+
statuses=statuses,
|
|
829
|
+
until=until,
|
|
830
|
+
additional_metadata=additional_metadata,
|
|
831
|
+
workflow_ids=workflow_ids,
|
|
832
|
+
_request_auth=_request_auth,
|
|
833
|
+
_content_type=_content_type,
|
|
834
|
+
_headers=_headers,
|
|
835
|
+
_host_index=_host_index,
|
|
836
|
+
)
|
|
837
|
+
|
|
838
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
839
|
+
"200": "List[str]",
|
|
840
|
+
"400": "APIErrors",
|
|
841
|
+
"403": "APIErrors",
|
|
842
|
+
"501": "APIErrors",
|
|
843
|
+
}
|
|
844
|
+
response_data = self.api_client.call_api(
|
|
845
|
+
*_param, _request_timeout=_request_timeout
|
|
846
|
+
)
|
|
847
|
+
response_data.read()
|
|
848
|
+
return self.api_client.response_deserialize(
|
|
849
|
+
response_data=response_data,
|
|
850
|
+
response_types_map=_response_types_map,
|
|
851
|
+
)
|
|
852
|
+
|
|
853
|
+
@validate_call
|
|
854
|
+
def v1_workflow_run_external_ids_list_without_preload_content(
|
|
855
|
+
self,
|
|
856
|
+
tenant: Annotated[
|
|
857
|
+
str,
|
|
858
|
+
Field(
|
|
859
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
860
|
+
),
|
|
861
|
+
],
|
|
862
|
+
since: Annotated[datetime, Field(description="The earliest date to filter by")],
|
|
863
|
+
statuses: Annotated[
|
|
864
|
+
Optional[List[V1TaskStatus]],
|
|
865
|
+
Field(description="A list of statuses to filter by"),
|
|
866
|
+
] = None,
|
|
867
|
+
until: Annotated[
|
|
868
|
+
Optional[datetime], Field(description="The latest date to filter by")
|
|
869
|
+
] = None,
|
|
870
|
+
additional_metadata: Annotated[
|
|
871
|
+
Optional[List[StrictStr]],
|
|
872
|
+
Field(description="Additional metadata k-v pairs to filter by"),
|
|
873
|
+
] = None,
|
|
874
|
+
workflow_ids: Annotated[
|
|
875
|
+
Optional[
|
|
876
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]
|
|
877
|
+
],
|
|
878
|
+
Field(description="The workflow ids to find runs for"),
|
|
879
|
+
] = None,
|
|
880
|
+
_request_timeout: Union[
|
|
881
|
+
None,
|
|
882
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
883
|
+
Tuple[
|
|
884
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
885
|
+
],
|
|
886
|
+
] = None,
|
|
887
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
888
|
+
_content_type: Optional[StrictStr] = None,
|
|
889
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
890
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
891
|
+
) -> RESTResponseType:
|
|
892
|
+
"""List workflow run external ids
|
|
893
|
+
|
|
894
|
+
Lists external ids for workflow runs matching filters
|
|
895
|
+
|
|
896
|
+
:param tenant: The tenant id (required)
|
|
897
|
+
:type tenant: str
|
|
898
|
+
:param since: The earliest date to filter by (required)
|
|
899
|
+
:type since: datetime
|
|
900
|
+
:param statuses: A list of statuses to filter by
|
|
901
|
+
:type statuses: List[V1TaskStatus]
|
|
902
|
+
:param until: The latest date to filter by
|
|
903
|
+
:type until: datetime
|
|
904
|
+
:param additional_metadata: Additional metadata k-v pairs to filter by
|
|
905
|
+
:type additional_metadata: List[str]
|
|
906
|
+
:param workflow_ids: The workflow ids to find runs for
|
|
907
|
+
:type workflow_ids: List[str]
|
|
908
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
909
|
+
number provided, it will be total request
|
|
910
|
+
timeout. It can also be a pair (tuple) of
|
|
911
|
+
(connection, read) timeouts.
|
|
912
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
913
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
914
|
+
request; this effectively ignores the
|
|
915
|
+
authentication in the spec for a single request.
|
|
916
|
+
:type _request_auth: dict, optional
|
|
917
|
+
:param _content_type: force content-type for the request.
|
|
918
|
+
:type _content_type: str, Optional
|
|
919
|
+
:param _headers: set to override the headers for a single
|
|
920
|
+
request; this effectively ignores the headers
|
|
921
|
+
in the spec for a single request.
|
|
922
|
+
:type _headers: dict, optional
|
|
923
|
+
:param _host_index: set to override the host_index for a single
|
|
924
|
+
request; this effectively ignores the host_index
|
|
925
|
+
in the spec for a single request.
|
|
926
|
+
:type _host_index: int, optional
|
|
927
|
+
:return: Returns the result object.
|
|
928
|
+
""" # noqa: E501
|
|
929
|
+
|
|
930
|
+
_param = self._v1_workflow_run_external_ids_list_serialize(
|
|
931
|
+
tenant=tenant,
|
|
932
|
+
since=since,
|
|
933
|
+
statuses=statuses,
|
|
934
|
+
until=until,
|
|
935
|
+
additional_metadata=additional_metadata,
|
|
936
|
+
workflow_ids=workflow_ids,
|
|
937
|
+
_request_auth=_request_auth,
|
|
938
|
+
_content_type=_content_type,
|
|
939
|
+
_headers=_headers,
|
|
940
|
+
_host_index=_host_index,
|
|
941
|
+
)
|
|
942
|
+
|
|
943
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
944
|
+
"200": "List[str]",
|
|
945
|
+
"400": "APIErrors",
|
|
946
|
+
"403": "APIErrors",
|
|
947
|
+
"501": "APIErrors",
|
|
948
|
+
}
|
|
949
|
+
response_data = self.api_client.call_api(
|
|
950
|
+
*_param, _request_timeout=_request_timeout
|
|
951
|
+
)
|
|
952
|
+
return response_data.response
|
|
953
|
+
|
|
954
|
+
def _v1_workflow_run_external_ids_list_serialize(
|
|
955
|
+
self,
|
|
956
|
+
tenant,
|
|
957
|
+
since,
|
|
958
|
+
statuses,
|
|
959
|
+
until,
|
|
960
|
+
additional_metadata,
|
|
961
|
+
workflow_ids,
|
|
962
|
+
_request_auth,
|
|
963
|
+
_content_type,
|
|
964
|
+
_headers,
|
|
965
|
+
_host_index,
|
|
966
|
+
) -> RequestSerialized:
|
|
967
|
+
|
|
968
|
+
_host = None
|
|
969
|
+
|
|
970
|
+
_collection_formats: Dict[str, str] = {
|
|
971
|
+
"statuses": "multi",
|
|
972
|
+
"additional_metadata": "multi",
|
|
973
|
+
"workflow_ids": "multi",
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
_path_params: Dict[str, str] = {}
|
|
977
|
+
_query_params: List[Tuple[str, str]] = []
|
|
978
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
979
|
+
_form_params: List[Tuple[str, str]] = []
|
|
980
|
+
_files: Dict[
|
|
981
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
982
|
+
] = {}
|
|
983
|
+
_body_params: Optional[bytes] = None
|
|
984
|
+
|
|
985
|
+
# process the path parameters
|
|
986
|
+
if tenant is not None:
|
|
987
|
+
_path_params["tenant"] = tenant
|
|
988
|
+
# process the query parameters
|
|
989
|
+
if statuses is not None:
|
|
990
|
+
|
|
991
|
+
_query_params.append(("statuses", statuses))
|
|
992
|
+
|
|
993
|
+
if since is not None:
|
|
994
|
+
if isinstance(since, datetime):
|
|
995
|
+
_query_params.append(
|
|
996
|
+
(
|
|
997
|
+
"since",
|
|
998
|
+
since.strftime(self.api_client.configuration.datetime_format),
|
|
999
|
+
)
|
|
1000
|
+
)
|
|
1001
|
+
else:
|
|
1002
|
+
_query_params.append(("since", since))
|
|
1003
|
+
|
|
1004
|
+
if until is not None:
|
|
1005
|
+
if isinstance(until, datetime):
|
|
1006
|
+
_query_params.append(
|
|
1007
|
+
(
|
|
1008
|
+
"until",
|
|
1009
|
+
until.strftime(self.api_client.configuration.datetime_format),
|
|
1010
|
+
)
|
|
1011
|
+
)
|
|
1012
|
+
else:
|
|
1013
|
+
_query_params.append(("until", until))
|
|
1014
|
+
|
|
1015
|
+
if additional_metadata is not None:
|
|
1016
|
+
|
|
1017
|
+
_query_params.append(("additional_metadata", additional_metadata))
|
|
1018
|
+
|
|
1019
|
+
if workflow_ids is not None:
|
|
1020
|
+
|
|
1021
|
+
_query_params.append(("workflow_ids", workflow_ids))
|
|
1022
|
+
|
|
1023
|
+
# process the header parameters
|
|
1024
|
+
# process the form parameters
|
|
1025
|
+
# process the body parameter
|
|
1026
|
+
|
|
1027
|
+
# set the HTTP header `Accept`
|
|
1028
|
+
if "Accept" not in _header_params:
|
|
1029
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1030
|
+
["application/json"]
|
|
1031
|
+
)
|
|
1032
|
+
|
|
1033
|
+
# authentication setting
|
|
1034
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
1035
|
+
|
|
1036
|
+
return self.api_client.param_serialize(
|
|
1037
|
+
method="GET",
|
|
1038
|
+
resource_path="/api/v1/stable/tenants/{tenant}/workflow-runs/external-ids",
|
|
1039
|
+
path_params=_path_params,
|
|
1040
|
+
query_params=_query_params,
|
|
1041
|
+
header_params=_header_params,
|
|
1042
|
+
body=_body_params,
|
|
1043
|
+
post_params=_form_params,
|
|
1044
|
+
files=_files,
|
|
1045
|
+
auth_settings=_auth_settings,
|
|
1046
|
+
collection_formats=_collection_formats,
|
|
1047
|
+
_host=_host,
|
|
1048
|
+
_request_auth=_request_auth,
|
|
1049
|
+
)
|
|
1050
|
+
|
|
643
1051
|
@validate_call
|
|
644
1052
|
def v1_workflow_run_get(
|
|
645
1053
|
self,
|
|
@@ -121,6 +121,7 @@ AuthSettings = TypedDict(
|
|
|
121
121
|
{
|
|
122
122
|
"bearerAuth": BearerAuthSetting,
|
|
123
123
|
"cookieAuth": APIKeyAuthSetting,
|
|
124
|
+
"customAuth": BearerAuthSetting,
|
|
124
125
|
},
|
|
125
126
|
total=False,
|
|
126
127
|
)
|
|
@@ -537,6 +538,13 @@ class Configuration:
|
|
|
537
538
|
"cookieAuth",
|
|
538
539
|
),
|
|
539
540
|
}
|
|
541
|
+
if self.access_token is not None:
|
|
542
|
+
auth["customAuth"] = {
|
|
543
|
+
"type": "bearer",
|
|
544
|
+
"in": "header",
|
|
545
|
+
"key": "Authorization",
|
|
546
|
+
"value": "Bearer " + self.access_token,
|
|
547
|
+
}
|
|
540
548
|
return auth
|
|
541
549
|
|
|
542
550
|
def to_debug_report(self) -> str:
|
|
@@ -112,6 +112,7 @@ from hatchet_sdk.clients.rest.models.rate_limit_order_by_field import (
|
|
|
112
112
|
RateLimitOrderByField,
|
|
113
113
|
)
|
|
114
114
|
from hatchet_sdk.clients.rest.models.recent_step_runs import RecentStepRuns
|
|
115
|
+
from hatchet_sdk.clients.rest.models.registered_workflow import RegisteredWorkflow
|
|
115
116
|
from hatchet_sdk.clients.rest.models.reject_invite_request import RejectInviteRequest
|
|
116
117
|
from hatchet_sdk.clients.rest.models.replay_event_request import ReplayEventRequest
|
|
117
118
|
from hatchet_sdk.clients.rest.models.replay_workflow_runs_request import (
|
|
@@ -158,6 +159,7 @@ from hatchet_sdk.clients.rest.models.tenant_alert_email_group_list import (
|
|
|
158
159
|
from hatchet_sdk.clients.rest.models.tenant_alerting_settings import (
|
|
159
160
|
TenantAlertingSettings,
|
|
160
161
|
)
|
|
162
|
+
from hatchet_sdk.clients.rest.models.tenant_environment import TenantEnvironment
|
|
161
163
|
from hatchet_sdk.clients.rest.models.tenant_invite import TenantInvite
|
|
162
164
|
from hatchet_sdk.clients.rest.models.tenant_invite_list import TenantInviteList
|
|
163
165
|
from hatchet_sdk.clients.rest.models.tenant_list import TenantList
|
|
@@ -176,12 +178,18 @@ from hatchet_sdk.clients.rest.models.tenant_version import TenantVersion
|
|
|
176
178
|
from hatchet_sdk.clients.rest.models.trigger_workflow_run_request import (
|
|
177
179
|
TriggerWorkflowRunRequest,
|
|
178
180
|
)
|
|
181
|
+
from hatchet_sdk.clients.rest.models.update_cron_workflow_trigger_request import (
|
|
182
|
+
UpdateCronWorkflowTriggerRequest,
|
|
183
|
+
)
|
|
179
184
|
from hatchet_sdk.clients.rest.models.update_tenant_alert_email_group_request import (
|
|
180
185
|
UpdateTenantAlertEmailGroupRequest,
|
|
181
186
|
)
|
|
182
187
|
from hatchet_sdk.clients.rest.models.update_tenant_invite_request import (
|
|
183
188
|
UpdateTenantInviteRequest,
|
|
184
189
|
)
|
|
190
|
+
from hatchet_sdk.clients.rest.models.update_tenant_member_request import (
|
|
191
|
+
UpdateTenantMemberRequest,
|
|
192
|
+
)
|
|
185
193
|
from hatchet_sdk.clients.rest.models.update_tenant_request import UpdateTenantRequest
|
|
186
194
|
from hatchet_sdk.clients.rest.models.update_worker_request import UpdateWorkerRequest
|
|
187
195
|
from hatchet_sdk.clients.rest.models.user import User
|
|
@@ -252,6 +260,9 @@ from hatchet_sdk.clients.rest.models.v1_trigger_workflow_run_request import (
|
|
|
252
260
|
from hatchet_sdk.clients.rest.models.v1_update_filter_request import (
|
|
253
261
|
V1UpdateFilterRequest,
|
|
254
262
|
)
|
|
263
|
+
from hatchet_sdk.clients.rest.models.v1_update_webhook_request import (
|
|
264
|
+
V1UpdateWebhookRequest,
|
|
265
|
+
)
|
|
255
266
|
from hatchet_sdk.clients.rest.models.v1_webhook import V1Webhook
|
|
256
267
|
from hatchet_sdk.clients.rest.models.v1_webhook_api_key_auth import V1WebhookAPIKeyAuth
|
|
257
268
|
from hatchet_sdk.clients.rest.models.v1_webhook_auth_type import V1WebhookAuthType
|
|
@@ -264,9 +275,6 @@ from hatchet_sdk.clients.rest.models.v1_webhook_hmac_encoding import (
|
|
|
264
275
|
V1WebhookHMACEncoding,
|
|
265
276
|
)
|
|
266
277
|
from hatchet_sdk.clients.rest.models.v1_webhook_list import V1WebhookList
|
|
267
|
-
from hatchet_sdk.clients.rest.models.v1_webhook_receive200_response import (
|
|
268
|
-
V1WebhookReceive200Response,
|
|
269
|
-
)
|
|
270
278
|
from hatchet_sdk.clients.rest.models.v1_webhook_source_name import V1WebhookSourceName
|
|
271
279
|
from hatchet_sdk.clients.rest.models.v1_workflow_run import V1WorkflowRun
|
|
272
280
|
from hatchet_sdk.clients.rest.models.v1_workflow_run_details import V1WorkflowRunDetails
|
|
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
|
22
22
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
+
from hatchet_sdk.clients.rest.models.tenant_environment import TenantEnvironment
|
|
25
26
|
from hatchet_sdk.clients.rest.models.tenant_ui_version import TenantUIVersion
|
|
26
27
|
from hatchet_sdk.clients.rest.models.tenant_version import TenantVersion
|
|
27
28
|
|
|
@@ -43,7 +44,22 @@ class CreateTenantRequest(BaseModel):
|
|
|
43
44
|
description="The engine version of the tenant. Defaults to V0.",
|
|
44
45
|
alias="engineVersion",
|
|
45
46
|
)
|
|
46
|
-
|
|
47
|
+
environment: Optional[TenantEnvironment] = Field(
|
|
48
|
+
default=None, description="The environment type of the tenant."
|
|
49
|
+
)
|
|
50
|
+
onboarding_data: Optional[Dict[str, Any]] = Field(
|
|
51
|
+
default=None,
|
|
52
|
+
description="Additional onboarding data to store with the tenant.",
|
|
53
|
+
alias="onboardingData",
|
|
54
|
+
)
|
|
55
|
+
__properties: ClassVar[List[str]] = [
|
|
56
|
+
"name",
|
|
57
|
+
"slug",
|
|
58
|
+
"uiVersion",
|
|
59
|
+
"engineVersion",
|
|
60
|
+
"environment",
|
|
61
|
+
"onboardingData",
|
|
62
|
+
]
|
|
47
63
|
|
|
48
64
|
model_config = ConfigDict(
|
|
49
65
|
populate_by_name=True,
|
|
@@ -99,6 +115,8 @@ class CreateTenantRequest(BaseModel):
|
|
|
99
115
|
"slug": obj.get("slug"),
|
|
100
116
|
"uiVersion": obj.get("uiVersion"),
|
|
101
117
|
"engineVersion": obj.get("engineVersion"),
|
|
118
|
+
"environment": obj.get("environment"),
|
|
119
|
+
"onboardingData": obj.get("onboardingData"),
|
|
102
120
|
}
|
|
103
121
|
)
|
|
104
122
|
return _obj
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hatchet API
|
|
5
|
+
|
|
6
|
+
The Hatchet API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
21
|
+
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class RegisteredWorkflow(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
RegisteredWorkflow
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
|
|
31
|
+
id: StrictStr = Field(description="The workflow id registered on this worker.")
|
|
32
|
+
name: StrictStr = Field(
|
|
33
|
+
description="The name of the workflow registered on this worker."
|
|
34
|
+
)
|
|
35
|
+
__properties: ClassVar[List[str]] = ["id", "name"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of RegisteredWorkflow from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of RegisteredWorkflow from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name")})
|
|
86
|
+
return _obj
|
|
@@ -23,6 +23,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
25
|
from hatchet_sdk.clients.rest.models.api_resource_meta import APIResourceMeta
|
|
26
|
+
from hatchet_sdk.clients.rest.models.tenant_environment import TenantEnvironment
|
|
26
27
|
from hatchet_sdk.clients.rest.models.tenant_ui_version import TenantUIVersion
|
|
27
28
|
from hatchet_sdk.clients.rest.models.tenant_version import TenantVersion
|
|
28
29
|
|
|
@@ -49,6 +50,9 @@ class Tenant(BaseModel):
|
|
|
49
50
|
ui_version: Optional[TenantUIVersion] = Field(
|
|
50
51
|
default=None, description="The UI of the tenant.", alias="uiVersion"
|
|
51
52
|
)
|
|
53
|
+
environment: Optional[TenantEnvironment] = Field(
|
|
54
|
+
default=None, description="The environment type of the tenant."
|
|
55
|
+
)
|
|
52
56
|
__properties: ClassVar[List[str]] = [
|
|
53
57
|
"metadata",
|
|
54
58
|
"name",
|
|
@@ -57,6 +61,7 @@ class Tenant(BaseModel):
|
|
|
57
61
|
"alertMemberEmails",
|
|
58
62
|
"version",
|
|
59
63
|
"uiVersion",
|
|
64
|
+
"environment",
|
|
60
65
|
]
|
|
61
66
|
|
|
62
67
|
model_config = ConfigDict(
|
|
@@ -123,6 +128,7 @@ class Tenant(BaseModel):
|
|
|
123
128
|
"alertMemberEmails": obj.get("alertMemberEmails"),
|
|
124
129
|
"version": obj.get("version"),
|
|
125
130
|
"uiVersion": obj.get("uiVersion"),
|
|
131
|
+
"environment": obj.get("environment"),
|
|
126
132
|
}
|
|
127
133
|
)
|
|
128
134
|
return _obj
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hatchet API
|
|
5
|
+
|
|
6
|
+
The Hatchet API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
from enum import Enum
|
|
19
|
+
|
|
20
|
+
from typing_extensions import Self
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class TenantEnvironment(str, Enum):
|
|
24
|
+
"""
|
|
25
|
+
TenantEnvironment
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
allowed enum values
|
|
30
|
+
"""
|
|
31
|
+
LOCAL = "local"
|
|
32
|
+
DEVELOPMENT = "development"
|
|
33
|
+
PRODUCTION = "production"
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_json(cls, json_str: str) -> Self:
|
|
37
|
+
"""Create an instance of TenantEnvironment from a JSON string"""
|
|
38
|
+
return cls(json.loads(json_str))
|