taon 21.0.28 → 21.0.32
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/browser/fesm2022/taon-browser.mjs +2 -14
- package/browser/fesm2022/taon-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/taon-browser.d.ts +73 -75
- package/browser-prod/fesm2022/taon-browser.mjs +770 -788
- package/browser-prod/fesm2022/taon-browser.mjs.map +1 -1
- package/browser-prod/package.json +23 -0
- package/browser-prod/types/taon-browser.d.ts +493 -513
- package/browser-prod.split-namespaces.json +186 -0
- package/icon-menu-taon.svg +15 -15
- package/lib/base-classes/base-controller.d.ts +2 -1
- package/lib/base-classes/base-controller.js.map +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/decorators/http/http-decorators.d.ts +2 -1
- package/lib/decorators/http/http-decorators.js.map +1 -1
- package/lib/decorators/http/http-methods-decorators.js.map +1 -1
- package/lib/decorators/http/http-params-decorators.js.map +1 -1
- package/lib/endpoint-context.d.ts +2 -1
- package/lib/endpoint-context.js.map +1 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +2 -3
- package/lib/index.js.map +1 -1
- package/lib/models.d.ts +2 -3
- package/lib/models.js +0 -7
- package/lib/models.js.map +1 -1
- package/lib/package.json +4 -0
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib-prod/base-classes/base-class.js +1 -1
- package/lib-prod/base-classes/base-class.js.map +1 -1
- package/lib-prod/base-classes/base-context.d.ts +1 -1
- package/lib-prod/base-classes/base-controller.d.ts +5 -4
- package/lib-prod/base-classes/base-controller.js +2 -2
- package/lib-prod/base-classes/base-controller.js.map +1 -1
- package/lib-prod/base-classes/base-crud-controller.d.ts +13 -13
- package/lib-prod/base-classes/base-crud-controller.js +8 -9
- package/lib-prod/base-classes/base-crud-controller.js.map +1 -1
- package/lib-prod/base-classes/base-injector.js +11 -11
- package/lib-prod/base-classes/base-injector.js.map +1 -1
- package/lib-prod/base-classes/base-middleware.d.ts +2 -2
- package/lib-prod/base-classes/base-migration.js +3 -3
- package/lib-prod/base-classes/base-migration.js.map +1 -1
- package/lib-prod/base-classes/base-repository.js +4 -4
- package/lib-prod/base-classes/base-repository.js.map +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +1 -1
- package/lib-prod/build-info._auto-generated_.js +1 -1
- package/lib-prod/config/method-config.d.ts +2 -2
- package/lib-prod/config/param-config.d.ts +2 -2
- package/lib-prod/context-db-migrations.js +12 -12
- package/lib-prod/context-db-migrations.js.map +1 -1
- package/lib-prod/create-context.d.ts +5 -5
- package/lib-prod/create-context.js +3 -3
- package/lib-prod/create-context.js.map +1 -1
- package/lib-prod/decorators/classes/controller-decorator.js +3 -3
- package/lib-prod/decorators/classes/controller-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/entity-decorator.d.ts +3 -3
- package/lib-prod/decorators/classes/entity-decorator.js +5 -5
- package/lib-prod/decorators/classes/entity-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/middleware-decorator.js +3 -3
- package/lib-prod/decorators/classes/middleware-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/migration-decorator.js +3 -3
- package/lib-prod/decorators/classes/migration-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/provider-decorator.js +3 -3
- package/lib-prod/decorators/classes/provider-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/repository-decorator.js +3 -3
- package/lib-prod/decorators/classes/repository-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/subscriber-decorator.js +3 -3
- package/lib-prod/decorators/classes/subscriber-decorator.js.map +1 -1
- package/lib-prod/decorators/http/http-decorators.d.ts +3 -2
- package/lib-prod/decorators/http/http-decorators.js +2 -2
- package/lib-prod/decorators/http/http-decorators.js.map +1 -1
- package/lib-prod/decorators/http/http-methods-decorators.d.ts +5 -5
- package/lib-prod/decorators/http/http-methods-decorators.js +2 -2
- package/lib-prod/decorators/http/http-methods-decorators.js.map +1 -1
- package/lib-prod/decorators/http/http-params-decorators.js +1 -1
- package/lib-prod/decorators/http/http-params-decorators.js.map +1 -1
- package/lib-prod/endpoint-context-storage.js +1 -1
- package/lib-prod/endpoint-context-storage.js.map +1 -1
- package/lib-prod/endpoint-context.d.ts +14 -13
- package/lib-prod/endpoint-context.js +171 -171
- package/lib-prod/endpoint-context.js.map +1 -1
- package/lib-prod/entity-process.js +14 -14
- package/lib-prod/entity-process.js.map +1 -1
- package/lib-prod/formly/fromly.d.ts +2 -2
- package/lib-prod/formly/fromly.js +1 -1
- package/lib-prod/formly/fromly.js.map +1 -1
- package/lib-prod/formly/type-from-entity.js +2 -2
- package/lib-prod/formly/type-from-entity.js.map +1 -1
- package/lib-prod/get-response-value.d.ts +2 -2
- package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.d.ts +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.d.ts +3 -3
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +0 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js.map +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js.map +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.d.ts +1 -3
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js +12 -12
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js.map +1 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.d.ts +1 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.d.ts +2 -2
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +0 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js.map +1 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.d.ts +1 -3
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +6 -8
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js.map +1 -1
- package/lib-prod/helpers/class-helpers.d.ts +20 -22
- package/lib-prod/helpers/class-helpers.js +231 -218
- package/lib-prod/helpers/class-helpers.js.map +1 -1
- package/lib-prod/helpers/taon-helpers.d.ts +14 -16
- package/lib-prod/helpers/taon-helpers.js +148 -138
- package/lib-prod/helpers/taon-helpers.js.map +1 -1
- package/lib-prod/index.d.ts +80 -84
- package/lib-prod/index.js +71 -70
- package/lib-prod/index.js.map +1 -1
- package/lib-prod/inject.js +3 -3
- package/lib-prod/inject.js.map +1 -1
- package/lib-prod/models.d.ts +242 -247
- package/lib-prod/models.js +83 -91
- package/lib-prod/models.js.map +1 -1
- package/lib-prod/package.json +4 -0
- package/lib-prod/realtime/realtime-client.d.ts +2 -2
- package/lib-prod/realtime/realtime-client.js +9 -9
- package/lib-prod/realtime/realtime-client.js.map +1 -1
- package/lib-prod/realtime/realtime-server.js +17 -17
- package/lib-prod/realtime/realtime-server.js.map +1 -1
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +3 -3
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +2 -2
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -1
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +2 -2
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -1
- package/lib-prod/realtime/realtime-subs-manager.d.ts +2 -2
- package/lib-prod/realtime/realtime-subs-manager.js +6 -6
- package/lib-prod/realtime/realtime-subs-manager.js.map +1 -1
- package/lib-prod/realtime/realtime.models.d.ts +23 -25
- package/lib-prod/realtime/realtime.models.js +1 -0
- package/lib-prod/realtime/realtime.models.js.map +1 -1
- package/lib-prod/symbols.d.ts +39 -41
- package/lib-prod/symbols.js +44 -45
- package/lib-prod/symbols.js.map +1 -1
- package/lib-prod/ui/index.d.ts +1 -1
- package/lib-prod/ui/index.js +2 -2
- package/lib-prod/ui/taon-admin-mode-configuration/index.d.ts +1 -1
- package/lib-prod/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib-prod/validators.d.ts +4 -6
- package/lib-prod/validators.js +50 -47
- package/lib-prod/validators.js.map +1 -1
- package/lib-prod.split-namespaces.json +188 -0
- package/package.json +18 -12
- package/websql/fesm2022/taon-websql.mjs +2 -10
- package/websql/fesm2022/taon-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/taon-websql.d.ts +73 -75
- package/websql-prod/fesm2022/taon-websql.mjs +855 -870
- package/websql-prod/fesm2022/taon-websql.mjs.map +1 -1
- package/websql-prod/package.json +23 -0
- package/websql-prod/types/taon-websql.d.ts +496 -516
- package/websql-prod.split-namespaces.json +188 -0
- package/migrations/index.d.ts +0 -1
- package/migrations/index.js +0 -19
- package/migrations/index.js.map +0 -1
- package/migrations/migrations_index._auto-generated_.d.ts +0 -0
- package/migrations/migrations_index._auto-generated_.js +0 -4
- package/migrations/migrations_index._auto-generated_.js.map +0 -1
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
import * as taon_browser from 'taon/browser';
|
|
3
3
|
import * as express from 'express';
|
|
4
4
|
import express__default, { Request, Response, Application } from 'express';
|
|
5
|
-
import {
|
|
5
|
+
import { Models_PromiseObservableMix, Models_HttpResponse, Models_Ng2RestAxiosRequestConfig, RestResponseWrapper, TaonServerMiddlewareInterceptOptions, TaonClientMiddlewareInterceptOptions, Models_ResponseTypeAxios, HttpResponseError, RestErrorResponseWrapper, Mapping_ModelValue, Mapping_Mapping } from 'ng2-rest/browser-prod';
|
|
6
6
|
export { TaonClientMiddlewareInterceptOptions, TaonServerMiddlewareInterceptOptions } from 'ng2-rest/browser-prod';
|
|
7
7
|
import { Server } from 'http';
|
|
8
8
|
import { DataSource, Repository, SaveOptions, DeepPartial, QueryDeepPartialEntity, InsertResult, UpsertOptions, FindOptionsWhere, UpdateResult, FindManyOptions, FindOneOptions, QueryRunner, SelectQueryBuilder, Table, RelationPath, MigrationInterface, EntitySubscriberInterface, InsertEvent, UpdateEvent, RemoveEvent, SoftRemoveEvent, RecoverEvent, TransactionStartEvent, TransactionCommitEvent, TransactionRollbackEvent } from 'taon-typeorm/browser-prod';
|
|
9
9
|
export { AfterInsert, AfterLoad, AfterRecover, AfterRemove, AfterSoftRemove, AfterUpdate, BeforeInsert, BeforeRecover, BeforeRemove, BeforeSoftRemove, BeforeUpdate, Column, Connection, CreateDateColumn, Column as CustomColumn, DeleteDateColumn, Generated, Generated as GeneratedColumn, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, OneToOne, PrimaryColumn, PrimaryGeneratedColumn, Repository, TreeChildren, TreeParent, UpdateDateColumn, VersionColumn, VirtualColumn } from 'taon-typeorm/browser-prod';
|
|
10
|
+
import { CoreModels_DatabaseType, CoreModels_HttpMethod, CoreModels_ContentType, CoreModels_ParamType, CoreModels_UIFramework } from 'tnp-core/browser-prod';
|
|
10
11
|
import { MySqlQuerySource } from 'taon-type-sql/browser-prod';
|
|
11
|
-
import { CoreModels } from 'tnp-core/browser-prod';
|
|
12
12
|
import * as i0 from '@angular/core';
|
|
13
13
|
import { InjectionToken, ViewContainerRef } from '@angular/core';
|
|
14
14
|
import { AxiosResponse } from 'axios';
|
|
15
15
|
import * as rxjs from 'rxjs';
|
|
16
16
|
import { Observable, Subscriber } from 'rxjs';
|
|
17
|
-
import * as multer from 'multer';
|
|
18
17
|
import * as _ngx_formly_core from '@ngx-formly/core';
|
|
19
18
|
import { FieldWrapper, FieldArrayType, FormlyFormBuilder, FormlyFieldConfig } from '@ngx-formly/core';
|
|
20
|
-
import { ServerOptions, Server as Server$1, DefaultEventsMap } from 'socket.io';
|
|
21
|
-
import { io, Socket } from 'socket.io-client';
|
|
22
19
|
import * as Electron from 'electron';
|
|
23
20
|
import { ipcRenderer } from 'electron';
|
|
21
|
+
import { ServerOptions, Server as Server$1, DefaultEventsMap } from 'socket.io';
|
|
22
|
+
import { io, Socket } from 'socket.io-client';
|
|
23
|
+
import * as multer from 'multer';
|
|
24
24
|
|
|
25
25
|
declare abstract class TaonBaseCustomRepository extends TaonBaseInjector {
|
|
26
26
|
}
|
|
@@ -384,252 +384,247 @@ declare class TaonRestResponseWrapper extends RestResponseWrapper {
|
|
|
384
384
|
declare const BaseTaonClassesNames: readonly ["BaseCrudController", "BaseController", "BaseAbstractEntity", "BaseEntity", "BaseContext", "BaseCustomRepository", "BaseFileUploadMiddleware", "BaseMiddleware", "BaseClass", "BaseInjector", "BaseMigration", "BaseProvider", "BaseRepository", "BaseSubscriberForEntity", "BaseCliWorkerController", "PortsController", "PortsContext"];
|
|
385
385
|
declare const TaonTempDatabasesFolder = "databases";
|
|
386
386
|
declare const TaonTempRoutesFolder = "routes";
|
|
387
|
-
declare
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
387
|
+
declare const Models_DatabasesFolder = "databases";
|
|
388
|
+
type Models_FrameworkMode = 'backend-frontend(tcp+udp)' | 'remote-backend(tcp+udp)' | 'backend-frontend(ipc-electron)' | 'backend-frontend(websql-electron)' | 'backend-frontend(websql)';
|
|
389
|
+
declare enum Models_ClassType {
|
|
390
|
+
ENTITY = "ENTITY",
|
|
391
|
+
CONTROLLER = "CONTROLLER",
|
|
392
|
+
REPOSITORY = "REPOSITORY",
|
|
393
|
+
PROVIDER = "PROVIDER",
|
|
394
|
+
SUBSCRIBER = "SUBSCRIBER",
|
|
395
|
+
MIGRATION = "MIGRATION",
|
|
396
|
+
MIDDLEWARE = "MIDDLEWARE"
|
|
397
|
+
}
|
|
398
|
+
declare const Models_ClassTypeKey: { [key in Models_ClassType]: keyof Models_ContextOptions<any, any, any, any, any, any, any, any>; };
|
|
399
|
+
type Models_MiddlewareType = [Function, any[]];
|
|
400
|
+
/**
|
|
401
|
+
* DROP_DB+MIGRATIONS (default for development)
|
|
402
|
+
* Drop all tables + recreate them + run migrations
|
|
403
|
+
* synchronize: true , dropSchema: true
|
|
404
|
+
* use migrations: true
|
|
405
|
+
*
|
|
406
|
+
* MIGRATIONS (default for production)
|
|
407
|
+
* Do not drop tables, only run migrations
|
|
408
|
+
* synchronize: false, dropSchema: false
|
|
409
|
+
* use migrations: true
|
|
410
|
+
*/
|
|
411
|
+
type Models_DBRecreateMode = 'DROP_DB+MIGRATIONS' | 'PRESERVE_DATA+MIGRATIONS';
|
|
412
|
+
declare class Models_DatabaseConfigTypeOrm {
|
|
413
|
+
/**
|
|
414
|
+
* database name
|
|
415
|
+
*/
|
|
416
|
+
database?: string;
|
|
417
|
+
/**
|
|
418
|
+
* only for file base db: sqlite, sqljs
|
|
419
|
+
*/
|
|
420
|
+
location?: string;
|
|
421
|
+
synchronize: boolean;
|
|
422
|
+
dropSchema: boolean;
|
|
423
|
+
type?: CoreModels_DatabaseType;
|
|
424
|
+
/**
|
|
425
|
+
* Persists db on disk/local-storage if serverless db
|
|
426
|
+
*/
|
|
427
|
+
autoSave?: boolean;
|
|
428
|
+
/**
|
|
429
|
+
* for websql db mode
|
|
430
|
+
* true by default
|
|
431
|
+
*/
|
|
432
|
+
useLocalForage?: boolean;
|
|
433
|
+
logging: boolean;
|
|
434
|
+
databasePort?: number;
|
|
435
|
+
databaseHost?: string;
|
|
436
|
+
databaseUsername?: string;
|
|
437
|
+
databasePassword?: string;
|
|
438
|
+
}
|
|
439
|
+
declare class Models_DatabaseConfig extends Models_DatabaseConfigTypeOrm {
|
|
440
|
+
/**
|
|
441
|
+
* Default value 'DROP_ALL'.
|
|
406
442
|
*
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
* synchronize: false, dropSchema: false
|
|
410
|
-
* use migrations: true
|
|
443
|
+
* Tell framework what is happening with db
|
|
444
|
+
* when context is starting.
|
|
411
445
|
*/
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
446
|
+
recreateMode?: Models_DBRecreateMode;
|
|
447
|
+
static from(databasePartialConfig: Partial<Omit<Models_DatabaseConfig, 'synchronize' | 'dropSchema' | 'databaseConfigTypeORM'>>): Models_DatabaseConfig;
|
|
448
|
+
get databaseConfigTypeORM(): Models_DatabaseConfigTypeOrm;
|
|
449
|
+
}
|
|
450
|
+
type Models_ISession = {
|
|
451
|
+
secret?: string;
|
|
452
|
+
saveUninitialized?: boolean;
|
|
453
|
+
/**
|
|
454
|
+
* max age of session
|
|
455
|
+
*/
|
|
456
|
+
cookieMaxAge?: number;
|
|
457
|
+
secure?: boolean;
|
|
458
|
+
resave?: boolean;
|
|
459
|
+
};
|
|
460
|
+
type Models_ConnectionOptionsLogs = {
|
|
461
|
+
http?: boolean;
|
|
462
|
+
realtime?: boolean;
|
|
463
|
+
framework?: boolean;
|
|
464
|
+
db?: boolean;
|
|
465
|
+
migrations?: boolean;
|
|
466
|
+
routes?: boolean;
|
|
467
|
+
};
|
|
468
|
+
interface Models_ContextOptions<CONTEXTS, CONTROLLERS, ENTITIES, REPOSITORIES, PROVIDERS, SUBSCRIBERS, MIGRATIONS, MIDDLEWARES> {
|
|
469
|
+
appId?: string;
|
|
470
|
+
contextName: string;
|
|
471
|
+
/**
|
|
472
|
+
* if defined and different from contextName
|
|
473
|
+
* - context will NOT be initialized
|
|
474
|
+
*/
|
|
475
|
+
activeContext?: string | null;
|
|
476
|
+
/**
|
|
477
|
+
* IMPORTANT! provide full url that starts with http:// or https://
|
|
478
|
+
* host/port for initing backend server
|
|
479
|
+
*/
|
|
480
|
+
host?: string;
|
|
481
|
+
/**
|
|
482
|
+
* Needs to be specified in docker environment only
|
|
483
|
+
*/
|
|
484
|
+
hostPortNumber?: number;
|
|
485
|
+
/**
|
|
486
|
+
* IMPORTANT! provide full url that starts with http:// or https://
|
|
487
|
+
* frontend host only needed when we are
|
|
488
|
+
* using withCredentials for axios
|
|
489
|
+
* and session cookie
|
|
490
|
+
* or realtime communication
|
|
491
|
+
*/
|
|
492
|
+
frontendHost?: string;
|
|
493
|
+
/**
|
|
494
|
+
* Needs to be specified in docker environment only
|
|
495
|
+
*/
|
|
496
|
+
frontendHostPortNumber?: number;
|
|
497
|
+
/**
|
|
498
|
+
* User ipc for communication between BE/FE
|
|
499
|
+
* when electron is used as a platform
|
|
500
|
+
* Default: true
|
|
501
|
+
*/
|
|
502
|
+
useIpcWhenElectron?: boolean;
|
|
503
|
+
/**
|
|
504
|
+
* taon contexts here
|
|
505
|
+
* (module like structure)
|
|
506
|
+
*/
|
|
507
|
+
contexts?: CONTEXTS;
|
|
508
|
+
/**
|
|
509
|
+
* taon controller here
|
|
510
|
+
* (glue between frontend and backend)
|
|
511
|
+
*/
|
|
512
|
+
controllers?: CONTROLLERS;
|
|
513
|
+
/**
|
|
514
|
+
* taon entities
|
|
515
|
+
* (entities are used to create tables in db)
|
|
516
|
+
*/
|
|
517
|
+
entities?: ENTITIES;
|
|
518
|
+
/**
|
|
519
|
+
* taon repositories
|
|
520
|
+
* (repositories are used to access data from db)
|
|
521
|
+
*/
|
|
522
|
+
repositories?: REPOSITORIES;
|
|
523
|
+
/**
|
|
524
|
+
* taon providers
|
|
525
|
+
* (context singletons)
|
|
526
|
+
*/
|
|
527
|
+
providers?: PROVIDERS;
|
|
528
|
+
/**
|
|
529
|
+
* taon subscribers
|
|
530
|
+
* (subscribers are used to listen to db events)
|
|
531
|
+
*/
|
|
532
|
+
subscribers?: SUBSCRIBERS;
|
|
533
|
+
/**
|
|
534
|
+
* taon migrations
|
|
535
|
+
* (migrations are used to update db schema and achieve proper CI/CD)
|
|
536
|
+
*/
|
|
537
|
+
migrations?: MIGRATIONS;
|
|
538
|
+
/**
|
|
539
|
+
* taon middlewares
|
|
540
|
+
* middlewares are used to intercept requests
|
|
541
|
+
* and responses in the context
|
|
542
|
+
*/
|
|
543
|
+
middlewares?: MIDDLEWARES;
|
|
544
|
+
/**
|
|
545
|
+
* Config for express session
|
|
546
|
+
*/
|
|
547
|
+
session?: Models_ISession;
|
|
548
|
+
/**
|
|
549
|
+
* taon is not going to write .rest files to cwd()
|
|
550
|
+
*/
|
|
551
|
+
skipWritingServerRoutes?: boolean;
|
|
552
|
+
/**
|
|
553
|
+
* TODO - this is still in progress
|
|
554
|
+
* @deprecated
|
|
555
|
+
*/
|
|
556
|
+
productionMode?: boolean;
|
|
557
|
+
/**
|
|
558
|
+
* If you want your context to never be started as separated server
|
|
559
|
+
* use abstract: true
|
|
560
|
+
* @default: false
|
|
561
|
+
*/
|
|
562
|
+
abstract?: boolean;
|
|
563
|
+
logs?: boolean | Models_ConnectionOptionsLogs;
|
|
564
|
+
database?: boolean | Partial<Models_DatabaseConfig>;
|
|
565
|
+
/**
|
|
566
|
+
* disable default realtime communication through TCP upgrade sockets
|
|
567
|
+
*/
|
|
568
|
+
disabledRealtime?: boolean;
|
|
569
|
+
/**
|
|
570
|
+
* Will be removed soon - cloud will handle certs and https
|
|
571
|
+
* @deprecated
|
|
572
|
+
*/
|
|
573
|
+
https?: {
|
|
574
|
+
key: string;
|
|
575
|
+
cert: string;
|
|
468
576
|
};
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
* taon repositories
|
|
521
|
-
* (repositories are used to access data from db)
|
|
522
|
-
*/
|
|
523
|
-
repositories?: REPOSITORIES;
|
|
524
|
-
/**
|
|
525
|
-
* taon providers
|
|
526
|
-
* (context singletons)
|
|
527
|
-
*/
|
|
528
|
-
providers?: PROVIDERS;
|
|
529
|
-
/**
|
|
530
|
-
* taon subscribers
|
|
531
|
-
* (subscribers are used to listen to db events)
|
|
532
|
-
*/
|
|
533
|
-
subscribers?: SUBSCRIBERS;
|
|
534
|
-
/**
|
|
535
|
-
* taon migrations
|
|
536
|
-
* (migrations are used to update db schema and achieve proper CI/CD)
|
|
537
|
-
*/
|
|
538
|
-
migrations?: MIGRATIONS;
|
|
539
|
-
/**
|
|
540
|
-
* taon middlewares
|
|
541
|
-
* middlewares are used to intercept requests
|
|
542
|
-
* and responses in the context
|
|
543
|
-
*/
|
|
544
|
-
middlewares?: MIDDLEWARES;
|
|
545
|
-
/**
|
|
546
|
-
* Config for express session
|
|
547
|
-
*/
|
|
548
|
-
session?: ISession;
|
|
549
|
-
/**
|
|
550
|
-
* taon is not going to write .rest files to cwd()
|
|
551
|
-
*/
|
|
552
|
-
skipWritingServerRoutes?: boolean;
|
|
553
|
-
/**
|
|
554
|
-
* TODO - this is still in progress
|
|
555
|
-
* @deprecated
|
|
556
|
-
*/
|
|
557
|
-
productionMode?: boolean;
|
|
558
|
-
/**
|
|
559
|
-
* If you want your context to never be started as separated server
|
|
560
|
-
* use abstract: true
|
|
561
|
-
* @default: false
|
|
562
|
-
*/
|
|
563
|
-
abstract?: boolean;
|
|
564
|
-
logs?: boolean | ConnectionOptionsLogs;
|
|
565
|
-
database?: boolean | Partial<DatabaseConfig>;
|
|
566
|
-
/**
|
|
567
|
-
* disable default realtime communication through TCP upgrade sockets
|
|
568
|
-
*/
|
|
569
|
-
disabledRealtime?: boolean;
|
|
570
|
-
/**
|
|
571
|
-
* Will be removed soon - cloud will handle certs and https
|
|
572
|
-
* @deprecated
|
|
573
|
-
*/
|
|
574
|
-
https?: {
|
|
575
|
-
key: string;
|
|
576
|
-
cert: string;
|
|
577
|
-
};
|
|
578
|
-
/**
|
|
579
|
-
* TODO - will be removed soon
|
|
580
|
-
* @deprecated
|
|
581
|
-
*/
|
|
582
|
-
publicAssets?: {
|
|
583
|
-
serverPath: string;
|
|
584
|
-
locationOnDisk: string;
|
|
585
|
-
}[];
|
|
586
|
-
/**
|
|
587
|
-
* by default cwd === process.cwd()
|
|
588
|
-
*/
|
|
589
|
-
cwd?: string;
|
|
590
|
-
}
|
|
591
|
-
namespace Http {
|
|
592
|
-
export import Rest = Models$1;
|
|
593
|
-
type ContextENDPOINT = {
|
|
594
|
-
target: Function;
|
|
595
|
-
initFN: Function;
|
|
596
|
-
};
|
|
597
|
-
type FormlyFromType = 'material' | 'bootstrap';
|
|
598
|
-
type ExpressContext<T> = (req: Request<any>, res: Response<any>) => T;
|
|
599
|
-
type SyncResponse<T> = string | T;
|
|
600
|
-
type ResponseFuncOpt<T> = {
|
|
601
|
-
limitSize?: (enties: Function | Function[], include: string[], exclude: string[]) => void;
|
|
602
|
-
};
|
|
603
|
-
type SyncResponseFunc<T> = (options?: ResponseFuncOpt<T>) => SyncResponse<T>;
|
|
604
|
-
type MixResponse<T> = SyncResponse<T> | ExpressContext<T>;
|
|
605
|
-
interface ClientAction<T> {
|
|
606
|
-
/**
|
|
607
|
-
* @deprecated use request() mehods instead
|
|
608
|
-
*/
|
|
609
|
-
readonly received?: Rest.PromiseObservableMix<Rest.HttpResponse<T>>;
|
|
610
|
-
request?(axiosConfig?: Models$1.Ng2RestAxiosRequestConfig): Rest.PromiseObservableMix<Rest.HttpResponse<T>>;
|
|
611
|
-
}
|
|
612
|
-
interface AsyncResponse<T> {
|
|
613
|
-
(req?: Request<any>, res?: Response<any>): Promise<SyncResponse<T> | SyncResponseFunc<T>>;
|
|
614
|
-
}
|
|
615
|
-
type Response<T = string> = AsyncResponse<T> & ClientAction<T>;
|
|
616
|
-
}
|
|
617
|
-
interface StartParams {
|
|
618
|
-
port: number;
|
|
619
|
-
args: string[];
|
|
620
|
-
onlyMigrationRun?: boolean;
|
|
621
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
622
|
-
}
|
|
623
|
-
interface TaonInitializeParams {
|
|
624
|
-
onlyMigrationRun?: boolean;
|
|
625
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
626
|
-
}
|
|
627
|
-
interface TaonCtxCloneParams {
|
|
628
|
-
useAsRemoteContext?: boolean;
|
|
629
|
-
overrideRemoteHost?: string;
|
|
630
|
-
overrideHost?: string;
|
|
631
|
-
sourceContext?: EndpointContext;
|
|
632
|
-
}
|
|
577
|
+
/**
|
|
578
|
+
* TODO - will be removed soon
|
|
579
|
+
* @deprecated
|
|
580
|
+
*/
|
|
581
|
+
publicAssets?: {
|
|
582
|
+
serverPath: string;
|
|
583
|
+
locationOnDisk: string;
|
|
584
|
+
}[];
|
|
585
|
+
/**
|
|
586
|
+
* by default cwd === process.cwd()
|
|
587
|
+
*/
|
|
588
|
+
cwd?: string;
|
|
589
|
+
}
|
|
590
|
+
type Models_Http_ContextENDPOINT = {
|
|
591
|
+
target: Function;
|
|
592
|
+
initFN: Function;
|
|
593
|
+
};
|
|
594
|
+
type Models_Http_FormlyFromType = 'material' | 'bootstrap';
|
|
595
|
+
type Models_Http_ExpressContext<T> = (req: Request<any>, res: Response<any>) => T;
|
|
596
|
+
type Models_Http_SyncResponse<T> = string | T;
|
|
597
|
+
type Models_Http_ResponseFuncOpt<T> = {
|
|
598
|
+
limitSize?: (enties: Function | Function[], include: string[], exclude: string[]) => void;
|
|
599
|
+
};
|
|
600
|
+
type Models_Http_SyncResponseFunc<T> = (options?: Models_Http_ResponseFuncOpt<T>) => Models_Http_SyncResponse<T>;
|
|
601
|
+
type Models_Http_MixResponse<T> = Models_Http_SyncResponse<T> | Models_Http_ExpressContext<T>;
|
|
602
|
+
interface Models_Http_ClientAction<T> {
|
|
603
|
+
/**
|
|
604
|
+
* @deprecated use request() mehods instead
|
|
605
|
+
*/
|
|
606
|
+
readonly received?: Models_PromiseObservableMix<Models_HttpResponse<T>>;
|
|
607
|
+
request?(axiosConfig?: Models_Ng2RestAxiosRequestConfig): Models_PromiseObservableMix<Models_HttpResponse<T>>;
|
|
608
|
+
}
|
|
609
|
+
interface Models_Http_AsyncResponse<T> {
|
|
610
|
+
(req?: Request<any>, res?: Response<any>): Promise<Models_Http_SyncResponse<T> | Models_Http_SyncResponseFunc<T>>;
|
|
611
|
+
}
|
|
612
|
+
type Models_Http_Response<T = string> = Models_Http_AsyncResponse<T> & Models_Http_ClientAction<T>;
|
|
613
|
+
interface Models_StartParams {
|
|
614
|
+
port: number;
|
|
615
|
+
args: string[];
|
|
616
|
+
onlyMigrationRun?: boolean;
|
|
617
|
+
onlyMigrationRevertToTimestamp?: number;
|
|
618
|
+
}
|
|
619
|
+
interface Models_TaonInitializeParams {
|
|
620
|
+
onlyMigrationRun?: boolean;
|
|
621
|
+
onlyMigrationRevertToTimestamp?: number;
|
|
622
|
+
}
|
|
623
|
+
interface Models_TaonCtxCloneParams {
|
|
624
|
+
useAsRemoteContext?: boolean;
|
|
625
|
+
overrideRemoteHost?: string;
|
|
626
|
+
overrideHost?: string;
|
|
627
|
+
sourceContext?: EndpointContext;
|
|
633
628
|
}
|
|
634
629
|
|
|
635
630
|
declare class EndpointContext {
|
|
@@ -663,7 +658,7 @@ declare class EndpointContext {
|
|
|
663
658
|
private readonly objWithClassesInstancesArr;
|
|
664
659
|
readonly activeRoutes: {
|
|
665
660
|
expressPath: string;
|
|
666
|
-
method:
|
|
661
|
+
method: CoreModels_HttpMethod;
|
|
667
662
|
}[];
|
|
668
663
|
get sourceContext(): EndpointContext | undefined;
|
|
669
664
|
readonly skipWritingServerRoutes: boolean;
|
|
@@ -671,12 +666,12 @@ declare class EndpointContext {
|
|
|
671
666
|
private allTypesfromContexts;
|
|
672
667
|
expressApp: Application;
|
|
673
668
|
serverTcpUdp: Server;
|
|
674
|
-
databaseConfig?:
|
|
675
|
-
mode:
|
|
669
|
+
databaseConfig?: Models_DatabaseConfigTypeOrm;
|
|
670
|
+
mode: Models_FrameworkMode;
|
|
676
671
|
readonly onlyMigrationRun?: boolean;
|
|
677
672
|
readonly onlyMigrationRevertToTimestamp?: number;
|
|
678
673
|
get isRunOrRevertOnlyMigrationAppStart(): boolean;
|
|
679
|
-
session?:
|
|
674
|
+
session?: Models_ISession;
|
|
680
675
|
connection: DataSource;
|
|
681
676
|
private entitiesTriggers;
|
|
682
677
|
private realtime;
|
|
@@ -685,7 +680,7 @@ declare class EndpointContext {
|
|
|
685
680
|
/**
|
|
686
681
|
* available after init()
|
|
687
682
|
*/
|
|
688
|
-
config:
|
|
683
|
+
config: Models_ContextOptions<any, any, any, any, any, any, any, any>;
|
|
689
684
|
get logHttp(): boolean;
|
|
690
685
|
get logRealtime(): boolean;
|
|
691
686
|
get logFramework(): boolean;
|
|
@@ -696,14 +691,14 @@ declare class EndpointContext {
|
|
|
696
691
|
* Inside docker there is not need for https secure server
|
|
697
692
|
*/
|
|
698
693
|
readonly isRunningInsideDocker: boolean;
|
|
699
|
-
constructor(originalConfig:
|
|
694
|
+
constructor(originalConfig: Models_ContextOptions<any, any, any, any, any, any, any, any>, configFn: (env: any) => Models_ContextOptions<any, any, any, any, any, any, any, any>,
|
|
700
695
|
/**
|
|
701
696
|
* (@default: false)
|
|
702
697
|
* If TRUE context is NOT going to create db/express server/http endpoints
|
|
703
698
|
* PURPOSE OF THIS PROPERTY
|
|
704
699
|
* -> ONLY remote access from backend or frontend to specific backend
|
|
705
700
|
*/
|
|
706
|
-
cloneOptions:
|
|
701
|
+
cloneOptions: Models_TaonCtxCloneParams);
|
|
707
702
|
init(options?: {
|
|
708
703
|
initFromRecrusiveContextResovle?: boolean;
|
|
709
704
|
onlyMigrationRun?: boolean;
|
|
@@ -717,7 +712,7 @@ declare class EndpointContext {
|
|
|
717
712
|
private cloneClassesObjWithNewMetadata;
|
|
718
713
|
private getRecrusiveClassesfromContextsObj;
|
|
719
714
|
private getRecrusiveClassesfromContexts;
|
|
720
|
-
getClassInstanceObjBy(classType:
|
|
715
|
+
getClassInstanceObjBy(classType: Models_ClassType): any;
|
|
721
716
|
private getClassesInstancesArrBy;
|
|
722
717
|
inject<T>(ctor: new (...args: any[]) => T, options: {
|
|
723
718
|
localInstance?: boolean;
|
|
@@ -730,15 +725,15 @@ declare class EndpointContext {
|
|
|
730
725
|
*/
|
|
731
726
|
getInstanceBy<T>(ctor: new (...args: any[]) => T): T;
|
|
732
727
|
checkIfContextInitialized(): void;
|
|
733
|
-
getClassFunBy(classType:
|
|
734
|
-
isCLassType(classType:
|
|
728
|
+
getClassFunBy(classType: Models_ClassType): any;
|
|
729
|
+
isCLassType(classType: Models_ClassType, classFn: Function): boolean;
|
|
735
730
|
/**
|
|
736
731
|
* Only for injectable types
|
|
737
732
|
* Only for classType: CONTROLLER, REPOSITORY, PROVIDER, MIDDLEWARES
|
|
738
733
|
*/
|
|
739
734
|
getClassFunByClassName(className: string): Function;
|
|
740
735
|
getClassFunByClass(classFunction: Function): Function;
|
|
741
|
-
getClassFunByArr(classType:
|
|
736
|
+
getClassFunByArr(classType: Models_ClassType): Function[];
|
|
742
737
|
private createInstances;
|
|
743
738
|
initClasses(): Promise<void>;
|
|
744
739
|
isActiveOn(classInstance: object): boolean;
|
|
@@ -806,7 +801,7 @@ declare class EndpointContext {
|
|
|
806
801
|
initControllersHook(ctxStorage: ContextsEndpointStorage): Promise<void>;
|
|
807
802
|
initControllers(): Promise<void>;
|
|
808
803
|
writeActiveRoutes(): void;
|
|
809
|
-
get middlewares():
|
|
804
|
+
get middlewares(): Models_MiddlewareType[];
|
|
810
805
|
private initCustomClientMiddlewares;
|
|
811
806
|
private initCustomBackendMiddlewares;
|
|
812
807
|
private initBackendMiddlewares;
|
|
@@ -818,77 +813,12 @@ declare class EndpointContext {
|
|
|
818
813
|
private initClient;
|
|
819
814
|
}
|
|
820
815
|
|
|
821
|
-
/**
|
|
822
|
-
* for backendSocket.in(ROOM_NAME).emit(EVENT)
|
|
823
|
-
*
|
|
824
|
-
* Room names are uniqe..
|
|
825
|
-
* here I am limiting number of event for clients.
|
|
826
|
-
*/
|
|
827
|
-
declare class Realtime {
|
|
828
|
-
NAMESPACE(contextName: string): string;
|
|
829
|
-
TABLE_CHANGE(contextName: string, tableName: string): string;
|
|
830
|
-
readonly KEYroomSubscribe = "roomSubscribe";
|
|
831
|
-
readonly KEYroomUnsubscribe = "roomUnsubscribe";
|
|
832
|
-
ROOM_NAME_CUSTOM(contextName: string, customEvent: string): string;
|
|
833
|
-
ROOM_SUBSCRIBE_CUSTOM(contextName: string): string;
|
|
834
|
-
ROOM_UNSUBSCRIBE_CUSTOM(contextName: string): string;
|
|
835
|
-
ROOM_NAME_UPDATE_ENTITY(contextName: string, className: string, entityId: number | string): string;
|
|
836
|
-
ROOM_SUBSCRIBE_ENTITY_UPDATE_EVENTS(contextName: string): string;
|
|
837
|
-
ROOM_UNSUBSCRIBE_ENTITY_UPDATE_EVENTS(contextName: string): string;
|
|
838
|
-
ROOM_NAME_UPDATE_ENTITY_PROPERTY(contextName: string, className: string, property: string, entityId: number | string): string;
|
|
839
|
-
ROOM_SUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(contextName: string): string;
|
|
840
|
-
ROOM_UNSUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(contextName: string): string;
|
|
841
|
-
}
|
|
842
|
-
declare namespace Symbols {
|
|
843
|
-
const ctxInClassOrClassObj: unique symbol;
|
|
844
|
-
const classNameStaticProperty: string;
|
|
845
|
-
const fullClassNameStaticProperty: string;
|
|
846
|
-
const orignalClass: string;
|
|
847
|
-
const orignalClassClonesObj: string;
|
|
848
|
-
const classMethodsNames: string;
|
|
849
|
-
const REALTIME: Realtime;
|
|
850
|
-
const metadata: {
|
|
851
|
-
className: string;
|
|
852
|
-
options: {
|
|
853
|
-
controller: string;
|
|
854
|
-
entity: string;
|
|
855
|
-
repository: string;
|
|
856
|
-
provider: string;
|
|
857
|
-
subscriber: string;
|
|
858
|
-
migration: string;
|
|
859
|
-
};
|
|
860
|
-
};
|
|
861
|
-
const old: {
|
|
862
|
-
HAS_TABLE_IN_DB: symbol;
|
|
863
|
-
MDC_KEY: string;
|
|
864
|
-
WEBSQL_REST_PROGRESS_FUN: symbol;
|
|
865
|
-
WEBSQL_REST_PROGRESS_FUN_START: symbol;
|
|
866
|
-
WEBSQL_REST_PROGRESS_FUN_DONE: symbol;
|
|
867
|
-
WEBSQL_REST_PROGRESS_TIMEOUT: symbol;
|
|
868
|
-
X_TOTAL_COUNT: string;
|
|
869
|
-
CIRCURAL_OBJECTS_MAP_BODY: string;
|
|
870
|
-
CIRCURAL_OBJECTS_MAP_QUERY_PARAM: string;
|
|
871
|
-
MAPPING_CONFIG_HEADER: string;
|
|
872
|
-
MAPPING_CONFIG_HEADER_BODY_PARAMS: string;
|
|
873
|
-
MAPPING_CONFIG_HEADER_QUERY_PARAMS: string;
|
|
874
|
-
ENDPOINT_META_CONFIG: string;
|
|
875
|
-
CLASS_DECORATOR_CONTEXT: string;
|
|
876
|
-
SOCKET_MSG: string;
|
|
877
|
-
ANGULAR: {
|
|
878
|
-
INPUT_NAMES: symbol;
|
|
879
|
-
};
|
|
880
|
-
ERROR_MESSAGES: {
|
|
881
|
-
CLASS_NAME_MATCH: string;
|
|
882
|
-
};
|
|
883
|
-
};
|
|
884
|
-
}
|
|
885
|
-
|
|
886
816
|
/**
|
|
887
817
|
* @returns function that returns context function.
|
|
888
818
|
* Context function can be used to dynamically
|
|
889
819
|
* create context with specific configuration.
|
|
890
820
|
*/
|
|
891
|
-
declare const createContextTemplate: <CTX extends Record<string, object>, CTRL extends Record<string, new (...args: any[]) => any>, ENTITY extends Record<string, new (...args: any[]) => any>, REPO extends Record<string, new (...args: any[]) => any>, PROVIDER extends Record<string, new (...args: any[]) => any>, SUBSCRIBER extends Record<string, new (...args: any[]) => any>, MIGRATION extends Record<string, new (...args: any[]) => any>, MIDDLEWARE extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) =>
|
|
821
|
+
declare const createContextTemplate: <CTX extends Record<string, object>, CTRL extends Record<string, new (...args: any[]) => any>, ENTITY extends Record<string, new (...args: any[]) => any>, REPO extends Record<string, new (...args: any[]) => any>, PROVIDER extends Record<string, new (...args: any[]) => any>, SUBSCRIBER extends Record<string, new (...args: any[]) => any>, MIGRATION extends Record<string, new (...args: any[]) => any>, MIDDLEWARE extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => Models_ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARE>) => () => {
|
|
892
822
|
readonly contextName: string;
|
|
893
823
|
readonly appId: string;
|
|
894
824
|
cloneAsRemote: (cloneOpt?: {
|
|
@@ -913,7 +843,7 @@ declare const createContextTemplate: <CTX extends Record<string, object>, CTRL e
|
|
|
913
843
|
* - create controller instances for context
|
|
914
844
|
* - init database (if enable) + migation scripts
|
|
915
845
|
*/
|
|
916
|
-
initialize: (overrideOptions?:
|
|
846
|
+
initialize: (overrideOptions?: Models_TaonInitializeParams) => Promise<EndpointContext>;
|
|
917
847
|
/**
|
|
918
848
|
* realtime communication with server
|
|
919
849
|
* TCP(upgrade) socket.io (or ipc) based.
|
|
@@ -923,7 +853,7 @@ declare const createContextTemplate: <CTX extends Record<string, object>, CTRL e
|
|
|
923
853
|
readonly server: taon_browser.RealtimeServer;
|
|
924
854
|
};
|
|
925
855
|
};
|
|
926
|
-
declare const createContext: <CTX extends Record<string, object>, CTRL extends Record<string, new (...args: any[]) => any>, ENTITY extends Record<string, new (...args: any[]) => any>, REPO extends Record<string, new (...args: any[]) => any>, PROVIDER extends Record<string, new (...args: any[]) => any>, SUBSCRIBER extends Record<string, new (...args: any[]) => any>, MIGRATION extends Record<string, new (...args: any[]) => any>, MIDDLEWARES extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) =>
|
|
856
|
+
declare const createContext: <CTX extends Record<string, object>, CTRL extends Record<string, new (...args: any[]) => any>, ENTITY extends Record<string, new (...args: any[]) => any>, REPO extends Record<string, new (...args: any[]) => any>, PROVIDER extends Record<string, new (...args: any[]) => any>, SUBSCRIBER extends Record<string, new (...args: any[]) => any>, MIGRATION extends Record<string, new (...args: any[]) => any>, MIDDLEWARES extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => Models_ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARES>) => {
|
|
927
857
|
readonly contextName: string;
|
|
928
858
|
readonly appId: string;
|
|
929
859
|
cloneAsRemote: (cloneOpt?: {
|
|
@@ -948,7 +878,7 @@ declare const createContext: <CTX extends Record<string, object>, CTRL extends R
|
|
|
948
878
|
* - create controller instances for context
|
|
949
879
|
* - init database (if enable) + migation scripts
|
|
950
880
|
*/
|
|
951
|
-
initialize: (overrideOptions?:
|
|
881
|
+
initialize: (overrideOptions?: Models_TaonInitializeParams) => Promise<EndpointContext>;
|
|
952
882
|
/**
|
|
953
883
|
* realtime communication with server
|
|
954
884
|
* TCP(upgrade) socket.io (or ipc) based.
|
|
@@ -1008,17 +938,80 @@ declare class EntityProcess {
|
|
|
1008
938
|
send(): void;
|
|
1009
939
|
}
|
|
1010
940
|
|
|
1011
|
-
declare const getResponseValue: <T>(response:
|
|
941
|
+
declare const getResponseValue: <T>(response: Models_Http_Response<T>, options?: {
|
|
1012
942
|
req: Request<any>;
|
|
1013
943
|
res: Response<any>;
|
|
1014
944
|
}) => Promise<T>;
|
|
1015
945
|
|
|
1016
946
|
declare const inject: <T>(entity: () => new (...args: any[]) => T) => T;
|
|
1017
947
|
|
|
948
|
+
/**
|
|
949
|
+
* for backendSocket.in(ROOM_NAME).emit(EVENT)
|
|
950
|
+
*
|
|
951
|
+
* Room names are uniqe..
|
|
952
|
+
* here I am limiting number of event for clients.
|
|
953
|
+
*/
|
|
954
|
+
declare class Realtime {
|
|
955
|
+
NAMESPACE(contextName: string): string;
|
|
956
|
+
TABLE_CHANGE(contextName: string, tableName: string): string;
|
|
957
|
+
readonly KEYroomSubscribe = "roomSubscribe";
|
|
958
|
+
readonly KEYroomUnsubscribe = "roomUnsubscribe";
|
|
959
|
+
ROOM_NAME_CUSTOM(contextName: string, customEvent: string): string;
|
|
960
|
+
ROOM_SUBSCRIBE_CUSTOM(contextName: string): string;
|
|
961
|
+
ROOM_UNSUBSCRIBE_CUSTOM(contextName: string): string;
|
|
962
|
+
ROOM_NAME_UPDATE_ENTITY(contextName: string, className: string, entityId: number | string): string;
|
|
963
|
+
ROOM_SUBSCRIBE_ENTITY_UPDATE_EVENTS(contextName: string): string;
|
|
964
|
+
ROOM_UNSUBSCRIBE_ENTITY_UPDATE_EVENTS(contextName: string): string;
|
|
965
|
+
ROOM_NAME_UPDATE_ENTITY_PROPERTY(contextName: string, className: string, property: string, entityId: number | string): string;
|
|
966
|
+
ROOM_SUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(contextName: string): string;
|
|
967
|
+
ROOM_UNSUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(contextName: string): string;
|
|
968
|
+
}
|
|
969
|
+
declare const Symbols_ctxInClassOrClassObj: unique symbol;
|
|
970
|
+
declare const Symbols_classNameStaticProperty: string;
|
|
971
|
+
declare const Symbols_fullClassNameStaticProperty: string;
|
|
972
|
+
declare const Symbols_orignalClass: string;
|
|
973
|
+
declare const Symbols_orignalClassClonesObj: string;
|
|
974
|
+
declare const Symbols_classMethodsNames: string;
|
|
975
|
+
declare const Symbols_REALTIME: Realtime;
|
|
976
|
+
declare const Symbols_metadata: {
|
|
977
|
+
className: string;
|
|
978
|
+
options: {
|
|
979
|
+
controller: string;
|
|
980
|
+
entity: string;
|
|
981
|
+
repository: string;
|
|
982
|
+
provider: string;
|
|
983
|
+
subscriber: string;
|
|
984
|
+
migration: string;
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
declare const Symbols_old: {
|
|
988
|
+
HAS_TABLE_IN_DB: symbol;
|
|
989
|
+
MDC_KEY: string;
|
|
990
|
+
WEBSQL_REST_PROGRESS_FUN: symbol;
|
|
991
|
+
WEBSQL_REST_PROGRESS_FUN_START: symbol;
|
|
992
|
+
WEBSQL_REST_PROGRESS_FUN_DONE: symbol;
|
|
993
|
+
WEBSQL_REST_PROGRESS_TIMEOUT: symbol;
|
|
994
|
+
X_TOTAL_COUNT: string;
|
|
995
|
+
CIRCURAL_OBJECTS_MAP_BODY: string;
|
|
996
|
+
CIRCURAL_OBJECTS_MAP_QUERY_PARAM: string;
|
|
997
|
+
MAPPING_CONFIG_HEADER: string;
|
|
998
|
+
MAPPING_CONFIG_HEADER_BODY_PARAMS: string;
|
|
999
|
+
MAPPING_CONFIG_HEADER_QUERY_PARAMS: string;
|
|
1000
|
+
ENDPOINT_META_CONFIG: string;
|
|
1001
|
+
CLASS_DECORATOR_CONTEXT: string;
|
|
1002
|
+
SOCKET_MSG: string;
|
|
1003
|
+
ANGULAR: {
|
|
1004
|
+
INPUT_NAMES: symbol;
|
|
1005
|
+
};
|
|
1006
|
+
ERROR_MESSAGES: {
|
|
1007
|
+
CLASS_NAME_MATCH: string;
|
|
1008
|
+
};
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1018
1011
|
interface TaonAdditionalMiddlewareMethodInfo {
|
|
1019
1012
|
methodName: string;
|
|
1020
1013
|
expressPath: string;
|
|
1021
|
-
httpRequestType:
|
|
1014
|
+
httpRequestType: CoreModels_HttpMethod;
|
|
1022
1015
|
}
|
|
1023
1016
|
/**
|
|
1024
1017
|
* TODO
|
|
@@ -1077,8 +1070,8 @@ interface TaonHttpDecoratorOptions {
|
|
|
1077
1070
|
* @deprecated don't use in production - keep stuff encapsulated
|
|
1078
1071
|
*/
|
|
1079
1072
|
pathIsGlobal?: boolean;
|
|
1080
|
-
overrideContentType?:
|
|
1081
|
-
overrideResponseType?:
|
|
1073
|
+
overrideContentType?: CoreModels_ContentType;
|
|
1074
|
+
overrideResponseType?: Models_ResponseTypeAxios;
|
|
1082
1075
|
/**
|
|
1083
1076
|
* Express will send response as HTML string with proper headers
|
|
1084
1077
|
*/
|
|
@@ -1094,7 +1087,7 @@ declare function GET(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGl
|
|
|
1094
1087
|
* ...
|
|
1095
1088
|
* // in your taon controller
|
|
1096
1089
|
* ..Taon.Http.HTML()
|
|
1097
|
-
* sendHtmlDummyWebsite():
|
|
1090
|
+
* sendHtmlDummyWebsite(): Taon_ResponseHtml {
|
|
1098
1091
|
* return `
|
|
1099
1092
|
<html>
|
|
1100
1093
|
<head>
|
|
@@ -1119,7 +1112,7 @@ declare function DELETE(pathOrOptions?: string | TaonHttpDecoratorOptions, pathI
|
|
|
1119
1112
|
|
|
1120
1113
|
declare class ParamConfig {
|
|
1121
1114
|
paramName: string;
|
|
1122
|
-
paramType:
|
|
1115
|
+
paramType: CoreModels_ParamType;
|
|
1123
1116
|
index: number;
|
|
1124
1117
|
defaultType: any;
|
|
1125
1118
|
expireInSeconds?: number;
|
|
@@ -1142,7 +1135,7 @@ declare class MethodConfig implements Pick<TaonHttpDecoratorOptions, 'path' | 'm
|
|
|
1142
1135
|
overrideExpressSendAsHtml?: boolean;
|
|
1143
1136
|
path: string;
|
|
1144
1137
|
descriptor: PropertyDescriptor;
|
|
1145
|
-
type:
|
|
1138
|
+
type: CoreModels_HttpMethod;
|
|
1146
1139
|
parameters: {
|
|
1147
1140
|
[paramName: string]: Partial<ParamConfig>;
|
|
1148
1141
|
};
|
|
@@ -1161,12 +1154,10 @@ declare class MethodConfig implements Pick<TaonHttpDecoratorOptions, 'path' | 'm
|
|
|
1161
1154
|
calculatedMiddlewares: (typeof TaonBaseMiddleware)[];
|
|
1162
1155
|
}
|
|
1163
1156
|
|
|
1164
|
-
declare
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
const preventUndefinedModel: (model: any, id: any) => void;
|
|
1169
|
-
}
|
|
1157
|
+
declare const Validators_classNameVlidation: (className: any, target: Function) => any;
|
|
1158
|
+
declare const Validators_checkIfMethodsWithReponseTYpeAlowed: (methods: MethodConfig[], current: MethodConfig) => void;
|
|
1159
|
+
declare const Validators_validateClassFunctions: (controllers: any[], entities: any[], proviers: any[], repositories: any[]) => void;
|
|
1160
|
+
declare const Validators_preventUndefinedModel: (model: any, id: any) => void;
|
|
1170
1161
|
|
|
1171
1162
|
declare class TaonBaseClass<CloneT extends TaonBaseClass = any> {
|
|
1172
1163
|
/**
|
|
@@ -1259,7 +1250,7 @@ declare const TaonBaseContext: {
|
|
|
1259
1250
|
readonly __refSync: taon_browser.EndpointContext;
|
|
1260
1251
|
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
1261
1252
|
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
1262
|
-
initialize: (overrideOptions?: taon_browser.
|
|
1253
|
+
initialize: (overrideOptions?: taon_browser.Models_TaonInitializeParams) => Promise<taon_browser.EndpointContext>;
|
|
1263
1254
|
readonly realtime: {
|
|
1264
1255
|
readonly client: taon_browser.RealtimeClient;
|
|
1265
1256
|
readonly server: taon_browser.RealtimeServer;
|
|
@@ -1285,13 +1276,13 @@ declare class TaonBaseController<UPLOAD_FILE_QUERY_PARAMS = {}> extends TaonBase
|
|
|
1285
1276
|
afterAllCtxInited(options: {
|
|
1286
1277
|
ctxStorage: ContextsEndpointStorage;
|
|
1287
1278
|
}): Promise<void>;
|
|
1288
|
-
uploadFormDataToServer(formData: FormData, queryParams?: UPLOAD_FILE_QUERY_PARAMS):
|
|
1279
|
+
uploadFormDataToServer(formData: FormData, queryParams?: UPLOAD_FILE_QUERY_PARAMS): Models_Http_Response<MulterFileUploadResponse[]>;
|
|
1289
1280
|
/**
|
|
1290
1281
|
* Hook after file is uploaded
|
|
1291
1282
|
* through `uploadFormDataToServer` or `uploadLocalFileToServer`
|
|
1292
1283
|
*/
|
|
1293
1284
|
protected afterFileUploadAction(file?: MulterFileUploadResponse, queryParams?: UPLOAD_FILE_QUERY_PARAMS): void | Promise<void>;
|
|
1294
|
-
uploadLocalFileToServer(absFilePath: string, options?: Pick<
|
|
1285
|
+
uploadLocalFileToServer(absFilePath: string, options?: Pick<Models_Ng2RestAxiosRequestConfig, 'onUploadProgress'>, queryParams?: UPLOAD_FILE_QUERY_PARAMS): Promise<MulterFileUploadResponse[]>;
|
|
1295
1286
|
/**
|
|
1296
1287
|
* Easy way to wait for status change with http (1s default) pooling.
|
|
1297
1288
|
*
|
|
@@ -1317,7 +1308,7 @@ declare class TaonBaseController<UPLOAD_FILE_QUERY_PARAMS = {}> extends TaonBase
|
|
|
1317
1308
|
*/
|
|
1318
1309
|
reqIndexNum?: number;
|
|
1319
1310
|
httpErrorsCount?: number;
|
|
1320
|
-
}) => ReturnType<
|
|
1311
|
+
}) => ReturnType<Models_Http_Response<T>['request']>;
|
|
1321
1312
|
poolingInterval?: number;
|
|
1322
1313
|
/**
|
|
1323
1314
|
* default infinite tries
|
|
@@ -1357,18 +1348,18 @@ declare abstract class TaonBaseCrudController<Entity, UPLOAD_FILE_QUERY_PARAMS =
|
|
|
1357
1348
|
*/
|
|
1358
1349
|
abstract entityClassResolveFn: () => any;
|
|
1359
1350
|
_(): Promise<void>;
|
|
1360
|
-
bufforedChanges(id: number | string, property: string, alreadyLength?: number):
|
|
1361
|
-
pagination(pageNumber?: number, pageSize?: number, search?: string):
|
|
1362
|
-
getAll():
|
|
1363
|
-
getBy(id: number | string):
|
|
1364
|
-
updateById(id: number | string, item: Entity):
|
|
1365
|
-
patchById(id: number | string, item: Entity):
|
|
1366
|
-
bulkUpdate(items: Entity[]):
|
|
1367
|
-
deleteById(id: number | string):
|
|
1368
|
-
bulkDelete(ids: (number | string)[]):
|
|
1369
|
-
clearTable():
|
|
1370
|
-
save(item: Entity):
|
|
1371
|
-
bulkCreate(items: Entity):
|
|
1351
|
+
bufforedChanges(id: number | string, property: string, alreadyLength?: number): Models_Http_Response<string | any[]>;
|
|
1352
|
+
pagination(pageNumber?: number, pageSize?: number, search?: string): Models_Http_Response<Entity[]>;
|
|
1353
|
+
getAll(): Models_Http_Response<Entity[]>;
|
|
1354
|
+
getBy(id: number | string): Models_Http_Response<Entity>;
|
|
1355
|
+
updateById(id: number | string, item: Entity): Models_Http_Response<Entity>;
|
|
1356
|
+
patchById(id: number | string, item: Entity): Models_Http_Response<Entity>;
|
|
1357
|
+
bulkUpdate(items: Entity[]): Models_Http_Response<Entity[]>;
|
|
1358
|
+
deleteById(id: number | string): Models_Http_Response<Entity>;
|
|
1359
|
+
bulkDelete(ids: (number | string)[]): Models_Http_Response<(number | string | Entity)[]>;
|
|
1360
|
+
clearTable(): Models_Http_Response<void>;
|
|
1361
|
+
save(item: Entity): Models_Http_Response<Entity>;
|
|
1362
|
+
bulkCreate(items: Entity): Models_Http_Response<Entity[]>;
|
|
1372
1363
|
}
|
|
1373
1364
|
|
|
1374
1365
|
/**
|
|
@@ -1540,7 +1531,7 @@ declare class RepeatTypeComponent extends FieldArrayType {
|
|
|
1540
1531
|
type FormlyInputType = 'input' | 'switch' | 'datepicker' | 'repeat' | 'group' | 'select';
|
|
1541
1532
|
|
|
1542
1533
|
declare function getFromlyConfigFor(target: Function, options?: {
|
|
1543
|
-
formType?:
|
|
1534
|
+
formType?: CoreModels_UIFramework;
|
|
1544
1535
|
keysPathesToInclude?: string[];
|
|
1545
1536
|
keysPathesToExclude?: string[];
|
|
1546
1537
|
parentModel?: string;
|
|
@@ -1575,47 +1566,43 @@ declare function RegisterComponentTypeForEntity(entity: Function | Function[]):
|
|
|
1575
1566
|
declare function RegisterComponentType(className: string, ...optionslNames: string[]): any;
|
|
1576
1567
|
declare function getRegisteredComponents(): FormlyEntityType[];
|
|
1577
1568
|
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
const getClassConfig: (constructor: Function) => Partial<ControllerConfig> | undefined;
|
|
1599
|
-
}
|
|
1569
|
+
/**
|
|
1570
|
+
* TODO - repalce in every place when getting class fn from object
|
|
1571
|
+
*/
|
|
1572
|
+
declare const ClassHelpers_getClassFnFromObject: (json: Object) => any;
|
|
1573
|
+
declare const ClassHelpers_getName: (classFnOrObject: any) => string;
|
|
1574
|
+
declare const ClassHelpers_getOrginalClass: (classFnOrObject: any) => any;
|
|
1575
|
+
declare const ClassHelpers_getFullInternalName: (classFnOrObject: any) => string;
|
|
1576
|
+
declare const ClassHelpers_getUniqueKey: (classFnOrObject: any) => string;
|
|
1577
|
+
declare const ClassHelpers_isContextClassObject: (obj: any) => boolean;
|
|
1578
|
+
declare const ClassHelpers_setName: (target: Function, className: string) => void;
|
|
1579
|
+
declare const ClassHelpers_hasParentClassWithName: (target: Function, className: string, targets?: any[]) => boolean;
|
|
1580
|
+
/**
|
|
1581
|
+
* Express async handler for middleware functions.
|
|
1582
|
+
*/
|
|
1583
|
+
declare const ClassHelpers_asyncHandler: (fn: any) => (req: any, res: any, next: any) => void;
|
|
1584
|
+
declare const ClassHelpers_getMethodsNames: (classOrClassInstance: any, allMethodsNames?: any[]) => string[];
|
|
1585
|
+
declare const ClassHelpers_getControllerConfigs: (target: Function, configs?: ControllerConfig[], callerTarget?: Function) => ControllerConfig[];
|
|
1586
|
+
declare const ClassHelpers_ensureClassConfig: (target: Function) => Partial<ControllerConfig>;
|
|
1587
|
+
declare const ClassHelpers_ensureMethodConfig: (target: any, propertyKey: string | symbol) => Partial<MethodConfig>;
|
|
1588
|
+
declare const ClassHelpers_getClassConfig: (constructor: Function) => Partial<ControllerConfig> | undefined;
|
|
1600
1589
|
|
|
1601
1590
|
declare const cloneObj: <CloneT>(override: Partial<CloneT>, classFn: Function) => CloneT;
|
|
1602
1591
|
|
|
1603
|
-
declare
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
};
|
|
1618
|
-
}
|
|
1592
|
+
declare const TaonHelpers_fillUpTo: (s: string, nCharacters: number) => string;
|
|
1593
|
+
declare const TaonHelpers_isGoodPath: (p: string) => boolean;
|
|
1594
|
+
declare const TaonHelpers_firstStringOrElemFromArray: (stringOrArrayOfString: string[] | string) => string;
|
|
1595
|
+
declare const TaonHelpers_tryTransformParam: (param: any) => any;
|
|
1596
|
+
declare const TaonHelpers_getExpressPath: (c: ControllerConfig, pathOrClassConfig: Partial<MethodConfig>) => string;
|
|
1597
|
+
declare const TaonHelpers_defaultType: (value: any) => {};
|
|
1598
|
+
declare const TaonHelpers_parseJSONwithStringJSONs: (object: Object, waring?: boolean) => Object;
|
|
1599
|
+
declare const TaonHelpers_isPlainFileOrFolder: (filePath: any) => boolean;
|
|
1600
|
+
declare const TaonHelpers_ipcKeyNameResponse: (target: Function, methodConfig: Partial<MethodConfig>, expressPath: string) => string;
|
|
1601
|
+
declare const TaonHelpers_ipcKeyNameRequest: (target: Function, methodConfig: Partial<MethodConfig>, expressPath: string) => string;
|
|
1602
|
+
declare const TaonHelpers_websqlMocks: (headers: any) => {
|
|
1603
|
+
request: Express.Request;
|
|
1604
|
+
response: Express.Response;
|
|
1605
|
+
};
|
|
1619
1606
|
|
|
1620
1607
|
/**
|
|
1621
1608
|
* 100 default characters varchar
|
|
@@ -1697,32 +1684,30 @@ declare abstract class RealtimeStrategy {
|
|
|
1697
1684
|
abstract toString(): string;
|
|
1698
1685
|
}
|
|
1699
1686
|
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
idOrUniqValue?: any;
|
|
1723
|
-
}
|
|
1724
|
-
type EventHandler = (...args: any[]) => void;
|
|
1687
|
+
type RealtimeModels_SubsManagerOpt = {
|
|
1688
|
+
core: RealtimeCore;
|
|
1689
|
+
customEvent: string;
|
|
1690
|
+
roomName: string;
|
|
1691
|
+
property: string;
|
|
1692
|
+
};
|
|
1693
|
+
interface RealtimeModels_ChangeOption {
|
|
1694
|
+
/**
|
|
1695
|
+
* Specify property name to listen changes on that property only;
|
|
1696
|
+
*/
|
|
1697
|
+
property?: string;
|
|
1698
|
+
/**
|
|
1699
|
+
* Override custom event name to listen
|
|
1700
|
+
*/
|
|
1701
|
+
customEvent?: string;
|
|
1702
|
+
/**
|
|
1703
|
+
* Value from entity object.
|
|
1704
|
+
* Key for this value is usually id or unique key
|
|
1705
|
+
* property defined in entity decorator.
|
|
1706
|
+
* TODO @LAST IMPLEMENT unique key support
|
|
1707
|
+
*/
|
|
1708
|
+
idOrUniqValue?: any;
|
|
1725
1709
|
}
|
|
1710
|
+
type RealtimeModels_EventHandler = (...args: any[]) => void;
|
|
1726
1711
|
|
|
1727
1712
|
declare class MockServerIpc {
|
|
1728
1713
|
contextName: string;
|
|
@@ -1748,8 +1733,8 @@ declare class MockNamespaceIpc {
|
|
|
1748
1733
|
* Namespace name
|
|
1749
1734
|
*/
|
|
1750
1735
|
name: string, server: MockServerIpc);
|
|
1751
|
-
on(eventName: string, callback:
|
|
1752
|
-
off(event: string, callback?:
|
|
1736
|
+
on(eventName: string, callback: RealtimeModels_EventHandler): any;
|
|
1737
|
+
off(event: string, callback?: RealtimeModels_EventHandler): any;
|
|
1753
1738
|
emit(eventName: string, ...args: any[]): any;
|
|
1754
1739
|
to(roomName: string): RoomEmitterIpc;
|
|
1755
1740
|
in(roomName: string): RoomEmitterIpc;
|
|
@@ -1882,7 +1867,7 @@ declare class RealtimeClient {
|
|
|
1882
1867
|
* myContext.realtimeServer.triggerEntityChanges(myEntityInstance);
|
|
1883
1868
|
* ...
|
|
1884
1869
|
*/
|
|
1885
|
-
listenChangesEntity<RESULT = any>(entityClassFnOrObj: Function | object, options?:
|
|
1870
|
+
listenChangesEntity<RESULT = any>(entityClassFnOrObj: Function | object, options?: RealtimeModels_ChangeOption): Observable<RESULT>;
|
|
1886
1871
|
/**
|
|
1887
1872
|
* Listen changes entity table
|
|
1888
1873
|
* Example: for pagination, lists update ...
|
|
@@ -1902,7 +1887,7 @@ declare class RealtimeSubsManager {
|
|
|
1902
1887
|
private options;
|
|
1903
1888
|
private isListening;
|
|
1904
1889
|
private observers;
|
|
1905
|
-
constructor(options:
|
|
1890
|
+
constructor(options: RealtimeModels_SubsManagerOpt);
|
|
1906
1891
|
startListenIfNotStarted(realtime: Socket<DefaultEventsMap, DefaultEventsMap>): void;
|
|
1907
1892
|
add(observer: Subscriber<any>): void;
|
|
1908
1893
|
remove(observer: Subscriber<any>): void;
|
|
@@ -1925,8 +1910,8 @@ declare class TaonEntityOptions<T = any> extends DecoratorAbstractOpt {
|
|
|
1925
1910
|
*/
|
|
1926
1911
|
uniqueKeyProp?: string;
|
|
1927
1912
|
createTable?: boolean;
|
|
1928
|
-
defaultModelValues?:
|
|
1929
|
-
defaultModelMapping?:
|
|
1913
|
+
defaultModelValues?: Mapping_ModelValue<T>;
|
|
1914
|
+
defaultModelMapping?: Mapping_Mapping<T>;
|
|
1930
1915
|
defaultModelMappingDeep?: {
|
|
1931
1916
|
[lodashPathes: string]: string | [string];
|
|
1932
1917
|
};
|
|
@@ -1999,91 +1984,86 @@ declare class TaonAdminService {
|
|
|
1999
1984
|
logout(): void;
|
|
2000
1985
|
}
|
|
2001
1986
|
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
1987
|
+
/**
|
|
1988
|
+
* Remove global taon loader from env.ts [loading.preAngularBootstrap]
|
|
1989
|
+
*/
|
|
1990
|
+
declare const Taon_removeLoader: (afterMS?: number) => Promise<void>;
|
|
1991
|
+
declare const Taon_error: (opt: Pick<RestErrorResponseWrapper, "message" | "status" | "details" | "code"> | string) => void;
|
|
1992
|
+
type Taon_ResponseHtml = Models_Http_Response<string>;
|
|
1993
|
+
declare const Taon_getResponseValue: <T>(response: Models_Http_Response<T>, options?: {
|
|
1994
|
+
req: express.Request<any>;
|
|
1995
|
+
res: express.Response<any>;
|
|
1996
|
+
}) => Promise<T>;
|
|
1997
|
+
declare const Taon_isBrowser: boolean;
|
|
1998
|
+
declare const Taon_isNode: boolean;
|
|
1999
|
+
declare const Taon_isWebSQL: boolean;
|
|
2000
|
+
declare const Taon_isElectron: boolean;
|
|
2001
|
+
declare const Taon_createContext: <CTX extends Record<string, object>, CTRL extends Record<string, new (...args: any[]) => any>, ENTITY extends Record<string, new (...args: any[]) => any>, REPO extends Record<string, new (...args: any[]) => any>, PROVIDER extends Record<string, new (...args: any[]) => any>, SUBSCRIBER extends Record<string, new (...args: any[]) => any>, MIGRATION extends Record<string, new (...args: any[]) => any>, MIDDLEWARES extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => Models_ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARES>) => {
|
|
2002
|
+
readonly contextName: string;
|
|
2003
|
+
readonly appId: string;
|
|
2004
|
+
cloneAsRemote: (cloneOpt?: {
|
|
2005
|
+
overrideRemoteHost?: string;
|
|
2006
|
+
}) => /*elided*/ any;
|
|
2007
|
+
cloneAsNormal: (cloneOpt?: {
|
|
2008
|
+
overrideHost?: string;
|
|
2009
|
+
}) => /*elided*/ any;
|
|
2010
|
+
__ref(): Promise<EndpointContext>;
|
|
2011
|
+
readonly __refSync: EndpointContext;
|
|
2012
|
+
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
2013
|
+
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
2014
|
+
initialize: (overrideOptions?: Models_TaonInitializeParams) => Promise<EndpointContext>;
|
|
2015
|
+
readonly realtime: {
|
|
2016
|
+
readonly client: taon_browser.RealtimeClient;
|
|
2017
|
+
readonly server: taon_browser.RealtimeServer;
|
|
2018
|
+
};
|
|
2019
|
+
};
|
|
2020
|
+
declare const Taon_createContextTemplate: <CTX extends Record<string, object>, CTRL extends Record<string, new (...args: any[]) => any>, ENTITY extends Record<string, new (...args: any[]) => any>, REPO extends Record<string, new (...args: any[]) => any>, PROVIDER extends Record<string, new (...args: any[]) => any>, SUBSCRIBER extends Record<string, new (...args: any[]) => any>, MIGRATION extends Record<string, new (...args: any[]) => any>, MIDDLEWARE extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => Models_ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARE>) => () => {
|
|
2021
|
+
readonly contextName: string;
|
|
2022
|
+
readonly appId: string;
|
|
2023
|
+
cloneAsRemote: (cloneOpt?: {
|
|
2024
|
+
overrideRemoteHost?: string;
|
|
2025
|
+
}) => /*elided*/ any;
|
|
2026
|
+
cloneAsNormal: (cloneOpt?: {
|
|
2027
|
+
overrideHost?: string;
|
|
2028
|
+
}) => /*elided*/ any;
|
|
2029
|
+
__ref(): Promise<EndpointContext>;
|
|
2030
|
+
readonly __refSync: EndpointContext;
|
|
2031
|
+
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
2032
|
+
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
2033
|
+
initialize: (overrideOptions?: Models_TaonInitializeParams) => Promise<EndpointContext>;
|
|
2034
|
+
readonly realtime: {
|
|
2035
|
+
readonly client: taon_browser.RealtimeClient;
|
|
2036
|
+
readonly server: taon_browser.RealtimeServer;
|
|
2037
2037
|
};
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2038
|
+
};
|
|
2039
|
+
declare const Taon_inject: <T>(entity: () => new (...args: any[]) => T) => T;
|
|
2040
|
+
/**
|
|
2041
|
+
* @deprecated
|
|
2042
|
+
* use createContext instead
|
|
2043
|
+
*/
|
|
2044
|
+
declare const Taon_init: (options: {
|
|
2045
|
+
host: string;
|
|
2046
|
+
entities: Function[];
|
|
2047
|
+
controllers: Function[];
|
|
2048
|
+
}) => Promise<{
|
|
2049
|
+
readonly contextName: string;
|
|
2050
|
+
readonly appId: string;
|
|
2051
|
+
cloneAsRemote: (cloneOpt?: {
|
|
2052
|
+
overrideRemoteHost?: string;
|
|
2053
|
+
}) => /*elided*/ any;
|
|
2054
|
+
cloneAsNormal: (cloneOpt?: {
|
|
2055
|
+
overrideHost?: string;
|
|
2056
|
+
}) => /*elided*/ any;
|
|
2057
|
+
__ref(): Promise<EndpointContext>;
|
|
2058
|
+
readonly __refSync: EndpointContext;
|
|
2059
|
+
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
2060
|
+
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
2061
|
+
initialize: (overrideOptions?: Models_TaonInitializeParams) => Promise<EndpointContext>;
|
|
2062
|
+
readonly realtime: {
|
|
2063
|
+
readonly client: taon_browser.RealtimeClient;
|
|
2064
|
+
readonly server: taon_browser.RealtimeServer;
|
|
2056
2065
|
};
|
|
2057
|
-
|
|
2058
|
-
const symbols: typeof Symbols;
|
|
2059
|
-
/**
|
|
2060
|
-
* @deprecated
|
|
2061
|
-
* use createContext instead
|
|
2062
|
-
*/
|
|
2063
|
-
const init: (options: {
|
|
2064
|
-
host: string;
|
|
2065
|
-
entities: Function[];
|
|
2066
|
-
controllers: Function[];
|
|
2067
|
-
}) => Promise<{
|
|
2068
|
-
readonly contextName: string;
|
|
2069
|
-
readonly appId: string;
|
|
2070
|
-
cloneAsRemote: (cloneOpt?: {
|
|
2071
|
-
overrideRemoteHost?: string;
|
|
2072
|
-
}) => /*elided*/ any;
|
|
2073
|
-
cloneAsNormal: (cloneOpt?: {
|
|
2074
|
-
overrideHost?: string;
|
|
2075
|
-
}) => /*elided*/ any;
|
|
2076
|
-
__ref(): Promise<EndpointContext>;
|
|
2077
|
-
readonly __refSync: EndpointContext;
|
|
2078
|
-
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
2079
|
-
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
2080
|
-
initialize: (overrideOptions?: Models.TaonInitializeParams) => Promise<EndpointContext>;
|
|
2081
|
-
readonly realtime: {
|
|
2082
|
-
readonly client: taon_browser.RealtimeClient;
|
|
2083
|
-
readonly server: taon_browser.RealtimeServer;
|
|
2084
|
-
};
|
|
2085
|
-
}>;
|
|
2086
|
-
}
|
|
2066
|
+
}>;
|
|
2087
2067
|
declare const TAON_FLATTEN_MAPPING: {
|
|
2088
2068
|
'taon/src': {
|
|
2089
2069
|
'Taon.Http.GET': string;
|
|
@@ -2174,5 +2154,5 @@ declare const TAON_FLATTEN_MAPPING: {
|
|
|
2174
2154
|
};
|
|
2175
2155
|
};
|
|
2176
2156
|
|
|
2177
|
-
export { BaseTaonClassesNames, Body, BooleanColumn, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL,
|
|
2178
|
-
export type { AbstractEntityOmitKeys, FormlyArrayTransformFn, FormlyEntityType, FormlyInputType, MigrationStatus, MulterFileUploadResponse, TaonAdditionalMiddlewareMethodInfo, TaonContext, TaonEntityKeysToOmit, TaonHttpDecoratorOptions, TaonMiddlewareFunction, TaonMiddlewareInheritanceObj };
|
|
2157
|
+
export { BaseTaonClassesNames, Body, BooleanColumn, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL, ClassHelpers_asyncHandler, ClassHelpers_ensureClassConfig, ClassHelpers_ensureMethodConfig, ClassHelpers_getClassConfig, ClassHelpers_getClassFnFromObject, ClassHelpers_getControllerConfigs, ClassHelpers_getFullInternalName, ClassHelpers_getMethodsNames, ClassHelpers_getName, ClassHelpers_getOrginalClass, ClassHelpers_getUniqueKey, ClassHelpers_hasParentClassWithName, ClassHelpers_isContextClassObject, ClassHelpers_setName, ContextDbMigrations, ContextsEndpointStorage, ControllerConfig, Cookie, DELETE, DITaonContainer, DateTimeColumn, DecimalNumberColumn, DecoratorAbstractOpt, EndpointContext, EntityProcess, FormlyHorizontalWrapper, GET, HEAD, HTML, Header, MethodConfig, MockNamespaceIpc, MockServerIpc, MockSocketIpc, Models_ClassType, Models_ClassTypeKey, Models_DatabaseConfig, Models_DatabaseConfigTypeOrm, Models_DatabasesFolder, NumberColumn, PATCH, POST, PUT, ParamConfig, Path, Query, RealtimeClient, RealtimeCore, RealtimeServer, RealtimeStrategy, RealtimeStrategyIpc, RealtimeStrategyMock, RealtimeStrategySocketIO, RealtimeSubsManager, RegisterComponentType, RegisterComponentTypeForEntity, RepeatTypeComponent, SimpleJsonColumn, String100Column, String200Column, String20Column, String45Column, String500Column, StringColumn, Symbols_REALTIME, Symbols_classMethodsNames, Symbols_classNameStaticProperty, Symbols_ctxInClassOrClassObj, Symbols_fullClassNameStaticProperty, Symbols_metadata, Symbols_old, Symbols_orignalClass, Symbols_orignalClassClonesObj, TAON_CONTEXT, TAON_FLATTEN_MAPPING, TaonAdminService, TaonBaseAbstractEntity, TaonBaseAngularService, TaonBaseClass, TaonBaseContext, TaonBaseController, TaonBaseCrudController, TaonBaseCustomRepository, TaonBaseEntity, TaonBaseFileUploadMiddleware, TaonBaseInjector, TaonBaseMiddleware, TaonBaseMigration, TaonBaseProvider, TaonBaseRepository, TaonBaseSubscriberForEntity, TaonController, TaonControllerOptions, TaonEntity, TaonEntityKeysToOmitArr, TaonEntityOptions, TaonHelpers_defaultType, TaonHelpers_fillUpTo, TaonHelpers_firstStringOrElemFromArray, TaonHelpers_getExpressPath, TaonHelpers_ipcKeyNameRequest, TaonHelpers_ipcKeyNameResponse, TaonHelpers_isGoodPath, TaonHelpers_isPlainFileOrFolder, TaonHelpers_parseJSONwithStringJSONs, TaonHelpers_tryTransformParam, TaonHelpers_websqlMocks, TaonMiddleware, TaonMiddlewareOptions, TaonMigration, TaonMigrationOptions, TaonProvider, TaonProviderOptions, TaonRepository, TaonRepositoryOptions, TaonRestResponseWrapper, TaonSubscriber, TaonSubscriberOptions, TaonTempDatabasesFolder, TaonTempRoutesFolder, Taon_createContext, Taon_createContextTemplate, Taon_error, Taon_getResponseValue, Taon_init, Taon_inject, Taon_isBrowser, Taon_isElectron, Taon_isNode, Taon_isWebSQL, Taon_removeLoader, Validators_checkIfMethodsWithReponseTYpeAlowed, Validators_classNameVlidation, Validators_preventUndefinedModel, Validators_validateClassFunctions, apiPrefix, cloneObj, controllerConfigFrom, createContext, createContextTemplate, findTypeForEntity, getFromlyConfigFor, getRegisteredComponents, getResponseValue, getTransformFunction, inject, singleTransform, typeFromEntity, typeFromName };
|
|
2158
|
+
export type { AbstractEntityOmitKeys, FormlyArrayTransformFn, FormlyEntityType, FormlyInputType, MigrationStatus, Models_ConnectionOptionsLogs, Models_ContextOptions, Models_DBRecreateMode, Models_FrameworkMode, Models_Http_AsyncResponse, Models_Http_ClientAction, Models_Http_ContextENDPOINT, Models_Http_ExpressContext, Models_Http_FormlyFromType, Models_Http_MixResponse, Models_Http_Response, Models_Http_ResponseFuncOpt, Models_Http_SyncResponse, Models_Http_SyncResponseFunc, Models_ISession, Models_MiddlewareType, Models_StartParams, Models_TaonCtxCloneParams, Models_TaonInitializeParams, MulterFileUploadResponse, RealtimeModels_ChangeOption, RealtimeModels_EventHandler, RealtimeModels_SubsManagerOpt, TaonAdditionalMiddlewareMethodInfo, TaonContext, TaonEntityKeysToOmit, TaonHttpDecoratorOptions, TaonMiddlewareFunction, TaonMiddlewareInheritanceObj, Taon_ResponseHtml };
|