@flusys/nestjs-entity-builder 9.1.1 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +24 -12
  2. package/config/message-keys.d.ts +29 -0
  3. package/controllers/entity-definition.controller.d.ts +1 -0
  4. package/controllers/field-definition.controller.d.ts +1 -0
  5. package/controllers/flow-definition.controller.d.ts +1 -0
  6. package/dtos/definition-bundle.dto.d.ts +1 -0
  7. package/dtos/entity-definition.dto.d.ts +1 -2
  8. package/fesm/21.js +31 -2
  9. package/fesm/458.js +8 -3
  10. package/fesm/677.js +890 -465
  11. package/fesm/{582.js → 857.js} +201 -265
  12. package/fesm/870.js +580 -247
  13. package/fesm/897.js +164 -22
  14. package/fesm/946.js +5 -1
  15. package/fesm/controllers/index.js +1 -1
  16. package/fesm/dtos/index.js +11 -0
  17. package/fesm/guards/index.js +2 -2
  18. package/fesm/index.js +39 -6
  19. package/fesm/interfaces/index.js +74 -3
  20. package/fesm/modules/index.js +1 -1
  21. package/fesm/rule-engine/index.js +2 -2
  22. package/fesm/services/index.js +13 -3
  23. package/flow-engine/flow-input.validator.d.ts +2 -1
  24. package/flow-engine/flow-run.types.d.ts +1 -0
  25. package/flow-engine/flow.types.d.ts +25 -4
  26. package/interfaces/definition-bundle.interface.d.ts +2 -1
  27. package/interfaces/generic-record.interface.d.ts +11 -1
  28. package/package.json +3 -4
  29. package/rule-engine/rule-engine.service.d.ts +2 -1
  30. package/rule-engine/rule-regex.d.ts +0 -2
  31. package/rule-engine/rule-values.d.ts +4 -1
  32. package/rule-engine/rule.interface.d.ts +2 -3
  33. package/services/definition-bundle.diff.d.ts +6 -0
  34. package/services/definition-bundle.service.d.ts +10 -2
  35. package/services/entity-flow-scaffold.d.ts +2 -1
  36. package/services/entity-permission.service.d.ts +1 -0
  37. package/services/flow-definition.service.d.ts +1 -1
  38. package/services/flow-runtime.service.d.ts +1 -0
  39. package/services/generic-entity.service.d.ts +5 -0
  40. package/services/schema-change-executor.service.d.ts +1 -0
  41. package/services/schema-dialect-adapter.service.d.ts +2 -0
@@ -16,14 +16,70 @@ __webpack_require__.d(__webpack_exports__, {
16
16
  const RECORD_FILTER_OPS = [
17
17
  'eq',
18
18
  'ne',
19
+ 'ieq',
19
20
  'gt',
20
21
  'gte',
21
22
  'lt',
22
23
  'lte',
24
+ 'between',
25
+ 'not_between',
23
26
  'in',
27
+ 'not_in',
28
+ 'contains',
29
+ 'not_contains',
30
+ 'starts_with',
31
+ 'ends_with',
32
+ 'has_any',
33
+ 'has_all',
34
+ 'has_none',
35
+ 'is_empty',
36
+ 'not_empty',
24
37
  'is_null',
25
38
  'not_null'
26
39
  ];
40
+ const FILTER_OP_VALUE_KIND = {
41
+ eq: 'single',
42
+ ne: 'single',
43
+ ieq: 'single',
44
+ gt: 'single',
45
+ gte: 'single',
46
+ lt: 'single',
47
+ lte: 'single',
48
+ between: 'range',
49
+ not_between: 'range',
50
+ in: 'list',
51
+ not_in: 'list',
52
+ contains: 'single',
53
+ not_contains: 'single',
54
+ starts_with: 'single',
55
+ ends_with: 'single',
56
+ has_any: 'list',
57
+ has_all: 'list',
58
+ has_none: 'list',
59
+ is_empty: 'none',
60
+ not_empty: 'none',
61
+ is_null: 'none',
62
+ not_null: 'none'
63
+ };
64
+ /** Case-insensitive text operators: text, long text, email and single-select fields only. */ const TEXT_FILTER_OPS = [
65
+ 'ieq',
66
+ 'contains',
67
+ 'not_contains',
68
+ 'starts_with',
69
+ 'ends_with'
70
+ ];
71
+ /** Multi-select operators: whether the stored list holds any / all / none of the given values. */ const LIST_FIELD_FILTER_OPS = [
72
+ 'has_any',
73
+ 'has_all',
74
+ 'has_none'
75
+ ];
76
+ /** Blank checks: no value, an empty text or an empty multi-select. */ const EMPTY_FILTER_OPS = [
77
+ 'is_empty',
78
+ 'not_empty'
79
+ ];
80
+ function isFilterRange(value) {
81
+ return !!value && typeof value === 'object' && !Array.isArray(value) && 'from' in value && 'to' in value && Object.keys(value).length === 2;
82
+ }
27
83
  const RECORD_FILTER_LIMITS = {
28
84
  MAX_IN_VALUES: 100
29
85
  };
@@ -42,10 +98,15 @@ const FILTER_CONDITION_KEYS = new Set([
42
98
  }
43
99
 
44
100
  __webpack_require__.d(__webpack_exports__, {
101
+ iA: () => (isFilterRange),
45
102
  t1: () => (isRecordFilterCondition)
46
103
  }, {
47
104
  M5: RECORD_FILTER_LIMITS,
48
- ox: RECORD_FILTER_OPS
105
+ Oh: EMPTY_FILTER_OPS,
106
+ ox: RECORD_FILTER_OPS,
107
+ w9: FILTER_OP_VALUE_KIND,
108
+ wk: TEXT_FILTER_OPS,
109
+ yV: LIST_FIELD_FILTER_OPS
49
110
  });
50
111
 
51
112
 
@@ -65,9 +126,14 @@ __webpack_require__.d(__webpack_exports__, {
65
126
  $j: () => (/* reexport safe */ _reference_provider_interface_js__rspack_import_1.$),
66
127
  DB: () => (/* reexport safe */ _definition_bundle_interface_js__rspack_import_2.D),
67
128
  M5: () => (/* reexport safe */ _generic_record_interface_js__rspack_import_0.M5),
129
+ Oh: () => (/* reexport safe */ _generic_record_interface_js__rspack_import_0.Oh),
68
130
  _$: () => (/* reexport safe */ (/* inlined export _definition_bundle_interface_js__rspack_import_2 */1)),
131
+ iA: () => (/* reexport safe */ _generic_record_interface_js__rspack_import_0.iA),
69
132
  ox: () => (/* reexport safe */ _generic_record_interface_js__rspack_import_0.ox),
70
- t1: () => (/* reexport safe */ _generic_record_interface_js__rspack_import_0.t1)
133
+ t1: () => (/* reexport safe */ _generic_record_interface_js__rspack_import_0.t1),
134
+ w9: () => (/* reexport safe */ _generic_record_interface_js__rspack_import_0.w9),
135
+ wk: () => (/* reexport safe */ _generic_record_interface_js__rspack_import_0.wk),
136
+ yV: () => (/* reexport safe */ _generic_record_interface_js__rspack_import_0.yV)
71
137
  });
72
138
 
73
139
 
@@ -90,8 +156,13 @@ import * as __rspack_chunk_1 from './index.js';
90
156
  __webpack_require__.C(__rspack_chunk_1);
91
157
  var __webpack_exports__ = __webpack_exec__(9546);var __webpack_exports__DEFINITION_BUNDLE_FORMAT = __webpack_exports__.DB;
92
158
  var __webpack_exports__DEFINITION_BUNDLE_VERSION = __webpack_exports__._$;
159
+ var __webpack_exports__EMPTY_FILTER_OPS = __webpack_exports__.Oh;
160
+ var __webpack_exports__FILTER_OP_VALUE_KIND = __webpack_exports__.w9;
93
161
  var __webpack_exports__FLOW_REFERENCE_PROVIDER = __webpack_exports__.$j;
162
+ var __webpack_exports__LIST_FIELD_FILTER_OPS = __webpack_exports__.yV;
94
163
  var __webpack_exports__RECORD_FILTER_LIMITS = __webpack_exports__.M5;
95
164
  var __webpack_exports__RECORD_FILTER_OPS = __webpack_exports__.ox;
165
+ var __webpack_exports__TEXT_FILTER_OPS = __webpack_exports__.wk;
166
+ var __webpack_exports__isFilterRange = __webpack_exports__.iA;
96
167
  var __webpack_exports__isRecordFilterCondition = __webpack_exports__.t1;
97
- export { __webpack_exports__DEFINITION_BUNDLE_FORMAT as DEFINITION_BUNDLE_FORMAT, __webpack_exports__DEFINITION_BUNDLE_VERSION as DEFINITION_BUNDLE_VERSION, __webpack_exports__FLOW_REFERENCE_PROVIDER as FLOW_REFERENCE_PROVIDER, __webpack_exports__RECORD_FILTER_LIMITS as RECORD_FILTER_LIMITS, __webpack_exports__RECORD_FILTER_OPS as RECORD_FILTER_OPS, __webpack_exports__isRecordFilterCondition as isRecordFilterCondition };
168
+ export { __webpack_exports__DEFINITION_BUNDLE_FORMAT as DEFINITION_BUNDLE_FORMAT, __webpack_exports__DEFINITION_BUNDLE_VERSION as DEFINITION_BUNDLE_VERSION, __webpack_exports__EMPTY_FILTER_OPS as EMPTY_FILTER_OPS, __webpack_exports__FILTER_OP_VALUE_KIND as FILTER_OP_VALUE_KIND, __webpack_exports__FLOW_REFERENCE_PROVIDER as FLOW_REFERENCE_PROVIDER, __webpack_exports__LIST_FIELD_FILTER_OPS as LIST_FIELD_FILTER_OPS, __webpack_exports__RECORD_FILTER_LIMITS as RECORD_FILTER_LIMITS, __webpack_exports__RECORD_FILTER_OPS as RECORD_FILTER_OPS, __webpack_exports__TEXT_FILTER_OPS as TEXT_FILTER_OPS, __webpack_exports__isFilterRange as isFilterRange, __webpack_exports__isRecordFilterCondition as isRecordFilterCondition };
@@ -7,7 +7,7 @@ import * as __rspack_chunk_1 from '../21.js';
7
7
  __webpack_require__.C(__rspack_chunk_1);
8
8
  import * as __rspack_chunk_2 from '../897.js';
9
9
  __webpack_require__.C(__rspack_chunk_2);
10
- import * as __rspack_chunk_3 from '../582.js';
10
+ import * as __rspack_chunk_3 from '../857.js';
11
11
  __webpack_require__.C(__rspack_chunk_3);
12
12
  import * as __rspack_chunk_4 from '../794.js';
13
13
  __webpack_require__.C(__rspack_chunk_4);
@@ -14,11 +14,11 @@ import { __webpack_require__ } from '../runtime.js';
14
14
  var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
15
15
  import * as __rspack_chunk_1 from '../21.js';
16
16
  __webpack_require__.C(__rspack_chunk_1);
17
- import * as __rspack_chunk_2 from '../582.js';
17
+ import * as __rspack_chunk_2 from '../857.js';
18
18
  __webpack_require__.C(__rspack_chunk_2);
19
19
  import * as __rspack_chunk_3 from './index.js';
20
20
  __webpack_require__.C(__rspack_chunk_3);
21
- var __webpack_exports__ = __webpack_exec__(8429);var __webpack_exports__RULE_COMPARISON_OPERATORS = __webpack_exports__.dJ;
21
+ var __webpack_exports__ = __webpack_exec__(8552);var __webpack_exports__RULE_COMPARISON_OPERATORS = __webpack_exports__.dJ;
22
22
  var __webpack_exports__RULE_DURATION_UNITS = __webpack_exports__.qO;
23
23
  var __webpack_exports__RULE_ENGINE_LIMITS = __webpack_exports__.bw;
24
24
  var __webpack_exports__RULE_PERMISSION_FUNCTIONS = __webpack_exports__.l2;
@@ -36,6 +36,7 @@ __webpack_require__.d(__webpack_exports__, {
36
36
  DG: () => (/* reexport */ generic_entity_service/* .actorMetadata */.DG),
37
37
  $6: () => (/* reexport */ schema_columns/* .addUnique */.$6),
38
38
  gT: () => (/* reexport */ definition_bundle_diff/* .applyVariables */.gT),
39
+ b$: () => (/* reexport */ flow_definition_service/* .asksExecutePermission */.b$),
39
40
  fY: () => (/* reexport */ identifier_rules/* .assertIndexableField */.fY),
40
41
  kV: () => (/* reexport */ identifier_rules/* .assertValidIdentifier */.kV),
41
42
  HK: () => (/* reexport */ schema_columns/* .auditColumns */.HK),
@@ -51,8 +52,10 @@ __webpack_require__.d(__webpack_exports__, {
51
52
  an: () => (/* reexport */ schema_change_types/* .describeImpact */.a),
52
53
  Sy: () => (/* reexport */ definition_bundle_diff/* .diffEntities */.zb),
53
54
  x2: () => (/* reexport */ entity_flow_scaffold/* .entityFlowSlug */.x2),
55
+ ZM: () => (/* reexport */ entity_permission_service/* .entityPermissionCodes */.Z),
54
56
  lj: () => (/* reexport */ definition_bundle_diff/* .extractVariables */.lj),
55
57
  HQ: () => (/* reexport */ schema_dialect_adapter_service/* .fitIdentifier */.H),
58
+ f7: () => (/* reexport */ definition_bundle_diff/* .fixedIds */.f7),
56
59
  YW: () => (/* reexport */ flow_definition_service/* .flowNotFound */.YW),
57
60
  j4: () => (/* reexport */ flow_definition_service/* .flowPermissions */.j4),
58
61
  gl: () => (/* reexport */ flow_executor_service/* .flowTimeout */.g),
@@ -64,6 +67,7 @@ __webpack_require__.d(__webpack_exports__, {
64
67
  iw: () => (/* reexport */ database_error_mapper/* .mapSchemaError */.i),
65
68
  Og: () => (/* reexport */ definition_bundle_diff/* .matchDefinitions */.Og),
66
69
  qG: () => (/* reexport */ definition_bundle_diff/* .orderFlows */.qG),
70
+ QJ: () => (/* reexport */ definition_bundle_diff/* .permissionCodes */.QJ),
67
71
  v7: () => (/* reexport */ schema_columns/* .plainIndex */.v7),
68
72
  IM: () => (/* reexport */ field_type_conversion/* .planTypeConversion */.I),
69
73
  zi: () => (/* reexport */ definition_bundle_file/* .readBundleFile */.z),
@@ -78,7 +82,8 @@ __webpack_require__.d(__webpack_exports__, {
78
82
  RK: () => (/* reexport */ flow_definition_service/* .toFlowSettings */.RK),
79
83
  jp: () => (/* reexport */ schema_columns/* .typeFamily */.jp),
80
84
  eV: () => (/* reexport */ field_value_validator/* .validateRecord */.e),
81
- lw: () => (/* reexport */ flow_definition_service/* .workingCopy */.lw)
85
+ lw: () => (/* reexport */ flow_definition_service/* .workingCopy */.lw),
86
+ l6: () => (/* reexport */ definition_bundle_diff/* .writtenSecrets */.l6)
82
87
  });
83
88
 
84
89
  // EXTERNAL MODULE: ./projects/nestjs-entity-builder/src/services/entity-builder-config.service.ts
@@ -480,7 +485,7 @@ import * as __rspack_chunk_1 from '../21.js';
480
485
  __webpack_require__.C(__rspack_chunk_1);
481
486
  import * as __rspack_chunk_2 from '../897.js';
482
487
  __webpack_require__.C(__rspack_chunk_2);
483
- import * as __rspack_chunk_3 from '../582.js';
488
+ import * as __rspack_chunk_3 from '../857.js';
484
489
  __webpack_require__.C(__rspack_chunk_3);
485
490
  import * as __rspack_chunk_4 from '../794.js';
486
491
  __webpack_require__.C(__rspack_chunk_4);
@@ -521,6 +526,7 @@ var __webpack_exports__SchemaSyncService = __webpack_exports__.WQ;
521
526
  var __webpack_exports__actorMetadata = __webpack_exports__.DG;
522
527
  var __webpack_exports__addUnique = __webpack_exports__.$6;
523
528
  var __webpack_exports__applyVariables = __webpack_exports__.gT;
529
+ var __webpack_exports__asksExecutePermission = __webpack_exports__.b$;
524
530
  var __webpack_exports__assertIndexableField = __webpack_exports__.fY;
525
531
  var __webpack_exports__assertValidIdentifier = __webpack_exports__.kV;
526
532
  var __webpack_exports__auditColumns = __webpack_exports__.HK;
@@ -536,8 +542,10 @@ var __webpack_exports__defaultFlowPermissionCode = __webpack_exports__.Er;
536
542
  var __webpack_exports__describeImpact = __webpack_exports__.an;
537
543
  var __webpack_exports__diffEntities = __webpack_exports__.Sy;
538
544
  var __webpack_exports__entityFlowSlug = __webpack_exports__.x2;
545
+ var __webpack_exports__entityPermissionCodes = __webpack_exports__.ZM;
539
546
  var __webpack_exports__extractVariables = __webpack_exports__.lj;
540
547
  var __webpack_exports__fitIdentifier = __webpack_exports__.HQ;
548
+ var __webpack_exports__fixedIds = __webpack_exports__.f7;
541
549
  var __webpack_exports__flowNotFound = __webpack_exports__.YW;
542
550
  var __webpack_exports__flowPermissions = __webpack_exports__.j4;
543
551
  var __webpack_exports__flowTimeout = __webpack_exports__.gl;
@@ -549,6 +557,7 @@ var __webpack_exports__mapDatabaseError = __webpack_exports__.Eq;
549
557
  var __webpack_exports__mapSchemaError = __webpack_exports__.iw;
550
558
  var __webpack_exports__matchDefinitions = __webpack_exports__.Og;
551
559
  var __webpack_exports__orderFlows = __webpack_exports__.qG;
560
+ var __webpack_exports__permissionCodes = __webpack_exports__.QJ;
552
561
  var __webpack_exports__plainIndex = __webpack_exports__.v7;
553
562
  var __webpack_exports__planTypeConversion = __webpack_exports__.IM;
554
563
  var __webpack_exports__readBundleFile = __webpack_exports__.zi;
@@ -564,4 +573,5 @@ var __webpack_exports__toFlowSettings = __webpack_exports__.RK;
564
573
  var __webpack_exports__typeFamily = __webpack_exports__.jp;
565
574
  var __webpack_exports__validateRecord = __webpack_exports__.eV;
566
575
  var __webpack_exports__workingCopy = __webpack_exports__.lw;
567
- export { __webpack_exports__ACTOR_BRANCH_METADATA_KEY as ACTOR_BRANCH_METADATA_KEY, __webpack_exports__DRAFT_TEST_RETAIN as DRAFT_TEST_RETAIN, __webpack_exports__DefinitionBundleService as DefinitionBundleService, __webpack_exports__DefinitionCacheService as DefinitionCacheService, __webpack_exports__ENTITY_COMPARED_KEYS as ENTITY_COMPARED_KEYS, __webpack_exports__ENTITY_FLOW_PATHS as ENTITY_FLOW_PATHS, __webpack_exports__EntityBuilderConfigService as EntityBuilderConfigService, __webpack_exports__EntityBuilderDataSourceProvider as EntityBuilderDataSourceProvider, __webpack_exports__EntityDefinitionService as EntityDefinitionService, __webpack_exports__EntityPermissionService as EntityPermissionService, __webpack_exports__FIELD_COMPARED_KEYS as FIELD_COMPARED_KEYS, __webpack_exports__FieldDefinitionService as FieldDefinitionService, __webpack_exports__FlowDefinitionService as FlowDefinitionService, __webpack_exports__FlowExecutionService as FlowExecutionService, __webpack_exports__FlowExecutorService as FlowExecutorService, __webpack_exports__FlowReferenceProvider as FlowReferenceProvider, __webpack_exports__FlowRuntimeService as FlowRuntimeService, __webpack_exports__GenericEntityService as GenericEntityService, __webpack_exports__GenericEntityServiceFactory as GenericEntityServiceFactory, __webpack_exports__NON_INDEXABLE_FIELD_TYPES as NON_INDEXABLE_FIELD_TYPES, __webpack_exports__RESERVED_WORDS as RESERVED_WORDS, __webpack_exports__ReferenceScannerService as ReferenceScannerService, __webpack_exports__SYSTEM_COLUMN_NAMES as SYSTEM_COLUMN_NAMES, __webpack_exports__SchemaChangeExecutor as SchemaChangeExecutor, __webpack_exports__SchemaDialectAdapterService as SchemaDialectAdapterService, __webpack_exports__SchemaEvolutionService as SchemaEvolutionService, __webpack_exports__SchemaRegistryService as SchemaRegistryService, __webpack_exports__SchemaSyncService as SchemaSyncService, __webpack_exports__actorMetadata as actorMetadata, __webpack_exports__addUnique as addUnique, __webpack_exports__applyVariables as applyVariables, __webpack_exports__assertIndexableField as assertIndexableField, __webpack_exports__assertValidIdentifier as assertValidIdentifier, __webpack_exports__auditColumns as auditColumns, __webpack_exports__buildEntityFlow as buildEntityFlow, __webpack_exports__buildFieldColumn as buildFieldColumn, __webpack_exports__buildSystemColumns as buildSystemColumns, __webpack_exports__bundleChecksum as bundleChecksum, __webpack_exports__bundleSubject as bundleSubject, __webpack_exports__byCode as byCode, __webpack_exports__calledFlowSlugs as calledFlowSlugs, __webpack_exports__canonicalJson as canonicalJson, __webpack_exports__defaultFlowPermissionCode as defaultFlowPermissionCode, __webpack_exports__describeImpact as describeImpact, __webpack_exports__diffEntities as diffEntities, __webpack_exports__entityFlowSlug as entityFlowSlug, __webpack_exports__extractVariables as extractVariables, __webpack_exports__fitIdentifier as fitIdentifier, __webpack_exports__flowNotFound as flowNotFound, __webpack_exports__flowPermissions as flowPermissions, __webpack_exports__flowTimeout as flowTimeout, __webpack_exports__indexName as indexName, __webpack_exports__isDestructiveSchemaAction as isDestructiveSchemaAction, __webpack_exports__isIndexableFieldType as isIndexableFieldType, __webpack_exports__isPublished as isPublished, __webpack_exports__mapDatabaseError as mapDatabaseError, __webpack_exports__mapSchemaError as mapSchemaError, __webpack_exports__matchDefinitions as matchDefinitions, __webpack_exports__orderFlows as orderFlows, __webpack_exports__plainIndex as plainIndex, __webpack_exports__planTypeConversion as planTypeConversion, __webpack_exports__readBundleFile as readBundleFile, __webpack_exports__relationTargetCodes as relationTargetCodes, __webpack_exports__requestInfo as requestInfo, __webpack_exports__sameColumns as sameColumns, __webpack_exports__snapshotOf as snapshotOf, __webpack_exports__softDeleteColumn as softDeleteColumn, __webpack_exports__sqlTypeFor as sqlTypeFor, __webpack_exports__stripApiKeys as stripApiKeys, __webpack_exports__tableUnique as tableUnique, __webpack_exports__toFlowSettings as toFlowSettings, __webpack_exports__typeFamily as typeFamily, __webpack_exports__validateRecord as validateRecord, __webpack_exports__workingCopy as workingCopy };
576
+ var __webpack_exports__writtenSecrets = __webpack_exports__.l6;
577
+ export { __webpack_exports__ACTOR_BRANCH_METADATA_KEY as ACTOR_BRANCH_METADATA_KEY, __webpack_exports__DRAFT_TEST_RETAIN as DRAFT_TEST_RETAIN, __webpack_exports__DefinitionBundleService as DefinitionBundleService, __webpack_exports__DefinitionCacheService as DefinitionCacheService, __webpack_exports__ENTITY_COMPARED_KEYS as ENTITY_COMPARED_KEYS, __webpack_exports__ENTITY_FLOW_PATHS as ENTITY_FLOW_PATHS, __webpack_exports__EntityBuilderConfigService as EntityBuilderConfigService, __webpack_exports__EntityBuilderDataSourceProvider as EntityBuilderDataSourceProvider, __webpack_exports__EntityDefinitionService as EntityDefinitionService, __webpack_exports__EntityPermissionService as EntityPermissionService, __webpack_exports__FIELD_COMPARED_KEYS as FIELD_COMPARED_KEYS, __webpack_exports__FieldDefinitionService as FieldDefinitionService, __webpack_exports__FlowDefinitionService as FlowDefinitionService, __webpack_exports__FlowExecutionService as FlowExecutionService, __webpack_exports__FlowExecutorService as FlowExecutorService, __webpack_exports__FlowReferenceProvider as FlowReferenceProvider, __webpack_exports__FlowRuntimeService as FlowRuntimeService, __webpack_exports__GenericEntityService as GenericEntityService, __webpack_exports__GenericEntityServiceFactory as GenericEntityServiceFactory, __webpack_exports__NON_INDEXABLE_FIELD_TYPES as NON_INDEXABLE_FIELD_TYPES, __webpack_exports__RESERVED_WORDS as RESERVED_WORDS, __webpack_exports__ReferenceScannerService as ReferenceScannerService, __webpack_exports__SYSTEM_COLUMN_NAMES as SYSTEM_COLUMN_NAMES, __webpack_exports__SchemaChangeExecutor as SchemaChangeExecutor, __webpack_exports__SchemaDialectAdapterService as SchemaDialectAdapterService, __webpack_exports__SchemaEvolutionService as SchemaEvolutionService, __webpack_exports__SchemaRegistryService as SchemaRegistryService, __webpack_exports__SchemaSyncService as SchemaSyncService, __webpack_exports__actorMetadata as actorMetadata, __webpack_exports__addUnique as addUnique, __webpack_exports__applyVariables as applyVariables, __webpack_exports__asksExecutePermission as asksExecutePermission, __webpack_exports__assertIndexableField as assertIndexableField, __webpack_exports__assertValidIdentifier as assertValidIdentifier, __webpack_exports__auditColumns as auditColumns, __webpack_exports__buildEntityFlow as buildEntityFlow, __webpack_exports__buildFieldColumn as buildFieldColumn, __webpack_exports__buildSystemColumns as buildSystemColumns, __webpack_exports__bundleChecksum as bundleChecksum, __webpack_exports__bundleSubject as bundleSubject, __webpack_exports__byCode as byCode, __webpack_exports__calledFlowSlugs as calledFlowSlugs, __webpack_exports__canonicalJson as canonicalJson, __webpack_exports__defaultFlowPermissionCode as defaultFlowPermissionCode, __webpack_exports__describeImpact as describeImpact, __webpack_exports__diffEntities as diffEntities, __webpack_exports__entityFlowSlug as entityFlowSlug, __webpack_exports__entityPermissionCodes as entityPermissionCodes, __webpack_exports__extractVariables as extractVariables, __webpack_exports__fitIdentifier as fitIdentifier, __webpack_exports__fixedIds as fixedIds, __webpack_exports__flowNotFound as flowNotFound, __webpack_exports__flowPermissions as flowPermissions, __webpack_exports__flowTimeout as flowTimeout, __webpack_exports__indexName as indexName, __webpack_exports__isDestructiveSchemaAction as isDestructiveSchemaAction, __webpack_exports__isIndexableFieldType as isIndexableFieldType, __webpack_exports__isPublished as isPublished, __webpack_exports__mapDatabaseError as mapDatabaseError, __webpack_exports__mapSchemaError as mapSchemaError, __webpack_exports__matchDefinitions as matchDefinitions, __webpack_exports__orderFlows as orderFlows, __webpack_exports__permissionCodes as permissionCodes, __webpack_exports__plainIndex as plainIndex, __webpack_exports__planTypeConversion as planTypeConversion, __webpack_exports__readBundleFile as readBundleFile, __webpack_exports__relationTargetCodes as relationTargetCodes, __webpack_exports__requestInfo as requestInfo, __webpack_exports__sameColumns as sameColumns, __webpack_exports__snapshotOf as snapshotOf, __webpack_exports__softDeleteColumn as softDeleteColumn, __webpack_exports__sqlTypeFor as sqlTypeFor, __webpack_exports__stripApiKeys as stripApiKeys, __webpack_exports__tableUnique as tableUnique, __webpack_exports__toFlowSettings as toFlowSettings, __webpack_exports__typeFamily as typeFamily, __webpack_exports__validateRecord as validateRecord, __webpack_exports__workingCopy as workingCopy, __webpack_exports__writtenSecrets as writtenSecrets };
@@ -1,7 +1,8 @@
1
1
  import { type IFieldError } from '../services/field-value-validator.js';
2
- import { type FlowBodyType, type FlowInput, type IFlowInputField } from './flow.types.js';
2
+ import { type FlowBodyType, type FlowInput, type IFlowEndpoint, type IFlowInputField } from './flow.types.js';
3
3
  export interface IFlowInputResult {
4
4
  values: FlowInput;
5
5
  errors: IFieldError[];
6
6
  }
7
7
  export declare function validateFlowInput(schema: IFlowInputField[], body: unknown, bodyType?: FlowBodyType): IFlowInputResult;
8
+ export declare function validateEndpointInput(endpoint: Pick<IFlowEndpoint, 'contract' | 'bodyType' | 'inputSchema'>, body: unknown): IFlowInputResult;
@@ -96,6 +96,7 @@ export interface IFlowEntityAccess {
96
96
  currentPage: number;
97
97
  pageSize: number;
98
98
  };
99
+ withDeleted?: boolean;
99
100
  }, options?: IFlowReadOptions): Promise<{
100
101
  data: IGenericRecord[];
101
102
  total: number;
@@ -1,5 +1,5 @@
1
1
  import { type ILogicNode } from '@flusys/nestjs-shared/interfaces';
2
- import { type RecordFilterOp } from '../interfaces/generic-record.interface.js';
2
+ import { type IFilterRange, type RecordFilterOp } from '../interfaces/generic-record.interface.js';
3
3
  import { type RuleExpression, type RuleGroup } from '../rule-engine/index.js';
4
4
  export declare const FLOW_NODE_TYPES: readonly ["trigger", "validate", "permission_check", "company_branch_check", "set", "condition", "switch", "foreach", "entity_insert", "entity_update", "entity_delete", "entity_get", "entity_query", "commit", "call_flow", "http_request", "publish_event", "send_notification", "send_email", "respond", "code"];
5
5
  export type FlowNodeType = (typeof FLOW_NODE_TYPES)[number];
@@ -12,6 +12,10 @@ export type FlowRunMode = 'live' | 'dry_run';
12
12
  export declare const FLOW_BODY_TYPES: readonly ["object", "list"];
13
13
  export type FlowBodyType = (typeof FLOW_BODY_TYPES)[number];
14
14
  export type FlowInput = Record<string, unknown> | unknown[];
15
+ export declare const FLOW_REQUEST_CONTRACTS: readonly ["custom", "get_all", "get_by_id", "get_by_ids", "get_by_filter", "insert", "insert_many", "update", "update_many", "bulk_upsert", "delete"];
16
+ export type FlowRequestContract = (typeof FLOW_REQUEST_CONTRACTS)[number];
17
+ export declare const FLOW_RESPONSE_FORMATS: readonly ["raw", "single", "list", "bulk", "message"];
18
+ export type FlowResponseFormat = (typeof FLOW_RESPONSE_FORMATS)[number];
15
19
  export declare const FLOW_INPUT_TYPES: readonly ["string", "text", "number", "integer", "boolean", "date", "datetime", "email", "uuid", "object", "array", "choice"];
16
20
  export type FlowInputType = (typeof FLOW_INPUT_TYPES)[number];
17
21
  export type FlowInputItemType = Exclude<FlowInputType, 'array'>;
@@ -68,14 +72,18 @@ export interface IValidateConfig {
68
72
  statusCode?: number;
69
73
  }
70
74
  export type PermissionDeniedMode = 'reject' | 'branch';
75
+ export declare const FLOW_ACCESS_SUBJECTS: readonly ["caller", "user"];
76
+ export type FlowAccessSubject = (typeof FLOW_ACCESS_SUBJECTS)[number];
71
77
  export interface IPermissionCheckConfig {
72
78
  permissions: ILogicNode;
79
+ subject?: FlowAccessSubject;
80
+ userId?: RuleExpression;
81
+ companyId?: RuleExpression;
82
+ branchId?: RuleExpression;
73
83
  onDenied?: PermissionDeniedMode;
74
84
  statusCode?: number;
75
85
  message?: string;
76
86
  }
77
- export declare const FLOW_ACCESS_SUBJECTS: readonly ["caller", "user"];
78
- export type FlowAccessSubject = (typeof FLOW_ACCESS_SUBJECTS)[number];
79
87
  export declare const FLOW_BRANCH_MATCHES: readonly ["direct", "within"];
80
88
  export type FlowBranchMatch = (typeof FLOW_BRANCH_MATCHES)[number];
81
89
  export declare const FLOW_BRANCH_COMPANIES: readonly ["any", "current"];
@@ -149,10 +157,11 @@ export interface IEntityGetConfig {
149
157
  entityCode: string;
150
158
  id: RuleExpression;
151
159
  onNotFound?: 'error' | 'null';
160
+ fromRequest?: boolean;
152
161
  }
153
162
  export interface IFlowFilterCondition {
154
163
  op: RecordFilterOp;
155
- value?: RuleExpression;
164
+ value?: RuleExpression | IFilterRange<RuleExpression>;
156
165
  }
157
166
  export type FlowFilterMap = Record<string, RuleExpression | IFlowFilterCondition>;
158
167
  export interface IEntityQueryConfig {
@@ -164,9 +173,11 @@ export interface IEntityQueryConfig {
164
173
  direction: 'ASC' | 'DESC';
165
174
  };
166
175
  limit?: number;
176
+ fromRequest?: boolean;
167
177
  }
168
178
  export interface ITriggerConfig {
169
179
  path?: string;
180
+ contract?: FlowRequestContract;
170
181
  bodyType?: FlowBodyType;
171
182
  inputSchema?: IFlowInputField[];
172
183
  authMode?: FlowAuthMode;
@@ -246,8 +257,15 @@ export interface ISendEmailConfig {
246
257
  }
247
258
  export interface IRespondConfig {
248
259
  statusCode: number;
260
+ format?: FlowResponseFormat;
261
+ message?: string;
262
+ messageKey?: string;
263
+ messageVariables?: ExpressionMap;
249
264
  body?: ExpressionMap;
250
265
  bodyExpression?: RuleExpression;
266
+ total?: RuleExpression;
267
+ page?: RuleExpression;
268
+ pageSize?: RuleExpression;
251
269
  }
252
270
  export interface ICodeConfig {
253
271
  code: string;
@@ -302,6 +320,7 @@ export declare const FLOW_ID_PATTERN: RegExp;
302
320
  export interface IFlowEndpoint {
303
321
  nodeId: string;
304
322
  path: string | null;
323
+ contract: FlowRequestContract;
305
324
  bodyType: FlowBodyType;
306
325
  inputSchema: IFlowInputField[];
307
326
  authMode: FlowAuthMode;
@@ -311,6 +330,8 @@ export interface IFlowEndpoint {
311
330
  rateLimitPerMinute: number;
312
331
  apiKey: IStoredApiKey | null;
313
332
  }
333
+ export declare function contractFields(contract: FlowRequestContract): IFlowInputField[];
334
+ export declare function triggerContract(config: Pick<ITriggerConfig, 'contract'>): FlowRequestContract;
314
335
  type EndpointSource = Pick<IFlowSettings, 'nodes'>;
315
336
  export declare const isFunctionFlow: (flow: EndpointSource) => boolean;
316
337
  export declare function triggerPath(node: Pick<IFlowNode, 'config'>): string | null;
@@ -43,6 +43,7 @@ export interface IDefinitionBundle {
43
43
  export interface IImportBundleRequest {
44
44
  bundle: IDefinitionBundle;
45
45
  deprecateMissingFields?: boolean;
46
+ deactivateMissingFlows?: boolean;
46
47
  confirm?: boolean;
47
48
  expectedChecksum?: string;
48
49
  expectedPlanChecksum?: string;
@@ -52,7 +53,7 @@ export interface IBundleExport {
52
53
  checksum: string;
53
54
  warnings: IMessageRef[];
54
55
  }
55
- export type BundleStepKind = 'update_entity' | 'create_entity' | 'restore_field' | 'rename_field' | 'update_field' | 'add_field' | 'deprecate_field' | 'create_flow' | 'update_flow';
56
+ export type BundleStepKind = 'update_entity' | 'create_entity' | 'restore_field' | 'rename_field' | 'update_field' | 'add_field' | 'deprecate_field' | 'create_flow' | 'update_flow' | 'deactivate_flow';
56
57
  export interface IBundleStep {
57
58
  kind: BundleStepKind;
58
59
  entityCode?: string;
@@ -3,12 +3,22 @@ export interface IGenericRecord extends ObjectLiteral {
3
3
  id: string;
4
4
  [key: string]: unknown;
5
5
  }
6
- export declare const RECORD_FILTER_OPS: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "in", "is_null", "not_null"];
6
+ export declare const RECORD_FILTER_OPS: readonly ["eq", "ne", "ieq", "gt", "gte", "lt", "lte", "between", "not_between", "in", "not_in", "contains", "not_contains", "starts_with", "ends_with", "has_any", "has_all", "has_none", "is_empty", "not_empty", "is_null", "not_null"];
7
7
  export type RecordFilterOp = (typeof RECORD_FILTER_OPS)[number];
8
+ export type FilterValueKind = 'none' | 'single' | 'list' | 'range';
9
+ export declare const FILTER_OP_VALUE_KIND: Record<RecordFilterOp, FilterValueKind>;
10
+ export declare const TEXT_FILTER_OPS: readonly RecordFilterOp[];
11
+ export declare const LIST_FIELD_FILTER_OPS: readonly RecordFilterOp[];
12
+ export declare const EMPTY_FILTER_OPS: readonly RecordFilterOp[];
8
13
  export interface IRecordFilterCondition {
9
14
  op: RecordFilterOp;
10
15
  value?: unknown;
11
16
  }
17
+ export interface IFilterRange<T> {
18
+ from: T;
19
+ to: T;
20
+ }
21
+ export declare function isFilterRange(value: unknown): value is IFilterRange<unknown>;
12
22
  export declare const RECORD_FILTER_LIMITS: {
13
23
  readonly MAX_IN_VALUES: 100;
14
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flusys/nestjs-entity-builder",
3
- "version": "9.1.1",
3
+ "version": "9.2.0",
4
4
  "description": "Dynamic entity builder module - runtime entity/field metadata, driven DDL, and generic CRUD",
5
5
  "type": "module",
6
6
  "main": "./fesm/index.js",
@@ -85,9 +85,8 @@
85
85
  "rxjs": "^7.8.0"
86
86
  },
87
87
  "dependencies": {
88
- "@flusys/nestjs-core": "9.1.1",
89
- "@flusys/nestjs-shared": "9.1.1",
90
- "re2js": "^2.8.6",
88
+ "@flusys/nestjs-core": "9.2.0",
89
+ "@flusys/nestjs-shared": "9.2.0",
91
90
  "quickjs-emscripten": "^0.32.0"
92
91
  }
93
92
  }
@@ -1,4 +1,4 @@
1
- import { type IPermissionResolver } from '@flusys/nestjs-shared/interfaces';
1
+ import { type IPermissionResolver, type IPermissionScope } from '@flusys/nestjs-shared/interfaces';
2
2
  import { SharedPermissionCacheService } from '@flusys/nestjs-shared/modules';
3
3
  import { type IRulePermissionResolver, type RuleEvaluationContext } from './rule-evaluation-context.interface.js';
4
4
  import { type RuleCondition, type RuleExpression, type RuleGroup } from './rule.interface.js';
@@ -11,6 +11,7 @@ export declare class RuleEngineService {
11
11
  private readonly permissionCache?;
12
12
  constructor(permissionResolver?: IPermissionResolver | undefined, permissionCache?: SharedPermissionCacheService | undefined);
13
13
  createPermissionResolver(user: RuleEvaluationContext['user']): IRulePermissionResolver;
14
+ permissionCodes(scope: IPermissionScope): Promise<string[]>;
14
15
  evaluateGroup(group: RuleGroup, ctx: RuleEvaluationContext, depth?: number, budget?: IEvaluationBudget): Promise<boolean>;
15
16
  private every;
16
17
  evaluateCondition(condition: RuleCondition, ctx: RuleEvaluationContext, budget?: IEvaluationBudget): Promise<boolean>;
@@ -1,4 +1,2 @@
1
- export type RulePatternProblem = 'too_long' | 'invalid' | 'too_complex';
2
- export declare function rulePatternProblem(pattern: string): RulePatternProblem | null;
3
1
  export declare function matchesPattern(input: unknown, pattern: unknown): boolean;
4
2
  export declare function extractPattern(input: unknown, pattern: unknown, group?: unknown): string | null;
@@ -1,5 +1,8 @@
1
+ import { type IRecordFilterCondition } from '../interfaces/generic-record.interface.js';
2
+ import { type RuleExpression } from './rule.interface.js';
1
3
  export declare const ISO_DATE_PREFIX: RegExp;
2
4
  export declare function parseDateText(text: string): number;
3
5
  export declare function valuesEqual(a: unknown, b: unknown): boolean;
4
6
  export declare const includesValue: (list: readonly unknown[], value: unknown) => boolean;
5
- export declare const equalsOperand: (value: unknown) => unknown;
7
+ export declare function resolveFilterEntry(item: unknown, resolve: (expression: RuleExpression) => Promise<unknown>): Promise<IRecordFilterCondition>;
8
+ export declare const isFilterValueMissing: (entry: IRecordFilterCondition) => boolean;
@@ -1,4 +1,4 @@
1
- import { type RecordFilterOp } from '../interfaces/generic-record.interface.js';
1
+ import { type IFilterRange, type RecordFilterOp } from '../interfaces/generic-record.interface.js';
2
2
  export type RuleLogicOperator = 'AND' | 'OR' | 'NOT';
3
3
  export declare const RULE_COMPARISON_OPERATORS: readonly ["equals", "not_equals", "greater_than", "less_than", "greater_or_equal", "less_or_equal", "contains", "not_contains", "starts_with", "ends_with", "is_empty", "is_not_empty", "in", "not_in", "is_any_of", "is_none_of", "is_true", "is_false", "matches", "not_matches"];
4
4
  export type RuleComparisonOperator = (typeof RULE_COMPARISON_OPERATORS)[number];
@@ -30,7 +30,7 @@ export type RuleDurationUnit = (typeof RULE_DURATION_UNITS)[number];
30
30
  export type RuleLookupMode = 'exists' | 'count' | 'first';
31
31
  export interface RuleLookupFilterCondition {
32
32
  op: RecordFilterOp;
33
- value?: RuleExpression;
33
+ value?: RuleExpression | IFilterRange<RuleExpression>;
34
34
  }
35
35
  export interface RuleLookupExpression {
36
36
  type: 'lookup';
@@ -72,7 +72,6 @@ export declare const RULE_ENGINE_LIMITS: {
72
72
  readonly MAX_REGEX_PATTERN_LENGTH: 500;
73
73
  readonly MAX_REGEX_INPUT_LENGTH: 10000;
74
74
  readonly MAX_REGEX_REPEAT: 100;
75
- readonly MAX_REGEX_REPEAT_EXPANSION: 300;
76
75
  readonly MAX_UTC_OFFSET_MINUTES: 840;
77
76
  readonly MAX_PERMISSION_CODES: 50;
78
77
  readonly MAX_IP_RANGES: 100;
@@ -16,6 +16,12 @@ export declare function applyVariables(nodes: IFlowNode[], variables: Record<str
16
16
  nodes: IFlowNode[];
17
17
  missing: string[];
18
18
  };
19
+ export declare function fixedIds(nodes: IFlowNode[]): string[];
20
+ export declare function permissionCodes(flow: Pick<IBundleFlow, 'slug' | 'nodes'>): string[];
21
+ export declare function writtenSecrets(nodes: IFlowNode[]): Array<{
22
+ step: string;
23
+ name: string;
24
+ }>;
19
25
  export declare function calledFlowSlugs(nodes: IFlowNode[]): string[];
20
26
  export declare function orderFlows(flows: IBundleFlow[]): IBundleFlow[];
21
27
  export interface ICurrentEntity {
@@ -1,9 +1,10 @@
1
- import { type ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
1
+ import { type ILoggedUserInfo, type IPermissionActionRegistry } from '@flusys/nestjs-shared/interfaces';
2
2
  import { type ExportBundleDto } from '../dtos/definition-bundle.dto.js';
3
3
  import { type IBundleExport, type IBundleImportPlan, type IBundleImportResult, type IImportBundleRequest } from '../interfaces/definition-bundle.interface.js';
4
4
  import { EntityBuilderConfigService } from './entity-builder-config.service.js';
5
5
  import { EntityBuilderDataSourceProvider } from './entity-builder-datasource.provider.js';
6
6
  import { FlowDefinitionService } from './flow-definition.service.js';
7
+ import { SchemaDialectAdapterService } from './schema-dialect-adapter.service.js';
7
8
  import { SchemaEvolutionService } from './schema-evolution.service.js';
8
9
  import { SchemaSyncService } from './schema-sync.service.js';
9
10
  export declare class DefinitionBundleService {
@@ -12,12 +13,16 @@ export declare class DefinitionBundleService {
12
13
  private readonly schemaSync;
13
14
  private readonly evolution;
14
15
  private readonly flows;
15
- constructor(provider: EntityBuilderDataSourceProvider, config: EntityBuilderConfigService, schemaSync: SchemaSyncService, evolution: SchemaEvolutionService, flows: FlowDefinitionService);
16
+ private readonly dialect;
17
+ private readonly actionRegistry?;
18
+ constructor(provider: EntityBuilderDataSourceProvider, config: EntityBuilderConfigService, schemaSync: SchemaSyncService, evolution: SchemaEvolutionService, flows: FlowDefinitionService, dialect: SchemaDialectAdapterService, actionRegistry?: IPermissionActionRegistry | undefined);
16
19
  private variables;
17
20
  export(dto: ExportBundleDto): Promise<IBundleExport>;
21
+ private leftBehind;
18
22
  private loadEntities;
19
23
  planImport(dto: IImportBundleRequest, user: ILoggedUserInfo | null): Promise<IBundleImportPlan>;
20
24
  private buildPlan;
25
+ private addPermissionWarnings;
21
26
  private relationNotYetCreated;
22
27
  private previewEntityStep;
23
28
  private diffFlows;
@@ -25,8 +30,11 @@ export declare class DefinitionBundleService {
25
30
  private createRequest;
26
31
  private changeRequest;
27
32
  applyImport(dto: IImportBundleRequest, user: ILoggedUserInfo | null): Promise<IBundleImportResult>;
33
+ private withImportLock;
34
+ private runImport;
28
35
  private applyEntityStep;
29
36
  private idIsFree;
30
37
  private freeFieldIds;
31
38
  private applyFlowStep;
39
+ private deactivateFlow;
32
40
  }
@@ -15,11 +15,12 @@ export interface IEntityFlowSource {
15
15
  label: string;
16
16
  fields: IEntityFlowField[];
17
17
  }
18
- type FlowInputLabel = 'id' | 'ids' | 'search';
18
+ type FlowInputLabel = 'id';
19
19
  export interface IEntityFlowTexts {
20
20
  names?: Partial<Record<EntityFlowEndpoint, string>>;
21
21
  inputLabels?: Partial<Record<FlowInputLabel, string>>;
22
22
  noMatchMessage?: string;
23
+ deleteOnlyMessage?: string;
23
24
  }
24
25
  export declare const ENTITY_FLOW_PATHS: Record<EntityFlowEndpoint, string>;
25
26
  export declare const entityFlowSlug: (entityCode: string) => string;
@@ -1,5 +1,6 @@
1
1
  import { type IPermissionActionRegistry } from '@flusys/nestjs-shared';
2
2
  import { EntityDefinition } from '../entities/entity-definition.entity.js';
3
+ export declare const entityPermissionCodes: (entityCode: string) => string[];
3
4
  export declare class EntityPermissionService {
4
5
  private readonly actionRegistry?;
5
6
  constructor(actionRegistry?: IPermissionActionRegistry | undefined);
@@ -13,6 +13,7 @@ import { type IFlowDefinition, type IFlowSnapshot, type IFlowVersion } from '../
13
13
  import { EntityBuilderDataSourceProvider } from './entity-builder-datasource.provider.js';
14
14
  export declare const defaultFlowPermissionCode: (slug: string) => string;
15
15
  export declare const flowPermissions: (endpoint: Pick<IFlowEndpoint, "permissions">, slug: string) => ILogicNode;
16
+ export declare const asksExecutePermission: (endpoint: Pick<IFlowEndpoint, "authMode" | "permissions">) => boolean;
16
17
  export declare const flowNotFound: () => NotFoundException;
17
18
  export declare const isPublished: (flow: Pick<FlowDefinition, "version">) => boolean;
18
19
  export declare function snapshotOf(source: Partial<IFlowSnapshot>): IFlowSnapshot;
@@ -56,7 +57,6 @@ export declare class FlowDefinitionService extends ApiService<CreateFlowDefiniti
56
57
  restoreVersion(flowId: string, version: number, user: ILoggedUserInfo | null): Promise<FlowDefinition>;
57
58
  discardDraft(flowId: string, user: ILoggedUserInfo | null): Promise<FlowDefinition>;
58
59
  private saveDraft;
59
- private clearCaches;
60
60
  protected beforeDeleteOperation(dto: DeleteDto, user: ILoggedUserInfo | null, _qr: QueryRunner): Promise<void>;
61
61
  private provisionPermissions;
62
62
  }
@@ -21,6 +21,7 @@ export declare class FlowRuntimeService {
21
21
  private readonly definitions;
22
22
  constructor(provider: EntityBuilderDataSourceProvider, executor: FlowExecutorService, executions: FlowExecutionService, definitions: FlowDefinitionService);
23
23
  findActive(slug: string): Promise<FlowDefinition | null>;
24
+ tenantScope(): string;
24
25
  handle(flow: FlowDefinition, endpoint: IFlowEndpoint, body: unknown, caller: IFlowCaller, user: ILoggedUserInfo | null): Promise<IFlowRunResult>;
25
26
  testRun(dto: TestFlowDto, user: ILoggedUserInfo | null, caller: IFlowCaller): Promise<{
26
27
  result: IFlowRunResult;
@@ -14,6 +14,7 @@ export interface IGenericQuery {
14
14
  currentPage: number;
15
15
  pageSize: number;
16
16
  };
17
+ withDeleted?: boolean;
17
18
  }
18
19
  export interface IGenericWriteOptions {
19
20
  queryRunner?: QueryRunner;
@@ -58,6 +59,10 @@ export declare class GenericEntityService {
58
59
  total: number;
59
60
  }>;
60
61
  private applyFilter;
62
+ private conditionSql;
63
+ private listOperand;
64
+ private fieldTypeOf;
65
+ private assertOperatorFits;
61
66
  private unknownOperator;
62
67
  private invalidFilterValue;
63
68
  private applySort;
@@ -29,6 +29,7 @@ export declare class SchemaChangeExecutor {
29
29
  plan: ISchemaChangePlan;
30
30
  outcome: ISchemaChangeOutcome;
31
31
  }>;
32
+ private invalidateDefinitions;
32
33
  private compensate;
33
34
  private withUndo;
34
35
  private logFailure;
@@ -9,5 +9,7 @@ export declare class SchemaDialectAdapterService implements ISchemaDialectAdapte
9
9
  sqlLiteral(value: unknown, driver: SupportedDbDriver): string;
10
10
  lockName(lockKey: string): string;
11
11
  acquireEntityLock(queryRunner: QueryRunner, lockKey: string, driver: SupportedDbDriver): Promise<void>;
12
+ tryAcquireSessionLock(queryRunner: QueryRunner, lockKey: string, driver: SupportedDbDriver): Promise<boolean>;
13
+ releaseSessionLock(queryRunner: QueryRunner, lockKey: string, driver: SupportedDbDriver): Promise<void>;
12
14
  releaseEntityLock(queryRunner: QueryRunner, lockKey: string, driver: SupportedDbDriver): Promise<void>;
13
15
  }