@checkstack/sdk 0.129.0 → 0.131.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 CHANGED
@@ -1,5 +1,53 @@
1
1
  # @checkstack/sdk
2
2
 
3
+ ## 0.130.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [a74fa01]
8
+ - Updated dependencies [4568dcc]
9
+ - Updated dependencies [4568dcc]
10
+ - Updated dependencies [4568dcc]
11
+ - Updated dependencies [a74fa01]
12
+ - Updated dependencies [d00e099]
13
+ - @checkstack/healthcheck-common@1.17.0
14
+ - @checkstack/satellite-common@0.10.0
15
+ - @checkstack/catalog-common@2.7.3
16
+ - @checkstack/anomaly-common@1.8.1
17
+ - @checkstack/announcement-common@0.7.1
18
+ - @checkstack/auth-common@0.14.0
19
+ - @checkstack/automation-common@0.10.1
20
+ - @checkstack/cache-common@0.5.11
21
+ - @checkstack/command-common@0.3.11
22
+ - @checkstack/common@0.22.0
23
+ - @checkstack/dependency-common@1.7.5
24
+ - @checkstack/gitops-common@0.7.3
25
+ - @checkstack/incident-common@1.10.3
26
+ - @checkstack/integration-common@0.9.9
27
+ - @checkstack/maintenance-common@1.10.3
28
+ - @checkstack/notification-common@1.7.1
29
+ - @checkstack/pluginmanager-common@0.2.16
30
+ - @checkstack/queue-common@0.6.12
31
+ - @checkstack/script-packages-common@0.4.1
32
+ - @checkstack/secrets-common@0.3.2
33
+ - @checkstack/slo-common@0.9.3
34
+ - @checkstack/theme-common@0.2.11
35
+ - @checkstack/tips-common@0.3.11
36
+
37
+ ## 0.129.1
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies [1f20b5a]
42
+ - @checkstack/anomaly-common@1.8.0
43
+ - @checkstack/catalog-common@2.7.2
44
+ - @checkstack/dependency-common@1.7.4
45
+ - @checkstack/healthcheck-common@1.16.2
46
+ - @checkstack/incident-common@1.10.2
47
+ - @checkstack/maintenance-common@1.10.2
48
+ - @checkstack/slo-common@0.9.2
49
+ - @checkstack/satellite-common@0.9.6
50
+
3
51
  ## 0.128.1
4
52
 
5
53
  ### Patch Changes
@@ -46,6 +46,13 @@ declare module "@checkstack/sdk/healthcheck" {
46
46
  readonly id: string;
47
47
  /** The system's display name (falls back to the id). */
48
48
  readonly name: string;
49
+ /**
50
+ * The system's free-form custom fields, with the original
51
+ * (non-normalized) keys — so you read `metadata.baseUrl` directly.
52
+ * Values are arbitrary JSON (metadata only, never secrets); narrow
53
+ * each before use, e.g. `typeof metadata.baseUrl === "string"`.
54
+ */
55
+ readonly metadata: Record<string, unknown>;
49
56
  };
50
57
  /**
51
58
  * The environment this run resolved to, when the check fanned out into
@@ -35,6 +35,13 @@ interface HealthCheckScriptContext {
35
35
  readonly id: string;
36
36
  /** The system's display name (falls back to the id). */
37
37
  readonly name: string;
38
+ /**
39
+ * The system's free-form custom fields, with the original
40
+ * (non-normalized) keys — so you read `metadata.baseUrl` directly.
41
+ * Values are arbitrary JSON (metadata only, never secrets); narrow
42
+ * each before use, e.g. `typeof metadata.baseUrl === "string"`.
43
+ */
44
+ readonly metadata: Record<string, unknown>;
38
45
  };
39
46
  /**
40
47
  * The environment this run resolved to, when the check fanned out into
@@ -117,6 +117,13 @@ interface HealthCheckScriptContext {
117
117
  readonly id: string;
118
118
  /** The system's display name (falls back to the id). */
119
119
  readonly name: string;
120
+ /**
121
+ * The system's free-form custom fields, with the original
122
+ * (non-normalized) keys — so you read `metadata.baseUrl` directly.
123
+ * Values are arbitrary JSON (metadata only, never secrets); narrow
124
+ * each before use, e.g. `typeof metadata.baseUrl === "string"`.
125
+ */
126
+ readonly metadata: Record<string, unknown>;
120
127
  };
121
128
  /**
122
129
  * The environment this run resolved to, when the check fanned out into
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/sdk",
3
- "version": "0.129.0",
3
+ "version": "0.131.0",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "description": "Auto-generated, version-pinned typed client and script-authoring helpers for Checkstack.",
@@ -27,27 +27,27 @@
27
27
  }
28
28
  },
29
29
  "dependencies": {
30
- "@checkstack/announcement-common": "0.7.0",
31
- "@checkstack/anomaly-common": "1.7.2",
30
+ "@checkstack/announcement-common": "0.7.1",
31
+ "@checkstack/anomaly-common": "1.8.1",
32
32
  "@checkstack/auth-common": "0.14.0",
33
- "@checkstack/automation-common": "0.10.0",
33
+ "@checkstack/automation-common": "0.10.1",
34
34
  "@checkstack/cache-common": "0.5.11",
35
- "@checkstack/catalog-common": "2.7.1",
35
+ "@checkstack/catalog-common": "2.7.3",
36
36
  "@checkstack/command-common": "0.3.11",
37
37
  "@checkstack/common": "0.22.0",
38
- "@checkstack/dependency-common": "1.7.3",
38
+ "@checkstack/dependency-common": "1.7.5",
39
39
  "@checkstack/gitops-common": "0.7.3",
40
- "@checkstack/healthcheck-common": "1.16.1",
41
- "@checkstack/incident-common": "1.10.1",
42
- "@checkstack/integration-common": "0.9.8",
43
- "@checkstack/maintenance-common": "1.10.1",
44
- "@checkstack/notification-common": "1.7.0",
40
+ "@checkstack/healthcheck-common": "1.17.0",
41
+ "@checkstack/incident-common": "1.10.3",
42
+ "@checkstack/integration-common": "0.9.9",
43
+ "@checkstack/maintenance-common": "1.10.3",
44
+ "@checkstack/notification-common": "1.7.1",
45
45
  "@checkstack/pluginmanager-common": "0.2.16",
46
- "@checkstack/queue-common": "0.6.11",
47
- "@checkstack/satellite-common": "0.9.5",
48
- "@checkstack/script-packages-common": "0.4.0",
46
+ "@checkstack/queue-common": "0.6.12",
47
+ "@checkstack/satellite-common": "0.10.0",
48
+ "@checkstack/script-packages-common": "0.4.1",
49
49
  "@checkstack/secrets-common": "0.3.2",
50
- "@checkstack/slo-common": "0.9.1",
50
+ "@checkstack/slo-common": "0.9.3",
51
51
  "@checkstack/theme-common": "0.2.11",
52
52
  "@checkstack/tips-common": "0.3.11",
53
53
  "@orpc/client": "^1.14.4",
@@ -56,7 +56,7 @@
56
56
  "devDependencies": {
57
57
  "typescript": "^5.7.2",
58
58
  "@checkstack/tsconfig": "0.0.7",
59
- "@checkstack/scripts": "0.7.3"
59
+ "@checkstack/scripts": "0.7.4"
60
60
  },
61
61
  "scripts": {
62
62
  "typecheck": "tsgo -b",
@@ -8,6 +8,6 @@
8
8
  // must NOT bundle (it fetches the bundle live; see ./version.ts).
9
9
 
10
10
  /** The combined ambient `.d.ts` the in-app editor mounts into Monaco. */
11
- export const SDK_EDITOR_BUNDLE_DTS = "// AUTO-GENERATED by scripts/generate-sdk.ts - DO NOT EDIT BY HAND.\n// Run `bun run generate:sdk` after changing a *-common contract or the\n// script-context helper builders.\n\n// Combined ambient declarations served ONLY by the version-keyed editor\n// route and mounted into Monaco. NOT the `exports`-resolved declarations\n// (those are the per-subpath generated/*.d.ts). Declares the subpath module\n// names only - bare names are intentionally absent so an old import errors.\n//\n// Every declaration is module-scoped (no top-level globals): the editor\n// mounts this bundle alongside scriptContext.ts, which owns the global\n// `defineHealthCheck` / `defineIntegration` + schema-narrowed context types\n// (plan §6.2). Top-level globals here would duplicate those and error.\n\ndeclare module \"@checkstack/sdk/healthcheck\" {\n /** Result emitted by an inline health-check script. */\n interface HealthCheckScriptResult {\n /** Whether the health check passed. */\n success: boolean;\n /** Optional status message — surfaces in the run detail. */\n message?: string;\n /** Optional numeric value — feeds the value chart + anomaly detection. */\n value?: number;\n }\n\n /**\n * Runtime context exposed to inline health-check scripts. `config` is\n * typed from the collector's own JSON Schema, so the fields you've\n * declared on the configuration are autocompletable inside the script.\n */\n interface HealthCheckScriptContext {\n /** Strongly-typed collector configuration. */\n readonly config: Record<string, unknown>;\n /** Metadata about the health check this run is for. */\n readonly check: {\n /** The health check configuration id. */\n readonly id: string;\n /** The health check's display name (falls back to the id). */\n readonly name: string;\n /** The configured run interval, in seconds. */\n readonly intervalSeconds: number;\n };\n /** Metadata about the system this check runs for. */\n readonly system: {\n /** The system id. */\n readonly id: string;\n /** The system's display name (falls back to the id). */\n readonly name: string;\n };\n /**\n * The environment this run resolved to, when the check fanned out into\n * one. `undefined` when the assignment opts out or the system has no\n * environments — always guard with `context.environment?.…`.\n */\n readonly environment?: {\n /** The environment id. */\n readonly id: string;\n /** The environment's display name (falls back to the id). */\n readonly name: string;\n /**\n * The environment's free-form custom metadata, with the original\n * (non-normalized) keys — so you read `fields.baseUrl` directly.\n * Values are arbitrary JSON (metadata only, never secrets); narrow\n * each before use, e.g. `typeof fields.baseUrl === \"string\"`.\n */\n readonly fields: Record<string, unknown>;\n };\n }\n\n export function defineHealthCheck<\n T extends\n | HealthCheckScriptResult\n | ((ctx: HealthCheckScriptContext) =>\n | HealthCheckScriptResult\n | Promise<HealthCheckScriptResult>),\n >(value: T): T;\n export type { HealthCheckScriptResult, HealthCheckScriptContext };\n}\n\ndeclare module \"@checkstack/sdk/integration\" {\n /** Result emitted by an inline integration script. */\n interface IntegrationScriptResult {\n /** External ID for tracking (e.g. ticket number, message ID). */\n id?: string;\n /** Same as `id` — accepted for backwards compatibility. */\n externalId?: string;\n }\n\n /**\n * Runtime context exposed to inline integration scripts. `event.payload`\n * is typed from the event's payload schema so the fields it advertises\n * are autocompletable inside the script.\n */\n interface IntegrationScriptContext {\n /** The event being delivered. */\n readonly event: {\n /** Fully-qualified event ID, e.g. \"incident.created\". */\n readonly eventId: string;\n /** Strongly-typed event payload. */\n readonly payload: Record<string, unknown>;\n /** ISO-8601 timestamp of when the event was emitted. */\n readonly timestamp: string;\n /** Unique ID for this delivery attempt. */\n readonly deliveryId: string;\n };\n /** Subscription that triggered this delivery. */\n readonly subscription: {\n readonly id: string;\n readonly name: string;\n };\n }\n\n export function defineIntegration<\n T extends\n | IntegrationScriptResult\n | void\n | ((ctx: IntegrationScriptContext) =>\n | IntegrationScriptResult\n | void\n | Promise<IntegrationScriptResult | void>),\n >(value: T): T;\n export type { IntegrationScriptResult, IntegrationScriptContext };\n}\n\ndeclare module \"@checkstack/sdk\" {\n export { defineHealthCheck } from \"@checkstack/sdk/healthcheck\";\n export type { HealthCheckScriptResult, HealthCheckScriptContext } from \"@checkstack/sdk/healthcheck\";\n export { defineIntegration } from \"@checkstack/sdk/integration\";\n export type { IntegrationScriptResult, IntegrationScriptContext } from \"@checkstack/sdk/integration\";\n export interface CreateCheckstackClientOptions {\n baseUrl: string;\n headers?: Record<string, string>;\n }\n /** The fully-typed Checkstack API client (one entry per plugin id). */\n export type CheckstackClient = Record<string, unknown>;\n /** Build a typed Checkstack client over the REST/OpenAPI surface. */\n export function createCheckstackClient(\n options: CreateCheckstackClientOptions,\n ): CheckstackClient;\n}\n";
11
+ export const SDK_EDITOR_BUNDLE_DTS = "// AUTO-GENERATED by scripts/generate-sdk.ts - DO NOT EDIT BY HAND.\n// Run `bun run generate:sdk` after changing a *-common contract or the\n// script-context helper builders.\n\n// Combined ambient declarations served ONLY by the version-keyed editor\n// route and mounted into Monaco. NOT the `exports`-resolved declarations\n// (those are the per-subpath generated/*.d.ts). Declares the subpath module\n// names only - bare names are intentionally absent so an old import errors.\n//\n// Every declaration is module-scoped (no top-level globals): the editor\n// mounts this bundle alongside scriptContext.ts, which owns the global\n// `defineHealthCheck` / `defineIntegration` + schema-narrowed context types\n// (plan §6.2). Top-level globals here would duplicate those and error.\n\ndeclare module \"@checkstack/sdk/healthcheck\" {\n /** Result emitted by an inline health-check script. */\n interface HealthCheckScriptResult {\n /** Whether the health check passed. */\n success: boolean;\n /** Optional status message — surfaces in the run detail. */\n message?: string;\n /** Optional numeric value — feeds the value chart + anomaly detection. */\n value?: number;\n }\n\n /**\n * Runtime context exposed to inline health-check scripts. `config` is\n * typed from the collector's own JSON Schema, so the fields you've\n * declared on the configuration are autocompletable inside the script.\n */\n interface HealthCheckScriptContext {\n /** Strongly-typed collector configuration. */\n readonly config: Record<string, unknown>;\n /** Metadata about the health check this run is for. */\n readonly check: {\n /** The health check configuration id. */\n readonly id: string;\n /** The health check's display name (falls back to the id). */\n readonly name: string;\n /** The configured run interval, in seconds. */\n readonly intervalSeconds: number;\n };\n /** Metadata about the system this check runs for. */\n readonly system: {\n /** The system id. */\n readonly id: string;\n /** The system's display name (falls back to the id). */\n readonly name: string;\n /**\n * The system's free-form custom fields, with the original\n * (non-normalized) keys — so you read `metadata.baseUrl` directly.\n * Values are arbitrary JSON (metadata only, never secrets); narrow\n * each before use, e.g. `typeof metadata.baseUrl === \"string\"`.\n */\n readonly metadata: Record<string, unknown>;\n };\n /**\n * The environment this run resolved to, when the check fanned out into\n * one. `undefined` when the assignment opts out or the system has no\n * environments — always guard with `context.environment?.…`.\n */\n readonly environment?: {\n /** The environment id. */\n readonly id: string;\n /** The environment's display name (falls back to the id). */\n readonly name: string;\n /**\n * The environment's free-form custom metadata, with the original\n * (non-normalized) keys — so you read `fields.baseUrl` directly.\n * Values are arbitrary JSON (metadata only, never secrets); narrow\n * each before use, e.g. `typeof fields.baseUrl === \"string\"`.\n */\n readonly fields: Record<string, unknown>;\n };\n }\n\n export function defineHealthCheck<\n T extends\n | HealthCheckScriptResult\n | ((ctx: HealthCheckScriptContext) =>\n | HealthCheckScriptResult\n | Promise<HealthCheckScriptResult>),\n >(value: T): T;\n export type { HealthCheckScriptResult, HealthCheckScriptContext };\n}\n\ndeclare module \"@checkstack/sdk/integration\" {\n /** Result emitted by an inline integration script. */\n interface IntegrationScriptResult {\n /** External ID for tracking (e.g. ticket number, message ID). */\n id?: string;\n /** Same as `id` — accepted for backwards compatibility. */\n externalId?: string;\n }\n\n /**\n * Runtime context exposed to inline integration scripts. `event.payload`\n * is typed from the event's payload schema so the fields it advertises\n * are autocompletable inside the script.\n */\n interface IntegrationScriptContext {\n /** The event being delivered. */\n readonly event: {\n /** Fully-qualified event ID, e.g. \"incident.created\". */\n readonly eventId: string;\n /** Strongly-typed event payload. */\n readonly payload: Record<string, unknown>;\n /** ISO-8601 timestamp of when the event was emitted. */\n readonly timestamp: string;\n /** Unique ID for this delivery attempt. */\n readonly deliveryId: string;\n };\n /** Subscription that triggered this delivery. */\n readonly subscription: {\n readonly id: string;\n readonly name: string;\n };\n }\n\n export function defineIntegration<\n T extends\n | IntegrationScriptResult\n | void\n | ((ctx: IntegrationScriptContext) =>\n | IntegrationScriptResult\n | void\n | Promise<IntegrationScriptResult | void>),\n >(value: T): T;\n export type { IntegrationScriptResult, IntegrationScriptContext };\n}\n\ndeclare module \"@checkstack/sdk\" {\n export { defineHealthCheck } from \"@checkstack/sdk/healthcheck\";\n export type { HealthCheckScriptResult, HealthCheckScriptContext } from \"@checkstack/sdk/healthcheck\";\n export { defineIntegration } from \"@checkstack/sdk/integration\";\n export type { IntegrationScriptResult, IntegrationScriptContext } from \"@checkstack/sdk/integration\";\n export interface CreateCheckstackClientOptions {\n baseUrl: string;\n headers?: Record<string, string>;\n }\n /** The fully-typed Checkstack API client (one entry per plugin id). */\n export type CheckstackClient = Record<string, unknown>;\n /** Build a typed Checkstack client over the REST/OpenAPI surface. */\n export function createCheckstackClient(\n options: CreateCheckstackClientOptions,\n ): CheckstackClient;\n}\n";
12
12
 
13
13
  export { SDK_RELEASE_VERSION } from "./version.ts";
@@ -35,6 +35,13 @@ interface HealthCheckScriptContext {
35
35
  readonly id: string;
36
36
  /** The system's display name (falls back to the id). */
37
37
  readonly name: string;
38
+ /**
39
+ * The system's free-form custom fields, with the original
40
+ * (non-normalized) keys — so you read `metadata.baseUrl` directly.
41
+ * Values are arbitrary JSON (metadata only, never secrets); narrow
42
+ * each before use, e.g. `typeof metadata.baseUrl === "string"`.
43
+ */
44
+ readonly metadata: Record<string, unknown>;
38
45
  };
39
46
  /**
40
47
  * The environment this run resolved to, when the check fanned out into
package/src/version.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  // script-context helper builders.
4
4
 
5
5
  /** The platform release version this SDK was stamped to. */
6
- export const SDK_RELEASE_VERSION = "0.129.0";
6
+ export const SDK_RELEASE_VERSION = "0.131.0";