feat: add archive_name param to CompressStep (singleArchiveName field)

This commit is contained in:
2026-03-12 08:08:49 +00:00
parent 35d12addc2
commit 8c0e46789a

View File

@@ -56,14 +56,15 @@ log = logging.getLogger("st_client")
class CompressStep:
"""Compress matching files to ZIP. Non-matching files pass through."""
def __init__(self, filter="*", level="NORMAL", single_archive=False,
on_failure="PROCEED"):
archive_name=None, on_failure="PROCEED"):
self.filter = filter
self.level = level
self.single_archive = single_archive
self.archive_name = archive_name # Required when single_archive=True
self.on_failure = on_failure
def to_api(self):
return {
payload = {
"type": "Compress",
"status": "ENABLED",
"conditionType": "ALWAYS",
@@ -78,6 +79,9 @@ class CompressStep:
"singleArchiveEnabled": self.single_archive,
"zipPassword": "",
}
if self.single_archive and self.archive_name:
payload["singleArchiveName"] = self.archive_name
return payload
class PgpEncryptStep: