peak-sdk 1.14.0__tar.gz → 1.15.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/PKG-INFO +6 -6
  2. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/_metadata.py +4 -1
  3. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/_version.py +2 -2
  4. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/press/apps/specs.py +14 -1
  5. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/press/blocks/specs.py +13 -1
  6. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/press/deployments.py +58 -2
  7. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/press/apps.py +39 -1
  8. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/press/blocks.py +39 -1
  9. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/press/deployments.py +63 -1
  10. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/apps/specs/create_app_spec.yaml +31 -0
  11. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/apps/specs/create_app_spec_release.yaml +31 -0
  12. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/blocks/specs/service/api/create_block_spec.yaml +31 -0
  13. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/blocks/specs/service/api/create_block_spec_release.yaml +31 -0
  14. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/blocks/specs/service/webapp/create_block_spec.yaml +31 -0
  15. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/blocks/specs/service/webapp/create_block_spec_release.yaml +31 -0
  16. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/blocks/specs/workflow/create_block_spec.yaml +31 -0
  17. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/blocks/specs/workflow/create_block_spec_release.yaml +31 -0
  18. peak_sdk-1.15.0/peak/sample_yaml/press/deployments/patch_app_parameters_v2.yaml +15 -0
  19. peak_sdk-1.15.0/peak/sample_yaml/press/deployments/patch_block_parameters_v2.yaml +10 -0
  20. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/session.py +7 -6
  21. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/tools/logging/logger.py +2 -2
  22. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/pypi-home.md +5 -5
  23. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/pyproject.toml +2 -2
  24. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/LICENSE +0 -0
  25. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/__init__.py +0 -0
  26. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/auth.py +0 -0
  27. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/base_client.py +0 -0
  28. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/callbacks.py +0 -0
  29. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/__init_.py +0 -0
  30. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/args.py +0 -0
  31. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/cli.py +0 -0
  32. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/helpers.py +0 -0
  33. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/metrics/__init__.py +0 -0
  34. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/metrics/metrics.py +0 -0
  35. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/press/__init__.py +0 -0
  36. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/press/apps/__init__.py +0 -0
  37. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/press/apps/deployments.py +0 -0
  38. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/press/blocks/__init__.py +0 -0
  39. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/press/blocks/deployments.py +0 -0
  40. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/press/specs.py +0 -0
  41. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/resources/__init__.py +0 -0
  42. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/resources/alerts/__init__.py +0 -0
  43. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/resources/alerts/emails.py +0 -0
  44. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/resources/artifacts.py +0 -0
  45. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/resources/images.py +0 -0
  46. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/resources/services.py +0 -0
  47. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/resources/tenants.py +0 -0
  48. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/resources/users.py +0 -0
  49. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/resources/webapps.py +0 -0
  50. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/resources/workflows.py +0 -0
  51. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/ruff.toml +0 -0
  52. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/cli/version.py +0 -0
  53. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/compression.py +0 -0
  54. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/config.py +0 -0
  55. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/constants.py +0 -0
  56. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/exceptions.py +0 -0
  57. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/handler.py +0 -0
  58. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/helpers.py +0 -0
  59. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/logger.py +0 -0
  60. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/metrics/__init__.py +0 -0
  61. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/metrics/metrics.py +0 -0
  62. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/output.py +0 -0
  63. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/press/__init__.py +0 -0
  64. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/press/specs.py +0 -0
  65. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/py.typed +0 -0
  66. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/resources/__init__.py +0 -0
  67. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/resources/alerts.py +0 -0
  68. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/resources/artifacts.py +0 -0
  69. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/resources/images.py +0 -0
  70. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/resources/services.py +0 -0
  71. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/resources/tenants.py +0 -0
  72. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/resources/users.py +0 -0
  73. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/resources/webapps.py +0 -0
  74. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/resources/workflows.py +0 -0
  75. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/metrics/create_collection.yaml +0 -0
  76. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/metrics/publish.yaml +0 -0
  77. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/metrics/query.yaml +0 -0
  78. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/apps/deployments/create_app_deployment.yaml +0 -0
  79. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/apps/deployments/create_app_deployment_revision.yaml +0 -0
  80. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/apps/deployments/update_app_deployment_metadata.yaml +0 -0
  81. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/apps/specs/update_app_spec_metadata.yaml +0 -0
  82. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/blocks/deployments/create_block_deployment.yaml +0 -0
  83. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/blocks/deployments/create_block_deployment_revision.yaml +0 -0
  84. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/blocks/deployments/patch_block_parameters.yaml +0 -0
  85. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/blocks/deployments/update_block_deployment_metadata.yaml +0 -0
  86. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/blocks/specs/update_block_spec_metadata.yaml +0 -0
  87. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/press/patch_parameters.yaml +0 -0
  88. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/artifacts/create_artifact.yaml +0 -0
  89. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/artifacts/create_artifact_version.yaml +0 -0
  90. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/artifacts/update_artifact_metadata.yaml +0 -0
  91. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/emails/send_email.yaml +0 -0
  92. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/images/dockerfile/create_image.yaml +0 -0
  93. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/images/dockerfile/create_image_version.yaml +0 -0
  94. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/images/dockerfile/update_version.yaml +0 -0
  95. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/images/github/create_image.yaml +0 -0
  96. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/images/github/create_image_version.yaml +0 -0
  97. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/images/github/update_version.yaml +0 -0
  98. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/images/upload/create_image.yaml +0 -0
  99. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/images/upload/create_image_version.yaml +0 -0
  100. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/images/upload/create_or_update_image.yaml +0 -0
  101. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/images/upload/update_version.yaml +0 -0
  102. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/services/create_or_update_service.yaml +0 -0
  103. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/services/create_service.yaml +0 -0
  104. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/services/test_service.yaml +0 -0
  105. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/services/update_service.yaml +0 -0
  106. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/webapps/create_or_update_webapp.yaml +0 -0
  107. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/webapps/create_webapp.yaml +0 -0
  108. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/webapps/update_webapp.yaml +0 -0
  109. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/create_or_update_workflow.yaml +0 -0
  110. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/create_workflow.yaml +0 -0
  111. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/execute_partial_workflow.yaml +0 -0
  112. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/execute_workflow.yaml +0 -0
  113. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/patch_workflow.yaml +0 -0
  114. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/update_workflow.yaml +0 -0
  115. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/workflow_auto_retry.yaml +0 -0
  116. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/workflow_execution_parameters.yaml +0 -0
  117. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/workflow_input_parameters.yaml +0 -0
  118. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/workflow_input_parameters_inherit.yaml +0 -0
  119. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/workflow_output_parameters.yaml +0 -0
  120. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/sample_yaml/resources/workflows/workflow_skippable_steps.yaml +0 -0
  121. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/telemetry.py +0 -0
  122. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/template.py +0 -0
  123. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/tools/__init__.py +0 -0
  124. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/tools/logging/__init__.py +0 -0
  125. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/tools/logging/log_handler.py +0 -0
  126. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/tools/logging/log_level.py +0 -0
  127. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/tools/logging/utils.py +0 -0
  128. {peak_sdk-1.14.0 → peak_sdk-1.15.0}/peak/validators.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: peak-sdk
3
- Version: 1.14.0
3
+ Version: 1.15.0
4
4
  Summary: Python SDK for interacting with the Peak platform
5
5
  Home-page: https://docs.peak.ai/sdk/latest/
6
6
  License: Apache-2.0
@@ -106,7 +106,7 @@ Follow these steps to create a virtual environment using Python's built-in `venv
106
106
  This should return a response of the following format
107
107
 
108
108
  ```bash
109
- peak-cli==1.14.0
109
+ peak-cli==1.15.0
110
110
  Python==3.12.3
111
111
  System==Darwin(23.6.0)
112
112
  ```
@@ -122,14 +122,14 @@ Follow these steps to create a virtual environment using Python's built-in `venv
122
122
  This should print the version of the SDK
123
123
 
124
124
  ```
125
- 1.14.0
125
+ 1.15.0
126
126
  ```
127
127
 
128
128
  ### Using the SDK and CLI
129
129
 
130
- - To start using the SDK and CLI, you'll need either an API Key or a Personal Access Token (PAT).
131
- - If you don't have one yet, sign up for an account on the Peak platform to obtain your API key or Personal Access token (PAT).
132
- - To export it, run the following command in your terminal and replace <peak_auth_token> with your actual API key or PAT:
130
+ - To start using the SDK and CLI, you'll need a Personal Access Token (PAT).
131
+ - If you don't have one yet, sign up for an account on the Peak platform to obtain your Personal Access token (PAT).
132
+ - To export it, run the following command in your terminal and replace <peak_auth_token> with your actual PAT:
133
133
  ```
134
134
  export PEAK_AUTH_TOKEN=<peak_auth_token>
135
135
  ```
@@ -1,5 +1,5 @@
1
1
  #
2
- # # Copyright © 2024 Peak AI Limited. or its affiliates. All Rights Reserved.
2
+ # # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
3
3
  # #
4
4
  # # Licensed under the Apache License, Version 2.0 (the "License"). You
5
5
  # # may not use this file except in compliance with the License. A copy of
@@ -959,6 +959,9 @@ command_metadata: Dict[str, Any] = {
959
959
  "deployments>patch-parameters": {
960
960
  "request_body_yaml_path": "sample_yaml/press/patch_parameters.yaml",
961
961
  },
962
+ "deployments>patch-parameters-v2": {
963
+ "request_body_yaml_path": "sample_yaml/press/deployments/patch_app_parameters_v2.yaml",
964
+ },
962
965
  "metrics>publish": {
963
966
  "request_body_yaml_path": "sample_yaml/metrics/publish.yaml",
964
967
  },
@@ -1,5 +1,5 @@
1
1
  #
2
- # # Copyright © 2024 Peak AI Limited. or its affiliates. All Rights Reserved.
2
+ # # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
3
3
  # #
4
4
  # # Licensed under the Apache License, Version 2.0 (the "License"). You
5
5
  # # may not use this file except in compliance with the License. A copy of
@@ -18,4 +18,4 @@
18
18
  # # You should have received a copy of the APACHE LICENSE, VERSION 2.0
19
19
  # # along with this program. If not, see <https://apache.org/licenses/LICENSE-2.0>
20
20
  #
21
- __version__: str = "1.14.0"
21
+ __version__: str = "1.15.0"
@@ -1,5 +1,5 @@
1
1
  #
2
- # # Copyright © 2024 Peak AI Limited. or its affiliates. All Rights Reserved.
2
+ # # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
3
3
  # #
4
4
  # # Licensed under the Apache License, Version 2.0 (the "License"). You
5
5
  # # may not use this file except in compliance with the License. A copy of
@@ -19,6 +19,7 @@
19
19
  # # along with this program. If not, see <https://apache.org/licenses/LICENSE-2.0>
20
20
  #
21
21
  """Peak apps specs commands."""
22
+
22
23
  from typing import Dict, List, Optional
23
24
 
24
25
  import typer
@@ -86,6 +87,12 @@ def create(
86
87
  title (string | required: false): Title of the parameter.
87
88
  options (list(str) | required: false): List of options for the parameter. If provided, it must have at least one object with "title" and "value" field.
88
89
  hideValue(boolean | required: false): Can be optionally provided to parameters of type "string", to mask the parameter's value when it has been set at deployment time.
90
+ conditions(list(map) | required: false): Conditions that determine when the parameter should be enabled. Conditions on two or more parameters should be used with conditionType "AND" or "OR".
91
+ - dependsOn (string): Name of the parameter that this parameter depends on.
92
+ operator (string): Operator to be used for the condition. Should be one of "equals" or "not-equals".
93
+ value (string): Value to be compared with the parameter.
94
+ - conditionType (string): Type of the condition. Should be one of "AND" or "OR".
95
+ conditions (list(map)): Nested conditions that determine when the parameter should be enabled.
89
96
  ```
90
97
 
91
98
  \b
@@ -352,6 +359,12 @@ def create_release(
352
359
  title (string | required: false): Title of the parameter.
353
360
  options (list(str) | required: false): List of options for the parameter. If provided, it must have at least one object with "title" and "value" field.
354
361
  hideValue(boolean | required: false): Can be optionally provided to parameters of type "string", to mask the parameter's value when it has been set at deployment time.
362
+ conditions(list(map) | required: false): Conditions that determine when the parameter should be enabled. Conditions on two or more parameters should be used with conditionType "AND" or "OR".
363
+ - dependsOn (string): Name of the parameter that this parameter depends on.
364
+ operator (string): Operator to be used for the condition. Should be one of "equals" or "not-equals".
365
+ value (string): Value to be compared with the parameter.
366
+ - conditionType (string): Type of the condition. Should be one of "AND" or "OR".
367
+ conditions (list(map)): Nested conditions that determine when the parameter should be enabled.
355
368
  ```
356
369
 
357
370
  \b
@@ -1,5 +1,5 @@
1
1
  #
2
- # # Copyright © 2024 Peak AI Limited. or its affiliates. All Rights Reserved.
2
+ # # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
3
3
  # #
4
4
  # # Licensed under the Apache License, Version 2.0 (the "License"). You
5
5
  # # may not use this file except in compliance with the License. A copy of
@@ -344,6 +344,12 @@ def create(
344
344
  title (string | required: false): Title of the parameter.
345
345
  options (list(str) | required: false): List of options for the parameter. If provided, it must have at least one object with "title" and "value" field.
346
346
  hideValue(boolean | required: false): Can be optionally provided to parameters of type "string", to mask the parameter's value when it has been set at deployment time.
347
+ conditions(list(map) | required: false): Conditions that determine when the parameter should be enabled. Conditions on two or more parameters should be used with conditionType "AND" or "OR".
348
+ - dependsOn (string): Name of the parameter that this parameter depends on.
349
+ operator (string): Operator to be used for the condition. Should be one of "equals" or "not-equals".
350
+ value (string): Value to be compared with the parameter.
351
+ - conditionType (string): Type of the condition. Should be one of "AND" or "OR".
352
+ conditions (list(map)): Nested conditions that determine when the parameter should be enabled.
347
353
  artifact (map | required: false):
348
354
  path (str): Path to the artifact.
349
355
  ignore_files (list(str) | required: false) : Ignore files to use when creating artifact.
@@ -762,6 +768,12 @@ def create_release(
762
768
  defaultValue (string | required: false): Default value of the parameter.
763
769
  title (string | required: false): Title of the parameter.
764
770
  options (list(str) | required: false): List of options for the parameter. If provided, it must have at least one object with "title" and "value" field.
771
+ conditions(list(map) | required: false): Conditions that determine when the parameter should be enabled. Conditions on two or more parameters should be used with conditionType "AND" or "OR".
772
+ - dependsOn (string): Name of the parameter that this parameter depends on.
773
+ operator (string): Operator to be used for the condition. Should be one of "equals" or "not-equals".
774
+ value (string): Value to be compared with the parameter.
775
+ - conditionType (string): Type of the condition. Should be one of "AND" or "OR".
776
+ conditions (list(map)): Nested conditions that determine when the parameter should be enabled.
765
777
  artifact (map | required: false):
766
778
  path (str): Path to the artifact.
767
779
  ignore_files (list(str) | required: false) : Ignore files to use when creating artifact.
@@ -1,5 +1,5 @@
1
1
  #
2
- # # Copyright © 2024 Peak AI Limited. or its affiliates. All Rights Reserved.
2
+ # # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
3
3
  # #
4
4
  # # Licensed under the Apache License, Version 2.0 (the "License"). You
5
5
  # # may not use this file except in compliance with the License. A copy of
@@ -127,7 +127,7 @@ def execute_resources(
127
127
  writer.write(response)
128
128
 
129
129
 
130
- @app.command(short_help="Update the parameters for a deployment at run time.")
130
+ @app.command(short_help="Update the runtime parameters for a deployment.")
131
131
  def patch_parameters(
132
132
  ctx: typer.Context,
133
133
  deployment_id: str = _DEPLOYMENT_ID,
@@ -169,3 +169,59 @@ def patch_parameters(
169
169
  with writer.pager():
170
170
  response = deployments_client.patch_parameters(deployment_id, **body)
171
171
  writer.write(response)
172
+
173
+
174
+ @app.command(short_help="Update the App runtime parameters and Block runtime parameters for a deployment.")
175
+ def patch_parameters_v2(
176
+ ctx: typer.Context,
177
+ deployment_id: str = _DEPLOYMENT_ID,
178
+ file: str = args.TEMPLATE_PATH,
179
+ params_file: Optional[str] = args.TEMPLATE_PARAMS_FILE,
180
+ params: Optional[List[str]] = args.TEMPLATE_PARAMS,
181
+ dry_run: Optional[bool] = DRY_RUN, # noqa: ARG001
182
+ paging: Optional[bool] = PAGING, # noqa: ARG001
183
+ output_type: Optional[OutputTypesNoTable] = OUTPUT_TYPES, # noqa: ARG001
184
+ generate: Optional[bool] = GENERATE_YAML, # noqa: ARG001
185
+ ) -> None:
186
+ """***Update*** the parameters for a deployment at runtime.
187
+
188
+ \b
189
+ 🧩 ***Input file schema to update run parameters of an app deployment (yaml):***<br/>
190
+ ```yaml
191
+ body (map):
192
+ appParameters (map | required: false):
193
+ Dictionary of runtime app parameters. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
194
+ parameters (map | required: false):
195
+ <blockName> (map): Dictionary of parameters specific to each block, where each key represents the block name.
196
+ Dictionary of runtime block parameters. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
197
+ ```
198
+
199
+ 🧩 ***Input file schema to update run parameters of a block deployment (yaml):***<br/>
200
+ ```yaml
201
+ body (map):
202
+ parameters (map | required: false):
203
+ Dictionary of runtime block parameters. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
204
+ ```
205
+
206
+ \b
207
+ 📝 ***Example usage:***
208
+ ```bash
209
+ peak deployments patch-parameters-v2 <deployment-id> /path/to/body.yaml -v /path/to/params.yaml
210
+ ```
211
+
212
+ \b
213
+ 🆗 ***Response:***
214
+ ```
215
+ { appParameters: {...}, parameters: {...} }
216
+ ```
217
+
218
+ 🔗 [**API Documentation**](https://press.peak.ai/api-docs/index.htm#/Deployment%20Parameters/patch_v2_deployments__deploymentId__parameters_run)
219
+ """
220
+ body = helpers.template_handler(file, params_file, params)
221
+ deployments_client: Deployment = ctx.obj["client"]
222
+ body = helpers.remove_unknown_args(body, deployments_client.patch_parameters_v2)
223
+ writer: Writer = ctx.obj["writer"]
224
+
225
+ with writer.pager():
226
+ response = deployments_client.patch_parameters_v2(deployment_id, **body)
227
+ writer.write(response)
@@ -1,5 +1,5 @@
1
1
  #
2
- # # Copyright © 2024 Peak AI Limited. or its affiliates. All Rights Reserved.
2
+ # # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
3
3
  # #
4
4
  # # Licensed under the Apache License, Version 2.0 (the "License"). You
5
5
  # # may not use this file except in compliance with the License. A copy of
@@ -236,6 +236,25 @@ class App(BaseClient):
236
236
  "title": "string",
237
237
  "options": "list(str)",
238
238
  "hideValue": "boolean",
239
+ "conditions": [
240
+ // Basic condition
241
+ {
242
+ "dependsOn": "string",
243
+ "operator": "string",
244
+ "value": "string|number|boolean"
245
+ },
246
+ // Composite condition
247
+ {
248
+ "conditionType": "AND|OR",
249
+ "conditions": [
250
+ {
251
+ "dependsOn": "string",
252
+ "operator": "string",
253
+ "value": "string|number|boolean"
254
+ }
255
+ ]
256
+ }
257
+ ]
239
258
  }
240
259
  ]
241
260
  }
@@ -426,6 +445,25 @@ class App(BaseClient):
426
445
  "required": "boolean(required)",
427
446
  "title": "string",
428
447
  "type": "string(required)",
448
+ "conditions": [
449
+ // Basic condition
450
+ {
451
+ "dependsOn": "string",
452
+ "operator": "string",
453
+ "value": "string|number|boolean"
454
+ },
455
+ // Composite condition
456
+ {
457
+ "conditionType": "AND|OR",
458
+ "conditions": [
459
+ {
460
+ "dependsOn": "string",
461
+ "operator": "string",
462
+ "value": "string|number|boolean"
463
+ }
464
+ ]
465
+ }
466
+ ]
429
467
  }
430
468
  ]
431
469
  }
@@ -1,5 +1,5 @@
1
1
  #
2
- # # Copyright © 2024 Peak AI Limited. or its affiliates. All Rights Reserved.
2
+ # # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
3
3
  # #
4
4
  # # Licensed under the Apache License, Version 2.0 (the "License"). You
5
5
  # # may not use this file except in compliance with the License. A copy of
@@ -574,6 +574,25 @@ class Block(BaseClient):
574
574
  "required": "boolean(required)",
575
575
  "title": "string",
576
576
  "type": "string(required)",
577
+ "conditions": [
578
+ // Basic condition
579
+ {
580
+ "dependsOn": "string",
581
+ "operator": "equals|not-equals",
582
+ "value": "string|number|boolean"
583
+ },
584
+ // Composite condition
585
+ {
586
+ "conditionType": "AND|OR",
587
+ "conditions": [
588
+ {
589
+ "dependsOn": "string",
590
+ "operator": "equals|not-equals",
591
+ "value": "string|number|boolean"
592
+ }
593
+ ]
594
+ }
595
+ ]
577
596
  }
578
597
  ]
579
598
  }
@@ -1123,6 +1142,25 @@ class Block(BaseClient):
1123
1142
  "required": "boolean(required)",
1124
1143
  "title": "string",
1125
1144
  "type": "string(required)",
1145
+ "conditions": [
1146
+ // Basic condition
1147
+ {
1148
+ "dependsOn": "string",
1149
+ "operator": "equals|not-equals",
1150
+ "value": "string|number|boolean"
1151
+ },
1152
+ // Composite condition
1153
+ {
1154
+ "conditionType": "AND|OR",
1155
+ "conditions": [
1156
+ {
1157
+ "dependsOn": "string",
1158
+ "operator": "equals|not-equals",
1159
+ "value": "string|number|boolean"
1160
+ }
1161
+ ]
1162
+ }
1163
+ ]
1126
1164
  }
1127
1165
  ]
1128
1166
  }
@@ -1,5 +1,5 @@
1
1
  #
2
- # # Copyright © 2024 Peak AI Limited. or its affiliates. All Rights Reserved.
2
+ # # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
3
3
  # #
4
4
  # # Licensed under the Apache License, Version 2.0 (the "License"). You
5
5
  # # may not use this file except in compliance with the License. A copy of
@@ -188,6 +188,68 @@ class Deployment(BaseClient):
188
188
  subdomain="press",
189
189
  )
190
190
 
191
+ def patch_parameters_v2(
192
+ self,
193
+ deployment_id: str,
194
+ body: Dict[str, Any],
195
+ ) -> Dict[str, Any]:
196
+ """Get the runtime parameters for a deployment.
197
+
198
+ REFERENCE:
199
+ 🔗 `API Documentation <https://press.peak.ai/api-docs/index.htm#/Deployment%20Parameters/patch_v2_deployments__deploymentId__parameters_run>`__
200
+
201
+ Args:
202
+ deployment_id (str): The ID of the deployment.
203
+ body (Dict[str, Any]): body (Dict[str, str]): Dictionary of app and block parameters.
204
+
205
+ Returns:
206
+ Dict[str, Any]: Dictionary containing app and block parameters.
207
+
208
+ SCHEMA(Block Deployment Run Parameters):
209
+ The valid types for parameters are `boolean`, `string`, `string_array`, `number`, `number_array`, `object` and `object_array`.
210
+
211
+ .. code-block:: json
212
+
213
+ {
214
+ "parameters": {
215
+ "param_name": "param_value (string | number | boolean | dict | array)"
216
+ }
217
+ }
218
+
219
+ SCHEMA(App Deployment Run Parameters):
220
+ The valid types for parameters are `boolean`, `string`, `string_array`, `number`, `number_array`, `object` and `object_array`.
221
+
222
+ .. code-block:: json
223
+
224
+ {
225
+ "appParameters": {
226
+ "param_name": "param_value (string | number | boolean | dict | array)"
227
+ },
228
+ "parameters": {
229
+ "block_name": {
230
+ "param_name": "param_value (string | number | boolean | dict | array)"
231
+ }
232
+ }
233
+ }
234
+
235
+ Raises:
236
+ BadRequestException: The given parameters are invalid.
237
+ UnauthorizedException: The credentials are invalid.
238
+ ForbiddenException: The user does not have permission to perform the operation.
239
+ NotFoundException: The given deployment does not exist.
240
+ InternalServerErrorException: The server encountered an unexpected condition that
241
+ prevented it from fulfilling the request.
242
+ """
243
+ method, endpoint = HttpMethods.PATCH, f"v2/deployments/{deployment_id}/parameters/run"
244
+
245
+ return self.session.create_request( # type: ignore[no-any-return]
246
+ endpoint,
247
+ method,
248
+ body=body,
249
+ content_type=ContentType.APPLICATION_JSON,
250
+ subdomain="press",
251
+ )
252
+
191
253
 
192
254
  def get_client(session: Optional[Session] = None) -> Deployment:
193
255
  """Returns a Deployment client.
@@ -87,6 +87,37 @@ parameters:
87
87
  defaultValue:
88
88
  - input.csv
89
89
  - output.csv
90
+ - name: max_retries
91
+ type: number
92
+ required: false
93
+ title: Maximum Retries
94
+ description: Set maximum number of retry attempts
95
+ defaultValue: 3
96
+ - description: "specify the method to aggregate the data"
97
+ hideValue: true
98
+ required: true
99
+ title: "Aggregation Method"
100
+ name: "aggregation_method"
101
+ type: "string"
102
+ conditions:
103
+ - conditionType: "AND"
104
+ conditions:
105
+ - dependsOn: "max_retries"
106
+ operator: "equals"
107
+ value: 3
108
+ - dependsOn: "agg_type"
109
+ operator: "equals"
110
+ value: "AVG"
111
+ - description: "Specify the filtering criteria for data processing"
112
+ hideValue: true
113
+ required: true
114
+ title: "Filter Condition"
115
+ name: "filter_condition"
116
+ type: "string"
117
+ conditions:
118
+ - dependsOn: "max_retries"
119
+ operator: "equals"
120
+ value: 3
90
121
  featured: true
91
122
  scope: shared
92
123
  tenants:
@@ -76,3 +76,34 @@ parameters:
76
76
  defaultValue:
77
77
  - input.csv
78
78
  - output.csv
79
+ - name: max_retries
80
+ type: number
81
+ required: false
82
+ title: Maximum Retries
83
+ description: Set maximum number of retry attempts
84
+ defaultValue: 3
85
+ - description: "specify the method to aggregate the data"
86
+ hideValue: true
87
+ required: true
88
+ title: "Aggregation Method"
89
+ name: "aggregation_method"
90
+ type: "string"
91
+ conditions:
92
+ - conditionType: "AND"
93
+ conditions:
94
+ - dependsOn: "max_retries"
95
+ operator: "equals"
96
+ value: 3
97
+ - dependsOn: "agg_type"
98
+ operator: "equals"
99
+ value: "AVG"
100
+ - description: "Specify the filtering criteria for data processing"
101
+ hideValue: true
102
+ required: true
103
+ title: "Filter Condition"
104
+ name: "filter_condition"
105
+ type: "string"
106
+ conditions:
107
+ - dependsOn: "max_retries"
108
+ operator: "equals"
109
+ value: 3
@@ -90,6 +90,37 @@ parameters:
90
90
  defaultValue:
91
91
  - input.csv
92
92
  - output.csv
93
+ - name: max_retries
94
+ type: number
95
+ required: false
96
+ title: Maximum Retries
97
+ description: Set maximum number of retry attempts
98
+ defaultValue: 3
99
+ - description: "specify the method to aggregate the data"
100
+ hideValue: true
101
+ required: true
102
+ title: "Aggregation Method"
103
+ name: "aggregation_method"
104
+ type: "string"
105
+ conditions:
106
+ - conditionType: "AND"
107
+ conditions:
108
+ - dependsOn: "max_retries"
109
+ operator: "equals"
110
+ value: 3
111
+ - dependsOn: "agg_type"
112
+ operator: "equals"
113
+ value: "AVG"
114
+ - description: "Specify the filtering criteria for data processing"
115
+ hideValue: true
116
+ required: true
117
+ title: "Filter Condition"
118
+ name: "filter_condition"
119
+ type: "string"
120
+ conditions:
121
+ - dependsOn: "max_retries"
122
+ operator: "equals"
123
+ value: 3
93
124
  artifact:
94
125
  path: "."
95
126
  ignore_files:
@@ -81,6 +81,37 @@ parameters:
81
81
  defaultValue:
82
82
  - input.csv
83
83
  - output.csv
84
+ - name: max_retries
85
+ type: number
86
+ required: false
87
+ title: Maximum Retries
88
+ description: Set maximum number of retry attempts
89
+ defaultValue: 3
90
+ - description: "specify the method to aggregate the data"
91
+ hideValue: true
92
+ required: true
93
+ title: "Aggregation Method"
94
+ name: "aggregation_method"
95
+ type: "string"
96
+ conditions:
97
+ - conditionType: "AND"
98
+ conditions:
99
+ - dependsOn: "max_retries"
100
+ operator: "equals"
101
+ value: 3
102
+ - dependsOn: "agg_type"
103
+ operator: "equals"
104
+ value: "AVG"
105
+ - description: "Specify the filtering criteria for data processing"
106
+ hideValue: true
107
+ required: true
108
+ title: "Filter Condition"
109
+ name: "filter_condition"
110
+ type: "string"
111
+ conditions:
112
+ - dependsOn: "max_retries"
113
+ operator: "equals"
114
+ value: 3
84
115
  artifact:
85
116
  path: "."
86
117
  ignore_files:
@@ -92,6 +92,37 @@ parameters:
92
92
  defaultValue:
93
93
  - input.csv
94
94
  - output.csv
95
+ - name: max_retries
96
+ type: number
97
+ required: false
98
+ title: Maximum Retries
99
+ description: Set maximum number of retry attempts
100
+ defaultValue: 3
101
+ - description: "specify the method to aggregate the data"
102
+ hideValue: true
103
+ required: true
104
+ title: "Aggregation Method"
105
+ name: "aggregation_method"
106
+ type: "string"
107
+ conditions:
108
+ - conditionType: "AND"
109
+ conditions:
110
+ - dependsOn: "max_retries"
111
+ operator: "equals"
112
+ value: 3
113
+ - dependsOn: "agg_type"
114
+ operator: "equals"
115
+ value: "AVG"
116
+ - description: "Specify the filtering criteria for data processing"
117
+ hideValue: true
118
+ required: true
119
+ title: "Filter Condition"
120
+ name: "filter_condition"
121
+ type: "string"
122
+ conditions:
123
+ - dependsOn: "max_retries"
124
+ operator: "equals"
125
+ value: 3
95
126
  artifact:
96
127
  path: "."
97
128
  ignore_files:
@@ -83,6 +83,37 @@ parameters:
83
83
  defaultValue:
84
84
  - input.csv
85
85
  - output.csv
86
+ - name: max_retries
87
+ type: number
88
+ required: false
89
+ title: Maximum Retries
90
+ description: Set maximum number of retry attempts
91
+ defaultValue: 3
92
+ - description: "specify the method to aggregate the data"
93
+ hideValue: true
94
+ required: true
95
+ title: "Aggregation Method"
96
+ name: "aggregation_method"
97
+ type: "string"
98
+ conditions:
99
+ - conditionType: "AND"
100
+ conditions:
101
+ - dependsOn: "max_retries"
102
+ operator: "equals"
103
+ value: 3
104
+ - dependsOn: "agg_type"
105
+ operator: "equals"
106
+ value: "AVG"
107
+ - description: "Specify the filtering criteria for data processing"
108
+ hideValue: true
109
+ required: true
110
+ title: "Filter Condition"
111
+ name: "filter_condition"
112
+ type: "string"
113
+ conditions:
114
+ - dependsOn: "max_retries"
115
+ operator: "equals"
116
+ value: 3
86
117
  artifact:
87
118
  path: "."
88
119
  ignore_files: