@serve.zone/dcrouter-apiclient 32.3.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_apiclient/classes.apitoken.d.ts +41 -0
- package/dist_ts_apiclient/classes.apitoken.js +115 -0
- package/dist_ts_apiclient/classes.certificate.d.ts +57 -0
- package/dist_ts_apiclient/classes.certificate.js +69 -0
- package/dist_ts_apiclient/classes.config.d.ts +7 -0
- package/dist_ts_apiclient/classes.config.js +11 -0
- package/dist_ts_apiclient/classes.dcrouterapiclient.d.ts +54 -0
- package/dist_ts_apiclient/classes.dcrouterapiclient.js +97 -0
- package/dist_ts_apiclient/classes.email.d.ts +30 -0
- package/dist_ts_apiclient/classes.email.js +52 -0
- package/dist_ts_apiclient/classes.gatewayclient.d.ts +28 -0
- package/dist_ts_apiclient/classes.gatewayclient.js +52 -0
- package/dist_ts_apiclient/classes.logs.d.ts +28 -0
- package/dist_ts_apiclient/classes.logs.js +69 -0
- package/dist_ts_apiclient/classes.radius.d.ts +59 -0
- package/dist_ts_apiclient/classes.radius.js +95 -0
- package/dist_ts_apiclient/classes.remoteingress.d.ts +66 -0
- package/dist_ts_apiclient/classes.remoteingress.js +164 -0
- package/dist_ts_apiclient/classes.route.d.ts +39 -0
- package/dist_ts_apiclient/classes.route.js +125 -0
- package/dist_ts_apiclient/classes.stats.d.ts +47 -0
- package/dist_ts_apiclient/classes.stats.js +38 -0
- package/dist_ts_apiclient/classes.testing.d.ts +65 -0
- package/dist_ts_apiclient/classes.testing.js +120 -0
- package/dist_ts_apiclient/index.d.ts +12 -0
- package/dist_ts_apiclient/index.js +16 -0
- package/dist_ts_apiclient/plugins.d.ts +4 -0
- package/dist_ts_apiclient/plugins.js +6 -0
- package/dist_ts_interfaces/data/acme-config.d.ts +23 -0
- package/dist_ts_interfaces/data/acme-config.js +2 -0
- package/dist_ts_interfaces/data/auth.d.ts +8 -0
- package/dist_ts_interfaces/data/auth.js +2 -0
- package/dist_ts_interfaces/data/config-events.d.ts +34 -0
- package/dist_ts_interfaces/data/config-events.js +8 -0
- package/dist_ts_interfaces/data/dns-authority.d.ts +98 -0
- package/dist_ts_interfaces/data/dns-authority.js +26 -0
- package/dist_ts_interfaces/data/dns-provider.d.ts +136 -0
- package/dist_ts_interfaces/data/dns-provider.js +41 -0
- package/dist_ts_interfaces/data/dns-record.d.ts +48 -0
- package/dist_ts_interfaces/data/dns-record.js +2 -0
- package/dist_ts_interfaces/data/domain.d.ts +35 -0
- package/dist_ts_interfaces/data/domain.js +2 -0
- package/dist_ts_interfaces/data/email-domain.d.ts +177 -0
- package/dist_ts_interfaces/data/email-domain.js +2 -0
- package/dist_ts_interfaces/data/email-settings.d.ts +68 -0
- package/dist_ts_interfaces/data/email-settings.js +2 -0
- package/dist_ts_interfaces/data/index.d.ts +18 -0
- package/dist_ts_interfaces/data/index.js +19 -0
- package/dist_ts_interfaces/data/remoteingress.d.ts +181 -0
- package/dist_ts_interfaces/data/remoteingress.js +15 -0
- package/dist_ts_interfaces/data/route-management.d.ts +270 -0
- package/dist_ts_interfaces/data/route-management.js +130 -0
- package/dist_ts_interfaces/data/security-policy.d.ts +32 -0
- package/dist_ts_interfaces/data/security-policy.js +2 -0
- package/dist_ts_interfaces/data/smtp-account.d.ts +50 -0
- package/dist_ts_interfaces/data/smtp-account.js +9 -0
- package/dist_ts_interfaces/data/stats.d.ts +283 -0
- package/dist_ts_interfaces/data/stats.js +2 -0
- package/dist_ts_interfaces/data/target-profile.d.ts +30 -0
- package/dist_ts_interfaces/data/target-profile.js +2 -0
- package/dist_ts_interfaces/data/testing.d.ts +191 -0
- package/dist_ts_interfaces/data/testing.js +20 -0
- package/dist_ts_interfaces/data/vpn.d.ts +65 -0
- package/dist_ts_interfaces/data/vpn.js +2 -0
- package/dist_ts_interfaces/data/workhoster.d.ts +63 -0
- package/dist_ts_interfaces/data/workhoster.js +2 -0
- package/dist_ts_interfaces/index.d.ts +5 -0
- package/dist_ts_interfaces/index.js +8 -0
- package/dist_ts_interfaces/plugins.d.ts +2 -0
- package/dist_ts_interfaces/plugins.js +4 -0
- package/dist_ts_interfaces/requests/acme-config.d.ts +42 -0
- package/dist_ts_interfaces/requests/acme-config.js +2 -0
- package/dist_ts_interfaces/requests/admin.d.ts +69 -0
- package/dist_ts_interfaces/requests/admin.js +3 -0
- package/dist_ts_interfaces/requests/api-tokens.d.ts +85 -0
- package/dist_ts_interfaces/requests/api-tokens.js +2 -0
- package/dist_ts_interfaces/requests/certificate.d.ts +87 -0
- package/dist_ts_interfaces/requests/certificate.js +5 -0
- package/dist_ts_interfaces/requests/combined.stats.d.ts +29 -0
- package/dist_ts_interfaces/requests/combined.stats.js +2 -0
- package/dist_ts_interfaces/requests/config-events.d.ts +35 -0
- package/dist_ts_interfaces/requests/config-events.js +4 -0
- package/dist_ts_interfaces/requests/config.d.ts +93 -0
- package/dist_ts_interfaces/requests/config.js +3 -0
- package/dist_ts_interfaces/requests/dns-authority.d.ts +80 -0
- package/dist_ts_interfaces/requests/dns-authority.js +3 -0
- package/dist_ts_interfaces/requests/dns-providers.d.ts +117 -0
- package/dist_ts_interfaces/requests/dns-providers.js +2 -0
- package/dist_ts_interfaces/requests/dns-records.d.ts +89 -0
- package/dist_ts_interfaces/requests/dns-records.js +2 -0
- package/dist_ts_interfaces/requests/domains.d.ts +142 -0
- package/dist_ts_interfaces/requests/domains.js +2 -0
- package/dist_ts_interfaces/requests/email-domains.d.ts +154 -0
- package/dist_ts_interfaces/requests/email-domains.js +2 -0
- package/dist_ts_interfaces/requests/email-ops.d.ts +211 -0
- package/dist_ts_interfaces/requests/email-ops.js +3 -0
- package/dist_ts_interfaces/requests/email-settings.d.ts +26 -0
- package/dist_ts_interfaces/requests/email-settings.js +2 -0
- package/dist_ts_interfaces/requests/index.d.ts +29 -0
- package/dist_ts_interfaces/requests/index.js +30 -0
- package/dist_ts_interfaces/requests/logs.d.ts +43 -0
- package/dist_ts_interfaces/requests/logs.js +4 -0
- package/dist_ts_interfaces/requests/network-targets.d.ts +102 -0
- package/dist_ts_interfaces/requests/network-targets.js +2 -0
- package/dist_ts_interfaces/requests/radius.d.ts +280 -0
- package/dist_ts_interfaces/requests/radius.js +3 -0
- package/dist_ts_interfaces/requests/realtime.d.ts +38 -0
- package/dist_ts_interfaces/requests/realtime.js +12 -0
- package/dist_ts_interfaces/requests/remoteingress.d.ts +162 -0
- package/dist_ts_interfaces/requests/remoteingress.js +3 -0
- package/dist_ts_interfaces/requests/route-management.d.ts +147 -0
- package/dist_ts_interfaces/requests/route-management.js +2 -0
- package/dist_ts_interfaces/requests/security-policy.d.ts +105 -0
- package/dist_ts_interfaces/requests/security-policy.js +2 -0
- package/dist_ts_interfaces/requests/smtp-accounts.d.ts +125 -0
- package/dist_ts_interfaces/requests/smtp-accounts.js +2 -0
- package/dist_ts_interfaces/requests/source-profiles.d.ts +102 -0
- package/dist_ts_interfaces/requests/source-profiles.js +2 -0
- package/dist_ts_interfaces/requests/stats.d.ts +196 -0
- package/dist_ts_interfaces/requests/stats.js +4 -0
- package/dist_ts_interfaces/requests/target-profiles.d.ts +105 -0
- package/dist_ts_interfaces/requests/target-profiles.js +2 -0
- package/dist_ts_interfaces/requests/testing.d.ts +169 -0
- package/dist_ts_interfaces/requests/testing.js +2 -0
- package/dist_ts_interfaces/requests/users.d.ts +53 -0
- package/dist_ts_interfaces/requests/users.js +3 -0
- package/dist_ts_interfaces/requests/vpn.d.ts +188 -0
- package/dist_ts_interfaces/requests/vpn.js +3 -0
- package/dist_ts_interfaces/requests/workhoster.d.ts +79 -0
- package/dist_ts_interfaces/requests/workhoster.js +2 -0
- package/license +21 -0
- package/package.json +67 -0
- package/readme.md +218 -0
- package/ts_apiclient/classes.apitoken.ts +157 -0
- package/ts_apiclient/classes.certificate.ts +124 -0
- package/ts_apiclient/classes.config.ts +17 -0
- package/ts_apiclient/classes.dcrouterapiclient.ts +138 -0
- package/ts_apiclient/classes.email.ts +77 -0
- package/ts_apiclient/classes.gatewayclient.ts +110 -0
- package/ts_apiclient/classes.logs.ts +91 -0
- package/ts_apiclient/classes.radius.ts +180 -0
- package/ts_apiclient/classes.remoteingress.ts +217 -0
- package/ts_apiclient/classes.route.ts +166 -0
- package/ts_apiclient/classes.stats.ts +111 -0
- package/ts_apiclient/classes.testing.ts +152 -0
- package/ts_apiclient/index.ts +17 -0
- package/ts_apiclient/plugins.ts +10 -0
- package/ts_apiclient/readme.md +218 -0
- package/ts_interfaces/data/acme-config.ts +23 -0
- package/ts_interfaces/data/auth.ts +8 -0
- package/ts_interfaces/data/config-events.ts +38 -0
- package/ts_interfaces/data/dns-authority.ts +106 -0
- package/ts_interfaces/data/dns-provider.ts +174 -0
- package/ts_interfaces/data/dns-record.ts +50 -0
- package/ts_interfaces/data/domain.ts +36 -0
- package/ts_interfaces/data/email-domain.ts +206 -0
- package/ts_interfaces/data/email-settings.ts +75 -0
- package/ts_interfaces/data/index.ts +18 -0
- package/ts_interfaces/data/remoteingress.ts +204 -0
- package/ts_interfaces/data/route-management.ts +436 -0
- package/ts_interfaces/data/security-policy.ts +37 -0
- package/ts_interfaces/data/smtp-account.ts +63 -0
- package/ts_interfaces/data/stats.ts +305 -0
- package/ts_interfaces/data/target-profile.ts +31 -0
- package/ts_interfaces/data/testing.ts +184 -0
- package/ts_interfaces/data/vpn.ts +68 -0
- package/ts_interfaces/data/workhoster.ts +72 -0
- package/ts_interfaces/index.ts +9 -0
- package/ts_interfaces/plugins.ts +6 -0
- package/ts_interfaces/readme.md +194 -0
- package/ts_interfaces/requests/acme-config.ts +54 -0
- package/ts_interfaces/requests/admin.ts +96 -0
- package/ts_interfaces/requests/api-tokens.ts +109 -0
- package/ts_interfaces/requests/certificate.ts +106 -0
- package/ts_interfaces/requests/combined.stats.ts +30 -0
- package/ts_interfaces/requests/config-events.ts +45 -0
- package/ts_interfaces/requests/config.ts +94 -0
- package/ts_interfaces/requests/dns-authority.ts +104 -0
- package/ts_interfaces/requests/dns-providers.ts +154 -0
- package/ts_interfaces/requests/dns-records.ts +113 -0
- package/ts_interfaces/requests/domains.ts +178 -0
- package/ts_interfaces/requests/email-domains.ts +193 -0
- package/ts_interfaces/requests/email-ops.ts +266 -0
- package/ts_interfaces/requests/email-settings.ts +34 -0
- package/ts_interfaces/requests/index.ts +29 -0
- package/ts_interfaces/requests/logs.ts +58 -0
- package/ts_interfaces/requests/network-targets.ts +127 -0
- package/ts_interfaces/requests/radius.ts +341 -0
- package/ts_interfaces/requests/realtime.ts +59 -0
- package/ts_interfaces/requests/remoteingress.ts +202 -0
- package/ts_interfaces/requests/route-management.ts +194 -0
- package/ts_interfaces/requests/security-policy.ts +144 -0
- package/ts_interfaces/requests/smtp-accounts.ts +163 -0
- package/ts_interfaces/requests/source-profiles.ts +127 -0
- package/ts_interfaces/requests/stats.ts +207 -0
- package/ts_interfaces/requests/target-profiles.ts +130 -0
- package/ts_interfaces/requests/testing.ts +186 -0
- package/ts_interfaces/requests/users.ts +66 -0
- package/ts_interfaces/requests/vpn.ts +238 -0
- package/ts_interfaces/requests/workhoster.ts +100 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
import type * as authInterfaces from '../data/auth.js';
|
|
3
|
+
import type {
|
|
4
|
+
IHttpRedirectInfo,
|
|
5
|
+
ILetsEncryptHttp01ForwardConfig,
|
|
6
|
+
IMergedRoute,
|
|
7
|
+
IRouteWarning,
|
|
8
|
+
IRouteMetadata,
|
|
9
|
+
} from '../data/route-management.js';
|
|
10
|
+
import type { IRouteConfig } from '@push.rocks/smartproxy';
|
|
11
|
+
import type { IDcRouterRouteConfig } from '../data/remoteingress.js';
|
|
12
|
+
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// Route Management Endpoints
|
|
15
|
+
// ============================================================================
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Get all routes with warnings.
|
|
19
|
+
*/
|
|
20
|
+
export interface IReq_GetMergedRoutes extends plugins.typedrequestInterfaces.implementsTR<
|
|
21
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
22
|
+
IReq_GetMergedRoutes
|
|
23
|
+
> {
|
|
24
|
+
method: 'getMergedRoutes';
|
|
25
|
+
request: {
|
|
26
|
+
identity?: authInterfaces.IIdentity;
|
|
27
|
+
apiToken?: string;
|
|
28
|
+
};
|
|
29
|
+
response: {
|
|
30
|
+
routes: IMergedRoute[];
|
|
31
|
+
warnings: IRouteWarning[];
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get derived HTTP-to-HTTPS redirects.
|
|
37
|
+
*/
|
|
38
|
+
export interface IReq_GetHttpRedirects extends plugins.typedrequestInterfaces.implementsTR<
|
|
39
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
40
|
+
IReq_GetHttpRedirects
|
|
41
|
+
> {
|
|
42
|
+
method: 'getHttpRedirects';
|
|
43
|
+
request: {
|
|
44
|
+
identity?: authInterfaces.IIdentity;
|
|
45
|
+
apiToken?: string;
|
|
46
|
+
};
|
|
47
|
+
response: {
|
|
48
|
+
redirects: IHttpRedirectInfo[];
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Create a new route.
|
|
54
|
+
*/
|
|
55
|
+
export interface IReq_CreateRoute extends plugins.typedrequestInterfaces.implementsTR<
|
|
56
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
57
|
+
IReq_CreateRoute
|
|
58
|
+
> {
|
|
59
|
+
method: 'createRoute';
|
|
60
|
+
request: {
|
|
61
|
+
identity?: authInterfaces.IIdentity;
|
|
62
|
+
apiToken?: string;
|
|
63
|
+
route: IDcRouterRouteConfig;
|
|
64
|
+
enabled?: boolean;
|
|
65
|
+
metadata?: IRouteMetadata;
|
|
66
|
+
};
|
|
67
|
+
response: {
|
|
68
|
+
success: boolean;
|
|
69
|
+
routeId?: string;
|
|
70
|
+
message?: string;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Update a route.
|
|
76
|
+
*/
|
|
77
|
+
export interface IReq_UpdateRoute extends plugins.typedrequestInterfaces.implementsTR<
|
|
78
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
79
|
+
IReq_UpdateRoute
|
|
80
|
+
> {
|
|
81
|
+
method: 'updateRoute';
|
|
82
|
+
request: {
|
|
83
|
+
identity?: authInterfaces.IIdentity;
|
|
84
|
+
apiToken?: string;
|
|
85
|
+
id: string;
|
|
86
|
+
route?: Partial<IDcRouterRouteConfig>;
|
|
87
|
+
enabled?: boolean;
|
|
88
|
+
metadata?: Partial<IRouteMetadata>;
|
|
89
|
+
};
|
|
90
|
+
response: {
|
|
91
|
+
success: boolean;
|
|
92
|
+
message?: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Delete a route.
|
|
98
|
+
*/
|
|
99
|
+
export interface IReq_DeleteRoute extends plugins.typedrequestInterfaces.implementsTR<
|
|
100
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
101
|
+
IReq_DeleteRoute
|
|
102
|
+
> {
|
|
103
|
+
method: 'deleteRoute';
|
|
104
|
+
request: {
|
|
105
|
+
identity?: authInterfaces.IIdentity;
|
|
106
|
+
apiToken?: string;
|
|
107
|
+
id: string;
|
|
108
|
+
};
|
|
109
|
+
response: {
|
|
110
|
+
success: boolean;
|
|
111
|
+
message?: string;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Toggle a route on/off by id.
|
|
117
|
+
*/
|
|
118
|
+
export interface IReq_ToggleRoute extends plugins.typedrequestInterfaces.implementsTR<
|
|
119
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
120
|
+
IReq_ToggleRoute
|
|
121
|
+
> {
|
|
122
|
+
method: 'toggleRoute';
|
|
123
|
+
request: {
|
|
124
|
+
identity?: authInterfaces.IIdentity;
|
|
125
|
+
apiToken?: string;
|
|
126
|
+
id: string;
|
|
127
|
+
enabled: boolean;
|
|
128
|
+
};
|
|
129
|
+
response: {
|
|
130
|
+
success: boolean;
|
|
131
|
+
message?: string;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Create a server-managed Let's Encrypt HTTP-01 forward.
|
|
137
|
+
*/
|
|
138
|
+
export interface IReq_CreateLetsEncryptHttp01Forward extends plugins.typedrequestInterfaces.implementsTR<
|
|
139
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
140
|
+
IReq_CreateLetsEncryptHttp01Forward
|
|
141
|
+
> {
|
|
142
|
+
method: 'createLetsEncryptHttp01Forward';
|
|
143
|
+
request: {
|
|
144
|
+
identity?: authInterfaces.IIdentity;
|
|
145
|
+
apiToken?: string;
|
|
146
|
+
config: ILetsEncryptHttp01ForwardConfig;
|
|
147
|
+
enabled?: boolean;
|
|
148
|
+
};
|
|
149
|
+
response: {
|
|
150
|
+
success: boolean;
|
|
151
|
+
routeId?: string;
|
|
152
|
+
message?: string;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Update a server-managed Let's Encrypt HTTP-01 forward.
|
|
158
|
+
*/
|
|
159
|
+
export interface IReq_UpdateLetsEncryptHttp01Forward extends plugins.typedrequestInterfaces.implementsTR<
|
|
160
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
161
|
+
IReq_UpdateLetsEncryptHttp01Forward
|
|
162
|
+
> {
|
|
163
|
+
method: 'updateLetsEncryptHttp01Forward';
|
|
164
|
+
request: {
|
|
165
|
+
identity?: authInterfaces.IIdentity;
|
|
166
|
+
apiToken?: string;
|
|
167
|
+
id: string;
|
|
168
|
+
config: ILetsEncryptHttp01ForwardConfig;
|
|
169
|
+
enabled?: boolean;
|
|
170
|
+
};
|
|
171
|
+
response: {
|
|
172
|
+
success: boolean;
|
|
173
|
+
message?: string;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Delete a server-managed Let's Encrypt HTTP-01 forward.
|
|
179
|
+
*/
|
|
180
|
+
export interface IReq_DeleteLetsEncryptHttp01Forward extends plugins.typedrequestInterfaces.implementsTR<
|
|
181
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
182
|
+
IReq_DeleteLetsEncryptHttp01Forward
|
|
183
|
+
> {
|
|
184
|
+
method: 'deleteLetsEncryptHttp01Forward';
|
|
185
|
+
request: {
|
|
186
|
+
identity?: authInterfaces.IIdentity;
|
|
187
|
+
apiToken?: string;
|
|
188
|
+
id: string;
|
|
189
|
+
};
|
|
190
|
+
response: {
|
|
191
|
+
success: boolean;
|
|
192
|
+
message?: string;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
import type * as authInterfaces from '../data/auth.js';
|
|
3
|
+
import type {
|
|
4
|
+
IIpIntelligenceRecord,
|
|
5
|
+
ISecurityBlockRule,
|
|
6
|
+
ISecurityCompiledPolicy,
|
|
7
|
+
ISecurityPolicyAuditEvent,
|
|
8
|
+
TSecurityBlockRuleMatchMode,
|
|
9
|
+
TSecurityBlockRuleType,
|
|
10
|
+
} from '../data/security-policy.js';
|
|
11
|
+
|
|
12
|
+
export interface IReq_ListSecurityBlockRules extends plugins.typedrequestInterfaces.implementsTR<
|
|
13
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
14
|
+
IReq_ListSecurityBlockRules
|
|
15
|
+
> {
|
|
16
|
+
method: 'listSecurityBlockRules';
|
|
17
|
+
request: {
|
|
18
|
+
identity?: authInterfaces.IIdentity;
|
|
19
|
+
apiToken?: string;
|
|
20
|
+
};
|
|
21
|
+
response: {
|
|
22
|
+
rules: ISecurityBlockRule[];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IReq_CreateSecurityBlockRule extends plugins.typedrequestInterfaces.implementsTR<
|
|
27
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
28
|
+
IReq_CreateSecurityBlockRule
|
|
29
|
+
> {
|
|
30
|
+
method: 'createSecurityBlockRule';
|
|
31
|
+
request: {
|
|
32
|
+
identity?: authInterfaces.IIdentity;
|
|
33
|
+
apiToken?: string;
|
|
34
|
+
type: TSecurityBlockRuleType;
|
|
35
|
+
value: string;
|
|
36
|
+
matchMode?: TSecurityBlockRuleMatchMode;
|
|
37
|
+
reason?: string;
|
|
38
|
+
enabled?: boolean;
|
|
39
|
+
};
|
|
40
|
+
response: {
|
|
41
|
+
success: boolean;
|
|
42
|
+
rule?: ISecurityBlockRule;
|
|
43
|
+
message?: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface IReq_UpdateSecurityBlockRule extends plugins.typedrequestInterfaces.implementsTR<
|
|
48
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
49
|
+
IReq_UpdateSecurityBlockRule
|
|
50
|
+
> {
|
|
51
|
+
method: 'updateSecurityBlockRule';
|
|
52
|
+
request: {
|
|
53
|
+
identity?: authInterfaces.IIdentity;
|
|
54
|
+
apiToken?: string;
|
|
55
|
+
id: string;
|
|
56
|
+
value?: string;
|
|
57
|
+
matchMode?: TSecurityBlockRuleMatchMode;
|
|
58
|
+
reason?: string;
|
|
59
|
+
enabled?: boolean;
|
|
60
|
+
};
|
|
61
|
+
response: {
|
|
62
|
+
success: boolean;
|
|
63
|
+
rule?: ISecurityBlockRule;
|
|
64
|
+
message?: string;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface IReq_DeleteSecurityBlockRule extends plugins.typedrequestInterfaces.implementsTR<
|
|
69
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
70
|
+
IReq_DeleteSecurityBlockRule
|
|
71
|
+
> {
|
|
72
|
+
method: 'deleteSecurityBlockRule';
|
|
73
|
+
request: {
|
|
74
|
+
identity?: authInterfaces.IIdentity;
|
|
75
|
+
apiToken?: string;
|
|
76
|
+
id: string;
|
|
77
|
+
};
|
|
78
|
+
response: {
|
|
79
|
+
success: boolean;
|
|
80
|
+
message?: string;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface IReq_ListIpIntelligence extends plugins.typedrequestInterfaces.implementsTR<
|
|
85
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
86
|
+
IReq_ListIpIntelligence
|
|
87
|
+
> {
|
|
88
|
+
method: 'listIpIntelligence';
|
|
89
|
+
request: {
|
|
90
|
+
identity?: authInterfaces.IIdentity;
|
|
91
|
+
apiToken?: string;
|
|
92
|
+
ipAddresses?: string[];
|
|
93
|
+
limit?: number;
|
|
94
|
+
};
|
|
95
|
+
response: {
|
|
96
|
+
records: IIpIntelligenceRecord[];
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface IReq_GetCompiledSecurityPolicy extends plugins.typedrequestInterfaces.implementsTR<
|
|
101
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
102
|
+
IReq_GetCompiledSecurityPolicy
|
|
103
|
+
> {
|
|
104
|
+
method: 'getCompiledSecurityPolicy';
|
|
105
|
+
request: {
|
|
106
|
+
identity?: authInterfaces.IIdentity;
|
|
107
|
+
apiToken?: string;
|
|
108
|
+
};
|
|
109
|
+
response: {
|
|
110
|
+
policy: ISecurityCompiledPolicy;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface IReq_ListSecurityPolicyAudit extends plugins.typedrequestInterfaces.implementsTR<
|
|
115
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
116
|
+
IReq_ListSecurityPolicyAudit
|
|
117
|
+
> {
|
|
118
|
+
method: 'listSecurityPolicyAudit';
|
|
119
|
+
request: {
|
|
120
|
+
identity?: authInterfaces.IIdentity;
|
|
121
|
+
apiToken?: string;
|
|
122
|
+
limit?: number;
|
|
123
|
+
};
|
|
124
|
+
response: {
|
|
125
|
+
events: ISecurityPolicyAuditEvent[];
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface IReq_RefreshIpIntelligence extends plugins.typedrequestInterfaces.implementsTR<
|
|
130
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
131
|
+
IReq_RefreshIpIntelligence
|
|
132
|
+
> {
|
|
133
|
+
method: 'refreshIpIntelligence';
|
|
134
|
+
request: {
|
|
135
|
+
identity?: authInterfaces.IIdentity;
|
|
136
|
+
apiToken?: string;
|
|
137
|
+
ipAddress: string;
|
|
138
|
+
};
|
|
139
|
+
response: {
|
|
140
|
+
success: boolean;
|
|
141
|
+
record?: IIpIntelligenceRecord;
|
|
142
|
+
message?: string;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
import type * as authInterfaces from '../data/auth.js';
|
|
3
|
+
import type {
|
|
4
|
+
ISmtpAccountInfo,
|
|
5
|
+
ISmtpAccountMailPolicy,
|
|
6
|
+
ISmtpAccountRecipientScope,
|
|
7
|
+
ISmtpAccountSenderScope,
|
|
8
|
+
} from '../data/smtp-account.js';
|
|
9
|
+
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// SMTP Account Endpoints
|
|
12
|
+
// ============================================================================
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Shared mutation result. `warnings` carries non-blocking findings such as
|
|
16
|
+
* sender domains that are not managed email domains (warn-and-allow).
|
|
17
|
+
*/
|
|
18
|
+
export interface ISmtpAccountActionResult {
|
|
19
|
+
success: boolean;
|
|
20
|
+
message?: string;
|
|
21
|
+
code?: string;
|
|
22
|
+
warnings?: string[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* List all SMTP submission accounts (never includes credentials).
|
|
27
|
+
*/
|
|
28
|
+
export interface IReq_GetSmtpAccounts extends plugins.typedrequestInterfaces.implementsTR<
|
|
29
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
30
|
+
IReq_GetSmtpAccounts
|
|
31
|
+
> {
|
|
32
|
+
method: 'getSmtpAccounts';
|
|
33
|
+
request: {
|
|
34
|
+
identity?: authInterfaces.IIdentity;
|
|
35
|
+
apiToken?: string;
|
|
36
|
+
};
|
|
37
|
+
response: {
|
|
38
|
+
accounts: ISmtpAccountInfo[];
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Create an SMTP submission account. The password is machine-generated and
|
|
44
|
+
* returned exactly once in this response; only a SCRAM verifier is persisted.
|
|
45
|
+
*/
|
|
46
|
+
export interface IReq_CreateSmtpAccount extends plugins.typedrequestInterfaces.implementsTR<
|
|
47
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
48
|
+
IReq_CreateSmtpAccount
|
|
49
|
+
> {
|
|
50
|
+
method: 'createSmtpAccount';
|
|
51
|
+
request: {
|
|
52
|
+
identity?: authInterfaces.IIdentity;
|
|
53
|
+
apiToken?: string;
|
|
54
|
+
username: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
senderScope?: ISmtpAccountSenderScope;
|
|
57
|
+
recipientScope?: ISmtpAccountRecipientScope;
|
|
58
|
+
mailPolicy?: ISmtpAccountMailPolicy;
|
|
59
|
+
};
|
|
60
|
+
response: ISmtpAccountActionResult & {
|
|
61
|
+
account?: ISmtpAccountInfo;
|
|
62
|
+
/** Shown once; never retrievable again. */
|
|
63
|
+
password?: string;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Update an SMTP account's description, scopes, or mail policy.
|
|
69
|
+
*/
|
|
70
|
+
export interface IReq_UpdateSmtpAccount extends plugins.typedrequestInterfaces.implementsTR<
|
|
71
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
72
|
+
IReq_UpdateSmtpAccount
|
|
73
|
+
> {
|
|
74
|
+
method: 'updateSmtpAccount';
|
|
75
|
+
request: {
|
|
76
|
+
identity?: authInterfaces.IIdentity;
|
|
77
|
+
apiToken?: string;
|
|
78
|
+
id: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
senderScope?: ISmtpAccountSenderScope;
|
|
81
|
+
recipientScope?: ISmtpAccountRecipientScope;
|
|
82
|
+
mailPolicy?: ISmtpAccountMailPolicy;
|
|
83
|
+
};
|
|
84
|
+
response: ISmtpAccountActionResult & {
|
|
85
|
+
account?: ISmtpAccountInfo;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Enable or disable an SMTP account. Disabled accounts always fail
|
|
91
|
+
* authentication (and still shadow same-named legacy static users).
|
|
92
|
+
*/
|
|
93
|
+
export interface IReq_ToggleSmtpAccount extends plugins.typedrequestInterfaces.implementsTR<
|
|
94
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
95
|
+
IReq_ToggleSmtpAccount
|
|
96
|
+
> {
|
|
97
|
+
method: 'toggleSmtpAccount';
|
|
98
|
+
request: {
|
|
99
|
+
identity?: authInterfaces.IIdentity;
|
|
100
|
+
apiToken?: string;
|
|
101
|
+
id: string;
|
|
102
|
+
enabled: boolean;
|
|
103
|
+
};
|
|
104
|
+
response: ISmtpAccountActionResult & {
|
|
105
|
+
account?: ISmtpAccountInfo;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Rotate an SMTP account's password. The new password is returned exactly
|
|
111
|
+
* once; the previous credential stops working immediately.
|
|
112
|
+
*/
|
|
113
|
+
export interface IReq_RotateSmtpAccountPassword extends plugins.typedrequestInterfaces.implementsTR<
|
|
114
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
115
|
+
IReq_RotateSmtpAccountPassword
|
|
116
|
+
> {
|
|
117
|
+
method: 'rotateSmtpAccountPassword';
|
|
118
|
+
request: {
|
|
119
|
+
identity?: authInterfaces.IIdentity;
|
|
120
|
+
apiToken?: string;
|
|
121
|
+
id: string;
|
|
122
|
+
};
|
|
123
|
+
response: ISmtpAccountActionResult & {
|
|
124
|
+
account?: ISmtpAccountInfo;
|
|
125
|
+
/** Shown once; never retrievable again. */
|
|
126
|
+
password?: string;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Delete an SMTP account.
|
|
132
|
+
*/
|
|
133
|
+
export interface IReq_DeleteSmtpAccount extends plugins.typedrequestInterfaces.implementsTR<
|
|
134
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
135
|
+
IReq_DeleteSmtpAccount
|
|
136
|
+
> {
|
|
137
|
+
method: 'deleteSmtpAccount';
|
|
138
|
+
request: {
|
|
139
|
+
identity?: authInterfaces.IIdentity;
|
|
140
|
+
apiToken?: string;
|
|
141
|
+
id: string;
|
|
142
|
+
};
|
|
143
|
+
response: ISmtpAccountActionResult;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Remove a named legacy route from the persisted email server settings
|
|
148
|
+
* (EmailServerSettingsDoc.emailConfig.routes) — the retirement lever for
|
|
149
|
+
* legacy internal-relay routes once scoped SMTP accounts replace them.
|
|
150
|
+
* Applies through the standard email settings restart path.
|
|
151
|
+
*/
|
|
152
|
+
export interface IReq_RemoveLegacyEmailRoute extends plugins.typedrequestInterfaces.implementsTR<
|
|
153
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
154
|
+
IReq_RemoveLegacyEmailRoute
|
|
155
|
+
> {
|
|
156
|
+
method: 'removeLegacyEmailRoute';
|
|
157
|
+
request: {
|
|
158
|
+
identity?: authInterfaces.IIdentity;
|
|
159
|
+
apiToken?: string;
|
|
160
|
+
routeName: string;
|
|
161
|
+
};
|
|
162
|
+
response: ISmtpAccountActionResult;
|
|
163
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
import type * as authInterfaces from '../data/auth.js';
|
|
3
|
+
import type { ISourceProfile, IRouteSecurity } from '../data/route-management.js';
|
|
4
|
+
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// Source Profile Endpoints (source-side: who can access)
|
|
7
|
+
// ============================================================================
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Get all source profiles.
|
|
11
|
+
*/
|
|
12
|
+
export interface IReq_GetSourceProfiles extends plugins.typedrequestInterfaces.implementsTR<
|
|
13
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
14
|
+
IReq_GetSourceProfiles
|
|
15
|
+
> {
|
|
16
|
+
method: 'getSourceProfiles';
|
|
17
|
+
request: {
|
|
18
|
+
identity?: authInterfaces.IIdentity;
|
|
19
|
+
apiToken?: string;
|
|
20
|
+
};
|
|
21
|
+
response: {
|
|
22
|
+
profiles: ISourceProfile[];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get a single source profile by ID.
|
|
28
|
+
*/
|
|
29
|
+
export interface IReq_GetSourceProfile extends plugins.typedrequestInterfaces.implementsTR<
|
|
30
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
31
|
+
IReq_GetSourceProfile
|
|
32
|
+
> {
|
|
33
|
+
method: 'getSourceProfile';
|
|
34
|
+
request: {
|
|
35
|
+
identity?: authInterfaces.IIdentity;
|
|
36
|
+
apiToken?: string;
|
|
37
|
+
id: string;
|
|
38
|
+
};
|
|
39
|
+
response: {
|
|
40
|
+
profile: ISourceProfile | null;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Create a new source profile.
|
|
46
|
+
*/
|
|
47
|
+
export interface IReq_CreateSourceProfile extends plugins.typedrequestInterfaces.implementsTR<
|
|
48
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
49
|
+
IReq_CreateSourceProfile
|
|
50
|
+
> {
|
|
51
|
+
method: 'createSourceProfile';
|
|
52
|
+
request: {
|
|
53
|
+
identity?: authInterfaces.IIdentity;
|
|
54
|
+
apiToken?: string;
|
|
55
|
+
name: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
security: IRouteSecurity;
|
|
58
|
+
extendsProfiles?: string[];
|
|
59
|
+
};
|
|
60
|
+
response: {
|
|
61
|
+
success: boolean;
|
|
62
|
+
id?: string;
|
|
63
|
+
message?: string;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Update a source profile.
|
|
69
|
+
*/
|
|
70
|
+
export interface IReq_UpdateSourceProfile extends plugins.typedrequestInterfaces.implementsTR<
|
|
71
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
72
|
+
IReq_UpdateSourceProfile
|
|
73
|
+
> {
|
|
74
|
+
method: 'updateSourceProfile';
|
|
75
|
+
request: {
|
|
76
|
+
identity?: authInterfaces.IIdentity;
|
|
77
|
+
apiToken?: string;
|
|
78
|
+
id: string;
|
|
79
|
+
name?: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
security?: IRouteSecurity;
|
|
82
|
+
extendsProfiles?: string[];
|
|
83
|
+
};
|
|
84
|
+
response: {
|
|
85
|
+
success: boolean;
|
|
86
|
+
affectedRouteCount?: number;
|
|
87
|
+
message?: string;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Delete a source profile.
|
|
93
|
+
*/
|
|
94
|
+
export interface IReq_DeleteSourceProfile extends plugins.typedrequestInterfaces.implementsTR<
|
|
95
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
96
|
+
IReq_DeleteSourceProfile
|
|
97
|
+
> {
|
|
98
|
+
method: 'deleteSourceProfile';
|
|
99
|
+
request: {
|
|
100
|
+
identity?: authInterfaces.IIdentity;
|
|
101
|
+
apiToken?: string;
|
|
102
|
+
id: string;
|
|
103
|
+
force?: boolean;
|
|
104
|
+
};
|
|
105
|
+
response: {
|
|
106
|
+
success: boolean;
|
|
107
|
+
message?: string;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Get which routes reference a source profile.
|
|
113
|
+
*/
|
|
114
|
+
export interface IReq_GetSourceProfileUsage extends plugins.typedrequestInterfaces.implementsTR<
|
|
115
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
116
|
+
IReq_GetSourceProfileUsage
|
|
117
|
+
> {
|
|
118
|
+
method: 'getSourceProfileUsage';
|
|
119
|
+
request: {
|
|
120
|
+
identity?: authInterfaces.IIdentity;
|
|
121
|
+
apiToken?: string;
|
|
122
|
+
id: string;
|
|
123
|
+
};
|
|
124
|
+
response: {
|
|
125
|
+
routes: Array<{ id: string; name: string }>;
|
|
126
|
+
};
|
|
127
|
+
}
|