@bueno-analytics/fleet-command 0.3.0 → 0.4.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 +14 -0
- package/dist/dnsCheck.d.ts +16 -0
- package/dist/dnsCheck.js +12 -0
- package/dist/fleetCommands.d.ts +44 -0
- package/dist/fleetCommands.js +20 -0
- package/dist/gatewayCommand.d.ts +24 -0
- package/dist/gatewayCommand.js +10 -0
- package/dist/gatewayInfo.d.ts +17 -0
- package/dist/gatewayInfo.js +17 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/listPlugins.d.ts +1 -0
- package/dist/listPlugins.js +2 -0
- package/dist/publishStreams.d.ts +7 -0
- package/dist/publishStreams.js +5 -0
- package/dist/syncPlugins.d.ts +7 -0
- package/dist/syncPlugins.js +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.0](https://github.com/copelandsoftware/bueno_js_sdk/compare/@bueno-analytics/fleet-command@0.3.0...@bueno-analytics/fleet-command@0.4.0) (2026-11-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **fleet-command:** add gateway command schemas and publish-streams ([d39c416](https://github.com/copelandsoftware/bueno_js_sdk/commit/d39c416d1a7e2ea4baf92907bce0ee82542d1323))
|
|
9
|
+
* **fleet-command:** add gateway-info and dns-check command schemas ([6b3d4b2](https://github.com/copelandsoftware/bueno_js_sdk/commit/6b3d4b2bfe571324f3ff2f8e8ef99803d93b1e3e))
|
|
10
|
+
* **fleet-command:** add the sync-plugins command schema ([26dbcf4](https://github.com/copelandsoftware/bueno_js_sdk/commit/26dbcf45b36f6f4121e5e68521d3b48158d9e29a))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **fleet-command:** accept only REPLY messages as gateway command replies ([87d23c1](https://github.com/copelandsoftware/bueno_js_sdk/commit/87d23c193b3a5bbb6dab4ceb904204db845cac73))
|
|
16
|
+
|
|
3
17
|
## [0.3.0](https://github.com/copelandsoftware/bueno_js_sdk/compare/@bueno-analytics/fleet-command@0.2.0...@bueno-analytics/fleet-command@0.3.0) (2026-10-20)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const dnsCheckRequest: z.ZodObject<{}, z.core.$strip>;
|
|
3
|
+
export declare const dnsCheckReply: z.ZodObject<{
|
|
4
|
+
configuredServers: z.ZodArray<z.ZodString>;
|
|
5
|
+
testResolution: z.ZodObject<{
|
|
6
|
+
domain: z.ZodString;
|
|
7
|
+
ip: z.ZodNullable<z.ZodString>;
|
|
8
|
+
latencyMs: z.ZodNumber;
|
|
9
|
+
status: z.ZodEnum<{
|
|
10
|
+
degraded: "degraded";
|
|
11
|
+
resolved: "resolved";
|
|
12
|
+
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type DnsCheckRequest = z.infer<typeof dnsCheckRequest>;
|
|
16
|
+
export type DnsCheckReply = z.infer<typeof dnsCheckReply>;
|
package/dist/dnsCheck.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const dnsCheckRequest = z.object({});
|
|
3
|
+
export const dnsCheckReply = z.object({
|
|
4
|
+
configuredServers: z.array(z.string()),
|
|
5
|
+
// A lookup of the Bueno API host from the gateway.
|
|
6
|
+
testResolution: z.object({
|
|
7
|
+
domain: z.string(),
|
|
8
|
+
ip: z.string().nullable(),
|
|
9
|
+
latencyMs: z.number(),
|
|
10
|
+
status: z.enum(['resolved', 'degraded']),
|
|
11
|
+
}),
|
|
12
|
+
});
|
package/dist/fleetCommands.d.ts
CHANGED
|
@@ -6,8 +6,52 @@ export declare const fleetCommands: {
|
|
|
6
6
|
id: import("zod").ZodString;
|
|
7
7
|
name: import("zod").ZodString;
|
|
8
8
|
version: import("zod").ZodString;
|
|
9
|
+
integrationId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
9
10
|
}, import("zod/v4/core").$strip>>;
|
|
10
11
|
}, import("zod/v4/core").$strip>;
|
|
11
12
|
};
|
|
13
|
+
readonly 'publish-streams': {
|
|
14
|
+
readonly request: import("zod").ZodObject<{}, import("zod/v4/core").$strip>;
|
|
15
|
+
readonly reply: import("zod").ZodObject<{
|
|
16
|
+
queued: import("zod").ZodBoolean;
|
|
17
|
+
}, import("zod/v4/core").$strip>;
|
|
18
|
+
};
|
|
19
|
+
readonly 'gateway-info': {
|
|
20
|
+
readonly request: import("zod").ZodObject<{}, import("zod/v4/core").$strip>;
|
|
21
|
+
readonly reply: import("zod").ZodObject<{
|
|
22
|
+
versions: import("zod").ZodObject<{
|
|
23
|
+
appVersion: import("zod").ZodString;
|
|
24
|
+
appBuildDate: import("zod").ZodNumber;
|
|
25
|
+
node: import("zod").ZodString;
|
|
26
|
+
v8: import("zod").ZodString;
|
|
27
|
+
openssl: import("zod").ZodString;
|
|
28
|
+
}, import("zod/v4/core").$strip>;
|
|
29
|
+
host: import("zod").ZodObject<{
|
|
30
|
+
hostname: import("zod").ZodString;
|
|
31
|
+
platform: import("zod").ZodString;
|
|
32
|
+
}, import("zod/v4/core").$strip>;
|
|
33
|
+
}, import("zod/v4/core").$strip>;
|
|
34
|
+
};
|
|
35
|
+
readonly 'dns-check': {
|
|
36
|
+
readonly request: import("zod").ZodObject<{}, import("zod/v4/core").$strip>;
|
|
37
|
+
readonly reply: import("zod").ZodObject<{
|
|
38
|
+
configuredServers: import("zod").ZodArray<import("zod").ZodString>;
|
|
39
|
+
testResolution: import("zod").ZodObject<{
|
|
40
|
+
domain: import("zod").ZodString;
|
|
41
|
+
ip: import("zod").ZodNullable<import("zod").ZodString>;
|
|
42
|
+
latencyMs: import("zod").ZodNumber;
|
|
43
|
+
status: import("zod").ZodEnum<{
|
|
44
|
+
degraded: "degraded";
|
|
45
|
+
resolved: "resolved";
|
|
46
|
+
}>;
|
|
47
|
+
}, import("zod/v4/core").$strip>;
|
|
48
|
+
}, import("zod/v4/core").$strip>;
|
|
49
|
+
};
|
|
50
|
+
readonly 'sync-plugins': {
|
|
51
|
+
readonly request: import("zod").ZodObject<{}, import("zod/v4/core").$strip>;
|
|
52
|
+
readonly reply: import("zod").ZodObject<{
|
|
53
|
+
queued: import("zod").ZodArray<import("zod").ZodString>;
|
|
54
|
+
}, import("zod/v4/core").$strip>;
|
|
55
|
+
};
|
|
12
56
|
};
|
|
13
57
|
export type FleetCommandName = keyof typeof fleetCommands;
|
package/dist/fleetCommands.js
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
|
+
import { dnsCheckReply, dnsCheckRequest } from './dnsCheck.js';
|
|
2
|
+
import { gatewayInfoReply, gatewayInfoRequest } from './gatewayInfo.js';
|
|
1
3
|
import { listPluginsReply, listPluginsRequest } from './listPlugins.js';
|
|
4
|
+
import { publishStreamsReply, publishStreamsRequest } from './publishStreams.js';
|
|
5
|
+
import { syncPluginsReply, syncPluginsRequest } from './syncPlugins.js';
|
|
2
6
|
export const fleetCommands = {
|
|
3
7
|
'list-plugins': {
|
|
4
8
|
request: listPluginsRequest,
|
|
5
9
|
reply: listPluginsReply,
|
|
6
10
|
},
|
|
11
|
+
'publish-streams': {
|
|
12
|
+
request: publishStreamsRequest,
|
|
13
|
+
reply: publishStreamsReply,
|
|
14
|
+
},
|
|
15
|
+
'gateway-info': {
|
|
16
|
+
request: gatewayInfoRequest,
|
|
17
|
+
reply: gatewayInfoReply,
|
|
18
|
+
},
|
|
19
|
+
'dns-check': {
|
|
20
|
+
request: dnsCheckRequest,
|
|
21
|
+
reply: dnsCheckReply,
|
|
22
|
+
},
|
|
23
|
+
'sync-plugins': {
|
|
24
|
+
request: syncPluginsRequest,
|
|
25
|
+
reply: syncPluginsReply,
|
|
26
|
+
},
|
|
7
27
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sendGatewayCommandRequest: z.ZodObject<{
|
|
3
|
+
command: z.ZodEnum<{
|
|
4
|
+
"dns-check": "dns-check";
|
|
5
|
+
"gateway-info": "gateway-info";
|
|
6
|
+
"list-plugins": "list-plugins";
|
|
7
|
+
"publish-streams": "publish-streams";
|
|
8
|
+
"sync-plugins": "sync-plugins";
|
|
9
|
+
}>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const gatewayCommandReply: z.ZodObject<{
|
|
12
|
+
messageId: z.ZodString;
|
|
13
|
+
correlationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
payload: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
16
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
17
|
+
code: z.ZodString;
|
|
18
|
+
message: z.ZodString;
|
|
19
|
+
}, z.core.$strip>>>;
|
|
20
|
+
ts: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
21
|
+
type: z.ZodLiteral<"REPLY">;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type SendGatewayCommandRequest = z.infer<typeof sendGatewayCommandRequest>;
|
|
24
|
+
export type GatewayCommandReply = z.infer<typeof gatewayCommandReply>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { fleetCommands } from './fleetCommands.js';
|
|
3
|
+
import { fleetMessage } from './fleetMessage.js';
|
|
4
|
+
export const sendGatewayCommandRequest = z.object({
|
|
5
|
+
command: z.enum(Object.keys(fleetCommands)),
|
|
6
|
+
});
|
|
7
|
+
// A refused command arrives as a successful response with error set and payload null.
|
|
8
|
+
export const gatewayCommandReply = fleetMessage
|
|
9
|
+
.omit({ replyTo: true })
|
|
10
|
+
.extend({ type: z.literal('REPLY') });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const gatewayInfoRequest: z.ZodObject<{}, z.core.$strip>;
|
|
3
|
+
export declare const gatewayInfoReply: z.ZodObject<{
|
|
4
|
+
versions: z.ZodObject<{
|
|
5
|
+
appVersion: z.ZodString;
|
|
6
|
+
appBuildDate: z.ZodNumber;
|
|
7
|
+
node: z.ZodString;
|
|
8
|
+
v8: z.ZodString;
|
|
9
|
+
openssl: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
host: z.ZodObject<{
|
|
12
|
+
hostname: z.ZodString;
|
|
13
|
+
platform: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type GatewayInfoRequest = z.infer<typeof gatewayInfoRequest>;
|
|
17
|
+
export type GatewayInfoReply = z.infer<typeof gatewayInfoReply>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const gatewayInfoRequest = z.object({});
|
|
3
|
+
export const gatewayInfoReply = z.object({
|
|
4
|
+
versions: z.object({
|
|
5
|
+
// 'Unknown' and 0 when the gateway build carries no version file.
|
|
6
|
+
appVersion: z.string(),
|
|
7
|
+
// Unix seconds, 0 when unknown.
|
|
8
|
+
appBuildDate: z.number(),
|
|
9
|
+
node: z.string(),
|
|
10
|
+
v8: z.string(),
|
|
11
|
+
openssl: z.string(),
|
|
12
|
+
}),
|
|
13
|
+
host: z.object({
|
|
14
|
+
hostname: z.string(),
|
|
15
|
+
platform: z.string(),
|
|
16
|
+
}),
|
|
17
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export { type DnsCheckReply, dnsCheckReply, type DnsCheckRequest, dnsCheckRequest, } from './dnsCheck.js';
|
|
1
2
|
export { type FleetCommandName, fleetCommands } from './fleetCommands.js';
|
|
3
|
+
export { type GatewayInfoReply, gatewayInfoReply, type GatewayInfoRequest, gatewayInfoRequest, } from './gatewayInfo.js';
|
|
4
|
+
export { type GatewayCommandReply, gatewayCommandReply, type SendGatewayCommandRequest, sendGatewayCommandRequest, } from './gatewayCommand.js';
|
|
2
5
|
export { type FleetError, fleetError, type FleetErrorCode, type FleetMessage, fleetMessage, type MessageType, } from './fleetMessage.js';
|
|
3
6
|
export { type ListPluginsReply, listPluginsReply, type ListPluginsRequest, listPluginsRequest, } from './listPlugins.js';
|
|
7
|
+
export { type PublishStreamsReply, publishStreamsReply, type PublishStreamsRequest, publishStreamsRequest, } from './publishStreams.js';
|
|
8
|
+
export { type SyncPluginsReply, syncPluginsReply, type SyncPluginsRequest, syncPluginsRequest, } from './syncPlugins.js';
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export { dnsCheckReply, dnsCheckRequest, } from './dnsCheck.js';
|
|
1
2
|
export { fleetCommands } from './fleetCommands.js';
|
|
3
|
+
export { gatewayInfoReply, gatewayInfoRequest, } from './gatewayInfo.js';
|
|
4
|
+
export { gatewayCommandReply, sendGatewayCommandRequest, } from './gatewayCommand.js';
|
|
2
5
|
export { fleetError, fleetMessage, } from './fleetMessage.js';
|
|
3
6
|
export { listPluginsReply, listPluginsRequest, } from './listPlugins.js';
|
|
7
|
+
export { publishStreamsReply, publishStreamsRequest, } from './publishStreams.js';
|
|
8
|
+
export { syncPluginsReply, syncPluginsRequest, } from './syncPlugins.js';
|
package/dist/listPlugins.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const listPluginsReply: z.ZodObject<{
|
|
|
5
5
|
id: z.ZodString;
|
|
6
6
|
name: z.ZodString;
|
|
7
7
|
version: z.ZodString;
|
|
8
|
+
integrationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
9
|
}, z.core.$strip>>;
|
|
9
10
|
}, z.core.$strip>;
|
|
10
11
|
export type ListPluginsRequest = z.infer<typeof listPluginsRequest>;
|
package/dist/listPlugins.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const publishStreamsRequest: z.ZodObject<{}, z.core.$strip>;
|
|
3
|
+
export declare const publishStreamsReply: z.ZodObject<{
|
|
4
|
+
queued: z.ZodBoolean;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type PublishStreamsRequest = z.infer<typeof publishStreamsRequest>;
|
|
7
|
+
export type PublishStreamsReply = z.infer<typeof publishStreamsReply>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const syncPluginsRequest: z.ZodObject<{}, z.core.$strip>;
|
|
3
|
+
export declare const syncPluginsReply: z.ZodObject<{
|
|
4
|
+
queued: z.ZodArray<z.ZodString>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type SyncPluginsRequest = z.infer<typeof syncPluginsRequest>;
|
|
7
|
+
export type SyncPluginsReply = z.infer<typeof syncPluginsReply>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const syncPluginsRequest = z.object({});
|
|
3
|
+
export const syncPluginsReply = z.object({
|
|
4
|
+
// The plugins whose sync was queued. A daemon plugin, or one with a sync
|
|
5
|
+
// already queued or running, is left out.
|
|
6
|
+
queued: z.array(z.string()),
|
|
7
|
+
});
|