@fastybird/smart-panel-backend 1.1.0-alpha.1 → 1.1.0-alpha.10
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/app.module.js +7 -0
- package/dist/app.module.js.map +1 -1
- package/dist/common/filters/conflict-exception.filter.d.ts +6 -0
- package/dist/common/filters/conflict-exception.filter.js +59 -0
- package/dist/common/filters/conflict-exception.filter.js.map +1 -0
- package/dist/common/filters/global-error.filter.js +1 -4
- package/dist/common/filters/global-error.filter.js.map +1 -1
- package/dist/common/filters/global-filters.d.ts +3 -0
- package/dist/common/filters/global-filters.js +22 -0
- package/dist/common/filters/global-filters.js.map +1 -0
- package/dist/common/filters/unprocessable-entity-exception.filter.d.ts +1 -0
- package/dist/common/filters/unprocessable-entity-exception.filter.js +15 -3
- package/dist/common/filters/unprocessable-entity-exception.filter.js.map +1 -1
- package/dist/common/utils/transform.utils.js +3 -0
- package/dist/common/utils/transform.utils.js.map +1 -1
- package/dist/main.js +2 -7
- package/dist/main.js.map +1 -1
- package/dist/modules/devices/controllers/channels.properties.controller.js +16 -4
- package/dist/modules/devices/controllers/channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js +16 -4
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/devices.module.js +12 -0
- package/dist/modules/devices/devices.module.js.map +1 -1
- package/dist/modules/devices/services/channels.properties.service.d.ts +27 -3
- package/dist/modules/devices/services/channels.properties.service.js +304 -28
- package/dist/modules/devices/services/channels.properties.service.js.map +1 -1
- package/dist/modules/devices/services/channels.service.js +42 -38
- package/dist/modules/devices/services/channels.service.js.map +1 -1
- package/dist/modules/devices/services/command-latency-trace-collector.service.d.ts +101 -0
- package/dist/modules/devices/services/command-latency-trace-collector.service.js +451 -0
- package/dist/modules/devices/services/command-latency-trace-collector.service.js.map +1 -0
- package/dist/modules/devices/services/device-structure-lock.service.d.ts +10 -2
- package/dist/modules/devices/services/device-structure-lock.service.js +86 -7
- package/dist/modules/devices/services/device-structure-lock.service.js.map +1 -1
- package/dist/modules/devices/services/devices.service.js +37 -33
- package/dist/modules/devices/services/devices.service.js.map +1 -1
- package/dist/modules/devices/services/module-reset.service.d.ts +3 -1
- package/dist/modules/devices/services/module-reset.service.js +21 -16
- package/dist/modules/devices/services/module-reset.service.js.map +1 -1
- package/dist/modules/devices/services/property-command-dispatch.service.d.ts +45 -0
- package/dist/modules/devices/services/property-command-dispatch.service.js +227 -0
- package/dist/modules/devices/services/property-command-dispatch.service.js.map +1 -0
- package/dist/modules/devices/services/property-command-window.service.d.ts +71 -0
- package/dist/modules/devices/services/property-command-window.service.js +204 -0
- package/dist/modules/devices/services/property-command-window.service.js.map +1 -0
- package/dist/modules/devices/services/property-command.service.d.ts +20 -3
- package/dist/modules/devices/services/property-command.service.js +56 -10
- package/dist/modules/devices/services/property-command.service.js.map +1 -1
- package/dist/modules/devices/services/property-state-coordinator.service.d.ts +4 -0
- package/dist/modules/devices/services/property-state-coordinator.service.js +35 -0
- package/dist/modules/devices/services/property-state-coordinator.service.js.map +1 -0
- package/dist/modules/devices/services/property-value.service.d.ts +1 -0
- package/dist/modules/devices/services/property-value.service.js +4 -0
- package/dist/modules/devices/services/property-value.service.js.map +1 -1
- package/dist/modules/platform/services/platform.service.d.ts +13 -4
- package/dist/modules/platform/services/platform.service.js +57 -35
- package/dist/modules/platform/services/platform.service.js.map +1 -1
- package/dist/modules/remote-access/dto/update-config.dto.js +5 -0
- package/dist/modules/remote-access/dto/update-config.dto.js.map +1 -1
- package/dist/modules/remote-access/validators/is-remote-access-url.validator.js +5 -2
- package/dist/modules/remote-access/validators/is-remote-access-url.validator.js.map +1 -1
- package/dist/modules/system/services/privileged-worker.service.d.ts +10 -0
- package/dist/modules/system/services/privileged-worker.service.js +137 -11
- package/dist/modules/system/services/privileged-worker.service.js.map +1 -1
- package/dist/modules/websocket/gateway/websocket.gateway.d.ts +4 -1
- package/dist/modules/websocket/gateway/websocket.gateway.js +28 -5
- package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.d.ts +143 -0
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.js +523 -0
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.js.map +1 -0
- package/dist/modules/websocket/websocket.module.js +9 -1
- package/dist/modules/websocket/websocket.module.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +2 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js +2 -3
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js.map +1 -1
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js +6 -1
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/base.mapper.js +27 -4
- package/dist/plugins/devices-homekit/mappers/base.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/homekit-mapper.interface.d.ts +8 -0
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.d.ts +7 -0
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js +84 -73
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.d.ts +18 -1
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +338 -119
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.d.ts +13 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +109 -10
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js +8 -11
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js +4 -0
- package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js +5 -0
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +9 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +59 -24
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.d.ts +0 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +5 -12
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/utils/transform.utils.d.ts +2 -0
- package/dist/plugins/devices-shelly-ng/utils/transform.utils.js +14 -1
- package/dist/plugins/devices-shelly-ng/utils/transform.utils.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.d.ts +17 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js +147 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.d.ts +15 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js +98 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.d.ts +9 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.js +94 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.d.ts +9 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.js +92 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.d.ts +7 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.js +48 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.d.ts +42 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js +352 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.d.ts +24 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js +27 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.d.ts +8 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.js +19 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.d.ts +4 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.js +20 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.d.ts +21 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js +135 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/scripts/cloudflared-setup.sh +185 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.d.ts +82 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js +507 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.d.ts +10 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js +37 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.d.ts +38 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js +147 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.d.ts +15 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js +67 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.d.ts +8 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js +46 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.d.ts +27 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js +139 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.d.ts +1 -0
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js +26 -10
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.d.ts +6 -1
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.js +28 -3
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/models/status.model.d.ts +19 -0
- package/dist/plugins/remote-access-tailscale/models/status.model.js +158 -1
- package/dist/plugins/remote-access-tailscale/models/status.model.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.d.ts +2 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js +3 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.d.ts +13 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js +27 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.d.ts +2 -2
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js +2 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.js +1 -1
- package/dist/plugins/remote-access-tailscale/scripts/tailscale-setup.sh +61 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.d.ts +9 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js +12 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.d.ts +1 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js +27 -2
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.d.ts +30 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js +300 -30
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.d.ts +8 -3
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js +39 -12
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.d.ts +14 -5
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js +51 -16
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js.map +1 -1
- package/dist/plugins/scenes-local/platforms/local-scene.platform.d.ts +3 -1
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js +12 -7
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/climate-intent.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js +6 -3
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/covers-intent.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js +6 -3
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js +7 -4
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js +11 -5
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-undo-history.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/space-undo-history.service.js +8 -5
- package/dist/plugins/spaces-home-control/services/space-undo-history.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -8,3 +8,5 @@ export type CoerceNumberOpts = {
|
|
|
8
8
|
};
|
|
9
9
|
export declare const toEnergy: (v: unknown) => number;
|
|
10
10
|
export declare const rssiToQuality: (rssi: number) => number;
|
|
11
|
+
export type EmitValueFn = (event: string, ...args: unknown[]) => unknown;
|
|
12
|
+
export declare const emitFlattenedValue: (emit: EmitValueFn, compKey: string, attr: string, value: unknown, depth?: number) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rssiToQuality = exports.toEnergy = void 0;
|
|
3
|
+
exports.emitFlattenedValue = exports.rssiToQuality = exports.toEnergy = void 0;
|
|
4
4
|
const toEnergy = (v) => {
|
|
5
5
|
if (typeof v === 'number') {
|
|
6
6
|
return v;
|
|
@@ -29,4 +29,17 @@ const rssiToQuality = (rssi) => {
|
|
|
29
29
|
return Math.round(2 * (rssi + 100));
|
|
30
30
|
};
|
|
31
31
|
exports.rssiToQuality = rssiToQuality;
|
|
32
|
+
const MAX_FLATTEN_DEPTH = 8;
|
|
33
|
+
const emitFlattenedValue = (emit, compKey, attr, value, depth = 0) => {
|
|
34
|
+
emit('value', compKey, attr, value);
|
|
35
|
+
if (depth >= MAX_FLATTEN_DEPTH) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
|
39
|
+
for (const [leaf, leafValue] of Object.entries(value)) {
|
|
40
|
+
(0, exports.emitFlattenedValue)(emit, compKey, `${attr}.${leaf}`, leafValue, depth + 1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.emitFlattenedValue = emitFlattenedValue;
|
|
32
45
|
//# sourceMappingURL=transform.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.utils.js","sourceRoot":"","sources":["../../../../src/plugins/devices-shelly-ng/utils/transform.utils.ts"],"names":[],"mappings":";;;AAMO,MAAM,QAAQ,GAAG,CAAC,CAAU,EAAU,EAAE;IAC9C,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC3B,OAAO,CAAC,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AAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,EAAE,CAAC;YAClF,IAAA,0BAAkB,EAAC,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,SAAS,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;QAC5E,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAlBW,QAAA,kBAAkB,sBAkB7B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ConfigService } from '../../../modules/config/services/config.service';
|
|
2
|
+
import { RemoteAccessCloudflareTunnelPluginInstallResponseModel } from '../models/install.model';
|
|
3
|
+
import { RemoteAccessCloudflareTunnelPluginStatusResponseModel } from '../models/status.model';
|
|
4
|
+
import { CloudflareTunnelManagedService } from '../services/cloudflare-tunnel-managed.service';
|
|
5
|
+
import { CloudflareTunnelProviderService } from '../services/cloudflare-tunnel-provider.service';
|
|
6
|
+
import { CloudflareTunnelSetupService } from '../services/cloudflare-tunnel-setup.service';
|
|
7
|
+
export declare class SetupController {
|
|
8
|
+
private readonly setupService;
|
|
9
|
+
private readonly providerService;
|
|
10
|
+
private readonly tunnelManagedService;
|
|
11
|
+
private readonly configService;
|
|
12
|
+
private readonly logger;
|
|
13
|
+
constructor(setupService: CloudflareTunnelSetupService, providerService: CloudflareTunnelProviderService, tunnelManagedService: CloudflareTunnelManagedService, configService: ConfigService);
|
|
14
|
+
install(): Promise<RemoteAccessCloudflareTunnelPluginInstallResponseModel>;
|
|
15
|
+
reset(): Promise<RemoteAccessCloudflareTunnelPluginStatusResponseModel>;
|
|
16
|
+
private buildStatusResponse;
|
|
17
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SetupController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const logger_1 = require("../../../common/logger");
|
|
16
|
+
const transform_utils_1 = require("../../../common/utils/transform.utils");
|
|
17
|
+
const config_service_1 = require("../../../modules/config/services/config.service");
|
|
18
|
+
const provider_model_1 = require("../../../modules/remote-access/models/provider.model");
|
|
19
|
+
const api_documentation_decorator_1 = require("../../../modules/swagger/decorators/api-documentation.decorator");
|
|
20
|
+
const system_exceptions_1 = require("../../../modules/system/system.exceptions");
|
|
21
|
+
const roles_guard_1 = require("../../../modules/users/guards/roles.guard");
|
|
22
|
+
const users_constants_1 = require("../../../modules/users/users.constants");
|
|
23
|
+
const update_config_dto_1 = require("../dto/update-config.dto");
|
|
24
|
+
const install_model_1 = require("../models/install.model");
|
|
25
|
+
const status_model_1 = require("../models/status.model");
|
|
26
|
+
const remote_access_cloudflare_tunnel_constants_1 = require("../remote-access-cloudflare-tunnel.constants");
|
|
27
|
+
const cloudflare_tunnel_managed_service_1 = require("../services/cloudflare-tunnel-managed.service");
|
|
28
|
+
const cloudflare_tunnel_provider_service_1 = require("../services/cloudflare-tunnel-provider.service");
|
|
29
|
+
const cloudflare_tunnel_setup_service_1 = require("../services/cloudflare-tunnel-setup.service");
|
|
30
|
+
let SetupController = class SetupController {
|
|
31
|
+
constructor(setupService, providerService, tunnelManagedService, configService) {
|
|
32
|
+
this.setupService = setupService;
|
|
33
|
+
this.providerService = providerService;
|
|
34
|
+
this.tunnelManagedService = tunnelManagedService;
|
|
35
|
+
this.configService = configService;
|
|
36
|
+
this.logger = (0, logger_1.createExtensionLogger)(remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME, 'SetupController');
|
|
37
|
+
}
|
|
38
|
+
async install() {
|
|
39
|
+
this.logger.debug('Cloudflare Tunnel install requested');
|
|
40
|
+
try {
|
|
41
|
+
const { id } = await this.setupService.install();
|
|
42
|
+
const data = new install_model_1.RemoteAccessCloudflareTunnelPluginInstallModel();
|
|
43
|
+
data.job = id;
|
|
44
|
+
const response = new install_model_1.RemoteAccessCloudflareTunnelPluginInstallResponseModel();
|
|
45
|
+
response.data = data;
|
|
46
|
+
return response;
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
if (error instanceof system_exceptions_1.PrivilegedWorkerUnavailableException) {
|
|
50
|
+
throw new common_1.ConflictException(error.message);
|
|
51
|
+
}
|
|
52
|
+
if (error instanceof cloudflare_tunnel_setup_service_1.CloudflareTunnelSetupUnavailableException) {
|
|
53
|
+
throw new common_1.UnprocessableEntityException({ code: error.code, message: error.message });
|
|
54
|
+
}
|
|
55
|
+
const err = error;
|
|
56
|
+
this.logger.error(`Failed to start Cloudflare Tunnel setup: ${err.message}`);
|
|
57
|
+
throw new common_1.InternalServerErrorException('Failed to start Cloudflare Tunnel setup');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async reset() {
|
|
61
|
+
this.logger.debug('Cloudflare Tunnel reset requested');
|
|
62
|
+
try {
|
|
63
|
+
await this.tunnelManagedService.stop();
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
this.logger.warn('Failed to stop the Cloudflare Tunnel process while resetting', {
|
|
67
|
+
message: error instanceof Error ? error.message : String(error),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
const plain = {
|
|
72
|
+
type: remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME,
|
|
73
|
+
tunnel_token: null,
|
|
74
|
+
public_hostname: null,
|
|
75
|
+
};
|
|
76
|
+
const dto = (0, transform_utils_1.toInstance)(update_config_dto_1.UpdateRemoteAccessCloudflareTunnelPluginConfigDto, plain, {
|
|
77
|
+
excludeExtraneousValues: false,
|
|
78
|
+
});
|
|
79
|
+
await this.configService.updatePluginConfig(remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME, dto, plain);
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
const err = error;
|
|
83
|
+
this.logger.error(`Failed to clear the Cloudflare Tunnel configuration during reset: ${err.message}`);
|
|
84
|
+
throw new common_1.InternalServerErrorException('Failed to reset the Cloudflare Tunnel configuration');
|
|
85
|
+
}
|
|
86
|
+
return this.buildStatusResponse();
|
|
87
|
+
}
|
|
88
|
+
async buildStatusResponse() {
|
|
89
|
+
const [status, requirements] = await Promise.all([
|
|
90
|
+
this.providerService.getStatus(),
|
|
91
|
+
this.tunnelManagedService.refreshRequirements(),
|
|
92
|
+
]);
|
|
93
|
+
const data = new status_model_1.RemoteAccessCloudflareTunnelPluginStatusModel();
|
|
94
|
+
data.type = status.type;
|
|
95
|
+
data.state = status.state;
|
|
96
|
+
data.endpoints = (0, transform_utils_1.toInstance)(provider_model_1.RemoteAccessEndpointModel, status.endpoints);
|
|
97
|
+
data.message = status.message ?? null;
|
|
98
|
+
data.details = status.details;
|
|
99
|
+
data.proxyAddresses = status.proxyAddresses;
|
|
100
|
+
data.advisories = (0, transform_utils_1.toInstance)(provider_model_1.RemoteAccessAdvisoryModel, status.advisories);
|
|
101
|
+
data.updatedAt = status.updatedAt;
|
|
102
|
+
data.requirements = (0, transform_utils_1.toInstance)(status_model_1.RemoteAccessCloudflareTunnelPluginRequirementModel, requirements);
|
|
103
|
+
data.setup = null;
|
|
104
|
+
const response = new status_model_1.RemoteAccessCloudflareTunnelPluginStatusResponseModel();
|
|
105
|
+
response.data = data;
|
|
106
|
+
return response;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
exports.SetupController = SetupController;
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, swagger_1.ApiOperation)({
|
|
112
|
+
tags: [remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_API_TAG_NAME],
|
|
113
|
+
summary: 'Install cloudflared',
|
|
114
|
+
description: 'Starts the privileged setup job: installs the cloudflared package if missing. Progress is streamed as RemoteAccessModule.Setup.Progress events.',
|
|
115
|
+
operationId: 'create-remote-access-cloudflare-tunnel-plugin-install',
|
|
116
|
+
}),
|
|
117
|
+
(0, api_documentation_decorator_1.ApiAcceptedSuccessResponse)(install_model_1.RemoteAccessCloudflareTunnelPluginInstallResponseModel, 'Cloudflare Tunnel setup job started'),
|
|
118
|
+
(0, common_1.Post)('install'),
|
|
119
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.ACCEPTED),
|
|
120
|
+
__metadata("design:type", Function),
|
|
121
|
+
__metadata("design:paramtypes", []),
|
|
122
|
+
__metadata("design:returntype", Promise)
|
|
123
|
+
], SetupController.prototype, "install", null);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, swagger_1.ApiOperation)({
|
|
126
|
+
tags: [remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_API_TAG_NAME],
|
|
127
|
+
summary: 'Reset the Cloudflare Tunnel',
|
|
128
|
+
description: 'Stops the tunnel service and clears the stored tunnel token and public hostname, returning the resulting status.',
|
|
129
|
+
operationId: 'create-remote-access-cloudflare-tunnel-plugin-reset',
|
|
130
|
+
}),
|
|
131
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(status_model_1.RemoteAccessCloudflareTunnelPluginStatusResponseModel, 'Cloudflare Tunnel status after reset'),
|
|
132
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
133
|
+
(0, common_1.Post)('reset'),
|
|
134
|
+
__metadata("design:type", Function),
|
|
135
|
+
__metadata("design:paramtypes", []),
|
|
136
|
+
__metadata("design:returntype", Promise)
|
|
137
|
+
], SetupController.prototype, "reset", null);
|
|
138
|
+
exports.SetupController = SetupController = __decorate([
|
|
139
|
+
(0, swagger_1.ApiTags)(remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_API_TAG_NAME),
|
|
140
|
+
(0, common_1.Controller)(),
|
|
141
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER),
|
|
142
|
+
__metadata("design:paramtypes", [cloudflare_tunnel_setup_service_1.CloudflareTunnelSetupService,
|
|
143
|
+
cloudflare_tunnel_provider_service_1.CloudflareTunnelProviderService,
|
|
144
|
+
cloudflare_tunnel_managed_service_1.CloudflareTunnelManagedService,
|
|
145
|
+
config_service_1.ConfigService])
|
|
146
|
+
], SetupController);
|
|
147
|
+
//# sourceMappingURL=setup.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.controller.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAQwB;AACxB,6CAAwD;AAExD,mDAA+D;AAC/D,2EAAmE;AACnE,oFAAgF;AAChF,yFAG8D;AAC9D,iHAGyE;AACzE,iFAAiG;AACjG,2EAAkE;AAClE,4EAAkE;AAClE,gEAA6F;AAC7F,2DAGiC;AACjC,yDAIgC;AAChC,4GAGsD;AACtD,qGAA+F;AAC/F,uGAAiG;AACjG,iGAGqD;AAY9C,IAAM,eAAe,GAArB,MAAM,eAAe;IAG3B,YACkB,YAA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AC;QACb,IAAI,EAAE,CAAC,+FAAmD,CAAC;QAC3D,OAAO,EAAE,6BAA6B;QACtC,WAAW,EACV,kHAAkH;QACnH,WAAW,EAAE,qDAAqD;KAClE,CAAC;IACD,IAAA,gDAAkB,EAAC,oEAAqD,EAAE,sCAAsC,CAAC;IACjH,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,aAAI,EAAC,OAAO,CAAC;;;;4CAiCb;0BApGW,eAAe;IAH3B,IAAA,iBAAO,EAAC,+FAAmD,CAAC;IAC5D,IAAA,mBAAU,GAAE;IACZ,IAAA,mBAAK,EAAC,0BAAQ,CAAC,KAAK,CAAC;qCAKW,8DAA4B;QACzB,oEAA+B;QAC1B,kEAA8B;QACrC,8BAAa;GAPlC,eAAe,CA8H3B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PlatformService } from '../../../modules/platform/services/platform.service';
|
|
2
|
+
import { RemoteAccessCloudflareTunnelPluginStatusResponseModel } from '../models/status.model';
|
|
3
|
+
import { CloudflareTunnelManagedService } from '../services/cloudflare-tunnel-managed.service';
|
|
4
|
+
import { CloudflareTunnelProviderService } from '../services/cloudflare-tunnel-provider.service';
|
|
5
|
+
import { CloudflareTunnelSetupService } from '../services/cloudflare-tunnel-setup.service';
|
|
6
|
+
export declare class StatusController {
|
|
7
|
+
private readonly providerService;
|
|
8
|
+
private readonly tunnelManagedService;
|
|
9
|
+
private readonly setupService;
|
|
10
|
+
private readonly platformService;
|
|
11
|
+
private readonly logger;
|
|
12
|
+
constructor(providerService: CloudflareTunnelProviderService, tunnelManagedService: CloudflareTunnelManagedService, setupService: CloudflareTunnelSetupService, platformService: PlatformService);
|
|
13
|
+
getStatus(): Promise<RemoteAccessCloudflareTunnelPluginStatusResponseModel>;
|
|
14
|
+
private buildSetupJobModel;
|
|
15
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StatusController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const logger_1 = require("../../../common/logger");
|
|
16
|
+
const transform_utils_1 = require("../../../common/utils/transform.utils");
|
|
17
|
+
const platform_service_1 = require("../../../modules/platform/services/platform.service");
|
|
18
|
+
const provider_model_1 = require("../../../modules/remote-access/models/provider.model");
|
|
19
|
+
const api_documentation_decorator_1 = require("../../../modules/swagger/decorators/api-documentation.decorator");
|
|
20
|
+
const roles_guard_1 = require("../../../modules/users/guards/roles.guard");
|
|
21
|
+
const users_constants_1 = require("../../../modules/users/users.constants");
|
|
22
|
+
const status_model_1 = require("../models/status.model");
|
|
23
|
+
const remote_access_cloudflare_tunnel_constants_1 = require("../remote-access-cloudflare-tunnel.constants");
|
|
24
|
+
const cloudflare_tunnel_managed_service_1 = require("../services/cloudflare-tunnel-managed.service");
|
|
25
|
+
const cloudflare_tunnel_provider_service_1 = require("../services/cloudflare-tunnel-provider.service");
|
|
26
|
+
const cloudflare_tunnel_setup_service_1 = require("../services/cloudflare-tunnel-setup.service");
|
|
27
|
+
let StatusController = class StatusController {
|
|
28
|
+
constructor(providerService, tunnelManagedService, setupService, platformService) {
|
|
29
|
+
this.providerService = providerService;
|
|
30
|
+
this.tunnelManagedService = tunnelManagedService;
|
|
31
|
+
this.setupService = setupService;
|
|
32
|
+
this.platformService = platformService;
|
|
33
|
+
this.logger = (0, logger_1.createExtensionLogger)(remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME, 'StatusController');
|
|
34
|
+
}
|
|
35
|
+
async getStatus() {
|
|
36
|
+
this.logger.debug('Fetching Cloudflare Tunnel status');
|
|
37
|
+
const [status, requirements, privilegedWorkerSupport] = await Promise.all([
|
|
38
|
+
this.providerService.getStatus(),
|
|
39
|
+
this.tunnelManagedService.refreshRequirements(),
|
|
40
|
+
this.platformService.getPrivilegedWorkerSupport(),
|
|
41
|
+
]);
|
|
42
|
+
const data = new status_model_1.RemoteAccessCloudflareTunnelPluginStatusModel();
|
|
43
|
+
data.type = status.type;
|
|
44
|
+
data.state = status.state;
|
|
45
|
+
data.endpoints = (0, transform_utils_1.toInstance)(provider_model_1.RemoteAccessEndpointModel, status.endpoints);
|
|
46
|
+
data.message = status.message ?? null;
|
|
47
|
+
data.details = status.details;
|
|
48
|
+
data.proxyAddresses = status.proxyAddresses;
|
|
49
|
+
data.advisories = (0, transform_utils_1.toInstance)(provider_model_1.RemoteAccessAdvisoryModel, status.advisories);
|
|
50
|
+
data.updatedAt = status.updatedAt;
|
|
51
|
+
data.requirements = (0, transform_utils_1.toInstance)(status_model_1.RemoteAccessCloudflareTunnelPluginRequirementModel, requirements);
|
|
52
|
+
data.setup = this.buildSetupJobModel();
|
|
53
|
+
const privilegedSetup = new status_model_1.RemoteAccessCloudflareTunnelPluginPrivilegedSetupModel();
|
|
54
|
+
privilegedSetup.available = privilegedWorkerSupport.supported;
|
|
55
|
+
privilegedSetup.reason = privilegedWorkerSupport.reason;
|
|
56
|
+
data.privilegedSetup = privilegedSetup;
|
|
57
|
+
const response = new status_model_1.RemoteAccessCloudflareTunnelPluginStatusResponseModel();
|
|
58
|
+
response.data = data;
|
|
59
|
+
return response;
|
|
60
|
+
}
|
|
61
|
+
buildSetupJobModel() {
|
|
62
|
+
const lastJob = this.setupService.getLastJob();
|
|
63
|
+
if (!lastJob) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
const model = new status_model_1.RemoteAccessCloudflareTunnelPluginSetupJobModel();
|
|
67
|
+
model.jobId = lastJob.id;
|
|
68
|
+
model.state = lastJob.status.state;
|
|
69
|
+
model.step = lastJob.status.step ?? null;
|
|
70
|
+
model.message = lastJob.status.message ?? null;
|
|
71
|
+
model.updatedAt = lastJob.status.updatedAt;
|
|
72
|
+
return model;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
exports.StatusController = StatusController;
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiOperation)({
|
|
78
|
+
tags: [remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_API_TAG_NAME],
|
|
79
|
+
summary: 'Get Cloudflare Tunnel status',
|
|
80
|
+
description: 'Retrieve the full Cloudflare Tunnel status: connection state, published endpoints, provider-specific details and the setup requirements checklist.',
|
|
81
|
+
operationId: 'get-remote-access-cloudflare-tunnel-plugin-status',
|
|
82
|
+
}),
|
|
83
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(status_model_1.RemoteAccessCloudflareTunnelPluginStatusResponseModel, 'Cloudflare Tunnel status retrieved successfully'),
|
|
84
|
+
(0, common_1.Get)('status'),
|
|
85
|
+
__metadata("design:type", Function),
|
|
86
|
+
__metadata("design:paramtypes", []),
|
|
87
|
+
__metadata("design:returntype", Promise)
|
|
88
|
+
], StatusController.prototype, "getStatus", null);
|
|
89
|
+
exports.StatusController = StatusController = __decorate([
|
|
90
|
+
(0, swagger_1.ApiTags)(remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_API_TAG_NAME),
|
|
91
|
+
(0, common_1.Controller)(),
|
|
92
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.ADMIN, users_constants_1.UserRole.OWNER),
|
|
93
|
+
__metadata("design:paramtypes", [cloudflare_tunnel_provider_service_1.CloudflareTunnelProviderService,
|
|
94
|
+
cloudflare_tunnel_managed_service_1.CloudflareTunnelManagedService,
|
|
95
|
+
cloudflare_tunnel_setup_service_1.CloudflareTunnelSetupService,
|
|
96
|
+
platform_service_1.PlatformService])
|
|
97
|
+
], StatusController);
|
|
98
|
+
//# sourceMappingURL=status.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.controller.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,6CAAwD;AAExD,mDAA+D;AAC/D,2EAAmE;AACnE,0FAAsF;AACtF,yFAG8D;AAC9D,iHAAqG;AACrG,2EAAkE;AAClE,4EAAkE;AAClE,yDAMgC;AAChC,4GAGsD;AACtD,qGAA+F;AAC/F,uGAAiG;AACjG,iGAA2F;AAKpF,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAG5B,YACkB,eAAgD,EAChD,oBAAoD,EACpD,YAA0C,EAC1C,eAAgC;QAHhC,oBAAe,GAAf,eAAe,CAAiC;QAChD,yBAAoB,GAApB,oBAAoB,CAAgC;QACpD,iBAAY,GAAZ,YAAY,CAA8B;QAC1C,oBAAe,GAAf,eAAe,CAAiB;QANjC,WAAM,GAAG,IAAA,8BAAqB,EAAC,uFAA2C,EAAE,kBAAkB,CAAC,CAAC;IAO9G,CAAC;IAcE,AAAN,KAAK,CAAC,SAAS;QACd,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;QAEvD,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,uBAAuB,CAAC,GAAG,MAAM,OAAO,CAA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ocol } from '../remote-access-cloudflare-tunnel.constants';
|
|
3
|
+
export declare class UpdateRemoteAccessCloudflareTunnelPluginConfigDto extends UpdatePluginConfigDto {
|
|
4
|
+
type: string;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
publicHostname?: string | null;
|
|
7
|
+
protocol?: CloudflareTunnelProtocol;
|
|
8
|
+
tunnelToken?: string | null;
|
|
9
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateRemoteAccessCloudflareTunnelPluginConfigDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
|
+
const transform_utils_1 = require("../../../common/utils/transform.utils");
|
|
17
|
+
const config_dto_1 = require("../../../modules/config/dto/config.dto");
|
|
18
|
+
const remote_access_cloudflare_tunnel_constants_1 = require("../remote-access-cloudflare-tunnel.constants");
|
|
19
|
+
let UpdateRemoteAccessCloudflareTunnelPluginConfigDto = class UpdateRemoteAccessCloudflareTunnelPluginConfigDto extends config_dto_1.UpdatePluginConfigDto {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.type = remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.UpdateRemoteAccessCloudflareTunnelPluginConfigDto = UpdateRemoteAccessCloudflareTunnelPluginConfigDto;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({
|
|
28
|
+
description: 'Plugin type',
|
|
29
|
+
type: 'string',
|
|
30
|
+
example: remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME,
|
|
31
|
+
}),
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsString)({ message: '[{"field":"type","reason":"Type must be a valid string."}]' }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], UpdateRemoteAccessCloudflareTunnelPluginConfigDto.prototype, "type", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
38
|
+
description: 'Enable or disable the plugin',
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
example: true,
|
|
41
|
+
}),
|
|
42
|
+
(0, class_transformer_1.Expose)(),
|
|
43
|
+
(0, class_transformer_1.Transform)(({ value }) => (value === null ? undefined : value)),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, class_validator_1.IsBoolean)({ message: '[{"field":"enabled","reason":"Enabled must be a boolean."}]' }),
|
|
46
|
+
__metadata("design:type", Boolean)
|
|
47
|
+
], UpdateRemoteAccessCloudflareTunnelPluginConfigDto.prototype, "enabled", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
50
|
+
name: 'public_hostname',
|
|
51
|
+
description: 'Replacement public hostname, e.g. panel.example.com. Hostname only — no scheme or path. Omit to preserve the stored value or send null to clear it.',
|
|
52
|
+
type: 'string',
|
|
53
|
+
nullable: true,
|
|
54
|
+
}),
|
|
55
|
+
(0, class_transformer_1.Expose)({ name: 'public_hostname' }),
|
|
56
|
+
(0, class_validator_1.IsOptional)(),
|
|
57
|
+
(0, class_validator_1.ValidateIf)((dto) => dto.publicHostname !== null),
|
|
58
|
+
(0, class_validator_1.IsFQDN)({}, {
|
|
59
|
+
message: '[{"field":"public_hostname","reason":"Public hostname must be a valid hostname, without a scheme or path."}]',
|
|
60
|
+
}),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], UpdateRemoteAccessCloudflareTunnelPluginConfigDto.prototype, "publicHostname", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
65
|
+
description: 'Protocol cloudflared uses to connect to the Cloudflare edge',
|
|
66
|
+
enum: remote_access_cloudflare_tunnel_constants_1.CLOUDFLARE_TUNNEL_PROTOCOLS,
|
|
67
|
+
example: 'auto',
|
|
68
|
+
}),
|
|
69
|
+
(0, class_transformer_1.Expose)(),
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
(0, class_validator_1.IsEnum)(remote_access_cloudflare_tunnel_constants_1.CLOUDFLARE_TUNNEL_PROTOCOLS, {
|
|
72
|
+
message: '[{"field":"protocol","reason":"Protocol must be one of auto, http2, quic."}]',
|
|
73
|
+
}),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], UpdateRemoteAccessCloudflareTunnelPluginConfigDto.prototype, "protocol", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
78
|
+
name: 'tunnel_token',
|
|
79
|
+
description: 'Replacement tunnel token from the Cloudflare Zero Trust dashboard. Omit to preserve the stored token or send null to clear it.',
|
|
80
|
+
type: 'string',
|
|
81
|
+
nullable: true,
|
|
82
|
+
}),
|
|
83
|
+
(0, class_transformer_1.Expose)({ name: 'tunnel_token' }),
|
|
84
|
+
(0, class_transformer_1.Transform)(({ obj }) => (0, transform_utils_1.readSubmittedValue)(obj, 'tunnel_token', 'tunnelToken'), {
|
|
85
|
+
toClassOnly: true,
|
|
86
|
+
}),
|
|
87
|
+
(0, class_validator_1.IsOptional)(),
|
|
88
|
+
(0, class_validator_1.IsString)({ message: '[{"field":"tunnel_token","reason":"Tunnel token must be a string."}]' }),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], UpdateRemoteAccessCloudflareTunnelPluginConfigDto.prototype, "tunnelToken", void 0);
|
|
91
|
+
exports.UpdateRemoteAccessCloudflareTunnelPluginConfigDto = UpdateRemoteAccessCloudflareTunnelPluginConfigDto = __decorate([
|
|
92
|
+
(0, swagger_1.ApiSchema)({ name: 'RemoteAccessCloudflareTunnelPluginUpdateConfig' })
|
|
93
|
+
], UpdateRemoteAccessCloudflareTunnelPluginConfigDto);
|
|
94
|
+
//# sourceMappingURL=update-config.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-config.dto.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAsD;AACtD,qDAA8F;AAE9F,6CAA8E;AAE9E,2EAA2E;AAC3E,uEAA+E;AAC/E,4GAIsD;AAG/C,IAAM,iDAAiD,GAAvD,MAAM,iDAAkD,SAAQ,kCAAqB;IAArF;;QAQN,SAAI,GAAW,uFAA2C,CAAC;IA0D5D,CAAC;CAAA,CAAA;AAlEY,8GAAiD;AAQ7D;IAPC,IAAA,qBAAW,EAAC;QACZ,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,uFAA2C;KACpD,CAAC;IACD,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4DAA4D,EAAE,CAAC;;+EACzB;AAW3D;IATC,IAAA,6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AAE,CAAC;IAChC,IAAA,6BAAS,EAAC,CAAC,EAAE,GAAG,EAAoB,EAAE,EAAE,CAAC,IAAA,oCAAkB,EAAS,GAAG,EAAE,cAAc,EAAE,aAAa,CAAC,EAAE;QACzG,WAAW,EAAE,IAAI;KACjB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,sEAAsE,EAAE,CAAC;;sFAClE;4DAjEhB,iDAAiD;IAD7D,IAAA,mBAAS,EAAC,EAAE,IAAI,EAAE,gDAAgD,EAAE,CAAC;GACzD,iDAAiD,CAkE7D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PluginConfigModel } from '../../../modules/config/models/config.model';
|
|
2
|
+
import { CloudflareTunnelProtocol } from '../remote-access-cloudflare-tunnel.constants';
|
|
3
|
+
export declare class RemoteAccessCloudflareTunnelPluginConfigModel extends PluginConfigModel {
|
|
4
|
+
type: string;
|
|
5
|
+
publicHostname: string | null;
|
|
6
|
+
protocol: CloudflareTunnelProtocol;
|
|
7
|
+
tunnelToken: string | null;
|
|
8
|
+
tunnelTokenConfigured?: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RemoteAccessCloudflareTunnelPluginConfigModel = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
|
+
const config_model_1 = require("../../../modules/config/models/config.model");
|
|
17
|
+
const remote_access_cloudflare_tunnel_constants_1 = require("../remote-access-cloudflare-tunnel.constants");
|
|
18
|
+
let RemoteAccessCloudflareTunnelPluginConfigModel = class RemoteAccessCloudflareTunnelPluginConfigModel extends config_model_1.PluginConfigModel {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.type = remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME;
|
|
22
|
+
this.publicHostname = null;
|
|
23
|
+
this.protocol = remote_access_cloudflare_tunnel_constants_1.CLOUDFLARE_TUNNEL_DEFAULT_PROTOCOL;
|
|
24
|
+
this.tunnelToken = null;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.RemoteAccessCloudflareTunnelPluginConfigModel = RemoteAccessCloudflareTunnelPluginConfigModel;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({
|
|
30
|
+
description: 'Plugin type',
|
|
31
|
+
type: 'string',
|
|
32
|
+
example: remote_access_cloudflare_tunnel_constants_1.REMOTE_ACCESS_CLOUDFLARE_TUNNEL_PLUGIN_NAME,
|
|
33
|
+
}),
|
|
34
|
+
(0, class_transformer_1.Expose)(),
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], RemoteAccessCloudflareTunnelPluginConfigModel.prototype, "type", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
name: 'public_hostname',
|
|
41
|
+
description: 'Public hostname the tunnel publishes, e.g. panel.example.com. Hostname only — no scheme or path.',
|
|
42
|
+
type: 'string',
|
|
43
|
+
nullable: true,
|
|
44
|
+
example: 'panel.example.com',
|
|
45
|
+
}),
|
|
46
|
+
(0, class_transformer_1.Expose)({ name: 'public_hostname' }),
|
|
47
|
+
(0, class_validator_1.ValidateIf)((config) => config.publicHostname !== null),
|
|
48
|
+
(0, class_validator_1.IsFQDN)({}, {
|
|
49
|
+
message: '[{"field":"public_hostname","reason":"Public hostname must be a valid hostname, without a scheme or path."}]',
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], RemoteAccessCloudflareTunnelPluginConfigModel.prototype, "publicHostname", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, swagger_1.ApiProperty)({
|
|
55
|
+
description: 'Protocol cloudflared uses to connect to the Cloudflare edge',
|
|
56
|
+
enum: remote_access_cloudflare_tunnel_constants_1.CLOUDFLARE_TUNNEL_PROTOCOLS,
|
|
57
|
+
example: remote_access_cloudflare_tunnel_constants_1.CLOUDFLARE_TUNNEL_DEFAULT_PROTOCOL,
|
|
58
|
+
}),
|
|
59
|
+
(0, class_transformer_1.Expose)(),
|
|
60
|
+
(0, class_validator_1.IsEnum)(remote_access_cloudflare_tunnel_constants_1.CLOUDFLARE_TUNNEL_PROTOCOLS),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], RemoteAccessCloudflareTunnelPluginConfigModel.prototype, "protocol", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
65
|
+
name: 'tunnel_token',
|
|
66
|
+
description: 'Tunnel token from the Cloudflare Zero Trust dashboard. This value is accepted on write and never returned.',
|
|
67
|
+
type: 'string',
|
|
68
|
+
nullable: true,
|
|
69
|
+
writeOnly: true,
|
|
70
|
+
}),
|
|
71
|
+
(0, class_transformer_1.Expose)({ name: 'tunnel_token' }),
|
|
72
|
+
(0, class_validator_1.ValidateIf)((config) => config.tunnelToken !== null),
|
|
73
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
74
|
+
(0, class_validator_1.IsString)(),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], RemoteAccessCloudflareTunnelPluginConfigModel.prototype, "tunnelToken", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, swagger_1.ApiProperty)({
|
|
79
|
+
name: 'tunnel_token_configured',
|
|
80
|
+
description: 'Whether a tunnel token is configured',
|
|
81
|
+
type: 'boolean',
|
|
82
|
+
example: false,
|
|
83
|
+
}),
|
|
84
|
+
(0, class_transformer_1.Expose)({ name: 'tunnel_token_configured' }),
|
|
85
|
+
(0, class_validator_1.IsOptional)(),
|
|
86
|
+
(0, class_validator_1.IsBoolean)(),
|
|
87
|
+
__metadata("design:type", Boolean)
|
|
88
|
+
], RemoteAccessCloudflareTunnelPluginConfigModel.prototype, "tunnelTokenConfigured", void 0);
|
|
89
|
+
exports.RemoteAccessCloudflareTunnelPluginConfigModel = RemoteAccessCloudflareTunnelPluginConfigModel = __decorate([
|
|
90
|
+
(0, swagger_1.ApiSchema)({ name: 'RemoteAccessCloudflareTunnelPluginDataConfig' })
|
|
91
|
+
], RemoteAccessCloudflareTunnelPluginConfigModel);
|
|
92
|
+
//# sourceMappingURL=config.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.model.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-cloudflare-tunnel/models/config.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA0G;AAE1G,6CAA8E;AAE9E,8EAAgF;AAChF,4GAKsD;AAG/C,IAAM,6CAA6C,GAAnD,MAAM,6CAA8C,SAAQ,gCAAiB;IAA7E;;QAQN,SAAI,GAAW,uFAA2C,CAAC;QAkB3D,mBAAc,GAAkB,IAAI,CAAC;QASrC,aAAQ,GAA6B,8EAAkC,CAAC;QAcxE,gB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AWlC;IATC,IAAA,qBAAW,EAAC;QACZ,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;KACd,CAAC;IACD,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;IAC3C,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;4FACoB;wDA5DpB,6CAA6C;IADzD,IAAA,mBAAS,EAAC,EAAE,IAAI,EAAE,8CAA8C,EAAE,CAAC;GACvD,6CAA6C,CA6DzD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseSuccessResponseModel } from '../../../modules/api/models/api-response.model';
|
|
2
|
+
export declare class RemoteAccessCloudflareTunnelPluginInstallModel {
|
|
3
|
+
job: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class RemoteAccessCloudflareTunnelPluginInstallResponseModel extends BaseSuccessResponseModel<RemoteAccessCloudflareTunnelPluginInstallModel> {
|
|
6
|
+
data: RemoteAccessCloudflareTunnelPluginInstallModel;
|
|
7
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RemoteAccessCloudflareTunnelPluginInstallResponseModel = exports.RemoteAccessCloudflareTunnelPluginInstallModel = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
|
+
const api_response_model_1 = require("../../../modules/api/models/api-response.model");
|
|
17
|
+
let RemoteAccessCloudflareTunnelPluginInstallModel = class RemoteAccessCloudflareTunnelPluginInstallModel {
|
|
18
|
+
};
|
|
19
|
+
exports.RemoteAccessCloudflareTunnelPluginInstallModel = RemoteAccessCloudflareTunnelPluginInstallModel;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, swagger_1.ApiProperty)({
|
|
22
|
+
description: 'Privileged setup job id, matching the `job` field of RemoteAccessModule.Setup.Progress events',
|
|
23
|
+
type: 'string',
|
|
24
|
+
format: 'uuid',
|
|
25
|
+
example: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
|
|
26
|
+
}),
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], RemoteAccessCloudflareTunnelPluginInstallModel.prototype, "job", void 0);
|
|
31
|
+
exports.RemoteAccessCloudflareTunnelPluginInstallModel = RemoteAccessCloudflareTunnelPluginInstallModel = __decorate([
|
|
32
|
+
(0, swagger_1.ApiSchema)({ name: 'RemoteAccessCloudflareTunnelPluginDataInstall' })
|
|
33
|
+
], RemoteAccessCloudflareTunnelPluginInstallModel);
|
|
34
|
+
let RemoteAccessCloudflareTunnelPluginInstallResponseModel = class RemoteAccessCloudflareTunnelPluginInstallResponseModel extends api_response_model_1.BaseSuccessResponseModel {
|
|
35
|
+
};
|
|
36
|
+
exports.RemoteAccessCloudflareTunnelPluginInstallResponseModel = RemoteAccessCloudflareTunnelPluginInstallResponseModel;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, swagger_1.ApiProperty)({
|
|
39
|
+
description: 'The actual data payload returned by the API',
|
|
40
|
+
type: () => RemoteAccessCloudflareTunnelPluginInstallModel,
|
|
41
|
+
}),
|
|
42
|
+
(0, class_transformer_1.Expose)(),
|
|
43
|
+
__metadata("design:type", RemoteAccessCloudflareTunnelPluginInstallModel)
|
|
44
|
+
], RemoteAccessCloudflareTunnelPluginInstallResponseModel.prototype, "data", void 0);
|
|
45
|
+
exports.RemoteAccessCloudflareTunnelPluginInstallResponseModel = RemoteAccessCloudflareTunnelPluginInstallResponseModel = __decorate([
|
|
46
|
+
(0, swagger_1.ApiSchema)({ name: 'RemoteAccessCloudflareTunnelPluginResInstall' })
|
|
47
|
+
], RemoteAccessCloudflareTunnelPluginInstallResponseModel);
|
|
48
|
+
//# sourceMappingURL=install.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.model.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-cloudflare-tunnel/models/install.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA2C;AAE3C,6CAAyD;AAEzD,uFAA0F;AASnF,IAAM,8CAA8C,GAApD,MAAM,8CAA8C;CAU1D,CAAA;AAVY,wGAA8C;AAS1D;IARC,IAAA,qBAAW,EAAC;QACZ,WAAW,EAAE,+FAA+F;QAC5G,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,sCAAsC;KAC/C,CAAC;IACD,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;;2EACC;yDATA,8CAA8C;IAD1D,IAAA,mBAAS,EAAC,EAAE,IAAI,EAAE,+CAA+C,EAAE,CAAC;GACxD,8CAA8C,CAU1D;AAMM,IAAM,sDAAsD,GAA5D,MAAM,sDAAuD,SAAQ,6CAAwE;CAOnJ,CAAA;AAPY,wHAAsD;AAM1D;IALP,IAAA,qBAAW,EAAC;QACZ,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE,GAAG,EAAE,CAAC,8CAA8C;KAC1D,CAAC;IACD,IAAA,0BAAM,GAAE;8BACK,8CAA8C;oFAAC;iEANjD,sDAAsD;IADlE,IAAA,mBAAS,EAAC,EAAE,IAAI,EAAE,8CAA8C,EAAE,CAAC;GACvD,sDAAsD,CAOlE"}
|