@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
@@ -104,48 +104,132 @@ export const GetRequest = /*@__PURE__*/ S.suspend(() =>
104
104
  ),
105
105
  ).annotate({ identifier: "GetRequest" }) as any as S.Schema<GetRequest>;
106
106
 
107
- export type ModelIfgroupentryItem = GroupItem;
108
- export const ModelIfgroupentryItem = GroupItem;
107
+ export interface OptionEntry {
108
+ value: string;
109
+ selected: number;
110
+ }
111
+ export const OptionEntry = /*@__PURE__*/ S.suspend(() =>
112
+ S.Struct({
113
+ value: S.String,
114
+ selected: S.Number,
115
+ }),
116
+ ).annotate({ identifier: "OptionEntry" }) as any as S.Schema<OptionEntry>;
109
117
 
110
- export type ModelIfgroupentryItemMap = { [key: string]: GroupItem | undefined };
111
- export const ModelIfgroupentryItemMap = /*@__PURE__*/ S.Record(
118
+ export type ModelIfgroupentryReadItemMembersMap = {
119
+ [key: string]: OptionEntry | undefined;
120
+ };
121
+ export const ModelIfgroupentryReadItemMembersMap = /*@__PURE__*/ S.Record(
112
122
  S.String,
113
- GroupItem,
114
- ) as any as S.Schema<ModelIfgroupentryItemMap>;
123
+ OptionEntry,
124
+ ) as any as S.Schema<ModelIfgroupentryReadItemMembersMap>;
115
125
 
116
- export interface Model {
117
- ifgroupentry?: ModelIfgroupentryItemMap;
126
+ export interface ModelIfgroupentryReadItem {
127
+ /** Item id, assigned by OPNsense on creation. */
128
+ uuid?: string;
129
+ /** OPNsense FieldType: .\GroupNameField */
130
+ ifname: string;
131
+ /** OPNsense FieldType: .\InterfaceField; multi-select: wire value is a single comma-joined string, not a JSON array */
132
+ members: ModelIfgroupentryReadItemMembersMap;
133
+ /** OPNsense FieldType: BooleanField */
134
+ nogroup?: string;
135
+ /** OPNsense FieldType: IntegerField; range 0..9999 (as text) */
136
+ sequence: string;
137
+ /** OPNsense FieldType: DescriptionField */
138
+ descr?: string;
118
139
  }
119
- export const Model = /*@__PURE__*/ S.suspend(() =>
140
+ export const ModelIfgroupentryReadItem = /*@__PURE__*/ S.suspend(() =>
120
141
  S.Struct({
121
- ifgroupentry: S.optional(ModelIfgroupentryItemMap),
142
+ uuid: S.optional(S.String),
143
+ ifname: S.String,
144
+ members: ModelIfgroupentryReadItemMembersMap,
145
+ nogroup: S.optional(S.String),
146
+ sequence: S.String,
147
+ descr: S.optional(S.String),
122
148
  }),
123
- ).annotate({ identifier: "Model" }) as any as S.Schema<Model>;
149
+ ).annotate({
150
+ identifier: "ModelIfgroupentryReadItem",
151
+ }) as any as S.Schema<ModelIfgroupentryReadItem>;
152
+
153
+ export type ModelIfgroupentryReadItemMap = {
154
+ [key: string]: ModelIfgroupentryReadItem | undefined;
155
+ };
156
+ export const ModelIfgroupentryReadItemMap = /*@__PURE__*/ S.Record(
157
+ S.String,
158
+ ModelIfgroupentryReadItem,
159
+ ) as any as S.Schema<ModelIfgroupentryReadItemMap>;
160
+
161
+ export interface ModelRead {
162
+ ifgroupentry?: ModelIfgroupentryReadItemMap;
163
+ }
164
+ export const ModelRead = /*@__PURE__*/ S.suspend(() =>
165
+ S.Struct({
166
+ ifgroupentry: S.optional(ModelIfgroupentryReadItemMap),
167
+ }),
168
+ ).annotate({ identifier: "ModelRead" }) as any as S.Schema<ModelRead>;
124
169
 
125
170
  export interface GetResponse {
126
- group?: Model;
171
+ group?: ModelRead;
127
172
  }
128
173
  export const GetResponse = /*@__PURE__*/ S.suspend(() =>
129
174
  S.Struct({
130
- group: S.optional(Model),
175
+ group: S.optional(ModelRead),
131
176
  }),
132
177
  ).annotate({ identifier: "GetResponse" }) as any as S.Schema<GetResponse>;
133
178
 
134
- export interface GetGroupRequest {}
179
+ export interface GetGroupRequest {
180
+ uuid: string;
181
+ }
135
182
  export const GetGroupRequest = /*@__PURE__*/ S.suspend(() =>
136
- S.Struct({}).pipe(
137
- T.Http({ method: "GET", uri: "/api/firewall/group/getItem", code: 200 }),
183
+ S.Struct({
184
+ uuid: S.String.pipe(T.Label()),
185
+ }).pipe(
186
+ T.Http({
187
+ method: "GET",
188
+ uri: "/api/firewall/group/getItem/{uuid}",
189
+ code: 200,
190
+ }),
138
191
  ),
139
192
  ).annotate({
140
193
  identifier: "GetGroupRequest",
141
194
  }) as any as S.Schema<GetGroupRequest>;
142
195
 
196
+ export type GetGroupItemMembersMap = { [key: string]: OptionEntry | undefined };
197
+ export const GetGroupItemMembersMap = /*@__PURE__*/ S.Record(
198
+ S.String,
199
+ OptionEntry,
200
+ ) as any as S.Schema<GetGroupItemMembersMap>;
201
+
202
+ export interface GetGroupItem {
203
+ /** Item id, assigned by OPNsense on creation. */
204
+ uuid?: string;
205
+ /** OPNsense FieldType: .\GroupNameField */
206
+ ifname: string;
207
+ /** OPNsense FieldType: .\InterfaceField; multi-select: wire value is a single comma-joined string, not a JSON array */
208
+ members: GetGroupItemMembersMap;
209
+ /** OPNsense FieldType: BooleanField */
210
+ nogroup?: string;
211
+ /** OPNsense FieldType: IntegerField; range 0..9999 (as text) */
212
+ sequence: string;
213
+ /** OPNsense FieldType: DescriptionField */
214
+ descr?: string;
215
+ }
216
+ export const GetGroupItem = /*@__PURE__*/ S.suspend(() =>
217
+ S.Struct({
218
+ uuid: S.optional(S.String),
219
+ ifname: S.String,
220
+ members: GetGroupItemMembersMap,
221
+ nogroup: S.optional(S.String),
222
+ sequence: S.String,
223
+ descr: S.optional(S.String),
224
+ }),
225
+ ).annotate({ identifier: "GetGroupItem" }) as any as S.Schema<GetGroupItem>;
226
+
143
227
  export interface GetGroupResponse {
144
- group?: GroupItem;
228
+ group?: GetGroupItem;
145
229
  }
146
230
  export const GetGroupResponse = /*@__PURE__*/ S.suspend(() =>
147
231
  S.Struct({
148
- group: S.optional(GroupItem),
232
+ group: S.optional(GetGroupItem),
149
233
  }),
150
234
  ).annotate({
151
235
  identifier: "GetGroupResponse",
@@ -188,6 +272,24 @@ export const SearchGroupResponse = /*@__PURE__*/ S.suspend(() =>
188
272
  identifier: "SearchGroupResponse",
189
273
  }) as any as S.Schema<SearchGroupResponse>;
190
274
 
275
+ export type ModelIfgroupentryItem = GroupItem;
276
+ export const ModelIfgroupentryItem = GroupItem;
277
+
278
+ export type ModelIfgroupentryItemMap = { [key: string]: GroupItem | undefined };
279
+ export const ModelIfgroupentryItemMap = /*@__PURE__*/ S.Record(
280
+ S.String,
281
+ GroupItem,
282
+ ) as any as S.Schema<ModelIfgroupentryItemMap>;
283
+
284
+ export interface Model {
285
+ ifgroupentry?: ModelIfgroupentryItemMap;
286
+ }
287
+ export const Model = /*@__PURE__*/ S.suspend(() =>
288
+ S.Struct({
289
+ ifgroupentry: S.optional(ModelIfgroupentryItemMap),
290
+ }),
291
+ ).annotate({ identifier: "Model" }) as any as S.Schema<Model>;
292
+
191
293
  export interface SetRequest {
192
294
  group?: Model;
193
295
  }