Shared types used across the SDK: pagination, validation, relationships.
CustomPolicyControlInfo
Nested info object for custom policy control details.
Fields
| Field | Type | Required | Description |
|---|
description | Any | | - |
long_description | Any | | - |
control_type | Any | | - |
author | Any | | - |
implementation_guidance | Any | | - |
Example
from credoai import CustomPolicyControlInfo
obj = CustomPolicyControlInfo(
)
EvidenceRequirement
Evidence requirement definition for a policy control.
Fields
| Field | Type | Required | Description |
|---|
type | str | ✓ | - |
description | Any | | - |
required | bool | | - |
Example
from credoai import EvidenceRequirement
obj = EvidenceRequirement(
type="example",
)
HTTPValidationError
Fields
| Field | Type | Required | Description |
|---|
detail | List[ValidationError] | | - |
Example
from credoai import HTTPValidationError
obj = HTTPValidationError(
)
HealthResponse
Response model for health check endpoints.
Attributes:
message: Boolean indicating the health status (True = healthy).
Fields
| Field | Type | Required | Description |
|---|
message | bool | ✓ | - |
Example
from credoai import HealthResponse
obj = HealthResponse(
message=True,
)
Pagination metadata for navigating through results.
Attributes:
next_cursor: Opaque cursor token for fetching the next page.
None if there are no more results.
has_more: Whether there are more results available after this page.
total_count: Total number of items across all pages.
None if the backend doesn't provide this information.
Fields
| Field | Type | Required | Description |
|---|
next_cursor | Any | | Cursor token for the next page of results |
has_more | bool | | Whether more results are available |
total_count | Any | | Total number of items across all pages |
Example
from credoai import PaginationInfo
obj = PaginationInfo(
)
PingResponse
Fields
| Field | Type | Required | Description |
|---|
message | str | ✓ | - |
Example
from credoai import PingResponse
obj = PingResponse(
message="example",
)
RelationshipAdd
Schema for adding a relationship to an entity.
Fields
| Field | Type | Required | Description |
|---|
id | str | ✓ | ID of the entity to add to the relationship |
Example
from credoai import RelationshipAdd
obj = RelationshipAdd(
id="example",
)
TokenResponse
Response model for token exchange.
Fields
| Field | Type | Required | Description |
|---|
access_token | Any | ✓ | - |
Example
from credoai import TokenResponse
obj = TokenResponse(
access_token=None,
)
ValidationError
Fields
| Field | Type | Required | Description |
|---|
loc | List[Any] | ✓ | - |
msg | str | ✓ | - |
type | str | ✓ | - |
Example
from credoai import ValidationError
obj = ValidationError(
loc=None,
msg="example",
type="example",
)
PaginatedResponse_ModelResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[ModelResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_ModelResponse_
obj = PaginatedResponse_ModelResponse_(
items=None,
pagination=None,
)
PaginatedResponse_PolicyControlBaseResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[PolicyControlBaseResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_PolicyControlBaseResponse_
obj = PaginatedResponse_PolicyControlBaseResponse_(
items=None,
pagination=None,
)
PaginatedResponse_PolicyControlResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[PolicyControlResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_PolicyControlResponse_
obj = PaginatedResponse_PolicyControlResponse_(
items=None,
pagination=None,
)
PaginatedResponse_PolicyControlVersionResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[PolicyControlVersionResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_PolicyControlVersionResponse_
obj = PaginatedResponse_PolicyControlVersionResponse_(
items=None,
pagination=None,
)
PaginatedResponse_PolicyPackAttachmentResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[PolicyPackAttachmentResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_PolicyPackAttachmentResponse_
obj = PaginatedResponse_PolicyPackAttachmentResponse_(
items=None,
pagination=None,
)
PaginatedResponse_PolicyPackResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[PolicyPackResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_PolicyPackResponse_
obj = PaginatedResponse_PolicyPackResponse_(
items=None,
pagination=None,
)
PaginatedResponse_QuestionnaireAttachmentResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[QuestionnaireAttachmentResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_QuestionnaireAttachmentResponse_
obj = PaginatedResponse_QuestionnaireAttachmentResponse_(
items=None,
pagination=None,
)
PaginatedResponse_QuestionnaireResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[QuestionnaireResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_QuestionnaireResponse_
obj = PaginatedResponse_QuestionnaireResponse_(
items=None,
pagination=None,
)
PaginatedResponse_RiskScenarioResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[RiskScenarioResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_RiskScenarioResponse_
obj = PaginatedResponse_RiskScenarioResponse_(
items=None,
pagination=None,
)
PaginatedResponse_RiskTypeResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[RiskTypeResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_RiskTypeResponse_
obj = PaginatedResponse_RiskTypeResponse_(
items=None,
pagination=None,
)
PaginatedResponse_UseCaseControlResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[UseCaseControlResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_UseCaseControlResponse_
obj = PaginatedResponse_UseCaseControlResponse_(
items=None,
pagination=None,
)
PaginatedResponse_UseCaseResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[UseCaseResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_UseCaseResponse_
obj = PaginatedResponse_UseCaseResponse_(
items=None,
pagination=None,
)
PaginatedResponse_UseCaseRiskScenarioResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[UseCaseRiskScenarioResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_UseCaseRiskScenarioResponse_
obj = PaginatedResponse_UseCaseRiskScenarioResponse_(
items=None,
pagination=None,
)
PaginatedResponse_VendorResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[VendorResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_VendorResponse_
obj = PaginatedResponse_VendorResponse_(
items=None,
pagination=None,
)
PaginatedResponse_WorkflowStageResponse_
Fields
| Field | Type | Required | Description |
|---|
items | List[WorkflowStageResponse] | ✓ | List of items in the current page |
pagination | PaginationInfo | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse_WorkflowStageResponse_
obj = PaginatedResponse_WorkflowStageResponse_(
items=None,
pagination=None,
)
ClientRequest
Base class for client requests with validation and JSON:API support.
This base class provides common functionality for all API request models,
including validation, serialization, and JSON:API format conversion.
Methods:
to_dict(): Convert to dictionary for API requests
to_jsonapi(): Convert to JSON:API format for requests
Fields
| Field | Type | Required | Description |
|---|
Example
from credoai import ClientRequest
obj = ClientRequest(
)
ClientResponse
Base class for client responses with metadata.
Provides a consistent structure for all API response wrappers,
including status information and request tracing.
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 |
Example
from credoai import ClientResponse
obj = ClientResponse(
status_code=123,
)
HealthResponseWrapper
Response wrapper for HealthResponse with metadata and validation.
Extends ClientResponse to provide type-safe access to HealthResponse 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('HealthResponse') | ✓ | Validated response data |
Example
from credoai import HealthResponseWrapper
obj = HealthResponseWrapper(
status_code=123,
data=None,
)
JsonApiResourceBase
Base class for JSON:API resource responses.
This follows the JSON:API specification (https://jsonapi.org/) for
consistent resource representation across the API.
Fields
| Field | Type | Required | Description |
|---|
id | str | ✓ | Unique resource identifier |
type | str | ✓ | Resource type identifier |
Example
from credoai import JsonApiResourceBase
obj = JsonApiResourceBase(
id="example",
type="example",
)
JsonApiResponse
Standard JSON:API response wrapper.
Provides a consistent structure for all API responses following the
JSON:API specification. Supports both single resources and collections.
Fields
| Field | Type | Required | Description |
|---|
data | ForwardRef('Union[Dict[str, Any], List[Dict[str, Any]]]') | ✓ | Primary response data |
included | ForwardRef('Optional[List[Dict[str, Any]]]') | | Included resources for compound documents |
meta | ForwardRef('Optional[Dict[str, Any]]') | | Non-standard metadata about the response |
Example
from credoai import JsonApiResponse
obj = JsonApiResponse(
data=None,
)
JsonApiUseCaseResource
JSON:API formatted use case resource.
Represents a use case resource in JSON:API format with type-safe attributes.
Fields
| Field | Type | Required | Description |
|---|
id | str | ✓ | Unique resource identifier |
type | ForwardRef("Literal['use_cases']") | | - |
attributes | ForwardRef("'UseCaseResponse'") | ✓ | Use case data attributes |
Example
from credoai import JsonApiUseCaseResource
obj = JsonApiUseCaseResource(
id="example",
attributes=None,
)
JsonApiUserResource
JSON:API formatted user resource.
Represents a user resource in JSON:API format.
Fields
| Field | Type | Required | Description |
|---|
id | str | ✓ | Unique resource identifier |
type | ForwardRef("Literal['users']") | | - |
attributes | ForwardRef('Dict[str, Any]') | ✓ | User data attributes |
Example
from credoai import JsonApiUserResource
obj = JsonApiUserResource(
id="example",
attributes=None,
)
PaginatedResponse
Generic paginated response wrapper.
Wraps a list of items with pagination metadata for cursor-based navigation.
Fields
| Field | Type | Required | Description |
|---|
items | ForwardRef('List[T]') | ✓ | List of items in the current page |
pagination | ForwardRef('PaginationInfo') | ✓ | Pagination metadata |
Example
from credoai import PaginatedResponse
obj = PaginatedResponse(
items=None,
pagination=None,
)
PingResponseWrapper
Response wrapper for PingResponse with metadata and validation.
Extends ClientResponse to provide type-safe access to PingResponse 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('PingResponse') | ✓ | Validated response data |
Example
from credoai import PingResponseWrapper
obj = PingResponseWrapper(
status_code=123,
data=None,
)
TokenResponseWrapper
Response wrapper for TokenResponse with metadata and validation.
Extends ClientResponse to provide type-safe access to TokenResponse 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('TokenResponse') | ✓ | Validated response data |
Example
from credoai import TokenResponseWrapper
obj = TokenResponseWrapper(
status_code=123,
data=None,
)