@dx-do/client 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/index.cjs.js +4287 -3540
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +4191 -3533
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/src/index.d.ts +4 -0
  6. package/dist/src/index.d.ts.map +1 -1
  7. package/dist/src/lib/model/acc/acc-package.d.ts +9 -7
  8. package/dist/src/lib/model/acc/acc-package.d.ts.map +1 -1
  9. package/dist/src/lib/model/asm/client/client/client.gen.d.ts +1 -2
  10. package/dist/src/lib/model/asm/client/client/client.gen.d.ts.map +1 -1
  11. package/dist/src/lib/model/asm/client/client/index.d.ts +10 -8
  12. package/dist/src/lib/model/asm/client/client/index.d.ts.map +1 -1
  13. package/dist/src/lib/model/asm/client/client/types.gen.d.ts +13 -14
  14. package/dist/src/lib/model/asm/client/client/types.gen.d.ts.map +1 -1
  15. package/dist/src/lib/model/asm/client/client/utils.gen.d.ts +6 -6
  16. package/dist/src/lib/model/asm/client/client/utils.gen.d.ts.map +1 -1
  17. package/dist/src/lib/model/asm/client/client.gen.d.ts +3 -3
  18. package/dist/src/lib/model/asm/client/client.gen.d.ts.map +1 -1
  19. package/dist/src/lib/model/asm/client/core/auth.gen.d.ts +10 -3
  20. package/dist/src/lib/model/asm/client/core/auth.gen.d.ts.map +1 -1
  21. package/dist/src/lib/model/asm/client/core/bodySerializer.gen.d.ts +5 -5
  22. package/dist/src/lib/model/asm/client/core/bodySerializer.gen.d.ts.map +1 -1
  23. package/dist/src/lib/model/asm/client/core/params.gen.d.ts +5 -5
  24. package/dist/src/lib/model/asm/client/core/params.gen.d.ts.map +1 -1
  25. package/dist/src/lib/model/asm/client/core/pathSerializer.gen.d.ts +5 -5
  26. package/dist/src/lib/model/asm/client/core/pathSerializer.gen.d.ts.map +1 -1
  27. package/dist/src/lib/model/asm/client/core/queryKeySerializer.gen.d.ts +1 -1
  28. package/dist/src/lib/model/asm/client/core/queryKeySerializer.gen.d.ts.map +1 -1
  29. package/dist/src/lib/model/asm/client/core/serverSentEvents.gen.d.ts +4 -4
  30. package/dist/src/lib/model/asm/client/core/serverSentEvents.gen.d.ts.map +1 -1
  31. package/dist/src/lib/model/asm/client/core/types.gen.d.ts +10 -5
  32. package/dist/src/lib/model/asm/client/core/types.gen.d.ts.map +1 -1
  33. package/dist/src/lib/model/asm/client/core/utils.gen.d.ts +1 -1
  34. package/dist/src/lib/model/asm/client/core/utils.gen.d.ts.map +1 -1
  35. package/dist/src/lib/model/asm/client/index.d.ts +2 -2
  36. package/dist/src/lib/model/asm/client/index.d.ts.map +1 -1
  37. package/dist/src/lib/model/asm/client/schemas.gen.d.ts +31 -55
  38. package/dist/src/lib/model/asm/client/schemas.gen.d.ts.map +1 -1
  39. package/dist/src/lib/model/asm/client/sdk.gen.d.ts +112 -130
  40. package/dist/src/lib/model/asm/client/sdk.gen.d.ts.map +1 -1
  41. package/dist/src/lib/model/asm/client/types.gen.d.ts +186 -243
  42. package/dist/src/lib/model/asm/client/types.gen.d.ts.map +1 -1
  43. package/dist/src/lib/model/channel/PolicyResponse.d.ts +8 -0
  44. package/dist/src/lib/model/channel/PolicyResponse.d.ts.map +1 -1
  45. package/dist/src/lib/model/config/DXSaaSConfiguration.d.ts +9 -0
  46. package/dist/src/lib/model/config/DXSaaSConfiguration.d.ts.map +1 -1
  47. package/dist/src/lib/model/datastore/index.d.ts +1 -0
  48. package/dist/src/lib/model/datastore/index.d.ts.map +1 -1
  49. package/dist/src/lib/model/datastore/views/query.d.ts +3 -3
  50. package/dist/src/lib/model/datastore/views/response.d.ts +3 -3
  51. package/dist/src/lib/model/experience/ApplicationExperienceRequest.d.ts +8 -6
  52. package/dist/src/lib/model/experience/ApplicationExperienceRequest.d.ts.map +1 -1
  53. package/dist/src/lib/model/experience/ExperienceSettingsResponse.d.ts +13 -12
  54. package/dist/src/lib/model/experience/ExperienceSettingsResponse.d.ts.map +1 -1
  55. package/dist/src/lib/model/maintenance/create.d.ts +1 -1
  56. package/dist/src/lib/model/maintenance/detail.d.ts +1 -1
  57. package/dist/src/lib/model/maintenance/member.d.ts +2 -2
  58. package/dist/src/lib/model/oi/services.export.d.ts +1 -1
  59. package/dist/src/lib/model/oi/services.export.d.ts.map +1 -1
  60. package/dist/src/lib/model/oi/services.transform.d.ts +2 -2
  61. package/dist/src/lib/model/oi/services.transform.d.ts.map +1 -1
  62. package/dist/src/lib/model/service/service-detail.d.ts +3 -2
  63. package/dist/src/lib/model/service/service-detail.d.ts.map +1 -1
  64. package/dist/src/lib/model/service/service-overview.d.ts +4 -3
  65. package/dist/src/lib/model/service/service-overview.d.ts.map +1 -1
  66. package/dist/src/lib/model/sli/definition.d.ts +532 -0
  67. package/dist/src/lib/model/sli/definition.d.ts.map +1 -0
  68. package/dist/src/lib/model/sli/group.d.ts +10 -8
  69. package/dist/src/lib/model/sli/group.d.ts.map +1 -1
  70. package/dist/src/lib/model/sli/metrics-preview.d.ts +86 -0
  71. package/dist/src/lib/model/sli/metrics-preview.d.ts.map +1 -0
  72. package/dist/src/lib/model/sli/save.d.ts +24 -14
  73. package/dist/src/lib/model/sli/save.d.ts.map +1 -1
  74. package/dist/src/lib/model/sli/search.d.ts +8 -8
  75. package/dist/src/lib/model/sli/search.d.ts.map +1 -1
  76. package/dist/src/lib/model/tas/TAS.d.ts +82 -81
  77. package/dist/src/lib/model/tas/TAS.d.ts.map +1 -1
  78. package/dist/src/lib/model/tenant/status-page.d.ts +77 -0
  79. package/dist/src/lib/model/tenant/status-page.d.ts.map +1 -0
  80. package/dist/src/lib/services/acc.service.d.ts +5 -4
  81. package/dist/src/lib/services/acc.service.d.ts.map +1 -1
  82. package/dist/src/lib/services/agent.service.d.ts +7 -7
  83. package/dist/src/lib/services/agent.service.d.ts.map +1 -1
  84. package/dist/src/lib/services/alarm.service.d.ts +1 -1
  85. package/dist/src/lib/services/alarm.service.d.ts.map +1 -1
  86. package/dist/src/lib/services/apm-universe.service.d.ts +3 -2
  87. package/dist/src/lib/services/apm-universe.service.d.ts.map +1 -1
  88. package/dist/src/lib/services/attribute.service.d.ts +3 -2
  89. package/dist/src/lib/services/attribute.service.d.ts.map +1 -1
  90. package/dist/src/lib/services/authorization.service.d.ts +2 -1
  91. package/dist/src/lib/services/authorization.service.d.ts.map +1 -1
  92. package/dist/src/lib/services/axa.service.d.ts +4 -3
  93. package/dist/src/lib/services/axa.service.d.ts.map +1 -1
  94. package/dist/src/lib/services/channel.service.d.ts +7 -6
  95. package/dist/src/lib/services/channel.service.d.ts.map +1 -1
  96. package/dist/src/lib/services/dashboard.service.d.ts +8 -7
  97. package/dist/src/lib/services/dashboard.service.d.ts.map +1 -1
  98. package/dist/src/lib/services/dx-saas.service.d.ts +18 -0
  99. package/dist/src/lib/services/dx-saas.service.d.ts.map +1 -1
  100. package/dist/src/lib/services/dxoi.service.d.ts +1 -1
  101. package/dist/src/lib/services/dxoi.service.d.ts.map +1 -1
  102. package/dist/src/lib/services/experience.service.d.ts +3 -2
  103. package/dist/src/lib/services/experience.service.d.ts.map +1 -1
  104. package/dist/src/lib/services/inventory.service.d.ts +4 -3
  105. package/dist/src/lib/services/inventory.service.d.ts.map +1 -1
  106. package/dist/src/lib/services/management-module.service.d.ts +7 -6
  107. package/dist/src/lib/services/management-module.service.d.ts.map +1 -1
  108. package/dist/src/lib/services/metric-batch.service.d.ts +6 -5
  109. package/dist/src/lib/services/metric-batch.service.d.ts.map +1 -1
  110. package/dist/src/lib/services/o2-universe.service.d.ts +7 -6
  111. package/dist/src/lib/services/o2-universe.service.d.ts.map +1 -1
  112. package/dist/src/lib/services/service-monolith.d.ts +2 -0
  113. package/dist/src/lib/services/service-monolith.d.ts.map +1 -1
  114. package/dist/src/lib/services/service.service.d.ts +14 -13
  115. package/dist/src/lib/services/service.service.d.ts.map +1 -1
  116. package/dist/src/lib/services/situation.service.d.ts +3 -2
  117. package/dist/src/lib/services/situation.service.d.ts.map +1 -1
  118. package/dist/src/lib/services/sli.service.d.ts +49 -13
  119. package/dist/src/lib/services/sli.service.d.ts.map +1 -1
  120. package/dist/src/lib/services/tas.service.d.ts +3 -2
  121. package/dist/src/lib/services/tas.service.d.ts.map +1 -1
  122. package/dist/src/lib/services/tenant.service.d.ts +60 -0
  123. package/dist/src/lib/services/tenant.service.d.ts.map +1 -0
  124. package/dist/src/lib/services/vertex.service.d.ts +9 -8
  125. package/dist/src/lib/services/vertex.service.d.ts.map +1 -1
  126. package/dist/src/lib/util/vertex/vertex-search.d.ts +1 -1
  127. package/dist/src/lib/util/vertex/vertex-search.d.ts.map +1 -1
  128. package/package.json +2 -1
@@ -0,0 +1,532 @@
1
+ import { z } from 'zod/v4';
2
+ import type { SliFilter, SliGroup } from './group';
3
+ /**
4
+ * Write-side model of the SLI → SLO → alert composition inside an SLI group.
5
+ *
6
+ * The server stores the three layers as sibling fields (`sliDefinition`,
7
+ * `sloDefinition`, `alertDefinition`) and does NOT enforce their
8
+ * relationships. The invariants live here instead:
9
+ *
10
+ * - `alertDefinition` is an array-of-arrays **positionally parallel** to
11
+ * `sliDefinition.functions` — `alertDefinition[i]` holds the alerts for SLI
12
+ * function `i`.
13
+ * - An SLO is a **triplet** of functions in `sloDefinition.functions`, linked
14
+ * to its SLI purely by naming convention: `<as>SLOThreshold` →
15
+ * `<as>SLOPercentage` (consumes the threshold) → `<as>ErrorBudget`
16
+ * (consumes the percentage).
17
+ * - Alerts target one of the SLI's produced metrics by `metric_name`: the SLI
18
+ * metric itself, `<Name> Percentage`, or `<Name> Error Budget`. One alert
19
+ * per produced metric per SLI.
20
+ *
21
+ * Builders emit the lean **save** shape observed in UI HAR captures
22
+ * (`docs/internal/sligroup-sli-delete.har`): no materialized `input.filter`
23
+ * on SLI functions (the server derives it from `uiFilter`), 11-key alert
24
+ * entries (the server adds alertName, alertDomainName, product, triggerMode,
25
+ * combinationMode, notificationChannels on read).
26
+ */
27
+ /** Comparators accepted by SLI/SLO thresholds. */
28
+ export declare const SliThresholdComparatorSchema: z.ZodEnum<{
29
+ GE: "GE";
30
+ GT: "GT";
31
+ LE: "LE";
32
+ LT: "LT";
33
+ EQ: "EQ";
34
+ NE: "NE";
35
+ }>;
36
+ export type SliThresholdComparator = z.infer<typeof SliThresholdComparatorSchema>;
37
+ /** The SLI computation operators observed across live tenants. */
38
+ export declare const SliFunctionOpSchema: z.ZodEnum<{
39
+ comparator: "comparator";
40
+ min: "min";
41
+ max: "max";
42
+ count: "count";
43
+ average: "average";
44
+ booland: "booland";
45
+ boolor: "boolor";
46
+ expression: "expression";
47
+ forward: "forward";
48
+ percentage: "percentage";
49
+ sum: "sum";
50
+ }>;
51
+ export type SliFunctionOp = z.infer<typeof SliFunctionOpSchema>;
52
+ export declare const SliAggregationIntervalSchema: z.ZodObject<{
53
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
54
+ unit: z.ZodString;
55
+ }, z.core.$loose>;
56
+ export type SliAggregationInterval = z.infer<typeof SliAggregationIntervalSchema>;
57
+ export declare const SliThresholdSchema: z.ZodObject<{
58
+ comparator: z.ZodEnum<{
59
+ GE: "GE";
60
+ GT: "GT";
61
+ LE: "LE";
62
+ LT: "LT";
63
+ EQ: "EQ";
64
+ NE: "NE";
65
+ }>;
66
+ value: z.ZodNumber;
67
+ emit: z.ZodOptional<z.ZodLiteral<1>>;
68
+ }, z.core.$loose>;
69
+ export type SliThreshold = z.infer<typeof SliThresholdSchema>;
70
+ export declare const SliDerivedMetricAttributeSchema: z.ZodObject<{
71
+ name: z.ZodString;
72
+ associationType: z.ZodString;
73
+ values: z.ZodOptional<z.ZodUnknown>;
74
+ limit: z.ZodOptional<z.ZodNumber>;
75
+ }, z.core.$loose>;
76
+ export type SliDerivedMetricAttribute = z.infer<typeof SliDerivedMetricAttributeSchema>;
77
+ export declare const SliDerivedMetricsSchema: z.ZodObject<{
78
+ sourceName: z.ZodString;
79
+ attributeName: z.ZodString;
80
+ attributeType: z.ZodNumber;
81
+ attributes: z.ZodArray<z.ZodObject<{
82
+ name: z.ZodString;
83
+ associationType: z.ZodString;
84
+ values: z.ZodOptional<z.ZodUnknown>;
85
+ limit: z.ZodOptional<z.ZodNumber>;
86
+ }, z.core.$loose>>;
87
+ }, z.core.$loose>;
88
+ export type SliDerivedMetrics = z.infer<typeof SliDerivedMetricsSchema>;
89
+ export declare const SliFunctionOutputSchema: z.ZodObject<{
90
+ as: z.ZodString;
91
+ outputMetrics: z.ZodBoolean;
92
+ derivedMetrics: z.ZodObject<{
93
+ sourceName: z.ZodString;
94
+ attributeName: z.ZodString;
95
+ attributeType: z.ZodNumber;
96
+ attributes: z.ZodArray<z.ZodObject<{
97
+ name: z.ZodString;
98
+ associationType: z.ZodString;
99
+ values: z.ZodOptional<z.ZodUnknown>;
100
+ limit: z.ZodOptional<z.ZodNumber>;
101
+ }, z.core.$loose>>;
102
+ }, z.core.$loose>;
103
+ }, z.core.$loose>;
104
+ export type SliFunctionOutput = z.infer<typeof SliFunctionOutputSchema>;
105
+ export declare const SliFunctionInputSchema: z.ZodObject<{
106
+ source: z.ZodString;
107
+ uiFilter: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
108
+ fieldDescription: z.ZodString;
109
+ field: z.ZodString;
110
+ value: z.ZodString;
111
+ condition: z.ZodString;
112
+ }, z.core.$loose>>>>;
113
+ filter: z.ZodOptional<z.ZodUnknown>;
114
+ }, z.core.$loose>;
115
+ export type SliFunctionInput = z.infer<typeof SliFunctionInputSchema>;
116
+ export declare const SliExpressionSchema: z.ZodObject<{
117
+ expressionValue: z.ZodString;
118
+ }, z.core.$loose>;
119
+ export type SliExpression = z.infer<typeof SliExpressionSchema>;
120
+ export declare const SliFunctionCustomParamsSchema: z.ZodObject<{
121
+ threshold: z.ZodOptional<z.ZodObject<{
122
+ comparator: z.ZodEnum<{
123
+ GE: "GE";
124
+ GT: "GT";
125
+ LE: "LE";
126
+ LT: "LT";
127
+ EQ: "EQ";
128
+ NE: "NE";
129
+ }>;
130
+ value: z.ZodNumber;
131
+ emit: z.ZodOptional<z.ZodLiteral<1>>;
132
+ }, z.core.$loose>>;
133
+ expression: z.ZodOptional<z.ZodObject<{
134
+ expressionValue: z.ZodString;
135
+ }, z.core.$loose>>;
136
+ sliInterval: z.ZodOptional<z.ZodObject<{
137
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
138
+ unit: z.ZodString;
139
+ }, z.core.$loose>>;
140
+ }, z.core.$loose>;
141
+ export type SliFunctionCustomParams = z.infer<typeof SliFunctionCustomParamsSchema>;
142
+ /** One SLI computation function (an entry of `sliDefinition.functions`). */
143
+ export declare const SliFunctionSchema: z.ZodObject<{
144
+ op: z.ZodEnum<{
145
+ comparator: "comparator";
146
+ min: "min";
147
+ max: "max";
148
+ count: "count";
149
+ average: "average";
150
+ booland: "booland";
151
+ boolor: "boolor";
152
+ expression: "expression";
153
+ forward: "forward";
154
+ percentage: "percentage";
155
+ sum: "sum";
156
+ }>;
157
+ input: z.ZodObject<{
158
+ source: z.ZodString;
159
+ uiFilter: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
160
+ fieldDescription: z.ZodString;
161
+ field: z.ZodString;
162
+ value: z.ZodString;
163
+ condition: z.ZodString;
164
+ }, z.core.$loose>>>>;
165
+ filter: z.ZodOptional<z.ZodUnknown>;
166
+ }, z.core.$loose>;
167
+ skew: z.ZodOptional<z.ZodNumber>;
168
+ aggregationInterval: z.ZodObject<{
169
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
170
+ unit: z.ZodString;
171
+ }, z.core.$loose>;
172
+ aggregationType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
173
+ customParams: z.ZodOptional<z.ZodNullable<z.ZodObject<{
174
+ threshold: z.ZodOptional<z.ZodObject<{
175
+ comparator: z.ZodEnum<{
176
+ GE: "GE";
177
+ GT: "GT";
178
+ LE: "LE";
179
+ LT: "LT";
180
+ EQ: "EQ";
181
+ NE: "NE";
182
+ }>;
183
+ value: z.ZodNumber;
184
+ emit: z.ZodOptional<z.ZodLiteral<1>>;
185
+ }, z.core.$loose>>;
186
+ expression: z.ZodOptional<z.ZodObject<{
187
+ expressionValue: z.ZodString;
188
+ }, z.core.$loose>>;
189
+ sliInterval: z.ZodOptional<z.ZodObject<{
190
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
191
+ unit: z.ZodString;
192
+ }, z.core.$loose>>;
193
+ }, z.core.$loose>>>;
194
+ output: z.ZodObject<{
195
+ as: z.ZodString;
196
+ outputMetrics: z.ZodBoolean;
197
+ derivedMetrics: z.ZodObject<{
198
+ sourceName: z.ZodString;
199
+ attributeName: z.ZodString;
200
+ attributeType: z.ZodNumber;
201
+ attributes: z.ZodArray<z.ZodObject<{
202
+ name: z.ZodString;
203
+ associationType: z.ZodString;
204
+ values: z.ZodOptional<z.ZodUnknown>;
205
+ limit: z.ZodOptional<z.ZodNumber>;
206
+ }, z.core.$loose>>;
207
+ }, z.core.$loose>;
208
+ }, z.core.$loose>;
209
+ }, z.core.$loose>;
210
+ export type SliFunction = z.infer<typeof SliFunctionSchema>;
211
+ /** The three SLO ops; an SLO is always the full triplet for one SLI. */
212
+ export declare const SloFunctionOpSchema: z.ZodEnum<{
213
+ comparator: "comparator";
214
+ percentage: "percentage";
215
+ errorbudget: "errorbudget";
216
+ }>;
217
+ export type SloFunctionOp = z.infer<typeof SloFunctionOpSchema>;
218
+ /**
219
+ * An SLO function (an entry of `sloDefinition.functions`). Structurally the
220
+ * same envelope as {@link SliFunctionSchema} with the SLO op set; kept
221
+ * separate so the two definitions don't accidentally cross-validate.
222
+ */
223
+ export declare const SloFunctionSchema: z.ZodObject<{
224
+ op: z.ZodEnum<{
225
+ comparator: "comparator";
226
+ percentage: "percentage";
227
+ errorbudget: "errorbudget";
228
+ }>;
229
+ input: z.ZodObject<{
230
+ source: z.ZodString;
231
+ uiFilter: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
232
+ fieldDescription: z.ZodString;
233
+ field: z.ZodString;
234
+ value: z.ZodString;
235
+ condition: z.ZodString;
236
+ }, z.core.$loose>>>>;
237
+ filter: z.ZodOptional<z.ZodUnknown>;
238
+ }, z.core.$loose>;
239
+ aggregationInterval: z.ZodObject<{
240
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
241
+ unit: z.ZodString;
242
+ }, z.core.$loose>;
243
+ aggregationType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
244
+ customParams: z.ZodOptional<z.ZodNullable<z.ZodObject<{
245
+ threshold: z.ZodOptional<z.ZodObject<{
246
+ comparator: z.ZodEnum<{
247
+ GE: "GE";
248
+ GT: "GT";
249
+ LE: "LE";
250
+ LT: "LT";
251
+ EQ: "EQ";
252
+ NE: "NE";
253
+ }>;
254
+ value: z.ZodNumber;
255
+ emit: z.ZodOptional<z.ZodLiteral<1>>;
256
+ }, z.core.$loose>>;
257
+ expression: z.ZodOptional<z.ZodObject<{
258
+ expressionValue: z.ZodString;
259
+ }, z.core.$loose>>;
260
+ sliInterval: z.ZodOptional<z.ZodObject<{
261
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
262
+ unit: z.ZodString;
263
+ }, z.core.$loose>>;
264
+ }, z.core.$loose>>>;
265
+ output: z.ZodObject<{
266
+ as: z.ZodString;
267
+ outputMetrics: z.ZodBoolean;
268
+ derivedMetrics: z.ZodObject<{
269
+ sourceName: z.ZodString;
270
+ attributeName: z.ZodString;
271
+ attributeType: z.ZodNumber;
272
+ attributes: z.ZodArray<z.ZodObject<{
273
+ name: z.ZodString;
274
+ associationType: z.ZodString;
275
+ values: z.ZodOptional<z.ZodUnknown>;
276
+ limit: z.ZodOptional<z.ZodNumber>;
277
+ }, z.core.$loose>>;
278
+ }, z.core.$loose>;
279
+ }, z.core.$loose>;
280
+ skew: z.ZodOptional<z.ZodNumber>;
281
+ }, z.core.$loose>;
282
+ export type SloFunction = z.infer<typeof SloFunctionSchema>;
283
+ /** The complete SLO triplet for one SLI. */
284
+ export interface SloTriplet {
285
+ threshold: SloFunction;
286
+ percentage: SloFunction;
287
+ errorbudget: SloFunction;
288
+ }
289
+ export declare const SliAlertOperatorSchema: z.ZodEnum<{
290
+ GREATER_THAN: "GREATER_THAN";
291
+ LESS_THAN: "LESS_THAN";
292
+ EQUAL_TO: "EQUAL_TO";
293
+ NOT_EQUAL_TO: "NOT_EQUAL_TO";
294
+ }>;
295
+ export type SliAlertOperator = z.infer<typeof SliAlertOperatorSchema>;
296
+ /**
297
+ * One SLI alert (an entry of `alertDefinition[i]`, where `i` is the parent
298
+ * SLI's index). The 11 non-optional keys are the save shape; the server adds
299
+ * the rest on read and round-trips them on update.
300
+ */
301
+ export declare const SliAlertEntrySchema: z.ZodObject<{
302
+ metric_name: z.ZodString;
303
+ operator: z.ZodEnum<{
304
+ GREATER_THAN: "GREATER_THAN";
305
+ LESS_THAN: "LESS_THAN";
306
+ EQUAL_TO: "EQUAL_TO";
307
+ NOT_EQUAL_TO: "NOT_EQUAL_TO";
308
+ }>;
309
+ cautionThreshold: z.ZodNumber;
310
+ cautionPeriodsOverThreshold: z.ZodNumber;
311
+ cautionObservedPeriods: z.ZodNumber;
312
+ dangerThreshold: z.ZodNumber;
313
+ dangerPeriodsOverThreshold: z.ZodNumber;
314
+ dangerObservedPeriods: z.ZodNumber;
315
+ alarmType: z.ZodLiteral<"SLI">;
316
+ managementModule: z.ZodLiteral<"SLI">;
317
+ resolution: z.ZodNumber;
318
+ alertName: z.ZodOptional<z.ZodString>;
319
+ alertDomainName: z.ZodOptional<z.ZodString>;
320
+ product: z.ZodOptional<z.ZodString>;
321
+ triggerMode: z.ZodOptional<z.ZodEnum<{
322
+ EACH_PERIOD: "EACH_PERIOD";
323
+ STATE_TRANSITION: "STATE_TRANSITION";
324
+ }>>;
325
+ combinationMode: z.ZodOptional<z.ZodString>;
326
+ notificationChannels: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
327
+ }, z.core.$loose>;
328
+ export type SliAlertEntry = z.infer<typeof SliAlertEntrySchema>;
329
+ /** Which produced metric of an SLI an alert targets. */
330
+ export declare const SliAlertTargetSchema: z.ZodEnum<{
331
+ sli: "sli";
332
+ "slo-percentage": "slo-percentage";
333
+ "error-budget": "error-budget";
334
+ }>;
335
+ export type SliAlertTarget = z.infer<typeof SliAlertTargetSchema>;
336
+ /** The fixed source vertex all SLI-group derived metrics hang off. */
337
+ export declare const SLI_DERIVED_METRIC_SOURCE = "OI|SA|SERVICES|ALL";
338
+ /**
339
+ * Maximum SLIs one group may hold — a platform limit (not surfaced by the
340
+ * search response's cap fields; discovered empirically 2026-07-11).
341
+ */
342
+ export declare const MAX_SLIS_PER_GROUP = 15;
343
+ /**
344
+ * Derives the pipeline (`output.as`) name from a human metric name the way
345
+ * the DXO2 UI does: lowercase, whitespace runs → single underscore, all other
346
+ * characters kept (`All DB Connections (Availability)` →
347
+ * `all_db_connections_(availability)`).
348
+ */
349
+ export declare function deriveSliAs(humanMetricName: string): string;
350
+ /** The human metric name an SLI function produces (its derived metric name). */
351
+ export declare function sliHumanName(fn: SliFunction): string;
352
+ /** Options for {@link buildSliFunction}. */
353
+ export interface BuildSliFunctionOptions {
354
+ /** Human metric name; also stamps the derived metric. `as` is derived from it. */
355
+ metricName: string;
356
+ op: SliFunctionOp;
357
+ /** Semantic label stamped as the `sli_type` attribute (Availability, Health, Errors, Latency, …). */
358
+ sliType?: string;
359
+ /** SLI computation interval in minutes (1, 5, or 15 observed). */
360
+ aggregationIntervalMinutes?: number;
361
+ /** Refinement atoms narrowing the group's matched metrics for this SLI only. */
362
+ refinementFilters?: SliFilter[];
363
+ /** Required for op=comparator. `emit: 1` is added automatically. */
364
+ threshold?: {
365
+ comparator: SliThresholdComparator;
366
+ value: number;
367
+ };
368
+ /**
369
+ * Required for op=expression. Sibling SLIs are referenced as
370
+ * `${pipeline:<as>}`; the input names are derived from those tokens.
371
+ */
372
+ expression?: string;
373
+ /** Stamped as the optional `metric_description` attribute. */
374
+ metricDescription?: string;
375
+ /** Stamped as the `created_by` attribute (the tenant user). */
376
+ createdBy?: string;
377
+ /** Evaluation delay in seconds; defaults to 0. */
378
+ skew?: number;
379
+ }
380
+ /** `${pipeline:<as>}` references inside an expression SLI. */
381
+ export declare function expressionPipelineNames(expression: string): string[];
382
+ /**
383
+ * Builds one SLI function in the lean save shape. Throws if op-specific
384
+ * params are missing (comparator without threshold, expression without
385
+ * expression string).
386
+ */
387
+ export declare function buildSliFunction(opts: BuildSliFunctionOptions): SliFunction;
388
+ /** Calendar periods the SLO window can align to. */
389
+ export declare const SloCalendarPeriodSchema: z.ZodEnum<{
390
+ month: "month";
391
+ week: "week";
392
+ year: "year";
393
+ quarter: "quarter";
394
+ }>;
395
+ export type SloCalendarPeriod = z.infer<typeof SloCalendarPeriodSchema>;
396
+ /** SLO window: a calendar period or a rolling N-day span. */
397
+ export type SloWindow = {
398
+ type: 'calendar';
399
+ period?: SloCalendarPeriod;
400
+ } | {
401
+ type: 'rolling';
402
+ days: number;
403
+ };
404
+ /** Options for {@link buildSloTriplet}. */
405
+ export interface BuildSloTripletOptions {
406
+ /**
407
+ * The per-interval objective test applied to the SLI metric: an evaluation
408
+ * interval meets the objective when
409
+ * `(SLI value <objectiveComparator> objectiveValue)` is true (e.g. EQ 1 =
410
+ * "the objective is met while the SLI reads 1").
411
+ */
412
+ objectiveComparator: SliThresholdComparator;
413
+ objectiveValue: number;
414
+ /** SLO target percent; the error budget alarms when compliance drops below it (GE test). */
415
+ targetPercent: number;
416
+ window: SloWindow;
417
+ /** IANA timezone; required for calendar windows, ignored for rolling. */
418
+ timezone?: string;
419
+ }
420
+ /**
421
+ * Builds the three-function SLO chain for an SLI: good-event comparator →
422
+ * percentage → error budget, named `<as>SLOThreshold` / `<as>SLOPercentage` /
423
+ * `<as>ErrorBudget`. The naming is the ONLY link back to the SLI — never
424
+ * rename one leg without the others.
425
+ */
426
+ export declare function buildSloTriplet(sliFn: SliFunction, opts: BuildSloTripletOptions): SloTriplet;
427
+ /** The produced-metric name an alert `target` maps to for a given SLI. */
428
+ export declare function producedMetricName(sliFn: SliFunction, target: SliAlertTarget): string;
429
+ /** Options for {@link buildAlertEntry}. */
430
+ export interface BuildAlertEntryOptions {
431
+ /** Which produced metric to alert on; defaults to the SLI metric itself. */
432
+ target?: SliAlertTarget;
433
+ operator: SliAlertOperator;
434
+ cautionThreshold: number;
435
+ dangerThreshold: number;
436
+ /** Evaluation resolution in seconds; defaults to 60. */
437
+ resolution?: number;
438
+ cautionObservedPeriods?: number;
439
+ cautionPeriodsOverThreshold?: number;
440
+ dangerObservedPeriods?: number;
441
+ dangerPeriodsOverThreshold?: number;
442
+ /** Omit for the server default (EACH_PERIOD). */
443
+ triggerMode?: 'EACH_PERIOD' | 'STATE_TRANSITION';
444
+ }
445
+ /** Builds one alert entry in the 11-key save shape. */
446
+ export declare function buildAlertEntry(sliFn: SliFunction, opts: BuildAlertEntryOptions): SliAlertEntry;
447
+ /** A parsed view of one SLI inside a group. */
448
+ export interface SliListing {
449
+ index: number;
450
+ /** Parsed function, or undefined when the raw entry didn't validate. */
451
+ fn?: SliFunction;
452
+ as?: string;
453
+ metricName?: string;
454
+ op?: string;
455
+ raw: unknown;
456
+ }
457
+ /**
458
+ * Lists the group's SLIs, tolerating entries that don't match
459
+ * {@link SliFunctionSchema} (they come back with `fn` undefined but keep
460
+ * their position so the alert parallelism stays intact).
461
+ */
462
+ export declare function listSlis(group: SliGroup): SliListing[];
463
+ /**
464
+ * Finds an SLI by its human metric name or its `as` name (case-insensitive).
465
+ */
466
+ export declare function findSliByName(group: SliGroup, name: string): SliListing | undefined;
467
+ /**
468
+ * The SLO triplet for an SLI, located by the `<as>SLOThreshold` /
469
+ * `<as>SLOPercentage` / `<as>ErrorBudget` naming convention. Returns
470
+ * undefined when no leg exists; a partial triplet (corrupt group) comes back
471
+ * with the missing legs undefined.
472
+ */
473
+ export declare function sloTripletFor(group: SliGroup, sliAs: string): Partial<SloTriplet> | undefined;
474
+ /** The (possibly empty) alert list for the SLI at `index`. */
475
+ export declare function alertsForSliIndex(group: SliGroup, index: number): SliAlertEntry[];
476
+ /** The alert on `target`'s produced metric for the given SLI, if any. */
477
+ export declare function findAlertByTarget(group: SliGroup, sli: SliListing, target: SliAlertTarget): SliAlertEntry | undefined;
478
+ /**
479
+ * Pads `alertDefinition` with empty slots until it is positionally parallel
480
+ * to `sliDefinition.functions` — the repair primitive every mutation runs
481
+ * first. Mutates and returns the group.
482
+ */
483
+ export declare function ensureParallelAlerts(group: SliGroup): SliGroup;
484
+ /**
485
+ * Appends an SLI function together with its empty alert slot, preserving the
486
+ * positional parallelism. Mutates and returns the group.
487
+ */
488
+ export declare function appendSli(group: SliGroup, fn: SliFunction): SliGroup;
489
+ /** Appends an SLO triplet's three functions to `sloDefinition.functions`. */
490
+ export declare function appendSloTriplet(group: SliGroup, triplet: SloTriplet): SliGroup;
491
+ /**
492
+ * Drops SLO legs whose parent SLI no longer exists in the group. Returns the
493
+ * pruned legs' names. Mutates the group.
494
+ *
495
+ * Why this exists (verified empirically on a lab tenant): the save API
496
+ * silently IGNORES an incoming `sloDefinition` that is empty or that contains
497
+ * a leg whose parent SLI is missing — the previous server-side set is kept,
498
+ * including any new legs the save tried to add. Orphans appear when the SLI
499
+ * holding the group's last SLO is removed (the emptied `sloDefinition` is
500
+ * ignored, stranding its legs). Every SLO-touching save must prune first or
501
+ * the whole update is dropped without an error.
502
+ *
503
+ * Only legs following the `<as>SLOThreshold` / `<as>SLOPercentage` /
504
+ * `<as>ErrorBudget` naming convention are considered; unconventional legs are
505
+ * left untouched.
506
+ */
507
+ export declare function pruneOrphanSloFunctions(group: SliGroup): string[];
508
+ /**
509
+ * Removes the SLO triplet for an SLI (exact-name match on the three legs, so
510
+ * `cpu` never clobbers `cpu_total`'s legs). Returns the number of legs
511
+ * removed. Mutates the group.
512
+ */
513
+ export declare function removeSloTriplet(group: SliGroup, sliAs: string): number;
514
+ /** What {@link removeSli} dropped alongside the SLI function itself. */
515
+ export interface RemoveSliCascade {
516
+ removedSloLegs: number;
517
+ removedAlerts: number;
518
+ }
519
+ /**
520
+ * Removes an SLI function together with everything derived from it: its
521
+ * positional alert slot and its SLO triplet — the exact shape the DXO2 UI
522
+ * saves after an SLI is deleted. Mutates the group; throws if the SLI is not
523
+ * found.
524
+ */
525
+ export declare function removeSli(group: SliGroup, sliAs: string): RemoveSliCascade;
526
+ /**
527
+ * Removes the alert on `target`'s produced metric from the SLI's slot.
528
+ * Returns the removed entry, or undefined when none matched. Mutates the
529
+ * group.
530
+ */
531
+ export declare function removeAlert(group: SliGroup, sli: SliListing, target: SliAlertTarget): SliAlertEntry | undefined;
532
+ //# sourceMappingURL=definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/sli/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,kDAAkD;AAClD,eAAO,MAAM,4BAA4B;;;;;;;EAE8C,CAAC;AACxF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,kEAAkE;AAClE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAkB7B,CAAC;AACJ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,4BAA4B;;;iBAKvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,kBAAkB;;;;;;;;;;;iBAO7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAA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watch by a
4
- * list of these AND-ed filters (e.g. "Source contains bd605" AND "Metric ends
5
- * with Web Agent Status").
3
+ * One row of an SLI group's match criteria. SLI groups select the metrics they
4
+ * watch by a list of these AND-ed filters (e.g. "Source contains bd605" AND
5
+ * "Metric ends with Web Agent Status").
6
6
  */
7
7
  export declare const SliFilterSchema: z.ZodObject<{
8
8
  fieldDescription: z.ZodString;
@@ -12,14 +12,16 @@ export declare const SliFilterSchema: z.ZodObject<{
12
12
  }, z.core.$loose>;
13
13
  export type SliFilter = z.infer<typeof SliFilterSchema>;
14
14
  /**
15
- * A full SLI "group" as returned by `groups/search` (per `sliGroups[]` entry)
16
- * and `groups?groupId=<id>` (single object). This is the **raw** shape that
15
+ * A full SLI group — the top-level construct holding SLIs, SLOs, and related
16
+ * alerts — as returned by `groups/search` (per `sliGroups[]` entry) and
17
+ * `groups?groupId=<id>` (single object). This is the **raw** shape that
17
18
  * `sli export` writes to disk and `sli import` reads back.
18
19
  *
19
20
  * The wire terms are `groupName` / `groupId`; the CLI surfaces these to users
20
- * as `sliName` / `sliId`. The deeply-nested `sliDefinition` / `sloDefinition` /
21
- * `alertDefinition` blocks are kept **opaque** (loose passthrough) so they
22
- * round-trip untouched — we model the envelope, not the SLI/SLO math.
21
+ * as `sliGroupName` / `sliGroupId`. The deeply-nested `sliDefinition` /
22
+ * `sloDefinition` / `alertDefinition` blocks are kept **opaque** (loose
23
+ * passthrough) so they round-trip untouched — we model the envelope, not the
24
+ * SLI/SLO math.
23
25
  */
24
26
  export declare const SliGroupSchema: z.ZodObject<{
25
27
  groupName: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/sli/group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;iBAW1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqDzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/sli/group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;iBAW1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqDzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,86 @@
1
+ import { z } from 'zod/v4';
2
+ import type { SliFilter } from './group';
3
+ export declare const SliGroupMetricsRequestSchema: z.ZodObject<{
4
+ numericFilter: z.ZodBoolean;
5
+ serviceNames: z.ZodArray<z.ZodString>;
6
+ customFilter: z.ZodObject<{
7
+ and: z.ZodObject<{
8
+ expressions: z.ZodArray<z.ZodObject<{
9
+ or: z.ZodObject<{
10
+ expressions: z.ZodArray<z.ZodObject<{
11
+ fieldDescription: z.ZodString;
12
+ field: z.ZodString;
13
+ value: z.ZodString;
14
+ condition: z.ZodString;
15
+ }, z.core.$loose>>;
16
+ }, z.core.$loose>;
17
+ }, z.core.$loose>>;
18
+ }, z.core.$loose>;
19
+ }, z.core.$loose>;
20
+ pageSize: z.ZodNumber;
21
+ }, z.core.$loose>;
22
+ export type SliGroupMetricsRequest = z.infer<typeof SliGroupMetricsRequestSchema>;
23
+ export declare const SliGroupMetricsEntrySchema: z.ZodObject<{
24
+ metricName: z.ZodString;
25
+ source: z.ZodString;
26
+ metric: z.ZodString;
27
+ nassMetricId: z.ZodOptional<z.ZodString>;
28
+ lastSeen: z.ZodOptional<z.ZodNumber>;
29
+ serviceNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
30
+ }, z.core.$loose>;
31
+ export type SliGroupMetricsEntry = z.infer<typeof SliGroupMetricsEntrySchema>;
32
+ export declare const SliGroupMetricsResponseSchema: z.ZodObject<{
33
+ totalMetrics: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
34
+ pageSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
35
+ metrics: z.ZodArray<z.ZodObject<{
36
+ metricName: z.ZodString;
37
+ source: z.ZodString;
38
+ metric: z.ZodString;
39
+ nassMetricId: z.ZodOptional<z.ZodString>;
40
+ lastSeen: z.ZodOptional<z.ZodNumber>;
41
+ serviceNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
42
+ }, z.core.$loose>>;
43
+ exceedLimit: z.ZodOptional<z.ZodBoolean>;
44
+ }, z.core.$loose>;
45
+ export type SliGroupMetricsResponse = z.infer<typeof SliGroupMetricsResponseSchema>;
46
+ /**
47
+ * One filterable field for a set of services, from
48
+ * `POST oi/v2/metricconfig/metric/fields`. The catalog is DYNAMIC — derived
49
+ * from the metadata attributes the services' metrics actually carry, so it
50
+ * grows as new attributes report. `path` fields address the metric/source
51
+ * paths; `metadata` fields address metric attributes.
52
+ */
53
+ export declare const SliMetricFieldSchema: z.ZodObject<{
54
+ fieldDescription: z.ZodString;
55
+ field: z.ZodString;
56
+ type: z.ZodString;
57
+ values: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
58
+ conditions: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
59
+ }, z.core.$loose>;
60
+ export type SliMetricField = z.infer<typeof SliMetricFieldSchema>;
61
+ export declare const SliMetricFieldsRequestSchema: z.ZodObject<{
62
+ serviceNames: z.ZodArray<z.ZodString>;
63
+ }, z.core.$loose>;
64
+ export type SliMetricFieldsRequest = z.infer<typeof SliMetricFieldsRequestSchema>;
65
+ export declare const SliMetricFieldsResponseSchema: z.ZodArray<z.ZodObject<{
66
+ fieldDescription: z.ZodString;
67
+ field: z.ZodString;
68
+ type: z.ZodString;
69
+ values: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
70
+ conditions: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
71
+ }, z.core.$loose>>;
72
+ export type SliMetricFieldsResponse = z.infer<typeof SliMetricFieldsResponseSchema>;
73
+ /**
74
+ * Builds the preview request from flat filter atoms the way the UI does:
75
+ * atoms are grouped by `field` (one or-block per field, in first-appearance
76
+ * order), and the blocks are AND-ed. Same-field atoms therefore OR (a metric
77
+ * name can `equals` any of four values) while different fields must all
78
+ * match.
79
+ *
80
+ * A per-SLI refinement is a SECOND filter layer narrowing the group's
81
+ * matches: its atoms are appended as their own AND-ed or-blocks, kept
82
+ * separate from the group set even when fields overlap (a refinement never
83
+ * ORs into the group filter — matches the UI's SLI-editing preview calls).
84
+ */
85
+ export declare function toGroupMetricsRequest(filters: SliFilter[], serviceNames: string[], pageSize?: number, refinementFilters?: SliFilter[]): SliGroupMetricsRequest;
86
+ //# sourceMappingURL=metrics-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics-preview.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/sli/metrics-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAmBzC,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;iBAavC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,0BAA0B;;;;;;;iBAOrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,6BAA6B;;;;;;;;;;;;iBAUxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;iBAM/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,6BAA6B;;;;;;kBAEqB,CAAC;AAChE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAepF;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,SAAS,EAAE,EACpB,YAAY,EAAE,MAAM,EAAE,EACtB,QAAQ,SAAM,EACd,iBAAiB,GAAE,SAAS,EAAO,GAClC,sBAAsB,CAWxB"}