taon 21.0.29 → 21.0.34

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.
Files changed (164) hide show
  1. package/browser/fesm2022/taon-browser.mjs +2 -14
  2. package/browser/fesm2022/taon-browser.mjs.map +1 -1
  3. package/browser/package.json +1 -1
  4. package/browser/types/taon-browser.d.ts +76 -78
  5. package/browser-prod/fesm2022/taon-browser.mjs +770 -788
  6. package/browser-prod/fesm2022/taon-browser.mjs.map +1 -1
  7. package/browser-prod/package.json +23 -0
  8. package/browser-prod/types/taon-browser.d.ts +495 -513
  9. package/browser-prod.split-namespaces.json +186 -0
  10. package/icon-menu-taon.svg +15 -15
  11. package/lib/base-classes/base-controller.d.ts +2 -1
  12. package/lib/base-classes/base-controller.js.map +1 -1
  13. package/lib/build-info._auto-generated_.d.ts +1 -1
  14. package/lib/build-info._auto-generated_.js +1 -1
  15. package/lib/decorators/http/http-decorators.d.ts +2 -1
  16. package/lib/decorators/http/http-decorators.js.map +1 -1
  17. package/lib/decorators/http/http-methods-decorators.js.map +1 -1
  18. package/lib/decorators/http/http-params-decorators.js.map +1 -1
  19. package/lib/endpoint-context.d.ts +2 -1
  20. package/lib/endpoint-context.js.map +1 -1
  21. package/lib/index.d.ts +3 -5
  22. package/lib/index.js +2 -3
  23. package/lib/index.js.map +1 -1
  24. package/lib/models.d.ts +2 -3
  25. package/lib/models.js +0 -7
  26. package/lib/models.js.map +1 -1
  27. package/lib/package.json +4 -0
  28. package/lib/ui/index.js +2 -2
  29. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  30. package/lib-prod/base-classes/base-class.js +1 -1
  31. package/lib-prod/base-classes/base-class.js.map +1 -1
  32. package/lib-prod/base-classes/base-context.d.ts +1 -1
  33. package/lib-prod/base-classes/base-controller.d.ts +5 -4
  34. package/lib-prod/base-classes/base-controller.js +2 -2
  35. package/lib-prod/base-classes/base-controller.js.map +1 -1
  36. package/lib-prod/base-classes/base-crud-controller.d.ts +13 -13
  37. package/lib-prod/base-classes/base-crud-controller.js +8 -9
  38. package/lib-prod/base-classes/base-crud-controller.js.map +1 -1
  39. package/lib-prod/base-classes/base-injector.js +11 -11
  40. package/lib-prod/base-classes/base-injector.js.map +1 -1
  41. package/lib-prod/base-classes/base-middleware.d.ts +2 -2
  42. package/lib-prod/base-classes/base-migration.js +3 -3
  43. package/lib-prod/base-classes/base-migration.js.map +1 -1
  44. package/lib-prod/base-classes/base-repository.js +4 -4
  45. package/lib-prod/base-classes/base-repository.js.map +1 -1
  46. package/lib-prod/build-info._auto-generated_.d.ts +1 -1
  47. package/lib-prod/build-info._auto-generated_.js +1 -1
  48. package/lib-prod/config/method-config.d.ts +2 -2
  49. package/lib-prod/config/param-config.d.ts +2 -2
  50. package/lib-prod/context-db-migrations.js +12 -12
  51. package/lib-prod/context-db-migrations.js.map +1 -1
  52. package/lib-prod/create-context.d.ts +5 -5
  53. package/lib-prod/create-context.js +3 -3
  54. package/lib-prod/create-context.js.map +1 -1
  55. package/lib-prod/decorators/classes/controller-decorator.js +3 -3
  56. package/lib-prod/decorators/classes/controller-decorator.js.map +1 -1
  57. package/lib-prod/decorators/classes/entity-decorator.d.ts +3 -3
  58. package/lib-prod/decorators/classes/entity-decorator.js +5 -5
  59. package/lib-prod/decorators/classes/entity-decorator.js.map +1 -1
  60. package/lib-prod/decorators/classes/middleware-decorator.js +3 -3
  61. package/lib-prod/decorators/classes/middleware-decorator.js.map +1 -1
  62. package/lib-prod/decorators/classes/migration-decorator.js +3 -3
  63. package/lib-prod/decorators/classes/migration-decorator.js.map +1 -1
  64. package/lib-prod/decorators/classes/provider-decorator.js +3 -3
  65. package/lib-prod/decorators/classes/provider-decorator.js.map +1 -1
  66. package/lib-prod/decorators/classes/repository-decorator.js +3 -3
  67. package/lib-prod/decorators/classes/repository-decorator.js.map +1 -1
  68. package/lib-prod/decorators/classes/subscriber-decorator.js +3 -3
  69. package/lib-prod/decorators/classes/subscriber-decorator.js.map +1 -1
  70. package/lib-prod/decorators/http/http-decorators.d.ts +3 -2
  71. package/lib-prod/decorators/http/http-decorators.js +2 -2
  72. package/lib-prod/decorators/http/http-decorators.js.map +1 -1
  73. package/lib-prod/decorators/http/http-methods-decorators.d.ts +5 -5
  74. package/lib-prod/decorators/http/http-methods-decorators.js +2 -2
  75. package/lib-prod/decorators/http/http-methods-decorators.js.map +1 -1
  76. package/lib-prod/decorators/http/http-params-decorators.js +1 -1
  77. package/lib-prod/decorators/http/http-params-decorators.js.map +1 -1
  78. package/lib-prod/endpoint-context-storage.js +1 -1
  79. package/lib-prod/endpoint-context-storage.js.map +1 -1
  80. package/lib-prod/endpoint-context.d.ts +14 -13
  81. package/lib-prod/endpoint-context.js +171 -171
  82. package/lib-prod/endpoint-context.js.map +1 -1
  83. package/lib-prod/entity-process.js +14 -14
  84. package/lib-prod/entity-process.js.map +1 -1
  85. package/lib-prod/formly/fromly.d.ts +2 -2
  86. package/lib-prod/formly/fromly.js +1 -1
  87. package/lib-prod/formly/fromly.js.map +1 -1
  88. package/lib-prod/formly/type-from-entity.js +2 -2
  89. package/lib-prod/formly/type-from-entity.js.map +1 -1
  90. package/lib-prod/get-response-value.d.ts +2 -2
  91. package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.d.ts +1 -1
  92. package/lib-prod/global-state/taon-global-state/taon-global-state.controller.d.ts +3 -3
  93. package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +0 -1
  94. package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js.map +1 -1
  95. package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +1 -1
  96. package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js.map +1 -1
  97. package/lib-prod/global-state/taon-global-state/taon-global-state.utils.d.ts +1 -3
  98. package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js +12 -12
  99. package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js.map +1 -1
  100. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.d.ts +1 -1
  101. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.d.ts +2 -2
  102. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +0 -1
  103. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js.map +1 -1
  104. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.d.ts +1 -3
  105. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +6 -8
  106. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js.map +1 -1
  107. package/lib-prod/helpers/class-helpers.d.ts +20 -22
  108. package/lib-prod/helpers/class-helpers.js +231 -218
  109. package/lib-prod/helpers/class-helpers.js.map +1 -1
  110. package/lib-prod/helpers/taon-helpers.d.ts +14 -16
  111. package/lib-prod/helpers/taon-helpers.js +148 -138
  112. package/lib-prod/helpers/taon-helpers.js.map +1 -1
  113. package/lib-prod/index.d.ts +80 -84
  114. package/lib-prod/index.js +71 -70
  115. package/lib-prod/index.js.map +1 -1
  116. package/lib-prod/inject.js +3 -3
  117. package/lib-prod/inject.js.map +1 -1
  118. package/lib-prod/models.d.ts +242 -247
  119. package/lib-prod/models.js +83 -91
  120. package/lib-prod/models.js.map +1 -1
  121. package/lib-prod/package.json +4 -0
  122. package/lib-prod/realtime/realtime-client.d.ts +2 -2
  123. package/lib-prod/realtime/realtime-client.js +9 -9
  124. package/lib-prod/realtime/realtime-client.js.map +1 -1
  125. package/lib-prod/realtime/realtime-server.js +17 -17
  126. package/lib-prod/realtime/realtime-server.js.map +1 -1
  127. package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +3 -3
  128. package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +2 -2
  129. package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -1
  130. package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +2 -2
  131. package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -1
  132. package/lib-prod/realtime/realtime-subs-manager.d.ts +2 -2
  133. package/lib-prod/realtime/realtime-subs-manager.js +6 -6
  134. package/lib-prod/realtime/realtime-subs-manager.js.map +1 -1
  135. package/lib-prod/realtime/realtime.models.d.ts +23 -25
  136. package/lib-prod/realtime/realtime.models.js +1 -0
  137. package/lib-prod/realtime/realtime.models.js.map +1 -1
  138. package/lib-prod/symbols.d.ts +39 -41
  139. package/lib-prod/symbols.js +44 -45
  140. package/lib-prod/symbols.js.map +1 -1
  141. package/lib-prod/ui/index.d.ts +1 -1
  142. package/lib-prod/ui/index.js +2 -2
  143. package/lib-prod/ui/taon-admin-mode-configuration/index.d.ts +1 -1
  144. package/lib-prod/ui/taon-admin-mode-configuration/index.js +2 -2
  145. package/lib-prod/validators.d.ts +4 -6
  146. package/lib-prod/validators.js +50 -47
  147. package/lib-prod/validators.js.map +1 -1
  148. package/lib-prod.split-namespaces.json +188 -0
  149. package/package.json +28 -6
  150. package/websql/fesm2022/taon-websql.mjs +2 -10
  151. package/websql/fesm2022/taon-websql.mjs.map +1 -1
  152. package/websql/package.json +1 -1
  153. package/websql/types/taon-websql.d.ts +76 -78
  154. package/websql-prod/fesm2022/taon-websql.mjs +855 -870
  155. package/websql-prod/fesm2022/taon-websql.mjs.map +1 -1
  156. package/websql-prod/package.json +23 -0
  157. package/websql-prod/types/taon-websql.d.ts +498 -516
  158. package/websql-prod.split-namespaces.json +188 -0
  159. package/migrations/index.d.ts +0 -1
  160. package/migrations/index.js +0 -19
  161. package/migrations/index.js.map +0 -1
  162. package/migrations/migrations_index._auto-generated_.d.ts +0 -0
  163. package/migrations/migrations_index._auto-generated_.js +0 -4
  164. package/migrations/migrations_index._auto-generated_.js.map +0 -1
@@ -2,25 +2,25 @@
2
2
  import * as taon_websql from 'taon/websql';
3
3
  import * as express from 'express';
4
4
  import express__default, { Request, Response, RequestHandler, Application } from 'express';
5
- import { Models as Models$1, RestResponseWrapper, TaonServerMiddlewareInterceptOptions, TaonClientMiddlewareInterceptOptions, HttpResponseError, RestErrorResponseWrapper, Mapping } from 'ng2-rest/websql-prod';
5
+ import { Models_PromiseObservableMix, Models_HttpResponse, Models_Ng2RestAxiosRequestConfig, RestResponseWrapper, TaonServerMiddlewareInterceptOptions, TaonClientMiddlewareInterceptOptions, Models_ResponseTypeAxios, HttpResponseError, RestErrorResponseWrapper, Mapping_ModelValue, Mapping_Mapping } from 'ng2-rest/websql-prod';
6
6
  export { TaonClientMiddlewareInterceptOptions, TaonServerMiddlewareInterceptOptions } from 'ng2-rest/websql-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/websql-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/websql-prod';
10
+ import { CoreModels_DatabaseType, CoreModels_HttpMethod, CoreModels_ContentType, CoreModels_ParamType, CoreModels_UIFramework } from 'tnp-core/websql-prod';
10
11
  import { MySqlQuerySource } from 'taon-type-sql/websql-prod';
11
- import { CoreModels } from 'tnp-core/websql-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
  }
@@ -389,255 +389,250 @@ declare class TaonRestResponseWrapper extends RestResponseWrapper {
389
389
  declare const BaseTaonClassesNames: readonly ["BaseCrudController", "BaseController", "BaseAbstractEntity", "BaseEntity", "BaseContext", "BaseCustomRepository", "BaseFileUploadMiddleware", "BaseMiddleware", "BaseClass", "BaseInjector", "BaseMigration", "BaseProvider", "BaseRepository", "BaseSubscriberForEntity", "BaseCliWorkerController", "PortsController", "PortsContext"];
390
390
  declare const TaonTempDatabasesFolder = "databases";
391
391
  declare const TaonTempRoutesFolder = "routes";
392
- declare namespace Models {
393
- const DatabasesFolder = "databases";
394
- type FrameworkMode = 'backend-frontend(tcp+udp)' | 'remote-backend(tcp+udp)' | 'backend-frontend(ipc-electron)' | 'backend-frontend(websql-electron)' | 'backend-frontend(websql)';
395
- enum ClassType {
396
- ENTITY = "ENTITY",
397
- CONTROLLER = "CONTROLLER",
398
- REPOSITORY = "REPOSITORY",
399
- PROVIDER = "PROVIDER",
400
- SUBSCRIBER = "SUBSCRIBER",
401
- MIGRATION = "MIGRATION",
402
- MIDDLEWARE = "MIDDLEWARE"
403
- }
404
- const ClassTypeKey: { [key in ClassType]: keyof ContextOptions<any, any, any, any, any, any, any, any>; };
405
- type MiddlewareType = [Function, any[]];
406
- /**
407
- * DROP_DB+MIGRATIONS (default for development)
408
- * Drop all tables + recreate them + run migrations
409
- * synchronize: true , dropSchema: true
410
- * use migrations: true
392
+ declare const Models_DatabasesFolder = "databases";
393
+ type Models_FrameworkMode = 'backend-frontend(tcp+udp)' | 'remote-backend(tcp+udp)' | 'backend-frontend(ipc-electron)' | 'backend-frontend(websql-electron)' | 'backend-frontend(websql)';
394
+ declare enum Models_ClassType {
395
+ ENTITY = "ENTITY",
396
+ CONTROLLER = "CONTROLLER",
397
+ REPOSITORY = "REPOSITORY",
398
+ PROVIDER = "PROVIDER",
399
+ SUBSCRIBER = "SUBSCRIBER",
400
+ MIGRATION = "MIGRATION",
401
+ MIDDLEWARE = "MIDDLEWARE"
402
+ }
403
+ declare const Models_ClassTypeKey: { [key in Models_ClassType]: keyof Models_ContextOptions<any, any, any, any, any, any, any, any>; };
404
+ type Models_MiddlewareType = [Function, any[]];
405
+ /**
406
+ * DROP_DB+MIGRATIONS (default for development)
407
+ * Drop all tables + recreate them + run migrations
408
+ * synchronize: true , dropSchema: true
409
+ * use migrations: true
410
+ *
411
+ * MIGRATIONS (default for production)
412
+ * Do not drop tables, only run migrations
413
+ * synchronize: false, dropSchema: false
414
+ * use migrations: true
415
+ */
416
+ type Models_DBRecreateMode = 'DROP_DB+MIGRATIONS' | 'PRESERVE_DATA+MIGRATIONS';
417
+ declare class Models_DatabaseConfigTypeOrm {
418
+ /**
419
+ * database name
420
+ */
421
+ database?: string;
422
+ /**
423
+ * only for file base db: sqlite, sqljs
424
+ */
425
+ location?: string;
426
+ synchronize: boolean;
427
+ dropSchema: boolean;
428
+ type?: CoreModels_DatabaseType;
429
+ /**
430
+ * Persists db on disk/local-storage if serverless db
431
+ */
432
+ autoSave?: boolean;
433
+ /**
434
+ * for websql db mode
435
+ * true by default
436
+ */
437
+ useLocalForage?: boolean;
438
+ logging: boolean;
439
+ databasePort?: number;
440
+ databaseHost?: string;
441
+ databaseUsername?: string;
442
+ databasePassword?: string;
443
+ }
444
+ declare class Models_DatabaseConfig extends Models_DatabaseConfigTypeOrm {
445
+ /**
446
+ * Default value 'DROP_ALL'.
411
447
  *
412
- * MIGRATIONS (default for production)
413
- * Do not drop tables, only run migrations
414
- * synchronize: false, dropSchema: false
415
- * use migrations: true
448
+ * Tell framework what is happening with db
449
+ * when context is starting.
416
450
  */
417
- type DBRecreateMode = 'DROP_DB+MIGRATIONS' | 'PRESERVE_DATA+MIGRATIONS';
418
- class DatabaseConfigTypeOrm {
419
- /**
420
- * database name
421
- */
422
- database?: string;
423
- /**
424
- * only for file base db: sqlite, sqljs
425
- */
426
- location?: string;
427
- synchronize: boolean;
428
- dropSchema: boolean;
429
- type?: CoreModels.DatabaseType;
430
- /**
431
- * Persists db on disk/local-storage if serverless db
432
- */
433
- autoSave?: boolean;
434
- /**
435
- * for websql db mode
436
- * true by default
437
- */
438
- useLocalForage?: boolean;
439
- logging: boolean;
440
- databasePort?: number;
441
- databaseHost?: string;
442
- databaseUsername?: string;
443
- databasePassword?: string;
444
- }
445
- class DatabaseConfig extends DatabaseConfigTypeOrm {
446
- /**
447
- * Default value 'DROP_ALL'.
448
- *
449
- * Tell framework what is happening with db
450
- * when context is starting.
451
- */
452
- recreateMode?: DBRecreateMode;
453
- static from(databasePartialConfig: Partial<Omit<DatabaseConfig, 'synchronize' | 'dropSchema' | 'databaseConfigTypeORM'>>): DatabaseConfig;
454
- get databaseConfigTypeORM(): DatabaseConfigTypeOrm;
455
- }
456
- type ISession = {
457
- secret?: string;
458
- saveUninitialized?: boolean;
459
- /**
460
- * max age of session
461
- */
462
- cookieMaxAge?: number;
463
- secure?: boolean;
464
- resave?: boolean;
465
- };
466
- type ConnectionOptionsLogs = {
467
- http?: boolean;
468
- realtime?: boolean;
469
- framework?: boolean;
470
- db?: boolean;
471
- migrations?: boolean;
472
- routes?: boolean;
451
+ recreateMode?: Models_DBRecreateMode;
452
+ static from(databasePartialConfig: Partial<Omit<Models_DatabaseConfig, 'synchronize' | 'dropSchema' | 'databaseConfigTypeORM'>>): Models_DatabaseConfig;
453
+ get databaseConfigTypeORM(): Models_DatabaseConfigTypeOrm;
454
+ }
455
+ type Models_ISession = {
456
+ secret?: string;
457
+ saveUninitialized?: boolean;
458
+ /**
459
+ * max age of session
460
+ */
461
+ cookieMaxAge?: number;
462
+ secure?: boolean;
463
+ resave?: boolean;
464
+ };
465
+ type Models_ConnectionOptionsLogs = {
466
+ http?: boolean;
467
+ realtime?: boolean;
468
+ framework?: boolean;
469
+ db?: boolean;
470
+ migrations?: boolean;
471
+ routes?: boolean;
472
+ };
473
+ interface Models_ContextOptions<CONTEXTS, CONTROLLERS, ENTITIES, REPOSITORIES, PROVIDERS, SUBSCRIBERS, MIGRATIONS, MIDDLEWARES> {
474
+ appId?: string;
475
+ contextName: string;
476
+ /**
477
+ * if defined and different from contextName
478
+ * - context will NOT be initialized
479
+ */
480
+ activeContext?: string | null;
481
+ /**
482
+ * IMPORTANT! provide full url that starts with http:// or https://
483
+ * host/port for initing backend server
484
+ */
485
+ host?: string;
486
+ /**
487
+ * Needs to be specified in docker environment only
488
+ */
489
+ hostPortNumber?: number;
490
+ /**
491
+ * IMPORTANT! provide full url that starts with http:// or https://
492
+ * frontend host only needed when we are
493
+ * using withCredentials for axios
494
+ * and session cookie
495
+ * or realtime communication
496
+ */
497
+ frontendHost?: string;
498
+ /**
499
+ * Needs to be specified in docker environment only
500
+ */
501
+ frontendHostPortNumber?: number;
502
+ /**
503
+ * User ipc for communication between BE/FE
504
+ * when electron is used as a platform
505
+ * Default: true
506
+ */
507
+ useIpcWhenElectron?: boolean;
508
+ /**
509
+ * taon contexts here
510
+ * (module like structure)
511
+ */
512
+ contexts?: CONTEXTS;
513
+ /**
514
+ * taon controller here
515
+ * (glue between frontend and backend)
516
+ */
517
+ controllers?: CONTROLLERS;
518
+ /**
519
+ * taon entities
520
+ * (entities are used to create tables in db)
521
+ */
522
+ entities?: ENTITIES;
523
+ /**
524
+ * taon repositories
525
+ * (repositories are used to access data from db)
526
+ */
527
+ repositories?: REPOSITORIES;
528
+ /**
529
+ * taon providers
530
+ * (context singletons)
531
+ */
532
+ providers?: PROVIDERS;
533
+ /**
534
+ * taon subscribers
535
+ * (subscribers are used to listen to db events)
536
+ */
537
+ subscribers?: SUBSCRIBERS;
538
+ /**
539
+ * taon migrations
540
+ * (migrations are used to update db schema and achieve proper CI/CD)
541
+ */
542
+ migrations?: MIGRATIONS;
543
+ /**
544
+ * taon middlewares
545
+ * middlewares are used to intercept requests
546
+ * and responses in the context
547
+ */
548
+ middlewares?: MIDDLEWARES;
549
+ /**
550
+ * Config for express session
551
+ */
552
+ session?: Models_ISession;
553
+ /**
554
+ * taon is not going to write .rest files to cwd()
555
+ */
556
+ skipWritingServerRoutes?: boolean;
557
+ /**
558
+ * TODO - this is still in progress
559
+ * @deprecated
560
+ */
561
+ productionMode?: boolean;
562
+ /**
563
+ * If you want your context to never be started as separated server
564
+ * use abstract: true
565
+ * @default: false
566
+ */
567
+ abstract?: boolean;
568
+ logs?: boolean | Models_ConnectionOptionsLogs;
569
+ database?: boolean | Partial<Models_DatabaseConfig>;
570
+ /**
571
+ * disable default realtime communication through TCP upgrade sockets
572
+ */
573
+ disabledRealtime?: boolean;
574
+ /**
575
+ * Will be removed soon - cloud will handle certs and https
576
+ * @deprecated
577
+ */
578
+ https?: {
579
+ key: string;
580
+ cert: string;
473
581
  };
474
- interface ContextOptions<CONTEXTS, CONTROLLERS, ENTITIES, REPOSITORIES, PROVIDERS, SUBSCRIBERS, MIGRATIONS, MIDDLEWARES> {
475
- appId?: string;
476
- contextName: string;
477
- /**
478
- * if defined and different from contextName
479
- * - context will NOT be initialized
480
- */
481
- activeContext?: string | null;
482
- /**
483
- * IMPORTANT! provide full url that starts with http:// or https://
484
- * host/port for initing backend server
485
- */
486
- host?: string;
487
- /**
488
- * Needs to be specified in docker environment only
489
- */
490
- hostPortNumber?: number;
491
- /**
492
- * IMPORTANT! provide full url that starts with http:// or https://
493
- * frontend host only needed when we are
494
- * using withCredentials for axios
495
- * and session cookie
496
- * or realtime communication
497
- */
498
- frontendHost?: string;
499
- /**
500
- * Needs to be specified in docker environment only
501
- */
502
- frontendHostPortNumber?: number;
503
- /**
504
- * User ipc for communication between BE/FE
505
- * when electron is used as a platform
506
- * Default: true
507
- */
508
- useIpcWhenElectron?: boolean;
509
- /**
510
- * taon contexts here
511
- * (module like structure)
512
- */
513
- contexts?: CONTEXTS;
514
- /**
515
- * taon controller here
516
- * (glue between frontend and backend)
517
- */
518
- controllers?: CONTROLLERS;
519
- /**
520
- * taon entities
521
- * (entities are used to create tables in db)
522
- */
523
- entities?: ENTITIES;
524
- /**
525
- * taon repositories
526
- * (repositories are used to access data from db)
527
- */
528
- repositories?: REPOSITORIES;
529
- /**
530
- * taon providers
531
- * (context singletons)
532
- */
533
- providers?: PROVIDERS;
534
- /**
535
- * taon subscribers
536
- * (subscribers are used to listen to db events)
537
- */
538
- subscribers?: SUBSCRIBERS;
539
- /**
540
- * taon migrations
541
- * (migrations are used to update db schema and achieve proper CI/CD)
542
- */
543
- migrations?: MIGRATIONS;
544
- /**
545
- * taon middlewares
546
- * middlewares are used to intercept requests
547
- * and responses in the context
548
- */
549
- middlewares?: MIDDLEWARES;
550
- /**
551
- * Config for express session
552
- */
553
- session?: ISession;
554
- /**
555
- * taon is not going to write .rest files to cwd()
556
- */
557
- skipWritingServerRoutes?: boolean;
558
- /**
559
- * TODO - this is still in progress
560
- * @deprecated
561
- */
562
- productionMode?: boolean;
563
- /**
564
- * If you want your context to never be started as separated server
565
- * use abstract: true
566
- * @default: false
567
- */
568
- abstract?: boolean;
569
- logs?: boolean | ConnectionOptionsLogs;
570
- database?: boolean | Partial<DatabaseConfig>;
571
- /**
572
- * disable default realtime communication through TCP upgrade sockets
573
- */
574
- disabledRealtime?: boolean;
575
- /**
576
- * Will be removed soon - cloud will handle certs and https
577
- * @deprecated
578
- */
579
- https?: {
580
- key: string;
581
- cert: string;
582
- };
583
- /**
584
- * TODO - will be removed soon
585
- * @deprecated
586
- */
587
- publicAssets?: {
588
- serverPath: string;
589
- locationOnDisk: string;
590
- }[];
591
- /**
592
- * by default cwd === process.cwd()
593
- */
594
- cwd?: string;
595
- }
596
- namespace Http {
597
- export import Rest = Models$1;
598
- type ContextENDPOINT = {
599
- target: Function;
600
- initFN: Function;
601
- };
602
- type FormlyFromType = 'material' | 'bootstrap';
603
- type ExpressContext<T> = (req: Request<any>, res: Response<any>) => T;
604
- type SyncResponse<T> = string | T;
605
- type ResponseFuncOpt<T> = {
606
- limitSize?: (enties: Function | Function[], include: string[], exclude: string[]) => void;
607
- };
608
- type SyncResponseFunc<T> = (options?: ResponseFuncOpt<T>) => SyncResponse<T>;
609
- type MixResponse<T> = SyncResponse<T> | ExpressContext<T>;
610
- interface ClientAction<T> {
611
- /**
612
- * @deprecated use request() mehods instead
613
- */
614
- readonly received?: Rest.PromiseObservableMix<Rest.HttpResponse<T>>;
615
- request?(axiosConfig?: Models$1.Ng2RestAxiosRequestConfig): Rest.PromiseObservableMix<Rest.HttpResponse<T>>;
616
- }
617
- interface AsyncResponse<T> {
618
- (req?: Request<any>, res?: Response<any>): Promise<SyncResponse<T> | SyncResponseFunc<T>>;
619
- }
620
- type Response<T = string> = AsyncResponse<T> & ClientAction<T>;
621
- interface AuthCallBack {
622
- (methodReference: Function): RequestHandler;
623
- }
624
- }
625
- interface StartParams {
626
- port: number;
627
- args: string[];
628
- onlyMigrationRun?: boolean;
629
- onlyMigrationRevertToTimestamp?: number;
630
- }
631
- interface TaonInitializeParams {
632
- onlyMigrationRun?: boolean;
633
- onlyMigrationRevertToTimestamp?: number;
634
- }
635
- interface TaonCtxCloneParams {
636
- useAsRemoteContext?: boolean;
637
- overrideRemoteHost?: string;
638
- overrideHost?: string;
639
- sourceContext?: EndpointContext;
640
- }
582
+ /**
583
+ * TODO - will be removed soon
584
+ * @deprecated
585
+ */
586
+ publicAssets?: {
587
+ serverPath: string;
588
+ locationOnDisk: string;
589
+ }[];
590
+ /**
591
+ * by default cwd === process.cwd()
592
+ */
593
+ cwd?: string;
594
+ }
595
+ type Models_Http_ContextENDPOINT = {
596
+ target: Function;
597
+ initFN: Function;
598
+ };
599
+ type Models_Http_FormlyFromType = 'material' | 'bootstrap';
600
+ type Models_Http_ExpressContext<T> = (req: Request<any>, res: Response<any>) => T;
601
+ type Models_Http_SyncResponse<T> = string | T;
602
+ type Models_Http_ResponseFuncOpt<T> = {
603
+ limitSize?: (enties: Function | Function[], include: string[], exclude: string[]) => void;
604
+ };
605
+ type Models_Http_SyncResponseFunc<T> = (options?: Models_Http_ResponseFuncOpt<T>) => Models_Http_SyncResponse<T>;
606
+ type Models_Http_MixResponse<T> = Models_Http_SyncResponse<T> | Models_Http_ExpressContext<T>;
607
+ interface Models_Http_ClientAction<T> {
608
+ /**
609
+ * @deprecated use request() mehods instead
610
+ */
611
+ readonly received?: Models_PromiseObservableMix<Models_HttpResponse<T>>;
612
+ request?(axiosConfig?: Models_Ng2RestAxiosRequestConfig): Models_PromiseObservableMix<Models_HttpResponse<T>>;
613
+ }
614
+ interface Models_Http_AsyncResponse<T> {
615
+ (req?: Request<any>, res?: Response<any>): Promise<Models_Http_SyncResponse<T> | Models_Http_SyncResponseFunc<T>>;
616
+ }
617
+ type Models_Http_Response<T = string> = Models_Http_AsyncResponse<T> & Models_Http_ClientAction<T>;
618
+ interface Models_Http_AuthCallBack {
619
+ (methodReference: Function): RequestHandler;
620
+ }
621
+ interface Models_StartParams {
622
+ port: number;
623
+ args: string[];
624
+ onlyMigrationRun?: boolean;
625
+ onlyMigrationRevertToTimestamp?: number;
626
+ }
627
+ interface Models_TaonInitializeParams {
628
+ onlyMigrationRun?: boolean;
629
+ onlyMigrationRevertToTimestamp?: number;
630
+ }
631
+ interface Models_TaonCtxCloneParams {
632
+ useAsRemoteContext?: boolean;
633
+ overrideRemoteHost?: string;
634
+ overrideHost?: string;
635
+ sourceContext?: EndpointContext;
641
636
  }
642
637
 
643
638
  declare class EndpointContext {
@@ -671,7 +666,7 @@ declare class EndpointContext {
671
666
  private readonly objWithClassesInstancesArr;
672
667
  readonly activeRoutes: {
673
668
  expressPath: string;
674
- method: Models.Http.Rest.HttpMethod;
669
+ method: CoreModels_HttpMethod;
675
670
  }[];
676
671
  repos: Map<string, Repository<any>>;
677
672
  get sourceContext(): EndpointContext | undefined;
@@ -680,12 +675,12 @@ declare class EndpointContext {
680
675
  private allTypesfromContexts;
681
676
  expressApp: Application;
682
677
  serverTcpUdp: Server;
683
- databaseConfig?: Models.DatabaseConfigTypeOrm;
684
- mode: Models.FrameworkMode;
678
+ databaseConfig?: Models_DatabaseConfigTypeOrm;
679
+ mode: Models_FrameworkMode;
685
680
  readonly onlyMigrationRun?: boolean;
686
681
  readonly onlyMigrationRevertToTimestamp?: number;
687
682
  get isRunOrRevertOnlyMigrationAppStart(): boolean;
688
- session?: Models.ISession;
683
+ session?: Models_ISession;
689
684
  connection: DataSource;
690
685
  private entitiesTriggers;
691
686
  private realtime;
@@ -694,7 +689,7 @@ declare class EndpointContext {
694
689
  /**
695
690
  * available after init()
696
691
  */
697
- config: Models.ContextOptions<any, any, any, any, any, any, any, any>;
692
+ config: Models_ContextOptions<any, any, any, any, any, any, any, any>;
698
693
  get logHttp(): boolean;
699
694
  get logRealtime(): boolean;
700
695
  get logFramework(): boolean;
@@ -705,14 +700,14 @@ declare class EndpointContext {
705
700
  * Inside docker there is not need for https secure server
706
701
  */
707
702
  readonly isRunningInsideDocker: boolean;
708
- 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>,
703
+ 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>,
709
704
  /**
710
705
  * (@default: false)
711
706
  * If TRUE context is NOT going to create db/express server/http endpoints
712
707
  * PURPOSE OF THIS PROPERTY
713
708
  * -> ONLY remote access from backend or frontend to specific backend
714
709
  */
715
- cloneOptions: Models.TaonCtxCloneParams);
710
+ cloneOptions: Models_TaonCtxCloneParams);
716
711
  init(options?: {
717
712
  initFromRecrusiveContextResovle?: boolean;
718
713
  onlyMigrationRun?: boolean;
@@ -726,7 +721,7 @@ declare class EndpointContext {
726
721
  private cloneClassesObjWithNewMetadata;
727
722
  private getRecrusiveClassesfromContextsObj;
728
723
  private getRecrusiveClassesfromContexts;
729
- getClassInstanceObjBy(classType: Models.ClassType): any;
724
+ getClassInstanceObjBy(classType: Models_ClassType): any;
730
725
  private getClassesInstancesArrBy;
731
726
  inject<T>(ctor: new (...args: any[]) => T, options: {
732
727
  localInstance?: boolean;
@@ -739,15 +734,15 @@ declare class EndpointContext {
739
734
  */
740
735
  getInstanceBy<T>(ctor: new (...args: any[]) => T): T;
741
736
  checkIfContextInitialized(): void;
742
- getClassFunBy(classType: Models.ClassType): any;
743
- isCLassType(classType: Models.ClassType, classFn: Function): boolean;
737
+ getClassFunBy(classType: Models_ClassType): any;
738
+ isCLassType(classType: Models_ClassType, classFn: Function): boolean;
744
739
  /**
745
740
  * Only for injectable types
746
741
  * Only for classType: CONTROLLER, REPOSITORY, PROVIDER, MIDDLEWARES
747
742
  */
748
743
  getClassFunByClassName(className: string): Function;
749
744
  getClassFunByClass(classFunction: Function): Function;
750
- getClassFunByArr(classType: Models.ClassType): Function[];
745
+ getClassFunByArr(classType: Models_ClassType): Function[];
751
746
  private createInstances;
752
747
  initClasses(): Promise<void>;
753
748
  isActiveOn(classInstance: object): boolean;
@@ -815,7 +810,7 @@ declare class EndpointContext {
815
810
  initControllersHook(ctxStorage: ContextsEndpointStorage): Promise<void>;
816
811
  initControllers(): Promise<void>;
817
812
  writeActiveRoutes(): void;
818
- get middlewares(): Models.MiddlewareType[];
813
+ get middlewares(): Models_MiddlewareType[];
819
814
  private initCustomClientMiddlewares;
820
815
  private initCustomBackendMiddlewares;
821
816
  private initBackendMiddlewares;
@@ -827,77 +822,12 @@ declare class EndpointContext {
827
822
  private initClient;
828
823
  }
829
824
 
830
- /**
831
- * for backendSocket.in(ROOM_NAME).emit(EVENT)
832
- *
833
- * Room names are uniqe..
834
- * here I am limiting number of event for clients.
835
- */
836
- declare class Realtime {
837
- NAMESPACE(contextName: string): string;
838
- TABLE_CHANGE(contextName: string, tableName: string): string;
839
- readonly KEYroomSubscribe = "roomSubscribe";
840
- readonly KEYroomUnsubscribe = "roomUnsubscribe";
841
- ROOM_NAME_CUSTOM(contextName: string, customEvent: string): string;
842
- ROOM_SUBSCRIBE_CUSTOM(contextName: string): string;
843
- ROOM_UNSUBSCRIBE_CUSTOM(contextName: string): string;
844
- ROOM_NAME_UPDATE_ENTITY(contextName: string, className: string, entityId: number | string): string;
845
- ROOM_SUBSCRIBE_ENTITY_UPDATE_EVENTS(contextName: string): string;
846
- ROOM_UNSUBSCRIBE_ENTITY_UPDATE_EVENTS(contextName: string): string;
847
- ROOM_NAME_UPDATE_ENTITY_PROPERTY(contextName: string, className: string, property: string, entityId: number | string): string;
848
- ROOM_SUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(contextName: string): string;
849
- ROOM_UNSUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(contextName: string): string;
850
- }
851
- declare namespace Symbols {
852
- const ctxInClassOrClassObj: unique symbol;
853
- const classNameStaticProperty: string;
854
- const fullClassNameStaticProperty: string;
855
- const orignalClass: string;
856
- const orignalClassClonesObj: string;
857
- const classMethodsNames: string;
858
- const REALTIME: Realtime;
859
- const metadata: {
860
- className: string;
861
- options: {
862
- controller: string;
863
- entity: string;
864
- repository: string;
865
- provider: string;
866
- subscriber: string;
867
- migration: string;
868
- };
869
- };
870
- const old: {
871
- HAS_TABLE_IN_DB: symbol;
872
- MDC_KEY: string;
873
- WEBSQL_REST_PROGRESS_FUN: symbol;
874
- WEBSQL_REST_PROGRESS_FUN_START: symbol;
875
- WEBSQL_REST_PROGRESS_FUN_DONE: symbol;
876
- WEBSQL_REST_PROGRESS_TIMEOUT: symbol;
877
- X_TOTAL_COUNT: string;
878
- CIRCURAL_OBJECTS_MAP_BODY: string;
879
- CIRCURAL_OBJECTS_MAP_QUERY_PARAM: string;
880
- MAPPING_CONFIG_HEADER: string;
881
- MAPPING_CONFIG_HEADER_BODY_PARAMS: string;
882
- MAPPING_CONFIG_HEADER_QUERY_PARAMS: string;
883
- ENDPOINT_META_CONFIG: string;
884
- CLASS_DECORATOR_CONTEXT: string;
885
- SOCKET_MSG: string;
886
- ANGULAR: {
887
- INPUT_NAMES: symbol;
888
- };
889
- ERROR_MESSAGES: {
890
- CLASS_NAME_MATCH: string;
891
- };
892
- };
893
- }
894
-
895
825
  /**
896
826
  * @returns function that returns context function.
897
827
  * Context function can be used to dynamically
898
828
  * create context with specific configuration.
899
829
  */
900
- 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>) => () => {
830
+ 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>) => () => {
901
831
  readonly contextName: string;
902
832
  readonly appId: string;
903
833
  cloneAsRemote: (cloneOpt?: {
@@ -922,7 +852,7 @@ declare const createContextTemplate: <CTX extends Record<string, object>, CTRL e
922
852
  * - create controller instances for context
923
853
  * - init database (if enable) + migation scripts
924
854
  */
925
- initialize: (overrideOptions?: Models.TaonInitializeParams) => Promise<EndpointContext>;
855
+ initialize: (overrideOptions?: Models_TaonInitializeParams) => Promise<EndpointContext>;
926
856
  /**
927
857
  * realtime communication with server
928
858
  * TCP(upgrade) socket.io (or ipc) based.
@@ -932,7 +862,7 @@ declare const createContextTemplate: <CTX extends Record<string, object>, CTRL e
932
862
  readonly server: taon_websql.RealtimeServer;
933
863
  };
934
864
  };
935
- 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>) => {
865
+ 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>) => {
936
866
  readonly contextName: string;
937
867
  readonly appId: string;
938
868
  cloneAsRemote: (cloneOpt?: {
@@ -957,7 +887,7 @@ declare const createContext: <CTX extends Record<string, object>, CTRL extends R
957
887
  * - create controller instances for context
958
888
  * - init database (if enable) + migation scripts
959
889
  */
960
- initialize: (overrideOptions?: Models.TaonInitializeParams) => Promise<EndpointContext>;
890
+ initialize: (overrideOptions?: Models_TaonInitializeParams) => Promise<EndpointContext>;
961
891
  /**
962
892
  * realtime communication with server
963
893
  * TCP(upgrade) socket.io (or ipc) based.
@@ -1017,17 +947,80 @@ declare class EntityProcess {
1017
947
  send(): void;
1018
948
  }
1019
949
 
1020
- declare const getResponseValue: <T>(response: Models.Http.Response<T>, options?: {
950
+ declare const getResponseValue: <T>(response: Models_Http_Response<T>, options?: {
1021
951
  req: Request<any>;
1022
952
  res: Response<any>;
1023
953
  }) => Promise<T>;
1024
954
 
1025
955
  declare const inject: <T>(entity: () => new (...args: any[]) => T) => T;
1026
956
 
957
+ /**
958
+ * for backendSocket.in(ROOM_NAME).emit(EVENT)
959
+ *
960
+ * Room names are uniqe..
961
+ * here I am limiting number of event for clients.
962
+ */
963
+ declare class Realtime {
964
+ NAMESPACE(contextName: string): string;
965
+ TABLE_CHANGE(contextName: string, tableName: string): string;
966
+ readonly KEYroomSubscribe = "roomSubscribe";
967
+ readonly KEYroomUnsubscribe = "roomUnsubscribe";
968
+ ROOM_NAME_CUSTOM(contextName: string, customEvent: string): string;
969
+ ROOM_SUBSCRIBE_CUSTOM(contextName: string): string;
970
+ ROOM_UNSUBSCRIBE_CUSTOM(contextName: string): string;
971
+ ROOM_NAME_UPDATE_ENTITY(contextName: string, className: string, entityId: number | string): string;
972
+ ROOM_SUBSCRIBE_ENTITY_UPDATE_EVENTS(contextName: string): string;
973
+ ROOM_UNSUBSCRIBE_ENTITY_UPDATE_EVENTS(contextName: string): string;
974
+ ROOM_NAME_UPDATE_ENTITY_PROPERTY(contextName: string, className: string, property: string, entityId: number | string): string;
975
+ ROOM_SUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(contextName: string): string;
976
+ ROOM_UNSUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(contextName: string): string;
977
+ }
978
+ declare const Symbols_ctxInClassOrClassObj: unique symbol;
979
+ declare const Symbols_classNameStaticProperty: string;
980
+ declare const Symbols_fullClassNameStaticProperty: string;
981
+ declare const Symbols_orignalClass: string;
982
+ declare const Symbols_orignalClassClonesObj: string;
983
+ declare const Symbols_classMethodsNames: string;
984
+ declare const Symbols_REALTIME: Realtime;
985
+ declare const Symbols_metadata: {
986
+ className: string;
987
+ options: {
988
+ controller: string;
989
+ entity: string;
990
+ repository: string;
991
+ provider: string;
992
+ subscriber: string;
993
+ migration: string;
994
+ };
995
+ };
996
+ declare const Symbols_old: {
997
+ HAS_TABLE_IN_DB: symbol;
998
+ MDC_KEY: string;
999
+ WEBSQL_REST_PROGRESS_FUN: symbol;
1000
+ WEBSQL_REST_PROGRESS_FUN_START: symbol;
1001
+ WEBSQL_REST_PROGRESS_FUN_DONE: symbol;
1002
+ WEBSQL_REST_PROGRESS_TIMEOUT: symbol;
1003
+ X_TOTAL_COUNT: string;
1004
+ CIRCURAL_OBJECTS_MAP_BODY: string;
1005
+ CIRCURAL_OBJECTS_MAP_QUERY_PARAM: string;
1006
+ MAPPING_CONFIG_HEADER: string;
1007
+ MAPPING_CONFIG_HEADER_BODY_PARAMS: string;
1008
+ MAPPING_CONFIG_HEADER_QUERY_PARAMS: string;
1009
+ ENDPOINT_META_CONFIG: string;
1010
+ CLASS_DECORATOR_CONTEXT: string;
1011
+ SOCKET_MSG: string;
1012
+ ANGULAR: {
1013
+ INPUT_NAMES: symbol;
1014
+ };
1015
+ ERROR_MESSAGES: {
1016
+ CLASS_NAME_MATCH: string;
1017
+ };
1018
+ };
1019
+
1027
1020
  interface TaonAdditionalMiddlewareMethodInfo {
1028
1021
  methodName: string;
1029
1022
  expressPath: string;
1030
- httpRequestType: CoreModels.HttpMethod;
1023
+ httpRequestType: CoreModels_HttpMethod;
1031
1024
  }
1032
1025
  /**
1033
1026
  * TODO
@@ -1086,8 +1079,8 @@ interface TaonHttpDecoratorOptions {
1086
1079
  * @deprecated don't use in production - keep stuff encapsulated
1087
1080
  */
1088
1081
  pathIsGlobal?: boolean;
1089
- overrideContentType?: CoreModels.ContentType;
1090
- overrideResponseType?: Models$1.ResponseTypeAxios;
1082
+ overrideContentType?: CoreModels_ContentType;
1083
+ overrideResponseType?: Models_ResponseTypeAxios;
1091
1084
  /**
1092
1085
  * Express will send response as HTML string with proper headers
1093
1086
  */
@@ -1103,7 +1096,7 @@ declare function GET(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGl
1103
1096
  * ...
1104
1097
  * // in your taon controller
1105
1098
  * ..Taon.Http.HTML()
1106
- * sendHtmlDummyWebsite(): Taon.ResponseHtml {
1099
+ * sendHtmlDummyWebsite(): Taon_ResponseHtml {
1107
1100
  * return `
1108
1101
  <html>
1109
1102
  <head>
@@ -1128,7 +1121,7 @@ declare function DELETE(pathOrOptions?: string | TaonHttpDecoratorOptions, pathI
1128
1121
 
1129
1122
  declare class ParamConfig {
1130
1123
  paramName: string;
1131
- paramType: CoreModels.ParamType;
1124
+ paramType: CoreModels_ParamType;
1132
1125
  index: number;
1133
1126
  defaultType: any;
1134
1127
  expireInSeconds?: number;
@@ -1151,7 +1144,7 @@ declare class MethodConfig implements Pick<TaonHttpDecoratorOptions, 'path' | 'm
1151
1144
  overrideExpressSendAsHtml?: boolean;
1152
1145
  path: string;
1153
1146
  descriptor: PropertyDescriptor;
1154
- type: CoreModels.HttpMethod;
1147
+ type: CoreModels_HttpMethod;
1155
1148
  parameters: {
1156
1149
  [paramName: string]: Partial<ParamConfig>;
1157
1150
  };
@@ -1170,12 +1163,10 @@ declare class MethodConfig implements Pick<TaonHttpDecoratorOptions, 'path' | 'm
1170
1163
  calculatedMiddlewares: (typeof TaonBaseMiddleware)[];
1171
1164
  }
1172
1165
 
1173
- declare namespace Validators {
1174
- const classNameVlidation: (className: any, target: Function) => any;
1175
- const checkIfMethodsWithReponseTYpeAlowed: (methods: MethodConfig[], current: MethodConfig) => void;
1176
- const validateClassFunctions: (controllers: any[], entities: any[], proviers: any[], repositories: any[]) => void;
1177
- const preventUndefinedModel: (model: any, id: any) => void;
1178
- }
1166
+ declare const Validators_classNameVlidation: (className: any, target: Function) => any;
1167
+ declare const Validators_checkIfMethodsWithReponseTYpeAlowed: (methods: MethodConfig[], current: MethodConfig) => void;
1168
+ declare const Validators_validateClassFunctions: (controllers: any[], entities: any[], proviers: any[], repositories: any[]) => void;
1169
+ declare const Validators_preventUndefinedModel: (model: any, id: any) => void;
1179
1170
 
1180
1171
  declare class TaonBaseClass<CloneT extends TaonBaseClass = any> {
1181
1172
  /**
@@ -1268,7 +1259,7 @@ declare const TaonBaseContext: {
1268
1259
  readonly __refSync: taon_websql.EndpointContext;
1269
1260
  getClassInstance<T>(ctor: new (...args: any[]) => T): T;
1270
1261
  getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
1271
- initialize: (overrideOptions?: taon_websql.Models.TaonInitializeParams) => Promise<taon_websql.EndpointContext>;
1262
+ initialize: (overrideOptions?: taon_websql.Models_TaonInitializeParams) => Promise<taon_websql.EndpointContext>;
1272
1263
  readonly realtime: {
1273
1264
  readonly client: taon_websql.RealtimeClient;
1274
1265
  readonly server: taon_websql.RealtimeServer;
@@ -1294,13 +1285,13 @@ declare class TaonBaseController<UPLOAD_FILE_QUERY_PARAMS = {}> extends TaonBase
1294
1285
  afterAllCtxInited(options: {
1295
1286
  ctxStorage: ContextsEndpointStorage;
1296
1287
  }): Promise<void>;
1297
- uploadFormDataToServer(formData: FormData, queryParams?: UPLOAD_FILE_QUERY_PARAMS): Models.Http.Response<MulterFileUploadResponse[]>;
1288
+ uploadFormDataToServer(formData: FormData, queryParams?: UPLOAD_FILE_QUERY_PARAMS): Models_Http_Response<MulterFileUploadResponse[]>;
1298
1289
  /**
1299
1290
  * Hook after file is uploaded
1300
1291
  * through `uploadFormDataToServer` or `uploadLocalFileToServer`
1301
1292
  */
1302
1293
  protected afterFileUploadAction(file?: MulterFileUploadResponse, queryParams?: UPLOAD_FILE_QUERY_PARAMS): void | Promise<void>;
1303
- uploadLocalFileToServer(absFilePath: string, options?: Pick<Models.Http.Rest.Ng2RestAxiosRequestConfig, 'onUploadProgress'>, queryParams?: UPLOAD_FILE_QUERY_PARAMS): Promise<MulterFileUploadResponse[]>;
1294
+ uploadLocalFileToServer(absFilePath: string, options?: Pick<Models_Ng2RestAxiosRequestConfig, 'onUploadProgress'>, queryParams?: UPLOAD_FILE_QUERY_PARAMS): Promise<MulterFileUploadResponse[]>;
1304
1295
  /**
1305
1296
  * Easy way to wait for status change with http (1s default) pooling.
1306
1297
  *
@@ -1326,7 +1317,7 @@ declare class TaonBaseController<UPLOAD_FILE_QUERY_PARAMS = {}> extends TaonBase
1326
1317
  */
1327
1318
  reqIndexNum?: number;
1328
1319
  httpErrorsCount?: number;
1329
- }) => ReturnType<Models.Http.Response<T>['request']>;
1320
+ }) => ReturnType<Models_Http_Response<T>['request']>;
1330
1321
  poolingInterval?: number;
1331
1322
  /**
1332
1323
  * default infinite tries
@@ -1366,18 +1357,18 @@ declare abstract class TaonBaseCrudController<Entity, UPLOAD_FILE_QUERY_PARAMS =
1366
1357
  */
1367
1358
  abstract entityClassResolveFn: () => any;
1368
1359
  _(): Promise<void>;
1369
- bufforedChanges(id: number | string, property: string, alreadyLength?: number): Models.Http.Response<string | any[]>;
1370
- pagination(pageNumber?: number, pageSize?: number, search?: string): Models.Http.Response<Entity[]>;
1371
- getAll(): Models.Http.Response<Entity[]>;
1372
- getBy(id: number | string): Models.Http.Response<Entity>;
1373
- updateById(id: number | string, item: Entity): Models.Http.Response<Entity>;
1374
- patchById(id: number | string, item: Entity): Models.Http.Response<Entity>;
1375
- bulkUpdate(items: Entity[]): Models.Http.Response<Entity[]>;
1376
- deleteById(id: number | string): Models.Http.Response<Entity>;
1377
- bulkDelete(ids: (number | string)[]): Models.Http.Response<(number | string | Entity)[]>;
1378
- clearTable(): Models.Http.Response<void>;
1379
- save(item: Entity): Models.Http.Response<Entity>;
1380
- bulkCreate(items: Entity): Models.Http.Response<Entity[]>;
1360
+ bufforedChanges(id: number | string, property: string, alreadyLength?: number): Models_Http_Response<string | any[]>;
1361
+ pagination(pageNumber?: number, pageSize?: number, search?: string): Models_Http_Response<Entity[]>;
1362
+ getAll(): Models_Http_Response<Entity[]>;
1363
+ getBy(id: number | string): Models_Http_Response<Entity>;
1364
+ updateById(id: number | string, item: Entity): Models_Http_Response<Entity>;
1365
+ patchById(id: number | string, item: Entity): Models_Http_Response<Entity>;
1366
+ bulkUpdate(items: Entity[]): Models_Http_Response<Entity[]>;
1367
+ deleteById(id: number | string): Models_Http_Response<Entity>;
1368
+ bulkDelete(ids: (number | string)[]): Models_Http_Response<(number | string | Entity)[]>;
1369
+ clearTable(): Models_Http_Response<void>;
1370
+ save(item: Entity): Models_Http_Response<Entity>;
1371
+ bulkCreate(items: Entity): Models_Http_Response<Entity[]>;
1381
1372
  }
1382
1373
 
1383
1374
  /**
@@ -1549,7 +1540,7 @@ declare class RepeatTypeComponent extends FieldArrayType {
1549
1540
  type FormlyInputType = 'input' | 'switch' | 'datepicker' | 'repeat' | 'group' | 'select';
1550
1541
 
1551
1542
  declare function getFromlyConfigFor(target: Function, options?: {
1552
- formType?: CoreModels.UIFramework;
1543
+ formType?: CoreModels_UIFramework;
1553
1544
  keysPathesToInclude?: string[];
1554
1545
  keysPathesToExclude?: string[];
1555
1546
  parentModel?: string;
@@ -1584,47 +1575,43 @@ declare function RegisterComponentTypeForEntity(entity: Function | Function[]):
1584
1575
  declare function RegisterComponentType(className: string, ...optionslNames: string[]): any;
1585
1576
  declare function getRegisteredComponents(): FormlyEntityType[];
1586
1577
 
1587
- declare namespace ClassHelpers {
1588
- /**
1589
- * TODO - repalce in every place when getting class fn from object
1590
- */
1591
- const getClassFnFromObject: (json: Object) => any;
1592
- const getName: (classFnOrObject: any) => string;
1593
- const getOrginalClass: (classFnOrObject: any) => any;
1594
- const getFullInternalName: (classFnOrObject: any) => string;
1595
- const getUniqueKey: (classFnOrObject: any) => string;
1596
- const isContextClassObject: (obj: any) => boolean;
1597
- const setName: (target: Function, className: string) => void;
1598
- const hasParentClassWithName: (target: Function, className: string, targets?: any[]) => boolean;
1599
- /**
1600
- * Express async handler for middleware functions.
1601
- */
1602
- const asyncHandler: (fn: any) => (req: any, res: any, next: any) => void;
1603
- const getMethodsNames: (classOrClassInstance: any, allMethodsNames?: any[]) => string[];
1604
- const getControllerConfigs: (target: Function, configs?: ControllerConfig[], callerTarget?: Function) => ControllerConfig[];
1605
- const ensureClassConfig: (target: Function) => Partial<ControllerConfig>;
1606
- const ensureMethodConfig: (target: any, propertyKey: string | symbol) => Partial<MethodConfig>;
1607
- const getClassConfig: (constructor: Function) => Partial<ControllerConfig> | undefined;
1608
- }
1578
+ /**
1579
+ * TODO - repalce in every place when getting class fn from object
1580
+ */
1581
+ declare const ClassHelpers_getClassFnFromObject: (json: Object) => any;
1582
+ declare const ClassHelpers_getName: (classFnOrObject: any) => string;
1583
+ declare const ClassHelpers_getOrginalClass: (classFnOrObject: any) => any;
1584
+ declare const ClassHelpers_getFullInternalName: (classFnOrObject: any) => string;
1585
+ declare const ClassHelpers_getUniqueKey: (classFnOrObject: any) => string;
1586
+ declare const ClassHelpers_isContextClassObject: (obj: any) => boolean;
1587
+ declare const ClassHelpers_setName: (target: Function, className: string) => void;
1588
+ declare const ClassHelpers_hasParentClassWithName: (target: Function, className: string, targets?: any[]) => boolean;
1589
+ /**
1590
+ * Express async handler for middleware functions.
1591
+ */
1592
+ declare const ClassHelpers_asyncHandler: (fn: any) => (req: any, res: any, next: any) => void;
1593
+ declare const ClassHelpers_getMethodsNames: (classOrClassInstance: any, allMethodsNames?: any[]) => string[];
1594
+ declare const ClassHelpers_getControllerConfigs: (target: Function, configs?: ControllerConfig[], callerTarget?: Function) => ControllerConfig[];
1595
+ declare const ClassHelpers_ensureClassConfig: (target: Function) => Partial<ControllerConfig>;
1596
+ declare const ClassHelpers_ensureMethodConfig: (target: any, propertyKey: string | symbol) => Partial<MethodConfig>;
1597
+ declare const ClassHelpers_getClassConfig: (constructor: Function) => Partial<ControllerConfig> | undefined;
1609
1598
 
1610
1599
  declare const cloneObj: <CloneT>(override: Partial<CloneT>, classFn: Function) => CloneT;
1611
1600
 
1612
- declare namespace TaonHelpers {
1613
- const fillUpTo: (s: string, nCharacters: number) => string;
1614
- const isGoodPath: (p: string) => boolean;
1615
- const firstStringOrElemFromArray: (stringOrArrayOfString: string[] | string) => string;
1616
- const tryTransformParam: (param: any) => any;
1617
- const getExpressPath: (c: ControllerConfig, pathOrClassConfig: Partial<MethodConfig>) => string;
1618
- const defaultType: (value: any) => {};
1619
- const parseJSONwithStringJSONs: (object: Object, waring?: boolean) => Object;
1620
- const isPlainFileOrFolder: (filePath: any) => boolean;
1621
- const ipcKeyNameResponse: (target: Function, methodConfig: Partial<MethodConfig>, expressPath: string) => string;
1622
- const ipcKeyNameRequest: (target: Function, methodConfig: Partial<MethodConfig>, expressPath: string) => string;
1623
- const websqlMocks: (headers: any) => {
1624
- request: Express.Request;
1625
- response: Express.Response;
1626
- };
1627
- }
1601
+ declare const TaonHelpers_fillUpTo: (s: string, nCharacters: number) => string;
1602
+ declare const TaonHelpers_isGoodPath: (p: string) => boolean;
1603
+ declare const TaonHelpers_firstStringOrElemFromArray: (stringOrArrayOfString: string[] | string) => string;
1604
+ declare const TaonHelpers_tryTransformParam: (param: any) => any;
1605
+ declare const TaonHelpers_getExpressPath: (c: ControllerConfig, pathOrClassConfig: Partial<MethodConfig>) => string;
1606
+ declare const TaonHelpers_defaultType: (value: any) => {};
1607
+ declare const TaonHelpers_parseJSONwithStringJSONs: (object: Object, waring?: boolean) => Object;
1608
+ declare const TaonHelpers_isPlainFileOrFolder: (filePath: any) => boolean;
1609
+ declare const TaonHelpers_ipcKeyNameResponse: (target: Function, methodConfig: Partial<MethodConfig>, expressPath: string) => string;
1610
+ declare const TaonHelpers_ipcKeyNameRequest: (target: Function, methodConfig: Partial<MethodConfig>, expressPath: string) => string;
1611
+ declare const TaonHelpers_websqlMocks: (headers: any) => {
1612
+ request: Express.Request;
1613
+ response: Express.Response;
1614
+ };
1628
1615
 
1629
1616
  /**
1630
1617
  * 100 default characters varchar
@@ -1706,32 +1693,30 @@ declare abstract class RealtimeStrategy {
1706
1693
  abstract toString(): string;
1707
1694
  }
1708
1695
 
1709
- declare namespace RealtimeModels {
1710
- type SubsManagerOpt = {
1711
- core: RealtimeCore;
1712
- customEvent: string;
1713
- roomName: string;
1714
- property: string;
1715
- };
1716
- interface ChangeOption {
1717
- /**
1718
- * Specify property name to listen changes on that property only;
1719
- */
1720
- property?: string;
1721
- /**
1722
- * Override custom event name to listen
1723
- */
1724
- customEvent?: string;
1725
- /**
1726
- * Value from entity object.
1727
- * Key for this value is usually id or unique key
1728
- * property defined in entity decorator.
1729
- * TODO @LAST IMPLEMENT unique key support
1730
- */
1731
- idOrUniqValue?: any;
1732
- }
1733
- type EventHandler = (...args: any[]) => void;
1696
+ type RealtimeModels_SubsManagerOpt = {
1697
+ core: RealtimeCore;
1698
+ customEvent: string;
1699
+ roomName: string;
1700
+ property: string;
1701
+ };
1702
+ interface RealtimeModels_ChangeOption {
1703
+ /**
1704
+ * Specify property name to listen changes on that property only;
1705
+ */
1706
+ property?: string;
1707
+ /**
1708
+ * Override custom event name to listen
1709
+ */
1710
+ customEvent?: string;
1711
+ /**
1712
+ * Value from entity object.
1713
+ * Key for this value is usually id or unique key
1714
+ * property defined in entity decorator.
1715
+ * TODO @LAST IMPLEMENT unique key support
1716
+ */
1717
+ idOrUniqValue?: any;
1734
1718
  }
1719
+ type RealtimeModels_EventHandler = (...args: any[]) => void;
1735
1720
 
1736
1721
  declare class MockServerIpc {
1737
1722
  contextName: string;
@@ -1757,8 +1742,8 @@ declare class MockNamespaceIpc {
1757
1742
  * Namespace name
1758
1743
  */
1759
1744
  name: string, server: MockServerIpc);
1760
- on(eventName: string, callback: RealtimeModels.EventHandler): any;
1761
- off(event: string, callback?: RealtimeModels.EventHandler): any;
1745
+ on(eventName: string, callback: RealtimeModels_EventHandler): any;
1746
+ off(event: string, callback?: RealtimeModels_EventHandler): any;
1762
1747
  emit(eventName: string, ...args: any[]): any;
1763
1748
  to(roomName: string): RoomEmitterIpc;
1764
1749
  in(roomName: string): RoomEmitterIpc;
@@ -1891,7 +1876,7 @@ declare class RealtimeClient {
1891
1876
  * myContext.realtimeServer.triggerEntityChanges(myEntityInstance);
1892
1877
  * ...
1893
1878
  */
1894
- listenChangesEntity<RESULT = any>(entityClassFnOrObj: Function | object, options?: RealtimeModels.ChangeOption): Observable<RESULT>;
1879
+ listenChangesEntity<RESULT = any>(entityClassFnOrObj: Function | object, options?: RealtimeModels_ChangeOption): Observable<RESULT>;
1895
1880
  /**
1896
1881
  * Listen changes entity table
1897
1882
  * Example: for pagination, lists update ...
@@ -1911,7 +1896,7 @@ declare class RealtimeSubsManager {
1911
1896
  private options;
1912
1897
  private isListening;
1913
1898
  private observers;
1914
- constructor(options: RealtimeModels.SubsManagerOpt);
1899
+ constructor(options: RealtimeModels_SubsManagerOpt);
1915
1900
  startListenIfNotStarted(realtime: Socket<DefaultEventsMap, DefaultEventsMap>): void;
1916
1901
  add(observer: Subscriber<any>): void;
1917
1902
  remove(observer: Subscriber<any>): void;
@@ -1934,8 +1919,8 @@ declare class TaonEntityOptions<T = any> extends DecoratorAbstractOpt {
1934
1919
  */
1935
1920
  uniqueKeyProp?: string;
1936
1921
  createTable?: boolean;
1937
- defaultModelValues?: Mapping.ModelValue<T>;
1938
- defaultModelMapping?: Mapping.Mapping<T>;
1922
+ defaultModelValues?: Mapping_ModelValue<T>;
1923
+ defaultModelMapping?: Mapping_Mapping<T>;
1939
1924
  defaultModelMappingDeep?: {
1940
1925
  [lodashPathes: string]: string | [string];
1941
1926
  };
@@ -2008,91 +1993,88 @@ declare class TaonAdminService {
2008
1993
  logout(): void;
2009
1994
  }
2010
1995
 
2011
- declare namespace Taon {
2012
- /**
2013
- * Remove global taon loader from env.ts [loading.preAngularBootstrap]
2014
- */
2015
- const removeLoader: (afterMS?: number) => Promise<void>;
2016
- const error: (opt: Pick<RestErrorResponseWrapper, "message" | "status" | "details" | "code"> | string) => void;
2017
- type ResponseHtml = Models.Http.Response<string>;
2018
- export import Response = Models.Http.Response;
2019
- export import StartParams = Models.StartParams;
2020
- const getResponseValue: <T>(response: Response<T>, options?: {
2021
- req: express.Request<any>;
2022
- res: express.Response<any>;
2023
- }) => Promise<T>;
2024
- const isBrowser: boolean;
2025
- const isNode: boolean;
2026
- const isWebSQL: boolean;
2027
- const isElectron: boolean;
2028
- 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>) => {
2029
- readonly contextName: string;
2030
- readonly appId: string;
2031
- cloneAsRemote: (cloneOpt?: {
2032
- overrideRemoteHost?: string;
2033
- }) => /*elided*/ any;
2034
- cloneAsNormal: (cloneOpt?: {
2035
- overrideHost?: string;
2036
- }) => /*elided*/ any;
2037
- __ref(): Promise<EndpointContext>;
2038
- readonly __refSync: EndpointContext;
2039
- getClassInstance<T>(ctor: new (...args: any[]) => T): T;
2040
- getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
2041
- initialize: (overrideOptions?: Models.TaonInitializeParams) => Promise<EndpointContext>;
2042
- readonly realtime: {
2043
- readonly client: taon_websql.RealtimeClient;
2044
- readonly server: taon_websql.RealtimeServer;
2045
- };
1996
+ /**
1997
+ * Remove global taon loader from env.ts [loading.preAngularBootstrap]
1998
+ */
1999
+ declare const Taon_removeLoader: (afterMS?: number) => Promise<void>;
2000
+ declare const Taon_error: (opt: Pick<RestErrorResponseWrapper, "message" | "status" | "details" | "code"> | string) => void;
2001
+ type Taon_ResponseHtml = Models_Http_Response<string>;
2002
+ type Taon_Response<T = string> = Models_Http_Response<T>;
2003
+ type Taon_StartParams = Models_StartParams;
2004
+ declare const Taon_getResponseValue: <T>(response: Models_Http_Response<T>, options?: {
2005
+ req: express.Request<any>;
2006
+ res: express.Response<any>;
2007
+ }) => Promise<T>;
2008
+ declare const Taon_isBrowser: boolean;
2009
+ declare const Taon_isNode: boolean;
2010
+ declare const Taon_isWebSQL: boolean;
2011
+ declare const Taon_isElectron: boolean;
2012
+ 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>) => {
2013
+ readonly contextName: string;
2014
+ readonly appId: string;
2015
+ cloneAsRemote: (cloneOpt?: {
2016
+ overrideRemoteHost?: string;
2017
+ }) => /*elided*/ any;
2018
+ cloneAsNormal: (cloneOpt?: {
2019
+ overrideHost?: string;
2020
+ }) => /*elided*/ any;
2021
+ __ref(): Promise<EndpointContext>;
2022
+ readonly __refSync: EndpointContext;
2023
+ getClassInstance<T>(ctor: new (...args: any[]) => T): T;
2024
+ getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
2025
+ initialize: (overrideOptions?: Models_TaonInitializeParams) => Promise<EndpointContext>;
2026
+ readonly realtime: {
2027
+ readonly client: taon_websql.RealtimeClient;
2028
+ readonly server: taon_websql.RealtimeServer;
2029
+ };
2030
+ };
2031
+ 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>) => () => {
2032
+ readonly contextName: string;
2033
+ readonly appId: string;
2034
+ cloneAsRemote: (cloneOpt?: {
2035
+ overrideRemoteHost?: string;
2036
+ }) => /*elided*/ any;
2037
+ cloneAsNormal: (cloneOpt?: {
2038
+ overrideHost?: string;
2039
+ }) => /*elided*/ any;
2040
+ __ref(): Promise<EndpointContext>;
2041
+ readonly __refSync: EndpointContext;
2042
+ getClassInstance<T>(ctor: new (...args: any[]) => T): T;
2043
+ getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
2044
+ initialize: (overrideOptions?: Models_TaonInitializeParams) => Promise<EndpointContext>;
2045
+ readonly realtime: {
2046
+ readonly client: taon_websql.RealtimeClient;
2047
+ readonly server: taon_websql.RealtimeServer;
2046
2048
  };
2047
- 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>) => () => {
2048
- readonly contextName: string;
2049
- readonly appId: string;
2050
- cloneAsRemote: (cloneOpt?: {
2051
- overrideRemoteHost?: string;
2052
- }) => /*elided*/ any;
2053
- cloneAsNormal: (cloneOpt?: {
2054
- overrideHost?: string;
2055
- }) => /*elided*/ any;
2056
- __ref(): Promise<EndpointContext>;
2057
- readonly __refSync: EndpointContext;
2058
- getClassInstance<T>(ctor: new (...args: any[]) => T): T;
2059
- getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
2060
- initialize: (overrideOptions?: Models.TaonInitializeParams) => Promise<EndpointContext>;
2061
- readonly realtime: {
2062
- readonly client: taon_websql.RealtimeClient;
2063
- readonly server: taon_websql.RealtimeServer;
2064
- };
2049
+ };
2050
+ declare const Taon_inject: <T>(entity: () => new (...args: any[]) => T) => T;
2051
+ /**
2052
+ * @deprecated
2053
+ * use createContext instead
2054
+ */
2055
+ declare const Taon_init: (options: {
2056
+ host: string;
2057
+ entities: Function[];
2058
+ controllers: Function[];
2059
+ }) => Promise<{
2060
+ readonly contextName: string;
2061
+ readonly appId: string;
2062
+ cloneAsRemote: (cloneOpt?: {
2063
+ overrideRemoteHost?: string;
2064
+ }) => /*elided*/ any;
2065
+ cloneAsNormal: (cloneOpt?: {
2066
+ overrideHost?: string;
2067
+ }) => /*elided*/ any;
2068
+ __ref(): Promise<EndpointContext>;
2069
+ readonly __refSync: EndpointContext;
2070
+ getClassInstance<T>(ctor: new (...args: any[]) => T): T;
2071
+ getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
2072
+ initialize: (overrideOptions?: Models_TaonInitializeParams) => Promise<EndpointContext>;
2073
+ readonly realtime: {
2074
+ readonly client: taon_websql.RealtimeClient;
2075
+ readonly server: taon_websql.RealtimeServer;
2065
2076
  };
2066
- const inject: <T>(entity: () => new (...args: any[]) => T) => T;
2067
- const symbols: typeof Symbols;
2068
- /**
2069
- * @deprecated
2070
- * use createContext instead
2071
- */
2072
- const init: (options: {
2073
- host: string;
2074
- entities: Function[];
2075
- controllers: Function[];
2076
- }) => Promise<{
2077
- readonly contextName: string;
2078
- readonly appId: string;
2079
- cloneAsRemote: (cloneOpt?: {
2080
- overrideRemoteHost?: string;
2081
- }) => /*elided*/ any;
2082
- cloneAsNormal: (cloneOpt?: {
2083
- overrideHost?: string;
2084
- }) => /*elided*/ any;
2085
- __ref(): Promise<EndpointContext>;
2086
- readonly __refSync: EndpointContext;
2087
- getClassInstance<T>(ctor: new (...args: any[]) => T): T;
2088
- getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
2089
- initialize: (overrideOptions?: Models.TaonInitializeParams) => Promise<EndpointContext>;
2090
- readonly realtime: {
2091
- readonly client: taon_websql.RealtimeClient;
2092
- readonly server: taon_websql.RealtimeServer;
2093
- };
2094
- }>;
2095
- }
2077
+ }>;
2096
2078
  declare const TAON_FLATTEN_MAPPING: {
2097
2079
  'taon/src': {
2098
2080
  'Taon.Http.GET': string;
@@ -2183,5 +2165,5 @@ declare const TAON_FLATTEN_MAPPING: {
2183
2165
  };
2184
2166
  };
2185
2167
 
2186
- export { BaseTaonClassesNames, Body, BooleanColumn, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL, ClassHelpers, ContextDbMigrations, ContextsEndpointStorage, ControllerConfig, Cookie, DELETE, DITaonContainer, DateTimeColumn, DecimalNumberColumn, DecoratorAbstractOpt, EndpointContext, EntityProcess, FormlyHorizontalWrapper, GET, HEAD, HTML, Header, MethodConfig, MockNamespaceIpc, MockServerIpc, MockSocketIpc, Models, NumberColumn, PATCH, POST, PUT, ParamConfig, Path, Query, RealtimeClient, RealtimeCore, RealtimeModels, RealtimeServer, RealtimeStrategy, RealtimeStrategyIpc, RealtimeStrategyMock, RealtimeStrategySocketIO, RealtimeSubsManager, RegisterComponentType, RegisterComponentTypeForEntity, RepeatTypeComponent, SimpleJsonColumn, String100Column, String200Column, String20Column, String45Column, String500Column, StringColumn, Symbols, TAON_CONTEXT, TAON_FLATTEN_MAPPING, Taon, TaonAdminService, TaonBaseAbstractEntity, TaonBaseAngularService, TaonBaseClass, TaonBaseContext, TaonBaseController, TaonBaseCrudController, TaonBaseCustomRepository, TaonBaseEntity, TaonBaseFileUploadMiddleware, TaonBaseInjector, TaonBaseMiddleware, TaonBaseMigration, TaonBaseProvider, TaonBaseRepository, TaonBaseSubscriberForEntity, TaonController, TaonControllerOptions, TaonEntity, TaonEntityKeysToOmitArr, TaonEntityOptions, TaonHelpers, TaonMiddleware, TaonMiddlewareOptions, TaonMigration, TaonMigrationOptions, TaonProvider, TaonProviderOptions, TaonRepository, TaonRepositoryOptions, TaonRestResponseWrapper, TaonSubscriber, TaonSubscriberOptions, TaonTempDatabasesFolder, TaonTempRoutesFolder, Validators, apiPrefix, cloneObj, controllerConfigFrom, createContext, createContextTemplate, findTypeForEntity, getFromlyConfigFor, getRegisteredComponents, getResponseValue, getTransformFunction, inject, singleTransform, typeFromEntity, typeFromName };
2187
- export type { AbstractEntityOmitKeys, FormlyArrayTransformFn, FormlyEntityType, FormlyInputType, MigrationStatus, MulterFileUploadResponse, TaonAdditionalMiddlewareMethodInfo, TaonContext, TaonEntityKeysToOmit, TaonHttpDecoratorOptions, TaonMiddlewareFunction, TaonMiddlewareInheritanceObj };
2168
+ 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 };
2169
+ export type { AbstractEntityOmitKeys, FormlyArrayTransformFn, FormlyEntityType, FormlyInputType, MigrationStatus, Models_ConnectionOptionsLogs, Models_ContextOptions, Models_DBRecreateMode, Models_FrameworkMode, Models_Http_AsyncResponse, Models_Http_AuthCallBack, 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_Response, Taon_ResponseHtml, Taon_StartParams };