Skip to content

Commit cdf34d7

Browse files
feat(api): api update
1 parent 7d0d80e commit cdf34d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+738
-22
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: 41
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-mapi-11b93111b3fcec2e7fdb30e113b0deb03cea8b42c80e03be9a50ebad0f81663d.yml
3-
openapi_spec_hash: c1732237aba39851ff1c185b8fe8458f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-mapi-310a2e25c41149fe061e3c53d969392ca8bf4335762a32ce5b5d376990f4037d.yml
3+
openapi_spec_hash: 0399fa6824e38cdb61fc9e8bd55d9622
44
config_hash: 643ed3f0dab73b4c79c1657cc34ef298

src/knock_mapi/resources/commits.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def list(
8787
environment: str,
8888
after: str | Omit = omit,
8989
before: str | Omit = omit,
90+
branch: str | Omit = omit,
9091
limit: int | Omit = omit,
9192
promoted: bool | Omit = omit,
9293
resource_id: str | Omit = omit,
@@ -114,6 +115,9 @@ def list(
114115
115116
before: The cursor to fetch entries before.
116117
118+
branch: The slug of a branch to use. This option can only be used when `environment` is
119+
`"development"`.
120+
117121
limit: The number of entries to fetch per-page.
118122
119123
promoted: Whether to show commits in the given environment that have not been promoted to
@@ -148,6 +152,7 @@ def list(
148152
"environment": environment,
149153
"after": after,
150154
"before": before,
155+
"branch": branch,
151156
"limit": limit,
152157
"promoted": promoted,
153158
"resource_id": resource_id,
@@ -163,6 +168,7 @@ def commit_all(
163168
self,
164169
*,
165170
environment: str,
171+
branch: str | Omit = omit,
166172
commit_message: str | Omit = omit,
167173
resource_id: str | Omit = omit,
168174
resource_type: Union[
@@ -183,6 +189,9 @@ def commit_all(
183189
Args:
184190
environment: The environment slug.
185191
192+
branch: The slug of a branch to use. This option can only be used when `environment` is
193+
`"development"`.
194+
186195
commit_message: An optional message to include in a commit.
187196
188197
resource_id: Filter changes to commit by resource identifier. Must be used together with
@@ -209,6 +218,7 @@ def commit_all(
209218
query=maybe_transform(
210219
{
211220
"environment": environment,
221+
"branch": branch,
212222
"commit_message": commit_message,
213223
"resource_id": resource_id,
214224
"resource_type": resource_type,
@@ -376,6 +386,7 @@ def list(
376386
environment: str,
377387
after: str | Omit = omit,
378388
before: str | Omit = omit,
389+
branch: str | Omit = omit,
379390
limit: int | Omit = omit,
380391
promoted: bool | Omit = omit,
381392
resource_id: str | Omit = omit,
@@ -403,6 +414,9 @@ def list(
403414
404415
before: The cursor to fetch entries before.
405416
417+
branch: The slug of a branch to use. This option can only be used when `environment` is
418+
`"development"`.
419+
406420
limit: The number of entries to fetch per-page.
407421
408422
promoted: Whether to show commits in the given environment that have not been promoted to
@@ -437,6 +451,7 @@ def list(
437451
"environment": environment,
438452
"after": after,
439453
"before": before,
454+
"branch": branch,
440455
"limit": limit,
441456
"promoted": promoted,
442457
"resource_id": resource_id,
@@ -452,6 +467,7 @@ async def commit_all(
452467
self,
453468
*,
454469
environment: str,
470+
branch: str | Omit = omit,
455471
commit_message: str | Omit = omit,
456472
resource_id: str | Omit = omit,
457473
resource_type: Union[
@@ -472,6 +488,9 @@ async def commit_all(
472488
Args:
473489
environment: The environment slug.
474490
491+
branch: The slug of a branch to use. This option can only be used when `environment` is
492+
`"development"`.
493+
475494
commit_message: An optional message to include in a commit.
476495
477496
resource_id: Filter changes to commit by resource identifier. Must be used together with
@@ -498,6 +517,7 @@ async def commit_all(
498517
query=await async_maybe_transform(
499518
{
500519
"environment": environment,
520+
"branch": branch,
501521
"commit_message": commit_message,
502522
"resource_id": resource_id,
503523
"resource_type": resource_type,

src/knock_mapi/resources/email_layouts.py

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def retrieve(
5555
*,
5656
environment: str,
5757
annotate: bool | Omit = omit,
58+
branch: str | Omit = omit,
5859
hide_uncommitted_changes: bool | Omit = omit,
5960
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6061
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -71,6 +72,9 @@ def retrieve(
7172
7273
annotate: Whether to annotate the resource. Only used in the Knock CLI.
7374
75+
branch: The slug of a branch to use. This option can only be used when `environment` is
76+
`"development"`.
77+
7478
hide_uncommitted_changes: Whether to hide uncommitted changes. When true, only committed changes will be
7579
returned. When false, both committed and uncommitted changes will be returned.
7680
@@ -95,6 +99,7 @@ def retrieve(
9599
{
96100
"environment": environment,
97101
"annotate": annotate,
102+
"branch": branch,
98103
"hide_uncommitted_changes": hide_uncommitted_changes,
99104
},
100105
email_layout_retrieve_params.EmailLayoutRetrieveParams,
@@ -110,6 +115,7 @@ def list(
110115
after: str | Omit = omit,
111116
annotate: bool | Omit = omit,
112117
before: str | Omit = omit,
118+
branch: str | Omit = omit,
113119
hide_uncommitted_changes: bool | Omit = omit,
114120
limit: int | Omit = omit,
115121
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -131,6 +137,9 @@ def list(
131137
132138
before: The cursor to fetch entries before.
133139
140+
branch: The slug of a branch to use. This option can only be used when `environment` is
141+
`"development"`.
142+
134143
hide_uncommitted_changes: Whether to hide uncommitted changes. When true, only committed changes will be
135144
returned. When false, both committed and uncommitted changes will be returned.
136145
@@ -158,6 +167,7 @@ def list(
158167
"after": after,
159168
"annotate": annotate,
160169
"before": before,
170+
"branch": branch,
161171
"hide_uncommitted_changes": hide_uncommitted_changes,
162172
"limit": limit,
163173
},
@@ -174,6 +184,7 @@ def upsert(
174184
environment: str,
175185
email_layout: email_layout_upsert_params.EmailLayout,
176186
annotate: bool | Omit = omit,
187+
branch: str | Omit = omit,
177188
commit: bool | Omit = omit,
178189
commit_message: str | Omit = omit,
179190
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -195,6 +206,9 @@ def upsert(
195206
196207
annotate: Whether to annotate the resource. Only used in the Knock CLI.
197208
209+
branch: The slug of a branch to use. This option can only be used when `environment` is
210+
`"development"`.
211+
198212
commit: Whether to commit the resource at the same time as modifying it.
199213
200214
commit_message: The message to commit the resource with, only used if `commit` is `true`.
@@ -221,6 +235,7 @@ def upsert(
221235
{
222236
"environment": environment,
223237
"annotate": annotate,
238+
"branch": branch,
224239
"commit": commit,
225240
"commit_message": commit_message,
226241
},
@@ -236,6 +251,7 @@ def validate(
236251
*,
237252
environment: str,
238253
email_layout: email_layout_validate_params.EmailLayout,
254+
branch: str | Omit = omit,
239255
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
240256
# The extra values given here take precedence over values defined on the client or passed to this method.
241257
extra_headers: Headers | None = None,
@@ -253,6 +269,9 @@ def validate(
253269
254270
email_layout: A request to update or create an email layout.
255271
272+
branch: The slug of a branch to use. This option can only be used when `environment` is
273+
`"development"`.
274+
256275
extra_headers: Send extra headers
257276
258277
extra_query: Add additional query parameters to the request
@@ -274,7 +293,11 @@ def validate(
274293
extra_body=extra_body,
275294
timeout=timeout,
276295
query=maybe_transform(
277-
{"environment": environment}, email_layout_validate_params.EmailLayoutValidateParams
296+
{
297+
"environment": environment,
298+
"branch": branch,
299+
},
300+
email_layout_validate_params.EmailLayoutValidateParams,
278301
),
279302
),
280303
cast_to=EmailLayoutValidateResponse,
@@ -307,6 +330,7 @@ async def retrieve(
307330
*,
308331
environment: str,
309332
annotate: bool | Omit = omit,
333+
branch: str | Omit = omit,
310334
hide_uncommitted_changes: bool | Omit = omit,
311335
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
312336
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -323,6 +347,9 @@ async def retrieve(
323347
324348
annotate: Whether to annotate the resource. Only used in the Knock CLI.
325349
350+
branch: The slug of a branch to use. This option can only be used when `environment` is
351+
`"development"`.
352+
326353
hide_uncommitted_changes: Whether to hide uncommitted changes. When true, only committed changes will be
327354
returned. When false, both committed and uncommitted changes will be returned.
328355
@@ -347,6 +374,7 @@ async def retrieve(
347374
{
348375
"environment": environment,
349376
"annotate": annotate,
377+
"branch": branch,
350378
"hide_uncommitted_changes": hide_uncommitted_changes,
351379
},
352380
email_layout_retrieve_params.EmailLayoutRetrieveParams,
@@ -362,6 +390,7 @@ def list(
362390
after: str | Omit = omit,
363391
annotate: bool | Omit = omit,
364392
before: str | Omit = omit,
393+
branch: str | Omit = omit,
365394
hide_uncommitted_changes: bool | Omit = omit,
366395
limit: int | Omit = omit,
367396
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -383,6 +412,9 @@ def list(
383412
384413
before: The cursor to fetch entries before.
385414
415+
branch: The slug of a branch to use. This option can only be used when `environment` is
416+
`"development"`.
417+
386418
hide_uncommitted_changes: Whether to hide uncommitted changes. When true, only committed changes will be
387419
returned. When false, both committed and uncommitted changes will be returned.
388420
@@ -410,6 +442,7 @@ def list(
410442
"after": after,
411443
"annotate": annotate,
412444
"before": before,
445+
"branch": branch,
413446
"hide_uncommitted_changes": hide_uncommitted_changes,
414447
"limit": limit,
415448
},
@@ -426,6 +459,7 @@ async def upsert(
426459
environment: str,
427460
email_layout: email_layout_upsert_params.EmailLayout,
428461
annotate: bool | Omit = omit,
462+
branch: str | Omit = omit,
429463
commit: bool | Omit = omit,
430464
commit_message: str | Omit = omit,
431465
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -447,6 +481,9 @@ async def upsert(
447481
448482
annotate: Whether to annotate the resource. Only used in the Knock CLI.
449483
484+
branch: The slug of a branch to use. This option can only be used when `environment` is
485+
`"development"`.
486+
450487
commit: Whether to commit the resource at the same time as modifying it.
451488
452489
commit_message: The message to commit the resource with, only used if `commit` is `true`.
@@ -475,6 +512,7 @@ async def upsert(
475512
{
476513
"environment": environment,
477514
"annotate": annotate,
515+
"branch": branch,
478516
"commit": commit,
479517
"commit_message": commit_message,
480518
},
@@ -490,6 +528,7 @@ async def validate(
490528
*,
491529
environment: str,
492530
email_layout: email_layout_validate_params.EmailLayout,
531+
branch: str | Omit = omit,
493532
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
494533
# The extra values given here take precedence over values defined on the client or passed to this method.
495534
extra_headers: Headers | None = None,
@@ -507,6 +546,9 @@ async def validate(
507546
508547
email_layout: A request to update or create an email layout.
509548
549+
branch: The slug of a branch to use. This option can only be used when `environment` is
550+
`"development"`.
551+
510552
extra_headers: Send extra headers
511553
512554
extra_query: Add additional query parameters to the request
@@ -528,7 +570,11 @@ async def validate(
528570
extra_body=extra_body,
529571
timeout=timeout,
530572
query=await async_maybe_transform(
531-
{"environment": environment}, email_layout_validate_params.EmailLayoutValidateParams
573+
{
574+
"environment": environment,
575+
"branch": branch,
576+
},
577+
email_layout_validate_params.EmailLayoutValidateParams,
532578
),
533579
),
534580
cast_to=EmailLayoutValidateResponse,

0 commit comments

Comments
 (0)