@veilway/sdk 0.3.5-alpha → 0.3.7-alpha
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/src/index.d.ts +4 -0
- package/dist/src/index.js +2 -0
- package/dist/src/schema.d.ts +335 -9
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export type Upstream = Schemas["Upstream"];
|
|
|
15
15
|
export type UpstreamPreview = Schemas["UpstreamPreview"];
|
|
16
16
|
export type UpstreamPreviewRequest = Schemas["UpstreamPreviewRequest"];
|
|
17
17
|
export type UpstreamConfirmed = Schemas["UpstreamConfirmed"];
|
|
18
|
+
export type UpstreamChoice = Schemas["UpstreamChoice"];
|
|
19
|
+
export type UpstreamChosen = Schemas["UpstreamChosen"];
|
|
18
20
|
export type UpstreamRemoved = Schemas["UpstreamRemoved"];
|
|
19
21
|
export type InboundInfo = Schemas["InboundInfo"];
|
|
20
22
|
export type Problem = Schemas["Problem"];
|
|
@@ -109,6 +111,8 @@ export declare class Client {
|
|
|
109
111
|
move?: boolean;
|
|
110
112
|
hosts?: boolean;
|
|
111
113
|
}): Promise<UpstreamConfirmed>;
|
|
114
|
+
/** Changes what the config chooses on an upstream: `profile`, `failover`, `transport` and `exit`. A field that is left out stays and null is automatic. Only an exit change keeps the running tunnel (`live`). The link, keys, allow, allow_private and via cannot be changed this way. */
|
|
115
|
+
chooseUpstream(tag: string, choice: UpstreamChoice): Promise<UpstreamChosen>;
|
|
112
116
|
/** Asks the upstream to connect again now: every wait it was in starts over. */
|
|
113
117
|
retryUpstream(tag: string): Promise<{
|
|
114
118
|
tag: string;
|
package/dist/src/index.js
CHANGED
|
@@ -75,6 +75,8 @@ export class Client {
|
|
|
75
75
|
removeUpstream(tag) { return this.json("DELETE", "/v1/upstreams/" + encodeURIComponent(tag)); }
|
|
76
76
|
/** Confirms the move of the provider's endpoint and the new refresh hosts that `listUpstreams` reports as pending. Without options both are confirmed; with them a field that is left out is false. The answer says what had been waiting. */
|
|
77
77
|
confirmUpstream(tag, options = {}) { return this.json("POST", "/v1/upstreams/" + encodeURIComponent(tag) + "/confirm", {}, options); }
|
|
78
|
+
/** Changes what the config chooses on an upstream: `profile`, `failover`, `transport` and `exit`. A field that is left out stays and null is automatic. Only an exit change keeps the running tunnel (`live`). The link, keys, allow, allow_private and via cannot be changed this way. */
|
|
79
|
+
chooseUpstream(tag, choice) { return this.json("PATCH", "/v1/upstreams/" + encodeURIComponent(tag), {}, choice); }
|
|
78
80
|
/** Asks the upstream to connect again now: every wait it was in starts over. */
|
|
79
81
|
retryUpstream(tag) { return this.json("POST", "/v1/upstreams/" + encodeURIComponent(tag) + "/retry"); }
|
|
80
82
|
/** The event stream. It ends when the node closes it or when `signal` aborts, and throws when the node refuses it or sends something that is not an event. Event names this client does not know are skipped. */
|
package/dist/src/schema.d.ts
CHANGED
|
@@ -140,7 +140,8 @@ export interface paths {
|
|
|
140
140
|
delete: operations["relayDelete"];
|
|
141
141
|
options?: never;
|
|
142
142
|
head?: never;
|
|
143
|
-
|
|
143
|
+
/** The same call with PATCH, which is how the choice on an upstream is changed. */
|
|
144
|
+
patch: operations["relayPatch"];
|
|
144
145
|
trace?: never;
|
|
145
146
|
};
|
|
146
147
|
"/v1/openapi.json": {
|
|
@@ -293,7 +294,8 @@ export interface paths {
|
|
|
293
294
|
delete: operations["removeUpstream"];
|
|
294
295
|
options?: never;
|
|
295
296
|
head?: never;
|
|
296
|
-
|
|
297
|
+
/** Changes what the config chooses on an upstream: the profile (null: every profile in turn), failover to the other profiles, the transport (null: automatic) and the exit of the provider. A field that is left out stays. It goes through the same checks and the same apply as a config document, at the revision that runs now (read again once if it moved), and is written to the config file. When only the exit changed the running tunnel is kept and asked for the other exit, and nothing leaves through the old one meanwhile (live: true). The link, the keys, allow, allow_private and via are never changed by it. */
|
|
298
|
+
patch: operations["chooseUpstream"];
|
|
297
299
|
trace?: never;
|
|
298
300
|
};
|
|
299
301
|
"/v1/upstreams/{tag}/confirm": {
|
|
@@ -551,6 +553,18 @@ export interface components {
|
|
|
551
553
|
};
|
|
552
554
|
Exit: {
|
|
553
555
|
backend: components["schemas"]["Backend"];
|
|
556
|
+
/** @description The address and port of the server the outbound talks to now, which is the one its name resolved to. Null for another exit and before the name resolved. */
|
|
557
|
+
endpoint: string | null;
|
|
558
|
+
/**
|
|
559
|
+
* Format: uint64
|
|
560
|
+
* @description The flows open through the WireGuard outbound's own stack, TCP and UDP. Null for every other exit.
|
|
561
|
+
*/
|
|
562
|
+
flows: number | null;
|
|
563
|
+
/**
|
|
564
|
+
* Format: uint64
|
|
565
|
+
* @description Seconds since the last handshake with the server. Null for another exit and before the first handshake.
|
|
566
|
+
*/
|
|
567
|
+
handshake_secs: number | null;
|
|
554
568
|
/**
|
|
555
569
|
* Format: uint64
|
|
556
570
|
* @description Seconds since the interface went down. Null while `interface_up` is not false.
|
|
@@ -584,6 +598,20 @@ export interface components {
|
|
|
584
598
|
name: string;
|
|
585
599
|
/** @description The tag of the outbound of a netstack backend. */
|
|
586
600
|
outbound: string | null;
|
|
601
|
+
/** @description Why the WireGuard outbound is down. Null while `outbound_up` is not false. */
|
|
602
|
+
outbound_down_reason: string | null;
|
|
603
|
+
/**
|
|
604
|
+
* Format: uint64
|
|
605
|
+
* @description Seconds since the WireGuard outbound went down. Null while `outbound_up` is not false.
|
|
606
|
+
*/
|
|
607
|
+
outbound_down_secs: number | null;
|
|
608
|
+
/**
|
|
609
|
+
* Format: uint64
|
|
610
|
+
* @description How often the WireGuard outbound switched between working and down.
|
|
611
|
+
*/
|
|
612
|
+
outbound_flips: number;
|
|
613
|
+
/** @description For an exit through a WireGuard outbound: whether the outbound works. It is false only while it is down: the server has not answered a handshake for 20 seconds or a datagram could not be sent to it. An outbound with no handshake in the last 180 seconds and nothing unanswered is idle and counts as up. While it is false the exit does not work, devices without a choice of exit leave through `routing.fallback`, and nothing leaves around it. Null for every other exit. */
|
|
614
|
+
outbound_up: boolean | null;
|
|
587
615
|
tag: string;
|
|
588
616
|
traffic: components["schemas"]["Traffic"];
|
|
589
617
|
/** @description Whether the SOCKS5 proxy of the exit relays UDP as far as the node knows. Null for an exit without one. */
|
|
@@ -649,6 +677,15 @@ export interface components {
|
|
|
649
677
|
InboundTransport: {
|
|
650
678
|
/** @description False for a transport the config switched off: it does not listen. */
|
|
651
679
|
enabled: boolean;
|
|
680
|
+
/**
|
|
681
|
+
* Format: int64
|
|
682
|
+
* @description Unix seconds: when the node found the new key (at a start, a reload or when the certificate file was read again). The node does not refuse the certificate.
|
|
683
|
+
*/
|
|
684
|
+
key_changed_at: number | null;
|
|
685
|
+
/** @description Only on a `tls` transport that is listening: the SHA-256 of the key's SubjectPublicKeyInfo of its certificate, in standard base64, the pin a link or a profile carries for it. */
|
|
686
|
+
pin: string | null;
|
|
687
|
+
/** @description Only when the node found that the pin is not the one it served before, for 30 days after: the pin that was served before. A link or a profile that pins it fails until it is paired or refreshed again. */
|
|
688
|
+
previous_pin: string | null;
|
|
652
689
|
rating: components["schemas"]["Rating"];
|
|
653
690
|
transport: components["schemas"]["Transport"];
|
|
654
691
|
};
|
|
@@ -664,10 +701,30 @@ export interface components {
|
|
|
664
701
|
/** Format: uint64 */
|
|
665
702
|
missed: number;
|
|
666
703
|
};
|
|
704
|
+
/** @description What the user's speed limits did since the node started. */
|
|
705
|
+
Limited: {
|
|
706
|
+
/** Format: uint64 */
|
|
707
|
+
down_packets: number;
|
|
708
|
+
/**
|
|
709
|
+
* Format: uint64
|
|
710
|
+
* @description Milliseconds that TCP streams of the user waited for the limit, added up over streams and both directions.
|
|
711
|
+
*/
|
|
712
|
+
paced_ms: number;
|
|
713
|
+
/**
|
|
714
|
+
* Format: uint64
|
|
715
|
+
* @description Packets dropped for being over the rate: UDP, pings and TCP that does not leave through a netstack exit. TCP that does is slowed down, never dropped.
|
|
716
|
+
*/
|
|
717
|
+
up_packets: number;
|
|
718
|
+
};
|
|
667
719
|
/** @description One node link. It holds no key and no secret. */
|
|
668
720
|
Link: {
|
|
669
721
|
/** Format: uint */
|
|
670
722
|
candidate_index: number | null;
|
|
723
|
+
/**
|
|
724
|
+
* Format: uint64
|
|
725
|
+
* @description On the exit half: packets this node forwarded from the link into another link, which happens only for a link with allow_chain. Zero otherwise.
|
|
726
|
+
*/
|
|
727
|
+
chained: number;
|
|
671
728
|
/** @description On the exit half: why this node cut the link off. Null for a link that may run. */
|
|
672
729
|
denied: components["schemas"]["Denied"] | null;
|
|
673
730
|
/**
|
|
@@ -721,7 +778,7 @@ export interface components {
|
|
|
721
778
|
/** @description Which side of a managed link this node is. */
|
|
722
779
|
LinkManage: "peer" | "by_peer";
|
|
723
780
|
LinkRole: "listener" | "dialler";
|
|
724
|
-
LinkState: "up" | "connecting" | "unreachable" | "refused" | "ended";
|
|
781
|
+
LinkState: "up" | "connecting" | "unreachable" | "refused" | "pin_mismatch" | "ended";
|
|
725
782
|
Links: {
|
|
726
783
|
links: components["schemas"]["Link"][];
|
|
727
784
|
};
|
|
@@ -789,7 +846,7 @@ export interface components {
|
|
|
789
846
|
OutboundStats: {
|
|
790
847
|
/** Format: uint64 */
|
|
791
848
|
down_bytes_per_sec: number;
|
|
792
|
-
/** @description Why an `xray` outbound cannot carry a flow now, in words: the add-on is not installed or not running, Xray ended and starts again, or the name of its server does not resolve to an address the node may dial. Every exit through it is down with the same reason. Null while it carries, and for an outbound that is
|
|
849
|
+
/** @description Why an `xray` outbound cannot carry a flow now, in words: the add-on is not installed or not running, Xray ended and starts again, or the name of its server does not resolve to an address the node may dial. For a `wireguard` outbound: its server has not answered a handshake for 20 seconds, a datagram could not be sent to it, or its name or address is refused. Every exit through it is down with the same reason. Null while it carries, and for an outbound that is neither. */
|
|
793
850
|
down_reason: string | null;
|
|
794
851
|
/**
|
|
795
852
|
* Format: uint64
|
|
@@ -968,22 +1025,24 @@ export interface components {
|
|
|
968
1025
|
generation: number;
|
|
969
1026
|
revision: string;
|
|
970
1027
|
};
|
|
971
|
-
/** @description
|
|
1028
|
+
/** @description The certificate of a `tls` listener, with the pin of its key. */
|
|
972
1029
|
SelfSigned: {
|
|
973
1030
|
/** @description The listen address, as the config writes it. */
|
|
974
1031
|
listen: string;
|
|
975
1032
|
/**
|
|
976
1033
|
* Format: int64
|
|
977
|
-
* @description Unix seconds
|
|
1034
|
+
* @description Unix seconds. For a self-signed certificate 80 to 100 days after `not_before`, drawn per certificate, and clients do not check it.
|
|
978
1035
|
*/
|
|
979
1036
|
not_after: number;
|
|
980
1037
|
/**
|
|
981
1038
|
* Format: int64
|
|
982
|
-
* @description Unix seconds.
|
|
1039
|
+
* @description Unix seconds. For a self-signed certificate the node makes it anew with the same key 20 days before `not_after`.
|
|
983
1040
|
*/
|
|
984
1041
|
not_before: number;
|
|
985
|
-
/** @description The SHA-256 of the key's SubjectPublicKeyInfo, in standard base64: the pin a profile's candidate carries
|
|
1042
|
+
/** @description The SHA-256 of the key's SubjectPublicKeyInfo, in standard base64: the pin a profile's or a link's candidate carries. For a self-signed certificate it stays the same when the certificate is made anew. */
|
|
986
1043
|
pin: string;
|
|
1044
|
+
/** @description True for a certificate the node made itself: the candidate that pins it is marked `self_signed`, and the pin is its only check. False for a certificate from the config's `cert` file: the chain is checked as well and the candidate is not marked `self_signed`. */
|
|
1045
|
+
self_signed: boolean;
|
|
987
1046
|
};
|
|
988
1047
|
/** @description A device with a live session on one inbound. The address the device connects from is not part of it. */
|
|
989
1048
|
Session: {
|
|
@@ -1065,7 +1124,7 @@ export interface components {
|
|
|
1065
1124
|
};
|
|
1066
1125
|
Status: {
|
|
1067
1126
|
addons: components["schemas"]["Addons"];
|
|
1068
|
-
/** @description The
|
|
1127
|
+
/** @description The certificate of every `tls` transport, one for each listen address, with its pin: the ones the node made for transports with `"self_signed": true` (`self_signed` true), and the ones read from the `cert` file of the others (`self_signed` false: a chain from an authority, the pin is the second condition). Empty for a node that has none. */
|
|
1069
1128
|
certificates: components["schemas"]["SelfSigned"][];
|
|
1070
1129
|
/** Format: uint */
|
|
1071
1130
|
exits: number;
|
|
@@ -1509,9 +1568,19 @@ export interface components {
|
|
|
1509
1568
|
};
|
|
1510
1569
|
/** @description What the node is doing for one upstream. Nothing in it is a key, a secret, a token or the link. */
|
|
1511
1570
|
Upstream: {
|
|
1571
|
+
choice: components["schemas"]["UpstreamChoiceState"];
|
|
1572
|
+
/**
|
|
1573
|
+
* Format: uint64
|
|
1574
|
+
* @description Seconds the tunnel has been connected. Null while it is not.
|
|
1575
|
+
*/
|
|
1576
|
+
connected_secs: number | null;
|
|
1512
1577
|
counters: components["schemas"]["UpstreamCounters"];
|
|
1578
|
+
/** @description What the tunnel itself says: connecting, reconnecting, connected, stopped:<reason> (quota, expired, disabled or node-stopping) or failed. Null while no tunnel exists. */
|
|
1579
|
+
engine_state: string | null;
|
|
1513
1580
|
/** @description The exit of the provider in use, and the exits it offers. */
|
|
1514
1581
|
exit: string | null;
|
|
1582
|
+
/** @description The exits the provider offers, at most 16, once the control channel is open. */
|
|
1583
|
+
exits: components["schemas"]["UpstreamExitState"][];
|
|
1515
1584
|
/**
|
|
1516
1585
|
* Format: int64
|
|
1517
1586
|
* @description When the document stops being current and when it was last refreshed, in Unix seconds.
|
|
@@ -1530,7 +1599,11 @@ export interface components {
|
|
|
1530
1599
|
pending_move: string | null;
|
|
1531
1600
|
/** @description The profile in use, and the transport it is connected over. */
|
|
1532
1601
|
profile: string | null;
|
|
1602
|
+
/** @description Every profile of the document held, in the order they are tried, and whether each is usable. */
|
|
1603
|
+
profiles: components["schemas"]["UpstreamProfileState"][];
|
|
1533
1604
|
provider: string | null;
|
|
1605
|
+
/** @description The same notices with the severity the provider gave them. */
|
|
1606
|
+
provider_notices: components["schemas"]["UpstreamNotice"][];
|
|
1534
1607
|
quota: components["schemas"]["UpstreamQuota"] | null;
|
|
1535
1608
|
/** @description Plain words for why the state is what it is. Empty while it is up. */
|
|
1536
1609
|
reason: string;
|
|
@@ -1548,6 +1621,35 @@ export interface components {
|
|
|
1548
1621
|
state_secs: number;
|
|
1549
1622
|
tag: string;
|
|
1550
1623
|
transport: components["schemas"]["Transport"] | null;
|
|
1624
|
+
/** @description The types of transport the profile in use lists. */
|
|
1625
|
+
transports: components["schemas"]["Transport"][];
|
|
1626
|
+
};
|
|
1627
|
+
/** @description What to choose on an upstream. A field that is left out stays as it is, and null is automatic. The change goes through the same checks and the same apply as a config document does, and is written to the config file. Only the exit is taken on the running tunnel; any other field makes the tunnel again. */
|
|
1628
|
+
UpstreamChoice: {
|
|
1629
|
+
/** @description The tag of the provider's exit to leave through. Null: the provider's default. */
|
|
1630
|
+
exit?: string | null;
|
|
1631
|
+
/** @description Whether the other profiles are tried when the named one cannot be used. Null is false. */
|
|
1632
|
+
failover?: boolean | null;
|
|
1633
|
+
/** @description The profile of the provider's document to use. Null: every profile is tried in the document's order, starting with the last one that carried. */
|
|
1634
|
+
profile?: string | null;
|
|
1635
|
+
/** @description The type of transport to connect over: udp, udp-obfs, tls, ws, ws-plain, fronted or fronted-shaped. Null: the engine picks from every transport of the profile. */
|
|
1636
|
+
transport?: string | null;
|
|
1637
|
+
};
|
|
1638
|
+
/** @description What the config chooses on an upstream: null is automatic. */
|
|
1639
|
+
UpstreamChoiceState: {
|
|
1640
|
+
/** @description The exit of the provider that is asked for now, which may be one the operator just switched to. */
|
|
1641
|
+
exit: string | null;
|
|
1642
|
+
failover: boolean;
|
|
1643
|
+
profile: string | null;
|
|
1644
|
+
transport: string | null;
|
|
1645
|
+
};
|
|
1646
|
+
/** @description What a choice on an upstream came to: the config now in force, and whether only the exit changed, so that the tunnel was kept and asked for the other exit. */
|
|
1647
|
+
UpstreamChosen: {
|
|
1648
|
+
/** Format: uint64 */
|
|
1649
|
+
generation: number;
|
|
1650
|
+
live: boolean;
|
|
1651
|
+
revision: string;
|
|
1652
|
+
tag: string;
|
|
1551
1653
|
};
|
|
1552
1654
|
/** @description A class of transports the operator allows an upstream to use, as the client engine ranks them from strongest to weakest. `cover` is always allowed. */
|
|
1553
1655
|
UpstreamClass: "cover" | "no_cover" | "exposed" | "plain";
|
|
@@ -1603,6 +1705,23 @@ export interface components {
|
|
|
1603
1705
|
name: string;
|
|
1604
1706
|
tag: string;
|
|
1605
1707
|
};
|
|
1708
|
+
/** @description An exit the provider offers, with its name as plain text. */
|
|
1709
|
+
UpstreamExitState: {
|
|
1710
|
+
all_protocols: boolean;
|
|
1711
|
+
/** @description Two uppercase letters. */
|
|
1712
|
+
country: string | null;
|
|
1713
|
+
name: string;
|
|
1714
|
+
/** @description This node's device has this exit selected at the provider. */
|
|
1715
|
+
selected: boolean;
|
|
1716
|
+
tag: string;
|
|
1717
|
+
};
|
|
1718
|
+
/** @description A notice of the provider, as plain text. */
|
|
1719
|
+
UpstreamNotice: {
|
|
1720
|
+
severity: components["schemas"]["UpstreamSeverity"];
|
|
1721
|
+
text: string;
|
|
1722
|
+
};
|
|
1723
|
+
/** @enum {string} */
|
|
1724
|
+
UpstreamPeriod: "none" | "daily" | "weekly" | "monthly";
|
|
1606
1725
|
/** @description The answer to a preview: the document the provider sent, verified under the key of the link, as the operator reads it before saying yes. Fetching it took a place at the provider. The place is given back when the preview is declined or runs out, and made permanent by the config that names the same link and device within `expires_in_secs`. */
|
|
1607
1726
|
UpstreamPreview: {
|
|
1608
1727
|
/**
|
|
@@ -1673,11 +1792,29 @@ export interface components {
|
|
|
1673
1792
|
/** @description In the provider's order. */
|
|
1674
1793
|
transports: components["schemas"]["Transport"][];
|
|
1675
1794
|
};
|
|
1795
|
+
/** @description A profile of the provider's document and whether this node can use it now. Never an address. */
|
|
1796
|
+
UpstreamProfileState: {
|
|
1797
|
+
id: string;
|
|
1798
|
+
name: string;
|
|
1799
|
+
/** @description Plain words for why not. Empty when it is usable. */
|
|
1800
|
+
reason: string;
|
|
1801
|
+
usable: boolean;
|
|
1802
|
+
};
|
|
1676
1803
|
/** @description What the provider says an account has used and has. A quota of 0 is none. */
|
|
1677
1804
|
UpstreamQuota: {
|
|
1805
|
+
/** Format: int64 */
|
|
1806
|
+
account_expires_at?: number | null;
|
|
1807
|
+
/** Format: uint64 */
|
|
1808
|
+
down_bytes?: number | null;
|
|
1809
|
+
/** @description What the provider's control channel says besides, once it is open: how often the quota starts over, when the period began and the account ends (Unix seconds), and the bytes of the device's own traffic, up and down. */
|
|
1810
|
+
period?: components["schemas"]["UpstreamPeriod"] | null;
|
|
1811
|
+
/** Format: int64 */
|
|
1812
|
+
period_start?: number | null;
|
|
1678
1813
|
/** Format: uint64 */
|
|
1679
1814
|
quota_bytes: number;
|
|
1680
1815
|
/** Format: uint64 */
|
|
1816
|
+
up_bytes?: number | null;
|
|
1817
|
+
/** Format: uint64 */
|
|
1681
1818
|
used_bytes: number;
|
|
1682
1819
|
};
|
|
1683
1820
|
/** @description What a removal did. `confirmed` says whether the provider took the word that the device left; when it did not, the place stays until the provider removes it. The upstream is not run again by a config that still names it. */
|
|
@@ -1690,6 +1827,8 @@ export interface components {
|
|
|
1690
1827
|
tag: string;
|
|
1691
1828
|
};
|
|
1692
1829
|
/** @enum {string} */
|
|
1830
|
+
UpstreamSeverity: "information" | "warning";
|
|
1831
|
+
/** @enum {string} */
|
|
1693
1832
|
UpstreamStatus: "fetching" | "connecting" | "up" | "down";
|
|
1694
1833
|
Upstreams: {
|
|
1695
1834
|
upstreams: components["schemas"]["Upstream"][];
|
|
@@ -1707,6 +1846,7 @@ export interface components {
|
|
|
1707
1846
|
dns_set: string | null;
|
|
1708
1847
|
enabled: boolean;
|
|
1709
1848
|
expires_at: string | null;
|
|
1849
|
+
limited: components["schemas"]["Limited"];
|
|
1710
1850
|
name: string;
|
|
1711
1851
|
/**
|
|
1712
1852
|
* Format: int64
|
|
@@ -1716,6 +1856,13 @@ export interface components {
|
|
|
1716
1856
|
/** Format: uint64 */
|
|
1717
1857
|
quota_bytes: number | null;
|
|
1718
1858
|
quota_period: components["schemas"]["QuotaPeriod"] | null;
|
|
1859
|
+
/** Format: uint64 */
|
|
1860
|
+
speed_down: number | null;
|
|
1861
|
+
/**
|
|
1862
|
+
* Format: uint64
|
|
1863
|
+
* @description The most the user sends and receives through this node, in bytes per second. Null for no limit.
|
|
1864
|
+
*/
|
|
1865
|
+
speed_up: number | null;
|
|
1719
1866
|
traffic: components["schemas"]["Traffic"];
|
|
1720
1867
|
/**
|
|
1721
1868
|
* Format: uint64
|
|
@@ -2521,6 +2668,87 @@ export interface operations {
|
|
|
2521
2668
|
};
|
|
2522
2669
|
};
|
|
2523
2670
|
};
|
|
2671
|
+
relayPatch: {
|
|
2672
|
+
parameters: {
|
|
2673
|
+
query?: never;
|
|
2674
|
+
header?: never;
|
|
2675
|
+
path: {
|
|
2676
|
+
tag: string;
|
|
2677
|
+
path: string;
|
|
2678
|
+
};
|
|
2679
|
+
cookie?: never;
|
|
2680
|
+
};
|
|
2681
|
+
requestBody?: {
|
|
2682
|
+
content: {
|
|
2683
|
+
"application/json": Record<string, never>;
|
|
2684
|
+
};
|
|
2685
|
+
};
|
|
2686
|
+
responses: {
|
|
2687
|
+
/** @description The answer. */
|
|
2688
|
+
200: {
|
|
2689
|
+
headers: {
|
|
2690
|
+
[name: string]: unknown;
|
|
2691
|
+
};
|
|
2692
|
+
content: {
|
|
2693
|
+
"application/json": unknown;
|
|
2694
|
+
};
|
|
2695
|
+
};
|
|
2696
|
+
/** @description not_managed: the link does not have manage peer on this node. Node 1's own, with the header veilway-relay: node1. */
|
|
2697
|
+
403: {
|
|
2698
|
+
headers: {
|
|
2699
|
+
[name: string]: unknown;
|
|
2700
|
+
};
|
|
2701
|
+
content: {
|
|
2702
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
2703
|
+
};
|
|
2704
|
+
};
|
|
2705
|
+
/** @description no_such_link: the running config has no enabled node link of that tag. not_allowed_through_link: the route or the method is not on the list of routes a managed node serves. Node 1's own, with the header veilway-relay: node1. */
|
|
2706
|
+
404: {
|
|
2707
|
+
headers: {
|
|
2708
|
+
[name: string]: unknown;
|
|
2709
|
+
};
|
|
2710
|
+
content: {
|
|
2711
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
2712
|
+
};
|
|
2713
|
+
};
|
|
2714
|
+
/** @description The answer of the other node itself: the relay keeps its own time, 30 seconds and 75 for the preview of an upstream. */
|
|
2715
|
+
408: {
|
|
2716
|
+
headers: {
|
|
2717
|
+
[name: string]: unknown;
|
|
2718
|
+
};
|
|
2719
|
+
content: {
|
|
2720
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
2721
|
+
};
|
|
2722
|
+
};
|
|
2723
|
+
/** @description peer_refused: the other node reset the connection, because it does not serve management or has no control API. answer_too_large: the answer is over 8 MiB. bad_answer: the answer is not HTTP/1.1 with a length, or the connection ended before it was whole, and a change it was sent may still have been made: read its revision. Node 1's own, with the header veilway-relay: node1; any other 502 is the other node's own answer, with none of it. */
|
|
2724
|
+
502: {
|
|
2725
|
+
headers: {
|
|
2726
|
+
[name: string]: unknown;
|
|
2727
|
+
};
|
|
2728
|
+
content: {
|
|
2729
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
2730
|
+
};
|
|
2731
|
+
};
|
|
2732
|
+
/** @description link_down: the link is not up, answered at once with nothing sent, and details name its state, since when and what the dialler's last attempt came to. busy: four connections of the link are open, or the node relays as many requests as it takes at once, and none was freed in 5 seconds. Node 1's own answers carry the header veilway-relay: node1; any other 503 is the other node's own, with none of it. */
|
|
2733
|
+
503: {
|
|
2734
|
+
headers: {
|
|
2735
|
+
[name: string]: unknown;
|
|
2736
|
+
};
|
|
2737
|
+
content: {
|
|
2738
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
2739
|
+
};
|
|
2740
|
+
};
|
|
2741
|
+
/** @description peer_silent: no answer to the connection within 10 seconds, or none within the request's time. A change the other node was sent may still have been made. Node 1's own, with the header veilway-relay: node1. */
|
|
2742
|
+
504: {
|
|
2743
|
+
headers: {
|
|
2744
|
+
[name: string]: unknown;
|
|
2745
|
+
};
|
|
2746
|
+
content: {
|
|
2747
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
2748
|
+
};
|
|
2749
|
+
};
|
|
2750
|
+
};
|
|
2751
|
+
};
|
|
2524
2752
|
openapi: {
|
|
2525
2753
|
parameters: {
|
|
2526
2754
|
query?: never;
|
|
@@ -2963,6 +3191,104 @@ export interface operations {
|
|
|
2963
3191
|
};
|
|
2964
3192
|
};
|
|
2965
3193
|
};
|
|
3194
|
+
chooseUpstream: {
|
|
3195
|
+
parameters: {
|
|
3196
|
+
query?: never;
|
|
3197
|
+
header?: never;
|
|
3198
|
+
path: {
|
|
3199
|
+
tag: string;
|
|
3200
|
+
};
|
|
3201
|
+
cookie?: never;
|
|
3202
|
+
};
|
|
3203
|
+
requestBody: {
|
|
3204
|
+
content: {
|
|
3205
|
+
"application/json": components["schemas"]["UpstreamChoice"];
|
|
3206
|
+
};
|
|
3207
|
+
};
|
|
3208
|
+
responses: {
|
|
3209
|
+
/** @description The answer. */
|
|
3210
|
+
200: {
|
|
3211
|
+
headers: {
|
|
3212
|
+
[name: string]: unknown;
|
|
3213
|
+
};
|
|
3214
|
+
content: {
|
|
3215
|
+
"application/json": components["schemas"]["UpstreamChosen"];
|
|
3216
|
+
};
|
|
3217
|
+
};
|
|
3218
|
+
/** @description The body is not one JSON document, or could not be read to its end. */
|
|
3219
|
+
400: {
|
|
3220
|
+
headers: {
|
|
3221
|
+
[name: string]: unknown;
|
|
3222
|
+
};
|
|
3223
|
+
content: {
|
|
3224
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
3225
|
+
};
|
|
3226
|
+
};
|
|
3227
|
+
/** @description The running config has no upstream of that tag. Nothing was changed. */
|
|
3228
|
+
404: {
|
|
3229
|
+
headers: {
|
|
3230
|
+
[name: string]: unknown;
|
|
3231
|
+
};
|
|
3232
|
+
content: {
|
|
3233
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
3234
|
+
};
|
|
3235
|
+
};
|
|
3236
|
+
/** @description The body was not read within 30 seconds. Nothing was changed: once the node has begun to apply the choice, the answer waits for it and is never this one. */
|
|
3237
|
+
408: {
|
|
3238
|
+
headers: {
|
|
3239
|
+
[name: string]: unknown;
|
|
3240
|
+
};
|
|
3241
|
+
content: {
|
|
3242
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
3243
|
+
};
|
|
3244
|
+
};
|
|
3245
|
+
/** @description The running config changed twice while the choice was made. Nothing was changed. */
|
|
3246
|
+
409: {
|
|
3247
|
+
headers: {
|
|
3248
|
+
[name: string]: unknown;
|
|
3249
|
+
};
|
|
3250
|
+
content: {
|
|
3251
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
3252
|
+
};
|
|
3253
|
+
};
|
|
3254
|
+
/** @description The body is larger than 4 MiB. */
|
|
3255
|
+
413: {
|
|
3256
|
+
headers: {
|
|
3257
|
+
[name: string]: unknown;
|
|
3258
|
+
};
|
|
3259
|
+
content: {
|
|
3260
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
3261
|
+
};
|
|
3262
|
+
};
|
|
3263
|
+
/** @description The body was not sent as application/json. */
|
|
3264
|
+
415: {
|
|
3265
|
+
headers: {
|
|
3266
|
+
[name: string]: unknown;
|
|
3267
|
+
};
|
|
3268
|
+
content: {
|
|
3269
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
3270
|
+
};
|
|
3271
|
+
};
|
|
3272
|
+
/** @description The body is not what a choice takes, or the config with the choice does not validate (the problems name the fields), or the node could not prepare it. Nothing was changed. */
|
|
3273
|
+
422: {
|
|
3274
|
+
headers: {
|
|
3275
|
+
[name: string]: unknown;
|
|
3276
|
+
};
|
|
3277
|
+
content: {
|
|
3278
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
3279
|
+
};
|
|
3280
|
+
};
|
|
3281
|
+
/** @description The node already serves as many connections, or as many event streams, as it takes at once. */
|
|
3282
|
+
503: {
|
|
3283
|
+
headers: {
|
|
3284
|
+
[name: string]: unknown;
|
|
3285
|
+
};
|
|
3286
|
+
content: {
|
|
3287
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
3288
|
+
};
|
|
3289
|
+
};
|
|
3290
|
+
};
|
|
3291
|
+
};
|
|
2966
3292
|
confirmUpstream: {
|
|
2967
3293
|
parameters: {
|
|
2968
3294
|
query?: never;
|