@antelopejs/dms-api 0.1.7 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -8
- package/dist/automation/get-api-health.js +4 -3
- package/dist/automation/get-api-health.js.map +1 -1
- package/dist/automation/route-unhealthy.js +2 -2
- package/dist/automation/route-unhealthy.js.map +1 -1
- package/dist/automation/scope.d.ts +0 -1
- package/dist/automation/scope.js +0 -7
- package/dist/automation/scope.js.map +1 -1
- package/dist/config.d.ts +4 -0
- package/dist/config.js +15 -9
- package/dist/config.js.map +1 -1
- package/dist/db/models/request_log.model.d.ts +37 -2
- package/dist/db/models/request_log.model.js +130 -35
- package/dist/db/models/request_log.model.js.map +1 -1
- package/dist/db/models/request_log.search.d.ts +5 -0
- package/dist/db/models/request_log.search.js +35 -0
- package/dist/db/models/request_log.search.js.map +1 -0
- package/dist/db/models/request_log.status.d.ts +5 -0
- package/dist/db/models/request_log.status.js +9 -0
- package/dist/db/models/request_log.status.js.map +1 -0
- package/dist/db/models/routes.model.d.ts +1 -0
- package/dist/db/models/routes.model.js +5 -1
- package/dist/db/models/routes.model.js.map +1 -1
- package/dist/db/models/routes_statistics.model.js +1 -1
- package/dist/db/models/routes_statistics.model.js.map +1 -1
- package/dist/db/tables/api_settings.table.d.ts +1 -0
- package/dist/db/tables/api_settings.table.js +4 -0
- package/dist/db/tables/api_settings.table.js.map +1 -1
- package/dist/db/tables/request_log.table.d.ts +18 -3
- package/dist/db/tables/request_log.table.js +34 -1
- package/dist/db/tables/request_log.table.js.map +1 -1
- package/dist/db/tables/routes.table.d.ts +1 -2
- package/dist/db/tables/routes.table.js.map +1 -1
- package/dist/db/tables/routes_statistics.table.d.ts +4 -3
- package/dist/db/tables/routes_statistics.table.js +5 -1
- package/dist/db/tables/routes_statistics.table.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/memo.d.ts +5 -0
- package/dist/memo.js +36 -0
- package/dist/memo.js.map +1 -0
- package/dist/pages/blocks.d.ts +3 -0
- package/dist/pages/blocks.js +31 -0
- package/dist/pages/blocks.js.map +1 -0
- package/dist/pages/displays.d.ts +7 -0
- package/dist/pages/displays.js +23 -0
- package/dist/pages/displays.js.map +1 -0
- package/dist/pages/index.d.ts +5 -2
- package/dist/pages/index.js +5 -2
- package/dist/pages/index.js.map +1 -1
- package/dist/pages/logs.d.ts +18 -0
- package/dist/pages/logs.js +112 -0
- package/dist/pages/logs.js.map +1 -0
- package/dist/pages/module.d.ts +3 -0
- package/dist/pages/module.js +102 -6
- package/dist/pages/module.js.map +1 -1
- package/dist/pages/overview.d.ts +14 -0
- package/dist/pages/overview.js +215 -0
- package/dist/pages/overview.js.map +1 -0
- package/dist/pages/period.d.ts +9 -0
- package/dist/pages/period.js +24 -0
- package/dist/pages/period.js.map +1 -0
- package/dist/pages/request-table.d.ts +11 -0
- package/dist/pages/request-table.js +187 -0
- package/dist/pages/request-table.js.map +1 -0
- package/dist/pages/routes.d.ts +15 -0
- package/dist/pages/routes.js +269 -0
- package/dist/pages/routes.js.map +1 -0
- package/dist/pages/scope-chip.d.ts +9 -0
- package/dist/pages/scope-chip.js +28 -0
- package/dist/pages/scope-chip.js.map +1 -0
- package/dist/pages/{logs/page.d.ts → settings.d.ts} +3 -3
- package/dist/pages/settings.js +218 -0
- package/dist/pages/settings.js.map +1 -0
- package/dist/pages/toolbar.d.ts +9 -0
- package/dist/pages/toolbar.js +33 -0
- package/dist/pages/toolbar.js.map +1 -0
- package/dist/realtime.d.ts +2 -0
- package/dist/realtime.js +21 -0
- package/dist/realtime.js.map +1 -0
- package/dist/routes/index.d.ts +2 -2
- package/dist/routes/index.js +2 -2
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/logs.d.ts +173 -2
- package/dist/routes/logs.js +177 -86
- package/dist/routes/logs.js.map +1 -1
- package/dist/routes/overview.d.ts +27 -0
- package/dist/routes/overview.js +131 -0
- package/dist/routes/overview.js.map +1 -0
- package/dist/routes/routes.d.ts +92 -28
- package/dist/routes/routes.js +165 -97
- package/dist/routes/routes.js.map +1 -1
- package/dist/routes/settings.d.ts +16 -11
- package/dist/routes/settings.js +62 -54
- package/dist/routes/settings.js.map +1 -1
- package/dist/routes/tester.d.ts +7 -0
- package/dist/routes/tester.js +34 -0
- package/dist/routes/tester.js.map +1 -0
- package/dist/services/activity.d.ts +49 -0
- package/dist/services/activity.js +207 -0
- package/dist/services/activity.js.map +1 -0
- package/dist/services/aggregate-cache.d.ts +3 -0
- package/dist/services/aggregate-cache.js +16 -0
- package/dist/services/aggregate-cache.js.map +1 -0
- package/dist/services/api-origin.d.ts +1 -0
- package/dist/services/api-origin.js +9 -0
- package/dist/services/api-origin.js.map +1 -0
- package/dist/services/attention.d.ts +45 -0
- package/dist/services/attention.js +203 -0
- package/dist/services/attention.js.map +1 -0
- package/dist/services/composed-text.d.ts +6 -0
- package/dist/services/composed-text.js +23 -0
- package/dist/services/composed-text.js.map +1 -0
- package/dist/services/health-rules.d.ts +49 -0
- package/dist/services/health-rules.js +233 -0
- package/dist/services/health-rules.js.map +1 -0
- package/dist/services/index.d.ts +1 -3
- package/dist/services/index.js +3 -3
- package/dist/services/index.js.map +1 -1
- package/dist/services/introspection/decorators.d.ts +14 -0
- package/dist/services/introspection/decorators.js +192 -0
- package/dist/services/introspection/decorators.js.map +1 -0
- package/dist/services/introspection/errors.js +4 -4
- package/dist/services/introspection/errors.js.map +1 -1
- package/dist/services/introspection/index.d.ts +6 -8
- package/dist/services/introspection/index.js +96 -32
- package/dist/services/introspection/index.js.map +1 -1
- package/dist/services/introspection/probe.d.ts +2 -1
- package/dist/services/introspection/probe.js +11 -0
- package/dist/services/introspection/probe.js.map +1 -1
- package/dist/services/links.d.ts +25 -0
- package/dist/services/links.js +72 -0
- package/dist/services/links.js.map +1 -0
- package/dist/services/live-feed.d.ts +6 -0
- package/dist/services/live-feed.js +18 -0
- package/dist/services/live-feed.js.map +1 -0
- package/dist/services/live.d.ts +16 -0
- package/dist/services/live.js +32 -0
- package/dist/services/live.js.map +1 -0
- package/dist/services/overview.d.ts +122 -0
- package/dist/services/overview.js +324 -0
- package/dist/services/overview.js.map +1 -0
- package/dist/services/period.d.ts +0 -9
- package/dist/services/period.js +5 -52
- package/dist/services/period.js.map +1 -1
- package/dist/services/request-log/access.d.ts +5 -0
- package/dist/services/request-log/access.js +21 -0
- package/dist/services/request-log/access.js.map +1 -0
- package/dist/services/request-log/capture.d.ts +30 -0
- package/dist/services/request-log/capture.js +216 -39
- package/dist/services/request-log/capture.js.map +1 -1
- package/dist/services/request-log/list.d.ts +36 -0
- package/dist/services/request-log/list.js +201 -0
- package/dist/services/request-log/list.js.map +1 -0
- package/dist/services/request-log/read.d.ts +15 -2
- package/dist/services/request-log/read.js +47 -4
- package/dist/services/request-log/read.js.map +1 -1
- package/dist/services/request-log/redaction.d.ts +16 -3
- package/dist/services/request-log/redaction.js +149 -27
- package/dist/services/request-log/redaction.js.map +1 -1
- package/dist/services/request-log/util.d.ts +10 -3
- package/dist/services/request-log/util.js +39 -22
- package/dist/services/request-log/util.js.map +1 -1
- package/dist/services/route-catalog.d.ts +62 -0
- package/dist/services/route-catalog.js +163 -0
- package/dist/services/route-catalog.js.map +1 -0
- package/dist/services/route-contract.d.ts +66 -0
- package/dist/services/route-contract.js +266 -0
- package/dist/services/route-contract.js.map +1 -0
- package/dist/services/route-health.d.ts +35 -0
- package/dist/services/route-health.js +179 -0
- package/dist/services/route-health.js.map +1 -0
- package/dist/services/route-statistics.d.ts +68 -0
- package/dist/services/route-statistics.js +277 -0
- package/dist/services/route-statistics.js.map +1 -0
- package/dist/services/routes-sync.d.ts +7 -3
- package/dist/services/routes-sync.js +96 -20
- package/dist/services/routes-sync.js.map +1 -1
- package/dist/services/scope.d.ts +0 -1
- package/dist/services/scope.js +4 -17
- package/dist/services/scope.js.map +1 -1
- package/dist/services/settings-form.d.ts +131 -0
- package/dist/services/settings-form.js +210 -0
- package/dist/services/settings-form.js.map +1 -0
- package/dist/services/settings.d.ts +2 -0
- package/dist/services/settings.js +5 -0
- package/dist/services/settings.js.map +1 -1
- package/dist/services/statistics-aggregate.d.ts +6 -41
- package/dist/services/statistics-aggregate.js +55 -280
- package/dist/services/statistics-aggregate.js.map +1 -1
- package/dist/services/statistics-utils.d.ts +7 -12
- package/dist/services/statistics-utils.js +36 -51
- package/dist/services/statistics-utils.js.map +1 -1
- package/dist/services/statistics-write.js +64 -22
- package/dist/services/statistics-write.js.map +1 -1
- package/dist/services/tester-source.d.ts +11 -0
- package/dist/services/tester-source.js +48 -0
- package/dist/services/tester-source.js.map +1 -0
- package/dist/services/traffic-samples.d.ts +18 -0
- package/dist/services/traffic-samples.js +134 -0
- package/dist/services/traffic-samples.js.map +1 -0
- package/dist/services/traffic.d.ts +43 -0
- package/dist/services/traffic.js +270 -0
- package/dist/services/traffic.js.map +1 -0
- package/dist/services/window.d.ts +48 -0
- package/dist/services/window.js +179 -0
- package/dist/services/window.js.map +1 -0
- package/dist/types/constants.d.ts +11 -20
- package/dist/types/constants.js +15 -25
- package/dist/types/constants.js.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/statistics.d.ts +5 -3
- package/dist/types/statistics.js +5 -0
- package/dist/types/statistics.js.map +1 -1
- package/frontend-vue/app/components/blocks/BetaBadge.vue +20 -0
- package/frontend-vue/app/components/blocks/HealthHero.vue +708 -0
- package/frontend-vue/app/components/blocks/LiveTraffic.vue +356 -0
- package/frontend-vue/app/components/blocks/LogsEmptyState.vue +228 -0
- package/frontend-vue/app/components/blocks/LogsFilters.vue +279 -0
- package/frontend-vue/app/components/blocks/RequestDetail.vue +722 -0
- package/frontend-vue/app/components/blocks/RetentionInput.vue +227 -0
- package/frontend-vue/app/components/blocks/RouteDocumentation.vue +611 -0
- package/frontend-vue/app/components/blocks/RouteHeader.vue +320 -0
- package/frontend-vue/app/components/blocks/RouteTester.vue +1879 -0
- package/frontend-vue/app/components/blocks/RouteTree.vue +676 -0
- package/frontend-vue/app/components/blocks/ScopeChip.vue +89 -0
- package/frontend-vue/app/components/blocks/SettingNumberInput.vue +65 -0
- package/frontend-vue/app/components/blocks/SplitLayout.vue +41 -0
- package/frontend-vue/app/components/internal/ApiBody.vue +129 -0
- package/frontend-vue/app/components/internal/ApiJsonTree.vue +82 -0
- package/frontend-vue/app/components/internal/ApiKeyValues.vue +41 -0
- package/frontend-vue/app/components/internal/ApiMethodBadge.vue +19 -19
- package/frontend-vue/app/components/internal/ApiPath.vue +33 -0
- package/frontend-vue/app/components/internal/ApiStatusBadge.vue +20 -15
- package/frontend-vue/app/components/internal/ApiTesterBadge.vue +17 -0
- package/frontend-vue/app/composables/useApiOrigin.ts +19 -0
- package/frontend-vue/app/composables/useApiPeriod.ts +19 -0
- package/frontend-vue/app/composables/useApiResource.ts +92 -0
- package/frontend-vue/app/composables/useDateFormat.ts +23 -0
- package/frontend-vue/app/composables/useLiveMissedErrors.ts +33 -0
- package/frontend-vue/app/composables/useRouteDetail.ts +253 -0
- package/frontend-vue/app/composables/useRouteSelection.ts +43 -0
- package/frontend-vue/app/config/shortcuts-registry.ts +30 -0
- package/frontend-vue/app/plugins/displays.ts +92 -0
- package/frontend-vue/app/utils/format.ts +281 -0
- package/frontend-vue/app/utils/http.ts +127 -0
- package/frontend-vue/app/utils/logsQuery.ts +261 -0
- package/frontend-vue/app/utils/minuteHistogram.ts +116 -0
- package/frontend-vue/app/utils/requestDrawer.ts +257 -0
- package/frontend-vue/app/utils/routeExplorer.ts +206 -0
- package/frontend-vue/app/utils/search.ts +45 -0
- package/frontend-vue/app/utils/settingsForm.ts +119 -0
- package/frontend-vue/app/utils/snippets.ts +501 -0
- package/frontend-vue/app/utils/testerHistory.ts +354 -0
- package/frontend-vue/app/utils/testerRequest.ts +632 -11
- package/frontend-vue/dms.frontend.build.ts +7 -0
- package/frontend-vue/dms.frontend.ts +10 -3
- package/frontend-vue/i18n/locales/api-en-GB.json +866 -0
- package/frontend-vue/i18n/locales/api-fr-FR.json +866 -0
- package/frontend-vue/package.json +2 -6
- package/frontend-vue/pnpm-lock.yaml +97 -3375
- package/frontend-vue/tests/format.test.ts +180 -0
- package/frontend-vue/tests/http.test.ts +61 -0
- package/frontend-vue/tests/logsQuery.test.ts +255 -0
- package/frontend-vue/tests/minuteHistogram.test.ts +94 -0
- package/frontend-vue/tests/registration.test.ts +24 -7
- package/frontend-vue/tests/requestDrawer.test.ts +179 -0
- package/frontend-vue/tests/routeExplorer.test.ts +206 -0
- package/frontend-vue/tests/settingsForm.test.ts +155 -0
- package/frontend-vue/tests/snippets.test.ts +285 -0
- package/frontend-vue/tests/testerHistory.test.ts +295 -0
- package/frontend-vue/tests/testerRequest.test.ts +471 -76
- package/package.json +9 -9
- package/dist/middlewares/index.d.ts +0 -1
- package/dist/middlewares/index.js +0 -18
- package/dist/middlewares/index.js.map +0 -1
- package/dist/middlewares/request-log-capture.d.ts +0 -1
- package/dist/middlewares/request-log-capture.js +0 -6
- package/dist/middlewares/request-log-capture.js.map +0 -1
- package/dist/pages/all.d.ts +0 -4
- package/dist/pages/all.js +0 -21
- package/dist/pages/all.js.map +0 -1
- package/dist/pages/logs/page.js +0 -29
- package/dist/pages/logs/page.js.map +0 -1
- package/dist/pages/routes/page.d.ts +0 -9
- package/dist/pages/routes/page.js +0 -29
- package/dist/pages/routes/page.js.map +0 -1
- package/dist/pages/settings/form.d.ts +0 -3
- package/dist/pages/settings/form.js +0 -80
- package/dist/pages/settings/form.js.map +0 -1
- package/dist/pages/settings/page.d.ts +0 -9
- package/dist/pages/settings/page.js +0 -26
- package/dist/pages/settings/page.js.map +0 -1
- package/dist/pages/summary/page.d.ts +0 -9
- package/dist/pages/summary/page.js +0 -29
- package/dist/pages/summary/page.js.map +0 -1
- package/dist/routes/monitoring.d.ts +0 -17
- package/dist/routes/monitoring.js +0 -101
- package/dist/routes/monitoring.js.map +0 -1
- package/dist/routes/summary.d.ts +0 -32
- package/dist/routes/summary.js +0 -181
- package/dist/routes/summary.js.map +0 -1
- package/dist/services/request-log/index.d.ts +0 -3
- package/dist/services/request-log/index.js +0 -12
- package/dist/services/request-log/index.js.map +0 -1
- package/dist/services/statistics-read.d.ts +0 -4
- package/dist/services/statistics-read.js +0 -48
- package/dist/services/statistics-read.js.map +0 -1
- package/dist/services/tree.d.ts +0 -10
- package/dist/services/tree.js +0 -128
- package/dist/services/tree.js.map +0 -1
- package/dist/types/charts.d.ts +0 -9
- package/dist/types/charts.js +0 -3
- package/dist/types/charts.js.map +0 -1
- package/frontend-vue/app/components/ConfigurationView.vue +0 -187
- package/frontend-vue/app/components/DocumentationView.vue +0 -224
- package/frontend-vue/app/components/LogDetailDrawer.vue +0 -178
- package/frontend-vue/app/components/LogsView.vue +0 -347
- package/frontend-vue/app/components/RouteDetailTabs.vue +0 -179
- package/frontend-vue/app/components/RouteTree.vue +0 -196
- package/frontend-vue/app/components/RoutesView.vue +0 -79
- package/frontend-vue/app/components/StatsView.vue +0 -268
- package/frontend-vue/app/components/SummaryView.vue +0 -657
- package/frontend-vue/app/components/TesterPanel.vue +0 -499
- package/frontend-vue/app/components/internal/PeriodSelect.vue +0 -58
- package/frontend-vue/app/components/internal/RouteTreeNode.vue +0 -168
- package/frontend-vue/app/components/internal/StatusBreakdownBars.vue +0 -162
- package/frontend-vue/app/components/internal/StatusDonut.vue +0 -84
- package/frontend-vue/app/components/internal/UnitAreaChart.vue +0 -73
- package/frontend-vue/app/composables/useApiIntrospection.ts +0 -350
- package/frontend-vue/app/composables/useLogDetailDrawer.ts +0 -50
- package/frontend-vue/app/composables/useSelectedPeriod.ts +0 -107
- package/frontend-vue/app/composables/useStatsPeriods.ts +0 -139
- package/frontend-vue/app/custom-layouts/.gitkeep +0 -0
- package/frontend-vue/app/custom-pages/.gitkeep +0 -0
- package/frontend-vue/app/utils/httpMethod.ts +0 -49
- package/frontend-vue/app/utils/statusClass.ts +0 -49
- package/frontend-vue/i18n/locales/en-GB.json +0 -240
- package/frontend-vue/i18n/locales/fr-FR.json +0 -240
- package/frontend-vue/public/.gitkeep +0 -0
- package/frontend-vue/server/.gitkeep +0 -0
- package/frontend-vue/tests/periods.test.ts +0 -145
- package/frontend-vue/tests/persistence.test.ts +0 -45
|
@@ -0,0 +1,218 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SettingsPage = void 0;
|
|
10
|
+
const default_types_1 = require("@antelopejs/interface-dms/base/data-types/default-types");
|
|
11
|
+
const field_types_1 = require("@antelopejs/interface-dms/base/data-types/field-types");
|
|
12
|
+
const form_1 = require("@antelopejs/interface-dms/base/form");
|
|
13
|
+
const layouts_1 = require("@antelopejs/interface-dms/base/layouts");
|
|
14
|
+
const types_1 = require("@antelopejs/interface-dms/base/types");
|
|
15
|
+
const page_1 = require("@antelopejs/interface-dms/page");
|
|
16
|
+
const config_1 = require("@/config");
|
|
17
|
+
const settings_form_1 = require("@/services/settings-form");
|
|
18
|
+
const module_1 = require("./module");
|
|
19
|
+
const SETTINGS_URL = "/api/monitoring/settings";
|
|
20
|
+
const RETENTION_IMPACT_URL = `${SETTINGS_URL}/retention-impact`;
|
|
21
|
+
function apiInput(name, options) {
|
|
22
|
+
return { componentName: `DmsApi${name}`, options };
|
|
23
|
+
}
|
|
24
|
+
const scopeType = new default_types_1.DefaultDataTypes.SelectType({
|
|
25
|
+
display: "cards",
|
|
26
|
+
columns: 3,
|
|
27
|
+
deselectable: false,
|
|
28
|
+
items: [
|
|
29
|
+
{
|
|
30
|
+
value: "own",
|
|
31
|
+
label: "$api.settings.scope.own",
|
|
32
|
+
description: "$api.settings.scope.own_description",
|
|
33
|
+
icon: "i-ph-code",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
value: "modules",
|
|
37
|
+
label: "$api.settings.scope.modules",
|
|
38
|
+
description: "$api.settings.scope.modules_description",
|
|
39
|
+
icon: "i-ph-puzzle-piece",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
value: "all",
|
|
43
|
+
label: "$api.settings.scope.all",
|
|
44
|
+
description: "$api.settings.scope.all_description",
|
|
45
|
+
icon: "i-ph-stack",
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
});
|
|
49
|
+
const { logRetentionDays, maxBodyKb, slowThresholdMs, capturedHeaders } = settings_form_1.SETTINGS_BOUNDS;
|
|
50
|
+
const maxBodyInput = { min: maxBodyKb.min, max: maxBodyKb.max, step: 1 };
|
|
51
|
+
const headersInput = {
|
|
52
|
+
max: capturedHeaders.max,
|
|
53
|
+
placeholder: "$api.settings.capture.headers_placeholder",
|
|
54
|
+
suggestions: ["stripe-signature", "x-forwarded-for", "x-idempotency-key"],
|
|
55
|
+
};
|
|
56
|
+
const retentionType = new default_types_1.DefaultDataTypes.NumberType({
|
|
57
|
+
min: logRetentionDays.min,
|
|
58
|
+
max: logRetentionDays.max,
|
|
59
|
+
step: 1,
|
|
60
|
+
});
|
|
61
|
+
const statisticsRetentionType = new default_types_1.DefaultDataTypes.NumberType({
|
|
62
|
+
min: Math.min(...config_1.STATISTICS_LIFETIME_DAY_CHOICES),
|
|
63
|
+
max: Math.max(...config_1.STATISTICS_LIFETIME_DAY_CHOICES),
|
|
64
|
+
step: config_1.STATISTICS_LIFETIME_DAY_CHOICES[0],
|
|
65
|
+
});
|
|
66
|
+
const settingsForm = (0, form_1.Form)({
|
|
67
|
+
fetchUrl: SETTINGS_URL,
|
|
68
|
+
submitUrl: SETTINGS_URL,
|
|
69
|
+
submitUrlMethod: types_1.HttpMethod.post,
|
|
70
|
+
successMessage: "$api.settings.saved",
|
|
71
|
+
sectionNav: "none",
|
|
72
|
+
sections: [
|
|
73
|
+
{
|
|
74
|
+
id: "visibility",
|
|
75
|
+
label: "$api.settings.sections.visibility",
|
|
76
|
+
description: "$api.settings.sections.visibility_description",
|
|
77
|
+
icon: "i-ph-eye",
|
|
78
|
+
fields: [
|
|
79
|
+
{
|
|
80
|
+
id: settings_form_1.SETTINGS_FIELDS.scope,
|
|
81
|
+
label: "$api.settings.scope.label",
|
|
82
|
+
description: "$api.settings.scope.description",
|
|
83
|
+
type: scopeType,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "retention",
|
|
89
|
+
label: "$api.settings.sections.retention",
|
|
90
|
+
description: "$api.settings.sections.retention_description",
|
|
91
|
+
icon: "i-ph-clock-counter-clockwise",
|
|
92
|
+
fields: [
|
|
93
|
+
{
|
|
94
|
+
id: settings_form_1.SETTINGS_FIELDS.logRetention,
|
|
95
|
+
label: "$api.settings.retention.logs",
|
|
96
|
+
description: "$api.settings.retention.logs_description",
|
|
97
|
+
hint: "$api.settings.retention.logs_hint",
|
|
98
|
+
type: retentionType,
|
|
99
|
+
inputComponent: apiInput("RetentionInput", {
|
|
100
|
+
kind: "logs",
|
|
101
|
+
min: logRetentionDays.min,
|
|
102
|
+
max: logRetentionDays.max,
|
|
103
|
+
impactUrl: RETENTION_IMPACT_URL,
|
|
104
|
+
}),
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: settings_form_1.SETTINGS_FIELDS.statsRetention,
|
|
108
|
+
label: "$api.settings.retention.statistics",
|
|
109
|
+
description: "$api.settings.retention.statistics_description",
|
|
110
|
+
type: statisticsRetentionType,
|
|
111
|
+
inputComponent: apiInput("RetentionInput", {
|
|
112
|
+
kind: "statistics",
|
|
113
|
+
choices: [...config_1.STATISTICS_LIFETIME_DAY_CHOICES],
|
|
114
|
+
defaultChoice: config_1.DEFAULT_STATISTICS_LIFETIME_DAYS,
|
|
115
|
+
impactUrl: RETENTION_IMPACT_URL,
|
|
116
|
+
}),
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "capture",
|
|
122
|
+
label: "$api.settings.sections.capture",
|
|
123
|
+
description: "$api.settings.sections.capture_description",
|
|
124
|
+
icon: "i-ph-shield-check",
|
|
125
|
+
fields: [
|
|
126
|
+
{
|
|
127
|
+
id: settings_form_1.SETTINGS_FIELDS.maxBody,
|
|
128
|
+
label: "$api.settings.capture.max_body",
|
|
129
|
+
description: "$api.settings.capture.max_body_description",
|
|
130
|
+
hint: "$api.settings.capture.max_body_hint",
|
|
131
|
+
type: new default_types_1.DefaultDataTypes.NumberType(maxBodyInput),
|
|
132
|
+
inputComponent: apiInput("SettingNumberInput", maxBodyInput),
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: settings_form_1.SETTINGS_FIELDS.headers,
|
|
136
|
+
label: "$api.settings.capture.headers",
|
|
137
|
+
description: "$api.settings.capture.headers_description",
|
|
138
|
+
hint: "$api.settings.capture.headers_hint",
|
|
139
|
+
type: new field_types_1.TagsType(headersInput),
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: settings_form_1.SETTINGS_FIELDS.redacted,
|
|
143
|
+
label: "$api.settings.capture.redacted",
|
|
144
|
+
description: "$api.settings.capture.redacted_description",
|
|
145
|
+
hint: "$api.settings.capture.redacted_hint",
|
|
146
|
+
type: new field_types_1.TagsType(),
|
|
147
|
+
readonly: {
|
|
148
|
+
badge: { label: "$api.settings.capture.always", tone: "neutral" },
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: "thresholds",
|
|
155
|
+
label: "$api.settings.sections.thresholds",
|
|
156
|
+
description: "$api.settings.sections.thresholds_description",
|
|
157
|
+
icon: "i-ph-gauge",
|
|
158
|
+
fields: [
|
|
159
|
+
{
|
|
160
|
+
id: settings_form_1.SETTINGS_FIELDS.slowThreshold,
|
|
161
|
+
label: "$api.settings.thresholds.slow",
|
|
162
|
+
description: "$api.settings.thresholds.slow_description",
|
|
163
|
+
hint: "$api.settings.thresholds.slow_hint",
|
|
164
|
+
type: new default_types_1.DefaultDataTypes.NumberType(slowThresholdMs),
|
|
165
|
+
inputComponent: apiInput("SettingNumberInput", slowThresholdMs),
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: settings_form_1.SETTINGS_FIELDS.errorRate,
|
|
169
|
+
label: "$api.settings.thresholds.error_rate",
|
|
170
|
+
description: "$api.settings.thresholds.error_rate_description",
|
|
171
|
+
type: new default_types_1.DefaultDataTypes.PercentageType(),
|
|
172
|
+
readonly: {
|
|
173
|
+
badge: { label: "$api.settings.thresholds.fixed", tone: "neutral" },
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
id: settings_form_1.SETTINGS_FIELDS.downRate,
|
|
178
|
+
label: "$api.settings.thresholds.down_rate",
|
|
179
|
+
description: "$api.settings.thresholds.down_rate_description",
|
|
180
|
+
type: new default_types_1.DefaultDataTypes.PercentageType(),
|
|
181
|
+
readonly: {
|
|
182
|
+
badge: { label: "$api.settings.thresholds.fixed", tone: "neutral" },
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
}).meta({ name: "$api.settings.form", icon: "i-ph-sliders-horizontal" });
|
|
189
|
+
function patchFields(fields, patches) {
|
|
190
|
+
return fields.map((field) => {
|
|
191
|
+
const patch = patches[field.id];
|
|
192
|
+
return patch
|
|
193
|
+
? { ...field, ...patch }
|
|
194
|
+
: field;
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
settingsForm.onFilter((_permissions, options) => {
|
|
198
|
+
const context = (0, settings_form_1.getSettingsFormContext)();
|
|
199
|
+
return {
|
|
200
|
+
...options,
|
|
201
|
+
fields: patchFields(options.fields, context.patches),
|
|
202
|
+
};
|
|
203
|
+
});
|
|
204
|
+
let SettingsPage = class SettingsPage extends (0, page_1.PageController)("settings", {
|
|
205
|
+
displayName: "$api.settings.title",
|
|
206
|
+
description: "$api.settings.description",
|
|
207
|
+
icon: "i-ph-sliders",
|
|
208
|
+
module: "api",
|
|
209
|
+
category: module_1.configureCategory,
|
|
210
|
+
order: 0,
|
|
211
|
+
}, (0, layouts_1.FormPageLayout)()) {
|
|
212
|
+
static form = settingsForm;
|
|
213
|
+
};
|
|
214
|
+
exports.SettingsPage = SettingsPage;
|
|
215
|
+
exports.SettingsPage = SettingsPage = __decorate([
|
|
216
|
+
(0, page_1.RegisterPage)()
|
|
217
|
+
], SettingsPage);
|
|
218
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/pages/settings.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2FAA2F;AAC3F,uFAAiF;AACjF,8DAI6C;AAC7C,oEAAwE;AACxE,gEAAkE;AAElE,yDAA8E;AAC9E,qCAGkB;AAClB,4DAIkC;AAClC,qCAA6C;AAE7C,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAChD,MAAM,oBAAoB,GAAG,GAAG,YAAY,mBAAmB,CAAC;AAGhE,SAAS,QAAQ,CAAI,IAAY,EAAE,OAAU;IAC3C,OAAO,EAAE,aAAa,EAAE,SAAS,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC;AACrD,CAAC;AAED,MAAM,SAAS,GAAG,IAAI,gCAAgB,CAAC,UAAU,CAAC;IAChD,OAAO,EAAE,OAAO;IAEhB,OAAO,EAAE,CAAC;IACV,YAAY,EAAE,KAAK;IACnB,KAAK,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AAY,GAAlB,MAAM,YAAa,SAAQ,IAAA,qBAAc,EAC9C,UAAU,EACV;IACE,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,2BAA2B;IACxC,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,0BAAiB;IAC3B,KAAK,EAAE,CAAC;CACT,EACD,IAAA,wBAAc,GAAE,CACjB;IACC,MAAM,CAAC,IAAI,GAAG,YAAY,CAAC;;AAZhB,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAY,GAAE;GACF,YAAY,CAaxB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Component, ComponentBuilder } from "@antelopejs/interface-dms/component";
|
|
2
|
+
import type { PageLiveOptions } from "@antelopejs/interface-dms/page";
|
|
3
|
+
export declare function liveMode(maxRate: number, slowMaxRate?: number): PageLiveOptions;
|
|
4
|
+
export interface PageToolbarParts {
|
|
5
|
+
scope: Component;
|
|
6
|
+
badge?: Component;
|
|
7
|
+
period: Component;
|
|
8
|
+
}
|
|
9
|
+
export declare function pageToolbar(parts: PageToolbarParts): ComponentBuilder;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.liveMode = liveMode;
|
|
4
|
+
exports.pageToolbar = pageToolbar;
|
|
5
|
+
const live_toggle_1 = require("@antelopejs/interface-dms/base/live-toggle");
|
|
6
|
+
const stack_1 = require("@antelopejs/interface-dms/base/stack");
|
|
7
|
+
function liveMode(maxRate, slowMaxRate) {
|
|
8
|
+
return {
|
|
9
|
+
maxRate,
|
|
10
|
+
...(slowMaxRate && {
|
|
11
|
+
slowRateAfter: { period: "7d", maxRate: slowMaxRate },
|
|
12
|
+
}),
|
|
13
|
+
rememberKey: "api",
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function pageToolbar(parts) {
|
|
17
|
+
const toolbar = (0, stack_1.HStack)({
|
|
18
|
+
alignment: "center",
|
|
19
|
+
spacing: "0.75rem",
|
|
20
|
+
wrap: true,
|
|
21
|
+
}).child("scope", parts.scope);
|
|
22
|
+
if (parts.badge)
|
|
23
|
+
toolbar.child("beta", parts.badge);
|
|
24
|
+
return toolbar
|
|
25
|
+
.child("spacer", (0, stack_1.Spacer)())
|
|
26
|
+
.child("live", (0, live_toggle_1.LiveToggle)({
|
|
27
|
+
align: "right",
|
|
28
|
+
variant: "pill",
|
|
29
|
+
missedLabel: "$api.live_mode.new_requests",
|
|
30
|
+
}))
|
|
31
|
+
.child("period", parts.period);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.js","sourceRoot":"","sources":["../../src/pages/toolbar.ts"],"names":[],"mappings":";;AAeA,4BAWC;AAqBD,kCAkBC;AAjED,4EAAwE;AACxE,gEAAsE;AActE,SAAgB,QAAQ,CACtB,OAAe,EACf,WAAoB;IAEpB,OAAO;QACL,OAAO;QACP,GAAG,CAAC,WAAW,IAAI;YACjB,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE;SACtD,CAAC;QACF,WAAW,EAAE,KAAK;KACnB,CAAC;AACJ,CAAC;AAqBD,SAAgB,WAAW,CAAC,KAAuB;IACjD,MAAM,OAAO,GAAG,IAAA,cAAM,EAAC;QACrB,SAAS,EAAE,QAAQ;QACnB,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,IAAI;KACX,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,IAAI,KAAK,CAAC,KAAK;QAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpD,OAAO,OAAO;SACX,KAAK,CAAC,QAAQ,EAAE,IAAA,cAAM,GAAE,CAAC;SACzB,KAAK,CACJ,MAAM,EACN,IAAA,wBAAU,EAAC;QACT,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,MAAM;QACf,WAAW,EAAE,6BAA6B;KAC3C,CAAC,CACH;SACA,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC"}
|
package/dist/realtime.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.livePageIds = livePageIds;
|
|
4
|
+
exports.registerLiveTopics = registerLiveTopics;
|
|
5
|
+
const interface_core_1 = require("@antelopejs/interface-core");
|
|
6
|
+
const page_1 = require("@antelopejs/interface-dms/page");
|
|
7
|
+
const realtime_1 = require("@antelopejs/interface-dms/realtime");
|
|
8
|
+
const logs_1 = require("./pages/logs");
|
|
9
|
+
const overview_1 = require("./pages/overview");
|
|
10
|
+
const routes_1 = require("./pages/routes");
|
|
11
|
+
const constants_1 = require("./types/constants");
|
|
12
|
+
const LIVE_PAGES = [overview_1.OverviewPage, logs_1.LogsPage, routes_1.RoutesPage];
|
|
13
|
+
function livePageIds() {
|
|
14
|
+
return LIVE_PAGES.map((page) => (0, interface_core_1.GetMetadata)(page, page_1.PageMetadata).pageInfo?.fullId ?? "").filter((fullId) => fullId.length > 0);
|
|
15
|
+
}
|
|
16
|
+
function registerLiveTopics() {
|
|
17
|
+
for (const pageId of livePageIds()) {
|
|
18
|
+
(0, realtime_1.RegisterPageTopic)(pageId, constants_1.LIVE_REQUESTS_TOPIC);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=realtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime.js","sourceRoot":"","sources":["../src/realtime.ts"],"names":[],"mappings":";;AAaA,kCAIC;AAMD,gDAIC;AA1BD,+DAAyD;AACzD,yDAA8D;AAC9D,iEAAuE;AACvE,uCAAwC;AACxC,+CAAgD;AAChD,2CAA4C;AAC5C,iDAAwD;AAGxD,MAAM,UAAU,GAAsB,CAAC,uBAAY,EAAE,eAAQ,EAAE,mBAAU,CAAC,CAAC;AAG3E,SAAgB,WAAW;IACzB,OAAO,UAAU,CAAC,GAAG,CACnB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,4BAAW,EAAC,IAAI,EAAE,mBAAY,CAAC,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,CACjE,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC1C,CAAC;AAMD,SAAgB,kBAAkB;IAChC,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,EAAE,CAAC;QACnC,IAAA,4BAAiB,EAAC,MAAM,EAAE,+BAAmB,CAAC,CAAC;IACjD,CAAC;AACH,CAAC"}
|
package/dist/routes/index.d.ts
CHANGED
package/dist/routes/index.js
CHANGED
|
@@ -15,8 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./logs"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./overview"), exports);
|
|
19
19
|
__exportStar(require("./routes"), exports);
|
|
20
20
|
__exportStar(require("./settings"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
21
|
+
__exportStar(require("./tester"), exports);
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
package/dist/routes/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,6CAA2B;AAC3B,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB"}
|
package/dist/routes/logs.d.ts
CHANGED
|
@@ -1,7 +1,178 @@
|
|
|
1
|
+
import { type RequestContext } from "@antelopejs/interface-api";
|
|
1
2
|
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
2
3
|
declare const LogsController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
3
4
|
export declare class LogsController extends LogsController_base {
|
|
4
|
-
listLogs(_user: User,
|
|
5
|
-
|
|
5
|
+
listLogs(_user: User, context: RequestContext): Promise<import("@/services/request-log/list").RequestLogTablePage>;
|
|
6
|
+
listRecent(_user: User, context: RequestContext): Promise<import("@/services/request-log/list").RequestLogTablePage>;
|
|
7
|
+
listForRoutes(_user: User, context: RequestContext): Promise<import("@/services/request-log/list").RequestLogTablePage>;
|
|
8
|
+
listForTester(_user: User, context: RequestContext): Promise<import("@/services/request-log/list").RequestLogTablePage>;
|
|
9
|
+
getLive(_user: User): Promise<{
|
|
10
|
+
retentionDays: number;
|
|
11
|
+
buckets: import("@/services/live").LiveBucket[];
|
|
12
|
+
total: number;
|
|
13
|
+
clientErrors: number;
|
|
14
|
+
serverErrors: number;
|
|
15
|
+
refreshedAt: string;
|
|
16
|
+
}>;
|
|
17
|
+
getRecentLog(_user: User, id: string): Promise<{
|
|
18
|
+
_id: string;
|
|
19
|
+
timestamp: Date;
|
|
20
|
+
method: string;
|
|
21
|
+
routeMethod: string | null;
|
|
22
|
+
uri: string;
|
|
23
|
+
rawPath: string;
|
|
24
|
+
statusCode: number;
|
|
25
|
+
responseTimeMs: number | null;
|
|
26
|
+
source: "tester" | null;
|
|
27
|
+
requestId: string | null;
|
|
28
|
+
ip: string | undefined;
|
|
29
|
+
userAgent: string | undefined;
|
|
30
|
+
pathParams: Record<string, string>;
|
|
31
|
+
query: Record<string, string | string[]>;
|
|
32
|
+
requestHeaders: Record<string, string>;
|
|
33
|
+
requestBody: string | undefined;
|
|
34
|
+
requestBodyTruncated: boolean;
|
|
35
|
+
requestBodyOmitted: import("@/db").RequestLogBodyOmission | null;
|
|
36
|
+
requestBodySize: number | null;
|
|
37
|
+
responseHeaders: Record<string, string>;
|
|
38
|
+
responseBody: string | undefined;
|
|
39
|
+
responseBodyTruncated: boolean;
|
|
40
|
+
responseBodyOmitted: import("@/db").RequestLogBodyOmission | null;
|
|
41
|
+
responseBodySize: number | null;
|
|
42
|
+
redactions: import("@/db").RequestLogRedactions;
|
|
43
|
+
error: import("@/db").RequestLogError | undefined;
|
|
44
|
+
route: string;
|
|
45
|
+
routeRegistered: boolean;
|
|
46
|
+
slowThresholdMs: number;
|
|
47
|
+
routeLatency: import("@/services/request-log/read").RouteLatency | null;
|
|
48
|
+
apiOrigin: string | null;
|
|
49
|
+
links: {
|
|
50
|
+
route: string | null;
|
|
51
|
+
tester: string | null;
|
|
52
|
+
sameError: string | null;
|
|
53
|
+
sameRoute: string | null;
|
|
54
|
+
samePath: string | null;
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
57
|
+
getTesterLog(_user: User, id: string): Promise<{
|
|
58
|
+
_id: string;
|
|
59
|
+
timestamp: Date;
|
|
60
|
+
method: string;
|
|
61
|
+
routeMethod: string | null;
|
|
62
|
+
uri: string;
|
|
63
|
+
rawPath: string;
|
|
64
|
+
statusCode: number;
|
|
65
|
+
responseTimeMs: number | null;
|
|
66
|
+
source: "tester" | null;
|
|
67
|
+
requestId: string | null;
|
|
68
|
+
ip: string | undefined;
|
|
69
|
+
userAgent: string | undefined;
|
|
70
|
+
pathParams: Record<string, string>;
|
|
71
|
+
query: Record<string, string | string[]>;
|
|
72
|
+
requestHeaders: Record<string, string>;
|
|
73
|
+
requestBody: string | undefined;
|
|
74
|
+
requestBodyTruncated: boolean;
|
|
75
|
+
requestBodyOmitted: import("@/db").RequestLogBodyOmission | null;
|
|
76
|
+
requestBodySize: number | null;
|
|
77
|
+
responseHeaders: Record<string, string>;
|
|
78
|
+
responseBody: string | undefined;
|
|
79
|
+
responseBodyTruncated: boolean;
|
|
80
|
+
responseBodyOmitted: import("@/db").RequestLogBodyOmission | null;
|
|
81
|
+
responseBodySize: number | null;
|
|
82
|
+
redactions: import("@/db").RequestLogRedactions;
|
|
83
|
+
error: import("@/db").RequestLogError | undefined;
|
|
84
|
+
route: string;
|
|
85
|
+
routeRegistered: boolean;
|
|
86
|
+
slowThresholdMs: number;
|
|
87
|
+
routeLatency: import("@/services/request-log/read").RouteLatency | null;
|
|
88
|
+
apiOrigin: string | null;
|
|
89
|
+
links: {
|
|
90
|
+
route: string | null;
|
|
91
|
+
tester: string | null;
|
|
92
|
+
sameError: string | null;
|
|
93
|
+
sameRoute: string | null;
|
|
94
|
+
samePath: string | null;
|
|
95
|
+
};
|
|
96
|
+
}>;
|
|
97
|
+
getRoutesLog(_user: User, id: string): Promise<{
|
|
98
|
+
_id: string;
|
|
99
|
+
timestamp: Date;
|
|
100
|
+
method: string;
|
|
101
|
+
routeMethod: string | null;
|
|
102
|
+
uri: string;
|
|
103
|
+
rawPath: string;
|
|
104
|
+
statusCode: number;
|
|
105
|
+
responseTimeMs: number | null;
|
|
106
|
+
source: "tester" | null;
|
|
107
|
+
requestId: string | null;
|
|
108
|
+
ip: string | undefined;
|
|
109
|
+
userAgent: string | undefined;
|
|
110
|
+
pathParams: Record<string, string>;
|
|
111
|
+
query: Record<string, string | string[]>;
|
|
112
|
+
requestHeaders: Record<string, string>;
|
|
113
|
+
requestBody: string | undefined;
|
|
114
|
+
requestBodyTruncated: boolean;
|
|
115
|
+
requestBodyOmitted: import("@/db").RequestLogBodyOmission | null;
|
|
116
|
+
requestBodySize: number | null;
|
|
117
|
+
responseHeaders: Record<string, string>;
|
|
118
|
+
responseBody: string | undefined;
|
|
119
|
+
responseBodyTruncated: boolean;
|
|
120
|
+
responseBodyOmitted: import("@/db").RequestLogBodyOmission | null;
|
|
121
|
+
responseBodySize: number | null;
|
|
122
|
+
redactions: import("@/db").RequestLogRedactions;
|
|
123
|
+
error: import("@/db").RequestLogError | undefined;
|
|
124
|
+
route: string;
|
|
125
|
+
routeRegistered: boolean;
|
|
126
|
+
slowThresholdMs: number;
|
|
127
|
+
routeLatency: import("@/services/request-log/read").RouteLatency | null;
|
|
128
|
+
apiOrigin: string | null;
|
|
129
|
+
links: {
|
|
130
|
+
route: string | null;
|
|
131
|
+
tester: string | null;
|
|
132
|
+
sameError: string | null;
|
|
133
|
+
sameRoute: string | null;
|
|
134
|
+
samePath: string | null;
|
|
135
|
+
};
|
|
136
|
+
}>;
|
|
137
|
+
getLog(_user: User, id: string): Promise<{
|
|
138
|
+
_id: string;
|
|
139
|
+
timestamp: Date;
|
|
140
|
+
method: string;
|
|
141
|
+
routeMethod: string | null;
|
|
142
|
+
uri: string;
|
|
143
|
+
rawPath: string;
|
|
144
|
+
statusCode: number;
|
|
145
|
+
responseTimeMs: number | null;
|
|
146
|
+
source: "tester" | null;
|
|
147
|
+
requestId: string | null;
|
|
148
|
+
ip: string | undefined;
|
|
149
|
+
userAgent: string | undefined;
|
|
150
|
+
pathParams: Record<string, string>;
|
|
151
|
+
query: Record<string, string | string[]>;
|
|
152
|
+
requestHeaders: Record<string, string>;
|
|
153
|
+
requestBody: string | undefined;
|
|
154
|
+
requestBodyTruncated: boolean;
|
|
155
|
+
requestBodyOmitted: import("@/db").RequestLogBodyOmission | null;
|
|
156
|
+
requestBodySize: number | null;
|
|
157
|
+
responseHeaders: Record<string, string>;
|
|
158
|
+
responseBody: string | undefined;
|
|
159
|
+
responseBodyTruncated: boolean;
|
|
160
|
+
responseBodyOmitted: import("@/db").RequestLogBodyOmission | null;
|
|
161
|
+
responseBodySize: number | null;
|
|
162
|
+
redactions: import("@/db").RequestLogRedactions;
|
|
163
|
+
error: import("@/db").RequestLogError | undefined;
|
|
164
|
+
route: string;
|
|
165
|
+
routeRegistered: boolean;
|
|
166
|
+
slowThresholdMs: number;
|
|
167
|
+
routeLatency: import("@/services/request-log/read").RouteLatency | null;
|
|
168
|
+
apiOrigin: string | null;
|
|
169
|
+
links: {
|
|
170
|
+
route: string | null;
|
|
171
|
+
tester: string | null;
|
|
172
|
+
sameError: string | null;
|
|
173
|
+
sameRoute: string | null;
|
|
174
|
+
samePath: string | null;
|
|
175
|
+
};
|
|
176
|
+
}>;
|
|
6
177
|
}
|
|
7
178
|
export {};
|