@vates/types 1.25.0 → 1.25.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.
- package/dist/common.d.mts +25 -1
- package/dist/common.mjs +3 -0
- package/dist/xo-app.d.mts +1 -1
- package/package.json +1 -1
package/dist/common.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { XoHost } from './xo.mjs';
|
|
1
|
+
import type { XoHost, XoNetwork, XoVif } from './xo.mjs';
|
|
2
2
|
declare const __brand: unique symbol;
|
|
3
3
|
export type Branded<TBrand extends string, TType = string> = TType & {
|
|
4
4
|
[__brand]: TBrand;
|
|
@@ -603,4 +603,28 @@ export type XapiVmStats = XapiStatsResponse<XapiVmStatsRaw>;
|
|
|
603
603
|
export type XapiPoolStats = Record<XoHost['id'], XapiHostStats | {
|
|
604
604
|
error: Record<string, unknown>;
|
|
605
605
|
}>;
|
|
606
|
+
export type TrafficRuleProtocol = (typeof TRAFFIC_RULE_PROTOCOLS)[number];
|
|
607
|
+
export declare const SDN_CONTROLLER_OF_RULES_KEY = "xo:sdn-controller:of-rules";
|
|
608
|
+
export declare const TRAFFIC_RULE_PROTOCOLS: readonly ["ARP", "ICMP", "IP", "TCP", "UDP"];
|
|
609
|
+
export declare const TRAFFIC_RULE_PROTOCOLS_WITH_PORT: readonly TrafficRuleProtocol[];
|
|
610
|
+
export type TrafficRuleTargetType = XoNetwork['type'] | XoVif['type'];
|
|
611
|
+
export type TrafficRuleDirection = 'from' | 'to' | 'from/to';
|
|
612
|
+
export type RawTrafficRule = {
|
|
613
|
+
allow: boolean;
|
|
614
|
+
protocol: string;
|
|
615
|
+
ipRange: string;
|
|
616
|
+
direction: string;
|
|
617
|
+
port?: string;
|
|
618
|
+
};
|
|
619
|
+
type BaseTrafficRule = RawTrafficRule & {
|
|
620
|
+
id: string;
|
|
621
|
+
networkId: XoNetwork['id'];
|
|
622
|
+
};
|
|
623
|
+
export type TrafficRule = (BaseTrafficRule & {
|
|
624
|
+
type: XoVif['type'];
|
|
625
|
+
sourceId: XoVif['id'];
|
|
626
|
+
}) | (BaseTrafficRule & {
|
|
627
|
+
type: XoNetwork['type'];
|
|
628
|
+
sourceId: XoNetwork['id'];
|
|
629
|
+
});
|
|
606
630
|
export {};
|
package/dist/common.mjs
CHANGED
|
@@ -451,3 +451,6 @@ export const SUPPORTED_VDI_FORMAT = {
|
|
|
451
451
|
vhd: 'vhd',
|
|
452
452
|
qcow2: 'qcow2',
|
|
453
453
|
};
|
|
454
|
+
export const SDN_CONTROLLER_OF_RULES_KEY = 'xo:sdn-controller:of-rules';
|
|
455
|
+
export const TRAFFIC_RULE_PROTOCOLS = ['ARP', 'ICMP', 'IP', 'TCP', 'UDP'];
|
|
456
|
+
export const TRAFFIC_RULE_PROTOCOLS_WITH_PORT = ['TCP', 'UDP'];
|
package/dist/xo-app.d.mts
CHANGED
|
@@ -76,7 +76,7 @@ export type XoApp = {
|
|
|
76
76
|
};
|
|
77
77
|
config: {
|
|
78
78
|
get<T = string>(path: string): T;
|
|
79
|
-
getOptional(path: string):
|
|
79
|
+
getOptional<T = unknown>(path: string): T | undefined;
|
|
80
80
|
getOptionalDuration(path: string): number | undefined;
|
|
81
81
|
getGuiRoutes(): Promise<{
|
|
82
82
|
default: {
|