@omniviewdev/runtime 0.12.0 → 0.14.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/api.cjs +1 -1
- package/dist/api.d.ts +2 -2
- package/dist/api.js +199 -175
- package/dist/bindings/events/index.d.ts +4 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/index.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.d.ts +20 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/settings/binding.d.ts +8 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/settings/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/settings/models.d.ts +33 -0
- package/dist/bindings/github.com/omniviewdev/omniview/{backend/pkg/plugin/settings → internal/profiling}/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/profiling/models.d.ts +12 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/profiling/servicewrapper.d.ts +3 -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 +47 -1
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/models.d.ts +8 -0
- package/dist/connection/metadata.d.ts +42 -0
- package/dist/context/plugins/usePluginContext.d.ts +0 -1
- package/dist/context/settings/SettingsContext.d.ts +0 -1
- package/dist/hooks/connection/index.d.ts +2 -0
- package/dist/hooks/connection/useConnectionMetadata.d.ts +16 -0
- package/dist/hooks/settings/index.d.ts +1 -0
- package/dist/hooks/settings/useScopedSettings.d.ts +30 -0
- package/dist/index.cjs +4 -4
- package/dist/index.js +2766 -2480
- package/dist/{models-Cg1YRHQm.js → models-BJgLAHwq.js} +1 -1
- package/dist/{models-UwESEW2B.js → models-BTzXdmUY.js} +183 -175
- package/dist/{models-dzj-SsFZ.cjs → models-BhsFYb70.cjs} +1 -1
- package/dist/models-NYvUa5Yc.cjs +1 -0
- package/dist/models.cjs +1 -1
- package/dist/models.js +8 -8
- package/dist/resource/v2/client.d.ts +3 -0
- package/dist/servicewrapper-B-DdHGSp.cjs +1 -0
- package/dist/servicewrapper-Bl98xvmZ.js +639 -0
- package/package.json +3 -3
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/settings/servicewrapper.d.ts +0 -19
- package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/index.d.ts +0 -2
- package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/servicewrapper.d.ts +0 -52
- package/dist/models-DSGyy8lg.cjs +0 -1
- package/dist/servicewrapper-BOM6A8IG.cjs +0 -1
- package/dist/servicewrapper-Bda7yi8z.js +0 -684
|
@@ -16,6 +16,7 @@ export declare function GetAllConnectionStates(): $CancellablePromise<{
|
|
|
16
16
|
[_ in string]?: $models.ConnectionState[];
|
|
17
17
|
}>;
|
|
18
18
|
export declare function GetConnection(pluginID: string, connectionID: string): $CancellablePromise<types$0.Connection>;
|
|
19
|
+
export declare function GetConnectionMetadata(pluginID: string, connectionID: string): $CancellablePromise<$models.HostConnectionMetadata>;
|
|
19
20
|
export declare function GetEditorSchemas(pluginID: string, route: resourcev2$0.AccessRoute): $CancellablePromise<resourcev2$0.EditorSchema[]>;
|
|
20
21
|
export declare function GetHealth(pluginID: string, encoded: string): $CancellablePromise<resourcev2$0.ResourceHealth | null>;
|
|
21
22
|
export declare function GetRelationships(pluginID: string, route: resourcev2$0.AccessRoute, resourceType: string): $CancellablePromise<resourcev2$0.RelationshipDescriptor[]>;
|
|
@@ -36,6 +37,7 @@ export declare function ListPlugins(): $CancellablePromise<string[]>;
|
|
|
36
37
|
export declare function LoadConnections(pluginID: string): $CancellablePromise<types$0.Connection[]>;
|
|
37
38
|
export declare function Mutate(pluginID: string, encoded: string): $CancellablePromise<resourcev2$0.Record>;
|
|
38
39
|
export declare function NativeQuery(pluginID: string, encoded: string): $CancellablePromise<$models.HostSourcePage>;
|
|
40
|
+
export declare function RefreshConnectionMetadata(pluginID: string, connectionID: string): $CancellablePromise<$models.HostConnectionMetadata>;
|
|
39
41
|
export declare function RemoveConnection(pluginID: string, connectionID: string): $CancellablePromise<void>;
|
|
40
42
|
export declare function ResetConnectionProfile(pluginID: string, connectionID: string): $CancellablePromise<$models.ConnectionProfileResult>;
|
|
41
43
|
export declare function ResolveReference(pluginID: string, request: $models.ResolveReferenceRequest): $CancellablePromise<$models.ResolvedReference>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CancellablePromise as $CancellablePromise } from '@wailsio/runtime';
|
|
2
|
+
import * as settings$0 from "../../../../plugin-sdk/settings/models.js";
|
|
3
|
+
import * as $models from "./models.js";
|
|
4
|
+
export declare function Commit(scope: $models.Scope, values: {
|
|
5
|
+
[_ in string]?: any;
|
|
6
|
+
}): $CancellablePromise<$models.CommitResult>;
|
|
7
|
+
export declare function GetSnapshot(scope: $models.Scope): $CancellablePromise<$models.Snapshot>;
|
|
8
|
+
export declare function Validate(scope: $models.Scope, id: string, value: any): $CancellablePromise<settings$0.ValidationResult>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as settings$0 from "../../../../plugin-sdk/settings/models.js";
|
|
2
|
+
export declare class CommitResult {
|
|
3
|
+
"snapshot": Snapshot;
|
|
4
|
+
"applied": boolean;
|
|
5
|
+
"uncertain": boolean;
|
|
6
|
+
"message": string;
|
|
7
|
+
/** Creates a new CommitResult instance. */
|
|
8
|
+
constructor($$source?: Partial<CommitResult>);
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new CommitResult instance from a string or object.
|
|
11
|
+
*/
|
|
12
|
+
static createFrom($$source?: any): CommitResult;
|
|
13
|
+
}
|
|
14
|
+
export declare class Scope {
|
|
15
|
+
"kind": string;
|
|
16
|
+
"pluginId"?: string;
|
|
17
|
+
/** Creates a new Scope instance. */
|
|
18
|
+
constructor($$source?: Partial<Scope>);
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new Scope instance from a string or object.
|
|
21
|
+
*/
|
|
22
|
+
static createFrom($$source?: any): Scope;
|
|
23
|
+
}
|
|
24
|
+
export declare class Snapshot {
|
|
25
|
+
"scope": Scope;
|
|
26
|
+
"categories": settings$0.Store;
|
|
27
|
+
/** Creates a new Snapshot instance. */
|
|
28
|
+
constructor($$source?: Partial<Snapshot>);
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new Snapshot instance from a string or object.
|
|
31
|
+
*/
|
|
32
|
+
static createFrom($$source?: any): Snapshot;
|
|
33
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class Status {
|
|
2
|
+
"running": boolean;
|
|
3
|
+
"url": string;
|
|
4
|
+
"source": string;
|
|
5
|
+
"error": string;
|
|
6
|
+
/** Creates a new Status instance. */
|
|
7
|
+
constructor($$source?: Partial<Status>);
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new Status instance from a string or object.
|
|
10
|
+
*/
|
|
11
|
+
static createFrom($$source?: any): Status;
|
|
12
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AccessRoute, ActionDescriptor, ActionScope, CatalogRequest, ColumnDefinition, Count, EdgeDirection, EditorSchema, EnumerateRequest, EventSeverity, Feature, FeatureSet, GetRequest, HealthCondition, HealthStatus, ReadTarget, Record, RelationshipDescriptor, RelationshipExtractor, RelationshipTarget, RelationshipType, Representation, ResolvedRelationship, ResourceDefinition, ResourceEvent, ResourceGroup, ResourceHealth, ResourceLink, ResourceOperationError, ResourceReference, SchemaDocument, SchemaDocumentReference, ScopeEntry, ScopeExtractor, WatchConnectionSummary, WatchState } from './models.js';
|
|
2
|
-
export type { Catalog, Coverage, QueryScope, ResourceAddress, Schema, SchemaBinding, Value } from './models.js';
|
|
1
|
+
export { AccessRoute, ActionDescriptor, ActionScope, CatalogRequest, ColumnDefinition, ConnectionMetadataError, ConnectionMetadataSnapshot, Count, EdgeDirection, EditorSchema, EnumerateRequest, EventSeverity, Feature, FeatureSet, GetRequest, HealthCondition, HealthStatus, ReadTarget, Record, RelationshipDescriptor, RelationshipExtractor, RelationshipTarget, RelationshipType, Representation, ResolvedRelationship, ResourceDefinition, ResourceEvent, ResourceGroup, ResourceHealth, ResourceLink, ResourceOperationError, ResourceReference, SchemaDocument, SchemaDocumentReference, ScopeEntry, ScopeExtractor, WatchConnectionSummary, WatchState } from './models.js';
|
|
2
|
+
export type { Catalog, ConnectionMetadataEntry, Coverage, QueryScope, ResourceAddress, Schema, SchemaBinding, Value } from './models.js';
|
|
@@ -108,6 +108,48 @@ export declare class ColumnDefinition {
|
|
|
108
108
|
*/
|
|
109
109
|
static createFrom($$source?: any): ColumnDefinition;
|
|
110
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* ConnectionMetadataEntry is current, stale, or unavailable. Current and stale
|
|
113
|
+
* entries always serialize value, including null, false, zero, and empty strings.
|
|
114
|
+
* Unavailable entries omit value and observedAt and require a public-safe error.
|
|
115
|
+
*/
|
|
116
|
+
export type ConnectionMetadataEntry = any;
|
|
117
|
+
/**
|
|
118
|
+
* ConnectionMetadataError contains only bounded, public-safe classification and text.
|
|
119
|
+
* Providers must sanitize these fields before returning observations.
|
|
120
|
+
*/
|
|
121
|
+
export declare class ConnectionMetadataError {
|
|
122
|
+
"code": string;
|
|
123
|
+
"message": string;
|
|
124
|
+
/** Creates a new ConnectionMetadataError instance. */
|
|
125
|
+
constructor($$source?: Partial<ConnectionMetadataError>);
|
|
126
|
+
/**
|
|
127
|
+
* Creates a new ConnectionMetadataError instance from a string or object.
|
|
128
|
+
*/
|
|
129
|
+
static createFrom($$source?: any): ConnectionMetadataError;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* ConnectionMetadataSnapshot is the authoritative state for one connection.
|
|
133
|
+
* An inactive inventory entry may have an empty generation. Revisions are positive
|
|
134
|
+
* canonical unsigned decimal strings and continue across generation changes.
|
|
135
|
+
*/
|
|
136
|
+
export declare class ConnectionMetadataSnapshot {
|
|
137
|
+
"connectionID": string;
|
|
138
|
+
"generation": string;
|
|
139
|
+
"revision": string;
|
|
140
|
+
"active": boolean;
|
|
141
|
+
"refreshing": boolean;
|
|
142
|
+
"lastRefreshError"?: ConnectionMetadataError | null;
|
|
143
|
+
"entries": {
|
|
144
|
+
[_ in string]?: ConnectionMetadataEntry;
|
|
145
|
+
};
|
|
146
|
+
/** Creates a new ConnectionMetadataSnapshot instance. */
|
|
147
|
+
constructor($$source?: Partial<ConnectionMetadataSnapshot>);
|
|
148
|
+
/**
|
|
149
|
+
* Creates a new ConnectionMetadataSnapshot instance from a string or object.
|
|
150
|
+
*/
|
|
151
|
+
static createFrom($$source?: any): ConnectionMetadataSnapshot;
|
|
152
|
+
}
|
|
111
153
|
/**
|
|
112
154
|
* Count distinguishes unknown cardinality from an observed zero. Unknown requires
|
|
113
155
|
* nil Value; exact and estimate require a canonical unsigned 64-bit decimal string.
|
|
@@ -265,7 +307,11 @@ export declare enum Feature {
|
|
|
265
307
|
/**
|
|
266
308
|
* FeatureBestEffortUpdates enables advisory updates without replay guarantees.
|
|
267
309
|
*/
|
|
268
|
-
FeatureBestEffortUpdates = "bestEffortUpdates"
|
|
310
|
+
FeatureBestEffortUpdates = "bestEffortUpdates",
|
|
311
|
+
/**
|
|
312
|
+
* FeatureConnectionMetadata enables public connection facts and refresh.
|
|
313
|
+
*/
|
|
314
|
+
FeatureConnectionMetadata = "connectionMetadata"
|
|
269
315
|
}
|
|
270
316
|
/**
|
|
271
317
|
* FeatureSet lists ancillary traits available on this provider or transport.
|
|
@@ -62,6 +62,14 @@ export declare class Setting {
|
|
|
62
62
|
* DevOnly indicates the setting should only be visible when dev mode is active.
|
|
63
63
|
*/
|
|
64
64
|
"devOnly": boolean;
|
|
65
|
+
/**
|
|
66
|
+
* RequiresRestart declares that changes apply after restart.
|
|
67
|
+
*/
|
|
68
|
+
"requiresRestart": boolean;
|
|
69
|
+
/**
|
|
70
|
+
* PendingRestart is host snapshot projection, not provider-owned state.
|
|
71
|
+
*/
|
|
72
|
+
"pendingRestart": boolean;
|
|
65
73
|
/** Creates a new Setting instance. */
|
|
66
74
|
constructor($$source?: Partial<Setting>);
|
|
67
75
|
/**
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type ConnectionMetadataValue = null | boolean | number | string | ConnectionMetadataValue[] | {
|
|
2
|
+
[key: string]: ConnectionMetadataValue;
|
|
3
|
+
};
|
|
4
|
+
export interface ConnectionMetadataError {
|
|
5
|
+
code: string;
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
export type ConnectionMetadataEntry = {
|
|
9
|
+
state: 'current';
|
|
10
|
+
value: ConnectionMetadataValue;
|
|
11
|
+
observedAt: string;
|
|
12
|
+
} | {
|
|
13
|
+
state: 'stale';
|
|
14
|
+
value: ConnectionMetadataValue;
|
|
15
|
+
observedAt: string;
|
|
16
|
+
error?: ConnectionMetadataError;
|
|
17
|
+
} | {
|
|
18
|
+
state: 'unavailable';
|
|
19
|
+
error: ConnectionMetadataError;
|
|
20
|
+
};
|
|
21
|
+
export interface ConnectionMetadataSnapshot {
|
|
22
|
+
connectionID: string;
|
|
23
|
+
generation: string;
|
|
24
|
+
revision: string;
|
|
25
|
+
active: boolean;
|
|
26
|
+
refreshing: boolean;
|
|
27
|
+
lastRefreshError?: ConnectionMetadataError;
|
|
28
|
+
entries: Record<string, ConnectionMetadataEntry>;
|
|
29
|
+
}
|
|
30
|
+
/** Host registration identity is opaque and never numerically ordered. */
|
|
31
|
+
export interface ConnectionMetadataEnvelope {
|
|
32
|
+
pluginID: string;
|
|
33
|
+
registrationID: string;
|
|
34
|
+
supported: boolean;
|
|
35
|
+
transportAvailable: boolean;
|
|
36
|
+
snapshot?: ConnectionMetadataSnapshot;
|
|
37
|
+
removed?: boolean;
|
|
38
|
+
connectionID?: string;
|
|
39
|
+
revision?: string;
|
|
40
|
+
}
|
|
41
|
+
/** Safe for decisions: stale, inactive, unavailable, and non-string facts are excluded. */
|
|
42
|
+
export declare function readCurrentConnectionMetadataString(snapshot: ConnectionMetadataSnapshot | undefined, transportAvailable: boolean, key: string): string | undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface SettingsContextType {
|
|
3
3
|
settings: Record<string, any>;
|
|
4
|
-
reload: () => void;
|
|
5
4
|
}
|
|
6
5
|
export declare const SettingsContext: React.Context<SettingsContextType | undefined>;
|
|
7
6
|
export declare const SettingsProvider: ({ children }: {
|
|
@@ -7,3 +7,5 @@ export * from './useConnectionReadiness';
|
|
|
7
7
|
export { requireConnectionReady, withConnectionReady } from '../../connection/connectionReadiness';
|
|
8
8
|
export { ConnectionBoundary, ConnectionBoundaryFallback } from '../../connection/ConnectionBoundary';
|
|
9
9
|
export type { ConnectionBoundaryProps, ConnectionBoundaryFallbackProps } from '../../connection/ConnectionBoundary';
|
|
10
|
+
export * from './useConnectionMetadata';
|
|
11
|
+
export * from '../../connection/metadata';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ConnectionMetadataSnapshot } from '../../connection/metadata';
|
|
2
|
+
export interface ConnectionMetadataState {
|
|
3
|
+
supported: boolean | undefined;
|
|
4
|
+
transportAvailable: boolean;
|
|
5
|
+
snapshot?: ConnectionMetadataSnapshot;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
error?: unknown;
|
|
8
|
+
}
|
|
9
|
+
/** Reading subscribes and fetches only; it never connects or acquires observations. */
|
|
10
|
+
export declare function useConnectionMetadata(explicitPluginID: string | undefined, connectionID: string | undefined): ConnectionMetadataState & {
|
|
11
|
+
refresh: () => Promise<void>;
|
|
12
|
+
};
|
|
13
|
+
/** Subscribe to a dynamic connection inventory without invoking hooks in a loop. */
|
|
14
|
+
export declare function useConnectionMetadataConnections(explicitPluginID: string | undefined, connectionIDs: readonly string[]): ReadonlyMap<string, ConnectionMetadataState>;
|
|
15
|
+
/** Select shared state with Object.is equality; unrelated entry changes do not rerender consumers. */
|
|
16
|
+
export declare function useConnectionMetadataSelector<T>(explicitPluginID: string | undefined, connectionID: string | undefined, selector: (state: ConnectionMetadataState) => T): T;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Category, Setting, ValidationResult } from '../../bindings/github.com/omniviewdev/plugin-sdk/settings/models';
|
|
2
|
+
import { CommitResult, Snapshot } from '../../bindings/github.com/omniviewdev/omniview/backend/pkg/settings/models';
|
|
3
|
+
export type SettingsScope = {
|
|
4
|
+
kind: 'host';
|
|
5
|
+
pluginId?: never;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'plugin';
|
|
8
|
+
pluginId: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const HOST_SETTINGS_SCOPE: SettingsScope;
|
|
11
|
+
export type SettingsSetting = Setting;
|
|
12
|
+
export type SettingsCategory = Category;
|
|
13
|
+
export type SettingsSnapshot = Omit<Snapshot, 'scope'> & {
|
|
14
|
+
scope: SettingsScope;
|
|
15
|
+
};
|
|
16
|
+
export type SettingsCommitResult = Omit<CommitResult, 'snapshot'> & {
|
|
17
|
+
snapshot: SettingsSnapshot;
|
|
18
|
+
};
|
|
19
|
+
export type SettingsValidationResult = ValidationResult;
|
|
20
|
+
export declare const settingsQueryKey: (scope: SettingsScope) => readonly ["settings", "plugin" | "host", string];
|
|
21
|
+
/** Host IDs are canonical category.setting IDs; plugin IDs remain opaque. */
|
|
22
|
+
export declare function scopedSettingID(scope: SettingsScope, category: string, id: string): string;
|
|
23
|
+
export declare function useScopedSettings(scope: SettingsScope): {
|
|
24
|
+
snapshot: SettingsSnapshot | undefined;
|
|
25
|
+
categories: import('../../models').Store;
|
|
26
|
+
isLoading: boolean;
|
|
27
|
+
error: Error | undefined;
|
|
28
|
+
commit: import('@tanstack/react-query').UseMutateAsyncFunction<SettingsCommitResult, Error, Record<string, unknown>, unknown>;
|
|
29
|
+
validate: (id: string, value: unknown) => Promise<SettingsValidationResult>;
|
|
30
|
+
};
|