@signalk/server-api 2.22.0 → 2.24.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.
Files changed (46) hide show
  1. package/dist/deltas.d.ts +8 -0
  2. package/dist/deltas.d.ts.map +1 -1
  3. package/dist/history.d.ts +40 -8
  4. package/dist/history.d.ts.map +1 -1
  5. package/dist/history.js +7 -2
  6. package/dist/propertyvalues.d.ts.map +1 -1
  7. package/dist/propertyvalues.js +35 -5
  8. package/dist/serverapi.d.ts +3 -2
  9. package/dist/serverapi.d.ts.map +1 -1
  10. package/dist/streambundle.d.ts +4 -4
  11. package/dist/streambundle.d.ts.map +1 -1
  12. package/dist/typebox/autopilot-schemas.d.ts +59 -0
  13. package/dist/typebox/autopilot-schemas.d.ts.map +1 -0
  14. package/dist/typebox/autopilot-schemas.js +86 -0
  15. package/dist/typebox/course-schemas.d.ts +218 -0
  16. package/dist/typebox/course-schemas.d.ts.map +1 -0
  17. package/dist/typebox/course-schemas.js +317 -0
  18. package/dist/typebox/discovery-schemas.d.ts +53 -0
  19. package/dist/typebox/discovery-schemas.d.ts.map +1 -0
  20. package/dist/typebox/discovery-schemas.js +73 -0
  21. package/dist/typebox/history-schemas.d.ts +34 -0
  22. package/dist/typebox/history-schemas.d.ts.map +1 -0
  23. package/dist/typebox/history-schemas.js +75 -0
  24. package/dist/typebox/index.d.ts +11 -0
  25. package/dist/typebox/index.d.ts.map +1 -0
  26. package/dist/typebox/index.js +26 -0
  27. package/dist/typebox/notifications-schemas.d.ts +50 -0
  28. package/dist/typebox/notifications-schemas.d.ts.map +1 -0
  29. package/dist/typebox/notifications-schemas.js +53 -0
  30. package/dist/typebox/protocol-schemas.d.ts +432 -0
  31. package/dist/typebox/protocol-schemas.d.ts.map +1 -0
  32. package/dist/typebox/protocol-schemas.js +352 -0
  33. package/dist/typebox/radar-schemas.d.ts +50 -0
  34. package/dist/typebox/radar-schemas.d.ts.map +1 -0
  35. package/dist/typebox/radar-schemas.js +70 -0
  36. package/dist/typebox/resources-schemas.d.ts +152 -0
  37. package/dist/typebox/resources-schemas.d.ts.map +1 -0
  38. package/dist/typebox/resources-schemas.js +214 -0
  39. package/dist/typebox/shared-schemas.d.ts +92 -0
  40. package/dist/typebox/shared-schemas.d.ts.map +1 -0
  41. package/dist/typebox/shared-schemas.js +149 -0
  42. package/dist/typebox/weather-schemas.d.ts +82 -0
  43. package/dist/typebox/weather-schemas.d.ts.map +1 -0
  44. package/dist/typebox/weather-schemas.js +215 -0
  45. package/package.json +12 -8
  46. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ /**
3
+ * TypeBox Schema Definitions for the Signal K Discovery API
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.FeaturesModelSchema = exports.PluginMetaDataSchema = exports.DiscoveryDataSchema = exports.V1EndpointSchema = void 0;
7
+ const typebox_1 = require("@sinclair/typebox");
8
+ /**
9
+ * v1 endpoint descriptor — protocol addresses for a specific API version.
10
+ */
11
+ exports.V1EndpointSchema = typebox_1.Type.Object({
12
+ version: typebox_1.Type.String({
13
+ description: 'Version of the Signal K API',
14
+ examples: ['1.1.0']
15
+ }),
16
+ 'signalk-http': typebox_1.Type.Optional(typebox_1.Type.String({
17
+ description: "Address of the server's http API.",
18
+ examples: ['http://192.168.1.88:3000/signalk/v1/api/']
19
+ })),
20
+ 'signalk-ws': typebox_1.Type.Optional(typebox_1.Type.String({
21
+ description: "Address of the server's WebSocket API.",
22
+ examples: ['ws://192.168.1.88:3000/signalk/v1/stream']
23
+ })),
24
+ 'signalk-tcp': typebox_1.Type.Optional(typebox_1.Type.String({
25
+ description: "Address of the server's Signal K over TCP API.",
26
+ examples: ['tcp://192.168.1.88:8375']
27
+ }))
28
+ }, { $id: 'V1Endpoint' });
29
+ /**
30
+ * Discovery response — server version and service endpoints.
31
+ */
32
+ exports.DiscoveryDataSchema = typebox_1.Type.Object({
33
+ endpoints: typebox_1.Type.Object({
34
+ v1: typebox_1.Type.Optional(exports.V1EndpointSchema)
35
+ }),
36
+ server: typebox_1.Type.Object({
37
+ id: typebox_1.Type.String({
38
+ description: 'Id of the server implementation',
39
+ examples: ['signalk-server-node']
40
+ }),
41
+ version: typebox_1.Type.String({
42
+ description: 'Server software version'
43
+ })
44
+ })
45
+ }, {
46
+ $id: 'DiscoveryData',
47
+ description: 'Server version and service endpoint discovery data'
48
+ });
49
+ /**
50
+ * Plugin metadata for feature discovery.
51
+ */
52
+ exports.PluginMetaDataSchema = typebox_1.Type.Object({
53
+ id: typebox_1.Type.String({ description: 'Plugin ID.' }),
54
+ name: typebox_1.Type.String({ description: 'Plugin name.' }),
55
+ version: typebox_1.Type.String({ description: 'Plugin version.' })
56
+ }, {
57
+ $id: 'PluginMetaData',
58
+ description: 'Plugin metadata.'
59
+ });
60
+ /**
61
+ * Server features response — available APIs and installed plugins.
62
+ */
63
+ exports.FeaturesModelSchema = typebox_1.Type.Object({
64
+ apis: typebox_1.Type.Array(typebox_1.Type.String(), {
65
+ description: 'Implemented APIs.'
66
+ }),
67
+ plugins: typebox_1.Type.Array(exports.PluginMetaDataSchema, {
68
+ description: 'Installed Plugins.'
69
+ })
70
+ }, {
71
+ $id: 'FeaturesModel',
72
+ description: 'Features response'
73
+ });
@@ -0,0 +1,34 @@
1
+ /**
2
+ * TypeBox Schema Definitions for the Signal K History API
3
+ */
4
+ import { type Static } from '@sinclair/typebox';
5
+ export declare const AggregateMethodSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"average">, import("@sinclair/typebox").TLiteral<"min">, import("@sinclair/typebox").TLiteral<"max">, import("@sinclair/typebox").TLiteral<"first">, import("@sinclair/typebox").TLiteral<"last">, import("@sinclair/typebox").TLiteral<"mid">, import("@sinclair/typebox").TLiteral<"middle_index">, import("@sinclair/typebox").TLiteral<"sma">, import("@sinclair/typebox").TLiteral<"ema">]>;
6
+ export type AggregateMethodSchemaType = Static<typeof AggregateMethodSchema>;
7
+ export declare const ValuesResponseSchema: import("@sinclair/typebox").TObject<{
8
+ context: import("@sinclair/typebox").TString;
9
+ range: import("@sinclair/typebox").TObject<{
10
+ from: import("@sinclair/typebox").TString;
11
+ to: import("@sinclair/typebox").TString;
12
+ }>;
13
+ values: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
14
+ path: import("@sinclair/typebox").TString;
15
+ method: import("@sinclair/typebox").TString;
16
+ }>>;
17
+ data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>>>;
18
+ }>;
19
+ export type ValuesResponseSchemaType = Static<typeof ValuesResponseSchema>;
20
+ export declare const PathSpecSchema: import("@sinclair/typebox").TObject<{
21
+ path: import("@sinclair/typebox").TString;
22
+ aggregate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"average">, import("@sinclair/typebox").TLiteral<"min">, import("@sinclair/typebox").TLiteral<"max">, import("@sinclair/typebox").TLiteral<"first">, import("@sinclair/typebox").TLiteral<"last">, import("@sinclair/typebox").TLiteral<"mid">, import("@sinclair/typebox").TLiteral<"middle_index">, import("@sinclair/typebox").TLiteral<"sma">, import("@sinclair/typebox").TLiteral<"ema">]>;
23
+ parameter: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
24
+ }>;
25
+ export type PathSpecSchemaType = Static<typeof PathSpecSchema>;
26
+ export declare const HistoryProviderInfoSchema: import("@sinclair/typebox").TObject<{
27
+ isDefault: import("@sinclair/typebox").TBoolean;
28
+ }>;
29
+ export type HistoryProviderInfoSchemaType = Static<typeof HistoryProviderInfoSchema>;
30
+ export declare const HistoryProvidersResponseSchema: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
31
+ isDefault: import("@sinclair/typebox").TBoolean;
32
+ }>>;
33
+ export type HistoryProvidersResponseSchemaType = Static<typeof HistoryProvidersResponseSchema>;
34
+ //# sourceMappingURL=history-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history-schemas.d.ts","sourceRoot":"","sources":["../../src/typebox/history-schemas.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAErD,eAAO,MAAM,qBAAqB,2cAiBjC,CAAA;AACD,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE5E,eAAO,MAAM,oBAAoB;;;;;;;;;;;EA8ChC,CAAA;AACD,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE1E,eAAO,MAAM,cAAc;;;;EAc1B,CAAA;AACD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA;AAE9D,eAAO,MAAM,yBAAyB;;EAOrC,CAAA;AACD,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAChD,OAAO,yBAAyB,CACjC,CAAA;AAED,eAAO,MAAM,8BAA8B;;GAO1C,CAAA;AACD,MAAM,MAAM,kCAAkC,GAAG,MAAM,CACrD,OAAO,8BAA8B,CACtC,CAAA"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ /**
3
+ * TypeBox Schema Definitions for the Signal K History API
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.HistoryProvidersResponseSchema = exports.HistoryProviderInfoSchema = exports.PathSpecSchema = exports.ValuesResponseSchema = exports.AggregateMethodSchema = void 0;
7
+ const typebox_1 = require("@sinclair/typebox");
8
+ exports.AggregateMethodSchema = typebox_1.Type.Union([
9
+ typebox_1.Type.Literal('average'),
10
+ typebox_1.Type.Literal('min'),
11
+ typebox_1.Type.Literal('max'),
12
+ typebox_1.Type.Literal('first'),
13
+ typebox_1.Type.Literal('last'),
14
+ typebox_1.Type.Literal('mid'),
15
+ typebox_1.Type.Literal('middle_index'),
16
+ typebox_1.Type.Literal('sma'),
17
+ typebox_1.Type.Literal('ema')
18
+ ], {
19
+ $id: 'AggregateMethod',
20
+ description: "Aggregation method for historical data. The 'sma' (Simple Moving Average) and 'ema' (Exponential Moving Average) methods accept an optional numeric parameter separated by colon: for sma it is the number of samples, for ema it is the alpha value (0-1)."
21
+ });
22
+ exports.ValuesResponseSchema = typebox_1.Type.Object({
23
+ context: typebox_1.Type.String({
24
+ description: 'Signal K context that the data is about',
25
+ examples: ['vessels.urn:mrn:imo:mmsi:123456789']
26
+ }),
27
+ range: typebox_1.Type.Object({
28
+ from: typebox_1.Type.String({
29
+ format: 'date-time',
30
+ description: 'Start of the time range, inclusive, as UTC timestamp',
31
+ examples: ['2018-03-20T09:12:28Z']
32
+ }),
33
+ to: typebox_1.Type.String({
34
+ format: 'date-time',
35
+ description: 'End of the time range, inclusive, as UTC timestamp',
36
+ examples: ['2018-03-20T09:13:28Z']
37
+ })
38
+ }),
39
+ values: typebox_1.Type.Array(typebox_1.Type.Object({
40
+ path: typebox_1.Type.String({ description: 'Signal K path' }),
41
+ method: typebox_1.Type.String({ description: 'Aggregation method' })
42
+ })),
43
+ data: typebox_1.Type.Array(typebox_1.Type.Array(typebox_1.Type.Union([
44
+ typebox_1.Type.String(),
45
+ typebox_1.Type.Number(),
46
+ typebox_1.Type.Null(),
47
+ typebox_1.Type.Array(typebox_1.Type.Number())
48
+ ]), {
49
+ description: 'Data for a point in time. The first array element is the timestamp in ISO 8601 format. Missing data for a path is returned as null'
50
+ }), {
51
+ examples: [[['2023-11-09T02:45:38.160Z', 13.2, null, [-120.5, 59.2]]]]
52
+ })
53
+ }, {
54
+ $id: 'HistoryValuesResponse',
55
+ description: 'Historical data series with header and data rows'
56
+ });
57
+ exports.PathSpecSchema = typebox_1.Type.Object({
58
+ path: typebox_1.Type.String({ description: 'Signal K path' }),
59
+ aggregate: exports.AggregateMethodSchema,
60
+ parameter: typebox_1.Type.Array(typebox_1.Type.String(), {
61
+ description: 'Additional parameters for the aggregation method (e.g., sample count for sma, alpha for ema)'
62
+ })
63
+ }, {
64
+ $id: 'PathSpec',
65
+ description: 'Specification for a path to query, including the aggregation method and optional parameters'
66
+ });
67
+ exports.HistoryProviderInfoSchema = typebox_1.Type.Object({
68
+ isDefault: typebox_1.Type.Boolean({
69
+ description: '`true` if this provider is set as the default.'
70
+ })
71
+ }, { $id: 'HistoryProviderInfo' });
72
+ exports.HistoryProvidersResponseSchema = typebox_1.Type.Record(typebox_1.Type.String({ description: 'Plugin id of the history provider' }), exports.HistoryProviderInfoSchema, {
73
+ $id: 'HistoryProvidersResponse',
74
+ description: 'Map of registered history providers keyed by plugin id'
75
+ });
@@ -0,0 +1,11 @@
1
+ export * from './shared-schemas';
2
+ export * from './protocol-schemas';
3
+ export * from './autopilot-schemas';
4
+ export * from './course-schemas';
5
+ export * from './discovery-schemas';
6
+ export * from './history-schemas';
7
+ export * from './notifications-schemas';
8
+ export * from './radar-schemas';
9
+ export * from './resources-schemas';
10
+ export * from './weather-schemas';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/typebox/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./shared-schemas"), exports);
18
+ __exportStar(require("./protocol-schemas"), exports);
19
+ __exportStar(require("./autopilot-schemas"), exports);
20
+ __exportStar(require("./course-schemas"), exports);
21
+ __exportStar(require("./discovery-schemas"), exports);
22
+ __exportStar(require("./history-schemas"), exports);
23
+ __exportStar(require("./notifications-schemas"), exports);
24
+ __exportStar(require("./radar-schemas"), exports);
25
+ __exportStar(require("./resources-schemas"), exports);
26
+ __exportStar(require("./weather-schemas"), exports);
@@ -0,0 +1,50 @@
1
+ /**
2
+ * TypeBox Schema Definitions for the Signal K Notifications API
3
+ */
4
+ import { type Static } from '@sinclair/typebox';
5
+ import { AlarmStateSchema, AlarmMethodSchema, AlarmStatusSchema, NotificationSchema } from './protocol-schemas';
6
+ export { AlarmStateSchema, AlarmMethodSchema, AlarmStatusSchema, NotificationSchema };
7
+ /**
8
+ * Alarm method array — wraps the AlarmMethod enum for OpenAPI.
9
+ */
10
+ export declare const AlarmMethodArraySchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"visual">, import("@sinclair/typebox").TLiteral<"sound">]>>;
11
+ /**
12
+ * Alarm object — state, method, message, and optional status.
13
+ * Used as the `value` field in a notification response.
14
+ */
15
+ export declare const AlarmSchema: import("@sinclair/typebox").TObject<{
16
+ state: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"nominal">, import("@sinclair/typebox").TLiteral<"normal">, import("@sinclair/typebox").TLiteral<"alert">, import("@sinclair/typebox").TLiteral<"warn">, import("@sinclair/typebox").TLiteral<"alarm">, import("@sinclair/typebox").TLiteral<"emergency">]>;
17
+ method: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"visual">, import("@sinclair/typebox").TLiteral<"sound">]>>;
18
+ message: import("@sinclair/typebox").TString;
19
+ status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
20
+ silenced: import("@sinclair/typebox").TBoolean;
21
+ acknowledged: import("@sinclair/typebox").TBoolean;
22
+ canSilence: import("@sinclair/typebox").TBoolean;
23
+ canAcknowledge: import("@sinclair/typebox").TBoolean;
24
+ canClear: import("@sinclair/typebox").TBoolean;
25
+ }>>;
26
+ }>;
27
+ export type Alarm = Static<typeof AlarmSchema>;
28
+ /**
29
+ * Notification response wrapper — value containing an alarm.
30
+ */
31
+ export declare const NotificationResponseSchema: import("@sinclair/typebox").TObject<{
32
+ value: import("@sinclair/typebox").TObject<{
33
+ state: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"nominal">, import("@sinclair/typebox").TLiteral<"normal">, import("@sinclair/typebox").TLiteral<"alert">, import("@sinclair/typebox").TLiteral<"warn">, import("@sinclair/typebox").TLiteral<"alarm">, import("@sinclair/typebox").TLiteral<"emergency">]>;
34
+ method: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"visual">, import("@sinclair/typebox").TLiteral<"sound">]>>;
35
+ message: import("@sinclair/typebox").TString;
36
+ status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
37
+ silenced: import("@sinclair/typebox").TBoolean;
38
+ acknowledged: import("@sinclair/typebox").TBoolean;
39
+ canSilence: import("@sinclair/typebox").TBoolean;
40
+ canAcknowledge: import("@sinclair/typebox").TBoolean;
41
+ canClear: import("@sinclair/typebox").TBoolean;
42
+ }>>;
43
+ }>;
44
+ }>;
45
+ export type NotificationResponse = Static<typeof NotificationResponseSchema>;
46
+ /**
47
+ * Notification ID parameter — UUID v4 format.
48
+ */
49
+ export declare const NotificationIdParamSchema: import("@sinclair/typebox").TString;
50
+ //# sourceMappingURL=notifications-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications-schemas.d.ts","sourceRoot":"","sources":["../../src/typebox/notifications-schemas.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EACnB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,yKAKjC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;EAWvB,CAAA;AACD,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,WAAW,CAAC,CAAA;AAE9C;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;EAQtC,CAAA;AACD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAE5E;;GAEG;AACH,eAAO,MAAM,yBAAyB,qCAKpC,CAAA"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /**
3
+ * TypeBox Schema Definitions for the Signal K Notifications API
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NotificationIdParamSchema = exports.NotificationResponseSchema = exports.AlarmSchema = exports.AlarmMethodArraySchema = exports.NotificationSchema = exports.AlarmStatusSchema = exports.AlarmMethodSchema = exports.AlarmStateSchema = void 0;
7
+ const typebox_1 = require("@sinclair/typebox");
8
+ const protocol_schemas_1 = require("./protocol-schemas");
9
+ Object.defineProperty(exports, "AlarmStateSchema", { enumerable: true, get: function () { return protocol_schemas_1.AlarmStateSchema; } });
10
+ Object.defineProperty(exports, "AlarmMethodSchema", { enumerable: true, get: function () { return protocol_schemas_1.AlarmMethodSchema; } });
11
+ Object.defineProperty(exports, "AlarmStatusSchema", { enumerable: true, get: function () { return protocol_schemas_1.AlarmStatusSchema; } });
12
+ Object.defineProperty(exports, "NotificationSchema", { enumerable: true, get: function () { return protocol_schemas_1.NotificationSchema; } });
13
+ const shared_schemas_1 = require("./shared-schemas");
14
+ /**
15
+ * Alarm method array — wraps the AlarmMethod enum for OpenAPI.
16
+ */
17
+ exports.AlarmMethodArraySchema = typebox_1.Type.Array(protocol_schemas_1.AlarmMethodSchema, {
18
+ $id: 'AlarmMethodArray',
19
+ description: 'Methods to use to raise the alarm.',
20
+ uniqueItems: true,
21
+ examples: [['sound']]
22
+ });
23
+ /**
24
+ * Alarm object — state, method, message, and optional status.
25
+ * Used as the `value` field in a notification response.
26
+ */
27
+ exports.AlarmSchema = typebox_1.Type.Object({
28
+ state: protocol_schemas_1.AlarmStateSchema,
29
+ method: exports.AlarmMethodArraySchema,
30
+ message: typebox_1.Type.String({ description: 'Message to display or speak' }),
31
+ status: typebox_1.Type.Optional(protocol_schemas_1.AlarmStatusSchema)
32
+ }, {
33
+ $id: 'Alarm',
34
+ description: 'Alarm notification value'
35
+ });
36
+ /**
37
+ * Notification response wrapper — value containing an alarm.
38
+ */
39
+ exports.NotificationResponseSchema = typebox_1.Type.Object({
40
+ value: exports.AlarmSchema
41
+ }, {
42
+ $id: 'NotificationResponse',
43
+ description: 'Notification with alarm value'
44
+ });
45
+ /**
46
+ * Notification ID parameter — UUID v4 format.
47
+ */
48
+ exports.NotificationIdParamSchema = typebox_1.Type.String({
49
+ $id: 'NotificationIdParam',
50
+ pattern: `${shared_schemas_1.SignalKUuidPattern}$`,
51
+ description: 'Notification identifier',
52
+ examples: ['ac3a3b2d-07e8-4f25-92bc-98e7c92f7f1a']
53
+ });