@luna-park/plugin 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1236 @@
1
+ import { _ as TVector, c as TInterfaceConstantValue, d as TSchema, f as TVoid, g as MaybePromise, h as DeepPartial, l as TLogicNode, m as CVector, o as Static, s as TInterfaceConfig, t as ELogicScope, u as TObject } from "./index-D7gCzkm1.mjs";
2
+ import { Component, ComputedRef, Directive } from "vue";
3
+ import "@sinclair/typebox";
4
+ import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
5
+ import { Cron } from "lite-cron";
6
+ import { PGliteWorker } from "@electric-sql/pglite/worker";
7
+ type TSlot = TSchema<TObject> | TSchema<TVoid>;
8
+ type StaticOfProps<T extends Record<string, TSchema>> = { [K in keyof T]: {
9
+ schema: TSchema;
10
+ value: Static<T[K]>;
11
+ }; };
12
+ type TAttributes<TProps extends Record<string, TSchema>, TInternals> = StaticOfProps<TProps> & {
13
+ internals: TInternals;
14
+ };
15
+ type TComponent<TProps extends Record<string, TSchema> = Record<string, TSchema>, TInternals = unknown> = {
16
+ build?: {
17
+ imports?: Array<{
18
+ default?: boolean;
19
+ from: string;
20
+ name: string;
21
+ }>;
22
+ name?: string;
23
+ };
24
+ component: Component;
25
+ documentation?: {
26
+ description?: string;
27
+ link?: string;
28
+ };
29
+ emits?: Record<string, TSchema> | ((attributes: TAttributes<TProps, TInternals>) => Record<string, TSchema>);
30
+ guides?: Array<string>;
31
+ icon?: IconDefinition | string;
32
+ internals?: TInternals;
33
+ llm?: string;
34
+ models?: Record<string, TSchema> | ((attributes: TAttributes<TProps, TInternals>) => Record<string, TSchema>);
35
+ name: string;
36
+ preview?: {
37
+ properties?: Partial<{ [TKey in keyof TProps]: Static<TProps[TKey]>; }>;
38
+ slots?: Record<string, string>;
39
+ style?: string;
40
+ };
41
+ properties?: TProps;
42
+ slots?: Record<string, TSlot> | ((attributes: TAttributes<TProps, TInternals>) => Record<string, TSlot>);
43
+ };
44
+ type TRouteGuard = {
45
+ build: {
46
+ generate: (config: Record<string, unknown>) => string;
47
+ imports?: Array<{
48
+ name: string;
49
+ target: string;
50
+ }>;
51
+ };
52
+ check: (params: {
53
+ config: Record<string, unknown>;
54
+ context: Record<string, unknown>;
55
+ }) => MaybePromise<void>;
56
+ config?: TSchema<TObject>;
57
+ description?: string;
58
+ id: string;
59
+ label: string;
60
+ };
61
+ type TExportNodeFunction = {
62
+ deprecated?: string;
63
+ description?: string;
64
+ instance?: TSchema;
65
+ kind?: "constructor" | "method";
66
+ name?: string;
67
+ parameters?: Array<TSchema>;
68
+ return?: TSchema;
69
+ };
70
+ type TExportNodeResult = {
71
+ components: Record<string, {
72
+ properties: Record<string, TSchema>;
73
+ slots: Record<string, TSchema>;
74
+ }>;
75
+ functions: Record<string, TExportNodeFunction>;
76
+ types: Record<string, TSchema>;
77
+ };
78
+ /**
79
+ * Runtime classes the editor registers through module augmentation, replacing the declarations below
80
+ */
81
+ interface TEditorClasses {}
82
+ type TEditorClass<TKey extends string, TFallback> = TEditorClasses extends Record<TKey, infer TClass> ? TClass : TFallback;
83
+ declare class CPathPoint {
84
+ direction: CVector;
85
+ location: CVector;
86
+ constructor({ direction, location }: {
87
+ direction: TVector;
88
+ location: TVector;
89
+ });
90
+ move(offset: TVector, config?: {
91
+ reverse: boolean;
92
+ }): CPathPoint;
93
+ }
94
+ type TPath = Array<CPathPoint>;
95
+ type CWire = TEditorClass<"CWire", CBaseWire>;
96
+ declare class CBaseWire {
97
+ id: string;
98
+ from: CAnchor;
99
+ to: CAnchor;
100
+ animate: boolean;
101
+ constructor(wire: {
102
+ id: string;
103
+ from: CAnchor;
104
+ temp?: boolean;
105
+ to: CAnchor;
106
+ });
107
+ get type(): TSchema;
108
+ get toType(): TSchema;
109
+ getPath(): TPath;
110
+ }
111
+ type TWireExport = {
112
+ from: {
113
+ key: string;
114
+ node: string;
115
+ };
116
+ to: {
117
+ key: string;
118
+ node: string;
119
+ };
120
+ };
121
+ type TWire = CWire;
122
+ declare enum EElementType {
123
+ Script = "script",
124
+ Standalone = "standalone",
125
+ Folder = "folder",
126
+ MainLogic = "main",
127
+ Logic = "logic",
128
+ Config = "config",
129
+ Text = "text",
130
+ Store = "store",
131
+ Database = "database",
132
+ Component = "component",
133
+ Route = "route",
134
+ Type = "type",
135
+ Cron = "cron",
136
+ Media = "media"
137
+ }
138
+ type TFolderArtboardView = {
139
+ name: string;
140
+ location: TVector;
141
+ properties: Record<string, unknown>;
142
+ };
143
+ type TFolderArtboard = {
144
+ location: TVector;
145
+ views: Record<string, TFolderArtboardView>;
146
+ };
147
+ interface TFolderOf<TChild> {
148
+ type: EElementType.Folder;
149
+ artboards?: Record<string, TFolderArtboard>;
150
+ children: Record<string, TChild>;
151
+ color?: string;
152
+ }
153
+ type TFolderExport = TFileBaseExport & TFolderOf<TFileExport>;
154
+ type TFolder = TFileBase & TFolderOf<TFile>;
155
+ type TFileState = {
156
+ expand?: boolean;
157
+ isEditing?: boolean;
158
+ logic?: TCanvas;
159
+ opened?: boolean;
160
+ panel?: string;
161
+ };
162
+ type TFileBaseExport = {
163
+ name: string;
164
+ state: TFileState;
165
+ };
166
+ type TFileBase = TFileBaseExport & {
167
+ id: string;
168
+ parent?: TFolder;
169
+ };
170
+ declare enum ELayoutValueType {
171
+ Variable = "variable",
172
+ Property = "property",
173
+ Attribute = "attribute",
174
+ Context = "context",
175
+ Computed = "computed",
176
+ Event = "event",
177
+ File = "file",
178
+ Model = "model",
179
+ Logic = "logic"
180
+ }
181
+ type TContextValue = {
182
+ schema: TSchema;
183
+ value: unknown;
184
+ };
185
+ type TLayoutContext = Record<string, TContextValue>;
186
+ /**
187
+ * Runtime-only reactive value (never exported)
188
+ */
189
+ type TLayoutValue = {
190
+ id: string;
191
+ type?: ELayoutValueType;
192
+ baseType?: ELayoutValueType;
193
+ child: Array<string>;
194
+ component?: TFileComponent;
195
+ context: TLayoutContext;
196
+ stackId: string;
197
+ get value(): unknown;
198
+ set value(value: unknown);
199
+ get schema(): TSchema;
200
+ get baseSchema(): TSchema;
201
+ };
202
+ declare enum EDynamicVariableType {
203
+ Constant = "constant",
204
+ Dynamic = "dynamic",
205
+ Token = "token"
206
+ }
207
+ declare enum EDynamicOperation {
208
+ Equal = "equal",
209
+ NotEqual = "not-equal",
210
+ Greater = "greater",
211
+ GreaterEqual = "greater-equal",
212
+ Less = "less",
213
+ LessEqual = "less-equal",
214
+ StartsWith = "starts-with",
215
+ EndsWith = "ends-with",
216
+ Includes = "includes",
217
+ At = "at",
218
+ Join = "join",
219
+ ToLowerCase = "to-lower-case",
220
+ ToUpperCase = "to-upper-case",
221
+ Trim = "trim",
222
+ Length = "length",
223
+ Not = "not",
224
+ And = "and",
225
+ Or = "or",
226
+ Add = "add",
227
+ Subtract = "subtract",
228
+ Multiply = "multiply",
229
+ Divide = "divide",
230
+ Modulo = "modulo",
231
+ Ternary = "ternary",
232
+ ToString = "to-string",
233
+ ToNumber = "to-number",
234
+ ToBoolean = "to-boolean",
235
+ Call = "call"
236
+ }
237
+ /**
238
+ * One operation applied to the previous value, optionally followed by a property access on its result.
239
+ */
240
+ type TDynamicVariableStep = {
241
+ access?: Array<string>;
242
+ operation: EDynamicOperation;
243
+ variables: Array<TMaybeDynamicVariableExport>;
244
+ };
245
+ /**
246
+ * Serializable data of a dynamic variable. Runtime variables extend it with methods, so they stay assignable to it.
247
+ */
248
+ type TDynamicVariableExport = {
249
+ type: EDynamicVariableType;
250
+ _dynamic: true;
251
+ access: Array<string>;
252
+ steps?: Array<TDynamicVariableStep>;
253
+ token: string;
254
+ value: unknown;
255
+ };
256
+ type TDynamicVariable = TDynamicVariableExport & {
257
+ getComputed(component: TFileComponent, options?: {
258
+ context?: TLayoutContext;
259
+ stackId?: string;
260
+ }): ComputedRef<TContextValue | TLayoutValue>;
261
+ getValue(component: TFileComponent, options?: {
262
+ base?: boolean;
263
+ context?: TLayoutContext;
264
+ stackId?: string;
265
+ }): TContextValue;
266
+ getRawValue(): unknown;
267
+ toJSON(): unknown;
268
+ };
269
+ /**
270
+ * A raw constant stored in place of a dynamic variable (constants are unwrapped on load).
271
+ * Arrays and objects may still contain dynamic variables.
272
+ */
273
+ type TRawValueExport = string | number | boolean | null | undefined | Array<TMaybeDynamicVariableExport> | {
274
+ [key: string]: TMaybeDynamicVariableExport;
275
+ };
276
+ type TRawValue = string | number | boolean | null | undefined | Array<TMaybeDynamicVariable> | {
277
+ [key: string]: TMaybeDynamicVariable;
278
+ };
279
+ type TMaybeDynamicVariableExport = TDynamicVariableExport | TRawValueExport;
280
+ type TMaybeDynamicVariable = TDynamicVariable | TRawValue;
281
+ type TValueExport = TSchema;
282
+ type TValue = {
283
+ id: string;
284
+ isEditing?: boolean;
285
+ parent?: TLogic;
286
+ schema: TSchema;
287
+ };
288
+ declare enum ELayoutElement {
289
+ input = "input",
290
+ div = "div",
291
+ media = "media",
292
+ customText = "customText",
293
+ component = "component",
294
+ package = "package",
295
+ customHtml = "customHtml",
296
+ slot = "slot",
297
+ template = "template",
298
+ variable = "variable",
299
+ link = "link"
300
+ }
301
+ declare enum ETokenType {
302
+ Class = "class",
303
+ Color = "color",
304
+ FontSize = "font-size",
305
+ FontWeight = "font-weight",
306
+ FontFamily = "font-family",
307
+ Length = "length",
308
+ Time = "time"
309
+ }
310
+ declare module "@luna-park/logicnodes" {
311
+ interface TSchemaOptions {
312
+ custom?: boolean;
313
+ displayGrid?: number;
314
+ dual?: boolean;
315
+ filter?: boolean;
316
+ flex?: boolean;
317
+ grid?: boolean;
318
+ image?: boolean;
319
+ mode?: "corner";
320
+ number?: boolean;
321
+ quad?: boolean;
322
+ ref?: boolean;
323
+ shadow?: boolean;
324
+ units?: Array<string>;
325
+ }
326
+ interface TString<T extends string = string> {
327
+ target?: string;
328
+ }
329
+ }
330
+ type TTextBlock = {
331
+ content: string;
332
+ key: string;
333
+ };
334
+ /**
335
+ * Element of a plugin component, as `plugin/<plugin id>/<component>`
336
+ */
337
+ type TPluginElement = `plugin/${string}`;
338
+ type TLayoutElementType = ELayoutElement | TPluginElement;
339
+ type TLayoutContentOf<TElement extends TLayoutElementType, TVariable, TChild> = TElement extends ELayoutElement.variable ? {
340
+ var: TVariable;
341
+ } : TElement extends ELayoutElement.component ? {
342
+ id: string;
343
+ slots: Record<string, TChild>;
344
+ } : TElement extends ELayoutElement.customText ? {
345
+ text: TTextBlock;
346
+ variables: Array<string>;
347
+ } : TElement extends ELayoutElement.customHtml ? {
348
+ html: string;
349
+ variables: Array<string>;
350
+ } : TElement extends ELayoutElement.package ? {
351
+ slots: Record<string, TChild>;
352
+ target: Array<string>;
353
+ } : TElement extends TPluginElement ? {
354
+ internals?: unknown;
355
+ slots: Record<string, TChild>;
356
+ target: string;
357
+ } : Record<string, unknown>;
358
+ /**
359
+ * Style rules by category, then by property. The `custom` category holds raw CSS properties absent from `layoutStyles`
360
+ */
361
+ type TLayoutStyleRulesExport = Record<string, Record<string, TMaybeDynamicVariableExport>>;
362
+ type TLayoutStyleRules = Record<string, Record<string, TMaybeDynamicVariable>>;
363
+ type TLayoutStylePseudo = "active" | "focus-visible" | "hover";
364
+ type TLayoutStyleState = "default" | TLayoutStylePseudo;
365
+ type TLayoutStyleStatesOf<TRules> = Partial<Record<TLayoutStyleState, TRules>>;
366
+ type TLayoutStyleStatesExport = TLayoutStyleStatesOf<TLayoutStyleRulesExport>;
367
+ type TLayoutStyleStates = TLayoutStyleStatesOf<TLayoutStyleRules>;
368
+ type TLayoutStyleOf<TStates> = {
369
+ base?: TStates;
370
+ quick?: Array<string>;
371
+ [media: `${number}`]: TStates | undefined;
372
+ };
373
+ type TLayoutStyleExport = TLayoutStyleOf<TLayoutStyleStatesExport>;
374
+ type TLayoutStyle = TLayoutStyleOf<TLayoutStyleStates>;
375
+ type TLayoutClassOf<TStyle> = {
376
+ id: string;
377
+ name: string;
378
+ style: TStyle;
379
+ };
380
+ type TLayoutClassExport = TLayoutClassOf<TLayoutStyleExport>;
381
+ type TLayoutClass = TLayoutClassOf<TLayoutStyle>;
382
+ /**
383
+ * Class applied to an element: `name` is a constant, a class token or a variable, applied while `toggle` is truthy (always when absent)
384
+ */
385
+ type TLayoutClassBindingOf<TVariable> = {
386
+ name: TVariable;
387
+ toggle?: TVariable;
388
+ };
389
+ type TLayoutEventParameterOf<TVariable> = {
390
+ schema: TSchema;
391
+ value: TVariable;
392
+ };
393
+ type TLayoutEventParameterExport = TLayoutEventParameterOf<TMaybeDynamicVariableExport>;
394
+ type TLayoutEventParameter = TLayoutEventParameterOf<TMaybeDynamicVariable>;
395
+ interface TLayoutNodeOf<TElement extends TLayoutElementType, TVariable, TChild, TStyle, TEventParameter> {
396
+ id: string;
397
+ name: string;
398
+ children: Array<TChild>;
399
+ classes: Array<TLayoutClassBindingOf<TVariable>>;
400
+ collapsed?: boolean;
401
+ content: TLayoutContentOf<TElement, TVariable, TChild>;
402
+ element: TElement;
403
+ events: Record<string, Record<string, TEventParameter>>;
404
+ models?: Record<string, Array<string>>;
405
+ plugins?: Record<string, Record<string, TVariable>>;
406
+ properties: Record<string, TVariable>;
407
+ style: TStyle;
408
+ tag?: string;
409
+ }
410
+ interface TLayoutNodeExport<TElement extends TLayoutElementType> extends TLayoutNodeOf<TElement, TMaybeDynamicVariableExport, TLayoutSchemaExport, TLayoutStyleExport, TLayoutEventParameterExport> {}
411
+ interface TLayoutNode<TElement extends TLayoutElementType> extends TLayoutNodeOf<TElement, TMaybeDynamicVariable, TLayoutSchema, TLayoutStyle, TLayoutEventParameter> {
412
+ component: TFileComponent;
413
+ parent?: TLayoutSchema;
414
+ }
415
+ type TLayoutSchemaExport<TElement extends TLayoutElementType = TLayoutElementType> = { [TInnerElement in TElement]: TLayoutNodeExport<TInnerElement>; }[TElement];
416
+ type TLayoutSchema<TElement extends TLayoutElementType = TLayoutElementType> = { [TInnerElement in TElement]: TLayoutNode<TInnerElement>; }[TElement];
417
+ declare enum EComponentType {
418
+ Component = "component",
419
+ Page = "page"
420
+ }
421
+ declare enum EComponentPreview {
422
+ Compact = "compact",
423
+ Stretch = "stretch",
424
+ Full = "full"
425
+ }
426
+ type TComponentOptions = {
427
+ type: EComponentType;
428
+ path: string;
429
+ preview: EComponentPreview;
430
+ previewBackground?: string;
431
+ previewSize?: string;
432
+ seo?: TPageSeo;
433
+ };
434
+ declare enum ESeoSource {
435
+ Static = "static",
436
+ Dynamic = "dynamic"
437
+ }
438
+ type TPageSeo = {
439
+ description?: string;
440
+ image?: string;
441
+ metadataRoute?: string;
442
+ noindex?: boolean;
443
+ sitemapRoute?: string;
444
+ source?: ESeoSource;
445
+ title?: string;
446
+ };
447
+ interface TFileComponentOf<TClass, TLayout, TLogic, TValue> {
448
+ type: EElementType.Component;
449
+ classes?: Record<string, TClass>;
450
+ collapsed?: boolean;
451
+ layout: TLayout;
452
+ logics: Record<string, TLogic>;
453
+ options: TComponentOptions;
454
+ values: {
455
+ computed: Record<string, TValue>;
456
+ events: Record<string, TValue>;
457
+ model?: TSchema;
458
+ properties: Record<string, TValue>;
459
+ variables: Record<string, TValue>;
460
+ };
461
+ }
462
+ type TFileComponentExport = TFileBaseExport & TFileComponentOf<TLayoutClassExport, TLayoutSchemaExport, TAnyLogicExport, TValueExport>;
463
+ type TFileComponent = TFileBase & TFileComponentOf<TLayoutClass, TLayoutSchema, TAnyLogic, TValue> & {
464
+ flat: Record<string, TLayoutSchema>;
465
+ };
466
+ type TFileConfigFields = {
467
+ type: EElementType.Config;
468
+ content: unknown;
469
+ display: EConfigDisplay;
470
+ schema: TSchema;
471
+ scope: ELogicScope;
472
+ };
473
+ type TFileConfigExport = TFileBaseExport & TFileConfigFields;
474
+ type TFileConfig = TFileBase & TFileConfigFields;
475
+ declare enum EConfigDisplay {
476
+ Smart = "smart",
477
+ Performance = "performance"
478
+ }
479
+ interface TFileCronOf<TLogic> {
480
+ type: EElementType.Cron;
481
+ active: boolean;
482
+ editorTrigger: boolean;
483
+ logics: Record<string, TLogic>;
484
+ time: string;
485
+ }
486
+ type TFileCronExport = TFileBaseExport & TFileCronOf<TAnyLogicExport>;
487
+ type TFileCron = TFileBase & TFileCronOf<TAnyLogic> & {
488
+ cron?: Cron;
489
+ scope: ELogicScope.Backend;
490
+ };
491
+ type TDatabaseRow = Record<string, unknown>;
492
+ type TQueryValue = string | number | boolean;
493
+ type TQueryOperation = Record<string, {
494
+ $eq?: TQueryValue;
495
+ $exists?: boolean;
496
+ $gt?: TQueryValue;
497
+ $gte?: TQueryValue;
498
+ $ilike?: string;
499
+ $in?: Array<TQueryValue>;
500
+ $like?: string;
501
+ $lt?: TQueryValue;
502
+ $lte?: TQueryValue;
503
+ $neq?: TQueryValue;
504
+ $nin?: Array<TQueryValue>;
505
+ }>;
506
+ type TQuery = TQueryOperation | {
507
+ $and?: Array<TQuery>;
508
+ $not?: TQuery;
509
+ $or?: Array<TQuery>;
510
+ };
511
+ type TQueryOptions = {
512
+ limit?: number;
513
+ offset?: number;
514
+ order?: Array<TOrder>;
515
+ };
516
+ type TOrder = {
517
+ column: string;
518
+ direction: "asc" | "desc";
519
+ };
520
+ type CDatabase = TEditorClass<"CDatabase", CBaseDatabase>;
521
+ declare class CBaseDatabase {
522
+ file: TFileDatabase;
523
+ db: PGliteWorker;
524
+ ready: boolean;
525
+ exist: boolean;
526
+ constructor(file: TFileDatabase);
527
+ init(): Promise<void>;
528
+ prepare(): Promise<void>;
529
+ findById(id: string): Promise<TDatabaseRow | undefined>;
530
+ find(filter: TDatabaseRow): Promise<Array<TDatabaseRow>>;
531
+ findWithQuery(query: TQuery, options?: TQueryOptions): Promise<Array<TDatabaseRow>>;
532
+ updateById(id: string, data: TDatabaseRow): Promise<void>;
533
+ update(filter: TDatabaseRow, data: TDatabaseRow): Promise<void>;
534
+ updateWithQuery(query: TQuery, data: TDatabaseRow): Promise<void>;
535
+ deleteById(id: string): Promise<TDatabaseRow | undefined>;
536
+ delete(filter: TDatabaseRow): Promise<TDatabaseRow | undefined>;
537
+ deleteWithQuery(query: TQuery): Promise<TDatabaseRow | undefined>;
538
+ insert(data: TDatabaseRow): Promise<TDatabaseRow | undefined>;
539
+ toRealKey(row: TDatabaseRow): TDatabaseRow;
540
+ toSchemaKey(row: TDatabaseRow): TDatabaseRow;
541
+ updateColumns(init: boolean): Promise<void>;
542
+ save(): Promise<Array<TDatabaseRow>>;
543
+ load(): Promise<void>;
544
+ reload(): Promise<void>;
545
+ getUpdate(data: TDatabaseRow): unknown;
546
+ getQueryFilter(filter: TDatabaseRow): unknown;
547
+ getQueryOptions(options?: TQueryOptions): unknown;
548
+ getQuery(query: TQuery): unknown;
549
+ getOperation(query: TQueryOperation): unknown;
550
+ }
551
+ type TFileDatabaseFields = {
552
+ type: EElementType.Database;
553
+ data: Array<TDatabaseRow>;
554
+ schema: TSchema<TObject>;
555
+ };
556
+ type TFileDatabaseExport = TFileBaseExport & TFileDatabaseFields;
557
+ type TFileDatabase = TFileBase & TFileDatabaseFields & {
558
+ db: CDatabase;
559
+ scope: ELogicScope.Backend;
560
+ };
561
+ type TFileMediaFields = {
562
+ type: EElementType.Media;
563
+ mimeType: string;
564
+ previewUrl?: string;
565
+ target: string;
566
+ };
567
+ type TFileMediaExport = TFileBaseExport & TFileMediaFields;
568
+ type TFileMedia = TFileBase & TFileMediaFields;
569
+ declare enum ERouteMethod {
570
+ Get = "get",
571
+ Post = "post",
572
+ Put = "put",
573
+ Patch = "patch",
574
+ Delete = "delete"
575
+ }
576
+ type TRouteGuardRef = {
577
+ id: string;
578
+ config: Record<string, unknown>;
579
+ };
580
+ interface TFileRouteOf<TLogic> {
581
+ type: EElementType.Route;
582
+ guards?: Array<TRouteGuardRef>;
583
+ input: {
584
+ body: TSchema;
585
+ headers: TSchema;
586
+ query: TSchema;
587
+ };
588
+ logics: Record<string, TLogic>;
589
+ method: ERouteMethod;
590
+ output: TSchema;
591
+ path: string;
592
+ }
593
+ type TFileRouteExport = TFileBaseExport & TFileRouteOf<TAnyLogicExport>;
594
+ type TFileRoute = TFileBase & TFileRouteOf<TAnyLogic> & {
595
+ scope: ELogicScope.Backend;
596
+ };
597
+ interface TFileScriptOf<TLogic> {
598
+ type: EElementType.Script;
599
+ logics: Record<string, TLogic>;
600
+ options?: {
601
+ autoReload?: boolean;
602
+ };
603
+ scope: ELogicScope;
604
+ }
605
+ type TFileScriptExport = TFileBaseExport & TFileScriptOf<TAnyLogicExport>;
606
+ type TFileScript = TFileBase & TFileScriptOf<TAnyLogic>;
607
+ declare enum EStoreType {
608
+ Memory = "memory",
609
+ Session = "session",
610
+ Local = "local"
611
+ }
612
+ type TStoreOptions = {
613
+ type: EStoreType;
614
+ };
615
+ interface TFileStoreOf<TLogic> {
616
+ type: EElementType.Store;
617
+ default: unknown;
618
+ logics: Record<string, TLogic>;
619
+ options: TStoreOptions;
620
+ schema: TSchema;
621
+ }
622
+ type TFileStoreExport = TFileBaseExport & TFileStoreOf<TLogicExport>;
623
+ type TFileStore = TFileBase & TFileStoreOf<TLogic> & {
624
+ proxy: TSchema;
625
+ scope: ELogicScope.Frontend;
626
+ value: Record<string, unknown>;
627
+ };
628
+ type TFileTextFields = {
629
+ type: EElementType.Text;
630
+ blocks: Array<TTextBlock>;
631
+ };
632
+ type TFileTextExport = TFileBaseExport & TFileTextFields;
633
+ type TFileText = TFileBase & TFileTextFields & {
634
+ scope: ELogicScope.Frontend;
635
+ };
636
+ type TFileTypeFields = {
637
+ type: EElementType.Type;
638
+ schemas: Record<string, TSchema>;
639
+ };
640
+ type TFileTypeExport = TFileBaseExport & TFileTypeFields;
641
+ type TFileType = TFileBase & TFileTypeFields & {
642
+ scope: ELogicScope.Shared;
643
+ };
644
+ interface TApplicationOf<TTree> {
645
+ name: string;
646
+ config: TApplicationConfig;
647
+ tree: TTree;
648
+ version: number;
649
+ }
650
+ type TApplicationExport = TApplicationOf<TFolderExport>;
651
+ type TApplication = TApplicationOf<TFolder>;
652
+ declare enum EHistoryMode {
653
+ Hash = "hash",
654
+ Web = "web",
655
+ Memory = "memory"
656
+ }
657
+ declare enum EResponsiveStrategy {
658
+ DesktopFirst = "desktop-first",
659
+ MobileFirst = "mobile-first"
660
+ }
661
+ declare enum EFileSortStrategy {
662
+ Name = "name",
663
+ Type = "type"
664
+ }
665
+ type TApplicationToken = {
666
+ id: string;
667
+ name: string;
668
+ value: string;
669
+ };
670
+ declare enum EColorTokenRole {
671
+ Background = "background",
672
+ Content = "content"
673
+ }
674
+ type TApplicationColorToken = TApplicationToken & {
675
+ role?: EColorTokenRole;
676
+ };
677
+ type TApplicationFontToken = TApplicationToken & {
678
+ cdn?: string;
679
+ default?: boolean;
680
+ italic?: boolean;
681
+ weights?: Array<number>;
682
+ };
683
+ type TApplicationTokens = {
684
+ colors: Array<TApplicationColorToken>;
685
+ fonts: Array<TApplicationFontToken>;
686
+ lengths: Array<TApplicationToken>;
687
+ };
688
+ type TApplicationConfig = {
689
+ backend: {
690
+ salt: string;
691
+ };
692
+ description?: string;
693
+ desktop: {
694
+ appleTeamId?: string;
695
+ backendUrl?: string;
696
+ fullscreen: boolean;
697
+ height: number;
698
+ identifier?: string;
699
+ resizable: boolean;
700
+ version: string;
701
+ width: number;
702
+ };
703
+ libraries: Record<string, boolean>;
704
+ packages: Record<string, {
705
+ name: string;
706
+ components: TExportNodeResult["components"];
707
+ description?: string;
708
+ functions: TExportNodeResult["functions"];
709
+ types: TExportNodeResult["types"];
710
+ }>;
711
+ palette: {
712
+ inject: {
713
+ css: string;
714
+ head: string;
715
+ html: string;
716
+ js: string;
717
+ };
718
+ tokens: TApplicationTokens;
719
+ };
720
+ plugins: Record<string, {
721
+ config?: unknown;
722
+ internals?: unknown;
723
+ target: string;
724
+ }>;
725
+ state: {
726
+ currentTab: string;
727
+ deployAppId?: string;
728
+ deployServerId?: string;
729
+ explorerSort?: EFileSortStrategy;
730
+ tabs: Array<string>;
731
+ };
732
+ style: {
733
+ strategy: EResponsiveStrategy;
734
+ };
735
+ web: {
736
+ favicon?: TApplicationFavicon;
737
+ history: EHistoryMode;
738
+ pwa: boolean;
739
+ pwaConfig?: TApplicationPwaConfig;
740
+ seo?: TApplicationSeoConfig;
741
+ };
742
+ };
743
+ type TApplicationFavicon = string | Pick<TDynamicVariableExport, "_dynamic" | "access" | "type">;
744
+ type TApplicationSeoConfig = {
745
+ description: string;
746
+ image: string;
747
+ language: string;
748
+ noindex: boolean;
749
+ siteUrl: string;
750
+ titleTemplate: string;
751
+ };
752
+ declare enum EPwaDisplay {
753
+ Standalone = "standalone",
754
+ Fullscreen = "fullscreen",
755
+ MinimalUi = "minimal-ui",
756
+ Browser = "browser"
757
+ }
758
+ declare enum EPwaOrientation {
759
+ Any = "any",
760
+ Portrait = "portrait",
761
+ Landscape = "landscape"
762
+ }
763
+ type TApplicationPwaConfig = {
764
+ backgroundColor: string;
765
+ description: string;
766
+ display: EPwaDisplay;
767
+ icon: string;
768
+ orientation: EPwaOrientation;
769
+ shortName: string;
770
+ themeColor: string;
771
+ };
772
+ type TFileExport = TFolderExport | TFileComponentExport | TFileConfigExport | TFileCronExport | TFileDatabaseExport | TFileRouteExport | TFileScriptExport | TFileStoreExport | TFileTextExport | TFileTypeExport | TFileMediaExport;
773
+ type TFile = TFolder | TFileComponent | TFileConfig | TFileCron | TFileDatabase | TFileRoute | TFileScript | TFileStore | TFileText | TFileType | TFileMedia;
774
+ declare enum ELogicMode {
775
+ Pure = "pure",
776
+ Macro = "macro",
777
+ Code = "code"
778
+ }
779
+ type TCanvas = {
780
+ location: TVector;
781
+ zoom: number;
782
+ };
783
+ interface TGraphOf<TNode, TWire> {
784
+ autoplace?: boolean;
785
+ canvas: TCanvas;
786
+ nodes: Record<string, TNode>;
787
+ wires: Record<string, TWire>;
788
+ }
789
+ type TGraphExport = TGraphOf<TNodeExport, TWireExport>;
790
+ type TGraph = TGraphOf<TNode, TWire>;
791
+ type TAnchorExport = TSchema;
792
+ type TAnchor = {
793
+ id: string;
794
+ parent?: TLogic;
795
+ schema: TSchema;
796
+ };
797
+ interface TLogicBaseOf<TGraph, TValue> {
798
+ name: string;
799
+ graph: TGraph;
800
+ values: {
801
+ variables: Record<string, TValue>;
802
+ };
803
+ }
804
+ type TLogicRuntimeFields = {
805
+ id: string;
806
+ db: Record<string, TLogicNode>;
807
+ isEditing?: boolean;
808
+ parent: TFile;
809
+ };
810
+ interface TLogicOf<TGraph, TValue, TAnchor> extends TLogicBaseOf<TGraph, TValue> {
811
+ type: EElementType.Logic | EElementType.Standalone;
812
+ async: boolean;
813
+ code?: string;
814
+ description?: string;
815
+ export: boolean;
816
+ hue?: number;
817
+ icon?: string;
818
+ inputs: Record<string, TAnchor>;
819
+ mode: ELogicMode;
820
+ outputs: Record<string, TAnchor>;
821
+ packages?: Array<string>;
822
+ }
823
+ type TLogicExport = TLogicOf<TGraphExport, TValueExport, TAnchorExport>;
824
+ type TLogic = TLogicOf<TGraph, TValue, TAnchor> & TLogicRuntimeFields;
825
+ interface TLogicMainOf<TGraph, TValue> extends TLogicBaseOf<TGraph, TValue> {
826
+ name: "Main";
827
+ type: EElementType.MainLogic;
828
+ }
829
+ type TLogicMainExport = TLogicMainOf<TGraphExport, TValueExport>;
830
+ type TLogicMain = TLogicMainOf<TGraph, TValue> & TLogicRuntimeFields & {
831
+ id: "main";
832
+ };
833
+ type TAnyLogicExport = TLogicExport | TLogicMainExport;
834
+ type TAnyLogic = TLogic | TLogicMain;
835
+ type TStackParent = {
836
+ logic?: TLogic;
837
+ node?: CNode;
838
+ stack: TStack;
839
+ };
840
+ type TStack = {
841
+ id: string;
842
+ config?: Record<string, unknown>;
843
+ context: object;
844
+ parent?: TStackParent;
845
+ variables: Record<string, unknown>;
846
+ };
847
+ type TBaseNode = {
848
+ id: string;
849
+ data?: object;
850
+ dbNode: TGeneratedNode;
851
+ inputs: Record<string, CNodeAnchor>;
852
+ location: TVector;
853
+ outputs: Record<string, CNodeAnchor>;
854
+ };
855
+ /**
856
+ * Proxy bound to a stack, exposing the node inputs, outputs and context by key
857
+ */
858
+ type TNodeProxy = {
859
+ [key: string]: unknown;
860
+ with(stack?: TStack): TNodeProxy;
861
+ };
862
+ type TGeneratedNode<TLogic extends TLogicNode = TLogicNode> = TLogic & {
863
+ node?: CNode;
864
+ origin: TLogic;
865
+ proxy: TNodeProxy;
866
+ };
867
+ type TNodeData = {
868
+ color?: string;
869
+ config: Record<string, unknown>;
870
+ customTypes: Record<string, Partial<TSchema>>;
871
+ hideUnusedPins?: boolean;
872
+ manual?: Record<string, unknown>;
873
+ multiple?: {
874
+ isArray?: boolean;
875
+ number: number;
876
+ };
877
+ note?: string;
878
+ optionals: Record<string, boolean>;
879
+ size?: Partial<TVector>;
880
+ } & Record<string, unknown>;
881
+ type CNode = TEditorClass<"CNode", CBaseNode>;
882
+ declare class CBaseNode {
883
+ id: string;
884
+ dbNode: TGeneratedNode;
885
+ element?: HTMLElement;
886
+ invert: boolean;
887
+ parent?: TAnyLogic;
888
+ config: {
889
+ animate: boolean;
890
+ processing: boolean;
891
+ };
892
+ inputs: Record<string, CNodeAnchor>;
893
+ outputs: Record<string, CNodeAnchor>;
894
+ cache: {
895
+ location?: CVector;
896
+ relativeLocation?: CVector;
897
+ reloadKey: number;
898
+ size?: CVector;
899
+ };
900
+ _data: TNodeData;
901
+ constructor(node: TBaseNode);
902
+ get orderedInputs(): Array<CNodeAnchor>;
903
+ get orderedOutputs(): Array<CNodeAnchor>;
904
+ set location(location: TVector);
905
+ get location(): TVector;
906
+ reload(): void;
907
+ getSafeInputs(): Record<string, CNodeAnchor>;
908
+ getSafeOutputs(): Record<string, CNodeAnchor>;
909
+ set data(data: Record<string, unknown>);
910
+ get data(): TNodeData;
911
+ reset(): void;
912
+ dispose(): void;
913
+ setLocation(location: TVector): CNode;
914
+ getAnchorLocation(anchor: CNodeAnchor): CVector;
915
+ getRelativeAnchorLocation(anchor: CNodeAnchor): CVector;
916
+ getRelativeAnchorLocation_internal(anchor: CNodeAnchor): CVector;
917
+ getLocation(): CVector;
918
+ getHeaderHeight(): number;
919
+ getSize(): TVector;
920
+ execute(outputKey: string, stack?: TStack): MaybePromise<void>;
921
+ get isAsync(): boolean;
922
+ getInput(inputKey: string, stack?: TStack): unknown;
923
+ setOutput(outputKey: string, value: unknown, stack?: TStack): void;
924
+ }
925
+ type TNodeExport = {
926
+ data?: Record<string, unknown>;
927
+ internal?: {
928
+ inputs?: Record<string, unknown>;
929
+ outputs?: Record<string, unknown>;
930
+ };
931
+ location: TVector;
932
+ logic: string;
933
+ };
934
+ type TNode = CNode;
935
+ type TDBAnchor = {
936
+ id?: string;
937
+ schema: TSchema;
938
+ };
939
+ declare enum EAnchorDirection {
940
+ Input = "input",
941
+ Output = "output",
942
+ None = "none"
943
+ }
944
+ type CAnchor = TEditorClass<"CAnchor", CBaseAnchor>;
945
+ type CNodeAnchor = TEditorClass<"CNodeAnchor", CBaseNodeAnchor>;
946
+ declare class CBaseAnchor {
947
+ connections: Array<CWire>;
948
+ dbAnchor: TDBAnchor;
949
+ padding?: number;
950
+ protected constructor(anchor: {
951
+ connections?: Array<CWire>;
952
+ dbAnchor: TDBAnchor;
953
+ padding?: number;
954
+ });
955
+ getLocation(): TVector;
956
+ getPadding(): number;
957
+ get schema(): TSchema;
958
+ get schemaRaw(): TSchema;
959
+ get toSchema(): TSchema;
960
+ }
961
+ declare class CBaseNodeAnchor extends CBaseAnchor {
962
+ key: string;
963
+ index: number;
964
+ node: CNode;
965
+ direction: EAnchorDirection;
966
+ value: unknown;
967
+ element?: HTMLElement;
968
+ cache: {
969
+ preview?: unknown;
970
+ relativeLocation?: CVector;
971
+ };
972
+ constructor(anchor: {
973
+ connections?: Array<CWire>;
974
+ dbAnchor: TDBAnchor;
975
+ direction: EAnchorDirection;
976
+ element?: HTMLElement;
977
+ index: number;
978
+ key: string;
979
+ node: CNode;
980
+ padding?: number;
981
+ });
982
+ get schema(): TSchema;
983
+ get toSchema(): TSchema;
984
+ get schemaRaw(): TSchema;
985
+ getLocation(): CVector;
986
+ getRelativeLocation(): CVector;
987
+ resetCache(): void;
988
+ getPadding(): number;
989
+ isDisabled(): boolean;
990
+ errorMessage(): string | undefined;
991
+ setValue(value: string | number | boolean): void;
992
+ resetValue(): void;
993
+ }
994
+ declare enum EDBOperation {
995
+ And = "and",
996
+ Or = "or"
997
+ }
998
+ type TDBOperation = {
999
+ type: EDBOperation;
1000
+ conditions: Array<TDBCondition | TDBOperation>;
1001
+ };
1002
+ declare enum EDBCondition {
1003
+ Equals = "equals",
1004
+ NotEquals = "notEquals",
1005
+ GreaterThan = "greaterThan",
1006
+ LessThan = "lessThan",
1007
+ GreaterThanOrEquals = "greaterThanOrEquals",
1008
+ LessThanOrEquals = "lessThanOrEquals",
1009
+ In = "in",
1010
+ IsNull = "isNull",
1011
+ NotNull = "notNull",
1012
+ Like = "like",
1013
+ ILike = "ilike",
1014
+ Contains = "contains"
1015
+ }
1016
+ type TDBCondition = {
1017
+ operation: EDBCondition;
1018
+ source: Array<string>;
1019
+ } & ({
1020
+ type: "value";
1021
+ target: unknown;
1022
+ } | {
1023
+ type: "column";
1024
+ target: Array<string>;
1025
+ });
1026
+ declare function getPluginSecretEnvName(pluginId: string, name: string): string;
1027
+ declare enum EPluginHooks {
1028
+ BackendMiddleware = "backend/middleware",
1029
+ BackendInputNode = "backend/input-node",
1030
+ DatabaseScope = "database/scope",
1031
+ DatabaseChange = "database/change"
1032
+ }
1033
+ type THookParams = {
1034
+ [EPluginHooks.DatabaseScope]: {
1035
+ addConditions: (conditions: Array<TDBCondition | TDBOperation>) => void;
1036
+ table: string;
1037
+ };
1038
+ [EPluginHooks.DatabaseChange]: {
1039
+ operation: "insert" | "update" | "delete";
1040
+ rows: Array<Record<string, unknown>>;
1041
+ table: string;
1042
+ };
1043
+ [EPluginHooks.BackendMiddleware]: {
1044
+ cookies: Record<string, {
1045
+ options?: Record<string, unknown>;
1046
+ value: string;
1047
+ }>;
1048
+ setContextVar: (key: string, value: unknown) => void;
1049
+ };
1050
+ [EPluginHooks.BackendInputNode]: {
1051
+ addInput: (key: string, schema: TSchema) => void;
1052
+ };
1053
+ };
1054
+ type TInterface = TInterfaceConfig<Component> & {
1055
+ arguments?: Array<TSchema>;
1056
+ description?: string;
1057
+ methods?: Array<{
1058
+ name: string;
1059
+ parameters?: Array<TSchema>;
1060
+ return: TSchema;
1061
+ }>;
1062
+ };
1063
+ type TInterfaceEditorProps = {
1064
+ anchor?: boolean;
1065
+ modelValue?: TInterfaceConstantValue;
1066
+ placeholder?: string;
1067
+ schema: TSchema;
1068
+ };
1069
+ type TElementPanelAction = {
1070
+ icon: IconDefinition;
1071
+ onClick: (params: {
1072
+ getElements: () => Array<HTMLElement>;
1073
+ schema: TLayoutSchema;
1074
+ }) => void;
1075
+ title: string;
1076
+ };
1077
+ type TElementPanel = {
1078
+ actions?: Array<TElementPanelAction>;
1079
+ component?: Component;
1080
+ directive?: {
1081
+ build: {
1082
+ from: string;
1083
+ name: `v${string}`;
1084
+ };
1085
+ value: Directive;
1086
+ };
1087
+ filter?: (schema: TLayoutSchema) => boolean;
1088
+ icon?: IconDefinition;
1089
+ id: string;
1090
+ label: string;
1091
+ properties?: Record<string, TSchema>;
1092
+ };
1093
+ type TElementPanelProps<TValues = Record<string, unknown>> = {
1094
+ getElements: () => Array<HTMLElement>;
1095
+ modelValue: TValues;
1096
+ schema: TLayoutSchema;
1097
+ };
1098
+ type TPanels = {
1099
+ element?: Array<TElementPanel>;
1100
+ };
1101
+ type TTemplate = {
1102
+ name: string;
1103
+ preview?: string;
1104
+ template: TFileExport;
1105
+ };
1106
+ type TToken = {
1107
+ id: string;
1108
+ name?: string;
1109
+ type: ETokenType;
1110
+ value: string;
1111
+ };
1112
+ declare enum EInjectionKey {
1113
+ ViteImport = "viteImport",
1114
+ VitePlugin = "vitePlugin",
1115
+ AppImport = "appImport",
1116
+ AppBody = "appBody",
1117
+ AppSetup = "appSetup",
1118
+ Style = "style",
1119
+ ServerImport = "serverImport",
1120
+ ServerBody = "serverBody"
1121
+ }
1122
+ type TBasePlugin<TConfig extends TSchema = TSchema, TInternals = unknown> = {
1123
+ api?: TOption<TEnv<TConfig, TInternals>, unknown>;
1124
+ build?: {
1125
+ backImports?: Array<{
1126
+ name: string;
1127
+ version?: string;
1128
+ }>;
1129
+ env?: Record<string, string>;
1130
+ frontImports?: Array<{
1131
+ name: string;
1132
+ version?: string;
1133
+ }>;
1134
+ injections?: Partial<Record<EInjectionKey, string>>;
1135
+ };
1136
+ color?: string;
1137
+ config?: TConfig;
1138
+ dependencies?: Array<{
1139
+ id: string;
1140
+ name: string;
1141
+ target: string;
1142
+ }>;
1143
+ description?: string;
1144
+ editor?: {
1145
+ components?: Array<TComponent>;
1146
+ guards?: Array<TRouteGuard>;
1147
+ inputs?: Record<string, Component>;
1148
+ interfaces?: Array<TInterface>;
1149
+ nodes?: Array<TLogicNode>;
1150
+ panel?: TPanels;
1151
+ templates?: Array<TTemplate>;
1152
+ tokens?: Array<TToken>;
1153
+ wrapper?: TComponent & {
1154
+ attributes?: Record<string, unknown>;
1155
+ };
1156
+ };
1157
+ guides?: Record<string, TPluginGuide>;
1158
+ hooks?: { [THook in EPluginHooks]?: (params: THookParams[THook]) => MaybePromise<void>; };
1159
+ icon: string;
1160
+ id: string;
1161
+ inject?: {
1162
+ css?: string;
1163
+ js?: string;
1164
+ };
1165
+ interface?: Component;
1166
+ internals?: TInternals;
1167
+ lifecycle?: {
1168
+ mount?: (env: TEnv<TConfig, TInternals>) => Promise<void> | void;
1169
+ unmount?: (env: TEnv<TConfig, TInternals>) => Promise<void> | void;
1170
+ update?: (env: TEnv<TConfig, TInternals>) => Promise<void> | void;
1171
+ };
1172
+ llm?: string;
1173
+ name: string;
1174
+ windows?: Record<string, Component>;
1175
+ workspace?: {
1176
+ openOnClick?: boolean;
1177
+ preview?: Component;
1178
+ sections?: Array<TPluginWorkspaceSection>;
1179
+ };
1180
+ };
1181
+ type TPluginGuide = {
1182
+ content: string;
1183
+ description: string;
1184
+ };
1185
+ type TPluginWorkspaceSection = {
1186
+ component: Component;
1187
+ description?: string;
1188
+ icon: IconDefinition | string;
1189
+ id: string;
1190
+ title: string;
1191
+ };
1192
+ type TPlugin<TConfig extends TSchema = TSchema, TInternal = unknown, TBase extends TBasePlugin<TConfig, TInternal> = TBasePlugin<TConfig, TInternal>> = Omit<TBase, "build" | "editor" | "inject"> & { [TCategory in "build" | "editor" | "inject"]?: { [TKey in keyof NonNullable<TBase[TCategory]>]: TOption<TEnv<TConfig, TInternal>, NonNullable<TBase[TCategory]>[TKey]>; }; };
1193
+ type TProxyPlugin<TConfig extends TSchema = TSchema, TInternal = unknown, TBase extends TBasePlugin<TConfig, TInternal> = TBasePlugin<TConfig, TInternal>> = Omit<TBase, "build" | "editor" | "inject"> & { [TCategory in "build" | "editor" | "inject"]?: { [TKey in keyof NonNullable<TBase[TCategory]>]: Promise<NonNullable<TBase[TCategory]>[TKey]>; }; };
1194
+ type TEnv<TConfig extends TSchema = TSchema, TInternals = unknown> = {
1195
+ addFile: (file: DeepPartial<TFileExport> & {
1196
+ type: EElementType;
1197
+ }, parentId?: string) => TFile;
1198
+ app: TApplication | TApplicationExport;
1199
+ backend: {
1200
+ cookies: Record<string, {
1201
+ options?: Record<string, unknown>;
1202
+ value: string;
1203
+ }>;
1204
+ onCommit: (callback: () => Promise<void> | void) => Promise<void>;
1205
+ onRollback: (callback: () => Promise<void> | void) => void;
1206
+ };
1207
+ config: Static<TConfig>;
1208
+ getFile: (id: string) => TFile | undefined;
1209
+ getPlugin: <TApi = unknown>(id: string) => Promise<TApi | undefined>;
1210
+ host?: THost;
1211
+ internals: TInternals;
1212
+ log: (message: string, severity?: "info" | "warning" | "error") => void;
1213
+ mode: "build" | "editor";
1214
+ secrets?: TSecrets;
1215
+ };
1216
+ type THost = {
1217
+ readonly available: boolean;
1218
+ authorize: (buildUrl: (callback: string) => string, options?: {
1219
+ signal?: AbortSignal;
1220
+ timeout?: number;
1221
+ }) => Promise<URLSearchParams>;
1222
+ fetch: typeof fetch;
1223
+ readFile: (path: string) => Promise<Uint8Array | undefined>;
1224
+ removeFile: (path: string) => Promise<void>;
1225
+ writeFile: (path: string, data: Uint8Array) => Promise<void>;
1226
+ };
1227
+ type TSecrets = {
1228
+ readonly available: boolean;
1229
+ get: (name: string) => Promise<string | undefined>;
1230
+ list: () => Promise<Array<string>>;
1231
+ remove: (name: string) => Promise<void>;
1232
+ set: (name: string, value: string) => Promise<void>;
1233
+ readonly values: Record<string, string>;
1234
+ };
1235
+ type TOption<TParams = unknown, TResult = unknown> = TResult | ((env: TParams) => Promise<TResult> | TResult);
1236
+ export { TFolder as $, TDBOperation as A, TFileExport as B, EElementType as C, TApplication as D, TAnyLogicExport as E, TFileConfigExport as F, TFileScript as G, TFileMediaExport as H, TFileCron as I, TFileStoreExport as J, TFileScriptExport as K, TFileCronExport as L, TFileComponent as M, TFileComponentExport as N, TApplicationExport as O, TFileConfig as P, TFileTypeExport as Q, TFileDatabase as R, EDBOperation as S, TAnyLogic as T, TFileRoute as U, TFileMedia as V, TFileRouteExport as W, TFileTextExport as X, TFileText as Y, TFileType as Z, TInterface as _, TOption as a, TLogicMain as at, THookParams as b, TPluginWorkspaceSection as c, getPluginSecretEnvName as ct, TToken as d, TSlot as dt, TFolderExport as et, TTemplate as f, TPanels as g, TElementPanelProps as h, THost as i, TLogicExport as it, TFile as j, TDBCondition as k, TProxyPlugin as l, TRouteGuard as lt, TElementPanelAction as m, TBasePlugin as n, TLayoutSchemaExport as nt, TPlugin as o, TLogicMainExport as ot, TElementPanel as p, TFileStore as q, TEnv as r, TLogic as rt, TPluginGuide as s, TPluginElement as st, EInjectionKey as t, TLayoutSchema as tt, TSecrets as u, TComponent as ut, TInterfaceEditorProps as v, ETokenType as w, EDBCondition as x, EPluginHooks as y, TFileDatabaseExport as z };