clerk-sdk 0.5.9__tar.gz → 0.5.10__tar.gz
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.
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/PKG-INFO +1 -1
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/__init__.py +1 -1
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/client.py +0 -72
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/pyproject.toml +1 -1
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/setup.py +1 -1
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/.github/workflows/ci.yaml +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/.github/workflows/pypi_publish.yml +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/.gitignore +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/LICENSE +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/MANIFEST.in +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/README.md +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/base.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/decorator/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/decorator/models.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/decorator/task_decorator.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/cli.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/code_runner.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/gui/graph_checker.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/gui/test_session.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/init_project.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/schema/fetch_schema.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/templates/exceptions.py.template +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/templates/launch.json.template +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/templates/main_basic.py.template +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/templates/main_gui.py.template +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/templates/rollbacks.py.template +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/templates/states.py.template +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/templates/tasks.json.template +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/templates/test_payload.py.template +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/development/templates/transitions.py.template +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/exceptions/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/exceptions/exceptions.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/exceptions/remote_device.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/action_model/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/action_model/model.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/action_model/utils.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/client.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/client_actor/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/client_actor/client_actor.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/client_actor/exception.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/client_actor/model.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/decorators/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/decorators/gui_automation.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/exceptions/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/exceptions/agent_manager.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/exceptions/modality/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/exceptions/modality/exc.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/exceptions/websocket.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/requirements.txt +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_actions/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_actions/actions.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_actions/base.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_actions/support.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_state_inspector/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_state_inspector/gui_vision.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_state_inspector/models.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_state_machine/Readme.md +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_state_machine/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_state_machine/ai_recovery.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_state_machine/decorators.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_state_machine/exceptions.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/gui_automation/ui_state_machine/state_machine.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/models/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/models/document.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/models/document_statuses.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/models/file.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/models/prevalidation.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/models/remote_device.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/models/response_model.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/models/ui_operator.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/utils/__init__.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/utils/logger.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/clerk/utils/save_artifact.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/requirements.txt +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/tests/conftest.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/tests/test_base.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/tests/test_client.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/tests/test_document_models.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/tests/test_exceptions.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/tests/test_file_models.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/tests/test_gui_automation.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/tests/test_task_decorator.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/tests/test_utils.py +0 -0
- {clerk_sdk-0.5.9 → clerk_sdk-0.5.10}/uv.lock +0 -0
|
@@ -71,78 +71,6 @@ class Clerk(BaseClerk):
|
|
|
71
71
|
files_data = [f.to_multipart_format() for f in files]
|
|
72
72
|
self.post_request(endpoint, params=params, files=files_data)
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
class ClerkDocument(BaseClerk):
|
|
76
|
-
endpoint: str = "/document"
|
|
77
|
-
|
|
78
|
-
def upload_document(self, request: UploadDocumentRequest) -> Document:
|
|
79
|
-
endpoint = "/document"
|
|
80
|
-
res = self.post_request(
|
|
81
|
-
endpoint=endpoint, data=request.data, files=request.files_
|
|
82
|
-
)
|
|
83
|
-
return Document(**res.data[0])
|
|
84
|
-
|
|
85
|
-
def reprocess_document(self, document_id: str, workflow_id: str) -> Document:
|
|
86
|
-
endpoint = f"/document/{document_id}/reprocess"
|
|
87
|
-
res = self.put_request(endpoint=endpoint, data={"workflow_id": workflow_id})
|
|
88
|
-
return Document(**res.data[0])
|
|
89
|
-
|
|
90
|
-
def cancel_document_run(self, document_id: str) -> Document:
|
|
91
|
-
endpoint = f"/document/{document_id}/cancel"
|
|
92
|
-
res = self.post_request(endpoint=endpoint)
|
|
93
|
-
return Document(**res.data[0])
|
|
94
|
-
|
|
95
|
-
def update_document_structured_data(
|
|
96
|
-
self, document_id: str, updated_structured_data: Dict[str, Any]
|
|
97
|
-
) -> Document:
|
|
98
|
-
endpoint = f"/document/{document_id}"
|
|
99
|
-
payload = dict(structured_data=updated_structured_data)
|
|
100
|
-
res = self.put_request(endpoint, json=payload)
|
|
101
|
-
|
|
102
|
-
return Document(**res.data[0])
|
|
103
|
-
|
|
104
|
-
def get_document(self, document_id: str) -> Document:
|
|
105
|
-
endpoint = f"/document/{document_id}"
|
|
106
|
-
res = self.get_request(endpoint=endpoint)
|
|
107
|
-
return Document(**res.data[0])
|
|
108
|
-
|
|
109
|
-
def get_documents(self, request: GetDocumentsRequest) -> List[Document]:
|
|
110
|
-
if not any(
|
|
111
|
-
[
|
|
112
|
-
request.organization_id,
|
|
113
|
-
request.project_id,
|
|
114
|
-
request.start_date,
|
|
115
|
-
request.end_date,
|
|
116
|
-
request.query,
|
|
117
|
-
request.include_statuses,
|
|
118
|
-
]
|
|
119
|
-
):
|
|
120
|
-
raise ValueError(
|
|
121
|
-
"At least one query parameter (organization_id, project_id, start_date, end_date, query, or include_statuses) must be provided."
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
endpoint = f"/documents"
|
|
125
|
-
params = request.model_dump(mode="json")
|
|
126
|
-
res = self.get_request(endpoint, params=params)
|
|
127
|
-
|
|
128
|
-
return [Document(**d) for d in res.data]
|
|
129
|
-
|
|
130
|
-
def get_files_document(self, document_id: str) -> List[ParsedFile]:
|
|
131
|
-
endpoint = f"/document/{document_id}/files"
|
|
132
|
-
res = self.get_request(endpoint=endpoint)
|
|
133
|
-
return [ParsedFile(**d) for d in res.data]
|
|
134
|
-
|
|
135
|
-
def add_files_to_document(
|
|
136
|
-
self,
|
|
137
|
-
document_id: str,
|
|
138
|
-
type: Literal["input", "output"],
|
|
139
|
-
files: List[UploadFile],
|
|
140
|
-
):
|
|
141
|
-
endpoint = f"/document/{document_id}/files/upload"
|
|
142
|
-
params = {"type": type}
|
|
143
|
-
files_data = [f.to_multipart_format() for f in files]
|
|
144
|
-
self.post_request(endpoint, params=params, files=files_data)
|
|
145
|
-
|
|
146
74
|
def prevalidate_file(
|
|
147
75
|
self, project_id: str, workflow_id: str, file: UploadFile
|
|
148
76
|
) -> Dict[str, Any]:
|
|
@@ -13,7 +13,7 @@ gui_requirements = get_requirements("./clerk/gui_automation")
|
|
|
13
13
|
|
|
14
14
|
setup(
|
|
15
15
|
name="clerk-sdk",
|
|
16
|
-
version="0.5.
|
|
16
|
+
version="0.5.10",
|
|
17
17
|
description="Library for interacting with Clerk",
|
|
18
18
|
long_description=open("README.md").read(),
|
|
19
19
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|