@camstack/addon-advanced-notifier 1.1.13 → 1.1.15

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.js CHANGED
@@ -26,6 +26,11 @@ async function fetchWithTimeout(url, init, timeoutMs = DEFAULT_OUTPUT_TIMEOUT_MS
26
26
  }
27
27
  //#endregion
28
28
  //#region src/outputs/webhook.ts
29
+ /**
30
+ * @deprecated Superseded by the `addon-notifiers` generic-webhook adapter
31
+ * (the `notification-output` cap collection provider). Kept only for
32
+ * compile-compat; not registered as a live output.
33
+ */
29
34
  var WebhookOutput = class {
30
35
  id = "webhook";
31
36
  name = "Webhook";
@@ -45,10 +50,9 @@ var WebhookOutput = class {
45
50
  try {
46
51
  await this.send({
47
52
  title: "Test Notification",
48
- message: "This is a test from CamStack Advanced Notifier",
49
- severity: "info",
50
- category: "test",
51
- timestamp: Date.now()
53
+ body: "This is a test from CamStack Advanced Notifier",
54
+ format: "text",
55
+ priority: 3
52
56
  });
53
57
  return { success: true };
54
58
  } catch (err) {
@@ -61,6 +65,12 @@ var WebhookOutput = class {
61
65
  };
62
66
  //#endregion
63
67
  //#region src/outputs/home-assistant.ts
68
+ /**
69
+ * @deprecated Superseded by the `homeassistant` kind in
70
+ * `addon-provider-homeassistant` (the `notification-output` cap collection
71
+ * provider, reusing the HA broker connection). Kept only for compile-compat;
72
+ * not registered as a live output.
73
+ */
64
74
  var HomeAssistantOutput = class {
65
75
  id = "home-assistant";
66
76
  name = "Home Assistant";
@@ -80,11 +90,10 @@ var HomeAssistantOutput = class {
80
90
  },
81
91
  body: JSON.stringify({
82
92
  title: notification.title,
83
- message: notification.message,
84
- severity: notification.severity,
85
- category: notification.category,
93
+ message: notification.body,
94
+ priority: notification.priority,
86
95
  device_id: notification.deviceId,
87
- data: notification.data
96
+ data: notification.metadata
88
97
  })
89
98
  });
90
99
  }
@@ -92,10 +101,9 @@ var HomeAssistantOutput = class {
92
101
  try {
93
102
  await this.send({
94
103
  title: "CamStack Test",
95
- message: "Connection verified",
96
- severity: "info",
97
- category: "test",
98
- timestamp: Date.now()
104
+ body: "Connection verified",
105
+ format: "text",
106
+ priority: 3
99
107
  });
100
108
  return { success: true };
101
109
  } catch (err) {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { AdvancedNotifierAddon, a as RuleEngine, i as CooldownTracker, n as ConsoleOutput, o as RuleStore, r as renderTemplate, t as AuditLog } from "./addon.mjs";
1
+ import { AdvancedNotifierAddon, a as ConsoleOutput, i as CooldownTracker, n as RuleStore, o as AuditLog, r as RuleEngine, t as renderTemplate } from "./addon.mjs";
2
2
  //#region src/outputs/http.ts
3
3
  /**
4
4
  * Outbound HTTP helper for notification outputs.
@@ -25,6 +25,11 @@ async function fetchWithTimeout(url, init, timeoutMs = DEFAULT_OUTPUT_TIMEOUT_MS
25
25
  }
26
26
  //#endregion
27
27
  //#region src/outputs/webhook.ts
28
+ /**
29
+ * @deprecated Superseded by the `addon-notifiers` generic-webhook adapter
30
+ * (the `notification-output` cap collection provider). Kept only for
31
+ * compile-compat; not registered as a live output.
32
+ */
28
33
  var WebhookOutput = class {
29
34
  id = "webhook";
30
35
  name = "Webhook";
@@ -44,10 +49,9 @@ var WebhookOutput = class {
44
49
  try {
45
50
  await this.send({
46
51
  title: "Test Notification",
47
- message: "This is a test from CamStack Advanced Notifier",
48
- severity: "info",
49
- category: "test",
50
- timestamp: Date.now()
52
+ body: "This is a test from CamStack Advanced Notifier",
53
+ format: "text",
54
+ priority: 3
51
55
  });
52
56
  return { success: true };
53
57
  } catch (err) {
@@ -60,6 +64,12 @@ var WebhookOutput = class {
60
64
  };
61
65
  //#endregion
62
66
  //#region src/outputs/home-assistant.ts
67
+ /**
68
+ * @deprecated Superseded by the `homeassistant` kind in
69
+ * `addon-provider-homeassistant` (the `notification-output` cap collection
70
+ * provider, reusing the HA broker connection). Kept only for compile-compat;
71
+ * not registered as a live output.
72
+ */
63
73
  var HomeAssistantOutput = class {
64
74
  id = "home-assistant";
65
75
  name = "Home Assistant";
@@ -79,11 +89,10 @@ var HomeAssistantOutput = class {
79
89
  },
80
90
  body: JSON.stringify({
81
91
  title: notification.title,
82
- message: notification.message,
83
- severity: notification.severity,
84
- category: notification.category,
92
+ message: notification.body,
93
+ priority: notification.priority,
85
94
  device_id: notification.deviceId,
86
- data: notification.data
95
+ data: notification.metadata
87
96
  })
88
97
  });
89
98
  }
@@ -91,10 +100,9 @@ var HomeAssistantOutput = class {
91
100
  try {
92
101
  await this.send({
93
102
  title: "CamStack Test",
94
- message: "Connection verified",
95
- severity: "info",
96
- category: "test",
97
- timestamp: Date.now()
103
+ body: "Connection verified",
104
+ format: "text",
105
+ priority: 3
98
106
  });
99
107
  return { success: true };
100
108
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-advanced-notifier",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "description": "Rules-based notification engine for CamStack",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",