client.guidelines¶
Bases: SyncResource
Sync project-guidelines namespace (client.guidelines).
get ¶
Read the guideline (any project member). Image URLs are refreshed to fresh 1-hour presigned GETs before return.
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
caller is not a project member (AUTH_FORBIDDEN). |
NotFoundError
|
PROJECT_NOT_FOUND. |
upsert ¶
Create or replace the guideline Markdown (manager-only). Returns the
refreshed guideline (same shape as :meth:get).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content_md
|
str
|
Markdown source (CommonMark + GFM), 1 MB cap. |
required |
Raises:
| Type | Description |
|---|---|
UnprocessableError
|
|
PayloadTooLargeError
|
over the byte cap (PAYLOAD_TOO_LARGE). |
ForbiddenError
|
caller is not a project manager (AUTH_FORBIDDEN). |
init_image_upload ¶
init_image_upload(project_id: UUID | str, *, filename: str, size_bytes: int, content_type: str) -> GuidelineImageUpload
Mint a presigned PUT for a guideline image (manager-only, 201).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content_type
|
str
|
image MIME type; must be an accepted image format. |
required |
size_bytes
|
int
|
exact byte count; 10 MB per-image cap. |
required |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
unsupported image MIME (ASSET_FORMAT_UNSUPPORTED). |
UnprocessableError
|
|
PayloadTooLargeError
|
over the byte cap (ASSET_TOO_LARGE). |
ForbiddenError
|
caller is not a project manager (AUTH_FORBIDDEN). |
Response models¶
Models returned by client.guidelines methods (fields, types, and what each means).
Project-guideline models (the guidelines resource, ADR-0045).
The guideline is a single Markdown document per project plus a presigned
image-upload flow. On read, the server re-signs any image URL pointing at the
project's guidelines/{project_id}/... prefix to a fresh 1-hour presigned GET.
ProjectGuideline ¶
Bases: BaseModel
The project's Markdown guideline. content_md is empty (never absent)
when no guideline has been written yet — the server default-fills it.
GuidelineImageUpload ¶
Bases: BaseModel
Presigned URLs for a guideline image upload. PUT the bytes to
upload_url, then embed public_url in the guideline Markdown.