@zapier/zapier-sdk 0.108.0 → 0.109.0
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 +41 -0
- package/README.md +1 -1
- package/dist/{chunk-ULZVDPAK.mjs → chunk-6QN54DRD.mjs} +449 -357
- package/dist/{chunk-HMEY72T6.cjs → chunk-BU4ANX6G.cjs} +447 -355
- package/dist/experimental.cjs +378 -378
- package/dist/experimental.d.mts +11 -11
- package/dist/experimental.d.ts +11 -11
- package/dist/experimental.mjs +2 -2
- package/dist/{index-wTDIVpGJ.d.mts → index-Cum18GPG.d.mts} +54 -47
- package/dist/{index-wTDIVpGJ.d.ts → index-Cum18GPG.d.ts} +54 -47
- package/dist/index.cjs +279 -279
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.109.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f56765a: Deprecated `createZapierApi` and `getOrCreateApiClient` in favor of building an SDK with `createSdk` and accessing `apiPluginRef` with `resolvePlugin`. Both functions continue to work with a once-per-process warning.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- f56765a: `createZapierSdk({ cache })` now uses the caller-supplied cache for client-credentials access tokens instead of silently falling back to the default cache (the CLI's filesystem and keychain cache when installed, otherwise in-memory).
|
|
12
|
+
|
|
13
|
+
## 0.108.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 47a61ba: `listConnections` and `waitForNewConnection` now:
|
|
18
|
+
- Raise a `ZapierValidationError` (`ZAPIER_VALIDATION_ERROR`) when a response or
|
|
19
|
+
connection row doesn't match the expected shape; previously the list path
|
|
20
|
+
did not validate rows. `waitForNewConnection` surfaces it on the first
|
|
21
|
+
malformed successful response — any number of pending responses may precede
|
|
22
|
+
it — rather than after exhausting its poll retries.
|
|
23
|
+
- Preserve error status codes and messages. Previously, some 4xx messages were
|
|
24
|
+
replaced with generic text and some 5xx responses were reported as generic
|
|
25
|
+
502 errors.
|
|
26
|
+
- Match an `app` filter with an explicit version (e.g. `"github@1.2.3"`) even
|
|
27
|
+
when it can't be resolved through the manifest, instead of failing to match
|
|
28
|
+
anything.
|
|
29
|
+
|
|
30
|
+
`waitForNewConnection` now checks the most recently created connection.
|
|
31
|
+
Previously the row it checked was not the newest, so it could keep waiting past
|
|
32
|
+
a connection that had already been created, or settle on a different one.
|
|
33
|
+
|
|
34
|
+
`ApiClient.poll` now propagates a throw from a caller's `isPending` or
|
|
35
|
+
`resultExtractor` unchanged and stops polling, instead of retrying it three
|
|
36
|
+
times and rebranding it as a JSON parse failure. Return `true` from `isPending`
|
|
37
|
+
to keep polling; throw only to abandon the poll. An unreadable response body
|
|
38
|
+
still retries, now reported as "Poll response body was not valid JSON".
|
|
39
|
+
Consecutive HTTP error responses that exhaust polling retries now preserve
|
|
40
|
+
the upstream status code and are no longer counted and wrapped twice.
|
|
41
|
+
|
|
42
|
+
Output is unchanged for conforming responses.
|
|
43
|
+
|
|
3
44
|
## 0.108.0
|
|
4
45
|
|
|
5
46
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -2854,7 +2854,7 @@ for await (const connection of zapier.listConnections().items()) {
|
|
|
2854
2854
|
|
|
2855
2855
|
#### `waitForNewConnection`
|
|
2856
2856
|
|
|
2857
|
-
Wait for a new connection to appear for the given app. Polls
|
|
2857
|
+
Wait for a new connection to appear for the given app. Polls the connections list newest-first until the most recent matching row's `date` is at or after the started-at timestamp, then returns it. Pair with `get-connection-start-url` — that mints the URL the user opens, this waits for the resulting connection to land. Errors with a timeout after the configured timeout (default 5 min). Example (JS):
|
|
2858
2858
|
|
|
2859
2859
|
```ts
|
|
2860
2860
|
const {
|