@serve.zone/dcrouter-apiclient 32.3.2 → 32.5.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 +2 -0
- package/dist_ts_interfaces/data/route-management.js +1 -1
- package/dist_ts_interfaces/data/workhoster.d.ts +5 -0
- package/dist_ts_interfaces/requests/acme-config.d.ts +5 -1
- package/dist_ts_interfaces/requests/config.d.ts +2 -0
- package/dist_ts_interfaces/requests/workhoster.d.ts +2 -0
- package/package.json +2 -2
- package/ts_interfaces/data/acme-config.ts +8 -1
- package/ts_interfaces/data/route-management.ts +2 -0
- package/ts_interfaces/data/workhoster.ts +5 -0
- package/ts_interfaces/requests/acme-config.ts +5 -1
- package/ts_interfaces/requests/config.ts +2 -0
- package/ts_interfaces/requests/workhoster.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. */
|
|
@@ -33,6 +33,8 @@ export interface IApiTokenPolicy {
|
|
|
33
33
|
ports: number[];
|
|
34
34
|
allowAnyPort?: boolean;
|
|
35
35
|
}>;
|
|
36
|
+
/** Canonical address prefixes the client's own address records may point into. */
|
|
37
|
+
allowedDnsRecordAddresses?: string[];
|
|
36
38
|
capabilities?: {
|
|
37
39
|
readDomains?: boolean;
|
|
38
40
|
readDnsRecords?: boolean;
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUtbWFuYWdlbWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX2ludGVyZmFjZXMvZGF0YS9yb3V0ZS1tYW5hZ2VtZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCQSwrRUFBK0U7QUFDL0UsOEJBQThCO0FBQzlCLCtFQUErRTtBQUUvRSxNQUFNLENBQUMsTUFBTSxjQUFjLEdBQUc7SUFDNUIsR0FBRztJQUNILGFBQWE7SUFDYixjQUFjO0lBQ2QsYUFBYTtJQUNiLFlBQVk7SUFDWixXQUFXO0lBQ1gsb0JBQW9CO0lBQ3BCLHFCQUFxQjtJQUNyQixlQUFlO0lBQ2YsZ0JBQWdCO0lBQ2hCLGFBQWE7SUFDYixjQUFjO0lBQ2QsbUJBQW1CO0lBQ25CLG9CQUFvQjtJQUNwQixhQUFhO0lBQ2IsZUFBZTtJQUNmLFlBQVk7SUFDWixjQUFjO0lBQ2Qsc0JBQXNCO0lBQ3RCLHVCQUF1QjtJQUN2QixzQkFBc0I7SUFDdEIsdUJBQXVCO0lBQ3ZCLGNBQWM7SUFDZCxlQUFlO0lBQ2Ysb0JBQW9CO0lB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|
8
8
|
allowedRouteTargets: NonNullable<IApiTokenPolicy['allowedRouteTargets']>;
|
|
9
|
+
/**
|
|
10
|
+
* Canonical address prefixes the client's own address records may point into. Absent or empty
|
|
11
|
+
* allows no address record.
|
|
12
|
+
*/
|
|
13
|
+
allowedDnsRecordAddresses?: string[];
|
|
9
14
|
capabilities: NonNullable<IApiTokenPolicy['capabilities']>;
|
|
10
15
|
enabled: boolean;
|
|
11
16
|
tokenCount?: number;
|
|
@@ -22,7 +22,10 @@ export interface IReq_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;
|
|
@@ -22,6 +22,7 @@ export interface IReq_CreateGatewayClient extends plugins.typedrequestInterfaces
|
|
|
22
22
|
description?: string;
|
|
23
23
|
hostnamePatterns?: string[];
|
|
24
24
|
allowedRouteTargets?: IGatewayClient['allowedRouteTargets'];
|
|
25
|
+
allowedDnsRecordAddresses?: IGatewayClient['allowedDnsRecordAddresses'];
|
|
25
26
|
capabilities?: IGatewayClient['capabilities'];
|
|
26
27
|
};
|
|
27
28
|
response: {
|
|
@@ -40,6 +41,7 @@ export interface IReq_UpdateGatewayClient extends plugins.typedrequestInterfaces
|
|
|
40
41
|
description?: string;
|
|
41
42
|
hostnamePatterns?: string[];
|
|
42
43
|
allowedRouteTargets?: IGatewayClient['allowedRouteTargets'];
|
|
44
|
+
allowedDnsRecordAddresses?: IGatewayClient['allowedDnsRecordAddresses'];
|
|
43
45
|
capabilities?: IGatewayClient['capabilities'];
|
|
44
46
|
enabled?: boolean;
|
|
45
47
|
};
|
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.5.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",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@push.rocks/smartmta": "^9.5.0",
|
|
52
52
|
"@push.rocks/smartnetwork": "^4.10.1",
|
|
53
53
|
"@push.rocks/smartproxy": "^27.22.0",
|
|
54
|
-
"@serve.zone/interfaces": "^32.
|
|
54
|
+
"@serve.zone/interfaces": "^32.21.0"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=22"
|
|
@@ -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. */
|
|
@@ -99,6 +99,8 @@ export interface IApiTokenPolicy {
|
|
|
99
99
|
ports: number[];
|
|
100
100
|
allowAnyPort?: boolean;
|
|
101
101
|
}>;
|
|
102
|
+
/** Canonical address prefixes the client's own address records may point into. */
|
|
103
|
+
allowedDnsRecordAddresses?: string[];
|
|
102
104
|
capabilities?: {
|
|
103
105
|
readDomains?: boolean;
|
|
104
106
|
readDnsRecords?: boolean;
|
|
@@ -10,6 +10,11 @@ export interface IGatewayClient {
|
|
|
10
10
|
description?: string;
|
|
11
11
|
hostnamePatterns: string[];
|
|
12
12
|
allowedRouteTargets: NonNullable<IApiTokenPolicy['allowedRouteTargets']>;
|
|
13
|
+
/**
|
|
14
|
+
* Canonical address prefixes the client's own address records may point into. Absent or empty
|
|
15
|
+
* allows no address record.
|
|
16
|
+
*/
|
|
17
|
+
allowedDnsRecordAddresses?: string[];
|
|
13
18
|
capabilities: NonNullable<IApiTokenPolicy['capabilities']>;
|
|
14
19
|
enabled: boolean;
|
|
15
20
|
tokenCount?: number;
|
|
@@ -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;
|
|
@@ -30,6 +30,7 @@ export interface IReq_CreateGatewayClient extends plugins.typedrequestInterfaces
|
|
|
30
30
|
description?: string;
|
|
31
31
|
hostnamePatterns?: string[];
|
|
32
32
|
allowedRouteTargets?: IGatewayClient['allowedRouteTargets'];
|
|
33
|
+
allowedDnsRecordAddresses?: IGatewayClient['allowedDnsRecordAddresses'];
|
|
33
34
|
capabilities?: IGatewayClient['capabilities'];
|
|
34
35
|
};
|
|
35
36
|
response: {
|
|
@@ -52,6 +53,7 @@ export interface IReq_UpdateGatewayClient extends plugins.typedrequestInterfaces
|
|
|
52
53
|
description?: string;
|
|
53
54
|
hostnamePatterns?: string[];
|
|
54
55
|
allowedRouteTargets?: IGatewayClient['allowedRouteTargets'];
|
|
56
|
+
allowedDnsRecordAddresses?: IGatewayClient['allowedDnsRecordAddresses'];
|
|
55
57
|
capabilities?: IGatewayClient['capabilities'];
|
|
56
58
|
enabled?: boolean;
|
|
57
59
|
};
|