@jointhedots/core 2.1.0 → 2.1.3
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/bundle.manifest.json +6 -2
- package/{chunk.4XVT3TGR.js → chunk.EUJGM6AI.js} +1 -1
- package/{chunk.QKAND342.js → chunk.FUGADS64.js} +1 -1
- package/chunk.JO4TTNUQ.js +1 -0
- package/components.d.ts +0 -0
- package/export.commands.js +1 -1
- package/export.js +1 -1
- package/export.react.js +1 -1
- package/export.rest.js +1 -1
- package/export.storage.js +1 -1
- package/export.view.js +1 -1
- package/package.json +1 -1
- package/types.d.ts +1387 -1378
- package/chunk.M34PULAU.js +0 -1
package/types.d.ts
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
declare module '@jointhedots/core
|
|
1
|
+
declare module '@jointhedots/core:src/common/contents' {
|
|
2
|
+
export type ContentBlob = Blob;
|
|
3
|
+
export const ContentBlob: {
|
|
4
|
+
object: {
|
|
5
|
+
read<T = any>(blob: Blob): Promise<T>;
|
|
6
|
+
write<T = any>(data: T): Promise<Blob>;
|
|
7
|
+
};
|
|
8
|
+
text: {
|
|
9
|
+
read(blob: Blob): Promise<string>;
|
|
10
|
+
write(text: string): Promise<Blob>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export function b64_blob(base64: string): Blob;
|
|
14
|
+
export function b64_format(base64: string): string;
|
|
15
|
+
export function blob_b64(blob: Blob): Promise<string>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare module '@jointhedots/core:src/common/types' {
|
|
2
19
|
export type ObjectClass<T extends Object = any> = new (...args: any[]) => T;
|
|
3
20
|
export type Overwrite<Base, Overrides> = Omit<Base, keyof Overrides> & Overrides;
|
|
4
21
|
export type Async<T> = T | Promise<T>;
|
|
@@ -7,823 +24,705 @@ declare module '@jointhedots/core/src/common/types' {
|
|
|
7
24
|
export function listOneOrMany<T>(cnt: OneOrMany<T>): Generator<T>;
|
|
8
25
|
}
|
|
9
26
|
|
|
10
|
-
declare module '@jointhedots/core
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
27
|
+
declare module '@jointhedots/core:src/components/components' {
|
|
28
|
+
import { URI } from '@jointhedots/core:src/components/vscode-uri';
|
|
29
|
+
import type { DocumentationSchema, JSONSchema, ResourceEntry } from '@jointhedots/core:src/schema/schema';
|
|
30
|
+
import type { ComponentEntry } from '@jointhedots/core:src/components/manifold';
|
|
31
|
+
import { ServiceAccessor, type ServiceType } from '@jointhedots/core:src/services/service-accessor';
|
|
32
|
+
import React from '@jointhedots/core:src/components/react';
|
|
33
|
+
export type ComponentID = string;
|
|
34
|
+
export interface ComponentPublication {
|
|
35
|
+
id: ComponentID;
|
|
36
|
+
ref?: string;
|
|
37
|
+
type?: string;
|
|
38
|
+
title: string;
|
|
39
|
+
icon?: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
services?: string[];
|
|
42
|
+
keywords?: string[];
|
|
43
|
+
tags?: string[];
|
|
44
|
+
}
|
|
45
|
+
export type ComponentServiceID = string;
|
|
46
|
+
export type ComponentManifest<Data extends any = unknown> = {
|
|
47
|
+
$id: string;
|
|
48
|
+
type?: string;
|
|
49
|
+
title?: string;
|
|
50
|
+
icon?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
keywords?: string[];
|
|
53
|
+
tags?: string[];
|
|
54
|
+
doc?: DocumentationSchema;
|
|
55
|
+
specs?: Record<ComponentServiceID, any>;
|
|
56
|
+
apis?: Record<ComponentServiceID, ResourceEntry>;
|
|
57
|
+
data?: Data;
|
|
58
|
+
};
|
|
59
|
+
/** Configuration for a distributed package */
|
|
60
|
+
export interface DistributedConfig {
|
|
61
|
+
/** Version specifier (e.g., "*", "^18.0.0") */
|
|
62
|
+
version?: string;
|
|
63
|
+
/** Interop type: 'esm' | 'cjs-default' | 'cjs-named' */
|
|
64
|
+
interop?: 'esm' | 'cjs-default' | 'cjs-named';
|
|
65
|
+
/** List of named exports to re-export (required for cjs-named interop) */
|
|
66
|
+
exports?: string[];
|
|
67
|
+
}
|
|
68
|
+
export type BundleManifest = ComponentManifest<{
|
|
69
|
+
alias?: string;
|
|
70
|
+
package?: string;
|
|
71
|
+
baseline?: string;
|
|
72
|
+
namespaces?: string[];
|
|
73
|
+
dependencies?: string[];
|
|
74
|
+
distribueds?: {
|
|
75
|
+
[packageName: string]: string | DistributedConfig;
|
|
76
|
+
};
|
|
77
|
+
exports?: {
|
|
78
|
+
[id: string]: string;
|
|
79
|
+
};
|
|
80
|
+
components?: ComponentPublication[];
|
|
20
81
|
}>;
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
82
|
+
export type ComponentSchema = {
|
|
83
|
+
readonly name: ServiceType;
|
|
84
|
+
readonly title: string;
|
|
85
|
+
readonly icon: string;
|
|
86
|
+
readonly attributes: Record<string, JSONSchema>;
|
|
87
|
+
};
|
|
88
|
+
export interface ComponentManifestIssue {
|
|
89
|
+
level: "error" | "warn" | "info";
|
|
90
|
+
message: string;
|
|
91
|
+
fix?(descriptor: ComponentManifest): Promise<ComponentManifest>;
|
|
92
|
+
}
|
|
93
|
+
export interface ComponentChecking {
|
|
94
|
+
fixed?: ComponentManifest;
|
|
95
|
+
issues?: ComponentManifestIssue[];
|
|
96
|
+
}
|
|
97
|
+
export interface ComponentController {
|
|
98
|
+
createComponent(component: ComponentEntry, descriptor: ComponentManifest): Promise<void>;
|
|
99
|
+
updateComponent(component: ComponentEntry, descriptor: ComponentManifest): Promise<void>;
|
|
100
|
+
checkDescriptor(descriptor: ComponentManifest): Promise<ComponentChecking>;
|
|
101
|
+
}
|
|
102
|
+
export const ComponentControllerKey: ServiceAccessor<ComponentController, ComponentSchema>;
|
|
103
|
+
export type ComponentEditorProps<T extends ComponentManifest = ComponentManifest> = {
|
|
104
|
+
descriptor: ComponentSchema;
|
|
105
|
+
schema: JSONSchema;
|
|
106
|
+
manifest: T;
|
|
107
|
+
created?: boolean;
|
|
108
|
+
onChange: (manifest: T) => void;
|
|
109
|
+
onValidate: (manifest: T) => void;
|
|
110
|
+
onCancel: () => void;
|
|
111
|
+
};
|
|
112
|
+
export type ComponentPreviewProps<T extends ComponentManifest = ComponentManifest> = {
|
|
113
|
+
manifest: T;
|
|
114
|
+
};
|
|
115
|
+
export type ComponentEditor<T extends ComponentManifest = ComponentManifest> = {
|
|
116
|
+
creator: React.ComponentType<ComponentEditorProps<T>>;
|
|
117
|
+
editor: React.ComponentType<ComponentEditorProps<T>>;
|
|
118
|
+
preview?: React.ComponentType<ComponentPreviewProps<T>>;
|
|
119
|
+
};
|
|
120
|
+
export const EditorKey: ServiceAccessor<ComponentEditor<ComponentManifest<unknown>>, unknown>;
|
|
121
|
+
export type ComponentFilter = {
|
|
122
|
+
query: string;
|
|
123
|
+
pattern: RegExp;
|
|
124
|
+
keywords: string[];
|
|
125
|
+
tags: string[];
|
|
126
|
+
types: string[];
|
|
127
|
+
services: string[];
|
|
128
|
+
};
|
|
129
|
+
export interface IResourceLoader {
|
|
130
|
+
load_resource(uri: string): Promise<any>;
|
|
131
|
+
}
|
|
132
|
+
export interface IComponentPublisher {
|
|
133
|
+
search_component_publications(filter: ComponentFilter): Promise<ComponentPublication[]>;
|
|
134
|
+
get_component_publication(component_id: string): Promise<ComponentPublication>;
|
|
135
|
+
}
|
|
136
|
+
export interface IComponentProvider extends IComponentPublisher {
|
|
137
|
+
get_component_manifest(component_id: string): Promise<ComponentManifest>;
|
|
138
|
+
set_component_manifest(component_id: string, manifest: ComponentManifest): Promise<boolean>;
|
|
139
|
+
add_component(manifest: ComponentManifest): Promise<ComponentPublication>;
|
|
140
|
+
delete_component(component_id: string): Promise<boolean>;
|
|
141
|
+
}
|
|
142
|
+
export interface IContentProvider {
|
|
143
|
+
check_content(uri: URI): Promise<string>;
|
|
144
|
+
load_content(uri: URI): Promise<Blob>;
|
|
145
|
+
store_content(content: Blob, uri: URI): Promise<boolean>;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
declare module '@jointhedots/core:src/components/helpers' {
|
|
150
|
+
import { URI } from '@jointhedots/core:src/components/vscode-uri';
|
|
151
|
+
import { type ComponentFilter, type ComponentManifest, type ComponentPublication } from '@jointhedots/core:src/components/components';
|
|
152
|
+
import type { ResourceEntry, ResourceImport } from '@jointhedots/core:src/schema/schema';
|
|
153
|
+
export function parseComponentURI(ref: string): URI;
|
|
154
|
+
export function getComponentServicesList(manif: ComponentManifest): Promise<string[]>;
|
|
155
|
+
export function createComponentPublication(manif: ComponentManifest): Promise<ComponentPublication>;
|
|
156
|
+
export function createComponentFilter(filter?: Partial<ComponentFilter>): ComponentFilter;
|
|
157
|
+
export function matchComponentFilter(pub: ComponentPublication, filter?: Partial<ComponentFilter>): boolean;
|
|
158
|
+
export function parseResourceEntry(entry: ResourceEntry): ResourceImport;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
declare module '@jointhedots/core:src/components' {
|
|
162
|
+
export * from '@jointhedots/core:src/components/components';
|
|
163
|
+
export * from '@jointhedots/core:src/components/manifold';
|
|
164
|
+
export * from '@jointhedots/core:src/components/helpers';
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare module '@jointhedots/core:src/components/manifold' {
|
|
168
|
+
import { type ComponentFilter, type ComponentManifest, type ComponentPublication, type IContentProvider, type IResourceLoader } from '@jointhedots/core:src/components/components';
|
|
169
|
+
import { CombinedComponentProvider } from '@jointhedots/core:src/providers/components/CombinedComponentProvider';
|
|
170
|
+
import { type QueryLogResult } from '@jointhedots/core:src/logging';
|
|
171
|
+
export type ComponentErrorManifest = ComponentManifest & {
|
|
172
|
+
type: "<error>";
|
|
173
|
+
message: string;
|
|
174
|
+
stack?: string;
|
|
175
|
+
};
|
|
176
|
+
export type ComponentServiceGetter<Service = any> = (entry: ComponentEntry) => Service;
|
|
177
|
+
export class ComponentEntry<Instance extends Object = any> {
|
|
178
|
+
readonly id: string;
|
|
179
|
+
protected __instance__?: Instance;
|
|
180
|
+
manifest?: ComponentManifest;
|
|
181
|
+
constructor(id: string);
|
|
182
|
+
get title(): string;
|
|
183
|
+
get namespace(): string;
|
|
184
|
+
get valid(): boolean;
|
|
185
|
+
get loaded(): boolean;
|
|
186
|
+
get installed(): boolean;
|
|
187
|
+
get instance(): Instance;
|
|
188
|
+
set instance(value: Instance);
|
|
189
|
+
get<Manifest extends ComponentManifest = ComponentManifest>(): Manifest;
|
|
190
|
+
set<Manifest extends ComponentManifest = ComponentManifest>(manifest: Manifest): this;
|
|
191
|
+
fetch<Manifest extends ComponentManifest = ComponentManifest>(): Promise<Manifest>;
|
|
192
|
+
install(): Promise<ComponentEntry>;
|
|
193
|
+
acquireResource(identifier: string): ComponentResource;
|
|
194
|
+
getResource(identifier: string): ComponentResource;
|
|
195
|
+
hasResource(identifier: string): boolean;
|
|
196
|
+
getResourceAsync(identifier: string): Promise<ComponentResource>;
|
|
197
|
+
fetchResource<T = any>(identifier: string): Promise<T>;
|
|
198
|
+
getLogStats(): import( '@jointhedots/core:src').LogInfos;
|
|
199
|
+
getLogs(count: number): QueryLogResult;
|
|
200
|
+
}
|
|
201
|
+
export class ComponentResource {
|
|
202
|
+
readonly component: ComponentEntry;
|
|
203
|
+
readonly resource: string;
|
|
204
|
+
entry: any;
|
|
205
|
+
identifier: string;
|
|
206
|
+
constructor(component: ComponentEntry, resource: string);
|
|
207
|
+
get valid(): boolean;
|
|
208
|
+
get loaded(): boolean;
|
|
209
|
+
fetch<T = any>(): Promise<T>;
|
|
210
|
+
get<T = any>(): T;
|
|
211
|
+
set(data: any): void;
|
|
212
|
+
get spec(): any;
|
|
213
|
+
get url(): string;
|
|
214
|
+
}
|
|
215
|
+
export type ComponentsListener = (target: ComponentEntry) => void;
|
|
216
|
+
export class ComponentsManifold {
|
|
217
|
+
components: Map<string, ComponentEntry<any>>;
|
|
218
|
+
resources: Map<string, ComponentResource>;
|
|
219
|
+
datamap: WeakMap<any, ComponentEntry<any> | ComponentResource>;
|
|
220
|
+
loadings: Map<any, Promise<any>>;
|
|
221
|
+
installings: Map<any, Promise<ComponentEntry<any>>>;
|
|
222
|
+
listeners: Set<ComponentsListener>;
|
|
223
|
+
components_provider: CombinedComponentProvider;
|
|
224
|
+
resources_loader: IResourceLoader;
|
|
225
|
+
content_provider: IContentProvider;
|
|
226
|
+
constructor();
|
|
227
|
+
listen(l: ComponentsListener): ComponentsListener;
|
|
228
|
+
unlisten(l: ComponentsListener): void;
|
|
229
|
+
notifyError(subject: ComponentEntry, error: Error): void;
|
|
230
|
+
}
|
|
231
|
+
export const ComponentsRegistry: ComponentsManifold;
|
|
232
|
+
export function getDefaultComponent(): ComponentEntry<any>;
|
|
233
|
+
export function getComponentFromData(data: any, is_static?: boolean): ComponentEntry;
|
|
234
|
+
export function acquireComponent(id: string): ComponentEntry;
|
|
235
|
+
export function acquireFutureComponent(manifest: ComponentManifest): ComponentEntry;
|
|
236
|
+
export function acquireResource(ref: string): ComponentResource;
|
|
237
|
+
export function resolveRelativeComponent(ref: string, from: ComponentEntry): ComponentEntry;
|
|
238
|
+
export function saveComponentManifest(manifest: ComponentManifest): Promise<ComponentEntry<any>>;
|
|
239
|
+
export function saveComponent(component: ComponentEntry): Promise<ComponentEntry<any>>;
|
|
240
|
+
export function deleteComponent(id: string): Promise<void>;
|
|
241
|
+
export function unregisterComponent(id: string): void;
|
|
242
|
+
export function searchComponentsPublications(filter: ComponentFilter): Promise<ComponentPublication[]>;
|
|
243
|
+
export function fetchComponentsPublications(components_ids: string[]): Promise<ComponentPublication[]>;
|
|
244
|
+
export function failedComponentPublication(id: string, title?: string): ComponentPublication;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
declare module '@jointhedots/core:src' {
|
|
248
|
+
export * from '@jointhedots/core:src/common/types';
|
|
249
|
+
export * from '@jointhedots/core:src/logging';
|
|
250
|
+
export * from '@jointhedots/core:src/observable';
|
|
251
|
+
export * from '@jointhedots/core:src/schema';
|
|
252
|
+
export * from '@jointhedots/core:src/components';
|
|
253
|
+
export * from '@jointhedots/core:src/services';
|
|
254
|
+
export * from '@jointhedots/core:src/providers/resources/StaticContentProvider';
|
|
255
|
+
export * from '@jointhedots/core:src/providers/resources/CommonResourceProvider';
|
|
256
|
+
export * from '@jointhedots/core:src/providers/components/CombinedComponentProvider';
|
|
257
|
+
export * from '@jointhedots/core:src/providers/components/InMemComponentProvider';
|
|
258
|
+
export * from '@jointhedots/core:src/providers/components/StaticComponentProvider';
|
|
259
|
+
export * from '@jointhedots/core:src/providers/components/LocalComponentProvider';
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
declare module '@jointhedots/core:src/interfaces/commands/interface' {
|
|
263
|
+
import type { Serializable } from '@jointhedots/core:src/interfaces/commands/child_process';
|
|
264
|
+
export type Cmdlet<CmdPayload extends Serializable = Serializable, CmdResult extends Serializable = Serializable> = {
|
|
265
|
+
payload: CmdPayload;
|
|
266
|
+
result: CmdResult;
|
|
267
|
+
};
|
|
268
|
+
export type CmdPayload<C extends Cmdlet> = C extends {
|
|
269
|
+
payload: infer P;
|
|
270
|
+
} ? P : void;
|
|
271
|
+
export type CmdResult<C extends Cmdlet> = C extends {
|
|
272
|
+
result: infer P;
|
|
273
|
+
} ? P : void;
|
|
274
|
+
export interface Command<C extends Cmdlet = Cmdlet> {
|
|
275
|
+
target: string;
|
|
276
|
+
payload?: CmdPayload<C>;
|
|
277
|
+
icon?: string;
|
|
278
|
+
title?: string;
|
|
279
|
+
summary?: string;
|
|
280
|
+
identity?: string;
|
|
281
|
+
signature?: string;
|
|
282
|
+
}
|
|
283
|
+
export interface CommandsService {
|
|
284
|
+
execute<C extends Cmdlet>(cmd: string, data: CmdPayload<C>): Promise<CmdResult<C>>;
|
|
285
|
+
}
|
|
286
|
+
export function executeCommand(cmd: Command): Promise<void>;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
declare module '@jointhedots/core:src/interfaces/react/ErrorBoundary' {
|
|
290
|
+
import React from '@jointhedots/core:src/components/react';
|
|
291
|
+
export type ErrorDisplayerType<E extends Error = Error> = React.ComponentType<{
|
|
292
|
+
error: E;
|
|
293
|
+
onRetry?: () => void;
|
|
25
294
|
}>;
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
export const DockingSchema: z.ZodObject<{
|
|
62
|
-
view: z.ZodString;
|
|
63
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
64
|
-
}, z.core.$strip>;
|
|
65
|
-
export const SecurityRuleSchema: z.ZodObject<{
|
|
66
|
-
check: z.ZodAny;
|
|
67
|
-
}, z.core.$strip>;
|
|
68
|
-
export const SecurityGuardSchema: z.ZodUnion<readonly [z.ZodLiteral<"safe">, z.ZodString, z.ZodObject<{
|
|
69
|
-
rule: z.ZodString;
|
|
70
|
-
}, z.core.$loose>]>;
|
|
71
|
-
export const ResourceLinkSchema: z.ZodString;
|
|
72
|
-
export const ResourceEntrySchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
73
|
-
type: z.ZodString;
|
|
74
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
75
|
-
}, z.core.$strip>]>;
|
|
76
|
-
export const JSONSchemaStandardSchema: z.ZodObject<{
|
|
77
|
-
$id: z.ZodOptional<z.ZodString>;
|
|
78
|
-
$ref: z.ZodOptional<z.ZodString>;
|
|
79
|
-
$schema: z.ZodOptional<z.ZodString>;
|
|
80
|
-
$comment: z.ZodOptional<z.ZodString>;
|
|
81
|
-
$defs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
82
|
-
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
83
|
-
string: "string";
|
|
84
|
-
number: "number";
|
|
85
|
-
boolean: "boolean";
|
|
86
|
-
object: "object";
|
|
87
|
-
integer: "integer";
|
|
88
|
-
array: "array";
|
|
89
|
-
null: "null";
|
|
90
|
-
}>, z.ZodEnum<{
|
|
91
|
-
function: "function";
|
|
92
|
-
module: "module";
|
|
93
|
-
service: "service";
|
|
94
|
-
}>]>>;
|
|
95
|
-
enum: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>>;
|
|
96
|
-
const: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
97
|
-
multipleOf: z.ZodOptional<z.ZodNumber>;
|
|
98
|
-
maximum: z.ZodOptional<z.ZodNumber>;
|
|
99
|
-
exclusiveMaximum: z.ZodOptional<z.ZodNumber>;
|
|
100
|
-
minimum: z.ZodOptional<z.ZodNumber>;
|
|
101
|
-
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
102
|
-
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
103
|
-
minLength: z.ZodOptional<z.ZodNumber>;
|
|
104
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
105
|
-
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>]>>;
|
|
106
|
-
additionalItems: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
107
|
-
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
108
|
-
minItems: z.ZodOptional<z.ZodNumber>;
|
|
109
|
-
uniqueItems: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
-
contains: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
111
|
-
maxProperties: z.ZodOptional<z.ZodNumber>;
|
|
112
|
-
minProperties: z.ZodOptional<z.ZodNumber>;
|
|
113
|
-
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
114
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
115
|
-
patternProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
116
|
-
additionalProperties: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
117
|
-
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodString>]>>>;
|
|
118
|
-
propertyNames: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
119
|
-
if: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
120
|
-
then: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
121
|
-
else: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
122
|
-
allOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
123
|
-
anyOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
124
|
-
oneOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
125
|
-
not: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
126
|
-
format: z.ZodOptional<z.ZodString>;
|
|
127
|
-
contentMediaType: z.ZodOptional<z.ZodString>;
|
|
128
|
-
contentEncoding: z.ZodOptional<z.ZodString>;
|
|
129
|
-
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
130
|
-
title: z.ZodOptional<z.ZodString>;
|
|
131
|
-
description: z.ZodOptional<z.ZodString>;
|
|
132
|
-
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
133
|
-
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
134
|
-
writeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
-
examples: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
136
|
-
}, z.core.$strip>;
|
|
137
|
-
export const JSONSchemaCustomSchema: z.ZodObject<{
|
|
138
|
-
title: z.ZodOptional<z.ZodString>;
|
|
139
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
140
|
-
doc: z.ZodOptional<z.ZodObject<{
|
|
141
|
-
description: z.ZodOptional<z.ZodString>;
|
|
142
|
-
chapters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
143
|
-
title: z.ZodOptional<z.ZodString>;
|
|
144
|
-
properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
|
-
secondaryProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
146
|
-
patternProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
147
|
-
additionalProperties: z.ZodOptional<z.ZodBoolean>;
|
|
148
|
-
}, z.core.$strip>>>;
|
|
149
|
-
additionalChapter: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
-
}, z.core.$strip>>;
|
|
151
|
-
$error: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Error, Error>]>>;
|
|
152
|
-
args: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
153
|
-
placeholder: z.ZodOptional<z.ZodBoolean>;
|
|
154
|
-
resources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
155
|
-
type: z.ZodString;
|
|
156
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
157
|
-
}, z.core.$strip>]>>>;
|
|
158
|
-
security: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"safe">, z.ZodString, z.ZodObject<{
|
|
159
|
-
rule: z.ZodString;
|
|
160
|
-
}, z.core.$loose>]>>;
|
|
161
|
-
"allow-origin": z.ZodOptional<z.ZodString>;
|
|
162
|
-
docking: z.ZodOptional<z.ZodObject<{
|
|
163
|
-
view: z.ZodString;
|
|
164
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
165
|
-
}, z.core.$strip>>;
|
|
166
|
-
templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
167
|
-
title: z.ZodOptional<z.ZodString>;
|
|
168
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
169
|
-
description: z.ZodOptional<z.ZodString>;
|
|
170
|
-
args: z.ZodOptional<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
171
|
-
content: z.ZodObject<{
|
|
172
|
-
type: z.ZodString;
|
|
173
|
-
}, z.core.$loose>;
|
|
174
|
-
}, z.core.$strip>>>;
|
|
175
|
-
binding: z.ZodOptional<z.ZodObject<{
|
|
176
|
-
source: z.ZodString;
|
|
177
|
-
}, z.core.$strip>>;
|
|
178
|
-
aliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
179
|
-
}, z.core.$strip>;
|
|
180
|
-
export const ServiceSchemaSchema: z.ZodObject<{
|
|
181
|
-
$id: z.ZodOptional<z.ZodString>;
|
|
182
|
-
$ref: z.ZodOptional<z.ZodString>;
|
|
183
|
-
$schema: z.ZodOptional<z.ZodString>;
|
|
184
|
-
$comment: z.ZodOptional<z.ZodString>;
|
|
185
|
-
$defs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
186
|
-
enum: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>>;
|
|
187
|
-
const: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
188
|
-
multipleOf: z.ZodOptional<z.ZodNumber>;
|
|
189
|
-
maximum: z.ZodOptional<z.ZodNumber>;
|
|
190
|
-
exclusiveMaximum: z.ZodOptional<z.ZodNumber>;
|
|
191
|
-
minimum: z.ZodOptional<z.ZodNumber>;
|
|
192
|
-
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
193
|
-
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
194
|
-
minLength: z.ZodOptional<z.ZodNumber>;
|
|
195
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
196
|
-
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>]>>;
|
|
197
|
-
additionalItems: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
198
|
-
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
199
|
-
minItems: z.ZodOptional<z.ZodNumber>;
|
|
200
|
-
uniqueItems: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
-
contains: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
202
|
-
maxProperties: z.ZodOptional<z.ZodNumber>;
|
|
203
|
-
minProperties: z.ZodOptional<z.ZodNumber>;
|
|
204
|
-
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
205
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
206
|
-
patternProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
207
|
-
additionalProperties: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
208
|
-
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodString>]>>>;
|
|
209
|
-
propertyNames: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
210
|
-
if: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
211
|
-
then: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
212
|
-
else: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
213
|
-
allOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
214
|
-
anyOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
215
|
-
oneOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
216
|
-
not: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
217
|
-
format: z.ZodOptional<z.ZodString>;
|
|
218
|
-
contentMediaType: z.ZodOptional<z.ZodString>;
|
|
219
|
-
contentEncoding: z.ZodOptional<z.ZodString>;
|
|
220
|
-
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
221
|
-
description: z.ZodOptional<z.ZodString>;
|
|
222
|
-
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
223
|
-
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
224
|
-
writeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
225
|
-
examples: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
226
|
-
title: z.ZodOptional<z.ZodString>;
|
|
227
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
228
|
-
doc: z.ZodOptional<z.ZodObject<{
|
|
229
|
-
description: z.ZodOptional<z.ZodString>;
|
|
230
|
-
chapters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
231
|
-
title: z.ZodOptional<z.ZodString>;
|
|
232
|
-
properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
233
|
-
secondaryProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
234
|
-
patternProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
235
|
-
additionalProperties: z.ZodOptional<z.ZodBoolean>;
|
|
236
|
-
}, z.core.$strip>>>;
|
|
237
|
-
additionalChapter: z.ZodOptional<z.ZodBoolean>;
|
|
238
|
-
}, z.core.$strip>>;
|
|
239
|
-
$error: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Error, Error>]>>;
|
|
240
|
-
args: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
241
|
-
placeholder: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
-
resources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
243
|
-
type: z.ZodString;
|
|
244
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
245
|
-
}, z.core.$strip>]>>>;
|
|
246
|
-
security: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"safe">, z.ZodString, z.ZodObject<{
|
|
247
|
-
rule: z.ZodString;
|
|
248
|
-
}, z.core.$loose>]>>;
|
|
249
|
-
"allow-origin": z.ZodOptional<z.ZodString>;
|
|
250
|
-
docking: z.ZodOptional<z.ZodObject<{
|
|
251
|
-
view: z.ZodString;
|
|
252
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
253
|
-
}, z.core.$strip>>;
|
|
254
|
-
templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
255
|
-
title: z.ZodOptional<z.ZodString>;
|
|
256
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
257
|
-
description: z.ZodOptional<z.ZodString>;
|
|
258
|
-
args: z.ZodOptional<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
259
|
-
content: z.ZodObject<{
|
|
260
|
-
type: z.ZodString;
|
|
261
|
-
}, z.core.$loose>;
|
|
262
|
-
}, z.core.$strip>>>;
|
|
263
|
-
binding: z.ZodOptional<z.ZodObject<{
|
|
264
|
-
source: z.ZodString;
|
|
265
|
-
}, z.core.$strip>>;
|
|
266
|
-
aliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
267
|
-
type: z.ZodLiteral<"service">;
|
|
268
|
-
$spec: z.ZodString;
|
|
269
|
-
version: z.ZodOptional<z.ZodString>;
|
|
270
|
-
}, z.core.$strip>;
|
|
271
|
-
export const FunctionSchemaSchema: z.ZodObject<{
|
|
272
|
-
$id: z.ZodOptional<z.ZodString>;
|
|
273
|
-
$ref: z.ZodOptional<z.ZodString>;
|
|
274
|
-
$schema: z.ZodOptional<z.ZodString>;
|
|
275
|
-
$comment: z.ZodOptional<z.ZodString>;
|
|
276
|
-
$defs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
277
|
-
enum: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>>;
|
|
278
|
-
const: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
279
|
-
multipleOf: z.ZodOptional<z.ZodNumber>;
|
|
280
|
-
maximum: z.ZodOptional<z.ZodNumber>;
|
|
281
|
-
exclusiveMaximum: z.ZodOptional<z.ZodNumber>;
|
|
282
|
-
minimum: z.ZodOptional<z.ZodNumber>;
|
|
283
|
-
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
284
|
-
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
285
|
-
minLength: z.ZodOptional<z.ZodNumber>;
|
|
286
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
287
|
-
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>]>>;
|
|
288
|
-
additionalItems: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
289
|
-
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
290
|
-
minItems: z.ZodOptional<z.ZodNumber>;
|
|
291
|
-
uniqueItems: z.ZodOptional<z.ZodBoolean>;
|
|
292
|
-
contains: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
293
|
-
maxProperties: z.ZodOptional<z.ZodNumber>;
|
|
294
|
-
minProperties: z.ZodOptional<z.ZodNumber>;
|
|
295
|
-
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
296
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
297
|
-
patternProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
298
|
-
additionalProperties: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
299
|
-
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodString>]>>>;
|
|
300
|
-
propertyNames: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
301
|
-
if: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
302
|
-
then: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
303
|
-
else: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
304
|
-
allOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
305
|
-
anyOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
306
|
-
oneOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
307
|
-
not: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
308
|
-
format: z.ZodOptional<z.ZodString>;
|
|
309
|
-
contentMediaType: z.ZodOptional<z.ZodString>;
|
|
310
|
-
contentEncoding: z.ZodOptional<z.ZodString>;
|
|
311
|
-
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
312
|
-
description: z.ZodOptional<z.ZodString>;
|
|
313
|
-
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
314
|
-
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
315
|
-
writeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
316
|
-
examples: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
317
|
-
title: z.ZodOptional<z.ZodString>;
|
|
318
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
319
|
-
doc: z.ZodOptional<z.ZodObject<{
|
|
320
|
-
description: z.ZodOptional<z.ZodString>;
|
|
321
|
-
chapters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
322
|
-
title: z.ZodOptional<z.ZodString>;
|
|
323
|
-
properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
324
|
-
secondaryProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
325
|
-
patternProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
326
|
-
additionalProperties: z.ZodOptional<z.ZodBoolean>;
|
|
327
|
-
}, z.core.$strip>>>;
|
|
328
|
-
additionalChapter: z.ZodOptional<z.ZodBoolean>;
|
|
329
|
-
}, z.core.$strip>>;
|
|
330
|
-
$error: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Error, Error>]>>;
|
|
331
|
-
args: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
332
|
-
placeholder: z.ZodOptional<z.ZodBoolean>;
|
|
333
|
-
resources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
334
|
-
type: z.ZodString;
|
|
335
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
336
|
-
}, z.core.$strip>]>>>;
|
|
337
|
-
security: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"safe">, z.ZodString, z.ZodObject<{
|
|
338
|
-
rule: z.ZodString;
|
|
339
|
-
}, z.core.$loose>]>>;
|
|
340
|
-
"allow-origin": z.ZodOptional<z.ZodString>;
|
|
341
|
-
docking: z.ZodOptional<z.ZodObject<{
|
|
342
|
-
view: z.ZodString;
|
|
343
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
344
|
-
}, z.core.$strip>>;
|
|
345
|
-
templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
346
|
-
title: z.ZodOptional<z.ZodString>;
|
|
347
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
348
|
-
description: z.ZodOptional<z.ZodString>;
|
|
349
|
-
args: z.ZodOptional<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
350
|
-
content: z.ZodObject<{
|
|
351
|
-
type: z.ZodString;
|
|
352
|
-
}, z.core.$loose>;
|
|
353
|
-
}, z.core.$strip>>>;
|
|
354
|
-
binding: z.ZodOptional<z.ZodObject<{
|
|
355
|
-
source: z.ZodString;
|
|
356
|
-
}, z.core.$strip>>;
|
|
357
|
-
aliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
358
|
-
type: z.ZodLiteral<"function">;
|
|
359
|
-
input: z.ZodOptional<z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>]>>;
|
|
360
|
-
output: z.ZodOptional<z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>]>>;
|
|
361
|
-
}, z.core.$strip>;
|
|
362
|
-
export const JSONSchemaSchema: z.ZodType<any>;
|
|
363
|
-
export type JSONSchema7TypeName = z.infer<typeof JSONSchema7TypeNameSchema>;
|
|
364
|
-
export type JSONSchema7TypeNameCustom = z.infer<typeof JSONSchema7TypeNameCustomSchema>;
|
|
365
|
-
export type JSONSchema7 = z.infer<typeof JSONSchema7TypeSchema>;
|
|
366
|
-
export type JSONSchema7Definition = z.infer<typeof JSONSchema7DefinitionSchema>;
|
|
367
|
-
export type ChapterSchema = z.infer<typeof ChapterSchema>;
|
|
368
|
-
export type DocumentationSchema = z.infer<typeof DocumentationSchema>;
|
|
369
|
-
export type BindingSchema = z.infer<typeof BindingSchema>;
|
|
370
|
-
export type ExpressionSchema = z.infer<typeof ExpressionSchema>;
|
|
371
|
-
export type TemplateSchema = z.infer<typeof TemplateSchema>;
|
|
372
|
-
export type DockingSchema = z.infer<typeof DockingSchema>;
|
|
373
|
-
export type SecurityRule = z.infer<typeof SecurityRuleSchema>;
|
|
374
|
-
export type SecurityGuard = z.infer<typeof SecurityGuardSchema>;
|
|
375
|
-
export type ResourceEntry = z.infer<typeof ResourceEntrySchema>;
|
|
376
|
-
export type ResourceImport = {
|
|
377
|
-
type: string;
|
|
378
|
-
location?: string;
|
|
379
|
-
identifier?: string;
|
|
380
|
-
[key: string]: any;
|
|
381
|
-
};
|
|
382
|
-
export type JSONSchemaStandard = z.infer<typeof JSONSchemaStandardSchema>;
|
|
383
|
-
export type JSONSchemaCustom = z.infer<typeof JSONSchemaCustomSchema>;
|
|
384
|
-
export type ServiceSchema = z.infer<typeof ServiceSchemaSchema>;
|
|
385
|
-
export type FunctionSchema = z.infer<typeof FunctionSchemaSchema>;
|
|
386
|
-
export type JSONSchema = z.infer<typeof JSONSchemaSchema>;
|
|
295
|
+
export function ErrorDisplayer({ error, onRetry }: {
|
|
296
|
+
error: Error;
|
|
297
|
+
onRetry?: () => void;
|
|
298
|
+
}): any;
|
|
299
|
+
interface IErrorReconcilier {
|
|
300
|
+
getErrorDisplayer(error: Error): ErrorDisplayerType | null;
|
|
301
|
+
} class Component<P = {}, S = {}> extends React.Component<P, S> {
|
|
302
|
+
props: Readonly<P>;
|
|
303
|
+
setState: React.Component<P, S>['setState'];
|
|
304
|
+
}
|
|
305
|
+
export class ErrorBoundary extends Component<{
|
|
306
|
+
children: React.ReactNode;
|
|
307
|
+
}, {
|
|
308
|
+
error?: Error;
|
|
309
|
+
displayer?: ErrorDisplayerType;
|
|
310
|
+
}> {
|
|
311
|
+
static contextType: any;
|
|
312
|
+
context: IErrorReconcilier;
|
|
313
|
+
state: {
|
|
314
|
+
error?: Error;
|
|
315
|
+
displayer?: React.ComponentType<{
|
|
316
|
+
error: E;
|
|
317
|
+
onRetry?: () => void;
|
|
318
|
+
}>;
|
|
319
|
+
};
|
|
320
|
+
componentDidCatch(error: Error): void;
|
|
321
|
+
render(): any;
|
|
322
|
+
}
|
|
323
|
+
export function ErrorReconcilier({ errorClass, errorDisplayer, children }: {
|
|
324
|
+
errorClass: new () => Error;
|
|
325
|
+
errorDisplayer: ErrorDisplayerType;
|
|
326
|
+
children: React.ReactNode;
|
|
327
|
+
}): any;
|
|
328
|
+
export function registerErrorDisplayer<E extends Error>(errorClass: new (...args: any[]) => E, displayer: ErrorDisplayerType<E>): void;
|
|
329
|
+
export {};
|
|
387
330
|
}
|
|
388
331
|
|
|
389
|
-
declare module '@jointhedots/core
|
|
390
|
-
|
|
391
|
-
export
|
|
392
|
-
export
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
/** Returns the specification/configuration associated with this service from the given component entry. */
|
|
401
|
-
spec(entry: ComponentEntry): Spec;
|
|
402
|
-
/** Creates a child service accessor scoped under this service's resource path. */
|
|
403
|
-
subservice<T extends any>(name: string): ServiceAccessor<T, Spec>;
|
|
404
|
-
/** Factory method that creates a new ServiceAccessor for the given resource name and optional definition. */
|
|
405
|
-
static About<Instance extends any, Spec extends any>(resource: string, definition?: any): ServiceAccessor<Instance, Spec>;
|
|
406
|
-
}
|
|
332
|
+
declare module '@jointhedots/core:src/interfaces/react' {
|
|
333
|
+
export * from '@jointhedots/core:src/interfaces/react/interface';
|
|
334
|
+
export * from '@jointhedots/core:src/interfaces/react/useAsyncMemo';
|
|
335
|
+
export * from '@jointhedots/core:src/interfaces/react/useAsyncState';
|
|
336
|
+
export * from '@jointhedots/core:src/interfaces/react/useServices';
|
|
337
|
+
export * from '@jointhedots/core:src/interfaces/react/useLocation';
|
|
338
|
+
export * from '@jointhedots/core:src/interfaces/react/useLocalStorage';
|
|
339
|
+
export * from '@jointhedots/core:src/interfaces/react/useSessionStorage';
|
|
340
|
+
export * from '@jointhedots/core:src/interfaces/react/useForceUpdate';
|
|
341
|
+
export * from '@jointhedots/core:src/interfaces/react/ErrorBoundary';
|
|
342
|
+
export * from '@jointhedots/core:src/interfaces/react/ViewUrl';
|
|
407
343
|
}
|
|
408
344
|
|
|
409
|
-
declare module '@jointhedots/core
|
|
410
|
-
import {
|
|
411
|
-
import
|
|
412
|
-
import
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
export interface ComponentPublication {
|
|
417
|
-
id: ComponentID;
|
|
418
|
-
ref?: string;
|
|
419
|
-
type?: string;
|
|
420
|
-
title: string;
|
|
421
|
-
icon?: string;
|
|
422
|
-
description?: string;
|
|
423
|
-
services?: string[];
|
|
424
|
-
keywords?: string[];
|
|
425
|
-
tags?: string[];
|
|
426
|
-
}
|
|
427
|
-
export type ComponentManifest<Data extends any = unknown> = {
|
|
428
|
-
$id: string;
|
|
429
|
-
type?: string;
|
|
430
|
-
title?: string;
|
|
431
|
-
icon?: string;
|
|
432
|
-
description?: string;
|
|
433
|
-
keywords?: string[];
|
|
434
|
-
tags?: string[];
|
|
435
|
-
doc?: DocumentationSchema;
|
|
436
|
-
specs?: Record<string, any>;
|
|
437
|
-
services?: Record<string, ResourceEntry>;
|
|
438
|
-
data?: Data;
|
|
439
|
-
};
|
|
440
|
-
/** Configuration for a distributed package */
|
|
441
|
-
export interface DistributedConfig {
|
|
442
|
-
/** Version specifier (e.g., "*", "^18.0.0") */
|
|
443
|
-
version?: string;
|
|
444
|
-
/** Interop type: 'esm' | 'cjs-default' | 'cjs-named' */
|
|
445
|
-
interop?: 'esm' | 'cjs-default' | 'cjs-named';
|
|
446
|
-
/** List of named exports to re-export (required for cjs-named interop) */
|
|
447
|
-
exports?: string[];
|
|
448
|
-
}
|
|
449
|
-
export type BundleManifest = ComponentManifest<{
|
|
450
|
-
alias?: string;
|
|
451
|
-
package?: string;
|
|
452
|
-
baseline?: string;
|
|
453
|
-
namespaces?: string[];
|
|
454
|
-
dependencies?: string[];
|
|
455
|
-
distribueds?: {
|
|
456
|
-
[packageName: string]: string | DistributedConfig;
|
|
457
|
-
};
|
|
458
|
-
exports?: {
|
|
459
|
-
[id: string]: string;
|
|
460
|
-
};
|
|
461
|
-
components?: ComponentPublication[];
|
|
462
|
-
}>;
|
|
463
|
-
export type ComponentSchema = {
|
|
464
|
-
readonly name: ServiceType;
|
|
465
|
-
readonly title: string;
|
|
466
|
-
readonly icon: string;
|
|
467
|
-
readonly attributes: Record<string, JSONSchema>;
|
|
468
|
-
};
|
|
469
|
-
export interface ComponentManifestIssue {
|
|
470
|
-
level: "error" | "warn" | "info";
|
|
471
|
-
message: string;
|
|
472
|
-
fix?(descriptor: ComponentManifest): Promise<ComponentManifest>;
|
|
473
|
-
}
|
|
474
|
-
export interface ComponentChecking {
|
|
475
|
-
fixed?: ComponentManifest;
|
|
476
|
-
issues?: ComponentManifestIssue[];
|
|
477
|
-
}
|
|
478
|
-
export interface ComponentController {
|
|
479
|
-
createComponent(component: ComponentEntry, descriptor: ComponentManifest): Promise<void>;
|
|
480
|
-
updateComponent(component: ComponentEntry, descriptor: ComponentManifest): Promise<void>;
|
|
481
|
-
checkDescriptor(descriptor: ComponentManifest): Promise<ComponentChecking>;
|
|
482
|
-
}
|
|
483
|
-
export const ComponentControllerKey: ServiceAccessor<ComponentController, ComponentSchema>;
|
|
484
|
-
export type ComponentEditorProps<T extends ComponentManifest = ComponentManifest> = {
|
|
485
|
-
descriptor: ComponentSchema;
|
|
486
|
-
schema: JSONSchema;
|
|
487
|
-
manifest: T;
|
|
488
|
-
created?: boolean;
|
|
489
|
-
onChange: (manifest: T) => void;
|
|
490
|
-
onValidate: (manifest: T) => void;
|
|
491
|
-
onCancel: () => void;
|
|
492
|
-
};
|
|
493
|
-
export type ComponentPreviewProps<T extends ComponentManifest = ComponentManifest> = {
|
|
494
|
-
manifest: T;
|
|
345
|
+
declare module '@jointhedots/core:src/interfaces/react/interface' {
|
|
346
|
+
import { z, type ZodObject, type ZodRawShape } from '@jointhedots/core:src/interfaces/react/zod';
|
|
347
|
+
import { type ServiceDefinition, type ServiceInterface } from '@jointhedots/core:src/services';
|
|
348
|
+
import React from '@jointhedots/core:src/components/react';
|
|
349
|
+
export type ViewServicePoint = {
|
|
350
|
+
service?: string;
|
|
351
|
+
cardinality?: number;
|
|
495
352
|
};
|
|
496
|
-
export type
|
|
497
|
-
|
|
498
|
-
editor: React.ComponentType<ComponentEditorProps<T>>;
|
|
499
|
-
preview?: React.ComponentType<ComponentPreviewProps<T>>;
|
|
353
|
+
export type ViewRequirements = {
|
|
354
|
+
servicePoints?: Record<string, ViewServicePoint>;
|
|
500
355
|
};
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
356
|
+
/**
|
|
357
|
+
* Creates a ServiceDefinition for a React view component with typed props.
|
|
358
|
+
*
|
|
359
|
+
* This factory function generates a service definition that can be used to register
|
|
360
|
+
* React components within the service system. It provides type-safe props validation
|
|
361
|
+
* using Zod schemas and supports dependency injection through service points.
|
|
362
|
+
*
|
|
363
|
+
* @param props - Optional Zod schema defining the component's props structure.
|
|
364
|
+
* If not provided, defaults to a record accepting any string keys.
|
|
365
|
+
* @returns A ServiceDefinition specialized for React view components
|
|
366
|
+
*
|
|
367
|
+
* @example
|
|
368
|
+
* ```typescript
|
|
369
|
+
* // Define a component with typed props
|
|
370
|
+
* const UserCardSchema = ReactComponentSchema(z.object({
|
|
371
|
+
* userId: z.string(),
|
|
372
|
+
* showAvatar: z.boolean().optional(),
|
|
373
|
+
* }))
|
|
374
|
+
*
|
|
375
|
+
* // Use in component registration
|
|
376
|
+
* const UserCard: ReactComponentType<typeof UserCardSchema> = ({ userId, showAvatar }) => {
|
|
377
|
+
* return <div>{userId}</div>
|
|
378
|
+
* }
|
|
379
|
+
* ```
|
|
380
|
+
*
|
|
381
|
+
* @example
|
|
382
|
+
* ```typescript
|
|
383
|
+
* // Define a component with service requirements
|
|
384
|
+
* const DashboardSchema = ReactComponentSchema(z.object({
|
|
385
|
+
* title: z.string(),
|
|
386
|
+
* }))
|
|
387
|
+
*
|
|
388
|
+
* // Component descriptor with service points
|
|
389
|
+
* const descriptor: ReactComponentDescriptor = {
|
|
390
|
+
* props: { title: "My Dashboard" },
|
|
391
|
+
* requirements: {
|
|
392
|
+
* servicePoints: {
|
|
393
|
+
* dataService: { service: "spec://data-provider", cardinality: 1 },
|
|
394
|
+
* },
|
|
395
|
+
* },
|
|
396
|
+
* }
|
|
397
|
+
* ```
|
|
398
|
+
*/
|
|
399
|
+
export function ReactComponentSchema<T extends ZodRawShape>(props?: ZodObject<T>): ServiceDefinition<z.TypeOf<ZodObject<T, z.core.$strip> | z.ZodRecord<z.ZodString, z.ZodAny>>, ReactComponentDescriptor<T>>;
|
|
400
|
+
/**
|
|
401
|
+
* Type alias for React components that integrate with the service system.
|
|
402
|
+
*
|
|
403
|
+
* Components of this type receive their props through `ServiceInterface<T>`,
|
|
404
|
+
* which provides both the declared props and access to injected services.
|
|
405
|
+
*
|
|
406
|
+
* @template T - The props type, typically inferred from a Zod schema
|
|
407
|
+
*
|
|
408
|
+
* @example
|
|
409
|
+
* ```typescript
|
|
410
|
+
* const MyComponent: ReactComponentType<{ name: string }> = (props) => {
|
|
411
|
+
* return <span>Hello, {props.name}!</span>
|
|
412
|
+
* }
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
export type ReactComponentType<T = {}> = React.ComponentType<ServiceInterface<T>>;
|
|
416
|
+
/**
|
|
417
|
+
* Descriptor object for configuring a React component within the service system.
|
|
418
|
+
*
|
|
419
|
+
* This type defines the structure for declaring component properties and
|
|
420
|
+
* service dependencies that will be injected at runtime.
|
|
421
|
+
*
|
|
422
|
+
* @template T - Zod shape type for props validation
|
|
423
|
+
*
|
|
424
|
+
* @property props - Initial props values matching the component's schema
|
|
425
|
+
* @property requirements - Service injection configuration
|
|
426
|
+
* @property requirements.servicePoints - Map of named service injection points,
|
|
427
|
+
* each specifying the service spec URI and optional cardinality
|
|
428
|
+
*
|
|
429
|
+
* @example
|
|
430
|
+
* ```typescript
|
|
431
|
+
* const descriptor: ReactComponentDescriptor<{ count: z.ZodNumber }> = {
|
|
432
|
+
* props: { count: 0 },
|
|
433
|
+
* requirements: {
|
|
434
|
+
* servicePoints: {
|
|
435
|
+
* counter: { service: "spec://counter-service", cardinality: 1 },
|
|
436
|
+
* logger: { service: "spec://logger" },
|
|
437
|
+
* },
|
|
438
|
+
* },
|
|
439
|
+
* }
|
|
440
|
+
* ```
|
|
441
|
+
*/
|
|
442
|
+
export type ReactComponentDescriptor<T extends ZodRawShape = ZodRawShape> = {
|
|
443
|
+
props?: z.infer<ZodObject<T>>;
|
|
444
|
+
requirements?: ViewRequirements;
|
|
509
445
|
};
|
|
510
|
-
export
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
export
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
export
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
446
|
+
export type ViewReactService<T = any> = React.ComponentType<T>;
|
|
447
|
+
export const ViewReactKey: import( '@jointhedots/core:src').ServiceAccessor<React.ComponentType<T>, any>;
|
|
448
|
+
export type ViewWebComponentService = new (...props: any[]) => HTMLElement;
|
|
449
|
+
export const ViewWebComponentKey: import( '@jointhedots/core:src').ServiceAccessor<ViewWebComponentService, any>;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
declare module '@jointhedots/core:src/interfaces/react/useAsyncMemo' {
|
|
453
|
+
export function useAsyncMemo<T extends any>(loader: () => Promise<T>, init: T, deps: any[]): T;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
declare module '@jointhedots/core:src/interfaces/react/useAsyncState' {
|
|
457
|
+
import React from '@jointhedots/core:src/components/react';
|
|
458
|
+
export class AsyncState<T> {
|
|
459
|
+
private value;
|
|
460
|
+
private updateTimeout;
|
|
461
|
+
private promise;
|
|
462
|
+
private dispatch;
|
|
463
|
+
private updateTimer;
|
|
464
|
+
private shallUpdate;
|
|
465
|
+
private updater;
|
|
466
|
+
private deps;
|
|
467
|
+
constructor(value: T, updateTimeout: number);
|
|
468
|
+
use(updater: () => Promise<T>, deps: any[]): void;
|
|
469
|
+
initiate(dispatch: (x: T) => void): void;
|
|
470
|
+
private cancelAutoUpdate;
|
|
471
|
+
private scheduleAutoUpdate;
|
|
472
|
+
get isWaiting(): boolean;
|
|
473
|
+
get hasState(): boolean;
|
|
474
|
+
get autoUpdate(): number;
|
|
475
|
+
set autoUpdate(timeout: number);
|
|
476
|
+
set(value: T): void;
|
|
477
|
+
get(): T;
|
|
478
|
+
update(): void;
|
|
479
|
+
cancel(): void;
|
|
480
|
+
waiting(render: (data: T) => React.ReactNode): React.ReactNode;
|
|
481
|
+
using(render: (data: T) => React.ReactNode): React.ReactNode;
|
|
527
482
|
}
|
|
483
|
+
export function useAsyncState<T>(updater: () => Promise<T>, deps: any[], initialState?: T, updateTime?: number): AsyncState<T>;
|
|
484
|
+
export function waiting(render: () => React.ReactElement, ...waiteds: AsyncState<any>[]): React.ReactElement;
|
|
485
|
+
export function using(render: () => React.ReactElement, ...waiteds: AsyncState<any>[]): React.ReactElement;
|
|
528
486
|
}
|
|
529
487
|
|
|
530
|
-
declare module '@jointhedots/core
|
|
531
|
-
export
|
|
532
|
-
export const ContentBlob: {
|
|
533
|
-
object: {
|
|
534
|
-
read<T = any>(blob: Blob): Promise<T>;
|
|
535
|
-
write<T = any>(data: T): Promise<Blob>;
|
|
536
|
-
};
|
|
537
|
-
text: {
|
|
538
|
-
read(blob: Blob): Promise<string>;
|
|
539
|
-
write(text: string): Promise<Blob>;
|
|
540
|
-
};
|
|
541
|
-
};
|
|
542
|
-
export function b64_blob(base64: string): Blob;
|
|
543
|
-
export function b64_format(base64: string): string;
|
|
544
|
-
export function blob_b64(blob: Blob): Promise<string>;
|
|
488
|
+
declare module '@jointhedots/core:src/interfaces/react/useForceUpdate' {
|
|
489
|
+
export function useForceUpdate(): any;
|
|
545
490
|
}
|
|
546
491
|
|
|
547
|
-
declare module '@jointhedots/core
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
export function parseComponentURI(ref: string): URI;
|
|
552
|
-
export function getComponentServicesList(manif: ComponentManifest): Promise<string[]>;
|
|
553
|
-
export function createComponentPublication(manif: ComponentManifest): Promise<ComponentPublication>;
|
|
554
|
-
export function createComponentFilter(filter?: Partial<ComponentFilter>): ComponentFilter;
|
|
555
|
-
export function matchComponentFilter(pub: ComponentPublication, filter?: Partial<ComponentFilter>): boolean;
|
|
556
|
-
export function parseResourceEntry(entry: ResourceEntry): ResourceImport;
|
|
492
|
+
declare module '@jointhedots/core:src/interfaces/react/useLocalStorage' {
|
|
493
|
+
type Initier<S> = S | (() => S);
|
|
494
|
+
export function useLocalStorage<T = any>(key: string, initier: Initier<T>): [T, (x: T) => void];
|
|
495
|
+
export {};
|
|
557
496
|
}
|
|
558
497
|
|
|
559
|
-
declare module '@jointhedots/core
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
export
|
|
563
|
-
readonly storage: IContentProvider;
|
|
564
|
-
modules_exports: Map<string, any>;
|
|
565
|
-
baseUrl: string;
|
|
566
|
-
constructor(storage: IContentProvider);
|
|
567
|
-
load_resource(ref: string): Promise<any>;
|
|
568
|
-
import_module_json(ref: string, uri: URI): Promise<any>;
|
|
569
|
-
import_module_esm(ref: string, uri: URI): Promise<any>;
|
|
570
|
-
}
|
|
498
|
+
declare module '@jointhedots/core:src/interfaces/react/useLocation' {
|
|
499
|
+
export function useLocation(): Location;
|
|
500
|
+
export function useLocationHash(): string;
|
|
501
|
+
export function getLocationQuery(): Record<string, string>;
|
|
571
502
|
}
|
|
572
503
|
|
|
573
|
-
declare module '@jointhedots/core
|
|
574
|
-
import
|
|
575
|
-
import type
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
504
|
+
declare module '@jointhedots/core:src/interfaces/react/useServices' {
|
|
505
|
+
import React from '@jointhedots/core:src/components/react';
|
|
506
|
+
import { ServicePoint, type ServiceChangeHandler } from '@jointhedots/core:src/services/service-points';
|
|
507
|
+
import type { ViewRequirements } from '@jointhedots/core:src/interfaces/react/interface';
|
|
508
|
+
export type IService = unknown;
|
|
509
|
+
export type ServicePointsMap = Map<ServicePoint, IService[]>;
|
|
510
|
+
export enum ServiceStatus {
|
|
511
|
+
NotReady = 0,
|
|
512
|
+
Loading = 1,
|
|
513
|
+
Ready = 2,
|
|
514
|
+
Failed = 3
|
|
582
515
|
}
|
|
583
|
-
export
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
declare module '@jointhedots/core/src/providers/components/InMemComponentProvider' {
|
|
587
|
-
import { type ComponentFilter, type ComponentManifest, type ComponentPublication, type IComponentProvider, type IComponentPublisher } from '@jointhedots/core/src/components/components';
|
|
588
|
-
export class InMemComponentPublisher implements IComponentPublisher {
|
|
589
|
-
pubs: Map<string, ComponentPublication>;
|
|
590
|
-
constructor(catalog?: ComponentPublication[]);
|
|
591
|
-
get_component_publication(id: string): Promise<ComponentPublication>;
|
|
592
|
-
search_component_publications(filter: ComponentFilter): Promise<ComponentPublication[]>;
|
|
516
|
+
export interface IServicePointsProvider {
|
|
517
|
+
getService<IService>(svc: ServicePoint): IService[];
|
|
593
518
|
}
|
|
594
|
-
export
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
519
|
+
export interface IServicePointsController {
|
|
520
|
+
readonly provider: IServicePointsProvider;
|
|
521
|
+
readonly error: MissingServiceError;
|
|
522
|
+
readonly status: ServiceStatus;
|
|
523
|
+
notifyChange(svc: ServicePoint): any;
|
|
524
|
+
dispose(): any;
|
|
600
525
|
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
catalog: InMemComponentPublisher;
|
|
610
|
-
constructor(content_provider: IContentProvider);
|
|
611
|
-
get_provider_bundle(): Promise<BundleManifest>;
|
|
612
|
-
get_component_catalog(): Promise<InMemComponentPublisher>;
|
|
613
|
-
get_component_publication(id: string): Promise<ComponentPublication>;
|
|
614
|
-
search_component_publications(filter: ComponentFilter): Promise<ComponentPublication[]>;
|
|
615
|
-
get_component_manifest(id: string): Promise<ComponentManifest>;
|
|
616
|
-
set_component_manifest(component_id: string, manifest: ComponentManifest): Promise<boolean>;
|
|
617
|
-
add_component(manifest: ComponentManifest): Promise<ComponentPublication>;
|
|
618
|
-
delete_component(component_id: string): Promise<boolean>;
|
|
526
|
+
export interface IServicePointsSupport extends IServicePointsProvider {
|
|
527
|
+
addController(c: IServicePointsController): any;
|
|
528
|
+
removeController(c: IServicePointsController): any;
|
|
529
|
+
}
|
|
530
|
+
export class MissingServiceError extends Error {
|
|
531
|
+
missings: ServicePoint[];
|
|
532
|
+
requireds?: ServicePoint[];
|
|
533
|
+
constructor(missings: ServicePoint[], requireds?: ServicePoint[]);
|
|
619
534
|
}
|
|
535
|
+
export const ServicePointsSupportContext: React.Context<IServicePointsSupport>;
|
|
536
|
+
export const ServicePointsProviderContext: React.Context<IServicePointsProvider>;
|
|
537
|
+
export function useServicesListener(listener: ServiceChangeHandler): void;
|
|
538
|
+
export function useServices<IService>(servicePoint: ServicePoint<IService>, cardinality?: number): IService[];
|
|
539
|
+
export function useService<IService>(servicePoint: ServicePoint<IService>, optional?: boolean): IService;
|
|
540
|
+
export function useServicesController(requireds: ServicePoint[], requirements: ViewRequirements): IServicePointsController | null;
|
|
541
|
+
export type ServiceConfiguratorComponent = React.ComponentType<{
|
|
542
|
+
services: ServicePoint[];
|
|
543
|
+
}>;
|
|
544
|
+
export function UseServicePoints(props: {
|
|
545
|
+
requireds?: ServicePoint[];
|
|
546
|
+
requirements?: ViewRequirements;
|
|
547
|
+
configurator: ServiceConfiguratorComponent;
|
|
548
|
+
children: any;
|
|
549
|
+
}): any;
|
|
620
550
|
}
|
|
621
551
|
|
|
622
|
-
declare module '@jointhedots/core
|
|
623
|
-
|
|
624
|
-
export
|
|
625
|
-
|
|
626
|
-
constructor(providers?: IComponentProvider[]);
|
|
627
|
-
add_provider(provider: IComponentProvider): void;
|
|
628
|
-
get_component_publication(id: string): Promise<ComponentPublication>;
|
|
629
|
-
search_component_publications(filter: ComponentFilter): Promise<ComponentPublication[]>;
|
|
630
|
-
get_component_manifest(id: string): Promise<ComponentManifest>;
|
|
631
|
-
set_component_manifest(component_id: string, manifest: ComponentManifest): Promise<boolean>;
|
|
632
|
-
add_component(manifest: ComponentManifest): Promise<ComponentPublication>;
|
|
633
|
-
delete_component(component_id: string): Promise<boolean>;
|
|
634
|
-
}
|
|
552
|
+
declare module '@jointhedots/core:src/interfaces/react/useSessionStorage' {
|
|
553
|
+
type Initier<S> = S | (() => S);
|
|
554
|
+
export function useSessionStorage<T = any>(key: string, initier: Initier<T>): [T, (x: T) => void];
|
|
555
|
+
export {};
|
|
635
556
|
}
|
|
636
557
|
|
|
637
|
-
declare module '@jointhedots/core
|
|
638
|
-
import { type
|
|
639
|
-
|
|
558
|
+
declare module '@jointhedots/core:src/interfaces/react/ViewUrl' {
|
|
559
|
+
import { type ReactElement } from '@jointhedots/core:src/components/react';
|
|
560
|
+
import { type ViewInfos } from '@jointhedots/core:src/interfaces/view/interface';
|
|
561
|
+
export function useCurrentView(): any;
|
|
562
|
+
export function InvokeView(props: {
|
|
563
|
+
view: string | ViewInfos;
|
|
564
|
+
origin?: string;
|
|
565
|
+
fallback?: ReactElement;
|
|
566
|
+
}): any;
|
|
567
|
+
export function InvokeUrlHashView(props: {
|
|
568
|
+
hash: string;
|
|
569
|
+
fallback?: ReactElement;
|
|
570
|
+
}): any;
|
|
571
|
+
export function InvokeURLView(props: {
|
|
572
|
+
fallback?: ReactElement;
|
|
573
|
+
}): any;
|
|
574
|
+
export function InvokeNestedView(props: {
|
|
575
|
+
fallback?: ReactElement;
|
|
576
|
+
}): any;
|
|
640
577
|
}
|
|
641
578
|
|
|
642
|
-
declare module '@jointhedots/core/rest' {
|
|
643
|
-
import {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
export interface RESTService {
|
|
647
|
-
getUrl(path: string): string;
|
|
648
|
-
invoke(path: string, init?: RequestInit): Promise<Response>;
|
|
649
|
-
}
|
|
650
|
-
export const RESTServiceKey: ServiceAccessor<RESTService, unknown>;
|
|
651
|
-
export type RESTServiceImport = {
|
|
652
|
-
type?: "api.rest";
|
|
653
|
-
endpoint?: string;
|
|
579
|
+
declare module '@jointhedots/core:src/interfaces/rest/decorators' {
|
|
580
|
+
import type { Handler } from '@jointhedots/core:src/interfaces/rest/hono';
|
|
581
|
+
export type RESTClass<T extends Object = any> = new (...args: any[]) => T;
|
|
582
|
+
export type RESTResourceInfos = {
|
|
654
583
|
path?: string;
|
|
584
|
+
public?: boolean;
|
|
655
585
|
};
|
|
656
|
-
export
|
|
657
|
-
|
|
658
|
-
fetch(link: string | URI, init?: RequestInit): Promise<Response>;
|
|
659
|
-
getUri(link: string | URI): Promise<URI>;
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
declare module '@jointhedots/core/src/components/manifold' {
|
|
664
|
-
import { type ComponentFilter, type ComponentManifest, type ComponentPublication, type IContentProvider, type IResourceLoader } from '@jointhedots/core/src/components/components';
|
|
665
|
-
import { CombinedComponentProvider } from '@jointhedots/core/src/providers/components/CombinedComponentProvider';
|
|
666
|
-
import { type QueryLogResult } from '@jointhedots/core/src/logging/index';
|
|
667
|
-
export type ComponentErrorManifest = ComponentManifest & {
|
|
668
|
-
type: "<error>";
|
|
669
|
-
message: string;
|
|
670
|
-
stack?: string;
|
|
586
|
+
export type RESTMethodInfos = {
|
|
587
|
+
public?: boolean;
|
|
671
588
|
};
|
|
672
|
-
export
|
|
673
|
-
|
|
674
|
-
readonly
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
get namespace(): string;
|
|
680
|
-
get valid(): boolean;
|
|
681
|
-
get loaded(): boolean;
|
|
682
|
-
get installed(): boolean;
|
|
683
|
-
get instance(): Instance;
|
|
684
|
-
set instance(value: Instance);
|
|
685
|
-
get<Manifest extends ComponentManifest = ComponentManifest>(): Manifest;
|
|
686
|
-
set<Manifest extends ComponentManifest = ComponentManifest>(manifest: Manifest): this;
|
|
687
|
-
fetch<Manifest extends ComponentManifest = ComponentManifest>(): Promise<Manifest>;
|
|
688
|
-
install(): Promise<ComponentEntry>;
|
|
689
|
-
acquireResource(identifier: string): ComponentResource;
|
|
690
|
-
getResource(identifier: string): ComponentResource;
|
|
691
|
-
hasResource(identifier: string): boolean;
|
|
692
|
-
getResourceAsync(identifier: string): Promise<ComponentResource>;
|
|
693
|
-
fetchResource<T = any>(identifier: string): Promise<T>;
|
|
694
|
-
getLogStats(): import( '@jointhedots/core').LogInfos;
|
|
695
|
-
getLogs(count: number): QueryLogResult;
|
|
696
|
-
}
|
|
697
|
-
export class ComponentResource {
|
|
698
|
-
readonly component: ComponentEntry;
|
|
699
|
-
readonly resource: string;
|
|
700
|
-
entry: any;
|
|
701
|
-
identifier: string;
|
|
702
|
-
constructor(component: ComponentEntry, resource: string);
|
|
703
|
-
get valid(): boolean;
|
|
704
|
-
get loaded(): boolean;
|
|
705
|
-
fetch<T = any>(): Promise<T>;
|
|
706
|
-
get<T = any>(): T;
|
|
707
|
-
set(data: any): void;
|
|
708
|
-
get spec(): any;
|
|
709
|
-
get url(): string;
|
|
710
|
-
}
|
|
711
|
-
export type ComponentsListener = (target: ComponentEntry) => void;
|
|
712
|
-
export class ComponentsManifold {
|
|
713
|
-
components: Map<string, ComponentEntry<any>>;
|
|
714
|
-
resources: Map<string, ComponentResource>;
|
|
715
|
-
datamap: WeakMap<any, ComponentEntry<any> | ComponentResource>;
|
|
716
|
-
loadings: Map<any, Promise<any>>;
|
|
717
|
-
installings: Map<any, Promise<ComponentEntry<any>>>;
|
|
718
|
-
listeners: Set<ComponentsListener>;
|
|
719
|
-
components_provider: CombinedComponentProvider;
|
|
720
|
-
resources_loader: IResourceLoader;
|
|
721
|
-
content_provider: IContentProvider;
|
|
722
|
-
constructor();
|
|
723
|
-
listen(l: ComponentsListener): ComponentsListener;
|
|
724
|
-
unlisten(l: ComponentsListener): void;
|
|
725
|
-
notifyError(subject: ComponentEntry, error: Error): void;
|
|
589
|
+
export class RESTApi {
|
|
590
|
+
readonly target: RESTClass;
|
|
591
|
+
readonly descriptor: RESTResourceInfos;
|
|
592
|
+
constructor(target: RESTClass, descriptor: RESTResourceInfos);
|
|
593
|
+
setDescriptor(descriptor: RESTResourceInfos): void;
|
|
594
|
+
getMethods(): Generator<RESTMethod, void, unknown>;
|
|
595
|
+
create(): any;
|
|
726
596
|
}
|
|
727
|
-
export
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
export function
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
export
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
597
|
+
export class RESTMethod {
|
|
598
|
+
readonly name: string;
|
|
599
|
+
readonly invoked: Function;
|
|
600
|
+
readonly descriptor: RESTMethodInfos;
|
|
601
|
+
constructor(name: string, invoked: Function, descriptor: RESTMethodInfos);
|
|
602
|
+
}
|
|
603
|
+
export function getRESTApis(): {
|
|
604
|
+
Resources: Map<RESTClass<any>, RESTApi>;
|
|
605
|
+
Methods: Map<Function, RESTMethod>;
|
|
606
|
+
};
|
|
607
|
+
export const REST: {
|
|
608
|
+
Resource<T extends RESTClass<any>>(infos?: RESTResourceInfos): (target: T) => T;
|
|
609
|
+
Method(infos?: RESTMethodInfos): (target: Handler, context: ClassMethodDecoratorContext<unknown, (this: unknown, ...args: any) => any>) => void;
|
|
610
|
+
};
|
|
741
611
|
}
|
|
742
612
|
|
|
743
|
-
declare module '@jointhedots/core/
|
|
744
|
-
import
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
payload: infer P;
|
|
751
|
-
} ? P : void;
|
|
752
|
-
export type CmdResult<C extends Cmdlet> = C extends {
|
|
753
|
-
result: infer P;
|
|
754
|
-
} ? P : void;
|
|
755
|
-
export interface Command<C extends Cmdlet = Cmdlet> {
|
|
756
|
-
target: string;
|
|
757
|
-
payload?: CmdPayload<C>;
|
|
758
|
-
icon?: string;
|
|
759
|
-
title?: string;
|
|
760
|
-
summary?: string;
|
|
761
|
-
identity?: string;
|
|
762
|
-
signature?: string;
|
|
613
|
+
declare module '@jointhedots/core:src/interfaces/rest/interface' {
|
|
614
|
+
import { URI } from '@jointhedots/core:src/components/vscode-uri';
|
|
615
|
+
import { ComponentEntry } from '@jointhedots/core:src/components/manifold';
|
|
616
|
+
import { ServiceAccessor } from '@jointhedots/core:src/services/service-accessor';
|
|
617
|
+
export interface RESTService {
|
|
618
|
+
getUrl(path: string): string;
|
|
619
|
+
invoke(path: string, init?: RequestInit): Promise<Response>;
|
|
763
620
|
}
|
|
764
|
-
export
|
|
765
|
-
|
|
621
|
+
export const RESTServiceKey: ServiceAccessor<RESTService, unknown>;
|
|
622
|
+
export type RESTServiceImport = {
|
|
623
|
+
type?: "api.rest";
|
|
624
|
+
endpoint?: string;
|
|
625
|
+
path?: string;
|
|
626
|
+
};
|
|
627
|
+
export function __import_RESTService(entry: RESTServiceImport, component: ComponentEntry): RESTService;
|
|
628
|
+
export const REST: {
|
|
629
|
+
fetch(link: string | URI, init?: RequestInit): Promise<Response>;
|
|
630
|
+
getUri(link: string | URI): Promise<URI>;
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
declare module '@jointhedots/core:src/interfaces/storage/interface' {
|
|
635
|
+
import { ServiceAccessor } from '@jointhedots/core:src/services';
|
|
636
|
+
export type NameSpaceId = string;
|
|
637
|
+
export type FileKey = string;
|
|
638
|
+
export type ChangeSetId = string;
|
|
639
|
+
export type FilePatch = {
|
|
640
|
+
start: number;
|
|
641
|
+
end: number;
|
|
642
|
+
data: string;
|
|
643
|
+
};
|
|
644
|
+
export type FileChange = {
|
|
645
|
+
key: FileKey;
|
|
646
|
+
prev_key?: FileKey;
|
|
647
|
+
removed?: boolean;
|
|
648
|
+
changes: FilePatch[];
|
|
649
|
+
};
|
|
650
|
+
export type Author = {
|
|
651
|
+
name: string;
|
|
652
|
+
email?: string;
|
|
653
|
+
};
|
|
654
|
+
export type StorageChangeInfos = {
|
|
655
|
+
message?: string;
|
|
656
|
+
authors?: Author[];
|
|
657
|
+
};
|
|
658
|
+
export type StorageChangeStatus = StorageChangeInfos & {
|
|
659
|
+
id: ChangeSetId;
|
|
660
|
+
from?: ChangeSetId | ChangeSetId[];
|
|
661
|
+
emitted_at?: Date;
|
|
662
|
+
};
|
|
663
|
+
export type StorageChangeSet = StorageChangeStatus & {
|
|
664
|
+
changes?: FileChange[];
|
|
665
|
+
};
|
|
666
|
+
export type StorageChangeLog = {
|
|
667
|
+
changes: StorageChangeStatus[];
|
|
668
|
+
};
|
|
669
|
+
export type StorageStats = {
|
|
670
|
+
file_count?: number;
|
|
671
|
+
used_bytes?: number;
|
|
672
|
+
limit_used_bytes?: number;
|
|
673
|
+
limit_file_count?: number;
|
|
674
|
+
};
|
|
675
|
+
export type StorageTransaction = StorageChangeInfos & {
|
|
676
|
+
files: {
|
|
677
|
+
[key: FileKey]: {
|
|
678
|
+
prev_key?: string;
|
|
679
|
+
remove?: boolean;
|
|
680
|
+
data?: Blob | string;
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
export interface StorageService {
|
|
685
|
+
readonly location: string;
|
|
686
|
+
list(): Promise<FileKey[]>;
|
|
687
|
+
stats(): Promise<StorageStats>;
|
|
688
|
+
read(key: FileKey): Promise<Blob>;
|
|
689
|
+
write(key: FileKey, data: Blob): Promise<void>;
|
|
690
|
+
recall(key: FileKey, at: ChangeSetId): Promise<Blob>;
|
|
691
|
+
commit(transaction: StorageTransaction): Promise<ChangeSetId>;
|
|
692
|
+
getChangeSet(id: ChangeSetId): Promise<StorageChangeSet>;
|
|
693
|
+
getChangeLog(): Promise<StorageChangeLog>;
|
|
694
|
+
getFileLog(key: FileKey): Promise<StorageChangeLog>;
|
|
766
695
|
}
|
|
767
|
-
export
|
|
696
|
+
export type StorageDescriptor = void;
|
|
697
|
+
export const StorageServiceKey: ServiceAccessor<StorageService, void>;
|
|
768
698
|
}
|
|
769
699
|
|
|
770
|
-
declare module '@jointhedots/core
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
countReset(label?: string): void;
|
|
780
|
-
debug(...data: any[]): void;
|
|
781
|
-
debug(message?: any, ...optionalParams: any[]): void;
|
|
782
|
-
dir(item?: any, options?: any): void;
|
|
783
|
-
dir(obj: any, options?: import( 'util').InspectOptions): void;
|
|
784
|
-
dirxml(...data: any[]): void;
|
|
785
|
-
dirxml(...data: any[]): void;
|
|
786
|
-
error(...data: any[]): void;
|
|
787
|
-
error(message?: any, ...optionalParams: any[]): void;
|
|
788
|
-
group(...data: any[]): void;
|
|
789
|
-
group(...label: any[]): void;
|
|
790
|
-
groupCollapsed(...data: any[]): void;
|
|
791
|
-
groupCollapsed(...label: any[]): void;
|
|
792
|
-
groupEnd(): void;
|
|
793
|
-
groupEnd(): void;
|
|
794
|
-
info(...data: any[]): void;
|
|
795
|
-
info(message?: any, ...optionalParams: any[]): void;
|
|
796
|
-
log(...data: any[]): void;
|
|
797
|
-
log(message?: any, ...optionalParams: any[]): void;
|
|
798
|
-
table(tabularData?: any, properties?: string[]): void;
|
|
799
|
-
table(tabularData: any, properties?: readonly string[]): void;
|
|
800
|
-
time(label?: string): void;
|
|
801
|
-
time(label?: string): void;
|
|
802
|
-
timeEnd(label?: string): void;
|
|
803
|
-
timeEnd(label?: string): void;
|
|
804
|
-
timeLog(label?: string, ...data: any[]): void;
|
|
805
|
-
timeLog(label?: string, ...data: any[]): void;
|
|
806
|
-
timeStamp(label?: string): void;
|
|
807
|
-
timeStamp(label?: string): void;
|
|
808
|
-
trace(...data: any[]): void;
|
|
809
|
-
trace(message?: any, ...optionalParams: any[]): void;
|
|
810
|
-
warn(...data: any[]): void;
|
|
811
|
-
warn(message?: any, ...optionalParams: any[]): void;
|
|
812
|
-
Console: console.ConsoleConstructor;
|
|
813
|
-
profile(label?: string): void;
|
|
814
|
-
profileEnd(label?: string): void;
|
|
700
|
+
declare module '@jointhedots/core:src/interfaces/view/interface' {
|
|
701
|
+
import { ComponentEntry } from '@jointhedots/core:src/components/manifold';
|
|
702
|
+
import { ServiceAccessor } from '@jointhedots/core:src/services/service-accessor';
|
|
703
|
+
export const ViewServiceKey: ServiceAccessor<any, any>;
|
|
704
|
+
export type ViewInfos = {
|
|
705
|
+
name: string;
|
|
706
|
+
params?: Record<string, ViewParam | ViewParam[] | Record<string, ViewParam>>;
|
|
707
|
+
content?: string;
|
|
708
|
+
nested?: ViewInfos;
|
|
815
709
|
};
|
|
816
|
-
export
|
|
817
|
-
export
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
export
|
|
710
|
+
export type ViewParam = string | boolean | number;
|
|
711
|
+
export type ViewInvokable = {
|
|
712
|
+
component: ComponentEntry;
|
|
713
|
+
properties?: Record<string, string>;
|
|
714
|
+
};
|
|
715
|
+
export function getViewReferenceFrom(data: string | ViewInfos): string;
|
|
716
|
+
export function getViewInfosFrom(data: string | ViewInfos, content?: string): ViewInfos;
|
|
717
|
+
export function evaluateViewInfos(view: string | ViewInfos, origin?: string): Promise<ViewInvokable>;
|
|
718
|
+
export function getViewURL(view: string | ViewInfos, inside?: string | ViewInfos): string;
|
|
719
|
+
export function gotoURLView(view: string | ViewInfos, inside?: string | ViewInfos): void;
|
|
720
|
+
export function updateURLView(view: string | ViewInfos): void;
|
|
822
721
|
}
|
|
823
722
|
|
|
824
|
-
declare module '@jointhedots/core
|
|
825
|
-
import type { Command } from '@jointhedots/core/commands';
|
|
826
|
-
export { print } from '@jointhedots/core
|
|
723
|
+
declare module '@jointhedots/core:src/logging' {
|
|
724
|
+
import type { Command } from '@jointhedots/core:src/interfaces/commands/interface';
|
|
725
|
+
export { print } from '@jointhedots/core:src/logging/trace';
|
|
827
726
|
export type LogObjectID = string;
|
|
828
727
|
export type LogStatus = "error" | "warn" | "notify" | "info";
|
|
829
728
|
export type LogKind = "event" | "ticket";
|
|
@@ -877,30 +776,50 @@ declare module '@jointhedots/core/src/logging/index' {
|
|
|
877
776
|
export function createLogFromError(error: Error, target?: any): LogObject;
|
|
878
777
|
}
|
|
879
778
|
|
|
880
|
-
declare module '@jointhedots/core
|
|
779
|
+
declare module '@jointhedots/core:src/logging/trace' {
|
|
780
|
+
export const originalConsole: {
|
|
781
|
+
assert(condition?: boolean, ...data: any[]): void;
|
|
782
|
+
clear(): void;
|
|
783
|
+
count(label?: string): void;
|
|
784
|
+
countReset(label?: string): void;
|
|
785
|
+
debug(...data: any[]): void;
|
|
786
|
+
dir(item?: any, options?: any): void;
|
|
787
|
+
dirxml(...data: any[]): void;
|
|
788
|
+
error(...data: any[]): void;
|
|
789
|
+
group(...data: any[]): void;
|
|
790
|
+
groupCollapsed(...data: any[]): void;
|
|
791
|
+
groupEnd(): void;
|
|
792
|
+
info(...data: any[]): void;
|
|
793
|
+
log(...data: any[]): void;
|
|
794
|
+
table(tabularData?: any, properties?: string[]): void;
|
|
795
|
+
time(label?: string): void;
|
|
796
|
+
timeEnd(label?: string): void;
|
|
797
|
+
timeLog(label?: string, ...data: any[]): void;
|
|
798
|
+
timeStamp(label?: string): void;
|
|
799
|
+
trace(...data: any[]): void;
|
|
800
|
+
warn(...data: any[]): void;
|
|
801
|
+
};
|
|
802
|
+
export const logError: (...args: any[]) => void;
|
|
803
|
+
export const logWarning: (...args: any[]) => void;
|
|
804
|
+
export const logInfo: (...args: any[]) => void;
|
|
805
|
+
export const logTrace: (...args: any[]) => void;
|
|
806
|
+
export const logDebug: (...args: any[]) => void;
|
|
807
|
+
export const print: Console;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
declare module '@jointhedots/core:src/observable/attributes' {
|
|
881
811
|
export const ObservableAttribute: unique symbol;
|
|
882
812
|
export const HttpStatusAttribute: unique symbol;
|
|
883
813
|
}
|
|
884
814
|
|
|
885
|
-
declare module '@jointhedots/core
|
|
886
|
-
export
|
|
887
|
-
export
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
image: T;
|
|
891
|
-
constructor();
|
|
892
|
-
subscribe(observer: Observer, keys?: string[]): void;
|
|
893
|
-
unsubscribe(observer: Observer): void;
|
|
894
|
-
notify(key?: PropertyKey): void;
|
|
895
|
-
use(keys?: string[]): Promise<T>;
|
|
896
|
-
get(target: T, key: PropertyKey): any;
|
|
897
|
-
set(target: T, key: PropertyKey, value: any): boolean;
|
|
898
|
-
ownKeys(target: T): (string | symbol)[];
|
|
899
|
-
has(target: T, key: PropertyKey): boolean;
|
|
900
|
-
}
|
|
815
|
+
declare module '@jointhedots/core:src/observable' {
|
|
816
|
+
export * from '@jointhedots/core:src/observable/attributes';
|
|
817
|
+
export * from '@jointhedots/core:src/observable/observable';
|
|
818
|
+
export * from '@jointhedots/core:src/observable/listenable';
|
|
819
|
+
export * from '@jointhedots/core:src/observable/RestResource';
|
|
901
820
|
}
|
|
902
821
|
|
|
903
|
-
declare module '@jointhedots/core
|
|
822
|
+
declare module '@jointhedots/core:src/observable/listenable' {
|
|
904
823
|
type ListenersArray = (Function | string)[];
|
|
905
824
|
export type ListenableContexts = {
|
|
906
825
|
[contextName: string]: any;
|
|
@@ -930,50 +849,148 @@ declare module '@jointhedots/core/src/observable/listenable' {
|
|
|
930
849
|
[key: string]: any;
|
|
931
850
|
}): void;
|
|
932
851
|
}
|
|
933
|
-
export {};
|
|
852
|
+
export {};
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
declare module '@jointhedots/core:src/observable/observable' {
|
|
856
|
+
export type Observer = (target: any, key: PropertyKey) => void;
|
|
857
|
+
export class Observable<T extends Object> implements ProxyHandler<T> {
|
|
858
|
+
observers: (Observer | string[])[];
|
|
859
|
+
state: T;
|
|
860
|
+
image: T;
|
|
861
|
+
constructor();
|
|
862
|
+
subscribe(observer: Observer, keys?: string[]): void;
|
|
863
|
+
unsubscribe(observer: Observer): void;
|
|
864
|
+
notify(key?: PropertyKey): void;
|
|
865
|
+
use(keys?: string[]): Promise<T>;
|
|
866
|
+
get(target: T, key: PropertyKey): any;
|
|
867
|
+
set(target: T, key: PropertyKey, value: any): boolean;
|
|
868
|
+
ownKeys(target: T): (string | symbol)[];
|
|
869
|
+
has(target: T, key: PropertyKey): boolean;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
declare module '@jointhedots/core:src/observable/RestResource' {
|
|
874
|
+
import { Observable } from '@jointhedots/core:src/observable/observable';
|
|
875
|
+
export class RestResource<T extends Object> extends Observable<T> {
|
|
876
|
+
readonly url: string;
|
|
877
|
+
loaded: boolean;
|
|
878
|
+
query: Promise<T>;
|
|
879
|
+
status: number;
|
|
880
|
+
constructor(url: string);
|
|
881
|
+
use(): Promise<T>;
|
|
882
|
+
get(target: T, key: PropertyKey): any;
|
|
883
|
+
set(target: T, key: PropertyKey, value: any): boolean;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
declare module '@jointhedots/core:src/providers/components/CombinedComponentProvider' {
|
|
888
|
+
import { type ComponentFilter, type ComponentManifest, type ComponentPublication, type IComponentProvider } from '@jointhedots/core:src/components/components';
|
|
889
|
+
export class CombinedComponentProvider implements IComponentProvider {
|
|
890
|
+
readonly providers: IComponentProvider[];
|
|
891
|
+
constructor(providers?: IComponentProvider[]);
|
|
892
|
+
add_provider(provider: IComponentProvider): void;
|
|
893
|
+
get_component_publication(id: string): Promise<ComponentPublication>;
|
|
894
|
+
search_component_publications(filter: ComponentFilter): Promise<ComponentPublication[]>;
|
|
895
|
+
get_component_manifest(id: string): Promise<ComponentManifest>;
|
|
896
|
+
set_component_manifest(component_id: string, manifest: ComponentManifest): Promise<boolean>;
|
|
897
|
+
add_component(manifest: ComponentManifest): Promise<ComponentPublication>;
|
|
898
|
+
delete_component(component_id: string): Promise<boolean>;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
declare module '@jointhedots/core:src/providers/components/InMemComponentProvider' {
|
|
903
|
+
import { type ComponentFilter, type ComponentManifest, type ComponentPublication, type IComponentProvider, type IComponentPublisher } from '@jointhedots/core:src/components/components';
|
|
904
|
+
export class InMemComponentPublisher implements IComponentPublisher {
|
|
905
|
+
pubs: Map<string, ComponentPublication>;
|
|
906
|
+
constructor(catalog?: ComponentPublication[]);
|
|
907
|
+
get_component_publication(id: string): Promise<ComponentPublication>;
|
|
908
|
+
search_component_publications(filter: ComponentFilter): Promise<ComponentPublication[]>;
|
|
909
|
+
}
|
|
910
|
+
export class InMemComponentProvider extends InMemComponentPublisher implements IComponentProvider {
|
|
911
|
+
manifests: Map<string, ComponentManifest>;
|
|
912
|
+
add_component(manifest: ComponentManifest): Promise<ComponentPublication>;
|
|
913
|
+
delete_component(component_id: string): Promise<boolean>;
|
|
914
|
+
get_component_manifest(component_id: string): Promise<ComponentManifest>;
|
|
915
|
+
set_component_manifest(component_id: string, manifest: ComponentManifest): Promise<boolean>;
|
|
916
|
+
}
|
|
934
917
|
}
|
|
935
918
|
|
|
936
|
-
declare module '@jointhedots/core
|
|
937
|
-
import {
|
|
938
|
-
export
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
919
|
+
declare module '@jointhedots/core:src/providers/components/LocalComponentProvider' {
|
|
920
|
+
import { type IComponentProvider } from '@jointhedots/core:src/components/components';
|
|
921
|
+
export function createLocalComponentProvider(): IComponentProvider;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
declare module '@jointhedots/core:src/providers/components/NodeComponentProvider' {
|
|
925
|
+
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
declare module '@jointhedots/core:src/providers/components/StaticComponentProvider' {
|
|
929
|
+
import { type BundleManifest, type ComponentFilter, type ComponentManifest, type ComponentPublication, type IComponentProvider, type IContentProvider } from '@jointhedots/core:src/components/components';
|
|
930
|
+
import { InMemComponentPublisher } from '@jointhedots/core:src/providers/components/InMemComponentProvider';
|
|
931
|
+
export class StaticComponentProvider implements IComponentProvider {
|
|
932
|
+
readonly content_provider: IContentProvider;
|
|
933
|
+
manifest: BundleManifest;
|
|
934
|
+
catalog: InMemComponentPublisher;
|
|
935
|
+
constructor(content_provider: IContentProvider);
|
|
936
|
+
get_provider_bundle(): Promise<BundleManifest>;
|
|
937
|
+
get_component_catalog(): Promise<InMemComponentPublisher>;
|
|
938
|
+
get_component_publication(id: string): Promise<ComponentPublication>;
|
|
939
|
+
search_component_publications(filter: ComponentFilter): Promise<ComponentPublication[]>;
|
|
940
|
+
get_component_manifest(id: string): Promise<ComponentManifest>;
|
|
941
|
+
set_component_manifest(component_id: string, manifest: ComponentManifest): Promise<boolean>;
|
|
942
|
+
add_component(manifest: ComponentManifest): Promise<ComponentPublication>;
|
|
943
|
+
delete_component(component_id: string): Promise<boolean>;
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
declare module '@jointhedots/core:src/providers/resources/CommonResourceProvider' {
|
|
948
|
+
import { URI } from '@jointhedots/core:src/components/vscode-uri';
|
|
949
|
+
import { type IContentProvider, type IResourceLoader } from '@jointhedots/core:src/components/components';
|
|
950
|
+
export class CommonResourceProvider implements IResourceLoader {
|
|
951
|
+
readonly storage: IContentProvider;
|
|
952
|
+
modules_exports: Map<string, any>;
|
|
953
|
+
baseUrl: string;
|
|
954
|
+
constructor(storage: IContentProvider);
|
|
955
|
+
load_resource(ref: string): Promise<any>;
|
|
956
|
+
import_module_json(ref: string, uri: URI): Promise<any>;
|
|
957
|
+
import_module_esm(ref: string, uri: URI): Promise<any>;
|
|
947
958
|
}
|
|
948
959
|
}
|
|
949
960
|
|
|
950
|
-
declare module '@jointhedots/core
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
export
|
|
954
|
-
|
|
961
|
+
declare module '@jointhedots/core:src/providers/resources/StaticContentProvider' {
|
|
962
|
+
import { URI } from '@jointhedots/core:src/components/vscode-uri';
|
|
963
|
+
import type { IContentProvider } from '@jointhedots/core:src/components/components';
|
|
964
|
+
export class StaticContentProvider implements IContentProvider {
|
|
965
|
+
check_url_content(ref: string): Promise<string>;
|
|
966
|
+
load_url_content(ref: string): Promise<Blob>;
|
|
967
|
+
check_content(uri: URI): Promise<string>;
|
|
968
|
+
load_content(uri: URI): Promise<Blob>;
|
|
969
|
+
store_content(content: Blob, uri: URI): Promise<boolean>;
|
|
970
|
+
}
|
|
971
|
+
export function contentLocalURI(id: string, norm: string, key?: string): URI;
|
|
955
972
|
}
|
|
956
973
|
|
|
957
|
-
declare module '@jointhedots/core
|
|
958
|
-
import { type JSONSchema } from '@jointhedots/core
|
|
974
|
+
declare module '@jointhedots/core:src/schema/helpers' {
|
|
975
|
+
import { type JSONSchema } from '@jointhedots/core:src/schema/schema';
|
|
959
976
|
export const CommonTypes: {
|
|
960
|
-
boolean:
|
|
961
|
-
string:
|
|
962
|
-
number:
|
|
963
|
-
object:
|
|
964
|
-
view:
|
|
965
|
-
display:
|
|
966
|
-
function:
|
|
967
|
-
null:
|
|
968
|
-
unknown:
|
|
969
|
-
any:
|
|
977
|
+
boolean: any;
|
|
978
|
+
string: any;
|
|
979
|
+
number: any;
|
|
980
|
+
object: any;
|
|
981
|
+
view: any;
|
|
982
|
+
display: any;
|
|
983
|
+
function: any;
|
|
984
|
+
null: any;
|
|
985
|
+
unknown: any;
|
|
986
|
+
any: any;
|
|
970
987
|
};
|
|
971
988
|
export const CommonMakers: {
|
|
972
|
-
enums(base:
|
|
973
|
-
array(base:
|
|
974
|
-
record(fields: Record<string,
|
|
975
|
-
collection(items:
|
|
976
|
-
event_fn(event?:
|
|
989
|
+
enums(base: any, ...values: string[]): any;
|
|
990
|
+
array(base: any): any;
|
|
991
|
+
record(fields: Record<string, any>): any;
|
|
992
|
+
collection(items: any): any;
|
|
993
|
+
event_fn(event?: any): any;
|
|
977
994
|
};
|
|
978
995
|
export const ErrorTypes: Record<string, JSONSchema>; function getPropertyTyping(propertyName: string, schema: JSONSchema): JSONSchema; function getItemTyping(index: number, schema: JSONSchema): JSONSchema; function getValueTyping(value: any): JSONSchema; function isType(typing: JSONSchema, kind: string): boolean; function typeAsString(type: JSONSchema["type"]): string; function generateTypescript(schema: JSONSchema): string;
|
|
979
996
|
export const Schema: {
|
|
@@ -984,12 +1001,397 @@ declare module '@jointhedots/core/src/schema/helpers' {
|
|
|
984
1001
|
typeAsString: typeof typeAsString;
|
|
985
1002
|
generateTypescript: typeof generateTypescript;
|
|
986
1003
|
};
|
|
987
|
-
export {};
|
|
1004
|
+
export {};
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
declare module '@jointhedots/core:src/schema' {
|
|
1008
|
+
export * from '@jointhedots/core:src/schema/helpers';
|
|
1009
|
+
export * from '@jointhedots/core:src/schema/schema';
|
|
1010
|
+
export * from '@jointhedots/core:src/schema/zod';
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
declare module '@jointhedots/core:src/schema/schema' {
|
|
1014
|
+
import { z } from '@jointhedots/core:src/interfaces/react/zod';
|
|
1015
|
+
export const JSONSchema7TypeNameSchema: z.ZodEnum<{
|
|
1016
|
+
array: "array";
|
|
1017
|
+
boolean: "boolean";
|
|
1018
|
+
integer: "integer";
|
|
1019
|
+
null: "null";
|
|
1020
|
+
number: "number";
|
|
1021
|
+
object: "object";
|
|
1022
|
+
string: "string";
|
|
1023
|
+
}>;
|
|
1024
|
+
export const JSONSchema7TypeNameCustomSchema: z.ZodEnum<{
|
|
1025
|
+
function: "function";
|
|
1026
|
+
module: "module";
|
|
1027
|
+
service: "service";
|
|
1028
|
+
}>;
|
|
1029
|
+
export const JSONSchema7TypeSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>;
|
|
1030
|
+
export const ChapterSchema: z.ZodObject<{
|
|
1031
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1032
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1033
|
+
secondaryProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1034
|
+
patternProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1035
|
+
additionalProperties: z.ZodOptional<z.ZodBoolean>;
|
|
1036
|
+
}, z.core.$strip>;
|
|
1037
|
+
export const DocumentationSchema: z.ZodObject<{
|
|
1038
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1039
|
+
chapters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1040
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1041
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1042
|
+
secondaryProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1043
|
+
patternProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1044
|
+
additionalProperties: z.ZodOptional<z.ZodBoolean>;
|
|
1045
|
+
}, z.core.$strip>>>;
|
|
1046
|
+
additionalChapter: z.ZodOptional<z.ZodBoolean>;
|
|
1047
|
+
}, z.core.$strip>;
|
|
1048
|
+
export const BindingSchema: z.ZodObject<{
|
|
1049
|
+
source: z.ZodString;
|
|
1050
|
+
}, z.core.$strip>;
|
|
1051
|
+
export const ExpressionSchema: z.ZodObject<{
|
|
1052
|
+
type: z.ZodString;
|
|
1053
|
+
}, z.core.$loose>;
|
|
1054
|
+
export const JSONSchema7DefinitionSchema: z.ZodType<any>;
|
|
1055
|
+
export const TemplateSchema: z.ZodObject<{
|
|
1056
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1057
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1058
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1059
|
+
args: z.ZodOptional<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1060
|
+
content: z.ZodObject<{
|
|
1061
|
+
type: z.ZodString;
|
|
1062
|
+
}, z.core.$loose>;
|
|
1063
|
+
}, z.core.$strip>;
|
|
1064
|
+
export const DockingSchema: z.ZodObject<{
|
|
1065
|
+
view: z.ZodString;
|
|
1066
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1067
|
+
}, z.core.$strip>;
|
|
1068
|
+
export const SecurityRuleSchema: z.ZodObject<{
|
|
1069
|
+
check: z.ZodAny;
|
|
1070
|
+
}, z.core.$strip>;
|
|
1071
|
+
export const SecurityGuardSchema: z.ZodUnion<readonly [z.ZodLiteral<"safe">, z.ZodString, z.ZodObject<{
|
|
1072
|
+
rule: z.ZodString;
|
|
1073
|
+
}, z.core.$loose>]>;
|
|
1074
|
+
export const ResourceLinkSchema: z.ZodString;
|
|
1075
|
+
export const ResourceEntrySchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1076
|
+
type: z.ZodString;
|
|
1077
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
1078
|
+
}, z.core.$strip>]>;
|
|
1079
|
+
export const JSONSchemaStandardSchema: z.ZodObject<{
|
|
1080
|
+
$id: z.ZodOptional<z.ZodString>;
|
|
1081
|
+
$ref: z.ZodOptional<z.ZodString>;
|
|
1082
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
1083
|
+
$comment: z.ZodOptional<z.ZodString>;
|
|
1084
|
+
$defs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1085
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1086
|
+
array: "array";
|
|
1087
|
+
boolean: "boolean";
|
|
1088
|
+
integer: "integer";
|
|
1089
|
+
null: "null";
|
|
1090
|
+
number: "number";
|
|
1091
|
+
object: "object";
|
|
1092
|
+
string: "string";
|
|
1093
|
+
}>, z.ZodEnum<{
|
|
1094
|
+
function: "function";
|
|
1095
|
+
module: "module";
|
|
1096
|
+
service: "service";
|
|
1097
|
+
}>]>>;
|
|
1098
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>>;
|
|
1099
|
+
const: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
1100
|
+
multipleOf: z.ZodOptional<z.ZodNumber>;
|
|
1101
|
+
maximum: z.ZodOptional<z.ZodNumber>;
|
|
1102
|
+
exclusiveMaximum: z.ZodOptional<z.ZodNumber>;
|
|
1103
|
+
minimum: z.ZodOptional<z.ZodNumber>;
|
|
1104
|
+
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
1105
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
1106
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
1107
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1108
|
+
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>]>>;
|
|
1109
|
+
additionalItems: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1110
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1111
|
+
minItems: z.ZodOptional<z.ZodNumber>;
|
|
1112
|
+
uniqueItems: z.ZodOptional<z.ZodBoolean>;
|
|
1113
|
+
contains: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1114
|
+
maxProperties: z.ZodOptional<z.ZodNumber>;
|
|
1115
|
+
minProperties: z.ZodOptional<z.ZodNumber>;
|
|
1116
|
+
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1117
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1118
|
+
patternProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1119
|
+
additionalProperties: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1120
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodString>]>>>;
|
|
1121
|
+
propertyNames: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1122
|
+
if: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1123
|
+
then: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1124
|
+
else: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1125
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1126
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1127
|
+
oneOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1128
|
+
not: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1129
|
+
format: z.ZodOptional<z.ZodString>;
|
|
1130
|
+
contentMediaType: z.ZodOptional<z.ZodString>;
|
|
1131
|
+
contentEncoding: z.ZodOptional<z.ZodString>;
|
|
1132
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1133
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1134
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1135
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
1136
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1137
|
+
writeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1138
|
+
examples: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
1139
|
+
}, z.core.$strip>;
|
|
1140
|
+
export const JSONSchemaCustomSchema: z.ZodObject<{
|
|
1141
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1142
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1143
|
+
doc: z.ZodOptional<z.ZodObject<{
|
|
1144
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1145
|
+
chapters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1146
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1147
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1148
|
+
secondaryProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1149
|
+
patternProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1150
|
+
additionalProperties: z.ZodOptional<z.ZodBoolean>;
|
|
1151
|
+
}, z.core.$strip>>>;
|
|
1152
|
+
additionalChapter: z.ZodOptional<z.ZodBoolean>;
|
|
1153
|
+
}, z.core.$strip>>;
|
|
1154
|
+
$error: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Error, Error>]>>;
|
|
1155
|
+
args: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1156
|
+
placeholder: z.ZodOptional<z.ZodBoolean>;
|
|
1157
|
+
resources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1158
|
+
type: z.ZodString;
|
|
1159
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
1160
|
+
}, z.core.$strip>]>>>;
|
|
1161
|
+
security: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"safe">, z.ZodString, z.ZodObject<{
|
|
1162
|
+
rule: z.ZodString;
|
|
1163
|
+
}, z.core.$loose>]>>;
|
|
1164
|
+
"allow-origin": z.ZodOptional<z.ZodString>;
|
|
1165
|
+
docking: z.ZodOptional<z.ZodObject<{
|
|
1166
|
+
view: z.ZodString;
|
|
1167
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1168
|
+
}, z.core.$strip>>;
|
|
1169
|
+
templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1170
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1171
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1172
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1173
|
+
args: z.ZodOptional<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1174
|
+
content: z.ZodObject<{
|
|
1175
|
+
type: z.ZodString;
|
|
1176
|
+
}, z.core.$loose>;
|
|
1177
|
+
}, z.core.$strip>>>;
|
|
1178
|
+
binding: z.ZodOptional<z.ZodObject<{
|
|
1179
|
+
source: z.ZodString;
|
|
1180
|
+
}, z.core.$strip>>;
|
|
1181
|
+
aliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1182
|
+
}, z.core.$strip>;
|
|
1183
|
+
export const ServiceSchemaSchema: z.ZodObject<{
|
|
1184
|
+
$id: z.ZodOptional<z.ZodString>;
|
|
1185
|
+
$ref: z.ZodOptional<z.ZodString>;
|
|
1186
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
1187
|
+
$comment: z.ZodOptional<z.ZodString>;
|
|
1188
|
+
$defs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1189
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>>;
|
|
1190
|
+
const: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
1191
|
+
multipleOf: z.ZodOptional<z.ZodNumber>;
|
|
1192
|
+
maximum: z.ZodOptional<z.ZodNumber>;
|
|
1193
|
+
exclusiveMaximum: z.ZodOptional<z.ZodNumber>;
|
|
1194
|
+
minimum: z.ZodOptional<z.ZodNumber>;
|
|
1195
|
+
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
1196
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
1197
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
1198
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1199
|
+
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>]>>;
|
|
1200
|
+
additionalItems: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1201
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1202
|
+
minItems: z.ZodOptional<z.ZodNumber>;
|
|
1203
|
+
uniqueItems: z.ZodOptional<z.ZodBoolean>;
|
|
1204
|
+
contains: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1205
|
+
maxProperties: z.ZodOptional<z.ZodNumber>;
|
|
1206
|
+
minProperties: z.ZodOptional<z.ZodNumber>;
|
|
1207
|
+
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1208
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1209
|
+
patternProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1210
|
+
additionalProperties: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1211
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodString>]>>>;
|
|
1212
|
+
propertyNames: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1213
|
+
if: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1214
|
+
then: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1215
|
+
else: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1216
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1217
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1218
|
+
oneOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1219
|
+
not: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1220
|
+
format: z.ZodOptional<z.ZodString>;
|
|
1221
|
+
contentMediaType: z.ZodOptional<z.ZodString>;
|
|
1222
|
+
contentEncoding: z.ZodOptional<z.ZodString>;
|
|
1223
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1224
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1225
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
1226
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1227
|
+
writeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1228
|
+
examples: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
1229
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1230
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1231
|
+
doc: z.ZodOptional<z.ZodObject<{
|
|
1232
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1233
|
+
chapters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1234
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1235
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1236
|
+
secondaryProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1237
|
+
patternProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1238
|
+
additionalProperties: z.ZodOptional<z.ZodBoolean>;
|
|
1239
|
+
}, z.core.$strip>>>;
|
|
1240
|
+
additionalChapter: z.ZodOptional<z.ZodBoolean>;
|
|
1241
|
+
}, z.core.$strip>>;
|
|
1242
|
+
$error: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Error, Error>]>>;
|
|
1243
|
+
args: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1244
|
+
placeholder: z.ZodOptional<z.ZodBoolean>;
|
|
1245
|
+
resources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1246
|
+
type: z.ZodString;
|
|
1247
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
1248
|
+
}, z.core.$strip>]>>>;
|
|
1249
|
+
security: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"safe">, z.ZodString, z.ZodObject<{
|
|
1250
|
+
rule: z.ZodString;
|
|
1251
|
+
}, z.core.$loose>]>>;
|
|
1252
|
+
"allow-origin": z.ZodOptional<z.ZodString>;
|
|
1253
|
+
docking: z.ZodOptional<z.ZodObject<{
|
|
1254
|
+
view: z.ZodString;
|
|
1255
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1256
|
+
}, z.core.$strip>>;
|
|
1257
|
+
templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1258
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1259
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1260
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1261
|
+
args: z.ZodOptional<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1262
|
+
content: z.ZodObject<{
|
|
1263
|
+
type: z.ZodString;
|
|
1264
|
+
}, z.core.$loose>;
|
|
1265
|
+
}, z.core.$strip>>>;
|
|
1266
|
+
binding: z.ZodOptional<z.ZodObject<{
|
|
1267
|
+
source: z.ZodString;
|
|
1268
|
+
}, z.core.$strip>>;
|
|
1269
|
+
aliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1270
|
+
type: z.ZodLiteral<"service">;
|
|
1271
|
+
$spec: z.ZodString;
|
|
1272
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1273
|
+
}, z.core.$strip>;
|
|
1274
|
+
export const FunctionSchemaSchema: z.ZodObject<{
|
|
1275
|
+
$id: z.ZodOptional<z.ZodString>;
|
|
1276
|
+
$ref: z.ZodOptional<z.ZodString>;
|
|
1277
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
1278
|
+
$comment: z.ZodOptional<z.ZodString>;
|
|
1279
|
+
$defs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1280
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>>;
|
|
1281
|
+
const: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
1282
|
+
multipleOf: z.ZodOptional<z.ZodNumber>;
|
|
1283
|
+
maximum: z.ZodOptional<z.ZodNumber>;
|
|
1284
|
+
exclusiveMaximum: z.ZodOptional<z.ZodNumber>;
|
|
1285
|
+
minimum: z.ZodOptional<z.ZodNumber>;
|
|
1286
|
+
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
1287
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
1288
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
1289
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1290
|
+
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>]>>;
|
|
1291
|
+
additionalItems: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1292
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1293
|
+
minItems: z.ZodOptional<z.ZodNumber>;
|
|
1294
|
+
uniqueItems: z.ZodOptional<z.ZodBoolean>;
|
|
1295
|
+
contains: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1296
|
+
maxProperties: z.ZodOptional<z.ZodNumber>;
|
|
1297
|
+
minProperties: z.ZodOptional<z.ZodNumber>;
|
|
1298
|
+
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1299
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1300
|
+
patternProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1301
|
+
additionalProperties: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1302
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodString>]>>>;
|
|
1303
|
+
propertyNames: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1304
|
+
if: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1305
|
+
then: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1306
|
+
else: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1307
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1308
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1309
|
+
oneOf: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1310
|
+
not: z.ZodOptional<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1311
|
+
format: z.ZodOptional<z.ZodString>;
|
|
1312
|
+
contentMediaType: z.ZodOptional<z.ZodString>;
|
|
1313
|
+
contentEncoding: z.ZodOptional<z.ZodString>;
|
|
1314
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1315
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1316
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
1317
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1318
|
+
writeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1319
|
+
examples: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>;
|
|
1320
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1321
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1322
|
+
doc: z.ZodOptional<z.ZodObject<{
|
|
1323
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1324
|
+
chapters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1325
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1326
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1327
|
+
secondaryProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1328
|
+
patternProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1329
|
+
additionalProperties: z.ZodOptional<z.ZodBoolean>;
|
|
1330
|
+
}, z.core.$strip>>>;
|
|
1331
|
+
additionalChapter: z.ZodOptional<z.ZodBoolean>;
|
|
1332
|
+
}, z.core.$strip>>;
|
|
1333
|
+
$error: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Error, Error>]>>;
|
|
1334
|
+
args: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
1335
|
+
placeholder: z.ZodOptional<z.ZodBoolean>;
|
|
1336
|
+
resources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1337
|
+
type: z.ZodString;
|
|
1338
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
1339
|
+
}, z.core.$strip>]>>>;
|
|
1340
|
+
security: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"safe">, z.ZodString, z.ZodObject<{
|
|
1341
|
+
rule: z.ZodString;
|
|
1342
|
+
}, z.core.$loose>]>>;
|
|
1343
|
+
"allow-origin": z.ZodOptional<z.ZodString>;
|
|
1344
|
+
docking: z.ZodOptional<z.ZodObject<{
|
|
1345
|
+
view: z.ZodString;
|
|
1346
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1347
|
+
}, z.core.$strip>>;
|
|
1348
|
+
templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1349
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1350
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1351
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1352
|
+
args: z.ZodOptional<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
1353
|
+
content: z.ZodObject<{
|
|
1354
|
+
type: z.ZodString;
|
|
1355
|
+
}, z.core.$loose>;
|
|
1356
|
+
}, z.core.$strip>>>;
|
|
1357
|
+
binding: z.ZodOptional<z.ZodObject<{
|
|
1358
|
+
source: z.ZodString;
|
|
1359
|
+
}, z.core.$strip>>;
|
|
1360
|
+
aliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1361
|
+
type: z.ZodLiteral<"function">;
|
|
1362
|
+
input: z.ZodOptional<z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>]>>;
|
|
1363
|
+
output: z.ZodOptional<z.ZodUnion<readonly [z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>, z.ZodArray<z.ZodLazy<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>]>>;
|
|
1364
|
+
}, z.core.$strip>;
|
|
1365
|
+
export const JSONSchemaSchema: z.ZodType<any>;
|
|
1366
|
+
export type JSONSchema7TypeName = z.infer<typeof JSONSchema7TypeNameSchema>;
|
|
1367
|
+
export type JSONSchema7TypeNameCustom = z.infer<typeof JSONSchema7TypeNameCustomSchema>;
|
|
1368
|
+
export type JSONSchema7 = z.infer<typeof JSONSchema7TypeSchema>;
|
|
1369
|
+
export type JSONSchema7Definition = z.infer<typeof JSONSchema7DefinitionSchema>;
|
|
1370
|
+
export type ChapterSchema = z.infer<typeof ChapterSchema>;
|
|
1371
|
+
export type DocumentationSchema = z.infer<typeof DocumentationSchema>;
|
|
1372
|
+
export type BindingSchema = z.infer<typeof BindingSchema>;
|
|
1373
|
+
export type ExpressionSchema = z.infer<typeof ExpressionSchema>;
|
|
1374
|
+
export type TemplateSchema = z.infer<typeof TemplateSchema>;
|
|
1375
|
+
export type DockingSchema = z.infer<typeof DockingSchema>;
|
|
1376
|
+
export type SecurityRule = z.infer<typeof SecurityRuleSchema>;
|
|
1377
|
+
export type SecurityGuard = z.infer<typeof SecurityGuardSchema>;
|
|
1378
|
+
export type ResourceEntry = z.infer<typeof ResourceEntrySchema>;
|
|
1379
|
+
export type ResourceImport = {
|
|
1380
|
+
type: string;
|
|
1381
|
+
location?: string;
|
|
1382
|
+
identifier?: string;
|
|
1383
|
+
[key: string]: any;
|
|
1384
|
+
};
|
|
1385
|
+
export type JSONSchemaStandard = z.infer<typeof JSONSchemaStandardSchema>;
|
|
1386
|
+
export type JSONSchemaCustom = z.infer<typeof JSONSchemaCustomSchema>;
|
|
1387
|
+
export type ServiceSchema = z.infer<typeof ServiceSchemaSchema>;
|
|
1388
|
+
export type FunctionSchema = z.infer<typeof FunctionSchemaSchema>;
|
|
1389
|
+
export type JSONSchema = z.infer<typeof JSONSchemaSchema>;
|
|
988
1390
|
}
|
|
989
1391
|
|
|
990
|
-
declare module '@jointhedots/core
|
|
991
|
-
import { z, type ZodType } from 'zod';
|
|
992
|
-
import { type JSONSchema, type ServiceSchema } from '@jointhedots/core
|
|
1392
|
+
declare module '@jointhedots/core:src/schema/zod' {
|
|
1393
|
+
import { z, type ZodType } from '@jointhedots/core:src/interfaces/react/zod';
|
|
1394
|
+
import { type JSONSchema, type ServiceSchema } from '@jointhedots/core:src/schema/schema';
|
|
993
1395
|
export class ZodService<T = unknown> {
|
|
994
1396
|
readonly $spec: string;
|
|
995
1397
|
readonly version?: string;
|
|
@@ -1001,111 +1403,72 @@ declare module '@jointhedots/core/src/schema/zod' {
|
|
|
1001
1403
|
data: T;
|
|
1002
1404
|
error?: undefined;
|
|
1003
1405
|
} | {
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
};
|
|
1008
|
-
toJSONSchema(): ServiceSchema;
|
|
1009
|
-
static create<T = unknown>($spec: string, version?: string): ZodService<T>;
|
|
1010
|
-
}
|
|
1011
|
-
export const zService: typeof ZodService.create;
|
|
1012
|
-
export function zodToJSONSchema(schema: ZodType | ZodService): JSONSchema;
|
|
1013
|
-
export function jsonSchemaToZod(schema: JSONSchema): ZodType;
|
|
1014
|
-
export type ValidationResult<T = unknown> = {
|
|
1015
|
-
success: true;
|
|
1016
|
-
data: T;
|
|
1017
|
-
} | {
|
|
1018
|
-
success: false;
|
|
1019
|
-
errors: ValidationError[];
|
|
1020
|
-
};
|
|
1021
|
-
export type ValidationError = {
|
|
1022
|
-
path: string[];
|
|
1023
|
-
message: string;
|
|
1024
|
-
code?: string;
|
|
1025
|
-
};
|
|
1026
|
-
export function validate<T>(schema: JSONSchema | ZodType, data: unknown): ValidationResult<T>;
|
|
1027
|
-
export function validateOrThrow<T>(schema: JSONSchema | ZodType, data: unknown): T;
|
|
1028
|
-
export type TSGenOptions = {
|
|
1029
|
-
comments?: boolean;
|
|
1030
|
-
indent?: string;
|
|
1031
|
-
export?: boolean;
|
|
1032
|
-
};
|
|
1033
|
-
export function generateTypeScript(schema: JSONSchema, name: string, opts?: TSGenOptions): string;
|
|
1034
|
-
export { z };
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
declare module '@jointhedots/core
|
|
1038
|
-
export * from '@jointhedots/core
|
|
1039
|
-
export * from '@jointhedots/core
|
|
1040
|
-
export * from '@jointhedots/core
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
/**
|
|
1061
|
-
|
|
1062
|
-
/** Semantic version of the specification (e.g., "1.0.0") */
|
|
1063
|
-
version: string;
|
|
1064
|
-
/**
|
|
1065
|
-
* JSON Schema defining the service interface including:
|
|
1066
|
-
* - title, description (metadata)
|
|
1067
|
-
* - properties (hyperparameters for service specialization)
|
|
1068
|
-
* - All standard JSON Schema validation rules
|
|
1069
|
-
*/
|
|
1070
|
-
schema?: JSONSchema;
|
|
1071
|
-
/**
|
|
1072
|
-
* Zod schema for runtime validation and compile-time type inference.
|
|
1073
|
-
* Bridges runtime validation with TypeScript's static type system.
|
|
1074
|
-
*/
|
|
1075
|
-
properties?: ZodType<P>;
|
|
1076
|
-
/** Category or domain the service belongs to */
|
|
1077
|
-
category?: string;
|
|
1078
|
-
/** Tags for discovery and filtering */
|
|
1079
|
-
tags?: string[];
|
|
1080
|
-
/** Minimum compatible version for consumers */
|
|
1081
|
-
minCompatibleVersion?: string;
|
|
1082
|
-
}
|
|
1083
|
-
/**
|
|
1084
|
-
* Result of checking compatibility between consumer and provider
|
|
1085
|
-
*/
|
|
1086
|
-
export interface ServiceCompatibility {
|
|
1087
|
-
/** Whether the service is compatible */
|
|
1088
|
-
compatible: boolean;
|
|
1089
|
-
/** Reason for incompatibility if not compatible */
|
|
1090
|
-
reason?: string;
|
|
1091
|
-
/** Warnings about potential issues */
|
|
1092
|
-
warnings?: string[];
|
|
1406
|
+
data?: undefined;
|
|
1407
|
+
success: false;
|
|
1408
|
+
error: Error;
|
|
1409
|
+
};
|
|
1410
|
+
toJSONSchema(): ServiceSchema;
|
|
1411
|
+
static create<T = unknown>($spec: string, version?: string): ZodService<T>;
|
|
1412
|
+
}
|
|
1413
|
+
export const zService: typeof ZodService.create;
|
|
1414
|
+
export function zodToJSONSchema(schema: ZodType | ZodService): JSONSchema;
|
|
1415
|
+
export function jsonSchemaToZod(schema: JSONSchema): ZodType;
|
|
1416
|
+
export type ValidationResult<T = unknown> = {
|
|
1417
|
+
success: true;
|
|
1418
|
+
data: T;
|
|
1419
|
+
} | {
|
|
1420
|
+
success: false;
|
|
1421
|
+
errors: ValidationError[];
|
|
1422
|
+
};
|
|
1423
|
+
export type ValidationError = {
|
|
1424
|
+
path: string[];
|
|
1425
|
+
message: string;
|
|
1426
|
+
code?: string;
|
|
1427
|
+
};
|
|
1428
|
+
export function validate<T>(schema: JSONSchema | ZodType, data: unknown): ValidationResult<T>;
|
|
1429
|
+
export function validateOrThrow<T>(schema: JSONSchema | ZodType, data: unknown): T;
|
|
1430
|
+
export type TSGenOptions = {
|
|
1431
|
+
comments?: boolean;
|
|
1432
|
+
indent?: string;
|
|
1433
|
+
export?: boolean;
|
|
1434
|
+
};
|
|
1435
|
+
export function generateTypeScript(schema: JSONSchema, name: string, opts?: TSGenOptions): string;
|
|
1436
|
+
export { z };
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
declare module '@jointhedots/core:src/services' {
|
|
1440
|
+
export * from '@jointhedots/core:src/services/service-definitions';
|
|
1441
|
+
export * from '@jointhedots/core:src/services/service-points';
|
|
1442
|
+
export * from '@jointhedots/core:src/services/service-specification';
|
|
1443
|
+
export * from '@jointhedots/core:src/services/service-accessor';
|
|
1444
|
+
export * from '@jointhedots/core:src/services/settings';
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
declare module '@jointhedots/core:src/services/service-accessor' {
|
|
1448
|
+
import type { ComponentEntry } from '@jointhedots/core:src/components/manifold';
|
|
1449
|
+
export type ServiceType = string;
|
|
1450
|
+
export class ServiceAccessor<Instance extends any, Spec extends any> {
|
|
1451
|
+
resource: string;
|
|
1452
|
+
definition: any;
|
|
1453
|
+
private constructor();
|
|
1454
|
+
/** Synchronously retrieves the service instance from the given component entry. Returns undefined if the resource is not available. */
|
|
1455
|
+
get(entry: ComponentEntry): Instance;
|
|
1456
|
+
/** Asynchronously fetches the service instance from the given component entry, waiting until the resource becomes available. */
|
|
1457
|
+
fetch(entry: ComponentEntry): Promise<Instance>;
|
|
1458
|
+
/** Returns the specification/configuration associated with this service from the given component entry. */
|
|
1459
|
+
spec(entry: ComponentEntry): Spec;
|
|
1460
|
+
/** Creates a child service accessor scoped under this service's resource path. */
|
|
1461
|
+
subservice<T extends any>(name: string): ServiceAccessor<T, Spec>;
|
|
1462
|
+
/** Factory method that creates a new ServiceAccessor for the given resource name and optional definition. */
|
|
1463
|
+
static About<Instance extends any, Spec extends any>(resource: string, definition?: any): ServiceAccessor<Instance, Spec>;
|
|
1093
1464
|
}
|
|
1094
|
-
/**
|
|
1095
|
-
* Check if a provider version is compatible with a consumer's required version
|
|
1096
|
-
*/
|
|
1097
|
-
export function checkVersionCompatibility(requiredVersion: string, providedVersion: string, minCompatibleVersion?: string): ServiceCompatibility;
|
|
1098
|
-
/**
|
|
1099
|
-
* Create a service specification with full metadata
|
|
1100
|
-
*/
|
|
1101
|
-
export function defineServiceSpec<I = unknown, P = unknown>(spec: ServiceSpecification<I, P>): ServiceSpecification<I, P>;
|
|
1102
1465
|
}
|
|
1103
1466
|
|
|
1104
|
-
declare module '@jointhedots/core
|
|
1105
|
-
import type { ServiceSchema } from '@jointhedots/core
|
|
1106
|
-
import { ZodService } from '@jointhedots/core
|
|
1107
|
-
import type { ZodType } from 'zod';
|
|
1108
|
-
import { type ServiceSpecification, type ServiceCompatibility } from '@jointhedots/core
|
|
1467
|
+
declare module '@jointhedots/core:src/services/service-definitions' {
|
|
1468
|
+
import type { ServiceSchema } from '@jointhedots/core:src/schema/schema';
|
|
1469
|
+
import { ZodService } from '@jointhedots/core:src/schema/zod';
|
|
1470
|
+
import type { ZodType } from '@jointhedots/core:src/interfaces/react/zod';
|
|
1471
|
+
import { type ServiceSpecification, type ServiceCompatibility } from '@jointhedots/core:src/services/service-specification';
|
|
1109
1472
|
/**
|
|
1110
1473
|
* ServiceDefinition is a concrete definition linking a specification to implementation.
|
|
1111
1474
|
*
|
|
@@ -1141,42 +1504,10 @@ declare module '@jointhedots/core/src/services/service-definitions' {
|
|
|
1141
1504
|
export function matchesSpecification<I, A>(def: ServiceDefinition<I, A>, spec: ServiceSpecification<I, A>): ServiceCompatibility;
|
|
1142
1505
|
}
|
|
1143
1506
|
|
|
1144
|
-
declare module '@jointhedots/core
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
[id in SettingGroup]: Record<string, T>;
|
|
1149
|
-
};
|
|
1150
|
-
export enum WriteMode {
|
|
1151
|
-
Default = 0,
|
|
1152
|
-
Reset = 1,
|
|
1153
|
-
Temporary = 2
|
|
1154
|
-
}
|
|
1155
|
-
export class AccountSettings {
|
|
1156
|
-
readonly name: string;
|
|
1157
|
-
key: string;
|
|
1158
|
-
stores: SettingStores<string>;
|
|
1159
|
-
temporaries: SettingStores<string>;
|
|
1160
|
-
settings: SettingStores<CommonSetting>;
|
|
1161
|
-
constructor(name: string);
|
|
1162
|
-
get<T = any>(group: SettingGroup, key: string): T;
|
|
1163
|
-
set<T = any>(group: SettingGroup, key: string, descriptor: T, mode?: WriteMode): boolean;
|
|
1164
|
-
list(group: SettingGroup): string[];
|
|
1165
|
-
read(key: string): string;
|
|
1166
|
-
write(group: SettingGroup, key: string, data: string, mode: WriteMode): boolean;
|
|
1167
|
-
restore(stores: SettingStores<string>): void;
|
|
1168
|
-
}
|
|
1169
|
-
type SettingsChangeHandler = (group: SettingGroup, id: string) => void;
|
|
1170
|
-
export function getSettings(): AccountSettings;
|
|
1171
|
-
export function listenSettings(handler: SettingsChangeHandler): SettingsChangeHandler;
|
|
1172
|
-
export function unlistenSettings(handler: SettingsChangeHandler): void;
|
|
1173
|
-
export {};
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
declare module '@jointhedots/core/src/services/service-points' {
|
|
1177
|
-
import { type ComponentID } from '@jointhedots/core/src/components/components';
|
|
1178
|
-
import { type ILogDispatcher, type LogObject } from '@jointhedots/core/src/logging/index';
|
|
1179
|
-
import { ServiceAccessor, type ServiceType } from '@jointhedots/core/src/services/service-accessor';
|
|
1507
|
+
declare module '@jointhedots/core:src/services/service-points' {
|
|
1508
|
+
import { type ComponentID } from '@jointhedots/core:src/components/components';
|
|
1509
|
+
import { type ILogDispatcher, type LogObject } from '@jointhedots/core:src/logging';
|
|
1510
|
+
import { ServiceAccessor, type ServiceType } from '@jointhedots/core:src/services/service-accessor';
|
|
1180
1511
|
export const ServicePoints: Map<string, ServicePoint>;
|
|
1181
1512
|
export type ServicePointID = string;
|
|
1182
1513
|
export type ServicePointProperties = {
|
|
@@ -1216,436 +1547,114 @@ declare module '@jointhedots/core/src/services/service-points' {
|
|
|
1216
1547
|
export function createServicePoint<S extends any, D extends any>(service: ServiceAccessor<S, D>, name: ServicePointID, properties?: ServicePointProperties): ServicePoint<S>;
|
|
1217
1548
|
}
|
|
1218
1549
|
|
|
1219
|
-
declare module '@jointhedots/core
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
export * from '@jointhedots/core/src/services/service-specification';
|
|
1223
|
-
export * from '@jointhedots/core/src/services/service-accessor';
|
|
1224
|
-
export * from '@jointhedots/core/src/services/settings';
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
declare module '@jointhedots/core' {
|
|
1228
|
-
export * from '@jointhedots/core/src/common/types';
|
|
1229
|
-
export * from '@jointhedots/core/src/logging/index';
|
|
1230
|
-
export * from '@jointhedots/core/src/observable/index';
|
|
1231
|
-
export * from '@jointhedots/core/src/schema/index';
|
|
1232
|
-
export * from '@jointhedots/core/src/components/index';
|
|
1233
|
-
export * from '@jointhedots/core/src/services/index';
|
|
1234
|
-
export * from '@jointhedots/core/src/providers/resources/StaticContentProvider';
|
|
1235
|
-
export * from '@jointhedots/core/src/providers/resources/CommonResourceProvider';
|
|
1236
|
-
export * from '@jointhedots/core/src/providers/components/CombinedComponentProvider';
|
|
1237
|
-
export * from '@jointhedots/core/src/providers/components/InMemComponentProvider';
|
|
1238
|
-
export * from '@jointhedots/core/src/providers/components/StaticComponentProvider';
|
|
1239
|
-
export * from '@jointhedots/core/src/providers/components/LocalComponentProvider';
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
declare module '@jointhedots/core/src/interfaces/react/ErrorBoundary' {
|
|
1243
|
-
import React from 'react';
|
|
1244
|
-
export type ErrorDisplayerType<E extends Error = Error> = React.ComponentType<{
|
|
1245
|
-
error: E;
|
|
1246
|
-
onRetry?: () => void;
|
|
1247
|
-
}>;
|
|
1248
|
-
export function ErrorDisplayer({ error, onRetry }: {
|
|
1249
|
-
error: Error;
|
|
1250
|
-
onRetry?: () => void;
|
|
1251
|
-
}): any;
|
|
1252
|
-
interface IErrorReconcilier {
|
|
1253
|
-
getErrorDisplayer(error: Error): ErrorDisplayerType | null;
|
|
1254
|
-
} class Component<P = {}, S = {}> extends React.Component<P, S> {
|
|
1255
|
-
props: Readonly<P>;
|
|
1256
|
-
setState: React.Component<P, S>['setState'];
|
|
1257
|
-
}
|
|
1258
|
-
export class ErrorBoundary extends Component<{
|
|
1259
|
-
children: React.ReactNode;
|
|
1260
|
-
}, {
|
|
1261
|
-
error?: Error;
|
|
1262
|
-
displayer?: ErrorDisplayerType;
|
|
1263
|
-
}> {
|
|
1264
|
-
static contextType: any;
|
|
1265
|
-
context: IErrorReconcilier;
|
|
1266
|
-
state: {
|
|
1267
|
-
error?: Error;
|
|
1268
|
-
displayer?: ErrorDisplayerType;
|
|
1269
|
-
};
|
|
1270
|
-
componentDidCatch(error: Error): void;
|
|
1271
|
-
render(): any;
|
|
1272
|
-
}
|
|
1273
|
-
export function ErrorReconcilier({ errorClass, errorDisplayer, children }: {
|
|
1274
|
-
errorClass: new () => Error;
|
|
1275
|
-
errorDisplayer: ErrorDisplayerType;
|
|
1276
|
-
children: React.ReactNode;
|
|
1277
|
-
}): any;
|
|
1278
|
-
export function registerErrorDisplayer<E extends Error>(errorClass: new (...args: any[]) => E, displayer: ErrorDisplayerType<E>): void;
|
|
1279
|
-
export {};
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
declare module '@jointhedots/core/view' {
|
|
1283
|
-
import { ComponentEntry } from '@jointhedots/core/src/components/manifold';
|
|
1284
|
-
import { ServiceAccessor } from '@jointhedots/core/src/services/service-accessor';
|
|
1285
|
-
export const ViewServiceKey: ServiceAccessor<any, any>;
|
|
1286
|
-
export type ViewInfos = {
|
|
1287
|
-
name: string;
|
|
1288
|
-
params?: Record<string, ViewParam | ViewParam[] | Record<string, ViewParam>>;
|
|
1289
|
-
content?: string;
|
|
1290
|
-
nested?: ViewInfos;
|
|
1291
|
-
};
|
|
1292
|
-
export type ViewParam = string | boolean | number;
|
|
1293
|
-
export type ViewInvokable = {
|
|
1294
|
-
component: ComponentEntry;
|
|
1295
|
-
properties?: Record<string, string>;
|
|
1296
|
-
};
|
|
1297
|
-
export function getViewReferenceFrom(data: string | ViewInfos): string;
|
|
1298
|
-
export function getViewInfosFrom(data: string | ViewInfos, content?: string): ViewInfos;
|
|
1299
|
-
export function evaluateViewInfos(view: string | ViewInfos, origin?: string): Promise<ViewInvokable>;
|
|
1300
|
-
export function getViewURL(view: string | ViewInfos, inside?: string | ViewInfos): string;
|
|
1301
|
-
export function gotoURLView(view: string | ViewInfos, inside?: string | ViewInfos): void;
|
|
1302
|
-
export function updateURLView(view: string | ViewInfos): void;
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
declare module '@jointhedots/core/src/interfaces/react/useLocation' {
|
|
1306
|
-
export function useLocation(): Location;
|
|
1307
|
-
export function useLocationHash(): string;
|
|
1308
|
-
export function getLocationQuery(): Record<string, string>;
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
declare module '@jointhedots/core/src/interfaces/react/interface' {
|
|
1312
|
-
import { z, type ZodObject, type ZodRawShape } from 'zod';
|
|
1313
|
-
import { type ServiceDefinition, type ServiceInterface } from '@jointhedots/core/src/services/index';
|
|
1314
|
-
import React from 'react';
|
|
1315
|
-
export type ViewServicePoint = {
|
|
1316
|
-
service?: string;
|
|
1317
|
-
cardinality?: number;
|
|
1318
|
-
};
|
|
1319
|
-
export type ViewRequirements = {
|
|
1320
|
-
servicePoints?: Record<string, ViewServicePoint>;
|
|
1321
|
-
};
|
|
1550
|
+
declare module '@jointhedots/core:src/services/service-specification' {
|
|
1551
|
+
import type { JSONSchema } from '@jointhedots/core:src/schema/schema';
|
|
1552
|
+
import type { ZodType } from '@jointhedots/core:src/interfaces/react/zod';
|
|
1322
1553
|
/**
|
|
1323
|
-
*
|
|
1324
|
-
*
|
|
1325
|
-
* This factory function generates a service definition that can be used to register
|
|
1326
|
-
* React components within the service system. It provides type-safe props validation
|
|
1327
|
-
* using Zod schemas and supports dependency injection through service points.
|
|
1328
|
-
*
|
|
1329
|
-
* @param props - Optional Zod schema defining the component's props structure.
|
|
1330
|
-
* If not provided, defaults to a record accepting any string keys.
|
|
1331
|
-
* @returns A ServiceDefinition specialized for React view components
|
|
1332
|
-
*
|
|
1333
|
-
* @example
|
|
1334
|
-
* ```typescript
|
|
1335
|
-
* // Define a component with typed props
|
|
1336
|
-
* const UserCardSchema = ReactComponentSchema(z.object({
|
|
1337
|
-
* userId: z.string(),
|
|
1338
|
-
* showAvatar: z.boolean().optional(),
|
|
1339
|
-
* }))
|
|
1340
|
-
*
|
|
1341
|
-
* // Use in component registration
|
|
1342
|
-
* const UserCard: ReactComponentType<typeof UserCardSchema> = ({ userId, showAvatar }) => {
|
|
1343
|
-
* return <div>{userId}</div>
|
|
1344
|
-
* }
|
|
1345
|
-
* ```
|
|
1346
|
-
*
|
|
1347
|
-
* @example
|
|
1348
|
-
* ```typescript
|
|
1349
|
-
* // Define a component with service requirements
|
|
1350
|
-
* const DashboardSchema = ReactComponentSchema(z.object({
|
|
1351
|
-
* title: z.string(),
|
|
1352
|
-
* }))
|
|
1554
|
+
* ServiceSpecification defines the metadata and schema for a service interface.
|
|
1555
|
+
* It describes the contract that providers must implement and consumers can rely on.
|
|
1353
1556
|
*
|
|
1354
|
-
*
|
|
1355
|
-
*
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1557
|
+
* @template I - The TypeScript interface type this service represents
|
|
1558
|
+
* @template P - The type of properties (hyperparameters) for service specialization
|
|
1559
|
+
*/
|
|
1560
|
+
export interface ServiceSpecification<I = unknown, P = unknown> {
|
|
1561
|
+
/** Unique identifier for the service specification (URI or qualified name) */
|
|
1562
|
+
$spec: string;
|
|
1563
|
+
/** Semantic version of the specification (e.g., "1.0.0") */
|
|
1564
|
+
version: string;
|
|
1565
|
+
/**
|
|
1566
|
+
* JSON Schema defining the service interface including:
|
|
1567
|
+
* - title, description (metadata)
|
|
1568
|
+
* - properties (hyperparameters for service specialization)
|
|
1569
|
+
* - All standard JSON Schema validation rules
|
|
1570
|
+
*/
|
|
1571
|
+
schema?: JSONSchema;
|
|
1572
|
+
/**
|
|
1573
|
+
* Zod schema for runtime validation and compile-time type inference.
|
|
1574
|
+
* Bridges runtime validation with TypeScript's static type system.
|
|
1575
|
+
*/
|
|
1576
|
+
properties?: ZodType<P>;
|
|
1577
|
+
/** Category or domain the service belongs to */
|
|
1578
|
+
category?: string;
|
|
1579
|
+
/** Tags for discovery and filtering */
|
|
1580
|
+
tags?: string[];
|
|
1581
|
+
/** Minimum compatible version for consumers */
|
|
1582
|
+
minCompatibleVersion?: string;
|
|
1583
|
+
}
|
|
1584
|
+
/**
|
|
1585
|
+
* Result of checking compatibility between consumer and provider
|
|
1364
1586
|
*/
|
|
1365
|
-
export
|
|
1587
|
+
export interface ServiceCompatibility {
|
|
1588
|
+
/** Whether the service is compatible */
|
|
1589
|
+
compatible: boolean;
|
|
1590
|
+
/** Reason for incompatibility if not compatible */
|
|
1591
|
+
reason?: string;
|
|
1592
|
+
/** Warnings about potential issues */
|
|
1593
|
+
warnings?: string[];
|
|
1594
|
+
}
|
|
1366
1595
|
/**
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1369
|
-
* Components of this type receive their props through `ServiceInterface<T>`,
|
|
1370
|
-
* which provides both the declared props and access to injected services.
|
|
1371
|
-
*
|
|
1372
|
-
* @template T - The props type, typically inferred from a Zod schema
|
|
1373
|
-
*
|
|
1374
|
-
* @example
|
|
1375
|
-
* ```typescript
|
|
1376
|
-
* const MyComponent: ReactComponentType<{ name: string }> = (props) => {
|
|
1377
|
-
* return <span>Hello, {props.name}!</span>
|
|
1378
|
-
* }
|
|
1379
|
-
* ```
|
|
1596
|
+
* Check if a provider version is compatible with a consumer's required version
|
|
1380
1597
|
*/
|
|
1381
|
-
export
|
|
1598
|
+
export function checkVersionCompatibility(requiredVersion: string, providedVersion: string, minCompatibleVersion?: string): ServiceCompatibility;
|
|
1382
1599
|
/**
|
|
1383
|
-
*
|
|
1384
|
-
*
|
|
1385
|
-
* This type defines the structure for declaring component properties and
|
|
1386
|
-
* service dependencies that will be injected at runtime.
|
|
1387
|
-
*
|
|
1388
|
-
* @template T - Zod shape type for props validation
|
|
1389
|
-
*
|
|
1390
|
-
* @property props - Initial props values matching the component's schema
|
|
1391
|
-
* @property requirements - Service injection configuration
|
|
1392
|
-
* @property requirements.servicePoints - Map of named service injection points,
|
|
1393
|
-
* each specifying the service spec URI and optional cardinality
|
|
1394
|
-
*
|
|
1395
|
-
* @example
|
|
1396
|
-
* ```typescript
|
|
1397
|
-
* const descriptor: ReactComponentDescriptor<{ count: z.ZodNumber }> = {
|
|
1398
|
-
* props: { count: 0 },
|
|
1399
|
-
* requirements: {
|
|
1400
|
-
* servicePoints: {
|
|
1401
|
-
* counter: { service: "spec://counter-service", cardinality: 1 },
|
|
1402
|
-
* logger: { service: "spec://logger" },
|
|
1403
|
-
* },
|
|
1404
|
-
* },
|
|
1405
|
-
* }
|
|
1406
|
-
* ```
|
|
1600
|
+
* Create a service specification with full metadata
|
|
1407
1601
|
*/
|
|
1408
|
-
export
|
|
1409
|
-
props?: z.infer<ZodObject<T>>;
|
|
1410
|
-
requirements?: ViewRequirements;
|
|
1411
|
-
};
|
|
1412
|
-
export type ViewReactService<T = any> = React.ComponentType<T>;
|
|
1413
|
-
export const ViewReactKey: import( '@jointhedots/core').ServiceAccessor<React.ComponentType<T>, any>;
|
|
1414
|
-
export type ViewWebComponentService = new (...props: any[]) => HTMLElement;
|
|
1415
|
-
export const ViewWebComponentKey: import( '@jointhedots/core').ServiceAccessor<ViewWebComponentService, any>;
|
|
1602
|
+
export function defineServiceSpec<I = unknown, P = unknown>(spec: ServiceSpecification<I, P>): ServiceSpecification<I, P>;
|
|
1416
1603
|
}
|
|
1417
1604
|
|
|
1418
|
-
declare module '@jointhedots/core
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
export enum
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
Failed = 3
|
|
1429
|
-
}
|
|
1430
|
-
export interface IServicePointsProvider {
|
|
1431
|
-
getService<IService>(svc: ServicePoint): IService[];
|
|
1432
|
-
}
|
|
1433
|
-
export interface IServicePointsController {
|
|
1434
|
-
readonly provider: IServicePointsProvider;
|
|
1435
|
-
readonly error: MissingServiceError;
|
|
1436
|
-
readonly status: ServiceStatus;
|
|
1437
|
-
notifyChange(svc: ServicePoint): any;
|
|
1438
|
-
dispose(): any;
|
|
1439
|
-
}
|
|
1440
|
-
export interface IServicePointsSupport extends IServicePointsProvider {
|
|
1441
|
-
addController(c: IServicePointsController): any;
|
|
1442
|
-
removeController(c: IServicePointsController): any;
|
|
1605
|
+
declare module '@jointhedots/core:src/services/settings' {
|
|
1606
|
+
export type CommonSetting = Record<string, any>;
|
|
1607
|
+
export type SettingGroup = "service_points" | "components" | "shareds";
|
|
1608
|
+
export type SettingStores<T> = {
|
|
1609
|
+
[id in SettingGroup]: Record<string, T>;
|
|
1610
|
+
};
|
|
1611
|
+
export enum WriteMode {
|
|
1612
|
+
Default = 0,
|
|
1613
|
+
Reset = 1,
|
|
1614
|
+
Temporary = 2
|
|
1443
1615
|
}
|
|
1444
|
-
export class
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1616
|
+
export class AccountSettings {
|
|
1617
|
+
readonly name: string;
|
|
1618
|
+
key: string;
|
|
1619
|
+
stores: SettingStores<string>;
|
|
1620
|
+
temporaries: SettingStores<string>;
|
|
1621
|
+
settings: SettingStores<CommonSetting>;
|
|
1622
|
+
constructor(name: string);
|
|
1623
|
+
get<T = any>(group: SettingGroup, key: string): T;
|
|
1624
|
+
set<T = any>(group: SettingGroup, key: string, descriptor: T, mode?: WriteMode): boolean;
|
|
1625
|
+
list(group: SettingGroup): string[];
|
|
1626
|
+
read(key: string): string;
|
|
1627
|
+
write(group: SettingGroup, key: string, data: string, mode: WriteMode): boolean;
|
|
1628
|
+
restore(stores: SettingStores<string>): void;
|
|
1448
1629
|
}
|
|
1449
|
-
|
|
1450
|
-
export
|
|
1451
|
-
export function
|
|
1452
|
-
export function
|
|
1453
|
-
export
|
|
1454
|
-
export function useServicesController(requireds: ServicePoint[], requirements: ViewRequirements): IServicePointsController | null;
|
|
1455
|
-
export type ServiceConfiguratorComponent = React.ComponentType<{
|
|
1456
|
-
services: ServicePoint[];
|
|
1457
|
-
}>;
|
|
1458
|
-
export function UseServicePoints(props: {
|
|
1459
|
-
requireds?: ServicePoint[];
|
|
1460
|
-
requirements?: ViewRequirements;
|
|
1461
|
-
configurator: ServiceConfiguratorComponent;
|
|
1462
|
-
children: any;
|
|
1463
|
-
}): any;
|
|
1464
|
-
}
|
|
1465
|
-
|
|
1466
|
-
declare module '@jointhedots/core/src/interfaces/react/ViewUrl' {
|
|
1467
|
-
import { type ReactElement } from 'react';
|
|
1468
|
-
import { type ViewInfos } from '@jointhedots/core/view';
|
|
1469
|
-
export function useCurrentView(): any;
|
|
1470
|
-
export function InvokeView(props: {
|
|
1471
|
-
view: string | ViewInfos;
|
|
1472
|
-
origin?: string;
|
|
1473
|
-
fallback?: ReactElement;
|
|
1474
|
-
}): any;
|
|
1475
|
-
export function InvokeUrlHashView(props: {
|
|
1476
|
-
hash: string;
|
|
1477
|
-
fallback?: ReactElement;
|
|
1478
|
-
}): any;
|
|
1479
|
-
export function InvokeURLView(props: {
|
|
1480
|
-
fallback?: ReactElement;
|
|
1481
|
-
}): any;
|
|
1482
|
-
export function InvokeNestedView(props: {
|
|
1483
|
-
fallback?: ReactElement;
|
|
1484
|
-
}): any;
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
declare module '@jointhedots/core/src/interfaces/react/useAsyncMemo' {
|
|
1488
|
-
export function useAsyncMemo<T extends any>(loader: () => Promise<T>, init: T, deps: any[]): T;
|
|
1630
|
+
type SettingsChangeHandler = (group: SettingGroup, id: string) => void;
|
|
1631
|
+
export function getSettings(): AccountSettings;
|
|
1632
|
+
export function listenSettings(handler: SettingsChangeHandler): SettingsChangeHandler;
|
|
1633
|
+
export function unlistenSettings(handler: SettingsChangeHandler): void;
|
|
1634
|
+
export {};
|
|
1489
1635
|
}
|
|
1490
1636
|
|
|
1491
|
-
declare module '@jointhedots/core
|
|
1492
|
-
|
|
1493
|
-
export class AsyncState<T> {
|
|
1494
|
-
private value;
|
|
1495
|
-
private updateTimeout;
|
|
1496
|
-
private promise;
|
|
1497
|
-
private dispatch;
|
|
1498
|
-
private updateTimer;
|
|
1499
|
-
private shallUpdate;
|
|
1500
|
-
private updater;
|
|
1501
|
-
private deps;
|
|
1502
|
-
constructor(value: T, updateTimeout: number);
|
|
1503
|
-
use(updater: () => Promise<T>, deps: any[]): void;
|
|
1504
|
-
initiate(dispatch: (x: T) => void): void;
|
|
1505
|
-
private cancelAutoUpdate;
|
|
1506
|
-
private scheduleAutoUpdate;
|
|
1507
|
-
get isWaiting(): boolean;
|
|
1508
|
-
get hasState(): boolean;
|
|
1509
|
-
get autoUpdate(): number;
|
|
1510
|
-
set autoUpdate(timeout: number);
|
|
1511
|
-
set(value: T): void;
|
|
1512
|
-
get(): T;
|
|
1513
|
-
update(): void;
|
|
1514
|
-
cancel(): void;
|
|
1515
|
-
waiting(render: (data: T) => React.ReactNode): React.ReactNode;
|
|
1516
|
-
using(render: (data: T) => React.ReactNode): React.ReactNode;
|
|
1517
|
-
}
|
|
1518
|
-
export function useAsyncState<T>(updater: () => Promise<T>, deps: any[], initialState?: T, updateTime?: number): AsyncState<T>;
|
|
1519
|
-
export function waiting(render: () => React.ReactElement, ...waiteds: AsyncState<any>[]): React.ReactElement;
|
|
1520
|
-
export function using(render: () => React.ReactElement, ...waiteds: AsyncState<any>[]): React.ReactElement;
|
|
1637
|
+
declare module '@jointhedots/core' {
|
|
1638
|
+
export * from '@jointhedots/core:src';
|
|
1521
1639
|
}
|
|
1522
1640
|
|
|
1523
|
-
declare module '@jointhedots/core/
|
|
1524
|
-
|
|
1525
|
-
export function useLocalStorage<T = any>(key: string, initier: Initier<T>): [T, (x: T) => void];
|
|
1526
|
-
export {};
|
|
1641
|
+
declare module '@jointhedots/core/commands' {
|
|
1642
|
+
export * from '@jointhedots/core:src/interfaces/commands/interface';
|
|
1527
1643
|
}
|
|
1528
1644
|
|
|
1529
|
-
declare module '@jointhedots/core/
|
|
1530
|
-
|
|
1531
|
-
export function useSessionStorage<T = any>(key: string, initier: Initier<T>): [T, (x: T) => void];
|
|
1532
|
-
export {};
|
|
1645
|
+
declare module '@jointhedots/core/storage' {
|
|
1646
|
+
export * from '@jointhedots/core:src/interfaces/storage/interface';
|
|
1533
1647
|
}
|
|
1534
1648
|
|
|
1535
|
-
declare module '@jointhedots/core/
|
|
1536
|
-
export
|
|
1649
|
+
declare module '@jointhedots/core/view' {
|
|
1650
|
+
export * from '@jointhedots/core:src/interfaces/view/interface';
|
|
1537
1651
|
}
|
|
1538
1652
|
|
|
1539
1653
|
declare module '@jointhedots/core/react' {
|
|
1540
|
-
export * from '@jointhedots/core
|
|
1541
|
-
export * from '@jointhedots/core/src/interfaces/react/useAsyncMemo';
|
|
1542
|
-
export * from '@jointhedots/core/src/interfaces/react/useAsyncState';
|
|
1543
|
-
export * from '@jointhedots/core/src/interfaces/react/useServices';
|
|
1544
|
-
export * from '@jointhedots/core/src/interfaces/react/useLocation';
|
|
1545
|
-
export * from '@jointhedots/core/src/interfaces/react/useLocalStorage';
|
|
1546
|
-
export * from '@jointhedots/core/src/interfaces/react/useSessionStorage';
|
|
1547
|
-
export * from '@jointhedots/core/src/interfaces/react/useForceUpdate';
|
|
1548
|
-
export * from '@jointhedots/core/src/interfaces/react/ErrorBoundary';
|
|
1549
|
-
export * from '@jointhedots/core/src/interfaces/react/ViewUrl';
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
declare module '@jointhedots/core/src/interfaces/rest/decorators' {
|
|
1553
|
-
import type { Handler } from 'hono';
|
|
1554
|
-
export type RESTClass<T extends Object = any> = new (...args: any[]) => T;
|
|
1555
|
-
export type RESTResourceInfos = {
|
|
1556
|
-
path?: string;
|
|
1557
|
-
public?: boolean;
|
|
1558
|
-
};
|
|
1559
|
-
export type RESTMethodInfos = {
|
|
1560
|
-
public?: boolean;
|
|
1561
|
-
};
|
|
1562
|
-
export class RESTApi {
|
|
1563
|
-
readonly target: RESTClass;
|
|
1564
|
-
readonly descriptor: RESTResourceInfos;
|
|
1565
|
-
constructor(target: RESTClass, descriptor: RESTResourceInfos);
|
|
1566
|
-
setDescriptor(descriptor: RESTResourceInfos): void;
|
|
1567
|
-
getMethods(): Generator<RESTMethod, void, unknown>;
|
|
1568
|
-
create(): any;
|
|
1569
|
-
}
|
|
1570
|
-
export class RESTMethod {
|
|
1571
|
-
readonly name: string;
|
|
1572
|
-
readonly invoked: Function;
|
|
1573
|
-
readonly descriptor: RESTMethodInfos;
|
|
1574
|
-
constructor(name: string, invoked: Function, descriptor: RESTMethodInfos);
|
|
1575
|
-
}
|
|
1576
|
-
export function getRESTApis(): {
|
|
1577
|
-
Resources: Map<RESTClass<any>, RESTApi>;
|
|
1578
|
-
Methods: Map<Function, RESTMethod>;
|
|
1579
|
-
};
|
|
1580
|
-
export const REST: {
|
|
1581
|
-
Resource<T extends RESTClass>(infos?: RESTResourceInfos): (target: T) => T;
|
|
1582
|
-
Method(infos?: RESTMethodInfos): (target: Handler, context: ClassMethodDecoratorContext) => void;
|
|
1583
|
-
};
|
|
1654
|
+
export * from '@jointhedots/core:src/interfaces/react';
|
|
1584
1655
|
}
|
|
1585
1656
|
|
|
1586
|
-
declare module '@jointhedots/core/
|
|
1587
|
-
|
|
1588
|
-
export type NameSpaceId = string;
|
|
1589
|
-
export type FileKey = string;
|
|
1590
|
-
export type ChangeSetId = string;
|
|
1591
|
-
export type FilePatch = {
|
|
1592
|
-
start: number;
|
|
1593
|
-
end: number;
|
|
1594
|
-
data: string;
|
|
1595
|
-
};
|
|
1596
|
-
export type FileChange = {
|
|
1597
|
-
key: FileKey;
|
|
1598
|
-
prev_key?: FileKey;
|
|
1599
|
-
removed?: boolean;
|
|
1600
|
-
changes: FilePatch[];
|
|
1601
|
-
};
|
|
1602
|
-
export type Author = {
|
|
1603
|
-
name: string;
|
|
1604
|
-
email?: string;
|
|
1605
|
-
};
|
|
1606
|
-
export type StorageChangeInfos = {
|
|
1607
|
-
message?: string;
|
|
1608
|
-
authors?: Author[];
|
|
1609
|
-
};
|
|
1610
|
-
export type StorageChangeStatus = StorageChangeInfos & {
|
|
1611
|
-
id: ChangeSetId;
|
|
1612
|
-
from?: ChangeSetId | ChangeSetId[];
|
|
1613
|
-
emitted_at?: Date;
|
|
1614
|
-
};
|
|
1615
|
-
export type StorageChangeSet = StorageChangeStatus & {
|
|
1616
|
-
changes?: FileChange[];
|
|
1617
|
-
};
|
|
1618
|
-
export type StorageChangeLog = {
|
|
1619
|
-
changes: StorageChangeStatus[];
|
|
1620
|
-
};
|
|
1621
|
-
export type StorageStats = {
|
|
1622
|
-
file_count?: number;
|
|
1623
|
-
used_bytes?: number;
|
|
1624
|
-
limit_used_bytes?: number;
|
|
1625
|
-
limit_file_count?: number;
|
|
1626
|
-
};
|
|
1627
|
-
export type StorageTransaction = StorageChangeInfos & {
|
|
1628
|
-
files: {
|
|
1629
|
-
[key: FileKey]: {
|
|
1630
|
-
prev_key?: string;
|
|
1631
|
-
remove?: boolean;
|
|
1632
|
-
data?: Blob | string;
|
|
1633
|
-
};
|
|
1634
|
-
};
|
|
1635
|
-
};
|
|
1636
|
-
export interface StorageService {
|
|
1637
|
-
readonly location: string;
|
|
1638
|
-
list(): Promise<FileKey[]>;
|
|
1639
|
-
stats(): Promise<StorageStats>;
|
|
1640
|
-
read(key: FileKey): Promise<Blob>;
|
|
1641
|
-
write(key: FileKey, data: Blob): Promise<void>;
|
|
1642
|
-
recall(key: FileKey, at: ChangeSetId): Promise<Blob>;
|
|
1643
|
-
commit(transaction: StorageTransaction): Promise<ChangeSetId>;
|
|
1644
|
-
getChangeSet(id: ChangeSetId): Promise<StorageChangeSet>;
|
|
1645
|
-
getChangeLog(): Promise<StorageChangeLog>;
|
|
1646
|
-
getFileLog(key: FileKey): Promise<StorageChangeLog>;
|
|
1647
|
-
}
|
|
1648
|
-
export type StorageDescriptor = void;
|
|
1649
|
-
export const StorageServiceKey: ServiceAccessor<StorageService, void>;
|
|
1657
|
+
declare module '@jointhedots/core/rest' {
|
|
1658
|
+
export * from '@jointhedots/core:src/interfaces/rest/interface';
|
|
1650
1659
|
}
|
|
1651
1660
|
|