iobroker.unraid 0.5.0 → 0.5.2
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/README.md +47 -6
- package/admin/build/index.js +8 -8
- package/admin/build/index.js.map +3 -3
- package/build/apollo-client.d.ts +60 -7
- package/build/apollo-client.d.ts.map +1 -1
- package/build/apollo-client.js +69 -24
- package/build/apollo-client.js.map +1 -1
- package/build/config/adapter-config.d.ts +30 -0
- package/build/config/adapter-config.d.ts.map +1 -0
- package/build/config/adapter-config.js +50 -0
- package/build/config/adapter-config.js.map +1 -0
- package/build/graphql/selection-builder.d.ts +43 -0
- package/build/graphql/selection-builder.d.ts.map +1 -0
- package/build/graphql/selection-builder.js +108 -0
- package/build/graphql/selection-builder.js.map +1 -0
- package/build/main.js +88 -842
- package/build/main.js.map +1 -1
- package/build/managers/dynamic-resource-manager.d.ts +73 -0
- package/build/managers/dynamic-resource-manager.d.ts.map +1 -0
- package/build/managers/dynamic-resource-manager.js +445 -0
- package/build/managers/dynamic-resource-manager.js.map +1 -0
- package/build/managers/polling-manager.d.ts +64 -0
- package/build/managers/polling-manager.d.ts.map +1 -0
- package/build/managers/polling-manager.js +143 -0
- package/build/managers/polling-manager.js.map +1 -0
- package/build/managers/state-manager.d.ts +64 -0
- package/build/managers/state-manager.d.ts.map +1 -0
- package/build/managers/state-manager.js +182 -0
- package/build/managers/state-manager.js.map +1 -0
- package/build/shared/unraid-domains.d.ts +83 -0
- package/build/shared/unraid-domains.d.ts.map +1 -1
- package/build/shared/unraid-domains.js +88 -18
- package/build/shared/unraid-domains.js.map +1 -1
- package/build/subscription-manager.js +94 -43
- package/build/subscription-manager.js.map +1 -1
- package/build/types/adapter-types.d.ts +10 -0
- package/build/types/adapter-types.d.ts.map +1 -0
- package/build/types/adapter-types.js +7 -0
- package/build/types/adapter-types.js.map +1 -0
- package/build/utils/data-transformers.d.ts +55 -0
- package/build/utils/data-transformers.d.ts.map +1 -0
- package/build/utils/data-transformers.js +137 -0
- package/build/utils/data-transformers.js.map +1 -0
- package/io-package.json +34 -2
- package/package.json +4 -10
- package/build/subscription-manager.d.ts +0 -78
- package/build/subscription-manager.d.ts.map +0 -1
package/build/apollo-client.d.ts
CHANGED
|
@@ -1,40 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for the Unraid Apollo GraphQL client
|
|
3
|
+
*/
|
|
1
4
|
export interface ApolloClientOptions {
|
|
5
|
+
/** Base URL of the Unraid server (e.g., https://192.168.1.100) */
|
|
2
6
|
baseUrl: string;
|
|
7
|
+
/** API token for authentication with Unraid */
|
|
3
8
|
apiToken: string;
|
|
9
|
+
/** Whether to allow self-signed SSL certificates (default: false) */
|
|
4
10
|
allowSelfSigned?: boolean;
|
|
5
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Apollo GraphQL client wrapper for Unraid server communication.
|
|
14
|
+
* Handles both HTTP queries/mutations and WebSocket subscriptions.
|
|
15
|
+
*/
|
|
6
16
|
export declare class UnraidApolloClient {
|
|
17
|
+
/** Apollo Client instance for GraphQL operations */
|
|
7
18
|
private client;
|
|
19
|
+
/** WebSocket client for subscription support */
|
|
8
20
|
private wsClient;
|
|
21
|
+
/** Base URL of the Unraid server */
|
|
9
22
|
private readonly baseUrl;
|
|
23
|
+
/** API token for authentication */
|
|
10
24
|
private readonly apiToken;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new Unraid Apollo client instance
|
|
27
|
+
*
|
|
28
|
+
* @param options - Configuration options for the client
|
|
29
|
+
*/
|
|
11
30
|
constructor(options: ApolloClientOptions);
|
|
12
31
|
/**
|
|
13
|
-
* Execute a GraphQL query
|
|
32
|
+
* Execute a GraphQL query against the Unraid server
|
|
33
|
+
*
|
|
34
|
+
* @param query - The GraphQL query string
|
|
35
|
+
* @returns Promise resolving to the query result data
|
|
36
|
+
* @template T - Type of the expected query result
|
|
14
37
|
*/
|
|
15
38
|
query<T = unknown>(query: string): Promise<T>;
|
|
16
39
|
/**
|
|
17
|
-
* Execute a GraphQL mutation
|
|
40
|
+
* Execute a GraphQL mutation against the Unraid server
|
|
41
|
+
*
|
|
42
|
+
* @param mutation - The GraphQL mutation string
|
|
43
|
+
* @param variables - Optional variables for the mutation
|
|
44
|
+
* @returns Promise resolving to the mutation result data
|
|
45
|
+
* @template T - Type of the expected mutation result
|
|
18
46
|
*/
|
|
19
47
|
mutate<T = unknown>(mutation: string, variables?: Record<string, unknown>): Promise<T>;
|
|
20
48
|
/**
|
|
21
|
-
* Subscribe to a GraphQL subscription
|
|
49
|
+
* Subscribe to a GraphQL subscription for real-time updates
|
|
50
|
+
*
|
|
51
|
+
* @param subscription - The GraphQL subscription string
|
|
52
|
+
* @param variables - Optional variables for the subscription
|
|
53
|
+
* @returns Observable that emits subscription results
|
|
54
|
+
* @template T - Type of the expected subscription result
|
|
22
55
|
*/
|
|
23
|
-
subscribe<T = unknown>(subscription: string, variables?: Record<string, unknown>):
|
|
56
|
+
subscribe<T = unknown>(subscription: string, variables?: Record<string, unknown>): ReturnType<typeof this.client.subscribe<T>>;
|
|
24
57
|
/**
|
|
25
|
-
* Run an introspection query to discover available subscriptions
|
|
58
|
+
* Run an introspection query to discover available GraphQL subscriptions.
|
|
59
|
+
* Useful for debugging and discovering the Unraid API schema.
|
|
60
|
+
*
|
|
61
|
+
* @returns Promise resolving to subscription type information or null if failed
|
|
26
62
|
*/
|
|
27
63
|
introspectSubscriptions(): Promise<unknown>;
|
|
28
64
|
/**
|
|
29
|
-
* Dispose the client and close connections
|
|
65
|
+
* Dispose the client and close all connections.
|
|
66
|
+
* Should be called when the client is no longer needed.
|
|
67
|
+
*
|
|
68
|
+
* @returns Promise that resolves when cleanup is complete
|
|
30
69
|
*/
|
|
31
70
|
dispose(): Promise<void>;
|
|
32
71
|
/**
|
|
33
|
-
* Check if WebSocket is
|
|
72
|
+
* Check if the WebSocket connection is established
|
|
73
|
+
*
|
|
74
|
+
* @returns True if WebSocket client exists, false otherwise
|
|
34
75
|
*/
|
|
35
76
|
isConnected(): boolean;
|
|
36
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* GraphQL subscription for comprehensive system metrics.
|
|
80
|
+
* Includes both CPU and memory statistics.
|
|
81
|
+
*/
|
|
37
82
|
export declare const METRICS_SUBSCRIPTION = "\n subscription MetricsSubscription {\n metrics {\n cpu {\n percentTotal\n }\n memory {\n percentTotal\n total\n used\n free\n }\n }\n }\n";
|
|
83
|
+
/**
|
|
84
|
+
* GraphQL subscription for CPU metrics only.
|
|
85
|
+
* Returns the total CPU usage percentage.
|
|
86
|
+
*/
|
|
38
87
|
export declare const CPU_SUBSCRIPTION = "\n subscription CpuSubscription {\n cpu {\n percentTotal\n }\n }\n";
|
|
88
|
+
/**
|
|
89
|
+
* GraphQL subscription for memory metrics.
|
|
90
|
+
* Includes total, used, free memory and usage percentage.
|
|
91
|
+
*/
|
|
39
92
|
export declare const MEMORY_SUBSCRIPTION = "\n subscription MemorySubscription {\n memory {\n percentTotal\n total\n used\n free\n }\n }\n";
|
|
40
93
|
//# sourceMappingURL=apollo-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apollo-client.d.ts","sourceRoot":"","sources":["../src/apollo-client.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,QAAQ,CAAkC;IAClD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;
|
|
1
|
+
{"version":3,"file":"apollo-client.d.ts","sourceRoot":"","sources":["../src/apollo-client.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,kEAAkE;IAClE,OAAO,EAAE,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
|
package/build/apollo-client.js
CHANGED
|
@@ -10,11 +10,24 @@ const utilities_1 = require("@apollo/client/utilities");
|
|
|
10
10
|
const graphql_ws_1 = require("graphql-ws");
|
|
11
11
|
const ws_1 = __importDefault(require("ws"));
|
|
12
12
|
const undici_1 = require("undici");
|
|
13
|
+
/**
|
|
14
|
+
* Apollo GraphQL client wrapper for Unraid server communication.
|
|
15
|
+
* Handles both HTTP queries/mutations and WebSocket subscriptions.
|
|
16
|
+
*/
|
|
13
17
|
class UnraidApolloClient {
|
|
18
|
+
/** Apollo Client instance for GraphQL operations */
|
|
14
19
|
client;
|
|
20
|
+
/** WebSocket client for subscription support */
|
|
15
21
|
wsClient;
|
|
22
|
+
/** Base URL of the Unraid server */
|
|
16
23
|
baseUrl;
|
|
24
|
+
/** API token for authentication */
|
|
17
25
|
apiToken;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new Unraid Apollo client instance
|
|
28
|
+
*
|
|
29
|
+
* @param options - Configuration options for the client
|
|
30
|
+
*/
|
|
18
31
|
constructor(options) {
|
|
19
32
|
this.baseUrl = options.baseUrl.replace(/\/$/, '');
|
|
20
33
|
this.apiToken = options.apiToken;
|
|
@@ -22,20 +35,20 @@ class UnraidApolloClient {
|
|
|
22
35
|
if (options.allowSelfSigned && this.baseUrl.startsWith('https://')) {
|
|
23
36
|
(0, undici_1.setGlobalDispatcher)(new undici_1.Agent({
|
|
24
37
|
connect: {
|
|
25
|
-
rejectUnauthorized: false
|
|
26
|
-
}
|
|
38
|
+
rejectUnauthorized: false,
|
|
39
|
+
},
|
|
27
40
|
}));
|
|
28
41
|
}
|
|
29
42
|
// Create WebSocket client for subscriptions
|
|
30
|
-
const wsUrl = this.baseUrl.replace(/^http/, 'ws')
|
|
43
|
+
const wsUrl = `${this.baseUrl.replace(/^http/, 'ws')}/graphql`;
|
|
31
44
|
// Create a custom WebSocket class that includes our options
|
|
32
45
|
class CustomWebSocket extends ws_1.default {
|
|
33
46
|
constructor(url, protocols) {
|
|
34
47
|
const wsOptions = {
|
|
35
48
|
rejectUnauthorized: !options.allowSelfSigned,
|
|
36
49
|
headers: {
|
|
37
|
-
'x-api-key': options.apiToken
|
|
38
|
-
}
|
|
50
|
+
'x-api-key': options.apiToken,
|
|
51
|
+
},
|
|
39
52
|
};
|
|
40
53
|
super(url, protocols, wsOptions);
|
|
41
54
|
}
|
|
@@ -44,7 +57,7 @@ class UnraidApolloClient {
|
|
|
44
57
|
url: wsUrl,
|
|
45
58
|
webSocketImpl: CustomWebSocket,
|
|
46
59
|
connectionParams: {
|
|
47
|
-
'x-api-key': this.apiToken
|
|
60
|
+
'x-api-key': this.apiToken,
|
|
48
61
|
},
|
|
49
62
|
retryAttempts: 5,
|
|
50
63
|
shouldRetry: () => true,
|
|
@@ -54,16 +67,15 @@ class UnraidApolloClient {
|
|
|
54
67
|
const httpLink = new core_1.HttpLink({
|
|
55
68
|
uri: `${this.baseUrl}/graphql`,
|
|
56
69
|
headers: {
|
|
57
|
-
'x-api-key': this.apiToken
|
|
58
|
-
}
|
|
70
|
+
'x-api-key': this.apiToken,
|
|
71
|
+
},
|
|
59
72
|
});
|
|
60
73
|
// Create WebSocket link for subscriptions
|
|
61
74
|
const wsLink = new subscriptions_1.GraphQLWsLink(this.wsClient);
|
|
62
75
|
// Split link based on operation type
|
|
63
76
|
const splitLink = (0, core_1.split)(({ query }) => {
|
|
64
77
|
const definition = (0, utilities_1.getMainDefinition)(query);
|
|
65
|
-
return
|
|
66
|
-
definition.operation === 'subscription');
|
|
78
|
+
return definition.kind === 'OperationDefinition' && definition.operation === 'subscription';
|
|
67
79
|
}, wsLink, httpLink);
|
|
68
80
|
// Create Apollo Client
|
|
69
81
|
this.client = new core_1.ApolloClient({
|
|
@@ -71,44 +83,61 @@ class UnraidApolloClient {
|
|
|
71
83
|
cache: new core_1.InMemoryCache(),
|
|
72
84
|
defaultOptions: {
|
|
73
85
|
watchQuery: {
|
|
74
|
-
fetchPolicy: 'no-cache'
|
|
86
|
+
fetchPolicy: 'no-cache',
|
|
75
87
|
},
|
|
76
88
|
query: {
|
|
77
|
-
fetchPolicy: 'no-cache'
|
|
78
|
-
}
|
|
79
|
-
}
|
|
89
|
+
fetchPolicy: 'no-cache',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
80
92
|
});
|
|
81
93
|
}
|
|
82
94
|
/**
|
|
83
|
-
* Execute a GraphQL query
|
|
95
|
+
* Execute a GraphQL query against the Unraid server
|
|
96
|
+
*
|
|
97
|
+
* @param query - The GraphQL query string
|
|
98
|
+
* @returns Promise resolving to the query result data
|
|
99
|
+
* @template T - Type of the expected query result
|
|
84
100
|
*/
|
|
85
101
|
async query(query) {
|
|
86
102
|
const result = await this.client.query({
|
|
87
|
-
query: (0, core_1.gql)(query)
|
|
103
|
+
query: (0, core_1.gql)(query),
|
|
88
104
|
});
|
|
89
105
|
return result.data;
|
|
90
106
|
}
|
|
91
107
|
/**
|
|
92
|
-
* Execute a GraphQL mutation
|
|
108
|
+
* Execute a GraphQL mutation against the Unraid server
|
|
109
|
+
*
|
|
110
|
+
* @param mutation - The GraphQL mutation string
|
|
111
|
+
* @param variables - Optional variables for the mutation
|
|
112
|
+
* @returns Promise resolving to the mutation result data
|
|
113
|
+
* @template T - Type of the expected mutation result
|
|
93
114
|
*/
|
|
94
115
|
async mutate(mutation, variables) {
|
|
95
116
|
const result = await this.client.mutate({
|
|
96
117
|
mutation: (0, core_1.gql)(mutation),
|
|
97
|
-
variables
|
|
118
|
+
variables,
|
|
98
119
|
});
|
|
99
120
|
return result.data;
|
|
100
121
|
}
|
|
101
122
|
/**
|
|
102
|
-
* Subscribe to a GraphQL subscription
|
|
123
|
+
* Subscribe to a GraphQL subscription for real-time updates
|
|
124
|
+
*
|
|
125
|
+
* @param subscription - The GraphQL subscription string
|
|
126
|
+
* @param variables - Optional variables for the subscription
|
|
127
|
+
* @returns Observable that emits subscription results
|
|
128
|
+
* @template T - Type of the expected subscription result
|
|
103
129
|
*/
|
|
104
130
|
subscribe(subscription, variables) {
|
|
105
131
|
return this.client.subscribe({
|
|
106
132
|
query: (0, core_1.gql)(subscription),
|
|
107
|
-
variables
|
|
133
|
+
variables,
|
|
108
134
|
});
|
|
109
135
|
}
|
|
110
136
|
/**
|
|
111
|
-
* Run an introspection query to discover available subscriptions
|
|
137
|
+
* Run an introspection query to discover available GraphQL subscriptions.
|
|
138
|
+
* Useful for debugging and discovering the Unraid API schema.
|
|
139
|
+
*
|
|
140
|
+
* @returns Promise resolving to subscription type information or null if failed
|
|
112
141
|
*/
|
|
113
142
|
async introspectSubscriptions() {
|
|
114
143
|
const introspectionQuery = `
|
|
@@ -145,14 +174,19 @@ class UnraidApolloClient {
|
|
|
145
174
|
}
|
|
146
175
|
}
|
|
147
176
|
/**
|
|
148
|
-
* Dispose the client and close connections
|
|
177
|
+
* Dispose the client and close all connections.
|
|
178
|
+
* Should be called when the client is no longer needed.
|
|
179
|
+
*
|
|
180
|
+
* @returns Promise that resolves when cleanup is complete
|
|
149
181
|
*/
|
|
150
182
|
async dispose() {
|
|
151
183
|
this.client.stop();
|
|
152
184
|
await this.wsClient.dispose();
|
|
153
185
|
}
|
|
154
186
|
/**
|
|
155
|
-
* Check if WebSocket is
|
|
187
|
+
* Check if the WebSocket connection is established
|
|
188
|
+
*
|
|
189
|
+
* @returns True if WebSocket client exists, false otherwise
|
|
156
190
|
*/
|
|
157
191
|
isConnected() {
|
|
158
192
|
// This is a simplified check - you might want to implement more sophisticated logic
|
|
@@ -160,7 +194,10 @@ class UnraidApolloClient {
|
|
|
160
194
|
}
|
|
161
195
|
}
|
|
162
196
|
exports.UnraidApolloClient = UnraidApolloClient;
|
|
163
|
-
|
|
197
|
+
/**
|
|
198
|
+
* GraphQL subscription for comprehensive system metrics.
|
|
199
|
+
* Includes both CPU and memory statistics.
|
|
200
|
+
*/
|
|
164
201
|
exports.METRICS_SUBSCRIPTION = `
|
|
165
202
|
subscription MetricsSubscription {
|
|
166
203
|
metrics {
|
|
@@ -176,6 +213,10 @@ exports.METRICS_SUBSCRIPTION = `
|
|
|
176
213
|
}
|
|
177
214
|
}
|
|
178
215
|
`;
|
|
216
|
+
/**
|
|
217
|
+
* GraphQL subscription for CPU metrics only.
|
|
218
|
+
* Returns the total CPU usage percentage.
|
|
219
|
+
*/
|
|
179
220
|
exports.CPU_SUBSCRIPTION = `
|
|
180
221
|
subscription CpuSubscription {
|
|
181
222
|
cpu {
|
|
@@ -183,6 +224,10 @@ exports.CPU_SUBSCRIPTION = `
|
|
|
183
224
|
}
|
|
184
225
|
}
|
|
185
226
|
`;
|
|
227
|
+
/**
|
|
228
|
+
* GraphQL subscription for memory metrics.
|
|
229
|
+
* Includes total, used, free memory and usage percentage.
|
|
230
|
+
*/
|
|
186
231
|
exports.MEMORY_SUBSCRIPTION = `
|
|
187
232
|
subscription MemorySubscription {
|
|
188
233
|
memory {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apollo-client.js","sourceRoot":"","sources":["../src/apollo-client.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAwF;AACxF,qEAAkE;AAClE,wDAA6D;AAC7D,2CAA0C;AAE1C,4CAA2B;AAC3B,mCAAoD;
|
|
1
|
+
{"version":3,"file":"apollo-client.js","sourceRoot":"","sources":["../src/apollo-client.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAwF;AACxF,qEAAkE;AAClE,wDAA6D;AAC7D,2CAA0C;AAE1C,4CAA2B;AAC3B,mCAAoD;AAcpD;;;GAGG;AACH,MAAa,kBAAkB;IAC3B,oDAAoD;IAC5C,MAAM,CAAwB;IACtC,gDAAgD;IACxC,QAAQ,CAAkC;IAClD,oCAAoC;IACnB,OAAO,CAAS;IACjC,mCAAmC;IAClB,QAAQ,CAAS;IAElC;;;;OAIG;IACH,YAAY,OAA4B;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,OAAO,C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SAAS;SACZ,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,uBAAuB;QACzB,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;SAuB1B,CAAC;QAEF,IAAI,CAAC;YACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAgD,kBAAkB,CAAC,CAAC;YACnG,OAAO,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC;QAC9C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;YAC5D,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO;QACT,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,oFAAoF;QACpF,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;IAClC,CAAC;CACJ;AA1MD,gDA0MC;AAED;;;GAGG;AACU,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;CAcnC,CAAC;AAEF;;;GAGG;AACU,QAAA,gBAAgB,GAAG;;;;;;CAM/B,CAAC;AAEF;;;GAGG;AACU,QAAA,mBAAmB,GAAG;;;;;;;;;CASlC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { DomainId } from '../shared/unraid-domains';
|
|
2
|
+
/**
|
|
3
|
+
* Adapter configuration settings from the admin interface
|
|
4
|
+
*/
|
|
5
|
+
export interface AdapterConfig {
|
|
6
|
+
/** Base URL of the Unraid server */
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
/** API token for Unraid authentication */
|
|
9
|
+
apiToken: string;
|
|
10
|
+
/** Interval between polling requests in seconds */
|
|
11
|
+
pollIntervalSeconds: number;
|
|
12
|
+
/** Allow self-signed SSL certificates */
|
|
13
|
+
allowSelfSigned: boolean;
|
|
14
|
+
/** List of enabled domain IDs for data collection */
|
|
15
|
+
enabledDomains: DomainId[];
|
|
16
|
+
/** Whether to use WebSocket subscriptions (experimental) */
|
|
17
|
+
useSubscriptions?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Validate and normalize adapter configuration settings
|
|
21
|
+
*
|
|
22
|
+
* @param config - Raw configuration from ioBroker
|
|
23
|
+
* @param logger - Logger object for error messages
|
|
24
|
+
* @param logger.error - Function to log error messages
|
|
25
|
+
* @returns Validated configuration or null if invalid
|
|
26
|
+
*/
|
|
27
|
+
export declare function validateConfig(config: Record<string, unknown>, logger?: {
|
|
28
|
+
error: (msg: string) => void;
|
|
29
|
+
}): AdapterConfig | null;
|
|
30
|
+
//# sourceMappingURL=adapter-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter-config.d.ts","sourceRoot":"","sources":["../../src/config/adapter-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yCAAyC;IACzC,eAAe,EAAE,OAAO,CAAC;IACzB,qDAAqD;IACrD,cAAc,EAAE,QAAQ,EAAE,CAAC;IAC3B,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,CAAC,EAAE;IAAE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GAC1C,aAAa,GAAG,IAAI,CA2CtB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateConfig = validateConfig;
|
|
4
|
+
const unraid_domains_1 = require("../shared/unraid-domains");
|
|
5
|
+
/**
|
|
6
|
+
* Validate and normalize adapter configuration settings
|
|
7
|
+
*
|
|
8
|
+
* @param config - Raw configuration from ioBroker
|
|
9
|
+
* @param logger - Logger object for error messages
|
|
10
|
+
* @param logger.error - Function to log error messages
|
|
11
|
+
* @returns Validated configuration or null if invalid
|
|
12
|
+
*/
|
|
13
|
+
function validateConfig(config, logger) {
|
|
14
|
+
const baseUrl = (config.baseUrl ?? '').trim();
|
|
15
|
+
const apiToken = (config.apiToken ?? '').trim();
|
|
16
|
+
const pollIntervalSecondsRaw = Number(config.pollIntervalSeconds ?? 60);
|
|
17
|
+
const pollIntervalSeconds = Number.isFinite(pollIntervalSecondsRaw) && pollIntervalSecondsRaw > 0 ? pollIntervalSecondsRaw : 60;
|
|
18
|
+
const allowSelfSigned = Boolean(config.allowSelfSigned);
|
|
19
|
+
const useSubscriptions = Boolean(config.useSubscriptions);
|
|
20
|
+
const enabledDomainsRaw = Array.isArray(config.enabledDomains)
|
|
21
|
+
? config.enabledDomains
|
|
22
|
+
: [...unraid_domains_1.defaultEnabledDomains];
|
|
23
|
+
const knownIds = new Set(unraid_domains_1.allDomainIds);
|
|
24
|
+
const enabledDomains = [];
|
|
25
|
+
for (const id of enabledDomainsRaw) {
|
|
26
|
+
if (knownIds.has(id)) {
|
|
27
|
+
enabledDomains.push(id);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (!enabledDomains.length) {
|
|
31
|
+
enabledDomains.push(...unraid_domains_1.defaultEnabledDomains);
|
|
32
|
+
}
|
|
33
|
+
if (!baseUrl) {
|
|
34
|
+
logger?.error('Base URL is not configured.');
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
if (!apiToken) {
|
|
38
|
+
logger?.error('API token is not configured.');
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
baseUrl,
|
|
43
|
+
apiToken,
|
|
44
|
+
pollIntervalSeconds,
|
|
45
|
+
allowSelfSigned,
|
|
46
|
+
enabledDomains,
|
|
47
|
+
useSubscriptions,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=adapter-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter-config.js","sourceRoot":"","sources":["../../src/config/adapter-config.ts"],"names":[],"mappings":";;AA6BA,wCA8CC;AA1ED,6DAA+E;AAoB/E;;;;;;;GAOG;AACH,SAAgB,cAAc,CAC1B,MAA+B,EAC/B,MAAyC;IAEzC,MAAM,OAAO,GAAG,CAAE,MAAM,CAAC,OAAkB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1D,MAAM,QAAQ,GAAG,CAAE,MAAM,CAAC,QAAmB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC5D,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;IACxE,MAAM,mBAAmB,GACrB,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAC,IAAI,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,CAAC;IACxG,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACxD,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAE1D,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC;QAC1D,CAAC,CAAE,MAAM,CAAC,cAA2B;QACrC,CAAC,CAAC,CAAC,GAAG,sCAAqB,CAAC,CAAC;IAEjC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,6BAAY,CAAC,CAAC;IACvC,MAAM,cAAc,GAAe,EAAE,CAAC;IACtC,KAAK,MAAM,EAAE,IAAI,iBAAiB,EAAE,CAAC;QACjC,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAc,CAAC,EAAE,CAAC;YAC/B,cAAc,CAAC,IAAI,CAAC,EAAc,CAAC,CAAC;QACxC,CAAC;IACL,CAAC;IAED,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;QACzB,cAAc,CAAC,IAAI,CAAC,GAAI,sCAAoC,CAAC,CAAC;IAClE,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO;QACH,OAAO;QACP,QAAQ;QACR,mBAAmB;QACnB,eAAe;QACf,cAAc;QACd,gBAAgB;KACnB,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { RootSelection } from '../shared/unraid-domains';
|
|
2
|
+
/**
|
|
3
|
+
* Builder class for constructing GraphQL selection queries.
|
|
4
|
+
* Merges multiple domain selections into a single optimized query.
|
|
5
|
+
*/
|
|
6
|
+
export declare class GraphQLSelectionBuilder {
|
|
7
|
+
private readonly roots;
|
|
8
|
+
/**
|
|
9
|
+
* Add multiple root selections to the query builder
|
|
10
|
+
*
|
|
11
|
+
* @param selections - Array of root selections to add
|
|
12
|
+
*/
|
|
13
|
+
addSelections(selections: readonly RootSelection[]): void;
|
|
14
|
+
/**
|
|
15
|
+
* Build the complete GraphQL query string
|
|
16
|
+
*
|
|
17
|
+
* @returns The formatted GraphQL query or null if no selections
|
|
18
|
+
*/
|
|
19
|
+
build(): string | null;
|
|
20
|
+
/**
|
|
21
|
+
* Get or create a root node in the selection tree
|
|
22
|
+
*
|
|
23
|
+
* @param root - Name of the root field
|
|
24
|
+
* @returns The field node for the root
|
|
25
|
+
*/
|
|
26
|
+
private getOrCreateRoot;
|
|
27
|
+
/**
|
|
28
|
+
* Recursively add field specifications to a target node
|
|
29
|
+
*
|
|
30
|
+
* @param target - Target node to add fields to
|
|
31
|
+
* @param fields - Field specifications to add
|
|
32
|
+
*/
|
|
33
|
+
private addFields;
|
|
34
|
+
/**
|
|
35
|
+
* Recursively print a field node tree as GraphQL syntax
|
|
36
|
+
*
|
|
37
|
+
* @param node - Node to print
|
|
38
|
+
* @param indent - Current indentation level
|
|
39
|
+
* @returns Formatted GraphQL selection string
|
|
40
|
+
*/
|
|
41
|
+
private printNode;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=selection-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-builder.d.ts","sourceRoot":"","sources":["../../src/graphql/selection-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,0BAA0B,CAAC;AAOzE;;;GAGG;AACH,qBAAa,uBAAuB;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgC;IAEtD;;;;OAIG;IACI,aAAa,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,GAAG,IAAI;IAUhE;;;;OAIG;IACI,KAAK,IAAI,MAAM,GAAG,IAAI;IAsB7B;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAUvB;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IAajB;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;CAqBpB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphQLSelectionBuilder = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Builder class for constructing GraphQL selection queries.
|
|
6
|
+
* Merges multiple domain selections into a single optimized query.
|
|
7
|
+
*/
|
|
8
|
+
class GraphQLSelectionBuilder {
|
|
9
|
+
roots = new Map();
|
|
10
|
+
/**
|
|
11
|
+
* Add multiple root selections to the query builder
|
|
12
|
+
*
|
|
13
|
+
* @param selections - Array of root selections to add
|
|
14
|
+
*/
|
|
15
|
+
addSelections(selections) {
|
|
16
|
+
for (const selection of selections) {
|
|
17
|
+
if (!selection.fields.length) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
const rootNode = this.getOrCreateRoot(selection.root);
|
|
21
|
+
this.addFields(rootNode, selection.fields);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Build the complete GraphQL query string
|
|
26
|
+
*
|
|
27
|
+
* @returns The formatted GraphQL query or null if no selections
|
|
28
|
+
*/
|
|
29
|
+
build() {
|
|
30
|
+
if (!this.roots.size) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
const sections = [];
|
|
34
|
+
const sortedRoots = Array.from(this.roots.keys()).sort((left, right) => left.localeCompare(right));
|
|
35
|
+
for (const root of sortedRoots) {
|
|
36
|
+
const node = this.roots.get(root);
|
|
37
|
+
if (!node) {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const body = this.printNode(node, 8);
|
|
41
|
+
const section = body ? ` ${root} {\n${body}\n }` : ` ${root}`;
|
|
42
|
+
sections.push(section);
|
|
43
|
+
}
|
|
44
|
+
const queryBody = sections.join('\n');
|
|
45
|
+
return `query UnraidAdapterFetch {\n${queryBody}\n}`;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get or create a root node in the selection tree
|
|
49
|
+
*
|
|
50
|
+
* @param root - Name of the root field
|
|
51
|
+
* @returns The field node for the root
|
|
52
|
+
*/
|
|
53
|
+
getOrCreateRoot(root) {
|
|
54
|
+
const existing = this.roots.get(root);
|
|
55
|
+
if (existing) {
|
|
56
|
+
return existing;
|
|
57
|
+
}
|
|
58
|
+
const node = new Map();
|
|
59
|
+
this.roots.set(root, node);
|
|
60
|
+
return node;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Recursively add field specifications to a target node
|
|
64
|
+
*
|
|
65
|
+
* @param target - Target node to add fields to
|
|
66
|
+
* @param fields - Field specifications to add
|
|
67
|
+
*/
|
|
68
|
+
addFields(target, fields) {
|
|
69
|
+
for (const field of fields) {
|
|
70
|
+
let child = target.get(field.name);
|
|
71
|
+
if (!child) {
|
|
72
|
+
child = new Map();
|
|
73
|
+
target.set(field.name, child);
|
|
74
|
+
}
|
|
75
|
+
if (field.selection?.length) {
|
|
76
|
+
this.addFields(child, field.selection);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Recursively print a field node tree as GraphQL syntax
|
|
82
|
+
*
|
|
83
|
+
* @param node - Node to print
|
|
84
|
+
* @param indent - Current indentation level
|
|
85
|
+
* @returns Formatted GraphQL selection string
|
|
86
|
+
*/
|
|
87
|
+
printNode(node, indent) {
|
|
88
|
+
if (!node.size) {
|
|
89
|
+
return '';
|
|
90
|
+
}
|
|
91
|
+
const indentString = ' '.repeat(indent);
|
|
92
|
+
const entries = Array.from(node.entries()).sort((left, right) => left[0].localeCompare(right[0]));
|
|
93
|
+
return entries
|
|
94
|
+
.map(([name, child]) => {
|
|
95
|
+
if (!child.size) {
|
|
96
|
+
return `${indentString}${name}`;
|
|
97
|
+
}
|
|
98
|
+
const body = this.printNode(child, indent + 4);
|
|
99
|
+
if (!body) {
|
|
100
|
+
return `${indentString}${name}`;
|
|
101
|
+
}
|
|
102
|
+
return `${indentString}${name} {\n${body}\n${indentString}}`;
|
|
103
|
+
})
|
|
104
|
+
.join('\n');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.GraphQLSelectionBuilder = GraphQLSelectionBuilder;
|
|
108
|
+
//# sourceMappingURL=selection-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-builder.js","sourceRoot":"","sources":["../../src/graphql/selection-builder.ts"],"names":[],"mappings":";;;AAOA;;;GAGG;AACH,MAAa,uBAAuB;IACf,KAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;IAEtD;;;;OAIG;IACI,aAAa,CAAC,UAAoC;QACrD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACjC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;gBAC3B,SAAS;YACb,CAAC;YACD,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACtD,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;QAC/C,CAAC;IACL,CAAC;IAED;;;;OAIG;IACI,KAAK;QACR,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QAEnG,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;YAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAClC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACR,SAAS;YACb,CAAC;YACD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YACrC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,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