Document Models
Document models for the ACPortal API.
- class ab.api.models.documents.DocumentListParams(*, jobDisplayId=None)[source]
Bases:
RequestModelQuery parameters for GET /documents/list.
- Parameters:
jobDisplayId (str | None)
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.documents.Document(*, id=None, path=None, thumbnailPath=None, description=None, typeName=None, typeId=None, fileName=None, shared=None, tags=None, jobItems=None, **extra_data)[source]
Bases:
ResponseModel,IdentifiedModelDocument record — GET /documents/list and embedded in Job response.
Live API field names differ from swagger:
pathnotdocPath,typeNamenotdocType,sharednotsharingLevel.- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.documents.DocumentUpdateRequest(*, docType=None, sharingLevel=None)[source]
Bases:
RequestModelBody for PUT /documents/update/{docId}.
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.documents.DocumentUploadRequest(*, JobDisplayId, DocumentType, DocumentTypeDescription=None, Shared=0, Tags=None, JobItems=None, RfqId=None)[source]
Bases:
RequestModelMultipart form fields for
POST /documents.The file itself is sent as a separate
filemultipart part — this model carries only the accompanying form fields. Aliases are PascalCase to match the swagger multipart contract exactly (JobDisplayId,DocumentType,Shared,JobItems…), which differs from the camelCase convention used elsewhere, so each alias is declared explicitly.An item photo is just this request with
document_type=DocumentType.ITEM_PHOTOandjob_itemsset to the target item UUID(s); theupload_item_photo()helper fills those in for you.- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.documents.UploadedFile(*, id=None, fileName=None, fileSize=None, documentType=None, itemId=None, thumbnailUrl=None, **extra_data)[source]
Bases:
ResponseModelA single file entry within a
DocumentUploadResponse.The upload response shape is not described in swagger; fields mirror the document records the live API has been observed to return and are all optional so deserialization stays resilient (
ResponseModelallows and warns on unknown fields).- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.documents.DocumentUploadResponse(*, success=None, message=None, uploadedFiles=None, id=None, fileName=None, **extra_data)[source]
Bases:
ResponseModelResponse body for
POST /documents.Provisional shape (no swagger schema / live capture yet); all fields are optional and
ResponseModeltolerates drift, so this never breaks deserialization even if the server adds or renames fields.- Parameters:
- uploaded_files: List[UploadedFile] | None
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].