@theholocron/checkly-client 1.40.0 → 1.41.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/README.md +6 -1
- package/dist/index.d.mts +12 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,11 +21,16 @@ const checkly = createChecklyClient({
|
|
|
21
21
|
// Find an existing check by name (case-insensitive partial match)
|
|
22
22
|
const existing = await checkly.checks.list({ search: "sentinel webhook" });
|
|
23
23
|
|
|
24
|
-
// Create an API check
|
|
24
|
+
// Create an API check. shouldFail: true is required whenever the
|
|
25
|
+
// "healthy" response is itself an HTTP error status (here, a 405) --
|
|
26
|
+
// without it, Checkly's platform-level retry/failure classification
|
|
27
|
+
// treats any 4xx/5xx as a failure before your assertions are even
|
|
28
|
+
// evaluated, regardless of whether they match.
|
|
25
29
|
const check = await checkly.checks.create({
|
|
26
30
|
name: "Sentinel webhook uptime",
|
|
27
31
|
frequency: 5,
|
|
28
32
|
locations: ["us-east-1"],
|
|
33
|
+
shouldFail: true,
|
|
29
34
|
request: {
|
|
30
35
|
url: "https://sentinel.theholocron.dev/api/webhook",
|
|
31
36
|
method: "GET",
|
package/dist/index.d.mts
CHANGED
|
@@ -41,6 +41,17 @@ interface ApiCheckInput {
|
|
|
41
41
|
locations?: string[];
|
|
42
42
|
activated?: boolean;
|
|
43
43
|
tags?: string[];
|
|
44
|
+
/**
|
|
45
|
+
* Inverts pass/fail: when `true`, a response status >= 400 counts as
|
|
46
|
+
* passing (and a < 400 status fails) *before* assertions are even
|
|
47
|
+
* evaluated. Required for any check whose "healthy" response is
|
|
48
|
+
* itself an HTTP error status (e.g. asserting a 404/405 on an
|
|
49
|
+
* endpoint that should reject certain requests) — without it,
|
|
50
|
+
* Checkly's platform-level retry/failure classification treats any
|
|
51
|
+
* 4xx/5xx as a failure regardless of matching assertions. Defaults
|
|
52
|
+
* to `false`.
|
|
53
|
+
*/
|
|
54
|
+
shouldFail?: boolean;
|
|
44
55
|
request: ApiCheckRequest;
|
|
45
56
|
}
|
|
46
57
|
interface ApiCheck {
|
|
@@ -51,6 +62,7 @@ interface ApiCheck {
|
|
|
51
62
|
frequency: number;
|
|
52
63
|
locations: string[] | null;
|
|
53
64
|
tags: string[];
|
|
65
|
+
shouldFail: boolean;
|
|
54
66
|
request: ApiCheckRequest;
|
|
55
67
|
created_at: string;
|
|
56
68
|
updated_at: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/checkly-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"description": "A TypeScript client for the Checkly monitoring API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"checkly",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@theholocron/observability": "^0.3.0",
|
|
37
|
-
"@theholocron/http-client": "^1.
|
|
37
|
+
"@theholocron/http-client": "^1.41.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@theholocron/cli": "5.0.0-alpha.79",
|