@dx-do/client 7.18.0 → 8.0.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 +1 -14
- package/dist/index.cjs.js +36253 -35123
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +35890 -34838
- package/dist/index.esm.js.map +1 -1
- package/dist/src/index.d.ts +24 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/model/alert/PlatformAlert.d.ts +2 -1
- package/dist/src/lib/model/alert/PlatformAlert.d.ts.map +1 -1
- package/dist/src/lib/model/config/DXSaaSConfiguration.d.ts +0 -4
- package/dist/src/lib/model/config/DXSaaSConfiguration.d.ts.map +1 -1
- package/dist/src/lib/model/datastore/index.d.ts +1 -0
- package/dist/src/lib/model/datastore/index.d.ts.map +1 -1
- package/dist/src/lib/model/datastore/metric-data/index.d.ts +2 -0
- package/dist/src/lib/model/datastore/metric-data/index.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/metric-data/metric-data.d.ts +40 -0
- package/dist/src/lib/model/datastore/metric-data/metric-data.d.ts.map +1 -0
- package/dist/src/lib/model/log/log-metric-apply.d.ts +69 -0
- package/dist/src/lib/model/log/log-metric-apply.d.ts.map +1 -0
- package/dist/src/lib/model/log/log-metric.d.ts +222 -0
- package/dist/src/lib/model/log/log-metric.d.ts.map +1 -0
- package/dist/src/lib/model/maintenance/delete.d.ts +2 -3
- package/dist/src/lib/model/maintenance/delete.d.ts.map +1 -1
- package/dist/src/lib/model/managementmodule/management-module-export.d.ts +110 -0
- package/dist/src/lib/model/managementmodule/management-module-export.d.ts.map +1 -0
- package/dist/src/lib/model/managementmodule/management-module-relink.d.ts +30 -0
- package/dist/src/lib/model/managementmodule/management-module-relink.d.ts.map +1 -0
- package/dist/src/lib/model/managementmodule/management-module-transform-presets.d.ts +4 -0
- package/dist/src/lib/model/managementmodule/management-module-transform-presets.d.ts.map +1 -0
- package/dist/src/lib/model/managementmodule/management-module-transform.d.ts +110 -0
- package/dist/src/lib/model/managementmodule/management-module-transform.d.ts.map +1 -0
- package/dist/src/lib/model/metricgrouping/PlatformMetricGrouping.d.ts +23 -3
- package/dist/src/lib/model/metricgrouping/PlatformMetricGrouping.d.ts.map +1 -1
- package/dist/src/lib/model/metricgrouping/metric-grouping-filter.d.ts +42 -0
- package/dist/src/lib/model/metricgrouping/metric-grouping-filter.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/auth.d.ts +220 -0
- package/dist/src/lib/model/synthetics/auth.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/check.d.ts +367 -0
- package/dist/src/lib/model/synthetics/check.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/common.d.ts +165 -0
- package/dist/src/lib/model/synthetics/common.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/create.d.ts +3366 -0
- package/dist/src/lib/model/synthetics/create.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/errors.d.ts +102 -0
- package/dist/src/lib/model/synthetics/errors.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/examples.d.ts +24 -0
- package/dist/src/lib/model/synthetics/examples.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/location.d.ts +46 -0
- package/dist/src/lib/model/synthetics/location.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/monitor.d.ts +456 -0
- package/dist/src/lib/model/synthetics/monitor.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/params.d.ts +806 -0
- package/dist/src/lib/model/synthetics/params.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/query.d.ts +297 -0
- package/dist/src/lib/model/synthetics/query.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/schedule.d.ts +93 -0
- package/dist/src/lib/model/synthetics/schedule.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/script.d.ts +64 -0
- package/dist/src/lib/model/synthetics/script.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/state.d.ts +645 -0
- package/dist/src/lib/model/synthetics/state.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/update.d.ts +378 -0
- package/dist/src/lib/model/synthetics/update.d.ts.map +1 -0
- package/dist/src/lib/services/datastore/datastore-metric-data.service.d.ts +19 -0
- package/dist/src/lib/services/datastore/datastore-metric-data.service.d.ts.map +1 -0
- package/dist/src/lib/services/dx-saas.service.d.ts +19 -1
- package/dist/src/lib/services/dx-saas.service.d.ts.map +1 -1
- package/dist/src/lib/services/log-metric.service.d.ts +112 -0
- package/dist/src/lib/services/log-metric.service.d.ts.map +1 -0
- package/dist/src/lib/services/logs.service.d.ts +3 -1
- package/dist/src/lib/services/logs.service.d.ts.map +1 -1
- package/dist/src/lib/services/platform-management-module.service.d.ts +49 -4
- package/dist/src/lib/services/platform-management-module.service.d.ts.map +1 -1
- package/dist/src/lib/services/platform-metric-grouping.service.d.ts +14 -0
- package/dist/src/lib/services/platform-metric-grouping.service.d.ts.map +1 -1
- package/dist/src/lib/services/service-monolith.d.ts +6 -2
- package/dist/src/lib/services/service-monolith.d.ts.map +1 -1
- package/dist/src/lib/services/synthetic-monitor.service.d.ts +417 -0
- package/dist/src/lib/services/synthetic-monitor.service.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/src/lib/model/asm/client/client/client.gen.d.ts +0 -3
- package/dist/src/lib/model/asm/client/client/client.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/client/index.d.ts +0 -11
- package/dist/src/lib/model/asm/client/client/index.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/client/types.gen.d.ts +0 -88
- package/dist/src/lib/model/asm/client/client/types.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/client/utils.gen.d.ts +0 -15
- package/dist/src/lib/model/asm/client/client/utils.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/client.gen.d.ts +0 -13
- package/dist/src/lib/model/asm/client/client.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/core/auth.gen.d.ts +0 -26
- package/dist/src/lib/model/asm/client/core/auth.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/core/bodySerializer.gen.d.ts +0 -26
- package/dist/src/lib/model/asm/client/core/bodySerializer.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/core/params.gen.d.ts +0 -44
- package/dist/src/lib/model/asm/client/core/params.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/core/pathSerializer.gen.d.ts +0 -34
- package/dist/src/lib/model/asm/client/core/pathSerializer.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/core/queryKeySerializer.gen.d.ts +0 -19
- package/dist/src/lib/model/asm/client/core/queryKeySerializer.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/core/serverSentEvents.gen.d.ts +0 -72
- package/dist/src/lib/model/asm/client/core/serverSentEvents.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/core/types.gen.d.ts +0 -84
- package/dist/src/lib/model/asm/client/core/types.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/core/utils.gen.d.ts +0 -20
- package/dist/src/lib/model/asm/client/core/utils.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/index.d.ts +0 -3
- package/dist/src/lib/model/asm/client/index.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/schemas.gen.d.ts +0 -4522
- package/dist/src/lib/model/asm/client/schemas.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/sdk.gen.d.ts +0 -585
- package/dist/src/lib/model/asm/client/sdk.gen.d.ts.map +0 -1
- package/dist/src/lib/model/asm/client/types.gen.d.ts +0 -4877
- package/dist/src/lib/model/asm/client/types.gen.d.ts.map +0 -1
- package/dist/src/lib/services/asm.service.d.ts +0 -22
- package/dist/src/lib/services/asm.service.d.ts.map +0 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* The `oi/v2/managementmodule/export` document: one format for exports dx-do writes and
|
|
4
|
+
* for the platform UI's own export. Measured shapes: docs/internal/management-module-import-findings-2026-11.md.
|
|
5
|
+
*/
|
|
6
|
+
export interface MmNameSpecifier {
|
|
7
|
+
op: string;
|
|
8
|
+
pattern?: string;
|
|
9
|
+
ignoreCase?: boolean;
|
|
10
|
+
names?: string[];
|
|
11
|
+
value?: string;
|
|
12
|
+
specifiers?: MmNameSpecifier[];
|
|
13
|
+
specifier?: MmNameSpecifier;
|
|
14
|
+
expressions?: unknown[];
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
export declare const MmNameSpecifierSchema: z.ZodType<MmNameSpecifier>;
|
|
18
|
+
export declare const MmMetricGroupFilterSchema: z.ZodObject<{
|
|
19
|
+
field: z.ZodString;
|
|
20
|
+
fieldDescription: z.ZodOptional<z.ZodString>;
|
|
21
|
+
condition: z.ZodString;
|
|
22
|
+
value: z.ZodString;
|
|
23
|
+
}, z.core.$loose>;
|
|
24
|
+
export type MmMetricGroupFilter = z.infer<typeof MmMetricGroupFilterSchema>;
|
|
25
|
+
export declare const MmMetricGroupSchema: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
specifier: z.ZodObject<{
|
|
28
|
+
op: z.ZodString;
|
|
29
|
+
sourceNameSpecifier: z.ZodType<MmNameSpecifier, unknown, z.core.$ZodTypeInternals<MmNameSpecifier, unknown>>;
|
|
30
|
+
attributeNameSpecifier: z.ZodType<MmNameSpecifier, unknown, z.core.$ZodTypeInternals<MmNameSpecifier, unknown>>;
|
|
31
|
+
}, z.core.$loose>;
|
|
32
|
+
attributes: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
name: z.ZodOptional<z.ZodString>;
|
|
34
|
+
description: z.ZodOptional<z.ZodString>;
|
|
35
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
|
+
field: z.ZodString;
|
|
37
|
+
fieldDescription: z.ZodOptional<z.ZodString>;
|
|
38
|
+
condition: z.ZodString;
|
|
39
|
+
value: z.ZodString;
|
|
40
|
+
}, z.core.$loose>>>;
|
|
41
|
+
}, z.core.$loose>>;
|
|
42
|
+
useManagementModuleSourceSpecifier: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
}, z.core.$loose>;
|
|
44
|
+
export type MmMetricGroup = z.infer<typeof MmMetricGroupSchema>;
|
|
45
|
+
export declare const MmMetricSpecSchema: z.ZodObject<{
|
|
46
|
+
specId: z.ZodObject<{
|
|
47
|
+
component: z.ZodOptional<z.ZodString>;
|
|
48
|
+
id: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$loose>;
|
|
50
|
+
specifier: z.ZodObject<{
|
|
51
|
+
op: z.ZodString;
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
}, z.core.$loose>;
|
|
54
|
+
sorterEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
attributes: z.ZodObject<{
|
|
56
|
+
alert: z.ZodObject<{
|
|
57
|
+
alertName: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$loose>;
|
|
59
|
+
custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
60
|
+
}, z.core.$loose>;
|
|
61
|
+
}, z.core.$loose>;
|
|
62
|
+
export type MmMetricSpec = z.infer<typeof MmMetricSpecSchema>;
|
|
63
|
+
export declare const ManagementModuleExportSchema: z.ZodObject<{
|
|
64
|
+
id: z.ZodObject<{
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
}, z.core.$loose>;
|
|
67
|
+
title: z.ZodString;
|
|
68
|
+
sourceSpecifier: z.ZodOptional<z.ZodType<MmNameSpecifier, unknown, z.core.$ZodTypeInternals<MmNameSpecifier, unknown>>>;
|
|
69
|
+
attributes: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
description: z.ZodOptional<z.ZodString>;
|
|
71
|
+
}, z.core.$loose>>;
|
|
72
|
+
metricGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
specifier: z.ZodObject<{
|
|
75
|
+
op: z.ZodString;
|
|
76
|
+
sourceNameSpecifier: z.ZodType<MmNameSpecifier, unknown, z.core.$ZodTypeInternals<MmNameSpecifier, unknown>>;
|
|
77
|
+
attributeNameSpecifier: z.ZodType<MmNameSpecifier, unknown, z.core.$ZodTypeInternals<MmNameSpecifier, unknown>>;
|
|
78
|
+
}, z.core.$loose>;
|
|
79
|
+
attributes: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
name: z.ZodOptional<z.ZodString>;
|
|
81
|
+
description: z.ZodOptional<z.ZodString>;
|
|
82
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
83
|
+
field: z.ZodString;
|
|
84
|
+
fieldDescription: z.ZodOptional<z.ZodString>;
|
|
85
|
+
condition: z.ZodString;
|
|
86
|
+
value: z.ZodString;
|
|
87
|
+
}, z.core.$loose>>>;
|
|
88
|
+
}, z.core.$loose>>;
|
|
89
|
+
useManagementModuleSourceSpecifier: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
+
}, z.core.$loose>>>;
|
|
91
|
+
metricSpecs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
92
|
+
specId: z.ZodObject<{
|
|
93
|
+
component: z.ZodOptional<z.ZodString>;
|
|
94
|
+
id: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$loose>;
|
|
96
|
+
specifier: z.ZodObject<{
|
|
97
|
+
op: z.ZodString;
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
}, z.core.$loose>;
|
|
100
|
+
sorterEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
attributes: z.ZodObject<{
|
|
102
|
+
alert: z.ZodObject<{
|
|
103
|
+
alertName: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.core.$loose>;
|
|
105
|
+
custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
106
|
+
}, z.core.$loose>;
|
|
107
|
+
}, z.core.$loose>>>;
|
|
108
|
+
}, z.core.$loose>;
|
|
109
|
+
export type ManagementModuleExport = z.infer<typeof ManagementModuleExportSchema>;
|
|
110
|
+
//# sourceMappingURL=management-module-export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management-module-export.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/managementmodule/management-module-export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B;;;GAGG;AAEH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/B,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAID,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAyB3D,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;iBA0B9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;iBAsB7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ManagementModuleExport } from './management-module-export';
|
|
2
|
+
export interface MmAlertRelink {
|
|
3
|
+
alert: string;
|
|
4
|
+
from: {
|
|
5
|
+
groupId: string;
|
|
6
|
+
module: string;
|
|
7
|
+
};
|
|
8
|
+
to: {
|
|
9
|
+
groupId: string;
|
|
10
|
+
groupName: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface MmRelinkResult {
|
|
14
|
+
document: ManagementModuleExport;
|
|
15
|
+
relinked: MmAlertRelink[];
|
|
16
|
+
unresolved: {
|
|
17
|
+
alert: string;
|
|
18
|
+
groupId: string;
|
|
19
|
+
reason: string;
|
|
20
|
+
}[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Repairs alerts whose metric group is not in their own module, the state the platform's
|
|
24
|
+
* native import leaves behind (#1540): every alert keeps the SOURCE module's group id.
|
|
25
|
+
* A dangling group id is looked up in `references` (other exports, typically the source
|
|
26
|
+
* module's); the alert is pointed at this module's own group with the same name, when
|
|
27
|
+
* exactly one has it. Pure: the input is not modified.
|
|
28
|
+
*/
|
|
29
|
+
export declare function relinkDanglingAlertGroups(input: ManagementModuleExport, references: ManagementModuleExport[]): MmRelinkResult;
|
|
30
|
+
//# sourceMappingURL=management-module-relink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management-module-relink.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/managementmodule/management-module-relink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAClE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,sBAAsB,EAC7B,UAAU,EAAE,sBAAsB,EAAE,GACnC,cAAc,CAkChB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MmTransform } from './management-module-transform';
|
|
2
|
+
/** Built-in transforms, by name. Each is validated against {@link MmTransformSchema} on load. */
|
|
3
|
+
export declare const MANAGEMENT_MODULE_TRANSFORM_PRESETS: Readonly<Record<string, MmTransform>>;
|
|
4
|
+
//# sourceMappingURL=management-module-transform-presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management-module-transform-presets.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/managementmodule/management-module-transform-presets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAqB,MAAM,+BAA+B,CAAC;AAuE/E,iGAAiG;AACjG,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAErF,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import { ManagementModuleExport } from './management-module-export';
|
|
3
|
+
export declare const MmTransformDetectSchema: z.ZodObject<{
|
|
4
|
+
target: z.ZodEnum<{
|
|
5
|
+
attribute: "attribute";
|
|
6
|
+
source: "source";
|
|
7
|
+
}>;
|
|
8
|
+
op: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
EXACT: "EXACT";
|
|
10
|
+
REGEX: "REGEX";
|
|
11
|
+
}>>;
|
|
12
|
+
test: z.ZodString;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type MmTransformDetect = z.infer<typeof MmTransformDetectSchema>;
|
|
15
|
+
export declare const MmTransformRuleSchema: z.ZodObject<{
|
|
16
|
+
target: z.ZodEnum<{
|
|
17
|
+
attribute: "attribute";
|
|
18
|
+
source: "source";
|
|
19
|
+
}>;
|
|
20
|
+
op: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
EXACT: "EXACT";
|
|
22
|
+
REGEX: "REGEX";
|
|
23
|
+
}>>;
|
|
24
|
+
when: z.ZodOptional<z.ZodString>;
|
|
25
|
+
onlyIfRewritten: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
set: z.ZodOptional<z.ZodString>;
|
|
27
|
+
replace: z.ZodOptional<z.ZodString>;
|
|
28
|
+
with: z.ZodOptional<z.ZodString>;
|
|
29
|
+
flags: z.ZodOptional<z.ZodString>;
|
|
30
|
+
note: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export type MmTransformRule = z.infer<typeof MmTransformRuleSchema>;
|
|
33
|
+
export declare const MmMetricRenameSchema: z.ZodObject<{
|
|
34
|
+
from: z.ZodString;
|
|
35
|
+
to: z.ZodString;
|
|
36
|
+
note: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export type MmMetricRename = z.infer<typeof MmMetricRenameSchema>;
|
|
39
|
+
export declare const MmTransformSchema: z.ZodObject<{
|
|
40
|
+
name: z.ZodString;
|
|
41
|
+
description: z.ZodOptional<z.ZodString>;
|
|
42
|
+
detect: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
43
|
+
target: z.ZodEnum<{
|
|
44
|
+
attribute: "attribute";
|
|
45
|
+
source: "source";
|
|
46
|
+
}>;
|
|
47
|
+
op: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
EXACT: "EXACT";
|
|
49
|
+
REGEX: "REGEX";
|
|
50
|
+
}>>;
|
|
51
|
+
test: z.ZodString;
|
|
52
|
+
}, z.core.$strict>>>;
|
|
53
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
54
|
+
target: z.ZodEnum<{
|
|
55
|
+
attribute: "attribute";
|
|
56
|
+
source: "source";
|
|
57
|
+
}>;
|
|
58
|
+
op: z.ZodOptional<z.ZodEnum<{
|
|
59
|
+
EXACT: "EXACT";
|
|
60
|
+
REGEX: "REGEX";
|
|
61
|
+
}>>;
|
|
62
|
+
when: z.ZodOptional<z.ZodString>;
|
|
63
|
+
onlyIfRewritten: z.ZodOptional<z.ZodBoolean>;
|
|
64
|
+
set: z.ZodOptional<z.ZodString>;
|
|
65
|
+
replace: z.ZodOptional<z.ZodString>;
|
|
66
|
+
with: z.ZodOptional<z.ZodString>;
|
|
67
|
+
flags: z.ZodOptional<z.ZodString>;
|
|
68
|
+
note: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strict>>;
|
|
70
|
+
renameMetrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
71
|
+
from: z.ZodString;
|
|
72
|
+
to: z.ZodString;
|
|
73
|
+
note: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strict>>>;
|
|
75
|
+
titleSuffix: z.ZodOptional<z.ZodString>;
|
|
76
|
+
disableAlerts: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
export type MmTransform = z.infer<typeof MmTransformSchema>;
|
|
79
|
+
export interface MmTransformChange {
|
|
80
|
+
group?: {
|
|
81
|
+
id: string;
|
|
82
|
+
name: string | undefined;
|
|
83
|
+
};
|
|
84
|
+
target: 'source' | 'attribute';
|
|
85
|
+
op: 'REGEX' | 'EXACT';
|
|
86
|
+
before: string;
|
|
87
|
+
after: string;
|
|
88
|
+
renamedMetric?: {
|
|
89
|
+
from: string;
|
|
90
|
+
to: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export interface MmTransformResult {
|
|
94
|
+
transform: string;
|
|
95
|
+
title: {
|
|
96
|
+
before: string;
|
|
97
|
+
after: string;
|
|
98
|
+
};
|
|
99
|
+
detected: boolean;
|
|
100
|
+
detectedBy: string[];
|
|
101
|
+
module: ManagementModuleExport;
|
|
102
|
+
changes: MmTransformChange[];
|
|
103
|
+
warnings: string[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Applies a transform to one export document. Pure: the input is not modified.
|
|
107
|
+
* A module no detect entry matches comes back unchanged with `detected: false`.
|
|
108
|
+
*/
|
|
109
|
+
export declare function transformManagementModule(input: ManagementModuleExport, transform: MmTransform): MmTransformResult;
|
|
110
|
+
//# sourceMappingURL=management-module-transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management-module-transform.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/managementmodule/management-module-transform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EACL,sBAAsB,EAGvB,MAAM,4BAA4B,CAAC;AAsCpC,eAAO,MAAM,uBAAuB;;;;;;;;;;kBAIlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;kBAwB9B,CAAC;AAEL,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,oBAAoB;;;;kBAO/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAc5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACjD,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC/B,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9C;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AA6GD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,sBAAsB,EAC7B,SAAS,EAAE,WAAW,GACrB,iBAAiB,CAyEnB"}
|
|
@@ -31,7 +31,26 @@ export declare namespace PlatformMetricGrouping {
|
|
|
31
31
|
op: 'NOT';
|
|
32
32
|
specifier: NameSpecifier;
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
/** All of the specifiers must match (the server builds this from a filter list). */
|
|
35
|
+
interface AndSpecifier {
|
|
36
|
+
op: 'AND';
|
|
37
|
+
specifiers: NameSpecifier[];
|
|
38
|
+
}
|
|
39
|
+
/** One metric-metadata attribute condition, e.g. syntheticMonitorId IN [<id>]. */
|
|
40
|
+
interface AttributeExpression {
|
|
41
|
+
name: string;
|
|
42
|
+
values: string[];
|
|
43
|
+
operator: string;
|
|
44
|
+
comparator?: string;
|
|
45
|
+
caseInsensitive?: boolean;
|
|
46
|
+
globPattern?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** Matches metrics by their metadata attributes (the server builds this from a non-path filter). */
|
|
49
|
+
interface AttributeSpecifier {
|
|
50
|
+
op: 'ATTRIBUTE';
|
|
51
|
+
expressions: AttributeExpression[];
|
|
52
|
+
}
|
|
53
|
+
type NameSpecifier = RegexSpecifier | ExactSpecifier | AllSpecifier | OrSpecifier | NotSpecifier | AndSpecifier | AttributeSpecifier;
|
|
35
54
|
interface MetricGroupSpecifier {
|
|
36
55
|
op: 'SPEC';
|
|
37
56
|
sourceNameSpecifier: NameSpecifier;
|
|
@@ -52,7 +71,7 @@ export declare namespace PlatformMetricGrouping {
|
|
|
52
71
|
creationTime?: string;
|
|
53
72
|
lastUpdatedTime?: string;
|
|
54
73
|
mmTitle?: string;
|
|
55
|
-
previousMMId?: string;
|
|
74
|
+
previousMMId?: string | null;
|
|
56
75
|
_CREATED_BY?: string;
|
|
57
76
|
_CREATED_AT?: number;
|
|
58
77
|
_UPDATED_BY?: string;
|
|
@@ -72,7 +91,8 @@ export declare namespace PlatformMetricGrouping {
|
|
|
72
91
|
}
|
|
73
92
|
/** Body sent to the `/save` endpoint for create or update. Include `id` for updates. */
|
|
74
93
|
interface SaveRequest {
|
|
75
|
-
id
|
|
94
|
+
/** Omit or null to create (the synthetics UI sends null); the existing id to update. */
|
|
95
|
+
id?: string | null;
|
|
76
96
|
managementModuleId?: ManagementModuleId;
|
|
77
97
|
specifier?: MetricGroupSpecifier;
|
|
78
98
|
attributes: Partial<MetricGroupingAttributes>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformMetricGrouping.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/metricgrouping/PlatformMetricGrouping.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,yBAAiB,sBAAsB,CAAC;IACtC,6DAA6D;IAC7D,UAAiB,kBAAkB;QACjC,IAAI,EAAE,MAAM,CAAC;KACd;IAID,UAAiB,cAAc;QAC7B,EAAE,EAAE,OAAO,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB;IAED,UAAiB,cAAc;QAC7B,EAAE,EAAE,OAAO,CAAC;QACZ,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB;IAED,UAAiB,YAAY;QAC3B,EAAE,EAAE,KAAK,CAAC;KACX;IAED,UAAiB,WAAW;QAC1B,EAAE,EAAE,IAAI,CAAC;QACT,UAAU,EAAE,aAAa,EAAE,CAAC;KAC7B;IAED,UAAiB,YAAY;QAC3B,EAAE,EAAE,KAAK,CAAC;QACV,SAAS,EAAE,aAAa,CAAC;KAC1B;IAED,KAAY,aAAa,GACrB,cAAc,GACd,cAAc,GACd,YAAY,GACZ,WAAW,GACX,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"PlatformMetricGrouping.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/metricgrouping/PlatformMetricGrouping.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,yBAAiB,sBAAsB,CAAC;IACtC,6DAA6D;IAC7D,UAAiB,kBAAkB;QACjC,IAAI,EAAE,MAAM,CAAC;KACd;IAID,UAAiB,cAAc;QAC7B,EAAE,EAAE,OAAO,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB;IAED,UAAiB,cAAc;QAC7B,EAAE,EAAE,OAAO,CAAC;QACZ,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,IAAI,CAAC,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,CAAC;QACvB,EAAE,CAAC,EAAE,gBAAgB,CAAC;KACvB;IAED,UAAiB,gBAAgB;QAC/B,WAAW,EAAE,CAAC,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC;KACxC;IAED,2CAA2C;IAC3C,UAAiB,aAAa;QAC5B,EAAE,EAAE,MAAM,CAAC;QACX,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;KACzC;IAED,+EAA+E;IAC/E,UAAiB,WAAW;QAC1B,KAAK,EAAE,MAAM,CAAC;QACd,gBAAgB,EAAE,MAAM,CAAC;QACzB,IAAI,EAAE,MAAM,CAAC;KACd;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import type { PlatformMetricGrouping } from './PlatformMetricGrouping';
|
|
3
|
+
/**
|
|
4
|
+
* Metric grouping filter rows, as the alert UI writes them: every row must match (AND). Measured on
|
|
5
|
+
* the lab tenant (2026-11-12, #1451/#1454):
|
|
6
|
+
* - `sourceName` and `attributeName` match the metric's source and path; every other field is a
|
|
7
|
+
* metric-metadata attribute (`metric_name`, `external_ids`, `syntheticMonitorId`,
|
|
8
|
+
* `syntheticLocationId`, `syntheticRegion`, …; `oi/v2/alert/metric/fields` lists most of them,
|
|
9
|
+
* but not every attribute the server accepts).
|
|
10
|
+
* - `regex` matches the WHOLE value, ignoring case. A negative condition (`not_contains`,
|
|
11
|
+
* `not_equals`) also passes a metric that lacks the attribute.
|
|
12
|
+
* - Without an `attributeName` row the server stores a `NUMERIC` path specifier.
|
|
13
|
+
* - The live preview (`metricgroup/metrics` with `customFilter`) needs the and-of-or shape that
|
|
14
|
+
* {@link metricGroupingCustomFilter} builds; a flat `and` of rows answers HTTP 500.
|
|
15
|
+
*/
|
|
16
|
+
export declare const MetricGroupingFilterRowSchema: z.ZodObject<{
|
|
17
|
+
field: z.ZodString;
|
|
18
|
+
condition: z.ZodString;
|
|
19
|
+
value: z.ZodString;
|
|
20
|
+
fieldDescription: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$loose>;
|
|
22
|
+
export type MetricGroupingFilterRow = z.infer<typeof MetricGroupingFilterRowSchema>;
|
|
23
|
+
export declare const MetricGroupingFilterRowsSchema: z.ZodArray<z.ZodObject<{
|
|
24
|
+
field: z.ZodString;
|
|
25
|
+
condition: z.ZodString;
|
|
26
|
+
value: z.ZodString;
|
|
27
|
+
fieldDescription: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$loose>>;
|
|
29
|
+
/** Rows as stored: each with a fieldDescription (the UI's labels for source and path). */
|
|
30
|
+
export declare function metricGroupingFilter(rows: readonly MetricGroupingFilterRow[]): PlatformMetricGrouping.Filter[];
|
|
31
|
+
/** The live-preview `customFilter` for rows: an AND of one-row ORs (the shape the server accepts). */
|
|
32
|
+
export declare function metricGroupingCustomFilter(rows: readonly MetricGroupingFilterRow[]): PlatformMetricGrouping.CustomFilter;
|
|
33
|
+
/** One metric a grouping (or a filter) matches, from the live preview. */
|
|
34
|
+
export declare const MetricGroupingPreviewRowSchema: z.ZodObject<{
|
|
35
|
+
metric: z.ZodString;
|
|
36
|
+
metricName: z.ZodOptional<z.ZodString>;
|
|
37
|
+
source: z.ZodOptional<z.ZodString>;
|
|
38
|
+
nassMetricId: z.ZodOptional<z.ZodString>;
|
|
39
|
+
lastSeen: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
}, z.core.$loose>;
|
|
41
|
+
export type MetricGroupingPreviewRow = z.infer<typeof MetricGroupingPreviewRowSchema>;
|
|
42
|
+
//# sourceMappingURL=metric-grouping-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric-grouping-filter.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/metricgrouping/metric-grouping-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,6BAA6B;;;;;iBAcxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,8BAA8B;;;;;kBAG6D,CAAC;AAIzG,0FAA0F;AAC1F,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,uBAAuB,EAAE,GAAG,sBAAsB,CAAC,MAAM,EAAE,CAO9G;AAED,sGAAsG;AACtG,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,SAAS,uBAAuB,EAAE,GACvC,sBAAsB,CAAC,YAAY,CAQrC;AAED,0EAA0E;AAC1E,eAAO,MAAM,8BAA8B;;;;;;iBAMzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* The stores behind a monitor's authentication (`synthetics/variable/api/v1/{variable,credentials,proxy}`).
|
|
4
|
+
* A monitor references credentials as `credentials: [{id, version}]` and a proxy as `proxy: {id, version}`;
|
|
5
|
+
* a credential references variables, a proxy references one credential. Every reference pins a version.
|
|
6
|
+
*
|
|
7
|
+
* Measured live (lab tenant, 2026-11-11, #1431; owner HARs synthetic-creds, badssl-not-bad,
|
|
8
|
+
* synthetic-proxy, auth-detach):
|
|
9
|
+
* - One verb writes: `POST` with the whole object. The client picks the id; version 0 or 1 creates,
|
|
10
|
+
* the current version replaces it and bumps the version, any other version is a 409 `version
|
|
11
|
+
* mismatch`. A deleted id is not freed: saving it again is a 409, so ids are always fresh.
|
|
12
|
+
* - `DELETE /{store}/{id}` answers 200 with no body, and 500 (not 404) when the id does not exist.
|
|
13
|
+
* Nothing stops deleting an object something still references.
|
|
14
|
+
* - A credential's references are checked on save (404 `variable not found` when an id or version
|
|
15
|
+
* does not exist). A credential needs a `domain`; a variable does not.
|
|
16
|
+
* - An object saved without `group` lands in the group `default` (the UI's proxy path does this,
|
|
17
|
+
* #1448). Groups carry access control, so dx-do always sends the monitor's group.
|
|
18
|
+
* - Reads never return a `secret_plain` value. A `binary` value (a client certificate bundle) and a
|
|
19
|
+
* `plain` value are returned in full to anyone who can read them.
|
|
20
|
+
* - The UI makes every object hidden and per monitor, named `variable-<id>`, `credentials-<id>`,
|
|
21
|
+
* `proxy-<id>`. Replacing or detaching one, or deleting the monitor, leaves the old objects behind.
|
|
22
|
+
* - A proxy URI must be `http://host[:port]`; any other scheme, or none, is a bare 500. The store
|
|
23
|
+
* also accepts `http://user:pass@host`, which stores the password readable.
|
|
24
|
+
* - Credential types: `username_password`, `cert`, `header`. No monitor type tested accepts a header
|
|
25
|
+
* credential (422 for 16 of 18 types; webdriver and jmeter need a script). The station ignores a
|
|
26
|
+
* credential's `caCert` (#1449).
|
|
27
|
+
*/
|
|
28
|
+
export declare const SYNTHETIC_VARIABLE_STORE_PATH = "synthetics/variable/api/v1";
|
|
29
|
+
export declare const SyntheticVariableTypeSchema: z.ZodEnum<{
|
|
30
|
+
secret_plain: "secret_plain";
|
|
31
|
+
binary: "binary";
|
|
32
|
+
plain: "plain";
|
|
33
|
+
}>;
|
|
34
|
+
export type SyntheticVariableType = z.infer<typeof SyntheticVariableTypeSchema>;
|
|
35
|
+
export declare const SyntheticCredentialTypeSchema: z.ZodEnum<{
|
|
36
|
+
header: "header";
|
|
37
|
+
username_password: "username_password";
|
|
38
|
+
cert: "cert";
|
|
39
|
+
}>;
|
|
40
|
+
export type SyntheticCredentialType = z.infer<typeof SyntheticCredentialTypeSchema>;
|
|
41
|
+
/** A variable as `POST /variable` takes it. */
|
|
42
|
+
export declare const SyntheticVariableSaveSchema: z.ZodObject<{
|
|
43
|
+
id: z.ZodUUID;
|
|
44
|
+
key: z.ZodString;
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
type: z.ZodEnum<{
|
|
47
|
+
secret_plain: "secret_plain";
|
|
48
|
+
binary: "binary";
|
|
49
|
+
plain: "plain";
|
|
50
|
+
}>;
|
|
51
|
+
version: z.ZodNumber;
|
|
52
|
+
hidden: z.ZodBoolean;
|
|
53
|
+
value: z.ZodString;
|
|
54
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
55
|
+
group: z.ZodString;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
export type SyntheticVariableSave = z.infer<typeof SyntheticVariableSaveSchema>;
|
|
58
|
+
/** A stored variable. `value` is absent for secret_plain. */
|
|
59
|
+
export declare const SyntheticVariableSchema: z.ZodObject<{
|
|
60
|
+
id: z.ZodString;
|
|
61
|
+
version: z.ZodNumber;
|
|
62
|
+
name: z.ZodOptional<z.ZodString>;
|
|
63
|
+
key: z.ZodOptional<z.ZodString>;
|
|
64
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
secret_plain: "secret_plain";
|
|
66
|
+
binary: "binary";
|
|
67
|
+
plain: "plain";
|
|
68
|
+
}>>;
|
|
69
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
group: z.ZodOptional<z.ZodString>;
|
|
71
|
+
value: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$loose>;
|
|
73
|
+
export type SyntheticVariable = z.infer<typeof SyntheticVariableSchema>;
|
|
74
|
+
export declare const SyntheticCredentialValueSchema: z.ZodObject<{
|
|
75
|
+
username: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
76
|
+
id: z.ZodString;
|
|
77
|
+
version: z.ZodNumber;
|
|
78
|
+
}, z.core.$loose>>>;
|
|
79
|
+
password: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
version: z.ZodNumber;
|
|
82
|
+
}, z.core.$loose>>>;
|
|
83
|
+
clientCert: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
84
|
+
id: z.ZodString;
|
|
85
|
+
version: z.ZodNumber;
|
|
86
|
+
}, z.core.$loose>>>;
|
|
87
|
+
caCert: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
version: z.ZodNumber;
|
|
90
|
+
}, z.core.$loose>>>;
|
|
91
|
+
headerName: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
version: z.ZodNumber;
|
|
94
|
+
}, z.core.$loose>>>;
|
|
95
|
+
headerValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
version: z.ZodNumber;
|
|
98
|
+
}, z.core.$loose>>>;
|
|
99
|
+
}, z.core.$loose>;
|
|
100
|
+
export type SyntheticCredentialValue = z.infer<typeof SyntheticCredentialValueSchema>;
|
|
101
|
+
/** A credential as `POST /credentials` takes it. */
|
|
102
|
+
export declare const SyntheticCredentialSaveSchema: z.ZodObject<{
|
|
103
|
+
id: z.ZodUUID;
|
|
104
|
+
name: z.ZodString;
|
|
105
|
+
type: z.ZodEnum<{
|
|
106
|
+
header: "header";
|
|
107
|
+
username_password: "username_password";
|
|
108
|
+
cert: "cert";
|
|
109
|
+
}>;
|
|
110
|
+
version: z.ZodNumber;
|
|
111
|
+
domain: z.ZodString;
|
|
112
|
+
value: z.ZodObject<{
|
|
113
|
+
username: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
version: z.ZodNumber;
|
|
116
|
+
}, z.core.$loose>>>;
|
|
117
|
+
password: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
118
|
+
id: z.ZodString;
|
|
119
|
+
version: z.ZodNumber;
|
|
120
|
+
}, z.core.$loose>>>;
|
|
121
|
+
clientCert: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
122
|
+
id: z.ZodString;
|
|
123
|
+
version: z.ZodNumber;
|
|
124
|
+
}, z.core.$loose>>>;
|
|
125
|
+
caCert: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
126
|
+
id: z.ZodString;
|
|
127
|
+
version: z.ZodNumber;
|
|
128
|
+
}, z.core.$loose>>>;
|
|
129
|
+
headerName: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
130
|
+
id: z.ZodString;
|
|
131
|
+
version: z.ZodNumber;
|
|
132
|
+
}, z.core.$loose>>>;
|
|
133
|
+
headerValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
134
|
+
id: z.ZodString;
|
|
135
|
+
version: z.ZodNumber;
|
|
136
|
+
}, z.core.$loose>>>;
|
|
137
|
+
}, z.core.$loose>;
|
|
138
|
+
hidden: z.ZodBoolean;
|
|
139
|
+
group: z.ZodString;
|
|
140
|
+
}, z.core.$strict>;
|
|
141
|
+
export type SyntheticCredentialSave = z.infer<typeof SyntheticCredentialSaveSchema>;
|
|
142
|
+
export declare const SyntheticCredentialSchema: z.ZodObject<{
|
|
143
|
+
id: z.ZodString;
|
|
144
|
+
version: z.ZodNumber;
|
|
145
|
+
name: z.ZodOptional<z.ZodString>;
|
|
146
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
147
|
+
header: "header";
|
|
148
|
+
username_password: "username_password";
|
|
149
|
+
cert: "cert";
|
|
150
|
+
}>>;
|
|
151
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
152
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
+
group: z.ZodOptional<z.ZodString>;
|
|
154
|
+
value: z.ZodOptional<z.ZodObject<{
|
|
155
|
+
username: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
156
|
+
id: z.ZodString;
|
|
157
|
+
version: z.ZodNumber;
|
|
158
|
+
}, z.core.$loose>>>;
|
|
159
|
+
password: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
160
|
+
id: z.ZodString;
|
|
161
|
+
version: z.ZodNumber;
|
|
162
|
+
}, z.core.$loose>>>;
|
|
163
|
+
clientCert: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
164
|
+
id: z.ZodString;
|
|
165
|
+
version: z.ZodNumber;
|
|
166
|
+
}, z.core.$loose>>>;
|
|
167
|
+
caCert: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
version: z.ZodNumber;
|
|
170
|
+
}, z.core.$loose>>>;
|
|
171
|
+
headerName: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
172
|
+
id: z.ZodString;
|
|
173
|
+
version: z.ZodNumber;
|
|
174
|
+
}, z.core.$loose>>>;
|
|
175
|
+
headerValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
176
|
+
id: z.ZodString;
|
|
177
|
+
version: z.ZodNumber;
|
|
178
|
+
}, z.core.$loose>>>;
|
|
179
|
+
}, z.core.$loose>>;
|
|
180
|
+
}, z.core.$loose>;
|
|
181
|
+
export type SyntheticCredential = z.infer<typeof SyntheticCredentialSchema>;
|
|
182
|
+
/** `http://host[:port]` with no user or password in it: the only form the store takes that is safe. */
|
|
183
|
+
export declare const SyntheticProxyUriSchema: z.ZodString;
|
|
184
|
+
/** A proxy as `POST /proxy` takes it. */
|
|
185
|
+
export declare const SyntheticProxySaveSchema: z.ZodObject<{
|
|
186
|
+
id: z.ZodUUID;
|
|
187
|
+
name: z.ZodString;
|
|
188
|
+
uri: z.ZodString;
|
|
189
|
+
version: z.ZodNumber;
|
|
190
|
+
hidden: z.ZodBoolean;
|
|
191
|
+
credentials: z.ZodNullable<z.ZodObject<{
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
version: z.ZodNumber;
|
|
194
|
+
}, z.core.$loose>>;
|
|
195
|
+
group: z.ZodString;
|
|
196
|
+
}, z.core.$strict>;
|
|
197
|
+
export type SyntheticProxySave = z.infer<typeof SyntheticProxySaveSchema>;
|
|
198
|
+
export declare const SyntheticProxySchema: z.ZodObject<{
|
|
199
|
+
id: z.ZodString;
|
|
200
|
+
version: z.ZodNumber;
|
|
201
|
+
name: z.ZodOptional<z.ZodString>;
|
|
202
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
203
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
204
|
+
group: z.ZodOptional<z.ZodString>;
|
|
205
|
+
credentials: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
206
|
+
id: z.ZodString;
|
|
207
|
+
version: z.ZodNumber;
|
|
208
|
+
}, z.core.$loose>>>;
|
|
209
|
+
}, z.core.$loose>;
|
|
210
|
+
export type SyntheticProxy = z.infer<typeof SyntheticProxySchema>;
|
|
211
|
+
export type SyntheticAuthStore = 'variable' | 'credentials' | 'proxy';
|
|
212
|
+
/** The names the UI gives hidden, per-monitor objects. */
|
|
213
|
+
export declare const hiddenAuthObjectName: (store: SyntheticAuthStore, id: string) => string;
|
|
214
|
+
/** True for an object that belongs to one monitor: hidden, and named the way the UI names those. */
|
|
215
|
+
export declare function isMonitorOwnedAuthObject(store: SyntheticAuthStore, object: {
|
|
216
|
+
id: string;
|
|
217
|
+
hidden?: boolean | undefined;
|
|
218
|
+
name?: string | undefined;
|
|
219
|
+
}): boolean;
|
|
220
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/synthetics/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AAE1E,eAAO,MAAM,2BAA2B;;;;EAKrC,CAAC;AACJ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,6BAA6B;;;;EAKvC,CAAC;AACJ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,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