@webda/core 2.4.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/application.d.ts +171 -34
- package/lib/application.js +243 -47
- package/lib/application.js.map +1 -1
- package/lib/application.spec.js +44 -8
- package/lib/application.spec.js.map +1 -1
- package/lib/core.d.ts +113 -54
- package/lib/core.js +222 -135
- package/lib/core.js.map +1 -1
- package/lib/core.spec.js +87 -43
- package/lib/core.spec.js.map +1 -1
- package/lib/errors.d.ts +65 -0
- package/lib/errors.js +113 -0
- package/lib/errors.js.map +1 -0
- package/lib/errors.spec.d.ts +1 -0
- package/lib/errors.spec.js +33 -0
- package/lib/errors.spec.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/models/aclmodel.d.ts +4 -4
- package/lib/models/aclmodel.js +10 -6
- package/lib/models/aclmodel.js.map +1 -1
- package/lib/models/aclmodel.spec.js +33 -24
- package/lib/models/aclmodel.spec.js.map +1 -1
- package/lib/models/coremodel.d.ts +284 -92
- package/lib/models/coremodel.js +403 -103
- package/lib/models/coremodel.js.map +1 -1
- package/lib/models/coremodel.spec.js +162 -24
- package/lib/models/coremodel.spec.js.map +1 -1
- package/lib/models/ident.d.ts +20 -6
- package/lib/models/ident.js.map +1 -1
- package/lib/models/ownermodel.d.ts +13 -23
- package/lib/models/ownermodel.js +24 -51
- package/lib/models/ownermodel.js.map +1 -1
- package/lib/models/ownermodel.spec.js +23 -11
- package/lib/models/ownermodel.spec.js.map +1 -1
- package/lib/models/relations.d.ts +167 -0
- package/lib/models/relations.js +113 -0
- package/lib/models/relations.js.map +1 -0
- package/lib/models/rolemodel.d.ts +3 -3
- package/lib/models/rolemodel.js +6 -6
- package/lib/models/rolemodel.js.map +1 -1
- package/lib/models/rolemodel.spec.js +12 -12
- package/lib/models/rolemodel.spec.js.map +1 -1
- package/lib/models/user.d.ts +40 -24
- package/lib/models/user.js +74 -48
- package/lib/models/user.js.map +1 -1
- package/lib/models/user.spec.js +24 -4
- package/lib/models/user.spec.js.map +1 -1
- package/lib/queues/memoryqueue.spec.js +9 -5
- package/lib/queues/memoryqueue.spec.js.map +1 -1
- package/lib/queues/queueservice.js.map +1 -1
- package/lib/router.d.ts +17 -8
- package/lib/router.js +81 -9
- package/lib/router.js.map +1 -1
- package/lib/router.spec.js +89 -5
- package/lib/router.spec.js.map +1 -1
- package/lib/services/asyncevents.spec.js +4 -4
- package/lib/services/authentication.d.ts +21 -22
- package/lib/services/authentication.js +90 -109
- package/lib/services/authentication.js.map +1 -1
- package/lib/services/authentication.spec.js +51 -65
- package/lib/services/authentication.spec.js.map +1 -1
- package/lib/services/binary.d.ts +132 -31
- package/lib/services/binary.js +257 -72
- package/lib/services/binary.js.map +1 -1
- package/lib/services/binary.spec.d.ts +16 -6
- package/lib/services/binary.spec.js +44 -117
- package/lib/services/binary.spec.js.map +1 -1
- package/lib/services/cloudbinary.d.ts +9 -10
- package/lib/services/cloudbinary.js +14 -15
- package/lib/services/cloudbinary.js.map +1 -1
- package/lib/services/cloudbinary.spec.d.ts +2 -2
- package/lib/services/cloudbinary.spec.js +13 -12
- package/lib/services/cloudbinary.spec.js.map +1 -1
- package/lib/services/configuration.js +9 -9
- package/lib/services/configuration.js.map +1 -1
- package/lib/services/configuration.spec.js +5 -7
- package/lib/services/configuration.spec.js.map +1 -1
- package/lib/services/cron.spec.js +3 -4
- package/lib/services/cron.spec.js.map +1 -1
- package/lib/services/cryptoservice.d.ts +2 -2
- package/lib/services/cryptoservice.js +5 -2
- package/lib/services/cryptoservice.js.map +1 -1
- package/lib/services/domainservice.d.ts +113 -0
- package/lib/services/domainservice.js +357 -0
- package/lib/services/domainservice.js.map +1 -0
- package/lib/services/domainservice.spec.d.ts +1 -0
- package/lib/services/domainservice.spec.js +334 -0
- package/lib/services/domainservice.spec.js.map +1 -0
- package/lib/services/echo.d.ts +2 -2
- package/lib/services/echo.js.map +1 -1
- package/lib/services/echo.spec.js +9 -2
- package/lib/services/echo.spec.js.map +1 -1
- package/lib/services/filebinary.d.ts +13 -14
- package/lib/services/filebinary.js +79 -73
- package/lib/services/filebinary.js.map +1 -1
- package/lib/services/filebinary.spec.d.ts +5 -0
- package/lib/services/filebinary.spec.js +222 -11
- package/lib/services/filebinary.spec.js.map +1 -1
- package/lib/services/fileconfiguration.js +7 -7
- package/lib/services/fileconfiguration.js.map +1 -1
- package/lib/services/fileconfiguration.spec.js +23 -24
- package/lib/services/fileconfiguration.spec.js.map +1 -1
- package/lib/services/invitationservice.d.ts +11 -9
- package/lib/services/invitationservice.js +17 -23
- package/lib/services/invitationservice.js.map +1 -1
- package/lib/services/invitationservice.spec.js +43 -40
- package/lib/services/invitationservice.spec.js.map +1 -1
- package/lib/services/kubernetesconfiguration.js +12 -22
- package/lib/services/kubernetesconfiguration.js.map +1 -1
- package/lib/services/kubernetesconfiguration.spec.js +1 -6
- package/lib/services/kubernetesconfiguration.spec.js.map +1 -1
- package/lib/services/mailer.js +1 -1
- package/lib/services/mailer.js.map +1 -1
- package/lib/services/mailer.spec.js +4 -1
- package/lib/services/mailer.spec.js.map +1 -1
- package/lib/services/oauth.d.ts +17 -9
- package/lib/services/oauth.js +30 -4
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/oauth.spec.js +32 -15
- package/lib/services/oauth.spec.js.map +1 -1
- package/lib/services/prometheus.spec.js.map +1 -1
- package/lib/services/proxy.d.ts +9 -8
- package/lib/services/proxy.js +65 -36
- package/lib/services/proxy.js.map +1 -1
- package/lib/services/proxy.spec.js +28 -2
- package/lib/services/proxy.spec.js.map +1 -1
- package/lib/services/resource.d.ts +3 -3
- package/lib/services/resource.js +4 -3
- package/lib/services/resource.js.map +1 -1
- package/lib/services/resource.spec.js +3 -3
- package/lib/services/resource.spec.js.map +1 -1
- package/lib/services/service.d.ts +10 -13
- package/lib/services/service.js +29 -13
- package/lib/services/service.js.map +1 -1
- package/lib/services/service.spec.js +49 -11
- package/lib/services/service.spec.js.map +1 -1
- package/lib/services/version.d.ts +2 -2
- package/lib/services/version.js.map +1 -1
- package/lib/stores/aggregator.js +1 -0
- package/lib/stores/aggregator.js.map +1 -1
- package/lib/stores/aliasstore.d.ts +2 -2
- package/lib/stores/aliasstore.js +15 -4
- package/lib/stores/aliasstore.js.map +1 -1
- package/lib/stores/aliasstore.spec.js +4 -2
- package/lib/stores/aliasstore.spec.js.map +1 -1
- package/lib/stores/file.d.ts +5 -2
- package/lib/stores/file.js +11 -8
- package/lib/stores/file.js.map +1 -1
- package/lib/stores/file.spec.js +21 -34
- package/lib/stores/file.spec.js.map +1 -1
- package/lib/stores/mapper.d.ts +4 -2
- package/lib/stores/mapper.js +18 -11
- package/lib/stores/mapper.js.map +1 -1
- package/lib/stores/mapper.spec.js +6 -3
- package/lib/stores/mapper.spec.js.map +1 -1
- package/lib/stores/memory.d.ts +5 -2
- package/lib/stores/memory.js +11 -9
- package/lib/stores/memory.js.map +1 -1
- package/lib/stores/memory.spec.d.ts +3 -0
- package/lib/stores/memory.spec.js +100 -11
- package/lib/stores/memory.spec.js.map +1 -1
- package/lib/stores/store.d.ts +177 -87
- package/lib/stores/store.js +312 -141
- package/lib/stores/store.js.map +1 -1
- package/lib/stores/store.spec.d.ts +2 -2
- package/lib/stores/store.spec.js +54 -38
- package/lib/stores/store.spec.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLLexer.d.ts +14 -13
- package/lib/stores/webdaql/WebdaQLLexer.js +121 -112
- package/lib/stores/webdaql/WebdaQLLexer.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserLexer.d.ts +14 -13
- package/lib/stores/webdaql/WebdaQLParserLexer.js +121 -112
- package/lib/stores/webdaql/WebdaQLParserLexer.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserListener.d.ts +15 -3
- package/lib/stores/webdaql/WebdaQLParserParser.d.ts +23 -13
- package/lib/stores/webdaql/WebdaQLParserParser.js +149 -94
- package/lib/stores/webdaql/WebdaQLParserParser.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserVisitor.d.ts +9 -2
- package/lib/stores/webdaql/query.d.ts +6 -2
- package/lib/stores/webdaql/query.js +14 -1
- package/lib/stores/webdaql/query.js.map +1 -1
- package/lib/stores/webdaql/query.spec.js +10 -1
- package/lib/stores/webdaql/query.spec.js.map +1 -1
- package/lib/test.d.ts +48 -19
- package/lib/test.js +171 -63
- package/lib/test.js.map +1 -1
- package/lib/unpackedapplication.d.ts +5 -0
- package/lib/unpackedapplication.js +58 -10
- package/lib/unpackedapplication.js.map +1 -1
- package/lib/utils/context.d.ts +76 -29
- package/lib/utils/context.js +91 -55
- package/lib/utils/context.js.map +1 -1
- package/lib/utils/context.spec.d.ts +9 -1
- package/lib/utils/context.spec.js +73 -8
- package/lib/utils/context.spec.js.map +1 -1
- package/lib/utils/cookie.d.ts +4 -5
- package/lib/utils/cookie.js +1 -2
- package/lib/utils/cookie.js.map +1 -1
- package/lib/utils/cookie.spec.js +5 -3
- package/lib/utils/cookie.spec.js.map +1 -1
- package/lib/utils/httpcontext.spec.js +9 -3
- package/lib/utils/httpcontext.spec.js.map +1 -1
- package/lib/utils/serializers.d.ts +46 -17
- package/lib/utils/serializers.js +116 -2
- package/lib/utils/serializers.js.map +1 -1
- package/lib/utils/serializers.spec.js +84 -20
- package/lib/utils/serializers.spec.js.map +1 -1
- package/lib/utils/session.d.ts +14 -8
- package/lib/utils/session.js +14 -3
- package/lib/utils/session.js.map +1 -1
- package/lib/utils/session.spec.js +6 -1
- package/lib/utils/session.spec.js.map +1 -1
- package/package.json +16 -10
- package/test/cachedapp/webda.config.json +6 -1
- package/test/config-cached.json +5 -0
- package/test/config-file-missing-file.json +5 -7
- package/test/config-file-no-reload.json +5 -7
- package/test/config-file-reload.json +5 -7
- package/test/config-kube-reload.json +5 -11
- package/test/config-reload.json +2 -4
- package/test/config.json +12 -2
- package/test/moddas/voidstore.js +1 -1
- package/test/models/ident.js +6 -4
- package/test/models/task.js +4 -4
- package/webda.module.json +1587 -1266
package/lib/application.d.ts
CHANGED
|
@@ -1,13 +1,38 @@
|
|
|
1
1
|
import { WorkerLogLevel, WorkerOutput } from "@webda/workout";
|
|
2
2
|
import { JSONSchema7 } from "json-schema";
|
|
3
3
|
import { OpenAPIV3 } from "openapi-types";
|
|
4
|
-
import { Constructor,
|
|
4
|
+
import { Constructor, Core, CoreModel, CoreModelDefinition, Service } from "./index.js";
|
|
5
5
|
export type PackageDescriptorAuthor = string | {
|
|
6
6
|
name?: string;
|
|
7
7
|
email?: string;
|
|
8
8
|
url?: string;
|
|
9
9
|
};
|
|
10
10
|
export type Modda = ServiceConstructor<Service>;
|
|
11
|
+
/**
|
|
12
|
+
* Defined relationship for one model
|
|
13
|
+
*/
|
|
14
|
+
export type ModelGraph = {
|
|
15
|
+
parent?: Omit<ModelRelation, "type">;
|
|
16
|
+
links?: ModelRelation[];
|
|
17
|
+
queries?: {
|
|
18
|
+
attribute: string;
|
|
19
|
+
model: string;
|
|
20
|
+
targetAttribute: string;
|
|
21
|
+
}[];
|
|
22
|
+
maps?: any[];
|
|
23
|
+
children?: string[];
|
|
24
|
+
binaries?: {
|
|
25
|
+
attribute: string;
|
|
26
|
+
cardinality: "ONE" | "MANY";
|
|
27
|
+
metadata?: string;
|
|
28
|
+
}[];
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Defined relationship for all models
|
|
32
|
+
*/
|
|
33
|
+
export type ModelsGraph = {
|
|
34
|
+
[key: string]: ModelGraph;
|
|
35
|
+
};
|
|
11
36
|
/**
|
|
12
37
|
* Some package exists but seems pretty big for this
|
|
13
38
|
* https://classic.yarnpkg.com/en/docs/package-json
|
|
@@ -74,7 +99,13 @@ export interface PackageDescriptor {
|
|
|
74
99
|
export type ModelRelation = {
|
|
75
100
|
attribute: string;
|
|
76
101
|
model: string;
|
|
77
|
-
type: "";
|
|
102
|
+
type: "LINK" | "LINKS_MAP" | "LINKS_ARRAY" | "LINKS_SIMPLE_ARRAY";
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Define the model hierarchy
|
|
106
|
+
*/
|
|
107
|
+
export type ModelsTree = {
|
|
108
|
+
[key: string]: ModelsTree;
|
|
78
109
|
};
|
|
79
110
|
/**
|
|
80
111
|
* A Webda module is a NPM package
|
|
@@ -91,22 +122,49 @@ export interface Module {
|
|
|
91
122
|
/**
|
|
92
123
|
* Models provided by the module
|
|
93
124
|
*/
|
|
94
|
-
models
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
125
|
+
models: {
|
|
126
|
+
/**
|
|
127
|
+
* Models provided by the module
|
|
128
|
+
*/
|
|
129
|
+
list: {
|
|
130
|
+
[key: string]: string;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Models hierarchy tree
|
|
134
|
+
*
|
|
135
|
+
* Models Graph establish the relationship between models
|
|
136
|
+
* Models Tree establish the hierarchy between models classes
|
|
137
|
+
*/
|
|
138
|
+
tree: ModelsTree;
|
|
139
|
+
/**
|
|
140
|
+
* Models graph
|
|
141
|
+
*
|
|
142
|
+
* Typescript does not have reflection, we therefore deduct the
|
|
143
|
+
* relations on compilation time and inject in the module
|
|
144
|
+
*
|
|
145
|
+
* The parent is define by a ModelParent type on the model
|
|
146
|
+
* The links are attribute of types ModelLink
|
|
147
|
+
*/
|
|
148
|
+
graph: ModelsGraph;
|
|
149
|
+
/**
|
|
150
|
+
* Specific plurals for a model
|
|
151
|
+
*/
|
|
152
|
+
plurals: {
|
|
153
|
+
[key: string]: string;
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Contains the shortcut id for the models
|
|
157
|
+
*/
|
|
158
|
+
shortIds: {
|
|
159
|
+
[key: string]: string;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Store the model attributes types
|
|
163
|
+
*/
|
|
164
|
+
reflections: {
|
|
165
|
+
[key: string]: {
|
|
166
|
+
[key: string]: string;
|
|
108
167
|
};
|
|
109
|
-
maps?: any[];
|
|
110
168
|
};
|
|
111
169
|
};
|
|
112
170
|
/**
|
|
@@ -187,12 +245,6 @@ export type UnpackedConfiguration = {
|
|
|
187
245
|
* Define the api url
|
|
188
246
|
*/
|
|
189
247
|
apiUrl?: string;
|
|
190
|
-
/**
|
|
191
|
-
* Define the model to use for Context
|
|
192
|
-
*
|
|
193
|
-
* @default Context
|
|
194
|
-
*/
|
|
195
|
-
contextModel?: string;
|
|
196
248
|
/**
|
|
197
249
|
* Will not try to parse request bigger than this
|
|
198
250
|
*
|
|
@@ -310,7 +362,6 @@ export interface ServiceConstructor<T extends Service> {
|
|
|
310
362
|
export declare enum SectionEnum {
|
|
311
363
|
Moddas = "moddas",
|
|
312
364
|
Deployers = "deployers",
|
|
313
|
-
Models = "models",
|
|
314
365
|
Beans = "beans"
|
|
315
366
|
}
|
|
316
367
|
/**
|
|
@@ -429,7 +480,17 @@ export declare class Application {
|
|
|
429
480
|
* Models type registry
|
|
430
481
|
*/
|
|
431
482
|
protected models: {
|
|
432
|
-
[key: string]:
|
|
483
|
+
[key: string]: CoreModelDefinition;
|
|
484
|
+
};
|
|
485
|
+
/**
|
|
486
|
+
* Models graph
|
|
487
|
+
*/
|
|
488
|
+
protected graph: ModelsGraph;
|
|
489
|
+
/**
|
|
490
|
+
* Models specific plurals
|
|
491
|
+
*/
|
|
492
|
+
protected plurals: {
|
|
493
|
+
[key: string]: string;
|
|
433
494
|
};
|
|
434
495
|
/**
|
|
435
496
|
* Class Logger
|
|
@@ -443,6 +504,12 @@ export declare class Application {
|
|
|
443
504
|
* When the application got initiated
|
|
444
505
|
*/
|
|
445
506
|
protected initTime: number;
|
|
507
|
+
/**
|
|
508
|
+
* Direct parent of a model
|
|
509
|
+
*/
|
|
510
|
+
protected flatHierarchy: {
|
|
511
|
+
[key: string]: string;
|
|
512
|
+
};
|
|
446
513
|
/**
|
|
447
514
|
* Configuration file
|
|
448
515
|
*/
|
|
@@ -485,6 +552,21 @@ export declare class Application {
|
|
|
485
552
|
* @returns
|
|
486
553
|
*/
|
|
487
554
|
getSchema(type: string): JSONSchema7;
|
|
555
|
+
/**
|
|
556
|
+
* Check if a schema exists
|
|
557
|
+
* @param type
|
|
558
|
+
* @returns schema name if it exists
|
|
559
|
+
*/
|
|
560
|
+
hasSchema(type: string): boolean;
|
|
561
|
+
/**
|
|
562
|
+
* Get model graph
|
|
563
|
+
*/
|
|
564
|
+
getRelations(model: string | Constructor<CoreModel> | CoreModel): ModelGraph;
|
|
565
|
+
/**
|
|
566
|
+
* Get the all graph
|
|
567
|
+
* @returns
|
|
568
|
+
*/
|
|
569
|
+
getGraph(): ModelsGraph;
|
|
488
570
|
/**
|
|
489
571
|
* Check if application has cached modules
|
|
490
572
|
*
|
|
@@ -527,13 +609,32 @@ export declare class Application {
|
|
|
527
609
|
* @param service
|
|
528
610
|
*/
|
|
529
611
|
addService(name: string, service: Modda): this;
|
|
612
|
+
/**
|
|
613
|
+
* Register a new schema in the application
|
|
614
|
+
* @param name
|
|
615
|
+
* @param schema
|
|
616
|
+
*/
|
|
617
|
+
registerSchema(name: string, schema: JSONSchema7): void;
|
|
618
|
+
/**
|
|
619
|
+
* Get plural of an Id
|
|
620
|
+
* @param name
|
|
621
|
+
* @returns
|
|
622
|
+
*/
|
|
623
|
+
getModelPlural(name: string): string;
|
|
624
|
+
/**
|
|
625
|
+
*
|
|
626
|
+
* @param section
|
|
627
|
+
* @param name
|
|
628
|
+
* @param caseSensitive
|
|
629
|
+
*/
|
|
630
|
+
hasWebdaObject(section: Section, name: string, caseSensitive?: boolean): boolean;
|
|
530
631
|
/**
|
|
531
632
|
*
|
|
532
633
|
* @param section
|
|
533
634
|
* @param name
|
|
534
635
|
* @returns
|
|
535
636
|
*/
|
|
536
|
-
getWebdaObject(section: Section, name: string): any;
|
|
637
|
+
getWebdaObject(section: Section, name: string, caseSensitive?: boolean): any;
|
|
537
638
|
/**
|
|
538
639
|
* Get a service based on name
|
|
539
640
|
*
|
|
@@ -557,13 +658,24 @@ export declare class Application {
|
|
|
557
658
|
*
|
|
558
659
|
* @param name model to retrieve
|
|
559
660
|
*/
|
|
560
|
-
getModel<T extends
|
|
661
|
+
getModel<T extends CoreModel = CoreModel>(name: string): CoreModelDefinition<T>;
|
|
561
662
|
/**
|
|
562
663
|
* Get all models definitions
|
|
563
664
|
*/
|
|
564
665
|
getModels(): {
|
|
565
|
-
[key: string]:
|
|
666
|
+
[key: string]: CoreModelDefinition;
|
|
566
667
|
};
|
|
668
|
+
/**
|
|
669
|
+
* Return models that do not have parents
|
|
670
|
+
* @returns
|
|
671
|
+
*/
|
|
672
|
+
getRootModels(): string[];
|
|
673
|
+
/**
|
|
674
|
+
* Return models that do not have parents and are exposed
|
|
675
|
+
* Or specifically set as root via the Expose.root parameter
|
|
676
|
+
* @returns
|
|
677
|
+
*/
|
|
678
|
+
getRootExposedModels(): string[];
|
|
567
679
|
/**
|
|
568
680
|
* Return the model name for a object
|
|
569
681
|
* @param object
|
|
@@ -574,6 +686,27 @@ export declare class Application {
|
|
|
574
686
|
* @param object
|
|
575
687
|
*/
|
|
576
688
|
getModelFromConstructor(model: Constructor<CoreModel>): string | undefined;
|
|
689
|
+
/**
|
|
690
|
+
* Get the model name from a model or a constructor
|
|
691
|
+
*
|
|
692
|
+
* @param model
|
|
693
|
+
* @returns longId for a model
|
|
694
|
+
*/
|
|
695
|
+
getModelName(model: CoreModel | Constructor<CoreModel>): string | undefined;
|
|
696
|
+
/**
|
|
697
|
+
* Get the model hierarchy
|
|
698
|
+
* @param model
|
|
699
|
+
*/
|
|
700
|
+
getModelHierarchy(model: CoreModel | Constructor<CoreModel> | string): {
|
|
701
|
+
ancestors: string[];
|
|
702
|
+
children: ModelsTree;
|
|
703
|
+
};
|
|
704
|
+
/**
|
|
705
|
+
* Get all model types with the hierarchy
|
|
706
|
+
* @param model
|
|
707
|
+
* @returns
|
|
708
|
+
*/
|
|
709
|
+
getModelTypes(model: CoreModel): string[];
|
|
577
710
|
/**
|
|
578
711
|
* Return all deployers
|
|
579
712
|
*/
|
|
@@ -586,7 +719,7 @@ export declare class Application {
|
|
|
586
719
|
* @param name
|
|
587
720
|
* @param model
|
|
588
721
|
*/
|
|
589
|
-
addModel(name: string, model: any): this;
|
|
722
|
+
addModel(name: string, model: any, dynamic?: boolean): this;
|
|
590
723
|
/**
|
|
591
724
|
* Add a new deployer
|
|
592
725
|
*
|
|
@@ -708,10 +841,14 @@ export declare class Application {
|
|
|
708
841
|
*/
|
|
709
842
|
completeNamespace(name?: string): string;
|
|
710
843
|
/**
|
|
711
|
-
*
|
|
712
|
-
*
|
|
713
|
-
|
|
714
|
-
|
|
844
|
+
* Return current namespace
|
|
845
|
+
* @returns
|
|
846
|
+
*/
|
|
847
|
+
getNamespace(): string;
|
|
848
|
+
/**
|
|
849
|
+
* Get short id for a name
|
|
850
|
+
* @param name if name is shortId return longId else return shortId
|
|
851
|
+
* @returns
|
|
715
852
|
*/
|
|
716
|
-
|
|
853
|
+
getShortId(name: string): string;
|
|
717
854
|
}
|