@omniviewdev/runtime 0.27.2 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity/ActivityCard.d.ts +8 -0
- package/dist/activity/ActivityProvider.d.ts +6 -0
- package/dist/activity/ActivitySurfaces.d.ts +8 -0
- package/dist/activity/NotificationCenter.d.ts +2 -0
- package/dist/activity/client.d.ts +25 -0
- package/dist/activity/context.d.ts +51 -0
- package/dist/activity/index.d.ts +8 -0
- package/dist/activity/store.d.ts +32 -0
- package/dist/{hooks/snackbar/NotificationCenter.styles.d.ts → activity/styles.d.ts} +60 -34
- package/dist/activity/types.d.ts +163 -0
- package/dist/api.cjs +1 -1
- package/dist/api.js +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/activity/frontendservice.d.ts +27 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/activity/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/activity/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/activity/models.d.ts +114 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/index.d.ts +2 -2
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/models.d.ts +91 -1
- package/dist/context/index.d.ts +0 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/parseAppError.d.ts +8 -33
- package/dist/hooks/connection/useConnections.d.ts +3 -3
- package/dist/hooks/exec/useNativeExec.d.ts +1 -1
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/networker/useResourcePortForwarder.d.ts +3 -3
- package/dist/hooks/resource/index.d.ts +0 -1
- package/dist/index.cjs +5 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3300 -2836
- package/dist/resource/v2/ancillary.d.ts +2 -0
- package/dist/resource/v2/client.d.ts +2 -0
- package/dist/{service-CDYj21m9.js → service-BohjVV8G.js} +5 -7
- package/dist/service-Dm78ll2_.cjs +1 -0
- package/package.json +3 -3
- package/dist/context/operations/OperationsContext.d.ts +0 -27
- package/dist/hooks/operations/useOperations.d.ts +0 -1
- package/dist/hooks/resource/useStreamAction.d.ts +0 -14
- package/dist/hooks/snackbar/index.d.ts +0 -1
- package/dist/hooks/snackbar/useSnackbar.d.ts +0 -26
- package/dist/service-DO0Rrm3E.cjs +0 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as resourcev2$0 from "../resource/v2/models.js";
|
|
2
|
+
export declare class Alert {
|
|
3
|
+
"key": string;
|
|
4
|
+
"state": string;
|
|
5
|
+
"occurrences": number;
|
|
6
|
+
"acknowledgedAt"?: string;
|
|
7
|
+
"snoozedUntil"?: string;
|
|
8
|
+
/** Creates a new Alert instance. */
|
|
9
|
+
constructor($$source?: Partial<Alert>);
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new Alert instance from a string or object.
|
|
12
|
+
*/
|
|
13
|
+
static createFrom($$source?: any): Alert;
|
|
14
|
+
}
|
|
15
|
+
export declare const Presentation: typeof resourcev2$0.ActivityPresentation;
|
|
16
|
+
export type Presentation = resourcev2$0.ActivityPresentation;
|
|
17
|
+
export declare class Record {
|
|
18
|
+
"id": string;
|
|
19
|
+
"revision": number;
|
|
20
|
+
"source": Source;
|
|
21
|
+
"kind": string;
|
|
22
|
+
"severity": string;
|
|
23
|
+
"createdAt": string;
|
|
24
|
+
"updatedAt": string;
|
|
25
|
+
"observedAt"?: string;
|
|
26
|
+
"parentId"?: string;
|
|
27
|
+
"presentation": Presentation;
|
|
28
|
+
"task"?: Task | null;
|
|
29
|
+
"alert"?: Alert | null;
|
|
30
|
+
"visibility": Visibility;
|
|
31
|
+
/** Creates a new Record instance. */
|
|
32
|
+
constructor($$source?: Partial<Record>);
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new Record instance from a string or object.
|
|
35
|
+
*/
|
|
36
|
+
static createFrom($$source?: any): Record;
|
|
37
|
+
}
|
|
38
|
+
export declare class ResolveAlertRequest {
|
|
39
|
+
"key": string;
|
|
40
|
+
"observedAt": string;
|
|
41
|
+
/** Creates a new ResolveAlertRequest instance. */
|
|
42
|
+
constructor($$source?: Partial<ResolveAlertRequest>);
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new ResolveAlertRequest instance from a string or object.
|
|
45
|
+
*/
|
|
46
|
+
static createFrom($$source?: any): ResolveAlertRequest;
|
|
47
|
+
}
|
|
48
|
+
export declare class SetPresentationRequest {
|
|
49
|
+
"id": string;
|
|
50
|
+
"collapsed"?: boolean | null;
|
|
51
|
+
"toastDismissed"?: boolean | null;
|
|
52
|
+
"read"?: boolean | null;
|
|
53
|
+
"snoozedUntil"?: string | null;
|
|
54
|
+
"acknowledged"?: boolean | null;
|
|
55
|
+
/** Creates a new SetPresentationRequest instance. */
|
|
56
|
+
constructor($$source?: Partial<SetPresentationRequest>);
|
|
57
|
+
/**
|
|
58
|
+
* Creates a new SetPresentationRequest instance from a string or object.
|
|
59
|
+
*/
|
|
60
|
+
static createFrom($$source?: any): SetPresentationRequest;
|
|
61
|
+
}
|
|
62
|
+
export declare class Snapshot {
|
|
63
|
+
"revision": number;
|
|
64
|
+
"records": Record[];
|
|
65
|
+
/** Creates a new Snapshot instance. */
|
|
66
|
+
constructor($$source?: Partial<Snapshot>);
|
|
67
|
+
/**
|
|
68
|
+
* Creates a new Snapshot instance from a string or object.
|
|
69
|
+
*/
|
|
70
|
+
static createFrom($$source?: any): Snapshot;
|
|
71
|
+
}
|
|
72
|
+
export declare class Source {
|
|
73
|
+
"pluginID"?: string;
|
|
74
|
+
"connectionID"?: string;
|
|
75
|
+
"resource"?: resourcev2$0.ResourceNavigationIntent | null;
|
|
76
|
+
/** Creates a new Source instance. */
|
|
77
|
+
constructor($$source?: Partial<Source>);
|
|
78
|
+
/**
|
|
79
|
+
* Creates a new Source instance from a string or object.
|
|
80
|
+
*/
|
|
81
|
+
static createFrom($$source?: any): Source;
|
|
82
|
+
}
|
|
83
|
+
export declare class Subscription {
|
|
84
|
+
"id": string;
|
|
85
|
+
"snapshot": Snapshot;
|
|
86
|
+
/** Creates a new Subscription instance. */
|
|
87
|
+
constructor($$source?: Partial<Subscription>);
|
|
88
|
+
/**
|
|
89
|
+
* Creates a new Subscription instance from a string or object.
|
|
90
|
+
*/
|
|
91
|
+
static createFrom($$source?: any): Subscription;
|
|
92
|
+
}
|
|
93
|
+
export declare class Task {
|
|
94
|
+
"state": string;
|
|
95
|
+
"cancellation": string;
|
|
96
|
+
"unknownReason"?: string;
|
|
97
|
+
/** Creates a new Task instance. */
|
|
98
|
+
constructor($$source?: Partial<Task>);
|
|
99
|
+
/**
|
|
100
|
+
* Creates a new Task instance from a string or object.
|
|
101
|
+
*/
|
|
102
|
+
static createFrom($$source?: any): Task;
|
|
103
|
+
}
|
|
104
|
+
export declare class Visibility {
|
|
105
|
+
"collapsed": boolean;
|
|
106
|
+
"toastDismissed": boolean;
|
|
107
|
+
"read": boolean;
|
|
108
|
+
/** Creates a new Visibility instance. */
|
|
109
|
+
constructor($$source?: Partial<Visibility>);
|
|
110
|
+
/**
|
|
111
|
+
* Creates a new Visibility instance from a string or object.
|
|
112
|
+
*/
|
|
113
|
+
static createFrom($$source?: any): Visibility;
|
|
114
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AccessRoute, ActionDescriptor, ActionScope, CatalogRequest, ColumnDefinition, ConnectionMetadataError, ConnectionMetadataSnapshot, Count, EdgeDirection, EnumerateRequest, EventSeverity, Feature, FeatureSet, GetRequest, HealthCondition, HealthStatus, Operation, ReadTarget, Record, RelationshipDescriptor, RelationshipExtractor, RelationshipTarget, RelationshipType, Representation, ResolvedRelationship, ResourceDefinition, ResourceEvent, ResourceGroup, ResourceHealth, ResourceLink, ResourceOperationError, ResourceReference, SchemaDocument, SchemaDocumentReference, ScopeEntry, ScopeExtractor, SourceCoverage } from './models.js';
|
|
2
|
-
export type { Catalog, ConnectionMetadataEntry, Coverage, QueryScope, ResourceAddress, Schema, SchemaBinding, Value } from './models.js';
|
|
1
|
+
export { AccessRoute, ActionDescriptor, ActionScope, ActivityAction, ActivityMetric, ActivityPresentation, ActivityProgress, CatalogRequest, ColumnDefinition, ConnectionMetadataError, ConnectionMetadataSnapshot, Count, EdgeDirection, EnumerateRequest, EventSeverity, Feature, FeatureSet, GetRequest, HealthCondition, HealthStatus, Operation, ReadTarget, Record, RelationshipDescriptor, RelationshipExtractor, RelationshipTarget, RelationshipType, Representation, ResolvedRelationship, ResourceActionIntent, ResourceDefinition, ResourceEvent, ResourceGroup, ResourceHealth, ResourceLink, ResourceNavigationIntent, ResourceOperationError, ResourceReference, SchemaDocument, SchemaDocumentReference, ScopeEntry, ScopeExtractor, SourceCoverage } from './models.js';
|
|
2
|
+
export type { ActionRequest, Catalog, ConnectionMetadataEntry, Coverage, QueryScope, ResourceAddress, Schema, SchemaBinding, Value } from './models.js';
|
|
@@ -40,6 +40,11 @@ export declare class ActionDescriptor {
|
|
|
40
40
|
*/
|
|
41
41
|
static createFrom($$source?: any): ActionDescriptor;
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* ActionRequest invokes an independently declared named operation on exactly one target.
|
|
45
|
+
* Input preserves canonical Value scalar kinds and remains borrowed for the call.
|
|
46
|
+
*/
|
|
47
|
+
export type ActionRequest = any;
|
|
43
48
|
/**
|
|
44
49
|
* ActionScope distinguishes object actions from type-level actions. It is
|
|
45
50
|
* descriptive metadata, not authority to widen a request's admitted reference.
|
|
@@ -58,6 +63,64 @@ export declare enum ActionScope {
|
|
|
58
63
|
*/
|
|
59
64
|
ActionScopeType = "type"
|
|
60
65
|
}
|
|
66
|
+
export declare class ActivityAction {
|
|
67
|
+
"id": string;
|
|
68
|
+
"kind": string;
|
|
69
|
+
"label": string;
|
|
70
|
+
"target"?: ResourceNavigationIntent | null;
|
|
71
|
+
"intent"?: ResourceActionIntent | null;
|
|
72
|
+
"taskId"?: string;
|
|
73
|
+
/** Creates a new ActivityAction instance. */
|
|
74
|
+
constructor($$source?: Partial<ActivityAction>);
|
|
75
|
+
/**
|
|
76
|
+
* Creates a new ActivityAction instance from a string or object.
|
|
77
|
+
*/
|
|
78
|
+
static createFrom($$source?: any): ActivityAction;
|
|
79
|
+
}
|
|
80
|
+
export declare class ActivityMetric {
|
|
81
|
+
"id": string;
|
|
82
|
+
"label": string;
|
|
83
|
+
"value": string;
|
|
84
|
+
"unit"?: string;
|
|
85
|
+
"tone"?: string;
|
|
86
|
+
/** Creates a new ActivityMetric instance. */
|
|
87
|
+
constructor($$source?: Partial<ActivityMetric>);
|
|
88
|
+
/**
|
|
89
|
+
* Creates a new ActivityMetric instance from a string or object.
|
|
90
|
+
*/
|
|
91
|
+
static createFrom($$source?: any): ActivityMetric;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* ActivityPresentation is safe, data-only presentation independent of business output.
|
|
95
|
+
*/
|
|
96
|
+
export declare class ActivityPresentation {
|
|
97
|
+
"title": string;
|
|
98
|
+
"message"?: string;
|
|
99
|
+
"details"?: string;
|
|
100
|
+
"progress"?: ActivityProgress | null;
|
|
101
|
+
"metrics"?: ActivityMetric[];
|
|
102
|
+
"actions"?: ActivityAction[];
|
|
103
|
+
/** Creates a new ActivityPresentation instance. */
|
|
104
|
+
constructor($$source?: Partial<ActivityPresentation>);
|
|
105
|
+
/**
|
|
106
|
+
* Creates a new ActivityPresentation instance from a string or object.
|
|
107
|
+
*/
|
|
108
|
+
static createFrom($$source?: any): ActivityPresentation;
|
|
109
|
+
}
|
|
110
|
+
export declare class ActivityProgress {
|
|
111
|
+
"kind": string;
|
|
112
|
+
"message"?: string;
|
|
113
|
+
"current"?: string;
|
|
114
|
+
"total"?: string;
|
|
115
|
+
"unit"?: string;
|
|
116
|
+
"label"?: string;
|
|
117
|
+
/** Creates a new ActivityProgress instance. */
|
|
118
|
+
constructor($$source?: Partial<ActivityProgress>);
|
|
119
|
+
/**
|
|
120
|
+
* Creates a new ActivityProgress instance from a string or object.
|
|
121
|
+
*/
|
|
122
|
+
static createFrom($$source?: any): ActivityProgress;
|
|
123
|
+
}
|
|
61
124
|
/**
|
|
62
125
|
* Catalog describes support observed through the requested route. Revision is
|
|
63
126
|
* an opaque observation used for admission, not an authorization credential.
|
|
@@ -296,7 +359,11 @@ export declare enum Feature {
|
|
|
296
359
|
/**
|
|
297
360
|
* FeatureSourceSessions enables phased source snapshot/update sessions.
|
|
298
361
|
*/
|
|
299
|
-
FeatureSourceSessions = "sourceSessions"
|
|
362
|
+
FeatureSourceSessions = "sourceSessions",
|
|
363
|
+
/**
|
|
364
|
+
* featureLegacyBestEffortUpdates is accepted for old providers but grants no transport.
|
|
365
|
+
*/
|
|
366
|
+
featureLegacyBestEffortUpdates = "bestEffortUpdates"
|
|
300
367
|
}
|
|
301
368
|
/**
|
|
302
369
|
* FeatureSet lists ancillary traits available on this provider or transport.
|
|
@@ -598,6 +665,16 @@ export declare class ResolvedRelationship {
|
|
|
598
665
|
*/
|
|
599
666
|
static createFrom($$source?: any): ResolvedRelationship;
|
|
600
667
|
}
|
|
668
|
+
export declare class ResourceActionIntent {
|
|
669
|
+
"pluginID": string;
|
|
670
|
+
"request": ActionRequest;
|
|
671
|
+
/** Creates a new ResourceActionIntent instance. */
|
|
672
|
+
constructor($$source?: Partial<ResourceActionIntent>);
|
|
673
|
+
/**
|
|
674
|
+
* Creates a new ResourceActionIntent instance from a string or object.
|
|
675
|
+
*/
|
|
676
|
+
static createFrom($$source?: any): ResourceActionIntent;
|
|
677
|
+
}
|
|
601
678
|
/**
|
|
602
679
|
* ResourceAddress identifies an object independently of the connection used to
|
|
603
680
|
* access it. Type and ID are opaque; callers must not parse native syntax from
|
|
@@ -696,6 +773,19 @@ export declare class ResourceLink {
|
|
|
696
773
|
*/
|
|
697
774
|
static createFrom($$source?: any): ResourceLink;
|
|
698
775
|
}
|
|
776
|
+
export declare class ResourceNavigationIntent {
|
|
777
|
+
"pluginID": string;
|
|
778
|
+
"targetId": string;
|
|
779
|
+
"route": AccessRoute;
|
|
780
|
+
"reference": ResourceReference;
|
|
781
|
+
"representation": string;
|
|
782
|
+
/** Creates a new ResourceNavigationIntent instance. */
|
|
783
|
+
constructor($$source?: Partial<ResourceNavigationIntent>);
|
|
784
|
+
/**
|
|
785
|
+
* Creates a new ResourceNavigationIntent instance from a string or object.
|
|
786
|
+
*/
|
|
787
|
+
static createFrom($$source?: any): ResourceNavigationIntent;
|
|
788
|
+
}
|
|
699
789
|
/**
|
|
700
790
|
* ResourceOperationError preserves provider classification across the resource
|
|
701
791
|
* transport. Title, Message, and Suggestions must contain public-safe text:
|
package/dist/context/index.d.ts
CHANGED
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { parseAppError, isCancelledError,
|
|
1
|
+
export { parseAppError, isCancelledError, actionToNotification, createErrorHandler, showAppError, } from './parseAppError';
|
|
2
2
|
export { ErrorTypes } from './types';
|
|
3
3
|
export type { AppError, AppErrorAction } from './types';
|
|
@@ -1,38 +1,13 @@
|
|
|
1
1
|
import { AppError, AppErrorAction } from './types';
|
|
2
|
+
import { DiagnosticAction, NotificationOptions } from '../activity/types';
|
|
2
3
|
/** Decode actual Wails/SDK errors without exposing arbitrary raw diagnostics. */
|
|
3
4
|
export declare function parseAppError(error: unknown): AppError;
|
|
4
5
|
export declare function isCancelledError(error: unknown): boolean;
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type ShowSnackbarFn = (options: {
|
|
13
|
-
message: string;
|
|
14
|
-
status: 'error' | 'warning' | 'info' | 'success' | 'default';
|
|
15
|
-
details?: string;
|
|
16
|
-
actions?: Array<{
|
|
17
|
-
label: string;
|
|
18
|
-
onClick: () => void;
|
|
19
|
-
}>;
|
|
20
|
-
}) => void;
|
|
21
|
-
/**
|
|
22
|
-
* Show a structured error snackbar from any Wails error.
|
|
23
|
-
* Parses the error, suppresses cancellations, and displays
|
|
24
|
-
* the full title/detail/suggestions/actions in the snackbar.
|
|
25
|
-
*
|
|
26
|
-
* @param showSnackbar - The snackbar function
|
|
27
|
-
* @param error - The raw error from Wails
|
|
28
|
-
* @param contextMessage - Optional context (e.g. "Failed to delete pod-1")
|
|
29
|
-
*/
|
|
30
|
-
export declare function showAppError(showSnackbar: ShowSnackbarFn, error: unknown, contextMessage?: string): void;
|
|
31
|
-
/**
|
|
32
|
-
* Creates a drop-in onError handler that:
|
|
33
|
-
* - Suppresses cancelled errors
|
|
34
|
-
* - Parses structured AppError fields
|
|
35
|
-
* - Shows a snackbar with title, detail, suggestions, and actions
|
|
36
|
-
*/
|
|
37
|
-
export declare function createErrorHandler(showSnackbar: ShowSnackbarFn, fallbackTitle: string): (error: unknown) => void;
|
|
6
|
+
/** Convert supported diagnostic intents to trusted, same-session callbacks. */
|
|
7
|
+
export declare function actionToNotification(action: AppErrorAction): DiagnosticAction | undefined;
|
|
8
|
+
type NotifyFn = (options: NotificationOptions) => unknown;
|
|
9
|
+
/** Show a safe diagnostic notification, suppressing cancellation outcomes. */
|
|
10
|
+
export declare function showAppError(notify: NotifyFn, error: unknown, contextMessage?: string): void;
|
|
11
|
+
/** Create an error callback using the object notification API. */
|
|
12
|
+
export declare function createErrorHandler(notify: NotifyFn, fallbackTitle: string): (error: unknown) => void;
|
|
38
13
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Connection } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
|
|
2
2
|
type UseConnectionsOptions = {
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
* The name of the plugin we're interacting with
|
|
5
|
+
*/
|
|
6
6
|
plugin?: string;
|
|
7
7
|
};
|
|
8
8
|
/** Stable query key factory for connection list queries. */
|
|
9
9
|
export declare const connectionListQueryKey: (plugin: string) => string[];
|
|
10
10
|
/**
|
|
11
|
-
* Get and retreive connections from a plugin's connection manager..
|
|
11
|
+
* Get and retreive connections from a plugin's connection manager..
|
|
12
12
|
*/
|
|
13
13
|
export declare const useConnections: ({ plugin: explicitPlugin }: UseConnectionsOptions) => {
|
|
14
14
|
connections: import('@tanstack/react-query').UseQueryResult<Connection[], Error>;
|
|
@@ -9,7 +9,7 @@ export type UseNativeExecResult = {
|
|
|
9
9
|
isPending: boolean;
|
|
10
10
|
};
|
|
11
11
|
/** Launch a fresh native terminal process; never allocate an integrated tab/session. */
|
|
12
|
-
export declare function useNativeExec({ pluginID: explicitPluginID, resourceKey }: {
|
|
12
|
+
export declare function useNativeExec({ pluginID: explicitPluginID, resourceKey, }: {
|
|
13
13
|
pluginID?: string;
|
|
14
14
|
resourceKey: string;
|
|
15
15
|
}): UseNativeExecResult;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PortForwardResourceOpts } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* Programatically forward a port from a resource object to the host.
|
|
4
|
-
*/
|
|
5
|
-
export declare function useResourcePortForwarder({ pluginID: explicitPluginID, connectionID, resourceID }: {
|
|
3
|
+
* Programatically forward a port from a resource object to the host.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useResourcePortForwarder({ pluginID: explicitPluginID, connectionID, resourceID, }: {
|
|
6
6
|
pluginID?: string;
|
|
7
7
|
connectionID: string;
|
|
8
8
|
resourceID: string;
|
|
@@ -11,7 +11,6 @@ export * from './useEditorSchemas';
|
|
|
11
11
|
export * from './useSchemaFields';
|
|
12
12
|
export * from './useSourceStates';
|
|
13
13
|
export * from './useActiveSyncs';
|
|
14
|
-
export * from './useStreamAction';
|
|
15
14
|
export * from './useRelatedResources';
|
|
16
15
|
export * from './useDependencyTree';
|
|
17
16
|
export * from './useRefetchOnGraphChange';
|