Skip to content

Commit e3bd646

Browse files
author
ks-release-bot
committed
chore(release): regenerate ksapi v1.147.0 from ks-backend
1 parent 137ea75 commit e3bd646

16 files changed

Lines changed: 859 additions & 5 deletions

‎.openapi-generator/FILES‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ docs/IdpType.md
163163
docs/ImageTaxonomy.md
164164
docs/InformationStatistics.md
165165
docs/IngestDocumentResponse.md
166+
docs/IngestZipResponse.md
166167
docs/IngestionMode.md
167168
docs/Input.md
168169
docs/InputOrigin.md
@@ -401,6 +402,7 @@ docs/XlsxCellAnchorInput.md
401402
docs/XlsxCellAnchorInputOrDocxParagraphAnchorInput.md
402403
docs/XlsxCellAnchorOutput.md
403404
docs/XlsxCellAnchorOutputOrDocxParagraphAnchorOutput.md
405+
docs/ZipFileResult.md
404406
git_push.sh
405407
ksapi/__init__.py
406408
ksapi/api/__init__.py
@@ -588,6 +590,7 @@ ksapi/models/idp_type.py
588590
ksapi/models/image_taxonomy.py
589591
ksapi/models/information_statistics.py
590592
ksapi/models/ingest_document_response.py
593+
ksapi/models/ingest_zip_response.py
591594
ksapi/models/ingestion_mode.py
592595
ksapi/models/input.py
593596
ksapi/models/input_origin.py
@@ -806,6 +809,7 @@ ksapi/models/xlsx_cell_anchor_input.py
806809
ksapi/models/xlsx_cell_anchor_input_or_docx_paragraph_anchor_input.py
807810
ksapi/models/xlsx_cell_anchor_output.py
808811
ksapi/models/xlsx_cell_anchor_output_or_docx_paragraph_anchor_output.py
812+
ksapi/models/zip_file_result.py
809813
ksapi/py.typed
810814
ksapi/rest.py
811815
pyproject.toml
@@ -973,6 +977,7 @@ test/test_idp_type.py
973977
test/test_image_taxonomy.py
974978
test/test_information_statistics.py
975979
test/test_ingest_document_response.py
980+
test/test_ingest_zip_response.py
976981
test/test_ingestion_mode.py
977982
test/test_input.py
978983
test/test_input_origin.py
@@ -1211,4 +1216,5 @@ test/test_xlsx_cell_anchor_input.py
12111216
test/test_xlsx_cell_anchor_input_or_docx_paragraph_anchor_input.py
12121217
test/test_xlsx_cell_anchor_output.py
12131218
test/test_xlsx_cell_anchor_output_or_docx_paragraph_anchor_output.py
1219+
test/test_zip_file_result.py
12141220
tox.ini

‎docs/DocumentsApi.md‎

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Method | HTTP request | Description
1010
[**get_document**](DocumentsApi.md#get_document) | **GET** /v1/documents/{document_id} | Get Document Handler
1111
[**ingest_document**](DocumentsApi.md#ingest_document) | **POST** /v1/documents/ingest | Ingest Document Handler
1212
[**ingest_document_version**](DocumentsApi.md#ingest_document_version) | **POST** /v1/documents/{document_id}/ingest | Ingest Document Version Handler
13+
[**ingest_zip**](DocumentsApi.md#ingest_zip) | **POST** /v1/documents/ingest-zip | Ingest Zip Handler
1314
[**list_documents**](DocumentsApi.md#list_documents) | **GET** /v1/documents | List Documents Handler
1415
[**update_document**](DocumentsApi.md#update_document) | **PATCH** /v1/documents/{document_id} | Update Document Handler
1516

@@ -597,6 +598,106 @@ Name | Type | Description | Notes
597598

598599
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
599600

601+
# **ingest_zip**
602+
> IngestZipResponse ingest_zip(file, path_part_id, ingestion_mode=ingestion_mode)
603+
604+
Ingest Zip Handler
605+
606+
Upload a ZIP archive and ingest each member file individually.
607+
608+
Directory structure inside the ZIP is preserved as FOLDER PathParts under
609+
the target folder. Returns 202 with per-file outcomes — each file that
610+
ingests successfully has its own Temporal workflow ID to poll for status.
611+
612+
Whole-archive failures (not a ZIP, zip-bomb, >500 files) return 400 before
613+
any DB writes. Per-file failures (unsupported type, oversized) are included
614+
in the response with ``error`` set; other files continue processing.
615+
616+
### Example
617+
618+
* Api Key Authentication (cookieAuth):
619+
* Bearer Authentication (bearerAuth):
620+
621+
```python
622+
import ksapi
623+
from ksapi.models.ingest_zip_response import IngestZipResponse
624+
from ksapi.models.ingestion_mode import IngestionMode
625+
from ksapi.rest import ApiException
626+
from pprint import pprint
627+
628+
# Defining the host is optional and defaults to http://localhost:8000
629+
# See configuration.py for a list of all supported configuration parameters.
630+
configuration = ksapi.Configuration(
631+
host = "http://localhost:8000"
632+
)
633+
634+
# The client must configure the authentication and authorization parameters
635+
# in accordance with the API server security policy.
636+
# Examples for each auth method are provided below, use the example that
637+
# satisfies your auth use case.
638+
639+
# Configure API key authorization: cookieAuth
640+
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
641+
642+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
643+
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
644+
645+
# Configure Bearer authorization: bearerAuth
646+
configuration = ksapi.Configuration(
647+
access_token = os.environ["BEARER_TOKEN"]
648+
)
649+
650+
# Enter a context with an instance of the API client
651+
with ksapi.ApiClient(configuration) as api_client:
652+
# Create an instance of the API class
653+
api_instance = ksapi.DocumentsApi(api_client)
654+
file = None # bytes |
655+
path_part_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Parent path part ID (must be a FOLDER type)
656+
ingestion_mode = ksapi.IngestionMode() # IngestionMode | (optional)
657+
658+
try:
659+
# Ingest Zip Handler
660+
api_response = api_instance.ingest_zip(file, path_part_id, ingestion_mode=ingestion_mode)
661+
print("The response of DocumentsApi->ingest_zip:\n")
662+
pprint(api_response)
663+
except Exception as e:
664+
print("Exception when calling DocumentsApi->ingest_zip: %s\n" % e)
665+
```
666+
667+
668+
669+
### Parameters
670+
671+
672+
Name | Type | Description | Notes
673+
------------- | ------------- | ------------- | -------------
674+
**file** | **bytes**| |
675+
**path_part_id** | **UUID**| Parent path part ID (must be a FOLDER type) |
676+
**ingestion_mode** | [**IngestionMode**](IngestionMode.md)| | [optional]
677+
678+
### Return type
679+
680+
[**IngestZipResponse**](IngestZipResponse.md)
681+
682+
### Authorization
683+
684+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
685+
686+
### HTTP request headers
687+
688+
- **Content-Type**: multipart/form-data
689+
- **Accept**: application/json
690+
691+
### HTTP response details
692+
693+
| Status code | Description | Response headers |
694+
|-------------|-------------|------------------|
695+
**202** | Successful Response | - |
696+
**422** | Validation Error | - |
697+
**0** | Error response. | - |
698+
699+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
700+
600701
# **list_documents**
601702
> PaginatedResponseDocumentResponse list_documents(parent_path_part_id=parent_path_part_id, sort_order=sort_order, sort_dir=sort_dir, owner_id=owner_id, document_type=document_type, with_tags=with_tags, limit=limit, offset=offset, created_after=created_after, created_before=created_before, updated_after=updated_after, updated_before=updated_before)
602703

‎docs/IngestZipResponse.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# IngestZipResponse
2+
3+
Aggregate response from a ZIP ingestion batch.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**files** | [**List[ZipFileResult]**](ZipFileResult.md) | |
10+
**total_found** | **int** | |
11+
**succeeded** | **int** | |
12+
**skipped** | **int** | |
13+
**failed** | **int** | |
14+
15+
## Example
16+
17+
```python
18+
from ksapi.models.ingest_zip_response import IngestZipResponse
19+
20+
# TODO update the JSON string below
21+
json = "{}"
22+
# create an instance of IngestZipResponse from a JSON string
23+
ingest_zip_response_instance = IngestZipResponse.from_json(json)
24+
# print the JSON string representation of the object
25+
print(IngestZipResponse.to_json())
26+
27+
# convert the object into a dict
28+
ingest_zip_response_dict = ingest_zip_response_instance.to_dict()
29+
# create an instance of IngestZipResponse from a dict
30+
ingest_zip_response_from_dict = IngestZipResponse.from_dict(ingest_zip_response_dict)
31+
```
32+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
33+
34+

‎docs/ZipFileResult.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# ZipFileResult
2+
3+
Per-file outcome from a ZIP ingestion batch.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**zip_path** | **str** | |
10+
**document_id** | **UUID** | | [optional]
11+
**document_version_id** | **UUID** | | [optional]
12+
**workflow_id** | **str** | | [optional]
13+
**skipped** | **bool** | | [optional] [default to False]
14+
**error** | **str** | | [optional]
15+
16+
## Example
17+
18+
```python
19+
from ksapi.models.zip_file_result import ZipFileResult
20+
21+
# TODO update the JSON string below
22+
json = "{}"
23+
# create an instance of ZipFileResult from a JSON string
24+
zip_file_result_instance = ZipFileResult.from_json(json)
25+
# print the JSON string representation of the object
26+
print(ZipFileResult.to_json())
27+
28+
# convert the object into a dict
29+
zip_file_result_dict = zip_file_result_instance.to_dict()
30+
# create an instance of ZipFileResult from a dict
31+
zip_file_result_from_dict = ZipFileResult.from_dict(zip_file_result_dict)
32+
```
33+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
34+
35+

‎ksapi/__init__.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "1.146.0"
17+
__version__ = "1.147.0"
1818

1919
# Define package exports
2020
__all__ = [
@@ -206,6 +206,7 @@
206206
"ImageTaxonomy",
207207
"InformationStatistics",
208208
"IngestDocumentResponse",
209+
"IngestZipResponse",
209210
"IngestionMode",
210211
"Input",
211212
"InputOrigin",
@@ -424,6 +425,7 @@
424425
"XlsxCellAnchorInputOrDocxParagraphAnchorInput",
425426
"XlsxCellAnchorOutput",
426427
"XlsxCellAnchorOutputOrDocxParagraphAnchorOutput",
428+
"ZipFileResult",
427429
]
428430

429431
# import apis into sdk package
@@ -619,6 +621,7 @@
619621
from ksapi.models.image_taxonomy import ImageTaxonomy as ImageTaxonomy
620622
from ksapi.models.information_statistics import InformationStatistics as InformationStatistics
621623
from ksapi.models.ingest_document_response import IngestDocumentResponse as IngestDocumentResponse
624+
from ksapi.models.ingest_zip_response import IngestZipResponse as IngestZipResponse
622625
from ksapi.models.ingestion_mode import IngestionMode as IngestionMode
623626
from ksapi.models.input import Input as Input
624627
from ksapi.models.input_origin import InputOrigin as InputOrigin
@@ -837,4 +840,5 @@
837840
from ksapi.models.xlsx_cell_anchor_input_or_docx_paragraph_anchor_input import XlsxCellAnchorInputOrDocxParagraphAnchorInput as XlsxCellAnchorInputOrDocxParagraphAnchorInput
838841
from ksapi.models.xlsx_cell_anchor_output import XlsxCellAnchorOutput as XlsxCellAnchorOutput
839842
from ksapi.models.xlsx_cell_anchor_output_or_docx_paragraph_anchor_output import XlsxCellAnchorOutputOrDocxParagraphAnchorOutput as XlsxCellAnchorOutputOrDocxParagraphAnchorOutput
843+
from ksapi.models.zip_file_result import ZipFileResult as ZipFileResult
840844

0 commit comments

Comments
 (0)