@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.
Files changed (200) hide show
  1. package/dist_ts_apiclient/classes.apitoken.d.ts +41 -0
  2. package/dist_ts_apiclient/classes.apitoken.js +115 -0
  3. package/dist_ts_apiclient/classes.certificate.d.ts +57 -0
  4. package/dist_ts_apiclient/classes.certificate.js +69 -0
  5. package/dist_ts_apiclient/classes.config.d.ts +7 -0
  6. package/dist_ts_apiclient/classes.config.js +11 -0
  7. package/dist_ts_apiclient/classes.dcrouterapiclient.d.ts +54 -0
  8. package/dist_ts_apiclient/classes.dcrouterapiclient.js +97 -0
  9. package/dist_ts_apiclient/classes.email.d.ts +30 -0
  10. package/dist_ts_apiclient/classes.email.js +52 -0
  11. package/dist_ts_apiclient/classes.gatewayclient.d.ts +28 -0
  12. package/dist_ts_apiclient/classes.gatewayclient.js +52 -0
  13. package/dist_ts_apiclient/classes.logs.d.ts +28 -0
  14. package/dist_ts_apiclient/classes.logs.js +69 -0
  15. package/dist_ts_apiclient/classes.radius.d.ts +59 -0
  16. package/dist_ts_apiclient/classes.radius.js +95 -0
  17. package/dist_ts_apiclient/classes.remoteingress.d.ts +66 -0
  18. package/dist_ts_apiclient/classes.remoteingress.js +164 -0
  19. package/dist_ts_apiclient/classes.route.d.ts +39 -0
  20. package/dist_ts_apiclient/classes.route.js +125 -0
  21. package/dist_ts_apiclient/classes.stats.d.ts +47 -0
  22. package/dist_ts_apiclient/classes.stats.js +38 -0
  23. package/dist_ts_apiclient/classes.testing.d.ts +65 -0
  24. package/dist_ts_apiclient/classes.testing.js +120 -0
  25. package/dist_ts_apiclient/index.d.ts +12 -0
  26. package/dist_ts_apiclient/index.js +16 -0
  27. package/dist_ts_apiclient/plugins.d.ts +4 -0
  28. package/dist_ts_apiclient/plugins.js +6 -0
  29. package/dist_ts_interfaces/data/acme-config.d.ts +23 -0
  30. package/dist_ts_interfaces/data/acme-config.js +2 -0
  31. package/dist_ts_interfaces/data/auth.d.ts +8 -0
  32. package/dist_ts_interfaces/data/auth.js +2 -0
  33. package/dist_ts_interfaces/data/config-events.d.ts +34 -0
  34. package/dist_ts_interfaces/data/config-events.js +8 -0
  35. package/dist_ts_interfaces/data/dns-authority.d.ts +98 -0
  36. package/dist_ts_interfaces/data/dns-authority.js +26 -0
  37. package/dist_ts_interfaces/data/dns-provider.d.ts +136 -0
  38. package/dist_ts_interfaces/data/dns-provider.js +41 -0
  39. package/dist_ts_interfaces/data/dns-record.d.ts +48 -0
  40. package/dist_ts_interfaces/data/dns-record.js +2 -0
  41. package/dist_ts_interfaces/data/domain.d.ts +35 -0
  42. package/dist_ts_interfaces/data/domain.js +2 -0
  43. package/dist_ts_interfaces/data/email-domain.d.ts +177 -0
  44. package/dist_ts_interfaces/data/email-domain.js +2 -0
  45. package/dist_ts_interfaces/data/email-settings.d.ts +68 -0
  46. package/dist_ts_interfaces/data/email-settings.js +2 -0
  47. package/dist_ts_interfaces/data/index.d.ts +18 -0
  48. package/dist_ts_interfaces/data/index.js +19 -0
  49. package/dist_ts_interfaces/data/remoteingress.d.ts +181 -0
  50. package/dist_ts_interfaces/data/remoteingress.js +15 -0
  51. package/dist_ts_interfaces/data/route-management.d.ts +270 -0
  52. package/dist_ts_interfaces/data/route-management.js +130 -0
  53. package/dist_ts_interfaces/data/security-policy.d.ts +32 -0
  54. package/dist_ts_interfaces/data/security-policy.js +2 -0
  55. package/dist_ts_interfaces/data/smtp-account.d.ts +50 -0
  56. package/dist_ts_interfaces/data/smtp-account.js +9 -0
  57. package/dist_ts_interfaces/data/stats.d.ts +283 -0
  58. package/dist_ts_interfaces/data/stats.js +2 -0
  59. package/dist_ts_interfaces/data/target-profile.d.ts +30 -0
  60. package/dist_ts_interfaces/data/target-profile.js +2 -0
  61. package/dist_ts_interfaces/data/testing.d.ts +191 -0
  62. package/dist_ts_interfaces/data/testing.js +20 -0
  63. package/dist_ts_interfaces/data/vpn.d.ts +65 -0
  64. package/dist_ts_interfaces/data/vpn.js +2 -0
  65. package/dist_ts_interfaces/data/workhoster.d.ts +63 -0
  66. package/dist_ts_interfaces/data/workhoster.js +2 -0
  67. package/dist_ts_interfaces/index.d.ts +5 -0
  68. package/dist_ts_interfaces/index.js +8 -0
  69. package/dist_ts_interfaces/plugins.d.ts +2 -0
  70. package/dist_ts_interfaces/plugins.js +4 -0
  71. package/dist_ts_interfaces/requests/acme-config.d.ts +42 -0
  72. package/dist_ts_interfaces/requests/acme-config.js +2 -0
  73. package/dist_ts_interfaces/requests/admin.d.ts +69 -0
  74. package/dist_ts_interfaces/requests/admin.js +3 -0
  75. package/dist_ts_interfaces/requests/api-tokens.d.ts +85 -0
  76. package/dist_ts_interfaces/requests/api-tokens.js +2 -0
  77. package/dist_ts_interfaces/requests/certificate.d.ts +87 -0
  78. package/dist_ts_interfaces/requests/certificate.js +5 -0
  79. package/dist_ts_interfaces/requests/combined.stats.d.ts +29 -0
  80. package/dist_ts_interfaces/requests/combined.stats.js +2 -0
  81. package/dist_ts_interfaces/requests/config-events.d.ts +35 -0
  82. package/dist_ts_interfaces/requests/config-events.js +4 -0
  83. package/dist_ts_interfaces/requests/config.d.ts +93 -0
  84. package/dist_ts_interfaces/requests/config.js +3 -0
  85. package/dist_ts_interfaces/requests/dns-authority.d.ts +80 -0
  86. package/dist_ts_interfaces/requests/dns-authority.js +3 -0
  87. package/dist_ts_interfaces/requests/dns-providers.d.ts +117 -0
  88. package/dist_ts_interfaces/requests/dns-providers.js +2 -0
  89. package/dist_ts_interfaces/requests/dns-records.d.ts +89 -0
  90. package/dist_ts_interfaces/requests/dns-records.js +2 -0
  91. package/dist_ts_interfaces/requests/domains.d.ts +142 -0
  92. package/dist_ts_interfaces/requests/domains.js +2 -0
  93. package/dist_ts_interfaces/requests/email-domains.d.ts +154 -0
  94. package/dist_ts_interfaces/requests/email-domains.js +2 -0
  95. package/dist_ts_interfaces/requests/email-ops.d.ts +211 -0
  96. package/dist_ts_interfaces/requests/email-ops.js +3 -0
  97. package/dist_ts_interfaces/requests/email-settings.d.ts +26 -0
  98. package/dist_ts_interfaces/requests/email-settings.js +2 -0
  99. package/dist_ts_interfaces/requests/index.d.ts +29 -0
  100. package/dist_ts_interfaces/requests/index.js +30 -0
  101. package/dist_ts_interfaces/requests/logs.d.ts +43 -0
  102. package/dist_ts_interfaces/requests/logs.js +4 -0
  103. package/dist_ts_interfaces/requests/network-targets.d.ts +102 -0
  104. package/dist_ts_interfaces/requests/network-targets.js +2 -0
  105. package/dist_ts_interfaces/requests/radius.d.ts +280 -0
  106. package/dist_ts_interfaces/requests/radius.js +3 -0
  107. package/dist_ts_interfaces/requests/realtime.d.ts +38 -0
  108. package/dist_ts_interfaces/requests/realtime.js +12 -0
  109. package/dist_ts_interfaces/requests/remoteingress.d.ts +162 -0
  110. package/dist_ts_interfaces/requests/remoteingress.js +3 -0
  111. package/dist_ts_interfaces/requests/route-management.d.ts +147 -0
  112. package/dist_ts_interfaces/requests/route-management.js +2 -0
  113. package/dist_ts_interfaces/requests/security-policy.d.ts +105 -0
  114. package/dist_ts_interfaces/requests/security-policy.js +2 -0
  115. package/dist_ts_interfaces/requests/smtp-accounts.d.ts +125 -0
  116. package/dist_ts_interfaces/requests/smtp-accounts.js +2 -0
  117. package/dist_ts_interfaces/requests/source-profiles.d.ts +102 -0
  118. package/dist_ts_interfaces/requests/source-profiles.js +2 -0
  119. package/dist_ts_interfaces/requests/stats.d.ts +196 -0
  120. package/dist_ts_interfaces/requests/stats.js +4 -0
  121. package/dist_ts_interfaces/requests/target-profiles.d.ts +105 -0
  122. package/dist_ts_interfaces/requests/target-profiles.js +2 -0
  123. package/dist_ts_interfaces/requests/testing.d.ts +169 -0
  124. package/dist_ts_interfaces/requests/testing.js +2 -0
  125. package/dist_ts_interfaces/requests/users.d.ts +53 -0
  126. package/dist_ts_interfaces/requests/users.js +3 -0
  127. package/dist_ts_interfaces/requests/vpn.d.ts +188 -0
  128. package/dist_ts_interfaces/requests/vpn.js +3 -0
  129. package/dist_ts_interfaces/requests/workhoster.d.ts +79 -0
  130. package/dist_ts_interfaces/requests/workhoster.js +2 -0
  131. package/license +21 -0
  132. package/package.json +67 -0
  133. package/readme.md +218 -0
  134. package/ts_apiclient/classes.apitoken.ts +157 -0
  135. package/ts_apiclient/classes.certificate.ts +124 -0
  136. package/ts_apiclient/classes.config.ts +17 -0
  137. package/ts_apiclient/classes.dcrouterapiclient.ts +138 -0
  138. package/ts_apiclient/classes.email.ts +77 -0
  139. package/ts_apiclient/classes.gatewayclient.ts +110 -0
  140. package/ts_apiclient/classes.logs.ts +91 -0
  141. package/ts_apiclient/classes.radius.ts +180 -0
  142. package/ts_apiclient/classes.remoteingress.ts +217 -0
  143. package/ts_apiclient/classes.route.ts +166 -0
  144. package/ts_apiclient/classes.stats.ts +111 -0
  145. package/ts_apiclient/classes.testing.ts +152 -0
  146. package/ts_apiclient/index.ts +17 -0
  147. package/ts_apiclient/plugins.ts +10 -0
  148. package/ts_apiclient/readme.md +218 -0
  149. package/ts_interfaces/data/acme-config.ts +23 -0
  150. package/ts_interfaces/data/auth.ts +8 -0
  151. package/ts_interfaces/data/config-events.ts +38 -0
  152. package/ts_interfaces/data/dns-authority.ts +106 -0
  153. package/ts_interfaces/data/dns-provider.ts +174 -0
  154. package/ts_interfaces/data/dns-record.ts +50 -0
  155. package/ts_interfaces/data/domain.ts +36 -0
  156. package/ts_interfaces/data/email-domain.ts +206 -0
  157. package/ts_interfaces/data/email-settings.ts +75 -0
  158. package/ts_interfaces/data/index.ts +18 -0
  159. package/ts_interfaces/data/remoteingress.ts +204 -0
  160. package/ts_interfaces/data/route-management.ts +436 -0
  161. package/ts_interfaces/data/security-policy.ts +37 -0
  162. package/ts_interfaces/data/smtp-account.ts +63 -0
  163. package/ts_interfaces/data/stats.ts +305 -0
  164. package/ts_interfaces/data/target-profile.ts +31 -0
  165. package/ts_interfaces/data/testing.ts +184 -0
  166. package/ts_interfaces/data/vpn.ts +68 -0
  167. package/ts_interfaces/data/workhoster.ts +72 -0
  168. package/ts_interfaces/index.ts +9 -0
  169. package/ts_interfaces/plugins.ts +6 -0
  170. package/ts_interfaces/readme.md +194 -0
  171. package/ts_interfaces/requests/acme-config.ts +54 -0
  172. package/ts_interfaces/requests/admin.ts +96 -0
  173. package/ts_interfaces/requests/api-tokens.ts +109 -0
  174. package/ts_interfaces/requests/certificate.ts +106 -0
  175. package/ts_interfaces/requests/combined.stats.ts +30 -0
  176. package/ts_interfaces/requests/config-events.ts +45 -0
  177. package/ts_interfaces/requests/config.ts +94 -0
  178. package/ts_interfaces/requests/dns-authority.ts +104 -0
  179. package/ts_interfaces/requests/dns-providers.ts +154 -0
  180. package/ts_interfaces/requests/dns-records.ts +113 -0
  181. package/ts_interfaces/requests/domains.ts +178 -0
  182. package/ts_interfaces/requests/email-domains.ts +193 -0
  183. package/ts_interfaces/requests/email-ops.ts +266 -0
  184. package/ts_interfaces/requests/email-settings.ts +34 -0
  185. package/ts_interfaces/requests/index.ts +29 -0
  186. package/ts_interfaces/requests/logs.ts +58 -0
  187. package/ts_interfaces/requests/network-targets.ts +127 -0
  188. package/ts_interfaces/requests/radius.ts +341 -0
  189. package/ts_interfaces/requests/realtime.ts +59 -0
  190. package/ts_interfaces/requests/remoteingress.ts +202 -0
  191. package/ts_interfaces/requests/route-management.ts +194 -0
  192. package/ts_interfaces/requests/security-policy.ts +144 -0
  193. package/ts_interfaces/requests/smtp-accounts.ts +163 -0
  194. package/ts_interfaces/requests/source-profiles.ts +127 -0
  195. package/ts_interfaces/requests/stats.ts +207 -0
  196. package/ts_interfaces/requests/target-profiles.ts +130 -0
  197. package/ts_interfaces/requests/testing.ts +186 -0
  198. package/ts_interfaces/requests/users.ts +66 -0
  199. package/ts_interfaces/requests/vpn.ts +238 -0
  200. package/ts_interfaces/requests/workhoster.ts +100 -0
@@ -0,0 +1,63 @@
1
+ import type { IApiTokenPolicy, TGatewayClientType } from './route-management.js';
2
+ export interface IGatewayClient {
3
+ id: string;
4
+ type: TGatewayClientType;
5
+ name: string;
6
+ description?: string;
7
+ hostnamePatterns: string[];
8
+ allowedRouteTargets: NonNullable<IApiTokenPolicy['allowedRouteTargets']>;
9
+ capabilities: NonNullable<IApiTokenPolicy['capabilities']>;
10
+ enabled: boolean;
11
+ tokenCount?: number;
12
+ policyGeneration: number;
13
+ createdAt: number;
14
+ updatedAt: number;
15
+ createdBy: string;
16
+ }
17
+ export interface IWorkAppMailOwnership {
18
+ workHosterType: TGatewayClientType;
19
+ workHosterId: string;
20
+ workAppId: string;
21
+ }
22
+ export interface IWorkAppMailInboundRoute {
23
+ enabled: boolean;
24
+ targetHost: string;
25
+ targetPort: number;
26
+ preserveHeaders?: boolean;
27
+ addHeaders?: Record<string, string>;
28
+ }
29
+ export interface IWorkAppMailIdentity {
30
+ id: string;
31
+ externalKey: string;
32
+ ownership: IWorkAppMailOwnership;
33
+ address: string;
34
+ localPart: string;
35
+ domain: string;
36
+ enabled: boolean;
37
+ displayName?: string;
38
+ inbound?: IWorkAppMailInboundRoute;
39
+ smtp: {
40
+ enabled: boolean;
41
+ username: string;
42
+ };
43
+ createdAt: number;
44
+ updatedAt: number;
45
+ createdBy: string;
46
+ }
47
+ export interface IWorkAppMailCredentials {
48
+ username: string;
49
+ password: string;
50
+ host?: string;
51
+ ports?: {
52
+ smtp?: number;
53
+ submission?: number;
54
+ smtps?: number;
55
+ };
56
+ }
57
+ export interface IWorkAppMailIdentitySyncResult {
58
+ success: boolean;
59
+ action?: 'created' | 'updated' | 'deleted' | 'unchanged';
60
+ identity?: IWorkAppMailIdentity;
61
+ smtpCredentials?: IWorkAppMailCredentials;
62
+ message?: string;
63
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2hvc3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX2ludGVyZmFjZXMvZGF0YS93b3JraG9zdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
@@ -0,0 +1,5 @@
1
+ export * from './plugins.js';
2
+ import * as data from './data/index.js';
3
+ export { data };
4
+ import * as requests from './requests/index.js';
5
+ export { requests };
@@ -0,0 +1,8 @@
1
+ export * from './plugins.js';
2
+ // Data types
3
+ import * as data from './data/index.js';
4
+ export { data };
5
+ // Request interfaces
6
+ import * as requests from './requests/index.js';
7
+ export { requests };
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90c19pbnRlcmZhY2VzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDO0FBRTdCLGFBQWE7QUFDYixPQUFPLEtBQUssSUFBSSxNQUFNLGlCQUFpQixDQUFDO0FBQ3hDLE9BQU8sRUFBRSxJQUFJLEVBQUUsQ0FBQztBQUVoQixxQkFBcUI7QUFDckIsT0FBTyxLQUFLLFFBQVEsTUFBTSxxQkFBcUIsQ0FBQztBQUNoRCxPQUFPLEVBQUUsUUFBUSxFQUFFLENBQUMifQ==
@@ -0,0 +1,2 @@
1
+ import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
2
+ export { typedrequestInterfaces };
@@ -0,0 +1,4 @@
1
+ // @apiglobal scope
2
+ import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
3
+ export { typedrequestInterfaces };
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzX2ludGVyZmFjZXMvcGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxtQkFBbUI7QUFDbkIsT0FBTyxLQUFLLHNCQUFzQixNQUFNLHFDQUFxQyxDQUFDO0FBRTlFLE9BQU8sRUFDTCxzQkFBc0IsRUFDdkIsQ0FBQSJ9
@@ -0,0 +1,42 @@
1
+ import * as plugins from '../plugins.js';
2
+ import type * as authInterfaces from '../data/auth.js';
3
+ import type { IAcmeConfig } from '../data/acme-config.js';
4
+ /**
5
+ * Get the current ACME configuration. Returns null if no config has been
6
+ * set yet (neither from DB nor seeded from the constructor).
7
+ */
8
+ export interface IReq_GetAcmeConfig extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetAcmeConfig> {
9
+ method: 'getAcmeConfig';
10
+ request: {
11
+ identity?: authInterfaces.IIdentity;
12
+ apiToken?: string;
13
+ };
14
+ response: {
15
+ config: IAcmeConfig | null;
16
+ };
17
+ }
18
+ /**
19
+ * Update the ACME configuration (upsert). All fields are required on first
20
+ * create, optional on subsequent updates (partial update).
21
+ *
22
+ * NOTE: Most fields take effect on the next dcrouter restart — SmartAcme is
23
+ * instantiated once at startup. `renewThresholdDays` applies immediately to
24
+ * the next renewal check.
25
+ */
26
+ export interface IReq_UpdateAcmeConfig extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_UpdateAcmeConfig> {
27
+ method: 'updateAcmeConfig';
28
+ request: {
29
+ identity?: authInterfaces.IIdentity;
30
+ apiToken?: string;
31
+ accountEmail?: string;
32
+ enabled?: boolean;
33
+ useProduction?: boolean;
34
+ autoRenew?: boolean;
35
+ renewThresholdDays?: number;
36
+ };
37
+ response: {
38
+ success: boolean;
39
+ config?: IAcmeConfig;
40
+ message?: string;
41
+ };
42
+ }
@@ -0,0 +1,2 @@
1
+ import * as plugins from '../plugins.js';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNtZS1jb25maWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL3JlcXVlc3RzL2FjbWUtY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDIn0=
@@ -0,0 +1,69 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as authInterfaces from '../data/auth.js';
3
+ export type TAdminLoginAuthSource = 'auto' | 'local' | 'idp.global';
4
+ export interface IAdminUserProjection {
5
+ id: string;
6
+ username: string;
7
+ email?: string;
8
+ name?: string;
9
+ role: string;
10
+ status?: 'active' | 'disabled';
11
+ authSources?: Array<'local' | 'idp.global'>;
12
+ }
13
+ export interface IReq_AdminLoginWithUsernameAndPassword extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_AdminLoginWithUsernameAndPassword> {
14
+ method: 'adminLoginWithUsernameAndPassword';
15
+ request: {
16
+ username: string;
17
+ password: string;
18
+ authSource?: TAdminLoginAuthSource;
19
+ };
20
+ response: {
21
+ identity?: authInterfaces.IIdentity;
22
+ };
23
+ }
24
+ export interface IReq_GetAdminBootstrapStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetAdminBootstrapStatus> {
25
+ method: 'getAdminBootstrapStatus';
26
+ request: {};
27
+ response: {
28
+ dbEnabled: boolean;
29
+ dbReady: boolean;
30
+ hasPersistentAdmin: boolean;
31
+ needsBootstrap: boolean;
32
+ ephemeralAdminAvailable: boolean;
33
+ idpGlobalConfigured: boolean;
34
+ };
35
+ }
36
+ export interface IReq_CreateInitialAdminUser extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_CreateInitialAdminUser> {
37
+ method: 'createInitialAdminUser';
38
+ request: {
39
+ identity: authInterfaces.IIdentity;
40
+ email: string;
41
+ name?: string;
42
+ password: string;
43
+ enableIdpGlobalAuth?: boolean;
44
+ };
45
+ response: {
46
+ success: boolean;
47
+ identity?: authInterfaces.IIdentity;
48
+ user?: IAdminUserProjection;
49
+ };
50
+ }
51
+ export interface IReq_AdminLogout extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_AdminLogout> {
52
+ method: 'adminLogout';
53
+ request: {
54
+ identity: authInterfaces.IIdentity;
55
+ };
56
+ response: {
57
+ success: boolean;
58
+ };
59
+ }
60
+ export interface IReq_VerifyIdentity extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_VerifyIdentity> {
61
+ method: 'verifyIdentity';
62
+ request: {
63
+ identity: authInterfaces.IIdentity;
64
+ };
65
+ response: {
66
+ valid: boolean;
67
+ identity?: authInterfaces.IIdentity;
68
+ };
69
+ }
@@ -0,0 +1,3 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as authInterfaces from '../data/auth.js';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRtaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL3JlcXVlc3RzL2FkbWluLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxjQUFjLE1BQU0saUJBQWlCLENBQUMifQ==
@@ -0,0 +1,85 @@
1
+ import * as plugins from '../plugins.js';
2
+ import type * as authInterfaces from '../data/auth.js';
3
+ import type { IApiTokenInfo, IApiTokenPolicy, TApiTokenScope } from '../data/route-management.js';
4
+ /**
5
+ * Create a new API token. Returns the raw token value once (never shown again).
6
+ * Admin JWT only — tokens cannot create tokens.
7
+ */
8
+ export interface IReq_CreateApiToken extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_CreateApiToken> {
9
+ method: 'createApiToken';
10
+ request: {
11
+ identity?: authInterfaces.IIdentity;
12
+ apiToken?: string;
13
+ name: string;
14
+ scopes: TApiTokenScope[];
15
+ policy?: IApiTokenPolicy;
16
+ expiresInDays?: number | null;
17
+ };
18
+ response: {
19
+ success: boolean;
20
+ tokenId?: string;
21
+ tokenValue?: string;
22
+ message?: string;
23
+ };
24
+ }
25
+ /**
26
+ * List all API tokens (without hashes).
27
+ */
28
+ export interface IReq_ListApiTokens extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ListApiTokens> {
29
+ method: 'listApiTokens';
30
+ request: {
31
+ identity?: authInterfaces.IIdentity;
32
+ apiToken?: string;
33
+ };
34
+ response: {
35
+ tokens: IApiTokenInfo[];
36
+ };
37
+ }
38
+ /**
39
+ * Revoke (delete) an API token.
40
+ */
41
+ export interface IReq_RevokeApiToken extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RevokeApiToken> {
42
+ method: 'revokeApiToken';
43
+ request: {
44
+ identity?: authInterfaces.IIdentity;
45
+ apiToken?: string;
46
+ id: string;
47
+ };
48
+ response: {
49
+ success: boolean;
50
+ message?: string;
51
+ };
52
+ }
53
+ /**
54
+ * Roll (regenerate) an API token's secret. Returns the new raw token value once.
55
+ * Admin JWT only.
56
+ */
57
+ export interface IReq_RollApiToken extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RollApiToken> {
58
+ method: 'rollApiToken';
59
+ request: {
60
+ identity?: authInterfaces.IIdentity;
61
+ apiToken?: string;
62
+ id: string;
63
+ };
64
+ response: {
65
+ success: boolean;
66
+ tokenValue?: string;
67
+ message?: string;
68
+ };
69
+ }
70
+ /**
71
+ * Enable or disable an API token.
72
+ */
73
+ export interface IReq_ToggleApiToken extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ToggleApiToken> {
74
+ method: 'toggleApiToken';
75
+ request: {
76
+ identity?: authInterfaces.IIdentity;
77
+ apiToken?: string;
78
+ id: string;
79
+ enabled: boolean;
80
+ };
81
+ response: {
82
+ success: boolean;
83
+ message?: string;
84
+ };
85
+ }
@@ -0,0 +1,2 @@
1
+ import * as plugins from '../plugins.js';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLXRva2Vucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX2ludGVyZmFjZXMvcmVxdWVzdHMvYXBpLXRva2Vucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQyJ9
@@ -0,0 +1,87 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as authInterfaces from '../data/auth.js';
3
+ export type TCertificateStatus = 'valid' | 'expiring' | 'expired' | 'provisioning' | 'failed' | 'unknown';
4
+ export type TCertificateSource = 'acme' | 'provision-function' | 'static' | 'none';
5
+ /**
6
+ * What the running proxy is actually presenting on the wire for a domain, as
7
+ * reported by the Rust engine.
8
+ *
9
+ * This is deliberately separate from the issued/stored view: a certificate can be
10
+ * valid in storage while the engine still serves an older, expired one, and
11
+ * reporting only the stored view is how a 21-day outage went unnoticed. Absent
12
+ * when the engine cannot be queried — absence means "unknown", never "fine".
13
+ */
14
+ export interface ICertificateServedState {
15
+ expiryDate?: string;
16
+ isValid: boolean;
17
+ source?: string;
18
+ }
19
+ export interface ICertificateInfo {
20
+ domain: string;
21
+ routeNames: string[];
22
+ /** Combined verdict. Downgraded to 'failed' whenever `servedMismatch` is true. */
23
+ status: TCertificateStatus;
24
+ source: TCertificateSource;
25
+ tlsMode: 'terminate' | 'terminate-and-reencrypt' | 'passthrough';
26
+ /** Expiry of the issued/stored certificate. */
27
+ expiryDate?: string;
28
+ issuer?: string;
29
+ issuedAt?: string;
30
+ error?: string;
31
+ canReprovision: boolean;
32
+ /** What the running proxy serves, when determinable. */
33
+ served?: ICertificateServedState;
34
+ /**
35
+ * True when a valid certificate is issued/stored but the proxy is still serving
36
+ * an invalid or expired one. An issuance success must never mask this.
37
+ */
38
+ servedMismatch?: boolean;
39
+ backoffInfo?: {
40
+ failures: number;
41
+ retryAfter?: string;
42
+ lastError?: string;
43
+ };
44
+ }
45
+ export interface IReq_GetCertificateOverview extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetCertificateOverview> {
46
+ method: 'getCertificateOverview';
47
+ request: {
48
+ identity?: authInterfaces.IIdentity;
49
+ apiToken?: string;
50
+ };
51
+ response: {
52
+ certificates: ICertificateInfo[];
53
+ summary: {
54
+ total: number;
55
+ valid: number;
56
+ expiring: number;
57
+ expired: number;
58
+ failed: number;
59
+ unknown: number;
60
+ };
61
+ };
62
+ }
63
+ export interface IReq_ReprovisionCertificateDomain extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ReprovisionCertificateDomain> {
64
+ method: 'reprovisionCertificateDomain';
65
+ request: {
66
+ identity?: authInterfaces.IIdentity;
67
+ apiToken?: string;
68
+ domain: string;
69
+ forceRenew?: boolean;
70
+ };
71
+ response: {
72
+ success: boolean;
73
+ message?: string;
74
+ };
75
+ }
76
+ export interface IReq_DeleteCertificate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_DeleteCertificate> {
77
+ method: 'deleteCertificate';
78
+ request: {
79
+ identity?: authInterfaces.IIdentity;
80
+ apiToken?: string;
81
+ domain: string;
82
+ };
83
+ response: {
84
+ success: boolean;
85
+ message?: string;
86
+ };
87
+ }
@@ -0,0 +1,5 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as authInterfaces from '../data/auth.js';
3
+ // The certificate import/export contracts live in @serve.zone/interfaces
4
+ // (requests/gateway.ts).
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VydGlmaWNhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL3JlcXVlc3RzL2NlcnRpZmljYXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxjQUFjLE1BQU0saUJBQWlCLENBQUM7QUF1R2xELHlFQUF5RTtBQUN6RSx5QkFBeUIifQ==
@@ -0,0 +1,29 @@
1
+ import type * as data from '../data/index.js';
2
+ export interface IReq_GetCombinedMetrics {
3
+ method: 'getCombinedMetrics';
4
+ request: {
5
+ identity?: data.IIdentity;
6
+ apiToken?: string;
7
+ sections?: {
8
+ server?: boolean;
9
+ email?: boolean;
10
+ dns?: boolean;
11
+ security?: boolean;
12
+ network?: boolean;
13
+ radius?: boolean;
14
+ vpn?: boolean;
15
+ };
16
+ };
17
+ response: {
18
+ metrics: {
19
+ server?: data.IServerStats;
20
+ email?: data.IEmailStats;
21
+ dns?: data.IDnsStats;
22
+ security?: data.ISecurityMetrics;
23
+ network?: data.INetworkMetrics;
24
+ radius?: data.IRadiusStats;
25
+ vpn?: data.IVpnStats;
26
+ };
27
+ timestamp: number;
28
+ };
29
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tYmluZWQuc3RhdHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL3JlcXVlc3RzL2NvbWJpbmVkLnN0YXRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
@@ -0,0 +1,35 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as authInterfaces from '../data/auth.js';
3
+ import * as configEventInterfaces from '../data/config-events.js';
4
+ export interface IReq_ListConfigEvents extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ListConfigEvents> {
5
+ method: 'listConfigEvents';
6
+ request: {
7
+ identity?: authInterfaces.IIdentity;
8
+ apiToken?: string;
9
+ /** Filter by acknowledgement state; omit for all events. */
10
+ acknowledged?: boolean;
11
+ severity?: configEventInterfaces.TOpsConfigEventSeverity;
12
+ category?: string;
13
+ limit?: number;
14
+ cursor?: configEventInterfaces.IOpsConfigEventCursor;
15
+ };
16
+ response: {
17
+ events: configEventInterfaces.IOpsConfigEvent[];
18
+ total: number;
19
+ unacknowledgedCount: number;
20
+ nextCursor?: configEventInterfaces.IOpsConfigEventCursor;
21
+ };
22
+ }
23
+ export interface IReq_AcknowledgeConfigEvents extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_AcknowledgeConfigEvents> {
24
+ method: 'acknowledgeConfigEvents';
25
+ request: {
26
+ identity?: authInterfaces.IIdentity;
27
+ apiToken?: string;
28
+ ids: string[];
29
+ };
30
+ response: {
31
+ success: boolean;
32
+ acknowledgedCount: number;
33
+ message?: string;
34
+ };
35
+ }
@@ -0,0 +1,4 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as authInterfaces from '../data/auth.js';
3
+ import * as configEventInterfaces from '../data/config-events.js';
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLWV2ZW50cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX2ludGVyZmFjZXMvcmVxdWVzdHMvY29uZmlnLWV2ZW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEtBQUssY0FBYyxNQUFNLGlCQUFpQixDQUFDO0FBQ2xELE9BQU8sS0FBSyxxQkFBcUIsTUFBTSwwQkFBMEIsQ0FBQyJ9
@@ -0,0 +1,93 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as authInterfaces from '../data/auth.js';
3
+ export interface IConfigData {
4
+ system: {
5
+ baseDir: string;
6
+ dataDir: string;
7
+ publicIp: string | null;
8
+ proxyIps: string[];
9
+ uptime: number;
10
+ storageBackend: 'smartdata-local' | 'smartdata-external';
11
+ storagePath: string | null;
12
+ };
13
+ smartProxy: {
14
+ enabled: boolean;
15
+ routeCount: number;
16
+ acme: {
17
+ enabled: boolean;
18
+ accountEmail: string;
19
+ useProduction: boolean;
20
+ autoRenew: boolean;
21
+ renewThresholdDays: number;
22
+ } | null;
23
+ };
24
+ email: {
25
+ enabled: boolean;
26
+ ports: number[];
27
+ portMapping: Record<string, number> | null;
28
+ hostname: string | null;
29
+ outboundMode: import('../data/email-settings.js').TEmailOutboundMode;
30
+ domains: string[];
31
+ emailRouteCount: number;
32
+ receivedEmailsPath: string | null;
33
+ };
34
+ dns: {
35
+ enabled: boolean;
36
+ port: number;
37
+ nsDomains: string[];
38
+ scopes: string[];
39
+ recordCount: number;
40
+ records: Array<{
41
+ name: string;
42
+ type: string;
43
+ value: string;
44
+ ttl?: number;
45
+ }>;
46
+ dnsChallenge: boolean;
47
+ };
48
+ tls: {
49
+ contactEmail: string | null;
50
+ domain: string | null;
51
+ source: 'acme' | 'static' | 'none';
52
+ certPath: string | null;
53
+ keyPath: string | null;
54
+ };
55
+ cache: {
56
+ enabled: boolean;
57
+ storagePath: string | null;
58
+ dbName: string | null;
59
+ defaultTTLDays: number;
60
+ cleanupIntervalHours: number;
61
+ ttlConfig: Record<string, number>;
62
+ };
63
+ radius: {
64
+ enabled: boolean;
65
+ authPort: number | null;
66
+ acctPort: number | null;
67
+ bindAddress: string | null;
68
+ clientCount: number;
69
+ vlanDefaultVlan: number | null;
70
+ vlanAllowUnknownMacs: boolean | null;
71
+ vlanMappingCount: number;
72
+ };
73
+ remoteIngress: {
74
+ enabled: boolean;
75
+ tunnelPort: number | null;
76
+ hubDomain: string | null;
77
+ tlsMode: 'custom' | 'acme' | 'self-signed';
78
+ connectedEdgeIps: string[];
79
+ performance?: import('../data/remoteingress.js').IRemoteIngressPerformanceConfig;
80
+ };
81
+ }
82
+ export interface IReq_GetConfiguration extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetConfiguration> {
83
+ method: 'getConfiguration';
84
+ request: {
85
+ identity?: authInterfaces.IIdentity;
86
+ apiToken?: string;
87
+ section?: string;
88
+ };
89
+ response: {
90
+ config: IConfigData;
91
+ section?: string;
92
+ };
93
+ }
@@ -0,0 +1,3 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as authInterfaces from '../data/auth.js';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHNfaW50ZXJmYWNlcy9yZXF1ZXN0cy9jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxLQUFLLGNBQWMsTUFBTSxpQkFBaUIsQ0FBQyJ9
@@ -0,0 +1,80 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as authInterfaces from '../data/auth.js';
3
+ import type { IDnsAuthorityDrift, IDnsAuthoritySettings, IDnsDelegationProbe } from '../data/dns-authority.js';
4
+ export interface IReq_GetDnsAuthority extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetDnsAuthority> {
5
+ method: 'getDnsAuthority';
6
+ request: {
7
+ identity?: authInterfaces.IIdentity;
8
+ apiToken?: string;
9
+ };
10
+ response: {
11
+ settings: IDnsAuthoritySettings;
12
+ };
13
+ }
14
+ /**
15
+ * Probe a zone's public delegation without changing anything. Lets an operator
16
+ * see the evidence before claiming authority.
17
+ */
18
+ export interface IReq_ProbeDnsAuthorityZone extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ProbeDnsAuthorityZone> {
19
+ method: 'probeDnsAuthorityZone';
20
+ request: {
21
+ identity?: authInterfaces.IIdentity;
22
+ apiToken?: string;
23
+ zone: string;
24
+ };
25
+ response: {
26
+ probe: IDnsDelegationProbe;
27
+ };
28
+ }
29
+ /**
30
+ * Claim authority over a zone. Succeeds only when the zone's public delegation
31
+ * names our nameservers; the claim is then persisted and reconciled in-process,
32
+ * with no restart.
33
+ */
34
+ export interface IReq_VerifyDnsAuthorityZone extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_VerifyDnsAuthorityZone> {
35
+ method: 'verifyDnsAuthorityZone';
36
+ request: {
37
+ identity?: authInterfaces.IIdentity;
38
+ apiToken?: string;
39
+ zone: string;
40
+ };
41
+ response: {
42
+ success: boolean;
43
+ message?: string;
44
+ probe?: IDnsDelegationProbe;
45
+ settings?: IDnsAuthoritySettings;
46
+ };
47
+ }
48
+ /**
49
+ * Drop a previously verified zone. Every zone in the authority set is revocable
50
+ * through this call: there is no deployment-declared floor left that would need
51
+ * a redeploy to withdraw.
52
+ */
53
+ export interface IReq_RevokeDnsAuthorityZone extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RevokeDnsAuthorityZone> {
54
+ method: 'revokeDnsAuthorityZone';
55
+ request: {
56
+ identity?: authInterfaces.IIdentity;
57
+ apiToken?: string;
58
+ zone: string;
59
+ };
60
+ response: {
61
+ success: boolean;
62
+ message?: string;
63
+ settings?: IDnsAuthoritySettings;
64
+ };
65
+ }
66
+ /**
67
+ * Compare declared authority against observed delegation in both directions.
68
+ * This is the check whose absence let one zone sit declared while four live
69
+ * zones were delegated to us and unclaimed.
70
+ */
71
+ export interface IReq_GetDnsAuthorityDrift extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetDnsAuthorityDrift> {
72
+ method: 'getDnsAuthorityDrift';
73
+ request: {
74
+ identity?: authInterfaces.IIdentity;
75
+ apiToken?: string;
76
+ };
77
+ response: {
78
+ drift: IDnsAuthorityDrift[];
79
+ };
80
+ }
@@ -0,0 +1,3 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as authInterfaces from '../data/auth.js';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG5zLWF1dGhvcml0eS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX2ludGVyZmFjZXMvcmVxdWVzdHMvZG5zLWF1dGhvcml0eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEtBQUssY0FBYyxNQUFNLGlCQUFpQixDQUFDIn0=