@homeflare/distilled-opnsense 0.2.0 → 0.3.1

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 (40) hide show
  1. package/README.md +18 -12
  2. package/dist/protocol.d.ts +2 -2
  3. package/dist/protocol.d.ts.map +1 -1
  4. package/dist/services/firewall_alias.d.ts +118 -18
  5. package/dist/services/firewall_alias.d.ts.map +1 -1
  6. package/dist/services/firewall_alias.js +70 -19
  7. package/dist/services/firewall_alias.js.map +1 -1
  8. package/dist/services/firewall_category.d.ts +28 -11
  9. package/dist/services/firewall_category.d.ts.map +1 -1
  10. package/dist/services/firewall_category.js +27 -10
  11. package/dist/services/firewall_category.js.map +1 -1
  12. package/dist/services/firewall_filter.d.ts +89 -4
  13. package/dist/services/firewall_filter.d.ts.map +1 -1
  14. package/dist/services/firewall_filter.js +46 -3
  15. package/dist/services/firewall_filter.js.map +1 -1
  16. package/dist/services/firewall_group.d.ts +62 -10
  17. package/dist/services/firewall_group.d.ts.map +1 -1
  18. package/dist/services/firewall_group.js +42 -8
  19. package/dist/services/firewall_group.js.map +1 -1
  20. package/dist/services/quagga_bgp.d.ts +879 -151
  21. package/dist/services/quagga_bgp.d.ts.map +1 -1
  22. package/dist/services/quagga_bgp.js +508 -113
  23. package/dist/services/quagga_bgp.js.map +1 -1
  24. package/dist/services/quagga_general.d.ts +42 -4
  25. package/dist/services/quagga_general.d.ts.map +1 -1
  26. package/dist/services/quagga_general.js +21 -3
  27. package/dist/services/quagga_general.js.map +1 -1
  28. package/dist/services/routing_settings.d.ts +80 -4
  29. package/dist/services/routing_settings.d.ts.map +1 -1
  30. package/dist/services/routing_settings.js +43 -3
  31. package/dist/services/routing_settings.js.map +1 -1
  32. package/package.json +3 -3
  33. package/src/protocol.ts +3 -3
  34. package/src/services/firewall_alias.ts +226 -46
  35. package/src/services/firewall_category.ts +63 -21
  36. package/src/services/firewall_filter.ts +166 -9
  37. package/src/services/firewall_group.ts +120 -18
  38. package/src/services/quagga_bgp.ts +1930 -550
  39. package/src/services/quagga_general.ts +72 -9
  40. package/src/services/routing_settings.ts +140 -9
@@ -18,6 +18,78 @@ export const GetRequest = /*@__PURE__*/ S.suspend(() =>
18
18
  ),
19
19
  ).annotate({ identifier: "GetRequest" }) as any as S.Schema<GetRequest>;
20
20
 
21
+ export interface OptionEntry {
22
+ value: string;
23
+ selected: number;
24
+ }
25
+ export const OptionEntry = /*@__PURE__*/ S.suspend(() =>
26
+ S.Struct({
27
+ value: S.String,
28
+ selected: S.Number,
29
+ }),
30
+ ).annotate({ identifier: "OptionEntry" }) as any as S.Schema<OptionEntry>;
31
+
32
+ export type ModelDaemonsMap = { [key: string]: OptionEntry | undefined };
33
+ export const ModelDaemonsMap = /*@__PURE__*/ S.Record(
34
+ S.String,
35
+ OptionEntry,
36
+ ) as any as S.Schema<ModelDaemonsMap>;
37
+
38
+ export type ModelProfileMap = { [key: string]: OptionEntry | undefined };
39
+ export const ModelProfileMap = /*@__PURE__*/ S.Record(
40
+ S.String,
41
+ OptionEntry,
42
+ ) as any as S.Schema<ModelProfileMap>;
43
+
44
+ export type ModelSysloglevelMap = { [key: string]: OptionEntry | undefined };
45
+ export const ModelSysloglevelMap = /*@__PURE__*/ S.Record(
46
+ S.String,
47
+ OptionEntry,
48
+ ) as any as S.Schema<ModelSysloglevelMap>;
49
+
50
+ export interface ModelRead {
51
+ /** OPNsense FieldType: BooleanField */
52
+ enabled: string;
53
+ /** OPNsense FieldType: .\EnableDaemonField; multi-select: wire value is a single comma-joined string, not a JSON array */
54
+ daemons?: ModelDaemonsMap;
55
+ /** OPNsense FieldType: BooleanField */
56
+ manual_config: string;
57
+ /** OPNsense FieldType: OptionField */
58
+ profile: ModelProfileMap;
59
+ /** OPNsense FieldType: BooleanField */
60
+ enablecarp: string;
61
+ /** OPNsense FieldType: BooleanField */
62
+ enablesyslog: string;
63
+ /** OPNsense FieldType: BooleanField */
64
+ enablesnmp: string;
65
+ /** OPNsense FieldType: OptionField */
66
+ sysloglevel: ModelSysloglevelMap;
67
+ /** OPNsense FieldType: BooleanField */
68
+ fwrules: string;
69
+ }
70
+ export const ModelRead = /*@__PURE__*/ S.suspend(() =>
71
+ S.Struct({
72
+ enabled: S.String,
73
+ daemons: S.optional(ModelDaemonsMap),
74
+ manual_config: S.String,
75
+ profile: ModelProfileMap,
76
+ enablecarp: S.String,
77
+ enablesyslog: S.String,
78
+ enablesnmp: S.String,
79
+ sysloglevel: ModelSysloglevelMap,
80
+ fwrules: S.String,
81
+ }),
82
+ ).annotate({ identifier: "ModelRead" }) as any as S.Schema<ModelRead>;
83
+
84
+ export interface GetResponse {
85
+ general?: ModelRead;
86
+ }
87
+ export const GetResponse = /*@__PURE__*/ S.suspend(() =>
88
+ S.Struct({
89
+ general: S.optional(ModelRead),
90
+ }),
91
+ ).annotate({ identifier: "GetResponse" }) as any as S.Schema<GetResponse>;
92
+
21
93
  export type ModelDaemons = "bfd" | "bgp" | "ospf" | "ospf6" | "rip" | "static";
22
94
  export const ModelDaemons = S.String;
23
95
 
@@ -69,15 +141,6 @@ export const Model = /*@__PURE__*/ S.suspend(() =>
69
141
  }),
70
142
  ).annotate({ identifier: "Model" }) as any as S.Schema<Model>;
71
143
 
72
- export interface GetResponse {
73
- general?: Model;
74
- }
75
- export const GetResponse = /*@__PURE__*/ S.suspend(() =>
76
- S.Struct({
77
- general: S.optional(Model),
78
- }),
79
- ).annotate({ identifier: "GetResponse" }) as any as S.Schema<GetResponse>;
80
-
81
144
  export interface SetRequest {
82
145
  general?: Model;
83
146
  }
@@ -171,6 +171,146 @@ export const GetRequest = /*@__PURE__*/ S.suspend(() =>
171
171
  ),
172
172
  ).annotate({ identifier: "GetRequest" }) as any as S.Schema<GetRequest>;
173
173
 
174
+ export interface OptionEntry {
175
+ value: string;
176
+ selected: number;
177
+ }
178
+ export const OptionEntry = /*@__PURE__*/ S.suspend(() =>
179
+ S.Struct({
180
+ value: S.String,
181
+ selected: S.Number,
182
+ }),
183
+ ).annotate({ identifier: "OptionEntry" }) as any as S.Schema<OptionEntry>;
184
+
185
+ export type ModelGateway_itemReadItemInterfaceMap = {
186
+ [key: string]: OptionEntry | undefined;
187
+ };
188
+ export const ModelGateway_itemReadItemInterfaceMap = /*@__PURE__*/ S.Record(
189
+ S.String,
190
+ OptionEntry,
191
+ ) as any as S.Schema<ModelGateway_itemReadItemInterfaceMap>;
192
+
193
+ export type ModelGateway_itemReadItemIpprotocolMap = {
194
+ [key: string]: OptionEntry | undefined;
195
+ };
196
+ export const ModelGateway_itemReadItemIpprotocolMap = /*@__PURE__*/ S.Record(
197
+ S.String,
198
+ OptionEntry,
199
+ ) as any as S.Schema<ModelGateway_itemReadItemIpprotocolMap>;
200
+
201
+ export interface ModelGateway_itemReadItem {
202
+ /** Item id, assigned by OPNsense on creation. */
203
+ uuid?: string;
204
+ /** OPNsense FieldType: BooleanField */
205
+ disabled: string;
206
+ /** OPNsense FieldType: TextField; pattern /^[a-zA-Z0-9_\-]{1,32}$/ */
207
+ name: string;
208
+ /** OPNsense FieldType: DescriptionField */
209
+ descr?: string;
210
+ /** OPNsense FieldType: InterfaceField */
211
+ interface: ModelGateway_itemReadItemInterfaceMap;
212
+ /** OPNsense FieldType: OptionField */
213
+ ipprotocol: ModelGateway_itemReadItemIpprotocolMap;
214
+ /** OPNsense FieldType: TextField */
215
+ gateway?: string;
216
+ /** OPNsense FieldType: BooleanField */
217
+ defaultgw?: string;
218
+ /** OPNsense FieldType: BooleanField */
219
+ fargw?: string;
220
+ /** OPNsense FieldType: BooleanField */
221
+ monitor_disable: string;
222
+ /** OPNsense FieldType: BooleanField */
223
+ monitor_noroute?: string;
224
+ /** OPNsense FieldType: BooleanField */
225
+ monitor_killstates?: string;
226
+ /** OPNsense FieldType: BooleanField */
227
+ monitor_killstates_priority?: string;
228
+ /** OPNsense FieldType: TextField */
229
+ monitor?: string;
230
+ /** OPNsense FieldType: BooleanField */
231
+ force_down?: string;
232
+ /** OPNsense FieldType: BooleanField */
233
+ nosync?: string;
234
+ /** OPNsense FieldType: IntegerField; range 0..255 (as text) */
235
+ priority: string;
236
+ /** OPNsense FieldType: IntegerField; range 1..10 (as text) */
237
+ weight: string;
238
+ /** OPNsense FieldType: IntegerField; range 1..+inf (as text) */
239
+ latencylow?: string;
240
+ /** OPNsense FieldType: IntegerField; range 1..+inf (as text) */
241
+ latencyhigh?: string;
242
+ /** OPNsense FieldType: IntegerField; range 1..99 (as text) */
243
+ losslow?: string;
244
+ /** OPNsense FieldType: IntegerField; range 1..100 (as text) */
245
+ losshigh?: string;
246
+ /** OPNsense FieldType: IntegerField; range 1..+inf (as text) */
247
+ interval?: string;
248
+ /** OPNsense FieldType: IntegerField; range 1..+inf (as text) */
249
+ time_period?: string;
250
+ /** OPNsense FieldType: IntegerField; range 1..+inf (as text) */
251
+ loss_interval?: string;
252
+ /** OPNsense FieldType: IntegerField; range 0..+inf (as text) */
253
+ data_length?: string;
254
+ }
255
+ export const ModelGateway_itemReadItem = /*@__PURE__*/ S.suspend(() =>
256
+ S.Struct({
257
+ uuid: S.optional(S.String),
258
+ disabled: S.String,
259
+ name: S.String,
260
+ descr: S.optional(S.String),
261
+ interface: ModelGateway_itemReadItemInterfaceMap,
262
+ ipprotocol: ModelGateway_itemReadItemIpprotocolMap,
263
+ gateway: S.optional(S.String),
264
+ defaultgw: S.optional(S.String),
265
+ fargw: S.optional(S.String),
266
+ monitor_disable: S.String,
267
+ monitor_noroute: S.optional(S.String),
268
+ monitor_killstates: S.optional(S.String),
269
+ monitor_killstates_priority: S.optional(S.String),
270
+ monitor: S.optional(S.String),
271
+ force_down: S.optional(S.String),
272
+ nosync: S.optional(S.String),
273
+ priority: S.String,
274
+ weight: S.String,
275
+ latencylow: S.optional(S.String),
276
+ latencyhigh: S.optional(S.String),
277
+ losslow: S.optional(S.String),
278
+ losshigh: S.optional(S.String),
279
+ interval: S.optional(S.String),
280
+ time_period: S.optional(S.String),
281
+ loss_interval: S.optional(S.String),
282
+ data_length: S.optional(S.String),
283
+ }),
284
+ ).annotate({
285
+ identifier: "ModelGateway_itemReadItem",
286
+ }) as any as S.Schema<ModelGateway_itemReadItem>;
287
+
288
+ export type ModelGateway_itemReadItemMap = {
289
+ [key: string]: ModelGateway_itemReadItem | undefined;
290
+ };
291
+ export const ModelGateway_itemReadItemMap = /*@__PURE__*/ S.Record(
292
+ S.String,
293
+ ModelGateway_itemReadItem,
294
+ ) as any as S.Schema<ModelGateway_itemReadItemMap>;
295
+
296
+ export interface ModelRead {
297
+ gateway_item?: ModelGateway_itemReadItemMap;
298
+ }
299
+ export const ModelRead = /*@__PURE__*/ S.suspend(() =>
300
+ S.Struct({
301
+ gateway_item: S.optional(ModelGateway_itemReadItemMap),
302
+ }),
303
+ ).annotate({ identifier: "ModelRead" }) as any as S.Schema<ModelRead>;
304
+
305
+ export interface GetResponse {
306
+ gateways?: ModelRead;
307
+ }
308
+ export const GetResponse = /*@__PURE__*/ S.suspend(() =>
309
+ S.Struct({
310
+ gateways: S.optional(ModelRead),
311
+ }),
312
+ ).annotate({ identifier: "GetResponse" }) as any as S.Schema<GetResponse>;
313
+
174
314
  export type ModelGateway_itemItemIpprotocol = "inet" | "inet6";
175
315
  export const ModelGateway_itemItemIpprotocol = S.String;
176
316
 
@@ -278,15 +418,6 @@ export const Model = /*@__PURE__*/ S.suspend(() =>
278
418
  }),
279
419
  ).annotate({ identifier: "Model" }) as any as S.Schema<Model>;
280
420
 
281
- export interface GetResponse {
282
- gateways?: Model;
283
- }
284
- export const GetResponse = /*@__PURE__*/ S.suspend(() =>
285
- S.Struct({
286
- gateways: S.optional(Model),
287
- }),
288
- ).annotate({ identifier: "GetResponse" }) as any as S.Schema<GetResponse>;
289
-
290
421
  export interface SetRequest {
291
422
  gateways?: Model;
292
423
  }