CMS Types
cmstypes
PathBase
Bases: TypedDict
Base class for Path object
Attributes:
| Name | Type | Description |
|---|---|---|
path |
str
|
The path string |
siteId |
uuid_string
|
unique identifier string of the site associated with it |
siteName |
str
|
|
Source code in cascade_cms/cmstypes.py
200 201 202 203 204 205 206 207 208 209 210 211 212 213 | |
Path
Bases: PathBase
Represents a Path object that can be called directly. Substitution for TypeIdentifers with asset id Attributes: asset_type (AssetTypes): (Required) the type of the asset
Source code in cascade_cms/cmstypes.py
216 217 218 219 220 221 222 223 224 | |
SimplePayload
Bases: BaseModel
Base class for Cascade CMS Payloads: Payloads are containers for specific Cascade operations that accept inputs
Source code in cascade_cms/cmstypes.py
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | |
format_builder()
Wraps proper headers around payload data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
handler
|
SerializerFunctionWrapHandler
|
Pydantic validation function |
required |
Returns:
| Type | Description |
|---|---|
dict
|
dict[str,object]: serialized wrapped inSerializerFunctionWrapHandler the inherit class name |
dict
|
```python |
dict
|
{ "searchInformation"{ ... } |
dict
|
} |
dict
|
``` |
Source code in cascade_cms/cmstypes.py
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | |
NewAsset
Bases: SimplePayload
Payload for the create operation.
Requires exactly one of site_name/site_id and exactly one of
parent_folder_path/parent_folder_id (enforced by
_check_required_alternatives). Extra fields are allowed and passed
through, since asset-type-specific properties vary per asset_type.
Source code in cascade_cms/cmstypes.py
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
serialize_as_asset(handler)
Cascade expects {"asset": {"
Source code in cascade_cms/cmstypes.py
325 326 327 328 329 330 331 | |
IdentifierType
Bases: BaseModel
Resolved reference to a Cascade asset: its UUID, type, and optional path info.
This is the "id-based" counterpart to Path (which references an
asset by site + path string instead); see resolve_identifier.
Source code in cascade_cms/cmstypes.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | |
workflowInformation
Bases: BaseModel
Response from the readWorkflowInformation operation, describing an
asset's active workflow instance and its steps/actions.
Source code in cascade_cms/cmstypes.py
534 535 536 537 538 539 540 541 542 543 544 545 546 547 | |
Asset
Dynamic wrapper around a raw Cascade asset JSON payload.
Cascade asset payloads have the shape {"asset": {"<type>": {...}}}
with a structure that varies per asset type, so unlike the Pydantic
models above this is a thin dict-backed wrapper rather than a fixed
schema: _data holds the inner {...} dict by reference, and
__setattr__ only enforces that an existing field keeps its Python
type when reassigned (it does not validate against a schema).
pageConfigurations, if present, is parsed into PageConfiguration
models up front for convenient access via get_page_configuration.
Source code in cascade_cms/cmstypes.py
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 | |
asset_type
property
The request-side asset type (matching AssetTypes/Path.asset_type),
normalized from the raw response wrapper key in _asset_type.
get(key, default=None)
Access _data fields conveniently.
Source code in cascade_cms/cmstypes.py
624 625 626 | |
get_data_structure(group, identifier)
Find nodes matching identifier within all instances of a group. Returns first match per group instance as a list of node objects by reference.
Source code in cascade_cms/cmstypes.py
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 | |
get_page_configuration(configuration_name, page_region=None)
Find a page configuration and optionally a specific region within it. Returns Pydantic model objects by reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration_name
|
str
|
The 'name' of the configuration e.g. 'ASPX', 'XML' |
required |
page_region
|
str | None
|
The 'name' of the page region e.g. 'DEFAULT', 'FOOTER' (optional) |
None
|
Returns:
| Type | Description |
|---|---|
PageConfiguration | PageRegion | None
|
|
PageConfiguration | PageRegion | None
|
|
PageConfiguration | PageRegion | None
|
|
Source code in cascade_cms/cmstypes.py
666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 | |
root_container_id(asset_type)
Return the root container id for asset_type on this site asset.
self must be a site asset. Returns None if there's no known root
field for asset_type (see _ROOT_CONTAINER_FIELDS).
Source code in cascade_cms/cmstypes.py
705 706 707 708 709 710 711 712 713 714 715 716 717 | |
Message
Bases: SimplePayload
A Cascade inbox message, also used as the payload for mark/delete-message operations.
Source code in cascade_cms/cmstypes.py
720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 | |
CheckedOutAsset
Bases: BaseModel
Response from the checkOut operation, referencing the new working copy.
Source code in cascade_cms/cmstypes.py
741 742 743 744 745 746 | |
ListElements
Bases: BaseModel
Response container for list-shaped endpoints (search, listSites, listMessages,
readAudits, listSubscribers), whose JSON key varies by endpoint but is always
aliased into elements via AliasChoices.
Source code in cascade_cms/cmstypes.py
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 | |
CascadeError
Bases: BaseModel
Represents a Cascade API-level failure response ({"success": false, "message": ...}).
Source code in cascade_cms/cmstypes.py
770 771 772 773 774 775 | |
CascadeSuccess
Bases: BaseModel
Represents a Cascade API-level success response with no further data ({"success": true}).
Source code in cascade_cms/cmstypes.py
778 779 780 781 782 | |
SearchInformation
Bases: SimplePayload
Payload for the search operation.
Source code in cascade_cms/cmstypes.py
788 789 790 791 792 793 794 795 796 797 798 | |
preference
Bases: SimplePayload
Payload for the editPreference operation (a single user preference name/value).
Source code in cascade_cms/cmstypes.py
801 802 803 804 805 | |
deleteParameters
Bases: SimplePayload
Payload for the delete operation.
Source code in cascade_cms/cmstypes.py
808 809 810 811 812 813 | |
copyParameters
Bases: SimplePayload
Payload for the copy operation.
Source code in cascade_cms/cmstypes.py
816 817 818 819 820 821 822 823 | |
moveParameters
Bases: SimplePayload
Payload for the move operation.
Source code in cascade_cms/cmstypes.py
826 827 828 829 830 831 832 833 834 835 | |
publishInformation
Bases: SimplePayload
Payload for the publish operation.
Source code in cascade_cms/cmstypes.py
838 839 840 841 | |
Comment
Bases: SimplePayload
Payload for the checkIn operation (a check-in comment).
Source code in cascade_cms/cmstypes.py
844 845 846 847 | |
SiteCopyParameter
Bases: SimplePayload
Payload for the siteCopy operation.
Source code in cascade_cms/cmstypes.py
850 851 852 853 854 | |
workflowTransitionInformation
Bases: SimplePayload
Payload for the performWorkflowTransition operation.
Source code in cascade_cms/cmstypes.py
857 858 859 860 861 862 | |
auditParameters
Bases: SimplePayload
Payload for the readAudits operation.
Source code in cascade_cms/cmstypes.py
865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 | |
AssetAdapter
Drop-in counterpart to TypeAdapter for Asset objects.
Mirrors TypeAdapter's validate_json / dump_json interface so callers never need isinstance checks to decide how to serialize/deserialize.
Source code in cascade_cms/cmstypes.py
939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 | |
ResponseParser
Bases: BaseModel
Parses a raw response body, trying CascadeError first and falling
back to serializer on the expected success shape.
_content holds the parsed result (either a CascadeError or a T),
and _cacheable is set to True only when the success-path parse
succeeds, so error responses are never cached.
Source code in cascade_cms/cmstypes.py
978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 | |
reformat_name(class_name)
Lowercase the first letter of a class name (e.g. "NewAsset" -> "newAsset").
Source code in cascade_cms/cmstypes.py
177 178 179 180 181 | |
set_checkedout(key)
Toggle a checkout-segment key in the local checkout ledger.
Called once per checkIn/checkOut operation queued, so calling it twice for the same key (once on checkOut, once on the matching checkIn) flips it back out again rather than accumulating duplicates.
Source code in cascade_cms/cmstypes.py
184 185 186 187 188 189 190 191 192 193 194 | |
resolve_identifier(identifier)
Returns the URL path segments (after the operation name) identifying this asset.
IdentifierType resolves to (asset_type, id). Path resolves to
(asset_type, siteName, path), matching the REST endpoint shape
.../{operation_name}/{asset_type}/{siteName}/{path}.
Source code in cascade_cms/cmstypes.py
412 413 414 415 416 417 418 419 420 421 422 423 | |
identifier_from_asset(asset)
Build an IdentifierType from an Asset's own id/path/site fields.
A Cascade asset payload carries its own identity as flat _data keys
(id, path, siteId, siteName) rather than the nested path shape
IdentifierType.path (PathBase) expects, so this reshapes one into the
other. Used by edit() to derive a request's identifier from the asset
being saved, rather than from a separately-supplied identifier argument.
Does not itself guard against a missing id — UUID(None) raises on
that naturally — since whether a missing id is tolerable is a decision
for the caller (e.g. OperationChain._edit_identifier raises a specific,
actionable error for its call path instead of leaving this bare failure).
Source code in cascade_cms/cmstypes.py
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | |
serialize_payload(payload)
Serialize a request payload to JSON bytes, dispatching by payload type.
Source code in cascade_cms/cmstypes.py
966 967 968 969 970 971 972 | |
parse_assets(raw)
Parse a read response body into an Asset.
Source code in cascade_cms/cmstypes.py
1012 1013 1014 1015 | |
parse_list_elements(raw)
Parse a list-shaped response body (search, listSites, etc.) into ListElements.
Source code in cascade_cms/cmstypes.py
1018 1019 1020 1021 | |
parse_payloads(raw)
Parse a generic response body into the appropriate SimplePayload subclass.
Source code in cascade_cms/cmstypes.py
1024 1025 1026 | |
parse_create_asset(raw, pass_type)
Parse a create response, rebuilding an IdentifierType from createdAssetId.
Cascade's create response only returns the new asset's id, not its
type, so pass_type (the asset_type from the original create
payload, bound via functools.partial in Operations.create) is
injected to reconstruct a full IdentifierType.
Source code in cascade_cms/cmstypes.py
1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 | |
parse_access_rights(raw)
Parse a readAccessRights response body.
Source code in cascade_cms/cmstypes.py
1051 1052 1053 | |
parse_workflow_settings(raw)
Parse a readWorkflowSettings response body.
Source code in cascade_cms/cmstypes.py
1056 1057 1058 | |
parse_checked_out_asset(raw)
Parse a checkOut response body.
Source code in cascade_cms/cmstypes.py
1061 1062 1063 | |
parse_workflow_information(raw)
Parse a readWorkflowInformation response body.
Source code in cascade_cms/cmstypes.py
1066 1067 1068 | |
parse_success(raw)
Parse a bare {"success": true} response body from a write operation.
Source code in cascade_cms/cmstypes.py
1071 1072 1073 | |