postgrid-node 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +32 -1
- package/package.json +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.2 (2025-11-12)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.4.1...v0.4.2](https://github.com/postgrid/postgrid-node/compare/v0.4.1...v0.4.2)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **readme:** update the readme ([2308e71](https://github.com/postgrid/postgrid-node/commit/2308e71046e82f88e4630e9b2277764075cd6af3))
|
|
10
|
+
|
|
11
|
+
## 0.4.1 (2025-11-12)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.4.0...v0.4.1](https://github.com/postgrid/postgrid-node/compare/v0.4.0...v0.4.1)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **api:** small readme updates ([2a166c7](https://github.com/postgrid/postgrid-node/commit/2a166c7e2577102958777f3e9b921f5772a7ad12))
|
|
18
|
+
|
|
3
19
|
## 0.4.0 (2025-11-12)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.3.0...v0.4.0](https://github.com/postgrid/postgrid-node/compare/v0.3.0...v0.4.0)
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
This library provides convenient access to the Post Grid REST API from server-side TypeScript or JavaScript.
|
|
6
6
|
|
|
7
|
-
The full API of this library can be found in [api.md](api.md).
|
|
7
|
+
The REST API documentation can be found on [docs.postgrid.com](https://docs.postgrid.com). The full API of this library can be found in [api.md](api.md).
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -125,6 +125,37 @@ On timeout, an `APIConnectionTimeoutError` is thrown.
|
|
|
125
125
|
|
|
126
126
|
Note that requests which time out will be [retried twice by default](#retries).
|
|
127
127
|
|
|
128
|
+
## Auto-pagination
|
|
129
|
+
|
|
130
|
+
List methods in the PostGrid API are paginated.
|
|
131
|
+
You can use the `for await … of` syntax to iterate through items across all pages:
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
async function fetchAllLetters(params) {
|
|
135
|
+
const allLetters = [];
|
|
136
|
+
// Automatically fetches more pages as needed.
|
|
137
|
+
for await (const letter of client.printMail.letters.list({ limit: 100 })) {
|
|
138
|
+
allLetters.push(letter);
|
|
139
|
+
}
|
|
140
|
+
return allLetters;
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Alternatively, you can request a single page at a time:
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
let page = await client.printMail.letters.list({ limit: 100 });
|
|
148
|
+
for (const letter of page.data) {
|
|
149
|
+
console.log(letter);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Convenience methods are provided for manually paginating:
|
|
153
|
+
while (page.hasNextPage()) {
|
|
154
|
+
page = await page.getNextPage();
|
|
155
|
+
// ...
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
128
159
|
## Advanced Usage
|
|
129
160
|
|
|
130
161
|
### Accessing raw Response data (e.g., headers)
|
package/package.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.4.
|
|
1
|
+
export const VERSION = '0.4.2'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.4.
|
|
1
|
+
export declare const VERSION = "0.4.2";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.4.
|
|
1
|
+
export declare const VERSION = "0.4.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.4.
|
|
1
|
+
export const VERSION = '0.4.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|