Skip to content

Commit 6b36373

Browse files
feat(api): api update
1 parent 070beab commit 6b36373

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 45
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-mapi-310a2e25c41149fe061e3c53d969392ca8bf4335762a32ce5b5d376990f4037d.yml
3-
openapi_spec_hash: 0399fa6824e38cdb61fc9e8bd55d9622
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-mapi-3ecceed264a62adba59c787f105549f62109739328db523366159f22c2ed1ee6.yml
3+
openapi_spec_hash: 80b5362bf4f1ce98bc016406dc7e1bed
44
config_hash: 34780c6a4340e5f9ddfb18f6b534eea5

src/knock_mapi/resources/commits.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ def promote_all(
233233
self,
234234
*,
235235
to_environment: str,
236+
branch: str | Omit = omit,
236237
resource_id: str | Omit = omit,
237238
resource_type: Union[
238239
Literal["audience", "email_layout", "guide", "message_type", "partial", "translation", "workflow"],
@@ -258,7 +259,10 @@ def promote_all(
258259
“production” (in that order), setting this param to “production” will promote
259260
all commits not currently in production from staging.
260261
261-
Note: This must be a non-development environment.
262+
When this param is set to `"development"`, the `"branch"` param must be
263+
provided.
264+
265+
branch: The slug of the branch to promote all changes from.
262266
263267
resource_id: Filter commits to promote by resource identifier. Must be used together with
264268
resource_type.
@@ -284,6 +288,7 @@ def promote_all(
284288
query=maybe_transform(
285289
{
286290
"to_environment": to_environment,
291+
"branch": branch,
287292
"resource_id": resource_id,
288293
"resource_type": resource_type,
289294
},
@@ -532,6 +537,7 @@ async def promote_all(
532537
self,
533538
*,
534539
to_environment: str,
540+
branch: str | Omit = omit,
535541
resource_id: str | Omit = omit,
536542
resource_type: Union[
537543
Literal["audience", "email_layout", "guide", "message_type", "partial", "translation", "workflow"],
@@ -557,7 +563,10 @@ async def promote_all(
557563
“production” (in that order), setting this param to “production” will promote
558564
all commits not currently in production from staging.
559565
560-
Note: This must be a non-development environment.
566+
When this param is set to `"development"`, the `"branch"` param must be
567+
provided.
568+
569+
branch: The slug of the branch to promote all changes from.
561570
562571
resource_id: Filter commits to promote by resource identifier. Must be used together with
563572
resource_type.
@@ -583,6 +592,7 @@ async def promote_all(
583592
query=await async_maybe_transform(
584593
{
585594
"to_environment": to_environment,
595+
"branch": branch,
586596
"resource_id": resource_id,
587597
"resource_type": resource_type,
588598
},

src/knock_mapi/types/commit_promote_all_params.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ class CommitPromoteAllParams(TypedDict, total=False):
1818
“production” (in that order), setting this param to “production” will promote
1919
all commits not currently in production from staging.
2020
21-
Note: This must be a non-development environment.
21+
When this param is set to `"development"`, the `"branch"` param must be
22+
provided.
2223
"""
2324

25+
branch: str
26+
"""The slug of the branch to promote all changes from."""
27+
2428
resource_id: str
2529
"""Filter commits to promote by resource identifier.
2630

tests/api_resources/test_commits.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def test_method_promote_all(self, client: KnockMgmt) -> None:
173173
def test_method_promote_all_with_all_params(self, client: KnockMgmt) -> None:
174174
commit = client.commits.promote_all(
175175
to_environment="to_environment",
176+
branch="branch",
176177
resource_id="resource_id",
177178
resource_type="audience",
178179
)
@@ -402,6 +403,7 @@ async def test_method_promote_all(self, async_client: AsyncKnockMgmt) -> None:
402403
async def test_method_promote_all_with_all_params(self, async_client: AsyncKnockMgmt) -> None:
403404
commit = await async_client.commits.promote_all(
404405
to_environment="to_environment",
406+
branch="branch",
405407
resource_id="resource_id",
406408
resource_type="audience",
407409
)

0 commit comments

Comments
 (0)