Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ 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

- 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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -87,15 +87,15 @@ 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

- 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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.7.1"
".": "0.8.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const client = new PostGrid({

const contact = await client.printMail.contacts.create({
addressLine1: 'addressLine1',
countryCode: 'countryCode',
firstName: 'firstName',
});

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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 <support@postgrid.com>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -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",
Expand Down
76 changes: 43 additions & 33 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 40 additions & 6 deletions src/resources/print-mail/boxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1187,16 +1187,28 @@ export interface BoxCreateParams {
cheques: Array<BoxCreateParams.Cheque>;

/**
* 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;

Expand Down Expand Up @@ -1270,13 +1282,35 @@ 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;

/**
* The cheque number.
*/
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;

/**
Expand Down
Loading
Loading