Vendor Types
Types for creating, updating, and representing vendors.
VendorCreate
Schema for creating a vendor.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | str | ✓ | - |
description | Any | - | |
questionnaire_ids | List[str] | - |
Example
from credoai import VendorCreate
obj = VendorCreate(
name="example",
)
VendorResponse
Schema for a vendor response.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | str | ✓ | - |
name | str | ✓ | - |
description | Any | - | |
status | str | - |
Example
from credoai import VendorResponse
obj = VendorResponse(
id="example",
name="example",
)
VendorUpdate
Schema for updating a vendor.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | Any | - | |
description | Any | - |
Example
from credoai import VendorUpdate
obj = VendorUpdate(
)
VendorCreateRequest
Request wrapper for VendorCreate with validation and JSON:API support. Combines the VendorCreate data model with client request functionality, providing automatic validation and JSON:API format conversion for API requests.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | str | ✓ | - |
description | ForwardRef('Optional[Any]') | - | |
questionnaire_ids | ForwardRef('Optional[List[str]]') | - |
Example
from credoai import VendorCreateRequest
obj = VendorCreateRequest(
name="example",
)
VendorResponseWrapper
Response wrapper for VendorResponse with metadata and validation. Extends ClientResponse to provide type-safe access to VendorResponse data along with HTTP response metadata.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
status_code | int | ✓ | HTTP response status code |
headers | ForwardRef('Dict[str, str]') | HTTP response headers | |
request_id | ForwardRef('Optional[str]') | Unique request identifier for tracing | |
data | ForwardRef('VendorResponse') | ✓ | Validated response data |
Example
from credoai import VendorResponseWrapper
obj = VendorResponseWrapper(
status_code=123,
data=None,
)