Skip to content

Commit 5bd8386

Browse files
release: 0.22.0 (#58)
* feat(api): api update * feat(api): add variable get * codegen metadata * feat(api): api update * feat(api): api update * codegen metadata * release: 0.22.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 6869f63 commit 5bd8386

File tree

14 files changed

+104
-20
lines changed

14 files changed

+104
-20
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.21.0"
2+
".": "0.22.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 63
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-mapi-3f6f487373e1fc7f2c20a947204f82bd9ed23e4f115776bb8c77c5272f8d619a.yml
3-
openapi_spec_hash: 1c1420f75a08c5380813d568c7dd783b
4-
config_hash: ca6dd9bd32ff9334f5878fb94f6ea7bf
1+
configured_endpoints: 64
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-mapi-d350e605aaabe0e1ac88c0632aa838b55beeb43757e54e4474abf3f1607e76b1.yml
3+
openapi_spec_hash: f70289a7e9fccb400f4fbcdf44158201
4+
config_hash: 6faa327b884de9362f7b76260eae1b71

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## 0.22.0 (2026-03-12)
4+
5+
Full Changelog: [v0.21.0...v0.22.0](https://github.com/knocklabs/knock-mgmt-node/compare/v0.21.0...v0.22.0)
6+
7+
### Features
8+
9+
* **api:** add variable get ([f3bfe23](https://github.com/knocklabs/knock-mgmt-node/commit/f3bfe23465d7051fd0d9463e5895e2066ae25500))
10+
* **api:** api update ([1722bc4](https://github.com/knocklabs/knock-mgmt-node/commit/1722bc418ee0be3a9870c53a78c24dfe6788b50f))
11+
* **api:** api update ([dede36e](https://github.com/knocklabs/knock-mgmt-node/commit/dede36e5050c3cdf45b514207058a2aaa9615a61))
12+
* **api:** api update ([8b70ec6](https://github.com/knocklabs/knock-mgmt-node/commit/8b70ec6bee4d477ff87b47b23392f6e483b69e7d))
13+
314
## 0.21.0 (2026-03-10)
415

516
Full Changelog: [v0.20.0...v0.21.0](https://github.com/knocklabs/knock-mgmt-node/compare/v0.20.0...v0.21.0)

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ Types:
242242

243243
Methods:
244244

245+
- <code title="get /v1/variables/{key}">client.variables.<a href="./src/resources/variables.ts">retrieve</a>(key) -> Variable</code>
245246
- <code title="get /v1/variables">client.variables.<a href="./src/resources/variables.ts">list</a>({ ...params }) -> VariablesEntriesCursor</code>
246247

247248
# Guides

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@knocklabs/mgmt",
3-
"version": "0.21.0",
3+
"version": "0.22.0",
44
"description": "The official TypeScript library for the Knock Mgmt API",
55
"author": "Knock Mgmt <support@knock.app>",
66
"types": "dist/index.d.ts",

src/resources/audiences.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ export interface AudienceCondition {
153153
| 'is_timestamp_before'
154154
| 'is_timestamp_on_or_after'
155155
| 'is_timestamp_between'
156+
| 'is_between'
156157
| 'empty'
157158
| 'not_empty'
158159
| 'exists'

src/resources/channel-groups.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ export interface ChannelGroupRule {
189189
| 'is_timestamp_before'
190190
| 'is_timestamp_on_or_after'
191191
| 'is_timestamp_between'
192+
| 'is_between'
192193
| 'empty'
193194
| 'not_empty'
194195
| 'exists'
@@ -294,6 +295,7 @@ export namespace ChannelGroupUpsertParams {
294295
| 'is_timestamp_before'
295296
| 'is_timestamp_on_or_after'
296297
| 'is_timestamp_between'
298+
| 'is_between'
297299
| 'empty'
298300
| 'not_empty'
299301
| 'exists'

src/resources/email-layouts.ts

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export interface EmailLayout {
130130
created_at: string;
131131

132132
/**
133-
* The complete HTML content of the email layout.
133+
* The complete HTML or MJML content of the email layout.
134134
*/
135135
html_layout: string;
136136

@@ -164,6 +164,12 @@ export interface EmailLayout {
164164
*/
165165
footer_links?: Array<EmailLayout.FooterLink>;
166166

167+
/**
168+
* Whether this layout uses MJML format. When true, html_layout must contain <mjml>
169+
* tags.
170+
*/
171+
is_mjml?: boolean;
172+
167173
/**
168174
* The timestamp of when the email layout was last updated.
169175
*/
@@ -292,7 +298,7 @@ export namespace EmailLayoutUpsertParams {
292298
*/
293299
export interface EmailLayout {
294300
/**
295-
* The complete HTML content of the email layout.
301+
* The complete HTML or MJML content of the email layout.
296302
*/
297303
html_layout: string;
298304

@@ -310,6 +316,12 @@ export namespace EmailLayoutUpsertParams {
310316
* A list of one or more items to show in the footer of the email layout.
311317
*/
312318
footer_links?: Array<EmailLayout.FooterLink>;
319+
320+
/**
321+
* Whether this layout uses MJML format. When true, html_layout must contain <mjml>
322+
* tags.
323+
*/
324+
is_mjml?: boolean | null;
313325
}
314326

315327
export namespace EmailLayout {
@@ -351,7 +363,7 @@ export namespace EmailLayoutValidateParams {
351363
*/
352364
export interface EmailLayout {
353365
/**
354-
* The complete HTML content of the email layout.
366+
* The complete HTML or MJML content of the email layout.
355367
*/
356368
html_layout: string;
357369

@@ -369,6 +381,12 @@ export namespace EmailLayoutValidateParams {
369381
* A list of one or more items to show in the footer of the email layout.
370382
*/
371383
footer_links?: Array<EmailLayout.FooterLink>;
384+
385+
/**
386+
* Whether this layout uses MJML format. When true, html_layout must contain <mjml>
387+
* tags.
388+
*/
389+
is_mjml?: boolean | null;
372390
}
373391

374392
export namespace EmailLayout {

src/resources/templates.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,24 @@ export interface EmailTemplate {
4646
subject: string;
4747

4848
/**
49-
* An HTML template for the email body. **Required** if `visual_blocks` is not
50-
* provided. Only one of `html_body` or `visual_blocks` should be set. Supports
51-
* Liquid templating with variables like `{{ recipient.name }}`,
52-
* `{{ actor.name }}`, `{{ vars.app_name }}`, `{{ data.custom_field }}`, and
53-
* `{{ tenant.name }}`. See the
49+
* An HTML or MJML template for the email body. **Required** if `visual_blocks` is
50+
* not provided. Only one of `html_body` or `visual_blocks` should be set. When
51+
* `is_mjml` is true, this must contain MJML components. Supports Liquid templating
52+
* with variables like `{{ recipient.name }}`, `{{ actor.name }}`,
53+
* `{{ vars.app_name }}`, `{{ data.custom_field }}`, and `{{ tenant.name }}`. See
54+
* the
5455
* [template variables reference](https://docs.knock.app/designing-workflows/template-editor/variables)
5556
* for available variables.
5657
*/
5758
html_body?: string | null;
5859

60+
/**
61+
* Whether this template uses MJML format. When true, the template content will be
62+
* compiled from MJML to HTML. Only valid when the selected layout is also MJML or
63+
* when no layout is selected.
64+
*/
65+
is_mjml?: boolean | null;
66+
5967
/**
6068
* A text template for the email body. When omitted, the email template will be
6169
* autogenerated from the `html_body` or `visual_blocks`.

src/resources/variables.ts

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../core/resource';
4+
import { APIPromise } from '../core/api-promise';
45
import { EntriesCursor, type EntriesCursorParams, PagePromise } from '../core/pagination';
56
import { RequestOptions } from '../internal/request-options';
7+
import { path } from '../internal/utils/path';
68

79
export class Variables extends APIResource {
810
/**
9-
* Returns a paginated list of variables for a given environment.
11+
* Returns a single variable by key with per-environment value overrides.
12+
*
13+
* @example
14+
* ```ts
15+
* const variable = await client.variables.retrieve('key');
16+
* ```
17+
*/
18+
retrieve(key: string, options?: RequestOptions): APIPromise<Variable> {
19+
return this._client.get(path`/v1/variables/${key}`, options);
20+
}
21+
22+
/**
23+
* Returns a list of variables. When an environment is specified, returns
24+
* per-environment variables. Otherwise, returns project-scoped variables with
25+
* per-environment overrides.
1026
*
1127
* @example
1228
* ```ts
@@ -50,14 +66,20 @@ export interface Variable {
5066
updated_at: string;
5167

5268
/**
53-
* The value of the variable.
69+
* The description of the variable.
70+
*/
71+
description?: string | null;
72+
73+
/**
74+
* A map of environment slugs to their override values. Only present for
75+
* project-scoped responses.
5476
*/
55-
value: string;
77+
environment_values?: { [key: string]: string | null };
5678

5779
/**
58-
* The description of the variable.
80+
* The default value of the variable. For secret variables, this is obfuscated.
5981
*/
60-
description?: string | null;
82+
value?: string | null;
6183
}
6284

6385
export interface VariableListParams extends EntriesCursorParams {
@@ -71,6 +93,11 @@ export interface VariableListParams extends EntriesCursorParams {
7193
* `"development"`.
7294
*/
7395
branch?: string;
96+
97+
/**
98+
* Filter variables by type. Supports 'public' or 'secret'.
99+
*/
100+
type?: 'public' | 'secret';
74101
}
75102

76103
export declare namespace Variables {

0 commit comments

Comments
 (0)