@camstack/types 1.2.438 → 1.2.439

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
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.439] - 2026-10-28
11
+
12
+ ### Changed
13
+
14
+ - An alert action can now run an addon's custom action as well as link to a page
15
+
10
16
  ## [1.2.438] - 2026-10-28
11
17
 
12
18
  ### Changed
@@ -14,9 +14,25 @@ export declare const AlertSeveritySchema: z.ZodEnum<{
14
14
  success: "success";
15
15
  warning: "warning";
16
16
  }>;
17
+ /**
18
+ * An action that RUNS something instead of going somewhere: the admin UI calls
19
+ * the addon's custom action (`addons.custom`) with exactly these fields. The
20
+ * producer owns the meaning; the UI knows nothing about the addon or the kind.
21
+ */
22
+ export declare const AlertActionInvokeSchema: z.ZodObject<{
23
+ addonId: z.ZodString;
24
+ action: z.ZodString;
25
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
26
+ }, z.core.$strip>;
27
+ /** An action has `href` (a link) OR `invoke` (a button that runs a custom action). */
17
28
  export declare const AlertActionSchema: z.ZodObject<{
18
29
  label: z.ZodString;
19
30
  href: z.ZodOptional<z.ZodString>;
31
+ invoke: z.ZodOptional<z.ZodObject<{
32
+ addonId: z.ZodString;
33
+ action: z.ZodString;
34
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
35
+ }, z.core.$strip>>;
20
36
  navigation: z.ZodOptional<z.ZodEnum<{
21
37
  app: "app";
22
38
  server: "server";
@@ -48,6 +64,11 @@ export declare const AlertSchema: z.ZodObject<{
48
64
  action: z.ZodOptional<z.ZodObject<{
49
65
  label: z.ZodString;
50
66
  href: z.ZodOptional<z.ZodString>;
67
+ invoke: z.ZodOptional<z.ZodObject<{
68
+ addonId: z.ZodString;
69
+ action: z.ZodString;
70
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
71
+ }, z.core.$strip>>;
51
72
  navigation: z.ZodOptional<z.ZodEnum<{
52
73
  app: "app";
53
74
  server: "server";
@@ -93,6 +114,11 @@ export declare const alertsCapability: {
93
114
  action: z.ZodOptional<z.ZodObject<{
94
115
  label: z.ZodString;
95
116
  href: z.ZodOptional<z.ZodString>;
117
+ invoke: z.ZodOptional<z.ZodObject<{
118
+ addonId: z.ZodString;
119
+ action: z.ZodString;
120
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
121
+ }, z.core.$strip>>;
96
122
  navigation: z.ZodOptional<z.ZodEnum<{
97
123
  app: "app";
98
124
  server: "server";
@@ -132,6 +158,11 @@ export declare const alertsCapability: {
132
158
  action: z.ZodOptional<z.ZodOptional<z.ZodObject<{
133
159
  label: z.ZodString;
134
160
  href: z.ZodOptional<z.ZodString>;
161
+ invoke: z.ZodOptional<z.ZodObject<{
162
+ addonId: z.ZodString;
163
+ action: z.ZodString;
164
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
165
+ }, z.core.$strip>>;
135
166
  navigation: z.ZodOptional<z.ZodEnum<{
136
167
  app: "app";
137
168
  server: "server";
@@ -173,6 +204,11 @@ export declare const alertsCapability: {
173
204
  action: z.ZodOptional<z.ZodObject<{
174
205
  label: z.ZodString;
175
206
  href: z.ZodOptional<z.ZodString>;
207
+ invoke: z.ZodOptional<z.ZodObject<{
208
+ addonId: z.ZodString;
209
+ action: z.ZodString;
210
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
211
+ }, z.core.$strip>>;
176
212
  navigation: z.ZodOptional<z.ZodEnum<{
177
213
  app: "app";
178
214
  server: "server";
package/dist/index.js CHANGED
@@ -11180,9 +11180,21 @@ var AlertSeveritySchema = zod.z.enum([
11180
11180
  "error",
11181
11181
  "critical"
11182
11182
  ]);
11183
+ /**
11184
+ * An action that RUNS something instead of going somewhere: the admin UI calls
11185
+ * the addon's custom action (`addons.custom`) with exactly these fields. The
11186
+ * producer owns the meaning; the UI knows nothing about the addon or the kind.
11187
+ */
11188
+ var AlertActionInvokeSchema = zod.z.object({
11189
+ addonId: zod.z.string().min(1),
11190
+ action: zod.z.string().min(1),
11191
+ input: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
11192
+ });
11193
+ /** An action has `href` (a link) OR `invoke` (a button that runs a custom action). */
11183
11194
  var AlertActionSchema = zod.z.object({
11184
11195
  label: zod.z.string(),
11185
11196
  href: zod.z.string().optional(),
11197
+ invoke: AlertActionInvokeSchema.optional(),
11186
11198
  /**
11187
11199
  * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
11188
11200
  * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
package/dist/index.mjs CHANGED
@@ -11179,9 +11179,21 @@ var AlertSeveritySchema = z.enum([
11179
11179
  "error",
11180
11180
  "critical"
11181
11181
  ]);
11182
+ /**
11183
+ * An action that RUNS something instead of going somewhere: the admin UI calls
11184
+ * the addon's custom action (`addons.custom`) with exactly these fields. The
11185
+ * producer owns the meaning; the UI knows nothing about the addon or the kind.
11186
+ */
11187
+ var AlertActionInvokeSchema = z.object({
11188
+ addonId: z.string().min(1),
11189
+ action: z.string().min(1),
11190
+ input: z.record(z.string(), z.unknown()).optional()
11191
+ });
11192
+ /** An action has `href` (a link) OR `invoke` (a button that runs a custom action). */
11182
11193
  var AlertActionSchema = z.object({
11183
11194
  label: z.string(),
11184
11195
  href: z.string().optional(),
11196
+ invoke: AlertActionInvokeSchema.optional(),
11185
11197
  /**
11186
11198
  * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
11187
11199
  * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.438",
3
+ "version": "1.2.439",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",