@theholocron/checkly-client 1.54.0 → 1.54.1

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/dist/index.d.mts CHANGED
@@ -98,7 +98,7 @@ type AlertChannel = AlertChannelRecord & ({
98
98
  * The message body of Checkly's own Discord setup (its AI-analysis section left out, since not every account has it), so
99
99
  * a channel made through the API reads like one made in the UI.
100
100
  */
101
- declare const DISCORD_TEMPLATE = "{\n\t\"content\": null,\n\t\"username\": \"Checkly\",\n\t\"avatar_url\": \"https://s3.eu-central-1.amazonaws.com/cdn.checklyhq.com/slack/checkly-slack-icon.png\",\n\t{{! Embeds for the SSL expiry notifications}}\n\t{{#eq ALERT_TYPE \"ALERT_SSL\" }}\n\t\"embeds\": [\n\t\t{\n\t\t\t\"title\": \"{{ALERT_TITLE}}\",\n\t\t\t\"url\": \"{{RESULT_LINK}}\",\n\t\t\t\"color\": 16762924\n\t\t}\n\t]\n\t{{else}}\n\t{{! Embeds for the standard failure, recovery and degraded notifications}}\n\t\"embeds\": [\n\t\t{\n\t\t\t\"title\": \"{{ALERT_TITLE}}\",\n\t\t\t\"url\": \"{{RESULT_LINK}}\",\n\t\t\t\"fields\": [\n\t\t\t\t{{#eq ALERT_TYPE \"API\" }}\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Status code\",\n\t\t\t\t\t\"value\": \"{{API_CHECK_RESPONSE_STATUS_CODE}}\"\n\t\t\t\t},\n\t\t\t\t{{/eq}}\n\t\t\t\t{{#if GROUP_NAME}}\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Group\",\n\t\t\t\t\t\"value\": \"{{GROUP_NAME}}\"\n\t\t\t\t},\n\t\t\t\t{{/if}}\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Response Time\",\n\t\t\t\t\t\"value\": \"{{RESPONSE_TIME}}ms\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Location\",\n\t\t\t\t\t\"value\": \"{{RUN_LOCATION}}\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Tags\",\n\t\t\t\t\t\"value\": \"[{{#each TAGS}} {{this}} {{#unless @last}},{{/unless}} {{/each}}]\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"timestamp\": \"{{STARTED_AT}}\"\n\t\t}\n\t]\n\t{{/eq}}\n}\n";
101
+ declare const DISCORD_TEMPLATE = "{\n\t\"content\": null,\n\t\"username\": \"Checkly\",\n\t\"avatar_url\": \"https://s3.eu-central-1.amazonaws.com/cdn.checklyhq.com/slack/checkly-slack-icon.png\",\n\t{{! Embeds for the SSL expiry notifications}}\n\t{{#eq ALERT_TYPE \"ALERT_SSL\" }}\n\t\"embeds\": [\n\t\t{\n\t\t\t\"title\": \"{{ALERT_TITLE}}\",\n\t\t\t\"url\": \"{{RESULT_LINK}}\",\n\t\t\t\"color\": 16762924\n\t\t}\n\t]\n\t{{else}}\n\t{{! Embeds for the standard failure, recovery and degraded notifications}}\n\t\"embeds\": [\n\t\t{\n\t\t\t\"title\": \"{{ALERT_TITLE}}\",\n\t\t\t\"url\": \"{{RESULT_LINK}}\",\n\t\t\t{{! Green for a recovery, red for a failure, amber for anything degraded}}\n\t\t\t\"color\": {{#eq ALERT_TYPE \"ALERT_RECOVERY\"}}3187820{{else}}{{#eq ALERT_TYPE \"ALERT_DEGRADED_RECOVERY\"}}3187820{{else}}{{#eq ALERT_TYPE \"ALERT_FAILURE\"}}15033421{{else}}16098596{{/eq}}{{/eq}}{{/eq}},\n\t\t\t\"fields\": [\n\t\t\t\t{{#eq CHECK_TYPE \"API\" }}\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Status code\",\n\t\t\t\t\t\"value\": \"{{API_CHECK_RESPONSE_STATUS_CODE}}\"\n\t\t\t\t},\n\t\t\t\t{{/eq}}\n\t\t\t\t{{#if GROUP_NAME}}\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Group\",\n\t\t\t\t\t\"value\": \"{{GROUP_NAME}}\"\n\t\t\t\t},\n\t\t\t\t{{/if}}\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Response Time\",\n\t\t\t\t\t\"value\": \"{{RESPONSE_TIME}}ms\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Location\",\n\t\t\t\t\t\"value\": \"{{RUN_LOCATION}}\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Tags\",\n\t\t\t\t\t\"value\": \"[{{#each TAGS}} {{this}} {{#unless @last}},{{/unless}} {{/each}}]\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"timestamp\": \"{{STARTED_AT}}\"\n\t\t}\n\t]\n\t{{/eq}}\n}\n";
102
102
  //#endregion
103
103
  //#region ../../../../../src/checks/checks.d.ts
104
104
  type AssertionSource = "STATUS_CODE" | "JSON_BODY" | "HEADERS" | "TEXT_BODY" | "RESPONSE_TIME";
package/dist/index.mjs CHANGED
@@ -23,8 +23,10 @@ const DISCORD_TEMPLATE = `{
23
23
  {
24
24
  "title": "{{ALERT_TITLE}}",
25
25
  "url": "{{RESULT_LINK}}",
26
+ {{! Green for a recovery, red for a failure, amber for anything degraded}}
27
+ "color": {{#eq ALERT_TYPE "ALERT_RECOVERY"}}3187820{{else}}{{#eq ALERT_TYPE "ALERT_DEGRADED_RECOVERY"}}3187820{{else}}{{#eq ALERT_TYPE "ALERT_FAILURE"}}15033421{{else}}16098596{{/eq}}{{/eq}}{{/eq}},
26
28
  "fields": [
27
- {{#eq ALERT_TYPE "API" }}
29
+ {{#eq CHECK_TYPE "API" }}
28
30
  {
29
31
  "name": "Status code",
30
32
  "value": "{{API_CHECK_RESPONSE_STATUS_CODE}}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/checkly-client",
3
- "version": "1.54.0",
3
+ "version": "1.54.1",
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.54.0"
37
+ "@theholocron/http-client": "^1.54.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@theholocron/cli": "5.0.0-alpha.79",