@odigos/ui-kit 0.0.286 → 0.0.287
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/CHANGELOG.md +7 -0
- package/docs/api-context.md +1 -1
- package/lib/chunks/helpers-CtkwQ3Wc.js +9 -0
- package/lib/chunks/index-BlYPxLja.js +311 -0
- package/lib/chunks/source-instrument-form-context-Bg6JzU76.js +5 -0
- package/lib/chunks/ui-components-CjgsN17j.js +1943 -0
- package/lib/components/_cards/data-card/index.d.ts +6 -1
- package/lib/components/_cards/text-card/index.d.ts +3 -0
- package/lib/components/button/index.d.ts +3 -1
- package/lib/components/drawer/header/index.d.ts +2 -0
- package/lib/components/drop-data/index.d.ts +4 -10
- package/lib/components/hover-actions/index.d.ts +1 -1
- package/lib/components/index.d.ts +4 -0
- package/lib/components/info-row/index.d.ts +11 -0
- package/lib/components/input/index.d.ts +2 -0
- package/lib/components/popup/index.d.ts +17 -0
- package/lib/components/select-window-hours/index.d.ts +17 -0
- package/lib/components/table/index.d.ts +10 -0
- package/lib/components/table/styled.d.ts +11 -0
- package/lib/components/table/table-rows/index.d.ts +6 -1
- package/lib/components/table/types.d.ts +11 -2
- package/lib/components/trace-view/index.d.ts +4 -0
- package/lib/components/trace-view/styled.d.ts +43 -0
- package/lib/components/trace-view/types.d.ts +46 -0
- package/lib/components.js +1 -1
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/instrumentation-rules/index.d.ts +2 -1
- package/lib/constants/strings/index.d.ts +14 -0
- package/lib/constants/url-templatization/index.d.ts +90 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_drawers/edit-source-drawer/pods/containers-card/process-card.d.ts +1 -7
- package/lib/containers/_drawers/index.d.ts +3 -0
- package/lib/containers/_drawers/url-templatization-custom-template-drawer/destination-step.d.ts +16 -0
- package/lib/containers/_drawers/url-templatization-custom-template-drawer/index.d.ts +18 -0
- package/lib/containers/_drawers/url-templatization-default-rule-drawer/index.d.ts +14 -0
- package/lib/containers/_drawers/url-templatization-template-view-drawer/index.d.ts +9 -0
- package/lib/containers/central-connections/helpers.d.ts +8 -0
- package/lib/containers/central-connections/index.d.ts +1 -0
- package/lib/containers/index.d.ts +2 -0
- package/lib/containers/insights/consts.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/animated-edge.d.ts +10 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/blast-radius-node.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/helpers.d.ts +28 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/index.d.ts +7 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/types.d.ts +19 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-trace-compare/helpers.d.ts +15 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-trace-compare/index.d.ts +7 -0
- package/lib/containers/insights/findings/drawer/anomaly/index.d.ts +16 -0
- package/lib/containers/insights/findings/drawer/anomaly/why-this-fired/index.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/helpers.d.ts +9 -0
- package/lib/containers/insights/findings/drawer/index.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/violation/index.d.ts +7 -0
- package/lib/containers/insights/findings/drawer/violation/violation-trace-view/index.d.ts +8 -0
- package/lib/containers/insights/findings/helpers.d.ts +57 -0
- package/lib/containers/insights/findings/index.d.ts +2 -0
- package/lib/containers/insights/findings/resolve-findings/index.d.ts +11 -0
- package/lib/containers/insights/index.d.ts +6 -0
- package/lib/containers/insights/insights-context.d.ts +44 -0
- package/lib/containers/insights/overview/contained-table-and-heading/index.d.ts +19 -0
- package/lib/containers/insights/overview/index.d.ts +6 -0
- package/lib/containers/insights/settings-and-configurations/constants.d.ts +16 -0
- package/lib/containers/insights/settings-and-configurations/content-panel/index.d.ts +11 -0
- package/lib/containers/insights/settings-and-configurations/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/menu-config.d.ts +24 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/constants.d.ts +40 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/create-override-panel.d.ts +14 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/mappers.d.ts +12 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/mock.d.ts +4 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/policies-menu.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/policy-editor.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/policy-list-item.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-levels.d.ts +15 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/constants.d.ts +16 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/default-catalog.d.ts +3 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/helpers.d.ts +30 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/index.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/signal-weights-panel.d.ts +13 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/signal-weights.d.ts +17 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/types.d.ts +29 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/constants.d.ts +35 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/create-panel.d.ts +13 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/edit-panel.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/facet-section.d.ts +14 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/guardrail-list-item.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/guardrails-menu.d.ts +9 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/mappers.d.ts +23 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/types.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/constants.d.ts +82 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/create-override-panel.d.ts +21 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/mappers.d.ts +38 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/policies-menu.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/policy-editor.d.ts +9 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/policy-list-item.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/types.d.ts +31 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/constants.d.ts +52 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/formatters.d.ts +5 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/layout.d.ts +18 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/mappers.d.ts +27 -0
- package/lib/containers/insights/settings-and-configurations/panels/system/constants.d.ts +31 -0
- package/lib/containers/insights/settings-and-configurations/panels/system/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/settings-menu/category-header.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/settings-menu/index.d.ts +7 -0
- package/lib/containers/insights/transactions/drawer/baselines/helpers.d.ts +16 -0
- package/lib/containers/insights/transactions/drawer/baselines/index.d.ts +5 -0
- package/lib/containers/insights/transactions/drawer/index.d.ts +2 -0
- package/lib/containers/insights/transactions/drawer/observations/helpers.d.ts +11 -0
- package/lib/containers/insights/transactions/drawer/observations/index.d.ts +5 -0
- package/lib/containers/insights/transactions/helpers.d.ts +34 -0
- package/lib/containers/insights/transactions/index.d.ts +2 -0
- package/lib/containers/url-templatization/converters.d.ts +43 -0
- package/lib/containers/url-templatization/custom-templates-list.d.ts +16 -0
- package/lib/containers/url-templatization/default-rules-list.d.ts +10 -0
- package/lib/containers/url-templatization/helpers.d.ts +17 -0
- package/lib/containers/url-templatization/index.d.ts +5 -0
- package/lib/containers/url-templatization/scope-summary.d.ts +8 -0
- package/lib/containers/url-templatization/template-path.d.ts +8 -0
- package/lib/containers.js +1862 -286
- package/lib/contexts/odigos-api/capabilities.d.ts +2 -0
- package/lib/contexts/odigos-api/hooks/use-insights-api.d.ts +156 -0
- package/lib/contexts/odigos-api/index.d.ts +2 -1
- package/lib/contexts/odigos-api/internal/notify.d.ts +4 -3
- package/lib/contexts/odigos-api/types.d.ts +206 -1
- package/lib/contexts/odigos-api/use-odigos-api.d.ts +2 -0
- package/lib/contexts/odigos-context.d.ts +3 -3
- package/lib/contexts.js +1 -1
- package/lib/functions/index.d.ts +1 -0
- package/lib/functions/parse-raw-otlp/index.d.ts +43 -0
- package/lib/functions.js +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/useAnchoredPopup.d.ts +44 -0
- package/lib/hooks/useCopy.d.ts +2 -3
- package/lib/hooks/useOnClickOutside.d.ts +1 -0
- package/lib/hooks/useTimeAgo.d.ts +4 -0
- package/lib/hooks.js +1 -1
- package/lib/icons/common/clock-icon/index.d.ts +2 -0
- package/lib/icons/common/index.d.ts +4 -0
- package/lib/icons/common/insights-findings-icon/index.d.ts +2 -0
- package/lib/icons/common/insights-transactions-icon/index.d.ts +2 -0
- package/lib/icons/common/threat-detection-icon/index.d.ts +2 -0
- package/lib/icons/overview/index.d.ts +2 -0
- package/lib/icons/overview/insights-icon/index.d.ts +2 -0
- package/lib/icons/overview/url-templatization-icon/index.d.ts +2 -0
- package/lib/icons.js +1 -1
- package/lib/snippets/actions/index.d.ts +8 -5
- package/lib/snippets/code-modal/index.d.ts +9 -0
- package/lib/snippets/index.d.ts +1 -0
- package/lib/snippets/trace-modal/index.d.ts +8 -0
- package/lib/snippets/upgrade-modal/index.d.ts +1 -1
- package/lib/snippets/wide-drawer/index.d.ts +6 -0
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme/palettes/index.d.ts +7 -1
- package/lib/theme.js +1 -1
- package/lib/types/actions/index.d.ts +12 -0
- package/lib/types/common/index.d.ts +9 -2
- package/lib/types/index.d.ts +1 -0
- package/lib/types/insights/index.d.ts +598 -0
- package/lib/types/instrumentation-rules/index.d.ts +1 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/helpers-C5bkjRbO.js +0 -9
- package/lib/chunks/index-DBZ1mLhG.js +0 -298
- package/lib/chunks/source-instrument-form-context-CnRKQq6W.js +0 -5
- package/lib/chunks/ui-components-Ci-Vq1Dl.js +0 -1620
|
@@ -40,6 +40,8 @@ export interface Capabilities {
|
|
|
40
40
|
canFetchProfiling: boolean;
|
|
41
41
|
canFetchCollectorInfo: boolean;
|
|
42
42
|
canManageSamplingRules: boolean;
|
|
43
|
+
canManageInsightsPolicies: boolean;
|
|
44
|
+
canFetchInsights: boolean;
|
|
43
45
|
canManageRecommendations: boolean;
|
|
44
46
|
}
|
|
45
47
|
export declare const deriveCapabilities: (operations: OdigosApiOperations, ctx: OperationContext) => Capabilities;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `useInsightsApi` — Insights reads + mutations.
|
|
3
|
+
*
|
|
4
|
+
* Reactive reads are exposed as `use…()` sub-hooks that each own a
|
|
5
|
+
* `useApiQuery('GET_INSIGHTS_…')`. Calling the sub-hook IS the subscription —
|
|
6
|
+
* containers that only mutate never call them and never fire the list queries.
|
|
7
|
+
* Mutations call `runMutation` and then refetch the relevant list(s).
|
|
8
|
+
*
|
|
9
|
+
* Slot `TData` is the bare kit shape (after host `transformResult` unwraps
|
|
10
|
+
* the `{ insights: { … } }` / mutation-root wire envelope).
|
|
11
|
+
*/
|
|
12
|
+
import { type UseApiQueryOptions, type UseApiQueryResult } from '../use-api-query';
|
|
13
|
+
import type { GetInsightsAnomaliesVars, GetInsightsAnomalyVars, GetInsightsBaselineVars, GetInsightsFindingsVars, GetInsightsGuardrailViolationsVars, GetInsightsGuardrailViolationVars, GetInsightsServiceProfileVars, GetInsightsBlastRadiusVars, GetInsightsObservationVars, GetInsightsObservationsVars, GetInsightsTransactionVars, GetInsightsTransactionsVars, OperationContext, OdigosApiOperations, ForcePromoteInsightsServiceVars, PromoteInsightsBaselineClassVars, ResolveInsightsAnomalyVars } from '../types';
|
|
14
|
+
import type { InsightsAnomalyIssue, InsightsAnomalySummary, InsightsBaselineClass, InsightsBulkResolveResult, InsightsCatalog, InsightsFinding, InsightsGuardrail, InsightsGuardrailViolation, InsightsGuardrailViolationDetail, InsightsLearningPolicy, InsightsLearningPolicyInput, InsightsObservation, InsightsObservationSummary, InsightsPolicy, InsightsPolicyInput, InsightsPromoteResult, InsightsServiceStat, InsightsServiceProfile, InsightsBlastRadiusSubgraph, InsightsStorageHealth, InsightsSystemSettings, InsightsSystemSettingsInput, InsightsTransaction, InsightsTransactionStat, InsightsViolationActionInput, InsightsGuardrailInput, InsightsGuardrailSeedInput, InsightsDeviationClass, InsightsBulkResolution, InsightsPolicyScope, InsightsAnomalyRefInput } from '../../../types';
|
|
15
|
+
export interface InsightsApi {
|
|
16
|
+
useServices: (options?: UseApiQueryOptions<InsightsServiceStat[]>) => UseApiQueryResult<InsightsServiceStat[]>;
|
|
17
|
+
useTransactions: (vars?: GetInsightsTransactionsVars, options?: UseApiQueryOptions<InsightsTransactionStat[]>) => UseApiQueryResult<InsightsTransactionStat[]>;
|
|
18
|
+
useTransaction: (vars: GetInsightsTransactionVars, options?: UseApiQueryOptions<InsightsTransaction | undefined>) => UseApiQueryResult<InsightsTransaction | undefined>;
|
|
19
|
+
useBaseline: (vars: GetInsightsBaselineVars, options?: UseApiQueryOptions<InsightsBaselineClass[]>) => UseApiQueryResult<InsightsBaselineClass[]>;
|
|
20
|
+
useObservations: (vars: GetInsightsObservationsVars, options?: UseApiQueryOptions<InsightsObservationSummary[]>) => UseApiQueryResult<InsightsObservationSummary[]>;
|
|
21
|
+
useObservation: (vars: GetInsightsObservationVars, options?: UseApiQueryOptions<InsightsObservation | undefined>) => UseApiQueryResult<InsightsObservation | undefined>;
|
|
22
|
+
useFindings: (vars?: GetInsightsFindingsVars, options?: UseApiQueryOptions<InsightsFinding[]>) => UseApiQueryResult<InsightsFinding[]>;
|
|
23
|
+
useAnomalies: (vars?: GetInsightsAnomaliesVars, options?: UseApiQueryOptions<InsightsAnomalySummary[]>) => UseApiQueryResult<InsightsAnomalySummary[]>;
|
|
24
|
+
useAnomaly: (vars: GetInsightsAnomalyVars, options?: UseApiQueryOptions<InsightsAnomalyIssue | undefined>) => UseApiQueryResult<InsightsAnomalyIssue | undefined>;
|
|
25
|
+
usePolicies: (options?: UseApiQueryOptions<InsightsPolicy[]>) => UseApiQueryResult<InsightsPolicy[]>;
|
|
26
|
+
useLearningPolicies: (options?: UseApiQueryOptions<InsightsLearningPolicy[]>) => UseApiQueryResult<InsightsLearningPolicy[]>;
|
|
27
|
+
useGuardrails: (options?: UseApiQueryOptions<InsightsGuardrail[]>) => UseApiQueryResult<InsightsGuardrail[]>;
|
|
28
|
+
useGuardrailViolations: (vars?: GetInsightsGuardrailViolationsVars, options?: UseApiQueryOptions<InsightsGuardrailViolation[]>) => UseApiQueryResult<InsightsGuardrailViolation[]>;
|
|
29
|
+
useGuardrailViolation: (vars: GetInsightsGuardrailViolationVars, options?: UseApiQueryOptions<InsightsGuardrailViolationDetail | undefined>) => UseApiQueryResult<InsightsGuardrailViolationDetail | undefined>;
|
|
30
|
+
useServiceProfile: (vars: GetInsightsServiceProfileVars, options?: UseApiQueryOptions<InsightsServiceProfile | undefined>) => UseApiQueryResult<InsightsServiceProfile | undefined>;
|
|
31
|
+
useBlastRadius: (vars: GetInsightsBlastRadiusVars, options?: UseApiQueryOptions<InsightsBlastRadiusSubgraph | undefined>) => UseApiQueryResult<InsightsBlastRadiusSubgraph | undefined>;
|
|
32
|
+
useCatalog: (options?: UseApiQueryOptions<InsightsCatalog>) => UseApiQueryResult<InsightsCatalog>;
|
|
33
|
+
useSystemSettings: (options?: UseApiQueryOptions<InsightsSystemSettings>) => UseApiQueryResult<InsightsSystemSettings>;
|
|
34
|
+
useStorageHealth: (options?: UseApiQueryOptions<InsightsStorageHealth>) => UseApiQueryResult<InsightsStorageHealth>;
|
|
35
|
+
getServices?: () => Promise<{
|
|
36
|
+
data?: InsightsServiceStat[];
|
|
37
|
+
error?: string;
|
|
38
|
+
}>;
|
|
39
|
+
getTransactions?: (vars?: GetInsightsTransactionsVars) => Promise<{
|
|
40
|
+
data?: InsightsTransactionStat[];
|
|
41
|
+
error?: string;
|
|
42
|
+
}>;
|
|
43
|
+
getTransaction?: (vars: GetInsightsTransactionVars) => Promise<{
|
|
44
|
+
data?: InsightsTransaction;
|
|
45
|
+
error?: string;
|
|
46
|
+
}>;
|
|
47
|
+
getFindings?: (vars?: GetInsightsFindingsVars) => Promise<{
|
|
48
|
+
data?: InsightsFinding[];
|
|
49
|
+
error?: string;
|
|
50
|
+
}>;
|
|
51
|
+
getAnomalies?: (vars?: GetInsightsAnomaliesVars) => Promise<{
|
|
52
|
+
data?: InsightsAnomalySummary[];
|
|
53
|
+
error?: string;
|
|
54
|
+
}>;
|
|
55
|
+
getAnomaly?: (vars: GetInsightsAnomalyVars) => Promise<{
|
|
56
|
+
data?: InsightsAnomalyIssue;
|
|
57
|
+
error?: string;
|
|
58
|
+
}>;
|
|
59
|
+
getPolicies?: () => Promise<{
|
|
60
|
+
data?: InsightsPolicy[];
|
|
61
|
+
error?: string;
|
|
62
|
+
}>;
|
|
63
|
+
getLearningPolicies?: () => Promise<{
|
|
64
|
+
data?: InsightsLearningPolicy[];
|
|
65
|
+
error?: string;
|
|
66
|
+
}>;
|
|
67
|
+
getGuardrails?: () => Promise<{
|
|
68
|
+
data?: InsightsGuardrail[];
|
|
69
|
+
error?: string;
|
|
70
|
+
}>;
|
|
71
|
+
getGuardrailViolation?: (vars: GetInsightsGuardrailViolationVars) => Promise<{
|
|
72
|
+
data?: InsightsGuardrailViolationDetail;
|
|
73
|
+
error?: string;
|
|
74
|
+
}>;
|
|
75
|
+
getServiceProfile?: (vars: GetInsightsServiceProfileVars) => Promise<{
|
|
76
|
+
data?: InsightsServiceProfile;
|
|
77
|
+
error?: string;
|
|
78
|
+
}>;
|
|
79
|
+
getBlastRadius?: (vars: GetInsightsBlastRadiusVars) => Promise<{
|
|
80
|
+
data?: InsightsBlastRadiusSubgraph;
|
|
81
|
+
error?: string;
|
|
82
|
+
}>;
|
|
83
|
+
getCatalog?: () => Promise<{
|
|
84
|
+
data?: InsightsCatalog;
|
|
85
|
+
error?: string;
|
|
86
|
+
}>;
|
|
87
|
+
getSystemSettings?: () => Promise<{
|
|
88
|
+
data?: InsightsSystemSettings;
|
|
89
|
+
error?: string;
|
|
90
|
+
}>;
|
|
91
|
+
getStorageHealth?: () => Promise<{
|
|
92
|
+
data?: InsightsStorageHealth;
|
|
93
|
+
error?: string;
|
|
94
|
+
}>;
|
|
95
|
+
promoteBaselineClass?: (vars: PromoteInsightsBaselineClassVars) => Promise<{
|
|
96
|
+
data?: InsightsPromoteResult;
|
|
97
|
+
error?: string;
|
|
98
|
+
} | undefined>;
|
|
99
|
+
resetBaselineClass?: (transactionId: string, deviationClass: InsightsDeviationClass) => Promise<{
|
|
100
|
+
error?: string;
|
|
101
|
+
} | undefined>;
|
|
102
|
+
resetTransactionBaselines?: (transactionId: string) => Promise<{
|
|
103
|
+
error?: string;
|
|
104
|
+
} | undefined>;
|
|
105
|
+
forcePromoteService?: (vars: ForcePromoteInsightsServiceVars) => Promise<{
|
|
106
|
+
error?: string;
|
|
107
|
+
} | undefined>;
|
|
108
|
+
deleteTransaction?: (transactionId: string) => Promise<{
|
|
109
|
+
error?: string;
|
|
110
|
+
} | undefined>;
|
|
111
|
+
upsertPolicy?: (policy: InsightsPolicyInput) => Promise<{
|
|
112
|
+
data?: InsightsPolicy;
|
|
113
|
+
error?: string;
|
|
114
|
+
} | undefined>;
|
|
115
|
+
deletePolicy?: (scope: InsightsPolicyScope, scopeKey: string) => Promise<{
|
|
116
|
+
error?: string;
|
|
117
|
+
} | undefined>;
|
|
118
|
+
upsertLearningPolicy?: (policy: InsightsLearningPolicyInput) => Promise<{
|
|
119
|
+
data?: InsightsLearningPolicy;
|
|
120
|
+
error?: string;
|
|
121
|
+
} | undefined>;
|
|
122
|
+
deleteLearningPolicy?: (deviationClass: InsightsDeviationClass, scope: InsightsPolicyScope, scopeKey: string) => Promise<{
|
|
123
|
+
error?: string;
|
|
124
|
+
} | undefined>;
|
|
125
|
+
resolveAnomaly?: (vars: ResolveInsightsAnomalyVars) => Promise<{
|
|
126
|
+
error?: string;
|
|
127
|
+
} | undefined>;
|
|
128
|
+
bulkResolveAnomalies?: (resolution: InsightsBulkResolution, items: InsightsAnomalyRefInput[]) => Promise<{
|
|
129
|
+
data?: InsightsBulkResolveResult;
|
|
130
|
+
error?: string;
|
|
131
|
+
} | undefined>;
|
|
132
|
+
upsertGuardrail?: (guardrail: InsightsGuardrailInput) => Promise<{
|
|
133
|
+
data?: InsightsGuardrail;
|
|
134
|
+
error?: string;
|
|
135
|
+
} | undefined>;
|
|
136
|
+
deleteGuardrail?: (scopeKey: string) => Promise<{
|
|
137
|
+
error?: string;
|
|
138
|
+
} | undefined>;
|
|
139
|
+
seedGuardrail?: (seed: InsightsGuardrailSeedInput) => Promise<{
|
|
140
|
+
error?: string;
|
|
141
|
+
} | undefined>;
|
|
142
|
+
allowViolation?: (action: InsightsViolationActionInput) => Promise<{
|
|
143
|
+
error?: string;
|
|
144
|
+
} | undefined>;
|
|
145
|
+
dismissViolation?: (action: InsightsViolationActionInput) => Promise<{
|
|
146
|
+
error?: string;
|
|
147
|
+
} | undefined>;
|
|
148
|
+
reopenViolation?: (action: InsightsViolationActionInput) => Promise<{
|
|
149
|
+
error?: string;
|
|
150
|
+
} | undefined>;
|
|
151
|
+
updateSystemSettings?: (settings: InsightsSystemSettingsInput) => Promise<{
|
|
152
|
+
data?: InsightsSystemSettings;
|
|
153
|
+
error?: string;
|
|
154
|
+
} | undefined>;
|
|
155
|
+
}
|
|
156
|
+
export declare const useInsightsApi: (operations: OdigosApiOperations, ctx: OperationContext) => InsightsApi;
|
|
@@ -15,7 +15,7 @@ export { useApiQuery, useApiLazyQuery, useApiMutation } from './use-api-query';
|
|
|
15
15
|
export { useApiForConnections, type ApiForConnections } from './use-api-for-connections';
|
|
16
16
|
export type { UseApiQueryOptions, UseApiQueryResult, UseApiLazyQueryResult, UseApiMutationOptions, UseApiMutationResult, UseApiMutationTuple } from './use-api-query';
|
|
17
17
|
export { pickByPlatform, versionedDocument, vmDialectMap, type VersionedDocumentMap } from './platform-helpers';
|
|
18
|
-
export type { ApolloConfig, ApplyRecommendationRemediationResult, ApplyRecommendationRemediationVars, CreateActionResult, CreateActionVars, CreateCostReductionRuleResult, CreateDataStreamResult, CreateDataStreamVars, CreateDestinationResult, CreateDestinationVars, CreateHighlyRelevantOperationRuleResult, CreateInstrumentationRuleResult, CreateInstrumentationRuleVars, CreateNoisyOperationRuleResult, DeleteActionResult, DeleteActionVars, DeleteCostReductionRuleResult, DeleteDataStreamResult, DeleteDataStreamVars, DeleteDestinationResult, DeleteDestinationVars, DeleteHighlyRelevantOperationRuleResult, DeleteInstrumentationRuleResult, DeleteInstrumentationRuleVars, DeleteNoisyOperationRuleResult, DescribeOdigosData, DescribeSourceData, DestinationWireInput, DiagnoseResult, DiagnoseVars, GetActionsData, GetAllClusterSnapshotsData, GetClusterSnapshotData, GetClusterSnapshotVars, GetCollectorPodInfoData, GetCollectorPodInfoVars, GetConfigYamlsData, GetDataStreamsData, GetDestinationsData, GetEffectiveConfigVars, GetGatewayInfoData, GetGatewayPodsData, GetInstrumentationRulesData, GetK8sManifestData, GetK8sManifestVars, GetMetricsData, GetNamespacesWithWorkloadsData, GetNodeCollectorInfoData, GetNodeCollectorPodsData, GetPeerSourcesVars, GetProfilingSlotsData, GetRecommendationsData, GetSamplingRulesData, GetServiceMapData, GetSourceLibrariesData, GetSourceLibrariesVars, GetSourceProfilingData, GetTokensData, GetWorkloadsByIdsData, GetWorkloadsByIdsVars, GetWorkloadsData, GetWorkloadsVars, MultiFetchGroup, MultiFetchResponse, MultiFetchResult, OdigosApiOperations, OdigosApiProviderProps, Operation, OperationContext, PersistNamespacesResult, PersistNamespacesVars, PersistSourcesResult, PersistSourcesVars, RecoverFromRollbackVars, ResetLocalUiConfigResult, RestartPodVars, RestartWorkloadsVars, SamplingConfigInputWire, SamplingK8sHealthConfigInput, SamplingK8sHealthConfigVars, SamplingRuleCreateVars, SamplingRuleDeleteVars, SamplingRuleUpdateVars, SetRecommendationDismissedResult, TestDestinationConnectionVars, UpdateActionResult, UpdateActionVars, UpdateCostReductionRuleResult, UpdateDataStreamResult, UpdateDataStreamVars, UpdateDestinationData, UpdateDestinationVars, UpdateHighlyRelevantOperationRuleResult, UpdateInstrumentationRuleResult, UpdateInstrumentationRuleVars, UpdateLocalUiConfigResult, UpdateLocalUiConfigVars, UpdateLocalUiSamplingConfigResult, UpdateLocalUiSamplingConfigVars, UpdateNoisyOperationRuleResult, UpdateRemoteConfigResult, UpdateRemoteConfigVars, UpdateSourceVars, UpdateTokenResult, UpdateTokenVars, } from './types';
|
|
18
|
+
export type { ApolloConfig, ApplyRecommendationRemediationResult, ApplyRecommendationRemediationVars, CreateActionResult, CreateActionVars, CreateCostReductionRuleResult, CreateDataStreamResult, CreateDataStreamVars, CreateDestinationResult, CreateDestinationVars, CreateHighlyRelevantOperationRuleResult, CreateInstrumentationRuleResult, CreateInstrumentationRuleVars, CreateNoisyOperationRuleResult, DeleteActionResult, DeleteActionVars, DeleteCostReductionRuleResult, DeleteDataStreamResult, DeleteDataStreamVars, DeleteDestinationResult, DeleteDestinationVars, DeleteHighlyRelevantOperationRuleResult, DeleteInstrumentationRuleResult, DeleteInstrumentationRuleVars, DeleteNoisyOperationRuleResult, DescribeOdigosData, DescribeSourceData, DestinationWireInput, DiagnoseResult, DiagnoseVars, GetActionsData, GetAllClusterSnapshotsData, GetClusterSnapshotData, GetClusterSnapshotVars, GetCollectorPodInfoData, GetCollectorPodInfoVars, GetConfigYamlsData, GetDataStreamsData, GetDestinationsData, GetEffectiveConfigVars, GetGatewayInfoData, GetGatewayPodsData, GetInstrumentationRulesData, GetK8sManifestData, GetK8sManifestVars, GetMetricsData, GetNamespacesWithWorkloadsData, GetNodeCollectorInfoData, GetNodeCollectorPodsData, GetPeerSourcesVars, GetProfilingSlotsData, GetRecommendationsData, GetSamplingRulesData, GetServiceMapData, GetSourceLibrariesData, GetSourceLibrariesVars, GetSourceProfilingData, GetTokensData, GetWorkloadsByIdsData, GetWorkloadsByIdsVars, GetWorkloadsData, GetWorkloadsVars, GetInsightsTransactionsVars, GetInsightsTransactionVars, GetInsightsBaselineVars, GetInsightsObservationsVars, GetInsightsObservationVars, GetInsightsFindingsVars, GetInsightsAnomaliesVars, GetInsightsAnomalyVars, GetInsightsGuardrailViolationsVars, GetInsightsGuardrailViolationVars, GetInsightsServiceProfileVars, GetInsightsBlastRadiusVars, PromoteInsightsBaselineClassVars, ResetInsightsBaselineClassVars, ResetInsightsTransactionBaselinesVars, ForcePromoteInsightsServiceVars, DeleteInsightsTransactionVars, UpsertInsightsPolicyVars, DeleteInsightsPolicyVars, UpsertInsightsLearningPolicyVars, DeleteInsightsLearningPolicyVars, ResolveInsightsAnomalyVars, BulkResolveInsightsAnomaliesVars, UpsertInsightsGuardrailVars, DeleteInsightsGuardrailVars, SeedInsightsGuardrailVars, InsightsViolationActionVars, UpdateInsightsSystemSettingsVars, MultiFetchGroup, MultiFetchResponse, MultiFetchResult, OdigosApiOperations, OdigosApiProviderProps, Operation, OperationContext, PersistNamespacesResult, PersistNamespacesVars, PersistSourcesResult, PersistSourcesVars, RecoverFromRollbackVars, ResetLocalUiConfigResult, RestartPodVars, RestartWorkloadsVars, SamplingConfigInputWire, SamplingK8sHealthConfigInput, SamplingK8sHealthConfigVars, SamplingRuleCreateVars, SamplingRuleDeleteVars, SamplingRuleUpdateVars, SetRecommendationDismissedResult, TestDestinationConnectionVars, UpdateActionResult, UpdateActionVars, UpdateCostReductionRuleResult, UpdateDataStreamResult, UpdateDataStreamVars, UpdateDestinationData, UpdateDestinationVars, UpdateHighlyRelevantOperationRuleResult, UpdateInstrumentationRuleResult, UpdateInstrumentationRuleVars, UpdateLocalUiConfigResult, UpdateLocalUiConfigVars, UpdateLocalUiSamplingConfigResult, UpdateLocalUiSamplingConfigVars, UpdateNoisyOperationRuleResult, UpdateRemoteConfigResult, UpdateRemoteConfigVars, UpdateSourceVars, UpdateTokenResult, UpdateTokenVars, } from './types';
|
|
19
19
|
export type { Capabilities } from './capabilities';
|
|
20
20
|
export type { ConfigApi } from './hooks/use-config-api';
|
|
21
21
|
export type { TokensApi } from './hooks/use-tokens-api';
|
|
@@ -34,4 +34,5 @@ export type { K8sManifestApi } from './hooks/use-k8s-manifest-api';
|
|
|
34
34
|
export type { DestinationsApi } from './hooks/use-destinations-api';
|
|
35
35
|
export type { SourcesApi, PersistSourceInput } from './hooks/use-sources-api';
|
|
36
36
|
export type { InstrumentationRulesApi } from './hooks/use-instrumentation-rules-api';
|
|
37
|
+
export type { InsightsApi } from './hooks/use-insights-api';
|
|
37
38
|
export { prepareSourcePayloads, prepareNamespacePayloads, type SourceInstrumentInput, type NamespaceInstrumentInput, type SourceInstrumentInputItem, type NamespaceInstrumentInputItem, } from './internal/source-payloads';
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
* pre-wired. This replaces the `notifyError = (title, message, target?) => …`
|
|
8
8
|
* boilerplate that every hook used to repeat.
|
|
9
9
|
*/
|
|
10
|
+
import { StatusType, type EntityTypes, type InsightsEntityTypes, type OtherEntityTypes, type WorkloadId } from '../../../types';
|
|
10
11
|
import type { NotifyPayload } from '../../../store';
|
|
11
|
-
import { StatusType, type EntityTypes, type WorkloadId } from '../../../types';
|
|
12
12
|
type AddNotification = (notif: NotifyPayload) => void;
|
|
13
|
+
type NotifyEntityType = EntityTypes | OtherEntityTypes | InsightsEntityTypes;
|
|
13
14
|
export interface DomainNotifier {
|
|
14
15
|
/** Generic dispatcher — used for non-success/error/pending paths. */
|
|
15
16
|
notify: (type: StatusType, title: string, message: string, target?: string | WorkloadId, hideFromHistory?: boolean) => void;
|
|
@@ -32,11 +33,11 @@ export interface DomainNotifier {
|
|
|
32
33
|
notifyReadonly: () => undefined;
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
|
-
* Returns a domain-bound notifier. Pass the
|
|
36
|
+
* Returns a domain-bound notifier. Pass the entity type for the domain
|
|
36
37
|
* (e.g. `EntityTypes.Source`) and every dispatched toast is tagged with
|
|
37
38
|
* the correct `crdType` and SSE-target translation.
|
|
38
39
|
*/
|
|
39
|
-
export declare const useNotify: (entityType:
|
|
40
|
+
export declare const useNotify: (entityType: NotifyEntityType) => DomainNotifier;
|
|
40
41
|
/**
|
|
41
42
|
* Standalone form of the readonly notification, used by the small number
|
|
42
43
|
* of hooks that don't need the full `useNotify` surface (e.g. data-streams,
|
|
@@ -18,7 +18,7 @@ import type { ReactNode } from 'react';
|
|
|
18
18
|
import type { DocumentNode } from '@apollo/client';
|
|
19
19
|
import type { InstrumentationRuleInputWire } from '../../functions/instrumentation-rule-source-scopes';
|
|
20
20
|
import type { ApolloClient, ApolloLink, FetchPolicy, MutationFetchPolicy, TypePolicies, WatchQueryFetchPolicy } from '@apollo/client';
|
|
21
|
-
import type { Action, ActionFormData, AllClusterSnapshots, ClusterSnapshot, ConfigYaml, CostReductionRule, CostReductionRuleInput, DataStream, DescribeOdigos, DescribeSource, Destination, DestinationFormData, DiagnoseFormData, EffectiveConfig, EffectiveConfigInput, EnableProfilingResult, ExtendedPodInfo, FetchedConfig, GatewayInfo, GetActionTypesResult, GetInstrumentationRuleTypesResult, GetDestinationCategoriesResult, GetPotentialDestinationsResult, GetProfileHotFunctionsVars, HighlyRelevantOperationRule, HighlyRelevantOperationRuleInput, HotFunctionsResult, InstrumentationRule, K8sResourceKind, LocalUiConfigInput, Metrics, Namespace, NoisyOperationRule, NoisyOperationRuleInput, NodeCollectoInfo, PlatformType, PodInfo, ProfilingSlots, SourceProfilingVars, Recommendation, RecommendationRemediationType, RecommendationType, SamplingRules, SamplingRulesK8sHealthConfig, ServiceMapSources, SourceFormData, SourceProfilingResult, TestConnectionResponse, Tier, TokenPayload, Workload, WorkloadId, PeerSources } from '../../types';
|
|
21
|
+
import type { Action, ActionFormData, AllClusterSnapshots, ClusterSnapshot, ConfigYaml, CostReductionRule, CostReductionRuleInput, DataStream, DescribeOdigos, DescribeSource, Destination, DestinationFormData, DiagnoseFormData, EffectiveConfig, EffectiveConfigInput, EnableProfilingResult, ExtendedPodInfo, FetchedConfig, GatewayInfo, GetActionTypesResult, GetInstrumentationRuleTypesResult, GetDestinationCategoriesResult, GetPotentialDestinationsResult, GetProfileHotFunctionsVars, HighlyRelevantOperationRule, HighlyRelevantOperationRuleInput, HotFunctionsResult, InsightsAnomalyIssue, InsightsAnomalyRefInput, InsightsAnomalyResolution, InsightsAnomalySummary, InsightsBaselineClass, InsightsBulkResolution, InsightsBulkResolveResult, InsightsCatalog, InsightsDeviationClass, InsightsFinding, InsightsFindingKind, InsightsGuardrail, InsightsGuardrailInput, InsightsGuardrailSeedInput, InsightsGuardrailViolation, InsightsGuardrailViolationDetail, InsightsLearningPolicy, InsightsLearningPolicyInput, InsightsObservation, InsightsObservationSummary, InsightsPolicy, InsightsPolicyInput, InsightsPolicyScope, InsightsPromoteResult, InsightsSampleReason, InsightsServiceStat, InsightsServiceProfile, InsightsBlastRadiusSubgraph, InsightsStorageHealth, InsightsSystemSettings, InsightsSystemSettingsInput, InsightsTransaction, InsightsTransactionKind, InsightsTransactionStat, InsightsViolationActionInput, InstrumentationRule, K8sResourceKind, LocalUiConfigInput, Metrics, Namespace, NoisyOperationRule, NoisyOperationRuleInput, NodeCollectoInfo, PlatformType, PodInfo, ProfilingSlots, SourceProfilingVars, Recommendation, RecommendationRemediationType, RecommendationType, SamplingRules, SamplingRulesK8sHealthConfig, ServiceMapSources, SourceFormData, SourceProfilingResult, TestConnectionResponse, Tier, TokenPayload, Workload, WorkloadId, PeerSources } from '../../types';
|
|
22
22
|
/**
|
|
23
23
|
* The execution context for a given operation, propagated through every
|
|
24
24
|
* `Operation.document(ctx)` / `transformVariables(vars, ctx)` /
|
|
@@ -537,6 +537,13 @@ export interface GetSamplingRulesData {
|
|
|
537
537
|
k8sHealthProbesConfig?: SamplingRulesK8sHealthConfig;
|
|
538
538
|
};
|
|
539
539
|
}
|
|
540
|
+
export interface UpsertInsightsPolicyVars {
|
|
541
|
+
policy: InsightsPolicyInput;
|
|
542
|
+
}
|
|
543
|
+
export interface DeleteInsightsPolicyVars {
|
|
544
|
+
scope: InsightsPolicyScope;
|
|
545
|
+
scopeKey: string;
|
|
546
|
+
}
|
|
540
547
|
export interface SamplingRuleCreateVars<TInput> {
|
|
541
548
|
samplingId: string;
|
|
542
549
|
rule: TInput;
|
|
@@ -597,6 +604,119 @@ export interface GetAllClusterSnapshotsData {
|
|
|
597
604
|
export interface GetClusterSnapshotData {
|
|
598
605
|
clusterSnapshot?: ClusterSnapshot;
|
|
599
606
|
}
|
|
607
|
+
export interface GetInsightsTransactionsVars {
|
|
608
|
+
namespace?: string | null;
|
|
609
|
+
service?: string | null;
|
|
610
|
+
kind?: InsightsTransactionKind | null;
|
|
611
|
+
}
|
|
612
|
+
export interface GetInsightsTransactionVars {
|
|
613
|
+
id: string;
|
|
614
|
+
}
|
|
615
|
+
export interface GetInsightsBaselineVars {
|
|
616
|
+
transactionId: string;
|
|
617
|
+
}
|
|
618
|
+
export interface GetInsightsObservationsVars {
|
|
619
|
+
transactionId: string;
|
|
620
|
+
sampleReason?: InsightsSampleReason | null;
|
|
621
|
+
}
|
|
622
|
+
export interface GetInsightsObservationVars {
|
|
623
|
+
transactionId: string;
|
|
624
|
+
traceId: string;
|
|
625
|
+
}
|
|
626
|
+
export interface GetInsightsFindingsVars {
|
|
627
|
+
windowHours?: number | null;
|
|
628
|
+
service?: string | null;
|
|
629
|
+
namespace?: string | null;
|
|
630
|
+
status?: string | null;
|
|
631
|
+
kind?: InsightsFindingKind | null;
|
|
632
|
+
}
|
|
633
|
+
export interface GetInsightsAnomaliesVars {
|
|
634
|
+
windowHours?: number | null;
|
|
635
|
+
service?: string | null;
|
|
636
|
+
namespace?: string | null;
|
|
637
|
+
status?: string | null;
|
|
638
|
+
}
|
|
639
|
+
export interface GetInsightsAnomalyVars {
|
|
640
|
+
transactionId: string;
|
|
641
|
+
signature: string;
|
|
642
|
+
}
|
|
643
|
+
export interface GetInsightsGuardrailViolationsVars {
|
|
644
|
+
windowHours?: number | null;
|
|
645
|
+
service?: string | null;
|
|
646
|
+
namespace?: string | null;
|
|
647
|
+
status?: string | null;
|
|
648
|
+
}
|
|
649
|
+
export interface GetInsightsGuardrailViolationVars {
|
|
650
|
+
scopeKey: string;
|
|
651
|
+
ruleKey: string;
|
|
652
|
+
offending: string;
|
|
653
|
+
}
|
|
654
|
+
export interface GetInsightsServiceProfileVars {
|
|
655
|
+
namespace?: string | null;
|
|
656
|
+
service: string;
|
|
657
|
+
}
|
|
658
|
+
export interface GetInsightsBlastRadiusVars {
|
|
659
|
+
namespace?: string | null;
|
|
660
|
+
service: string;
|
|
661
|
+
depth?: number | null;
|
|
662
|
+
}
|
|
663
|
+
export interface PromoteInsightsBaselineClassVars {
|
|
664
|
+
transactionId: string;
|
|
665
|
+
class: InsightsDeviationClass;
|
|
666
|
+
}
|
|
667
|
+
export interface ResetInsightsBaselineClassVars {
|
|
668
|
+
transactionId: string;
|
|
669
|
+
class: InsightsDeviationClass;
|
|
670
|
+
}
|
|
671
|
+
export interface ResetInsightsTransactionBaselinesVars {
|
|
672
|
+
transactionId: string;
|
|
673
|
+
}
|
|
674
|
+
export interface ForcePromoteInsightsServiceVars {
|
|
675
|
+
namespace: string;
|
|
676
|
+
service: string;
|
|
677
|
+
}
|
|
678
|
+
export interface DeleteInsightsTransactionVars {
|
|
679
|
+
transactionId: string;
|
|
680
|
+
}
|
|
681
|
+
export interface UpsertInsightsPolicyVars {
|
|
682
|
+
policy: InsightsPolicyInput;
|
|
683
|
+
}
|
|
684
|
+
export interface DeleteInsightsPolicyVars {
|
|
685
|
+
scope: InsightsPolicyScope;
|
|
686
|
+
scopeKey: string;
|
|
687
|
+
}
|
|
688
|
+
export interface UpsertInsightsLearningPolicyVars {
|
|
689
|
+
policy: InsightsLearningPolicyInput;
|
|
690
|
+
}
|
|
691
|
+
export interface DeleteInsightsLearningPolicyVars {
|
|
692
|
+
class: InsightsDeviationClass;
|
|
693
|
+
scope: InsightsPolicyScope;
|
|
694
|
+
scopeKey: string;
|
|
695
|
+
}
|
|
696
|
+
export interface ResolveInsightsAnomalyVars {
|
|
697
|
+
transactionId: string;
|
|
698
|
+
signature: string;
|
|
699
|
+
resolution: InsightsAnomalyResolution;
|
|
700
|
+
}
|
|
701
|
+
export interface BulkResolveInsightsAnomaliesVars {
|
|
702
|
+
resolution: InsightsBulkResolution;
|
|
703
|
+
items: InsightsAnomalyRefInput[];
|
|
704
|
+
}
|
|
705
|
+
export interface UpsertInsightsGuardrailVars {
|
|
706
|
+
guardrail: InsightsGuardrailInput;
|
|
707
|
+
}
|
|
708
|
+
export interface DeleteInsightsGuardrailVars {
|
|
709
|
+
scopeKey: string;
|
|
710
|
+
}
|
|
711
|
+
export interface SeedInsightsGuardrailVars {
|
|
712
|
+
seed: InsightsGuardrailSeedInput;
|
|
713
|
+
}
|
|
714
|
+
export interface InsightsViolationActionVars {
|
|
715
|
+
action: InsightsViolationActionInput;
|
|
716
|
+
}
|
|
717
|
+
export interface UpdateInsightsSystemSettingsVars {
|
|
718
|
+
settings: InsightsSystemSettingsInput;
|
|
719
|
+
}
|
|
600
720
|
export interface PersistSourcesResult {
|
|
601
721
|
persistK8sSources: boolean;
|
|
602
722
|
}
|
|
@@ -678,6 +798,54 @@ export interface DeleteCostReductionRuleResult {
|
|
|
678
798
|
export interface UpdateLocalUiSamplingConfigResult {
|
|
679
799
|
updateLocalUiSamplingConfig: boolean;
|
|
680
800
|
}
|
|
801
|
+
export interface PromoteInsightsBaselineClassResult {
|
|
802
|
+
promoteInsightsBaselineClass: InsightsPromoteResult;
|
|
803
|
+
}
|
|
804
|
+
export interface ResetInsightsBaselineClassResult {
|
|
805
|
+
resetInsightsBaselineClass: boolean;
|
|
806
|
+
}
|
|
807
|
+
export interface ResetInsightsTransactionBaselinesResult {
|
|
808
|
+
resetInsightsTransactionBaselines: boolean;
|
|
809
|
+
}
|
|
810
|
+
export interface UpsertInsightsPolicyResult {
|
|
811
|
+
upsertInsightsPolicy: InsightsPolicy;
|
|
812
|
+
}
|
|
813
|
+
export interface DeleteInsightsPolicyResult {
|
|
814
|
+
deleteInsightsPolicy: boolean;
|
|
815
|
+
}
|
|
816
|
+
export interface UpsertInsightsLearningPolicyResult {
|
|
817
|
+
upsertInsightsLearningPolicy: InsightsLearningPolicy;
|
|
818
|
+
}
|
|
819
|
+
export interface DeleteInsightsLearningPolicyResult {
|
|
820
|
+
deleteInsightsLearningPolicy: boolean;
|
|
821
|
+
}
|
|
822
|
+
export interface ResolveInsightsAnomalyResult {
|
|
823
|
+
resolveInsightsAnomaly: boolean;
|
|
824
|
+
}
|
|
825
|
+
export interface BulkResolveInsightsAnomaliesResult {
|
|
826
|
+
bulkResolveInsightsAnomalies: InsightsBulkResolveResult;
|
|
827
|
+
}
|
|
828
|
+
export interface UpsertInsightsGuardrailResult {
|
|
829
|
+
upsertInsightsGuardrail: InsightsGuardrail;
|
|
830
|
+
}
|
|
831
|
+
export interface DeleteInsightsGuardrailResult {
|
|
832
|
+
deleteInsightsGuardrail: boolean;
|
|
833
|
+
}
|
|
834
|
+
export interface SeedInsightsGuardrailResult {
|
|
835
|
+
seedInsightsGuardrail: boolean;
|
|
836
|
+
}
|
|
837
|
+
export interface AllowInsightsGuardrailViolationResult {
|
|
838
|
+
allowInsightsGuardrailViolation: boolean;
|
|
839
|
+
}
|
|
840
|
+
export interface DismissInsightsGuardrailViolationResult {
|
|
841
|
+
dismissInsightsGuardrailViolation: boolean;
|
|
842
|
+
}
|
|
843
|
+
export interface ReopenInsightsGuardrailViolationResult {
|
|
844
|
+
reopenInsightsGuardrailViolation: boolean;
|
|
845
|
+
}
|
|
846
|
+
export interface UpdateInsightsSystemSettingsResult {
|
|
847
|
+
updateInsightsSystemSettings: InsightsSystemSettings;
|
|
848
|
+
}
|
|
681
849
|
export interface GetRecommendationsData {
|
|
682
850
|
recommendations?: Recommendation[];
|
|
683
851
|
computePlatform?: {
|
|
@@ -785,6 +953,43 @@ export interface OdigosApiOperations {
|
|
|
785
953
|
APPLY_RECOMMENDATION_REMEDIATION?: Operation<ApplyRecommendationRemediationResult, ApplyRecommendationRemediationVars>;
|
|
786
954
|
GET_ALL_CLUSTER_SNAPSHOTS?: Operation<AllClusterSnapshots, undefined>;
|
|
787
955
|
GET_CLUSTER_SNAPSHOT?: Operation<ClusterSnapshot, GetClusterSnapshotVars>;
|
|
956
|
+
GET_INSIGHTS_SERVICES?: Operation<InsightsServiceStat[], undefined>;
|
|
957
|
+
GET_INSIGHTS_SERVICE_PROFILE?: Operation<InsightsServiceProfile | undefined, GetInsightsServiceProfileVars>;
|
|
958
|
+
GET_INSIGHTS_BLAST_RADIUS?: Operation<InsightsBlastRadiusSubgraph | undefined, GetInsightsBlastRadiusVars>;
|
|
959
|
+
GET_INSIGHTS_TRANSACTIONS?: Operation<InsightsTransactionStat[], GetInsightsTransactionsVars | undefined>;
|
|
960
|
+
GET_INSIGHTS_TRANSACTION?: Operation<InsightsTransaction | undefined, GetInsightsTransactionVars>;
|
|
961
|
+
GET_INSIGHTS_BASELINE?: Operation<InsightsBaselineClass[], GetInsightsBaselineVars>;
|
|
962
|
+
GET_INSIGHTS_OBSERVATIONS?: Operation<InsightsObservationSummary[], GetInsightsObservationsVars>;
|
|
963
|
+
GET_INSIGHTS_OBSERVATION?: Operation<InsightsObservation | undefined, GetInsightsObservationVars>;
|
|
964
|
+
GET_INSIGHTS_FINDINGS?: Operation<InsightsFinding[], GetInsightsFindingsVars | undefined>;
|
|
965
|
+
GET_INSIGHTS_ANOMALIES?: Operation<InsightsAnomalySummary[], GetInsightsAnomaliesVars | undefined>;
|
|
966
|
+
GET_INSIGHTS_ANOMALY?: Operation<InsightsAnomalyIssue | undefined, GetInsightsAnomalyVars>;
|
|
967
|
+
GET_INSIGHTS_POLICIES?: Operation<InsightsPolicy[], undefined>;
|
|
968
|
+
GET_INSIGHTS_LEARNING_POLICIES?: Operation<InsightsLearningPolicy[], undefined>;
|
|
969
|
+
GET_INSIGHTS_GUARDRAILS?: Operation<InsightsGuardrail[], undefined>;
|
|
970
|
+
GET_INSIGHTS_GUARDRAIL_VIOLATIONS?: Operation<InsightsGuardrailViolation[], GetInsightsGuardrailViolationsVars | undefined>;
|
|
971
|
+
GET_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<InsightsGuardrailViolationDetail | undefined, GetInsightsGuardrailViolationVars>;
|
|
972
|
+
GET_INSIGHTS_CATALOG?: Operation<InsightsCatalog, undefined>;
|
|
973
|
+
GET_INSIGHTS_SYSTEM_SETTINGS?: Operation<InsightsSystemSettings, undefined>;
|
|
974
|
+
GET_INSIGHTS_STORAGE_HEALTH?: Operation<InsightsStorageHealth, undefined>;
|
|
975
|
+
PROMOTE_INSIGHTS_BASELINE_CLASS?: Operation<InsightsPromoteResult, PromoteInsightsBaselineClassVars>;
|
|
976
|
+
RESET_INSIGHTS_BASELINE_CLASS?: Operation<boolean, ResetInsightsBaselineClassVars>;
|
|
977
|
+
RESET_INSIGHTS_TRANSACTION_BASELINES?: Operation<boolean, ResetInsightsTransactionBaselinesVars>;
|
|
978
|
+
FORCE_PROMOTE_INSIGHTS_SERVICE?: Operation<boolean, ForcePromoteInsightsServiceVars>;
|
|
979
|
+
DELETE_INSIGHTS_TRANSACTION?: Operation<boolean, DeleteInsightsTransactionVars>;
|
|
980
|
+
UPSERT_INSIGHTS_POLICY?: Operation<InsightsPolicy, UpsertInsightsPolicyVars>;
|
|
981
|
+
DELETE_INSIGHTS_POLICY?: Operation<boolean, DeleteInsightsPolicyVars>;
|
|
982
|
+
UPSERT_INSIGHTS_LEARNING_POLICY?: Operation<InsightsLearningPolicy, UpsertInsightsLearningPolicyVars>;
|
|
983
|
+
DELETE_INSIGHTS_LEARNING_POLICY?: Operation<boolean, DeleteInsightsLearningPolicyVars>;
|
|
984
|
+
RESOLVE_INSIGHTS_ANOMALY?: Operation<boolean, ResolveInsightsAnomalyVars>;
|
|
985
|
+
BULK_RESOLVE_INSIGHTS_ANOMALIES?: Operation<InsightsBulkResolveResult, BulkResolveInsightsAnomaliesVars>;
|
|
986
|
+
UPSERT_INSIGHTS_GUARDRAIL?: Operation<InsightsGuardrail, UpsertInsightsGuardrailVars>;
|
|
987
|
+
DELETE_INSIGHTS_GUARDRAIL?: Operation<boolean, DeleteInsightsGuardrailVars>;
|
|
988
|
+
SEED_INSIGHTS_GUARDRAIL?: Operation<boolean, SeedInsightsGuardrailVars>;
|
|
989
|
+
ALLOW_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<boolean, InsightsViolationActionVars>;
|
|
990
|
+
DISMISS_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<boolean, InsightsViolationActionVars>;
|
|
991
|
+
REOPEN_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<boolean, InsightsViolationActionVars>;
|
|
992
|
+
UPDATE_INSIGHTS_SYSTEM_SETTINGS?: Operation<InsightsSystemSettings, UpdateInsightsSystemSettingsVars>;
|
|
788
993
|
}
|
|
789
994
|
/**
|
|
790
995
|
* The host's Apollo configuration. The kit constructs the ApolloClient
|
|
@@ -52,6 +52,7 @@ import { type ActionsApi } from './hooks/use-actions-api';
|
|
|
52
52
|
import { type MetricsApi } from './hooks/use-metrics-api';
|
|
53
53
|
import { type DescribeApi } from './hooks/use-describe-api';
|
|
54
54
|
import { type SamplingApi } from './hooks/use-sampling-api';
|
|
55
|
+
import { type InsightsApi } from './hooks/use-insights-api';
|
|
55
56
|
import { type NamespaceApi } from './hooks/use-namespace-api';
|
|
56
57
|
import { type SnapshotsApi } from './hooks/use-snapshots-api';
|
|
57
58
|
import { type ProfilingApi } from './hooks/use-profiling-api';
|
|
@@ -80,6 +81,7 @@ export interface UseOdigosApiReturn {
|
|
|
80
81
|
samplingApi: SamplingApi;
|
|
81
82
|
recommendationsApi: RecommendationsApi;
|
|
82
83
|
snapshotsApi: SnapshotsApi;
|
|
84
|
+
insightsApi: InsightsApi;
|
|
83
85
|
capabilities: Capabilities;
|
|
84
86
|
/**
|
|
85
87
|
* Wipe Apollo's normalized cache in place. Soft alternative to bumping
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type MinSupportedVersion, PlatformType, Tier } from '../types';
|
|
2
|
+
import { type MinSupportedVersion, type VersionThreshold, PlatformType, Tier } from '../types';
|
|
3
3
|
interface ContextProps extends PropsWithChildren {
|
|
4
4
|
platformType: PlatformType;
|
|
5
5
|
tier: Tier;
|
|
6
6
|
version: string;
|
|
7
7
|
}
|
|
8
8
|
export declare const OdigosProvider: ({ children, platformType, tier, version }: ContextProps) => React.JSX.Element;
|
|
9
|
-
export declare const resolveMinSupportedVersion: (minSupportedVersion?: MinSupportedVersion, platformType?: PlatformType) =>
|
|
9
|
+
export declare const resolveMinSupportedVersion: (minSupportedVersion?: MinSupportedVersion, platformType?: PlatformType) => VersionThreshold;
|
|
10
10
|
export declare const checkVersionSupport: (currentVersion: string, minSupportedVersion?: MinSupportedVersion, platformType?: PlatformType) => boolean;
|
|
11
11
|
export declare const useOdigos: (minSupportedVersion?: MinSupportedVersion) => {
|
|
12
12
|
isVersionSupported: boolean;
|
|
13
|
-
minSupportedVersion:
|
|
13
|
+
minSupportedVersion: VersionThreshold;
|
|
14
14
|
isK8s: boolean;
|
|
15
15
|
isVm: boolean;
|
|
16
16
|
isConnector: boolean;
|
package/lib/contexts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as a,r as x,a as y}from"./chunks/source-instrument-form-context-
|
|
1
|
+
import{u as a,r as x,a as y}from"./chunks/source-instrument-form-context-Bg6JzU76.js";export{A as ActionFormContextProvider,C as CloudConnectorFormContextProvider,D as DataStreamFormContextProvider,b as DestinationFormContextProvider,O as OdigosApiConnectionsScope,c as OdigosApiProvider,R as RuleFormContextProvider,S as SamplingRuleFormType,d as SamplingRulesFormProvider,e as SourceEditFormContextProvider,f as SourceInstrumentFormContextProvider,p as prepareNamespacePayloads,g as prepareSourcePayloads,h as useActionFormContext,i as useApiLazyQuery,j as useApiMutation,k as useApiQuery,l as useCloudConnectorFormContext,m as useDataStreamFormContext,n as useDestinationFormContext,o as useOdigosApi,q as useRuleFormContext,s as useSamplingRulesFormContext,t as useSourceEditFormContext,v as useSourceInstrumentFormContext}from"./chunks/source-instrument-form-context-Bg6JzU76.js";export{O as OdigosProvider,c as checkVersionSupport,r as resolveMinSupportedVersion,u as useOdigos}from"./chunks/helpers-CtkwQ3Wc.js";import{jsx as F}from"react/jsx-runtime";import{useMemo as P,useContext as E,createContext as T}from"react";import{P as I,t as _}from"./chunks/ui-components-CjgsN17j.js";import{useApolloClient as w}from"@apollo/client/react";import"@apollo/client/link/error";import"@apollo/client/link/context";import"@apollo/client/utilities";import"@apollo/client/errors";import"@apollo/client";import"styled-components";import"./icons.js";import"zustand";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";const M=()=>{const o=w(),{operations:r,context:e}=a();return{multiFetch:async(t,s,n)=>{const i=r[t];return i?y(o,i,s,n,e):{results:[],allSucceeded:!1,anySucceeded:!1,successCount:0,failureCount:s.length,error:`Operation ${String(t)} not configured`}},bulkPersistSources:async(t,s)=>{const n=[];for(const i of t){const t={...e,proxyID:i},{error:a}=await x(o,r.PERSIST_SOURCES,s,t);a&&n.push(`${i}: ${a}`)}return n.length?{error:n.join(", ")}:void 0},applyConfigurations:async(t,s)=>{if(!r.UPDATE_REMOTE_CONFIG)return{error:"UPDATE_REMOTE_CONFIG not configured"};if(!t.length)return{error:"No connections selected"};const n={formData:s,connectionIds:t},i=r.UPDATE_REMOTE_CONFIG;let a;return 1===t.length?({error:a}=await x(o,i,n,e)):({error:a}=await y(o,i,t,n,e)),a?{error:a}:void 0}}},N=(o,r)=>o.platformType===I.K8s?r.K8s:[I.Vm,I.Connector,I.AwsEcs].includes(o.platformType)?r.Vm:void 0,V=o=>r=>{const e=o[r.platformType];if(!e)return;const t=Object.keys(e);if(0===t.length)return;const s=_(r.schemaVersion??r.version),n=[...t].sort((o,r)=>_(r)-_(o)).find(o=>s>=_(o));return n?e[n]:void 0},U=(o,r)=>{const e={};for(const t of Object.keys(o))e[t]=r(o[t]);return e},z=T({formType:void 0}),G=({children:o,formType:r})=>{const e=P(()=>({formType:r}),[r]);return F(z.Provider,{value:e,children:o})},$=()=>E(z);export{G as StorybookProvider,N as pickByPlatform,M as useApiForConnections,$ as useStorybook,V as versionedDocument,U as vmDialectMap};
|
package/lib/functions/index.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export * from './decimals-only';
|
|
|
61
61
|
export * from './numbers-only';
|
|
62
62
|
export * from './parse-boolean-from-string';
|
|
63
63
|
export * from './parse-json-string-to-pretty-string';
|
|
64
|
+
export * from './parse-raw-otlp';
|
|
64
65
|
export * from './prepare-destination-form-data';
|
|
65
66
|
export * from './remove-empty-values-from-object';
|
|
66
67
|
export * from './safe-json-parse';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse Insights `rawOtlp` (base64 OTLP TracesData protobuf) into UI-ready span views.
|
|
3
|
+
* All fields are optional / nullable so callers can render without crashing on bad payloads.
|
|
4
|
+
*/
|
|
5
|
+
export interface InsightsOtlpKv {
|
|
6
|
+
key?: string | null;
|
|
7
|
+
value?: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface InsightsOtlpSpanEvent {
|
|
10
|
+
name?: string | null;
|
|
11
|
+
offsetMs?: number | null;
|
|
12
|
+
attrs?: InsightsOtlpKv[] | null;
|
|
13
|
+
}
|
|
14
|
+
/** Flat, waterfall-ready span — mirrors Insights `engine.SpanView`. */
|
|
15
|
+
export interface InsightsOtlpSpan {
|
|
16
|
+
spanId?: string | null;
|
|
17
|
+
parentSpanId?: string | null;
|
|
18
|
+
name?: string | null;
|
|
19
|
+
service?: string | null;
|
|
20
|
+
kind?: string | null;
|
|
21
|
+
depth?: number | null;
|
|
22
|
+
/** Absolute start time as a decimal string (uint64 nanos; unsafe as JS number). */
|
|
23
|
+
startUnixNano?: string | null;
|
|
24
|
+
/** Absolute end time as a decimal string (uint64 nanos; unsafe as JS number). */
|
|
25
|
+
endUnixNano?: string | null;
|
|
26
|
+
offsetMs?: number | null;
|
|
27
|
+
durationMs?: number | null;
|
|
28
|
+
scope?: string | null;
|
|
29
|
+
statusCode?: string | null;
|
|
30
|
+
statusMsg?: string | null;
|
|
31
|
+
attrs?: InsightsOtlpKv[] | null;
|
|
32
|
+
events?: InsightsOtlpSpanEvent[] | null;
|
|
33
|
+
}
|
|
34
|
+
export interface InsightsParsedOtlpTrace {
|
|
35
|
+
spans?: InsightsOtlpSpan[] | null;
|
|
36
|
+
/** Present when decode fails; `spans` is then null/empty. */
|
|
37
|
+
error?: string | null;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Decode a base64 OTLP `TracesData` protobuf into optional/nullable span views.
|
|
41
|
+
* Never throws — returns `{ spans: null, error }` on failure.
|
|
42
|
+
*/
|
|
43
|
+
export declare const parseRawOtlp: (rawOtlp?: string | null) => InsightsParsedOtlpTrace;
|
package/lib/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{bu as adaptInstrumentationRuleFromWire,bs as adaptInstrumentationRuleInputForWire,cr as buildBadgeForDesiredStatus,hM as buildCatalogFieldsDataCard,ch as buildCatalogFieldsSegments,hN as capitalizeFirstLetter,hO as cleanObjectEmptyStringsValues,a9 as compareCondition,hP as decimalsOnly,b3 as deepClone,gz as entityIdKey,gE as filterActions,gD as filterDestinations,cl as filterDestinationsByStream,gC as filterSources,gp as filterSourcesByStream,hQ as flattenObjectKeys,cG as formatBytes,g8 as formatDuration,b9 as generateId,gw as getActionConditions,cj as getActionIcon,gx as getConditionsBooleans,cZ as getContainersIcons,hR as getContainersInstrumentedCount,hS as getDeepValue,c9 as getDestinationIcon,hT as getDetectedLanguageIcons,cw as getEffectiveLanguage,cO as getEffectiveRuntimeVersion,gA as getEntityIcon,bn as getEntityId,gv as getEntityIdKey,gy as getEntityLabel,hU as getHealthBadgeLabel,bj as getIdFromSseTarget,cn as getInstrumentationRuleIcon,hV as getMainContainerLanguage,hW as getMetricForEntity,hX as getMonitorIcon,hY as getNearestTypographySize,cY as getPlatformIcon,fY as getPlatformLabel,$ as getProgrammingLanguageIcon,hZ as getRecursiveValues,cF as getSourceKindLabel,cC as getSourceLanguageIcons,bc as getSseTargetFromId,cM as getStatusColor,gG as getStatusFromPodStatus,cN as getStatusIcon,cH as getStatusTypeFromOdigosHealth,h_ as getValueForRange,cB as getVirtualServiceIcon,cA as getWorkloadId,cm as getYamlFieldsForDestination,h$ as hasUnhealthyInstances,i0 as instrumentationRuleSourceScopesFromWire,i1 as instrumentationRuleSourceScopesToWire,bz as isEmpty,bA as isLegalK8sLabel,eJ as isOverTime,i2 as isStringABoolean,i3 as isTimeElapsed,cL as isValidVersion,i4 as mapConditions,ct as mapDesiredStatusToConditionStatus,cf as mapDesiredStatusesToConditions,ck as mapDestinationFieldsForDisplay,bE as mapExportedSignals,bC as mapSupportedSignals,i5 as numbersOnly,i6 as parseBooleanFromString,i7 as parseJsonStringToPrettyString,ga as parseRawOtlp,bT as prepareDestinationFormData,i8 as removeEmptyValuesFromObject,E as safeJsonParse,i9 as safeJsonStringify,ia as setDeepValue,ib as sleep,an as splitCamelString,ic as stringifyNonStringValues,t as trimVersion}from"./chunks/ui-components-CjgsN17j.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './useOverflow';
|
|
|
12
12
|
export * from './useScrollIntoViewWhen';
|
|
13
13
|
export * from './useScrollTo';
|
|
14
14
|
export * from './usePopup';
|
|
15
|
+
export * from './useAnchoredPopup';
|
|
15
16
|
export * from './useSessionStorage';
|
|
16
17
|
export * from './useSourceFormData';
|
|
17
18
|
export * from './useTimeAgo';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type MouseEvent, type RefObject } from 'react';
|
|
2
|
+
export declare enum PopupAlignX {
|
|
3
|
+
Left = "left",
|
|
4
|
+
Right = "right"
|
|
5
|
+
}
|
|
6
|
+
export declare enum PopupAlignY {
|
|
7
|
+
Top = "top",
|
|
8
|
+
Bottom = "bottom"
|
|
9
|
+
}
|
|
10
|
+
export interface PortalCoords {
|
|
11
|
+
top?: number;
|
|
12
|
+
bottom?: number;
|
|
13
|
+
left?: number;
|
|
14
|
+
right?: number;
|
|
15
|
+
width?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface UseAnchoredPopupProps {
|
|
18
|
+
defaultOpen?: boolean;
|
|
19
|
+
open?: boolean;
|
|
20
|
+
onOpenChange?: (open: boolean) => void;
|
|
21
|
+
alignX?: PopupAlignX;
|
|
22
|
+
alignY?: PopupAlignY;
|
|
23
|
+
/** When true, the panel is offset from the trigger edge (button / custom trigger). */
|
|
24
|
+
withOffset?: boolean;
|
|
25
|
+
fullWidth?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface UseAnchoredPopupReturn {
|
|
28
|
+
isOpen: boolean;
|
|
29
|
+
setIsOpen: (open: boolean) => void;
|
|
30
|
+
align: {
|
|
31
|
+
x: PopupAlignX;
|
|
32
|
+
y: PopupAlignY;
|
|
33
|
+
};
|
|
34
|
+
coords: PortalCoords;
|
|
35
|
+
triggerRef: RefObject<HTMLDivElement | null>;
|
|
36
|
+
/**
|
|
37
|
+
* Wire to `onMouseDown` (not `onClick`) so the opening gesture cannot also
|
|
38
|
+
* reach ancestor outside-click listeners and dismiss the menu.
|
|
39
|
+
*/
|
|
40
|
+
toggleOpen: (e: MouseEvent<HTMLElement>) => void;
|
|
41
|
+
/** Put on the trigger wrapper so mousedown cannot bubble to ancestors. */
|
|
42
|
+
onTriggerWrapperMouseDown: (e: MouseEvent<HTMLElement>) => void;
|
|
43
|
+
}
|
|
44
|
+
export declare const useAnchoredPopup: ({ defaultOpen, open: controlledOpen, onOpenChange, alignX: forcedAlignX, alignY: forcedAlignY, withOffset, fullWidth, }?: UseAnchoredPopupProps) => UseAnchoredPopupReturn;
|