Uploads¶
- pydantic model DeleteFileResponse[source]¶
Show JSON schema
{ "title": "DeleteFileResponse", "type": "object", "properties": { "message": { "title": "Message", "type": "string" } }, "required": [ "message" ] }
- Fields:
- field message: str [Required]¶
- pydantic model FileResponse[source]¶
Model to represent a single upload in the ListFilesResponse
Show JSON schema
{ "title": "FileResponse", "description": "Model to represent a single upload in the ListFilesResponse", "type": "object", "properties": { "file_id": { "title": "File Id", "type": "string" }, "file_name": { "title": "File Name", "type": "string" }, "status": { "$ref": "#/$defs/FileStatus" }, "upload_ts": { "format": "date-time", "title": "Upload Ts", "type": "string" }, "raw_size": { "title": "Raw Size", "type": "integer" }, "folder_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Folder Id" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Tags" }, "company_shared_permission": { "anyOf": [ { "$ref": "#/$defs/SharePermission" }, { "type": "null" } ], "default": null } }, "$defs": { "FileStatus": { "enum": [ "PENDING", "PROCESSING", "COMPLETED", "FAILED", "DELETED" ], "title": "FileStatus", "type": "string" }, "SharePermission": { "enum": [ "read", "undefined" ], "title": "SharePermission", "type": "string" } }, "required": [ "file_id", "file_name", "status", "upload_ts", "raw_size" ] }
- Fields:
- Validators:
set_company_shared_permission
»all fields
set_tz
»all fields
- Validated by:
- field folder_id: str | None = None¶
- Validated by:
- field id: str [Required] (alias 'file_id')¶
- Validated by:
- field name: str [Required] (alias 'file_name')¶
- Validated by:
- field raw_size: int [Required]¶
- Validated by:
- field status: FileStatus [Required]¶
- Validated by:
- field tags: list[str] | None = None¶
- Validated by:
- field uploaded_at: datetime [Required] (alias 'upload_ts')¶
- Validated by:
- Parameters:
values (dict) –
Show JSON schema
{ "title": "FileShareResponse", "type": "object", "properties": { "status": { "const": "OK", "title": "Status", "type": "string" }, "message": { "title": "Message", "type": "string" } }, "required": [ "status", "message" ] }
- Fields:
- class FileStatus[source]¶
- COMPLETED = 'COMPLETED'¶
- DELETED = 'DELETED'¶
- FAILED = 'FAILED'¶
- PENDING = 'PENDING'¶
- PROCESSING = 'PROCESSING'¶
- pydantic model GetDownloadPresignedUrlResponse[source]¶
Show JSON schema
{ "title": "GetDownloadPresignedUrlResponse", "type": "object", "properties": { "url": { "title": "Url", "type": "string" } }, "required": [ "url" ] }
- Fields:
- field url: str [Required]¶
- pydantic model GetFileStatusResponse[source]¶
Show JSON schema
{ "title": "GetFileStatusResponse", "type": "object", "properties": { "status": { "anyOf": [ { "$ref": "#/$defs/FileStatus" }, { "type": "null" } ], "default": null }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Error" } }, "$defs": { "FileStatus": { "enum": [ "PENDING", "PROCESSING", "COMPLETED", "FAILED", "DELETED" ], "title": "FileStatus", "type": "string" } } }
- field error: str | None = None¶
- field status: FileStatus | None = None¶
- pydantic model ListFilesResponse[source]¶
Model to represent the response of the list uploads endpoint
Show JSON schema
{ "title": "ListFilesResponse", "description": "Model to represent the response of the list uploads endpoint", "type": "object", "properties": { "results": { "items": { "$ref": "#/$defs/FileResponse" }, "title": "Results", "type": "array" } }, "$defs": { "FileResponse": { "description": "Model to represent a single upload in the ListFilesResponse", "properties": { "file_id": { "title": "File Id", "type": "string" }, "file_name": { "title": "File Name", "type": "string" }, "status": { "$ref": "#/$defs/FileStatus" }, "upload_ts": { "format": "date-time", "title": "Upload Ts", "type": "string" }, "raw_size": { "title": "Raw Size", "type": "integer" }, "folder_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Folder Id" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Tags" }, "company_shared_permission": { "anyOf": [ { "$ref": "#/$defs/SharePermission" }, { "type": "null" } ], "default": null } }, "required": [ "file_id", "file_name", "status", "upload_ts", "raw_size" ], "title": "FileResponse", "type": "object" }, "FileStatus": { "enum": [ "PENDING", "PROCESSING", "COMPLETED", "FAILED", "DELETED" ], "title": "FileStatus", "type": "string" }, "SharePermission": { "enum": [ "read", "undefined" ], "title": "SharePermission", "type": "string" } }, "required": [ "results" ] }
- field results: list[FileResponse] [Required]¶
- pydantic model PostFileRequest[source]¶
Model to represent the request of the post upload endpoint
Show JSON schema
{ "title": "PostFileRequest", "description": "Model to represent the request of the post upload endpoint", "type": "object", "properties": { "filename": { "title": "Filename", "type": "string" }, "folder_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Folder Id" }, "source_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source Url" }, "upload_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Upload Mode" }, "properties": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "connect_to": { "default": [ "smart_topics" ], "items": { "const": "smart_topics", "type": "string" }, "title": "Connect To", "type": "array" }, "extractor": { "anyOf": [ { "$ref": "#/$defs/ExtractorTypes" }, { "type": "null" } ], "default": null } }, "$defs": { "ExtractorTypes": { "enum": [ "PDF_EXTRACTOR_1_0" ], "title": "ExtractorTypes", "type": "string" } }, "required": [ "filename" ] }
- Fields:
- field connect_to: list[Literal['smart_topics']] = ['smart_topics']¶
- field extractor: ExtractorTypes | None = None¶
- field filename: str [Required]¶
- field folder_id: str | None = None¶
- field properties: dict | None = None¶
- field source_url: str | None = None¶
- field upload_mode: str | None = None¶
- pydantic model PostFileResponse[source]¶
Model to represent the response of the post upload endpoint
Show JSON schema
{ "title": "PostFileResponse", "description": "Model to represent the response of the post upload endpoint", "type": "object", "properties": { "file_id": { "title": "File Id", "type": "string" }, "Location": { "title": "Location", "type": "string" } }, "required": [ "file_id", "Location" ] }
- Fields:
- field file_id: str [Required]¶
- field location: str [Required] (alias 'Location')¶
- class UploadsConnectionProtocol[source]¶
- __init__(*args, **kwargs)¶
- list_files(date_range, tags, status, file_name, folder_id, page_size, shared, offset)[source]¶
- Parameters:
date_range (AbsoluteDateRange | None) –
tags (list[str] | None) –
status (FileStatus | None) –
file_name (str | None) –
folder_id (str | None) –
page_size (int) –
shared (bool | None) –
offset (int) –
- Return type:
- post_file(request)[source]¶
- Parameters:
request (PostFileRequest) –
- Return type:
- Parameters:
file_id (str) –
- Return type:
- Parameters:
file_id (str) –
- Return type: