diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 945fbaf..c84411f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.25.0" + ".": "0.26.0" } diff --git a/.stats.yml b/.stats.yml index 24fec55..794dabc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 12 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sequenzy/sequenzy-f997c1c36f6343f2751d98c206162e8685c98765b384edd5277543ddb24e52a3.yml -openapi_spec_hash: 40ced574fa5887f40c827ea53267ffca +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sequenzy/sequenzy-c6fd81590d42e585def0ace329e14712c04163516175ce4a4abcb02a855e3c95.yml +openapi_spec_hash: a802ba0889a22ce20cf282b1ba168c54 config_hash: 51c1d1194ac58d8c8e3162839c8f84dd diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f0d089..6e36337 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.26.0 (2026-06-26) + +Full Changelog: [v0.25.0...v0.26.0](https://github.com/Sequenzy/sequenzy-typescript/compare/v0.25.0...v0.26.0) + +### Features + +* **api:** api update ([7a3d52e](https://github.com/Sequenzy/sequenzy-typescript/commit/7a3d52e03f858d9fd517a2dcbcde8d8983049614)) + ## 0.25.0 (2026-06-25) Full Changelog: [v0.24.0...v0.25.0](https://github.com/Sequenzy/sequenzy-typescript/compare/v0.24.0...v0.25.0) diff --git a/package.json b/package.json index 2e21dc4..599ca38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sequenzy", - "version": "0.25.0", + "version": "0.26.0", "description": "The official TypeScript library for the Sequenzy API", "author": "Sequenzy ", "types": "dist/index.d.ts", diff --git a/src/resources/transactional.ts b/src/resources/transactional.ts index 88e5330..663ba6e 100644 --- a/src/resources/transactional.ts +++ b/src/resources/transactional.ts @@ -51,9 +51,11 @@ export class Transactional extends APIResource { * profile exists, replies are captured in Sequenzy but are not forwarded * externally. Variables can be passed to customize the email content. Nested * objects and arrays are supported for repeat blocks, such as `items`. Returns - * immediately with a job ID. If a queued send references a required variable that - * is not provided and has no default, the worker records the send as failed during - * background rendering. + * immediately with a job ID. If Sequenzy detects likely missing or unused + * variables before queueing, the successful response includes a non-blocking + * `diagnostics` warning object. Missing values do not block queueing; if a queued + * send references a required variable that is not provided and has no default, the + * worker may record the send as failed during background rendering. * * @example * ```ts @@ -97,6 +99,12 @@ export type TransactionalSendResponse = export namespace TransactionalSendResponse { export interface SlugBasedResponse { + /** + * Non-blocking warnings about likely template variable issues. The send is still + * queued when this object is present. + */ + diagnostics?: SlugBasedResponse.Diagnostics; + jobId?: string; success?: boolean; @@ -107,6 +115,54 @@ export namespace TransactionalSendResponse { } export namespace SlugBasedResponse { + /** + * Non-blocking warnings about likely template variable issues. The send is still + * queued when this object is present. + */ + export interface Diagnostics { + message: string; + + missingRequiredVariables: Array; + + status: 'warning'; + + unusedVariables: Array; + } + + export namespace Diagnostics { + export interface MissingRequiredVariable { + lookupName?: string; + + message?: string; + + name?: string; + + suggestions?: Array; + + usedIn?: Array; + } + + export namespace MissingRequiredVariable { + export interface UsedIn { + blockId?: string; + + blockType?: string; + + field?: string; + + surface?: 'subject' | 'previewText' | 'body' | 'block'; + } + } + + export interface UnusedVariable { + message?: string; + + name?: string; + + suggestions?: Array; + } + } + export interface Transactional { id?: string; @@ -117,12 +173,68 @@ export namespace TransactionalSendResponse { } export interface DirectContentResponse { + /** + * Non-blocking warnings about likely template variable issues. The send is still + * queued when this object is present. + */ + diagnostics?: DirectContentResponse.Diagnostics; + jobId?: string; success?: boolean; to?: string | Array; } + + export namespace DirectContentResponse { + /** + * Non-blocking warnings about likely template variable issues. The send is still + * queued when this object is present. + */ + export interface Diagnostics { + message: string; + + missingRequiredVariables: Array; + + status: 'warning'; + + unusedVariables: Array; + } + + export namespace Diagnostics { + export interface MissingRequiredVariable { + lookupName?: string; + + message?: string; + + name?: string; + + suggestions?: Array; + + usedIn?: Array; + } + + export namespace MissingRequiredVariable { + export interface UsedIn { + blockId?: string; + + blockType?: string; + + field?: string; + + surface?: 'subject' | 'previewText' | 'body' | 'block'; + } + } + + export interface UnusedVariable { + message?: string; + + name?: string; + + suggestions?: Array; + } + } + } } export interface TransactionalSendParams { @@ -207,8 +319,9 @@ export interface TransactionalSendParams { * scalars, nested objects, or arrays used by repeat blocks. Raw HTML templates can * use simple subscriber/custom-attribute conditionals such as * `{{#if subscriber.plan}}...{{else}}...{{/if}}` and - * `{{#unless subscriber.plan}}...{{/unless}}`. Missing required variables are - * recorded as failed sends during background rendering after the request is + * `{{#unless subscriber.plan}}...{{/unless}}`. Likely variable issues are returned + * as non-blocking diagnostics when possible; missing required variables may still + * be recorded as failed sends during background rendering after the request is * accepted. */ variables?: { [key: string]: unknown }; diff --git a/src/version.ts b/src/version.ts index 4931d4f..aa25151 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.25.0'; // x-release-please-version +export const VERSION = '0.26.0'; // x-release-please-version