From 3c6387095be9fed8c7c4f81435d7a87425e463bf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 14:58:23 +0000 Subject: [PATCH 1/4] feat: Make Contact requirements for mailers clearer - can pass in ID or contact inline --- .stats.yml | 4 +- README.md | 1 - src/resources/print-mail/boxes.ts | 46 ++++++-- src/resources/print-mail/cheques.ts | 38 +++++-- src/resources/print-mail/contacts.ts | 46 ++++---- src/resources/print-mail/events.ts | 8 +- src/resources/print-mail/letters.ts | 72 +++++++++---- src/resources/print-mail/postcards.ts | 100 +++++++++++++----- .../return-envelopes/return-envelopes.ts | 11 +- src/resources/print-mail/self-mailers.ts | 96 ++++++++++++----- src/resources/print-mail/snap-packs.ts | 72 +++++++++---- .../virtual-mailboxes/virtual-mailboxes.ts | 10 +- src/resources/print-mail/webhooks.ts | 14 ++- .../api-resources/print-mail/cheques.test.ts | 2 +- .../api-resources/print-mail/contacts.test.ts | 3 +- .../api-resources/print-mail/letters.test.ts | 16 +-- .../print-mail/postcards.test.ts | 10 +- .../print-mail/self-mailers.test.ts | 16 +-- .../print-mail/snap-packs.test.ts | 16 +-- 19 files changed, 401 insertions(+), 180 deletions(-) diff --git a/.stats.yml b/.stats.yml index a18e8eb..8e68798 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 137 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/postgrid/postgrid-a1e82d54f9c6456622ef353b6864dd9ccc47c9b5cf6b5fbe98c123f2bdf30f34.yml -openapi_spec_hash: cd682fda35a9733c4bcd508b8d8e6eab +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/postgrid/postgrid-46a2722b802f0f4b91cb69f8131ea7d6ed816cb20e0fa795889df4f6d5d49b13.yml +openapi_spec_hash: 0189e95f47ebb161ed59339e0640b82f config_hash: f16e8e5b59ab878eee700d0f2dee5645 diff --git a/README.md b/README.md index 3cec123..bb9c02a 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,6 @@ const client = new PostGrid({ const contact = await client.printMail.contacts.create({ addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', }); diff --git a/src/resources/print-mail/boxes.ts b/src/resources/print-mail/boxes.ts index 815dc11..43121d2 100644 --- a/src/resources/print-mail/boxes.ts +++ b/src/resources/print-mail/boxes.ts @@ -1187,16 +1187,28 @@ export interface BoxCreateParams { cheques: Array; /** - * The 'from' (sender) of the entire box. Accepts inline ContactCreate or a - * contactID. + * A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; /** - * The recipient of this order. You can either supply the contact information - * inline here or provide a contact ID. PostGrid will automatically deduplicate - * contacts regardless of whether you provide the information inline here or call - * the contact creation endpoint. + * A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -1270,6 +1282,17 @@ export namespace BoxCreateParams { */ bankAccount: string; + /** + * A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. + */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; /** @@ -1277,6 +1300,17 @@ export namespace BoxCreateParams { */ number: number; + /** + * A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. + */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; /** diff --git a/src/resources/print-mail/cheques.ts b/src/resources/print-mail/cheques.ts index 867753d..0abf6c6 100644 --- a/src/resources/print-mail/cheques.ts +++ b/src/resources/print-mail/cheques.ts @@ -503,16 +503,28 @@ export interface ChequeCreateParams { bankAccount: string; /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -636,11 +648,15 @@ export interface ChequeCreateParams { number?: number; /** - * Body param: Providing this inserts a blank page at the start of the cheque with - * the recipient you provide here. This leaves the cheque that follows intact, - * which means you can use this to intercept at cheque at the redirected address - * and then mail it forward to the final recipient yourself. One use case for this - * is signing cheques at your office before mailing them out yourself. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ redirectTo?: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; diff --git a/src/resources/print-mail/contacts.ts b/src/resources/print-mail/contacts.ts index cd930f1..0a1294b 100644 --- a/src/resources/print-mail/contacts.ts +++ b/src/resources/print-mail/contacts.ts @@ -44,9 +44,9 @@ export class Contacts extends APIResource { * ```ts * const contact = await client.printMail.contacts.create({ * addressLine1: '90 Canal St Suite 600, Boston MA 90210', - * countryCode: 'US', * firstName: 'Kevin', * companyName: 'PostGrid', + * countryCode: 'US', * }); * ``` */ @@ -242,11 +242,6 @@ export interface ContactCreateWithCompanyName { companyName: string; - /** - * The ISO 3611-1 country code of the contact's address. - */ - countryCode: string; - /** * Second line of the contact's address, if applicable. */ @@ -257,6 +252,12 @@ export interface ContactCreateWithCompanyName { */ city?: string; + /** + * The ISO 3611-1 country code of the contact's address. If omitted, your + * organization's default country code is used. + */ + countryCode?: string; + /** * An optional string describing this resource. Will be visible in the API and the * dashboard. @@ -329,11 +330,6 @@ export interface ContactCreateWithFirstName { */ addressLine1: string; - /** - * The ISO 3611-1 country code of the contact's address. - */ - countryCode: string; - firstName: string; /** @@ -351,6 +347,12 @@ export interface ContactCreateWithFirstName { */ companyName?: string; + /** + * The ISO 3611-1 country code of the contact's address. If omitted, your + * organization's default country code is used. + */ + countryCode?: string; + /** * An optional string describing this resource. Will be visible in the API and the * dashboard. @@ -437,11 +439,6 @@ export declare namespace ContactCreateParams { */ addressLine1: string; - /** - * The ISO 3611-1 country code of the contact's address. - */ - countryCode: string; - firstName: string; /** @@ -459,6 +456,12 @@ export declare namespace ContactCreateParams { */ companyName?: string; + /** + * The ISO 3611-1 country code of the contact's address. If omitted, your + * organization's default country code is used. + */ + countryCode?: string; + /** * An optional string describing this resource. Will be visible in the API and the * dashboard. @@ -528,11 +531,6 @@ export declare namespace ContactCreateParams { companyName: string; - /** - * The ISO 3611-1 country code of the contact's address. - */ - countryCode: string; - /** * Second line of the contact's address, if applicable. */ @@ -543,6 +541,12 @@ export declare namespace ContactCreateParams { */ city?: string; + /** + * The ISO 3611-1 country code of the contact's address. If omitted, your + * organization's default country code is used. + */ + countryCode?: string; + /** * An optional string describing this resource. Will be visible in the API and the * dashboard. diff --git a/src/resources/print-mail/events.ts b/src/resources/print-mail/events.ts index e0635c4..6cc19b6 100644 --- a/src/resources/print-mail/events.ts +++ b/src/resources/print-mail/events.ts @@ -75,7 +75,10 @@ export interface Event { | 'tracker.visited' | 'campaign.created' | 'campaign.updated' - | 'virtual_mailbox_item.created'; + | 'virtual_mailbox_item.created' + | 'postal_statement.created' + | 'document.created' + | 'document.updated'; /** * The data of the resource associated with this event. @@ -112,6 +115,9 @@ export interface EventListParams extends SkipLimitParams { | 'campaign.created' | 'campaign.updated' | 'virtual_mailbox_item.created' + | 'postal_statement.created' + | 'document.created' + | 'document.updated' >; } diff --git a/src/resources/print-mail/letters.ts b/src/resources/print-mail/letters.ts index eea2965..ba5c001 100644 --- a/src/resources/print-mail/letters.ts +++ b/src/resources/print-mail/letters.ts @@ -530,8 +530,15 @@ export type LetterCreateParams = export declare namespace LetterCreateParams { export interface LetterCreateWithHTML { /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -542,10 +549,15 @@ export declare namespace LetterCreateParams { html: string; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -680,8 +692,15 @@ export declare namespace LetterCreateParams { export interface LetterCreateWithTemplate { /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -692,10 +711,15 @@ export declare namespace LetterCreateParams { template: string; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -830,8 +854,15 @@ export declare namespace LetterCreateParams { export interface LetterCreateWithPdf { /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -841,10 +872,15 @@ export declare namespace LetterCreateParams { pdf: string | Uploadable; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; diff --git a/src/resources/print-mail/postcards.ts b/src/resources/print-mail/postcards.ts index bb94896..ccb6153 100644 --- a/src/resources/print-mail/postcards.ts +++ b/src/resources/print-mail/postcards.ts @@ -394,10 +394,15 @@ export declare namespace PostcardCreateParams { size: '6x4' | '9x6' | '11x6'; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -408,9 +413,15 @@ export declare namespace PostcardCreateParams { description?: string; /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. Unlike other order - * types, the sender address is optional for postcards. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from?: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -514,10 +525,15 @@ export declare namespace PostcardCreateParams { size: '6x4' | '9x6' | '11x6'; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -528,9 +544,15 @@ export declare namespace PostcardCreateParams { description?: string; /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. Unlike other order - * types, the sender address is optional for postcards. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from?: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -629,10 +651,15 @@ export declare namespace PostcardCreateParams { size: '6x4' | '9x6' | '11x6'; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -643,9 +670,15 @@ export declare namespace PostcardCreateParams { description?: string; /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. Unlike other order - * types, the sender address is optional for postcards. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from?: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -744,10 +777,15 @@ export declare namespace PostcardCreateParams { size: '6x4' | '9x6' | '11x6'; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -758,9 +796,15 @@ export declare namespace PostcardCreateParams { description?: string; /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. Unlike other order - * types, the sender address is optional for postcards. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from?: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; diff --git a/src/resources/print-mail/return-envelopes/return-envelopes.ts b/src/resources/print-mail/return-envelopes/return-envelopes.ts index e2e62f3..e711dc3 100644 --- a/src/resources/print-mail/return-envelopes/return-envelopes.ts +++ b/src/resources/print-mail/return-envelopes/return-envelopes.ts @@ -264,8 +264,15 @@ export namespace ReturnEnvelope { export interface ReturnEnvelopeCreateParams { /** - * Body param: A contact ID or a contact object containing the address that will be - * printed onto the return envelope. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; diff --git a/src/resources/print-mail/self-mailers.ts b/src/resources/print-mail/self-mailers.ts index af0da90..3c2eb2f 100644 --- a/src/resources/print-mail/self-mailers.ts +++ b/src/resources/print-mail/self-mailers.ts @@ -338,8 +338,15 @@ export type SelfMailerCreateParams = export declare namespace SelfMailerCreateParams { export interface SelfMailerCreateWithHTML { /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -361,10 +368,15 @@ export declare namespace SelfMailerCreateParams { size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold'; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -434,8 +446,15 @@ export declare namespace SelfMailerCreateParams { export interface SelfMailerCreateWithTemplate { /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -457,10 +476,15 @@ export declare namespace SelfMailerCreateParams { size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold'; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -530,8 +554,15 @@ export declare namespace SelfMailerCreateParams { export interface SelfMailerCreateWithPdfurl { /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -548,10 +579,15 @@ export declare namespace SelfMailerCreateParams { size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold'; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -621,8 +657,15 @@ export declare namespace SelfMailerCreateParams { export interface SelfMailerCreateWithPdfFile { /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to`. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -639,10 +682,15 @@ export declare namespace SelfMailerCreateParams { size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold'; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; diff --git a/src/resources/print-mail/snap-packs.ts b/src/resources/print-mail/snap-packs.ts index d0f9785..dac5f9d 100644 --- a/src/resources/print-mail/snap-packs.ts +++ b/src/resources/print-mail/snap-packs.ts @@ -390,8 +390,15 @@ export type SnapPackCreateParams = export declare namespace SnapPackCreateParams { export interface SnapPackCreateWithHTML { /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to` contact. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -413,10 +420,15 @@ export declare namespace SnapPackCreateParams { size: '8.5x11_bifold_v'; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -486,8 +498,15 @@ export declare namespace SnapPackCreateParams { export interface SnapPackCreateWithTemplate { /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to` contact. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -509,10 +528,15 @@ export declare namespace SnapPackCreateParams { size: '8.5x11_bifold_v'; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -582,8 +606,15 @@ export declare namespace SnapPackCreateParams { export interface SnapPackCreateWithPdf { /** - * Body param: The contact information of the sender. You can pass contact - * information inline here just like you can for the `to` contact. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; @@ -599,10 +630,15 @@ export declare namespace SnapPackCreateParams { size: '8.5x11_bifold_v'; /** - * Body param: The recipient of this order. You can either supply the contact - * information inline here or provide a contact ID. PostGrid will automatically - * deduplicate contacts regardless of whether you provide the information inline - * here or call the contact creation endpoint. + * Body param: A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string; diff --git a/src/resources/print-mail/virtual-mailboxes/virtual-mailboxes.ts b/src/resources/print-mail/virtual-mailboxes/virtual-mailboxes.ts index 15efd66..d3c8ae4 100644 --- a/src/resources/print-mail/virtual-mailboxes/virtual-mailboxes.ts +++ b/src/resources/print-mail/virtual-mailboxes/virtual-mailboxes.ts @@ -388,7 +388,15 @@ export namespace VirtualMailboxCreateParams { envelopeScans: boolean; /** - * A contact ID or contact object. + * A contact provided in one of two ways: + * + * - an **inline contact body** with the same fields you would use to create a + * contact (there is no need to create the contact first), or + * - the **ID of an existing contact** (e.g. `contact_123`). + * + * You never send the full stored contact object (with `id`, `object`, + * `addressStatus`, `createdAt`, etc.) here — that shape is only ever returned in + * responses. */ forwardMailTo?: | ContactsAPI.ContactCreateWithFirstName diff --git a/src/resources/print-mail/webhooks.ts b/src/resources/print-mail/webhooks.ts index fd8a19c..95788bd 100644 --- a/src/resources/print-mail/webhooks.ts +++ b/src/resources/print-mail/webhooks.ts @@ -181,6 +181,9 @@ export interface Webhook { | 'campaign.created' | 'campaign.updated' | 'virtual_mailbox_item.created' + | 'postal_statement.created' + | 'document.created' + | 'document.updated' >; /** @@ -272,7 +275,10 @@ export interface WebhookInvocation { | 'tracker.visited' | 'campaign.created' | 'campaign.updated' - | 'virtual_mailbox_item.created'; + | 'virtual_mailbox_item.created' + | 'postal_statement.created' + | 'document.created' + | 'document.updated'; /** * The UTC time at which this invocation was last updated. @@ -328,6 +334,9 @@ export interface WebhookCreateParams { | 'campaign.created' | 'campaign.updated' | 'virtual_mailbox_item.created' + | 'postal_statement.created' + | 'document.created' + | 'document.updated' >; /** @@ -391,6 +400,9 @@ export interface WebhookUpdateParams { | 'campaign.created' | 'campaign.updated' | 'virtual_mailbox_item.created' + | 'postal_statement.created' + | 'document.created' + | 'document.updated' >; /** diff --git a/tests/api-resources/print-mail/cheques.test.ts b/tests/api-resources/print-mail/cheques.test.ts index b9905a6..ef3995e 100644 --- a/tests/api-resources/print-mail/cheques.test.ts +++ b/tests/api-resources/print-mail/cheques.test.ts @@ -53,11 +53,11 @@ describe('resource cheques', () => { number: 123456, redirectTo: { addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', addressLine2: 'addressLine2', city: 'city', companyName: 'companyName', + countryCode: 'countryCode', description: 'description', email: 'email', forceVerifiedStatus: true, diff --git a/tests/api-resources/print-mail/contacts.test.ts b/tests/api-resources/print-mail/contacts.test.ts index 99afbee..644f7f9 100644 --- a/tests/api-resources/print-mail/contacts.test.ts +++ b/tests/api-resources/print-mail/contacts.test.ts @@ -13,7 +13,6 @@ describe('resource contacts', () => { test.skip('create: only required params', async () => { const responsePromise = client.printMail.contacts.create({ addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', }); const rawResponse = await responsePromise.asResponse(); @@ -29,11 +28,11 @@ describe('resource contacts', () => { test.skip('create: required and optional params', async () => { const response = await client.printMail.contacts.create({ addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', addressLine2: 'addressLine2', city: 'city', companyName: 'companyName', + countryCode: 'countryCode', description: 'description', email: 'email', forceVerifiedStatus: true, diff --git a/tests/api-resources/print-mail/letters.test.ts b/tests/api-resources/print-mail/letters.test.ts index bba17a0..931092f 100644 --- a/tests/api-resources/print-mail/letters.test.ts +++ b/tests/api-resources/print-mail/letters.test.ts @@ -12,17 +12,9 @@ describe('resource letters', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.printMail.letters.create({ - from: { - addressLine1: 'addressLine1', - countryCode: 'countryCode', - firstName: 'firstName', - }, + from: { addressLine1: 'addressLine1', firstName: 'firstName' }, html: 'html', - to: { - addressLine1: 'addressLine1', - countryCode: 'countryCode', - firstName: 'firstName', - }, + to: { addressLine1: 'addressLine1', firstName: 'firstName' }, }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -38,11 +30,11 @@ describe('resource letters', () => { const response = await client.printMail.letters.create({ from: { addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', addressLine2: 'addressLine2', city: 'city', companyName: 'companyName', + countryCode: 'countryCode', description: 'description', email: 'email', forceVerifiedStatus: true, @@ -58,11 +50,11 @@ describe('resource letters', () => { html: 'html', to: { addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', addressLine2: 'addressLine2', city: 'city', companyName: 'companyName', + countryCode: 'countryCode', description: 'description', email: 'email', forceVerifiedStatus: true, diff --git a/tests/api-resources/print-mail/postcards.test.ts b/tests/api-resources/print-mail/postcards.test.ts index 7558677..ac60d8d 100644 --- a/tests/api-resources/print-mail/postcards.test.ts +++ b/tests/api-resources/print-mail/postcards.test.ts @@ -15,11 +15,7 @@ describe('resource postcards', () => { backHTML: 'backHTML', frontHTML: 'frontHTML', size: '6x4', - to: { - addressLine1: 'addressLine1', - countryCode: 'countryCode', - firstName: 'firstName', - }, + to: { addressLine1: 'addressLine1', firstName: 'firstName' }, }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -38,11 +34,11 @@ describe('resource postcards', () => { size: '6x4', to: { addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', addressLine2: 'addressLine2', city: 'city', companyName: 'companyName', + countryCode: 'countryCode', description: 'description', email: 'email', forceVerifiedStatus: true, @@ -58,11 +54,11 @@ describe('resource postcards', () => { description: 'description', from: { addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', addressLine2: 'addressLine2', city: 'city', companyName: 'companyName', + countryCode: 'countryCode', description: 'description', email: 'email', forceVerifiedStatus: true, diff --git a/tests/api-resources/print-mail/self-mailers.test.ts b/tests/api-resources/print-mail/self-mailers.test.ts index 1b441cd..01f8da9 100644 --- a/tests/api-resources/print-mail/self-mailers.test.ts +++ b/tests/api-resources/print-mail/self-mailers.test.ts @@ -12,19 +12,11 @@ describe('resource selfMailers', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.printMail.selfMailers.create({ - from: { - addressLine1: 'addressLine1', - countryCode: 'countryCode', - firstName: 'firstName', - }, + from: { addressLine1: 'addressLine1', firstName: 'firstName' }, insideHTML: 'insideHTML', outsideHTML: 'outsideHTML', size: '8.5x11_bifold', - to: { - addressLine1: 'addressLine1', - countryCode: 'countryCode', - firstName: 'firstName', - }, + to: { addressLine1: 'addressLine1', firstName: 'firstName' }, }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -40,11 +32,11 @@ describe('resource selfMailers', () => { const response = await client.printMail.selfMailers.create({ from: { addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', addressLine2: 'addressLine2', city: 'city', companyName: 'companyName', + countryCode: 'countryCode', description: 'description', email: 'email', forceVerifiedStatus: true, @@ -62,11 +54,11 @@ describe('resource selfMailers', () => { size: '8.5x11_bifold', to: { addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', addressLine2: 'addressLine2', city: 'city', companyName: 'companyName', + countryCode: 'countryCode', description: 'description', email: 'email', forceVerifiedStatus: true, diff --git a/tests/api-resources/print-mail/snap-packs.test.ts b/tests/api-resources/print-mail/snap-packs.test.ts index 934d6df..e42bc61 100644 --- a/tests/api-resources/print-mail/snap-packs.test.ts +++ b/tests/api-resources/print-mail/snap-packs.test.ts @@ -12,19 +12,11 @@ describe('resource snapPacks', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.printMail.snapPacks.create({ - from: { - addressLine1: 'addressLine1', - countryCode: 'countryCode', - firstName: 'firstName', - }, + from: { addressLine1: 'addressLine1', firstName: 'firstName' }, insideHTML: 'insideHTML', outsideHTML: 'outsideHTML', size: '8.5x11_bifold_v', - to: { - addressLine1: 'addressLine1', - countryCode: 'countryCode', - firstName: 'firstName', - }, + to: { addressLine1: 'addressLine1', firstName: 'firstName' }, }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -40,11 +32,11 @@ describe('resource snapPacks', () => { const response = await client.printMail.snapPacks.create({ from: { addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', addressLine2: 'addressLine2', city: 'city', companyName: 'companyName', + countryCode: 'countryCode', description: 'description', email: 'email', forceVerifiedStatus: true, @@ -62,11 +54,11 @@ describe('resource snapPacks', () => { size: '8.5x11_bifold_v', to: { addressLine1: 'addressLine1', - countryCode: 'countryCode', firstName: 'firstName', addressLine2: 'addressLine2', city: 'city', companyName: 'companyName', + countryCode: 'countryCode', description: 'description', email: 'email', forceVerifiedStatus: true, From 227dd606c4615af665badbfcb6c70c9cf5cf632d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 22:34:57 +0000 Subject: [PATCH 2/4] fix(ci): bump @arethetypeswrong/cli to ^0.18.0 and run CI workflows on Node 24 --- .github/workflows/ci.yml | 6 +-- .github/workflows/publish-npm.yml | 2 +- package.json | 2 +- pnpm-lock.yaml | 76 +++++++++++++++++-------------- 4 files changed, 48 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7e01ab..a703a54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Node uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: '20' + node-version: '24' - name: Set up pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 @@ -53,7 +53,7 @@ jobs: - name: Set up Node uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: '20' + node-version: '24' - name: Set up pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 @@ -95,7 +95,7 @@ jobs: - name: Set up Node uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: '20' + node-version: '24' - name: Set up pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index c756ef3..2a5e473 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Node uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1 with: - node-version: '20' + node-version: '24' - name: Set up pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 diff --git a/package.json b/package.json index 76ff1fe..27d6161 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ }, "dependencies": {}, "devDependencies": { - "@arethetypeswrong/cli": "^0.17.0", + "@arethetypeswrong/cli": "^0.18.0", "@swc/core": "^1.3.102", "@swc/jest": "^0.2.29", "@types/jest": "^29.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6497094..a953c6f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,8 +11,8 @@ importers: .: devDependencies: '@arethetypeswrong/cli': - specifier: ^0.17.0 - version: 0.17.0 + specifier: ^0.18.0 + version: 0.18.4 '@swc/core': specifier: ^1.3.102 version: 1.4.16 @@ -78,20 +78,20 @@ packages: integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==, } - '@arethetypeswrong/cli@0.17.0': + '@arethetypeswrong/cli@0.18.4': resolution: { - integrity: sha512-xSMW7bfzVWpYw5JFgZqBXqr6PdR0/REmn3DkxCES5N0JTcB0CVgbIynJCvKBFmXaPc3hzmmTrb7+yPDRoOSZdA==, + integrity: sha512-kNWo6LTzGAuLYPpJ7Sgo63whSUeeSuKMlYx6IBgzs4ONEG807gW4hSSENvpeCHzO2H2wIzG5EFl0OKBbqGBAyA==, } - engines: { node: '>=18' } + engines: { node: '>=20' } hasBin: true - '@arethetypeswrong/core@0.17.0': + '@arethetypeswrong/core@0.18.4': resolution: { - integrity: sha512-FHyhFizXNetigTVsIhqXKGYLpazPS5YNojEPpZEUcBPt9wVvoEbNIvG+hybuBR+pjlRcbyuqhukHZm1fr+bDgA==, + integrity: sha512-M5F0ePyN6h2Z6XxRiyIPqjGbltotXLjR0CKA0uKspsDu0QmgTNYvRb4RSQPMUs2ZXZHCCYpbaZbFbYOXLxCjUA==, } - engines: { node: '>=18' } + engines: { node: '>=20' } '@babel/code-frame@7.28.6': resolution: @@ -363,6 +363,12 @@ packages: integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==, } + '@braidai/lang@1.1.2': + resolution: + { + integrity: sha512-qBcknbBufNHlui137Hft8xauQMTZDKdophmLFv05r2eNmdIv/MlPuP4TdUknHG68UdWLgVZwgxVe735HzJNIwA==, + } + '@colors/colors@1.5.0': resolution: { @@ -665,6 +671,12 @@ packages: integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==, } + '@loaderkit/resolve@1.0.6': + resolution: + { + integrity: sha512-G8FdIoF5CypfwmD9rl8BXod5HDn8JqB0CCNBXDTaRZ+yRYhARrrSToX1zg1zy9jX3zLqigsELwhT4gNtkdQAUg==, + } + '@nodelib/fs.scandir@2.1.5': resolution: { @@ -1678,10 +1690,10 @@ packages: integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==, } - fflate@0.8.2: + fflate@0.8.3: resolution: { - integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==, + integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==, } file-entry-cache@8.0.0: @@ -2366,11 +2378,12 @@ packages: integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==, } - lru-cache@10.4.3: + lru-cache@11.5.2: resolution: { - integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==, + integrity: sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==, } + engines: { node: 20 || >=22 } lru-cache@5.1.1: resolution: @@ -2852,14 +2865,6 @@ packages: } hasBin: true - semver@7.7.1: - resolution: - { - integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==, - } - engines: { node: '>=10' } - hasBin: true - semver@7.7.3: resolution: { @@ -3365,23 +3370,24 @@ packages: snapshots: '@andrewbranch/untar.js@1.0.3': {} - '@arethetypeswrong/cli@0.17.0': + '@arethetypeswrong/cli@0.18.4': dependencies: - '@arethetypeswrong/core': 0.17.0 + '@arethetypeswrong/core': 0.18.4 chalk: 4.1.2 cli-table3: 0.6.5 commander: 10.0.1 marked: 9.1.6 marked-terminal: 7.2.1(marked@9.1.6) - semver: 7.7.1 + semver: 7.7.3 - '@arethetypeswrong/core@0.17.0': + '@arethetypeswrong/core@0.18.4': dependencies: '@andrewbranch/untar.js': 1.0.3 + '@loaderkit/resolve': 1.0.6 cjs-module-lexer: 1.4.1 - fflate: 0.8.2 - lru-cache: 10.4.3 - semver: 7.7.1 + fflate: 0.8.3 + lru-cache: 11.5.2 + semver: 7.7.3 typescript: 5.6.1-rc validate-npm-package-name: 5.0.1 @@ -3574,6 +3580,8 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} + '@braidai/lang@1.1.2': {} + '@colors/colors@1.5.0': optional: true @@ -3849,6 +3857,10 @@ snapshots: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 + '@loaderkit/resolve@1.0.6': + dependencies: + '@braidai/lang': 1.1.2 + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -4462,7 +4474,7 @@ snapshots: dependencies: bser: 2.1.1 - fflate@0.8.2: {} + fflate@0.8.3: {} file-entry-cache@8.0.0: dependencies: @@ -4909,7 +4921,7 @@ snapshots: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.7.1 + semver: 7.7.3 transitivePeerDependencies: - supports-color @@ -5013,7 +5025,7 @@ snapshots: lodash.merge@4.6.2: {} - lru-cache@10.4.3: {} + lru-cache@11.5.2: {} lru-cache@5.1.1: dependencies: @@ -5254,8 +5266,6 @@ snapshots: semver@6.3.1: {} - semver@7.7.1: {} - semver@7.7.3: {} shebang-command@2.0.0: @@ -5512,7 +5522,7 @@ snapshots: yargs@16.2.0: dependencies: cliui: 7.0.4 - escalade: 3.1.1 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 From 9b18c255c58982e3497b089eb1523811ee770b6e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 17:23:43 +0000 Subject: [PATCH 3/4] feat(stlc): configurable CI runner and private-production-repo support in workflow templates --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a703a54..49671a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: lint: timeout-minutes: 10 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/postgrid-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -42,7 +42,7 @@ jobs: build: timeout-minutes: 5 name: build - runs-on: ${{ github.repository == 'stainless-sdks/postgrid-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') permissions: contents: read @@ -87,7 +87,7 @@ jobs: test: timeout-minutes: 10 name: test - runs-on: ${{ github.repository == 'stainless-sdks/postgrid-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 From 0ca006620065e65ddfff8fd741378eb35ddbb7cd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 17:24:08 +0000 Subject: [PATCH 4/4] release: 0.8.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 13708fa..64f3cdd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.7.1" + ".": "0.8.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f553c9..fd2686f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.8.0 (2026-07-17) + +Full Changelog: [v0.7.1...v0.8.0](https://github.com/postgrid/postgrid-node/compare/v0.7.1...v0.8.0) + +### Features + +* Make Contact requirements for mailers clearer - can pass in ID or contact inline ([3c63870](https://github.com/postgrid/postgrid-node/commit/3c6387095be9fed8c7c4f81435d7a87425e463bf)) +* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([9b18c25](https://github.com/postgrid/postgrid-node/commit/9b18c255c58982e3497b089eb1523811ee770b6e)) + + +### Bug Fixes + +* **ci:** bump @arethetypeswrong/cli to ^0.18.0 and run CI workflows on Node 24 ([227dd60](https://github.com/postgrid/postgrid-node/commit/227dd606c4615af665badbfcb6c70c9cf5cf632d)) + ## 0.7.1 (2026-06-16) Full Changelog: [v0.7.0...v0.7.1](https://github.com/postgrid/postgrid-node/compare/v0.7.0...v0.7.1) diff --git a/package.json b/package.json index 27d6161..9153468 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postgrid-node", - "version": "0.7.1", + "version": "0.8.0", "description": "The official TypeScript library for the PostGrid API", "author": "PostGrid ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 5e85c4b..23f967c 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.7.1'; // x-release-please-version +export const VERSION = '0.8.0'; // x-release-please-version