@serve.zone/dcrouter-apiclient 32.4.0 → 32.6.0
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_ts_interfaces/data/acme-config.d.ts +8 -1
- package/dist_ts_interfaces/data/route-management.d.ts +4 -1
- package/dist_ts_interfaces/data/route-management.js +1 -1
- package/dist_ts_interfaces/requests/acme-config.d.ts +5 -1
- package/dist_ts_interfaces/requests/config.d.ts +2 -0
- package/package.json +1 -1
- package/ts_interfaces/data/acme-config.ts +8 -1
- package/ts_interfaces/data/route-management.ts +4 -1
- package/ts_interfaces/requests/acme-config.ts +5 -1
- package/ts_interfaces/requests/config.ts +2 -0
|
@@ -10,8 +10,15 @@ export interface IAcmeConfig {
|
|
|
10
10
|
accountEmail: string;
|
|
11
11
|
/** Whether ACME is enabled. If false, no certs are issued via ACME. */
|
|
12
12
|
enabled: boolean;
|
|
13
|
-
/** True = Let's Encrypt production, false = staging. */
|
|
13
|
+
/** True = Let's Encrypt production, false = staging. Ignored while `directoryUrl` is set. */
|
|
14
14
|
useProduction: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* ACME directory of another CA, such as a private or test CA. Absent means
|
|
17
|
+
* Let's Encrypt, production or staging per `useProduction`. Must be an
|
|
18
|
+
* `https:` URL, or an `http:` URL on `localhost`, `127.0.0.1` or `[::1]`,
|
|
19
|
+
* without credentials or fragment (SmartAcme's rule).
|
|
20
|
+
*/
|
|
21
|
+
directoryUrl?: string;
|
|
15
22
|
/** Whether to automatically renew certs before expiry. */
|
|
16
23
|
autoRenew: boolean;
|
|
17
24
|
/** Renew when a cert has fewer than this many days of validity left. */
|
|
@@ -198,8 +198,11 @@ export interface IRouteWarning {
|
|
|
198
198
|
* certificate for a domain whose ownership dcrouter cannot prove, so ACME
|
|
199
199
|
* can never succeed for it. Surfaced rather than refused for already-stored
|
|
200
200
|
* routes; new and updated routes are refused outright.
|
|
201
|
+
* - 'route-ingress-disabled' → a route created through the API allows only
|
|
202
|
+
* ingress paths whose runtime (SmartVPN, RemoteIngress hub) is off, so it is
|
|
203
|
+
* left out of the applied route set while every other route is applied.
|
|
201
204
|
*/
|
|
202
|
-
type: 'disabled-route' | 'unverified-domain-ownership';
|
|
205
|
+
type: 'disabled-route' | 'unverified-domain-ownership' | 'route-ingress-disabled';
|
|
203
206
|
routeName: string;
|
|
204
207
|
message: string;
|
|
205
208
|
}
|
|
@@ -127,4 +127,4 @@ export function canonicalizeSourceRouteId(routeId) {
|
|
|
127
127
|
const sourceVariantIndex = routeId.indexOf(':source:');
|
|
128
128
|
return sourceVariantIndex === -1 ? routeId : routeId.slice(0, sourceVariantIndex);
|
|
129
129
|
}
|
|
130
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
130
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUtbWFuYWdlbWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX2ludGVyZmFjZXMvZGF0YS9yb3V0ZS1tYW5hZ2VtZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCQSwrRUFBK0U7QUFDL0UsOEJBQThCO0FBQzlCLCtFQUErRTtBQUUvRSxNQUFNLENBQUMsTUFBTSxjQUFjLEdBQUc7SUFDNUIsR0FBRztJQUNILGFBQWE7SUFDYixjQUFjO0lBQ2QsYUFBYTtJQUNiLFlBQVk7SUFDWixXQUFXO0lBQ1gsb0JBQW9CO0lBQ3BCLHFCQUFxQjtJQUNyQixlQUFlO0lBQ2YsZ0JBQWdCO0lBQ2hCLGFBQWE7SUFDYixjQUFjO0lBQ2QsbUJBQW1CO0lBQ25CLG9CQUFvQjtJQUNwQixhQUFhO0lBQ2IsZUFBZTtJQUNmLFlBQVk7SUFDWixjQUFjO0lBQ2Qsc0JBQXNCO0lBQ3RCLHVCQUF1QjtJQUN2QixzQkFBc0I7SUFDdEIsdUJBQXVCO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Req_GetAcmeConfig extends plugins.typedrequestInterfaces.imple
|
|
|
22
22
|
* NOTE: SmartProxy and SmartAcme receive the configuration when dcrouter builds
|
|
23
23
|
* them, so an update, `renewThresholdDays` included, takes effect at the next
|
|
24
24
|
* restart or SmartProxy rebuild. `renewThresholdDays` must be a positive number
|
|
25
|
-
* of days.
|
|
25
|
+
* of days. `directoryUrl` selects another CA's ACME directory and `null` returns
|
|
26
|
+
* to Let's Encrypt; like `accountEmail` and `useProduction`, it is refused while
|
|
27
|
+
* certificate jobs or ACME DNS cleanup are unfinished, and issuance waits for
|
|
28
|
+
* the rebuild after a change.
|
|
26
29
|
*/
|
|
27
30
|
export interface IReq_UpdateAcmeConfig extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_UpdateAcmeConfig> {
|
|
28
31
|
method: 'updateAcmeConfig';
|
|
@@ -34,6 +37,7 @@ export interface IReq_UpdateAcmeConfig extends plugins.typedrequestInterfaces.im
|
|
|
34
37
|
useProduction?: boolean;
|
|
35
38
|
autoRenew?: boolean;
|
|
36
39
|
renewThresholdDays?: number;
|
|
40
|
+
directoryUrl?: string | null;
|
|
37
41
|
};
|
|
38
42
|
response: {
|
|
39
43
|
success: boolean;
|
|
@@ -17,6 +17,8 @@ export interface IConfigData {
|
|
|
17
17
|
enabled: boolean;
|
|
18
18
|
accountEmail: string;
|
|
19
19
|
useProduction: boolean;
|
|
20
|
+
/** The configured ACME directory; absent means Let's Encrypt per `useProduction`. */
|
|
21
|
+
directoryUrl?: string;
|
|
20
22
|
autoRenew: boolean;
|
|
21
23
|
renewThresholdDays: number;
|
|
22
24
|
} | null;
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"MAC authentication"
|
|
29
29
|
],
|
|
30
30
|
"name": "@serve.zone/dcrouter-apiclient",
|
|
31
|
-
"version": "32.
|
|
31
|
+
"version": "32.6.0",
|
|
32
32
|
"type": "module",
|
|
33
33
|
"description": "Object-oriented TypeScript client and shared TypedRequest contracts for the dcrouter OpsServer API.",
|
|
34
34
|
"main": "./dist_ts_apiclient/index.js",
|
|
@@ -10,8 +10,15 @@ export interface IAcmeConfig {
|
|
|
10
10
|
accountEmail: string;
|
|
11
11
|
/** Whether ACME is enabled. If false, no certs are issued via ACME. */
|
|
12
12
|
enabled: boolean;
|
|
13
|
-
/** True = Let's Encrypt production, false = staging. */
|
|
13
|
+
/** True = Let's Encrypt production, false = staging. Ignored while `directoryUrl` is set. */
|
|
14
14
|
useProduction: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* ACME directory of another CA, such as a private or test CA. Absent means
|
|
17
|
+
* Let's Encrypt, production or staging per `useProduction`. Must be an
|
|
18
|
+
* `https:` URL, or an `http:` URL on `localhost`, `127.0.0.1` or `[::1]`,
|
|
19
|
+
* without credentials or fragment (SmartAcme's rule).
|
|
20
|
+
*/
|
|
21
|
+
directoryUrl?: string;
|
|
15
22
|
/** Whether to automatically renew certs before expiry. */
|
|
16
23
|
autoRenew: boolean;
|
|
17
24
|
/** Renew when a cert has fewer than this many days of validity left. */
|
|
@@ -352,8 +352,11 @@ export interface IRouteWarning {
|
|
|
352
352
|
* certificate for a domain whose ownership dcrouter cannot prove, so ACME
|
|
353
353
|
* can never succeed for it. Surfaced rather than refused for already-stored
|
|
354
354
|
* routes; new and updated routes are refused outright.
|
|
355
|
+
* - 'route-ingress-disabled' → a route created through the API allows only
|
|
356
|
+
* ingress paths whose runtime (SmartVPN, RemoteIngress hub) is off, so it is
|
|
357
|
+
* left out of the applied route set while every other route is applied.
|
|
355
358
|
*/
|
|
356
|
-
type: 'disabled-route' | 'unverified-domain-ownership';
|
|
359
|
+
type: 'disabled-route' | 'unverified-domain-ownership' | 'route-ingress-disabled';
|
|
357
360
|
routeName: string;
|
|
358
361
|
message: string;
|
|
359
362
|
}
|
|
@@ -31,7 +31,10 @@ export interface IReq_GetAcmeConfig extends plugins.typedrequestInterfaces.imple
|
|
|
31
31
|
* NOTE: SmartProxy and SmartAcme receive the configuration when dcrouter builds
|
|
32
32
|
* them, so an update, `renewThresholdDays` included, takes effect at the next
|
|
33
33
|
* restart or SmartProxy rebuild. `renewThresholdDays` must be a positive number
|
|
34
|
-
* of days.
|
|
34
|
+
* of days. `directoryUrl` selects another CA's ACME directory and `null` returns
|
|
35
|
+
* to Let's Encrypt; like `accountEmail` and `useProduction`, it is refused while
|
|
36
|
+
* certificate jobs or ACME DNS cleanup are unfinished, and issuance waits for
|
|
37
|
+
* the rebuild after a change.
|
|
35
38
|
*/
|
|
36
39
|
export interface IReq_UpdateAcmeConfig extends plugins.typedrequestInterfaces.implementsTR<
|
|
37
40
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
@@ -46,6 +49,7 @@ export interface IReq_UpdateAcmeConfig extends plugins.typedrequestInterfaces.im
|
|
|
46
49
|
useProduction?: boolean;
|
|
47
50
|
autoRenew?: boolean;
|
|
48
51
|
renewThresholdDays?: number;
|
|
52
|
+
directoryUrl?: string | null;
|
|
49
53
|
};
|
|
50
54
|
response: {
|
|
51
55
|
success: boolean;
|
|
@@ -18,6 +18,8 @@ export interface IConfigData {
|
|
|
18
18
|
enabled: boolean;
|
|
19
19
|
accountEmail: string;
|
|
20
20
|
useProduction: boolean;
|
|
21
|
+
/** The configured ACME directory; absent means Let's Encrypt per `useProduction`. */
|
|
22
|
+
directoryUrl?: string;
|
|
21
23
|
autoRenew: boolean;
|
|
22
24
|
renewThresholdDays: number;
|
|
23
25
|
} | null;
|