@loopstack/core 0.2.0 → 0.3.1

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 (141) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/modules/common/common.module.js +10 -15
  3. package/dist/modules/common/common.module.js.map +1 -1
  4. package/dist/modules/common/errors/object-expression.error.d.ts +4 -0
  5. package/dist/modules/common/errors/object-expression.error.js +13 -0
  6. package/dist/modules/common/errors/object-expression.error.js.map +1 -0
  7. package/dist/modules/common/errors/template-expression.error.d.ts +4 -0
  8. package/dist/modules/common/errors/template-expression.error.js +13 -0
  9. package/dist/modules/common/errors/template-expression.error.js.map +1 -0
  10. package/dist/modules/common/services/context.service.d.ts +1 -0
  11. package/dist/modules/common/services/context.service.js +4 -0
  12. package/dist/modules/common/services/context.service.js.map +1 -1
  13. package/dist/modules/common/services/expression-handler/object-expression.handler.d.ts +20 -0
  14. package/dist/modules/common/services/expression-handler/object-expression.handler.js +125 -0
  15. package/dist/modules/common/services/expression-handler/object-expression.handler.js.map +1 -0
  16. package/dist/modules/common/services/expression-handler/template-expression.handler.d.ts +12 -0
  17. package/dist/modules/common/services/expression-handler/template-expression.handler.js +63 -0
  18. package/dist/modules/common/services/expression-handler/template-expression.handler.js.map +1 -0
  19. package/dist/modules/common/services/handlebars-helpers/comparison-handlebars-helper.service.d.ts +41 -0
  20. package/dist/modules/common/services/handlebars-helpers/comparison-handlebars-helper.service.js +416 -0
  21. package/dist/modules/common/services/handlebars-helpers/comparison-handlebars-helper.service.js.map +1 -0
  22. package/dist/modules/common/services/handlebars-helpers/date-formatter-handlebars-helper.service.d.ts +9 -0
  23. package/dist/modules/common/services/handlebars-helpers/date-formatter-handlebars-helper.service.js +124 -0
  24. package/dist/modules/common/services/handlebars-helpers/date-formatter-handlebars-helper.service.js.map +1 -0
  25. package/dist/modules/common/services/handlebars-helpers/date-formatter-helper.service.d.ts +9 -0
  26. package/dist/modules/common/services/handlebars-helpers/date-formatter-helper.service.js +124 -0
  27. package/dist/modules/common/services/handlebars-helpers/date-formatter-helper.service.js.map +1 -0
  28. package/dist/modules/common/services/handlebars-helpers/index.d.ts +2 -0
  29. package/dist/modules/common/services/handlebars-helpers/index.js +19 -0
  30. package/dist/modules/common/services/handlebars-helpers/index.js.map +1 -0
  31. package/dist/modules/common/services/handlebars-helpers/operators-helper.service.d.ts +41 -0
  32. package/dist/modules/common/services/handlebars-helpers/operators-helper.service.js +416 -0
  33. package/dist/modules/common/services/handlebars-helpers/operators-helper.service.js.map +1 -0
  34. package/dist/modules/common/services/handlebars-processor.service.d.ts +13 -0
  35. package/dist/modules/common/services/handlebars-processor.service.js +138 -0
  36. package/dist/modules/common/services/handlebars-processor.service.js.map +1 -0
  37. package/dist/modules/common/services/index.d.ts +6 -5
  38. package/dist/modules/common/services/index.js +6 -5
  39. package/dist/modules/common/services/index.js.map +1 -1
  40. package/dist/modules/common/services/template.service.d.ts +16 -0
  41. package/dist/modules/common/services/template.service.js +64 -0
  42. package/dist/modules/common/services/template.service.js.map +1 -0
  43. package/dist/modules/common/services/variable-sanitizer.service.d.ts +9 -0
  44. package/dist/modules/common/services/variable-sanitizer.service.js +84 -0
  45. package/dist/modules/common/services/variable-sanitizer.service.js.map +1 -0
  46. package/dist/modules/configuration/configuration.module.js +2 -1
  47. package/dist/modules/configuration/configuration.module.js.map +1 -1
  48. package/dist/modules/configuration/services/configuration.service.d.ts +15 -13
  49. package/dist/modules/configuration/services/configuration.service.js +97 -96
  50. package/dist/modules/configuration/services/configuration.service.js.map +1 -1
  51. package/dist/modules/configuration/services/index.d.ts +1 -0
  52. package/dist/modules/configuration/services/index.js +1 -0
  53. package/dist/modules/configuration/services/index.js.map +1 -1
  54. package/dist/modules/configuration/services/schema-registry.service.d.ts +9 -0
  55. package/dist/modules/configuration/services/schema-registry.service.js +41 -0
  56. package/dist/modules/configuration/services/schema-registry.service.js.map +1 -0
  57. package/dist/modules/persistence/services/document.service.d.ts +5 -1
  58. package/dist/modules/persistence/services/document.service.js +27 -15
  59. package/dist/modules/persistence/services/document.service.js.map +1 -1
  60. package/dist/modules/workflow-processor/services/index.d.ts +2 -1
  61. package/dist/modules/workflow-processor/services/index.js +2 -1
  62. package/dist/modules/workflow-processor/services/index.js.map +1 -1
  63. package/dist/modules/workflow-processor/services/pipeline-processor.service.d.ts +9 -8
  64. package/dist/modules/workflow-processor/services/pipeline-processor.service.js +92 -52
  65. package/dist/modules/workflow-processor/services/pipeline-processor.service.js.map +1 -1
  66. package/dist/modules/workflow-processor/services/root-processor.service.d.ts +2 -2
  67. package/dist/modules/workflow-processor/services/root-processor.service.js +1 -0
  68. package/dist/modules/workflow-processor/services/root-processor.service.js.map +1 -1
  69. package/dist/modules/workflow-processor/services/service-execution.service.d.ts +12 -0
  70. package/dist/modules/workflow-processor/services/service-execution.service.js +53 -0
  71. package/dist/modules/workflow-processor/services/service-execution.service.js.map +1 -0
  72. package/dist/modules/workflow-processor/services/state-machine-config.service.d.ts +2 -17
  73. package/dist/modules/workflow-processor/services/state-machine-config.service.js +33 -17
  74. package/dist/modules/workflow-processor/services/state-machine-config.service.js.map +1 -1
  75. package/dist/modules/workflow-processor/services/state-machine-processor.service.d.ts +11 -7
  76. package/dist/modules/workflow-processor/services/state-machine-processor.service.js +90 -24
  77. package/dist/modules/workflow-processor/services/state-machine-processor.service.js.map +1 -1
  78. package/dist/modules/workflow-processor/services/template-expression-evaluator.service.d.ts +24 -4
  79. package/dist/modules/workflow-processor/services/template-expression-evaluator.service.js +90 -21
  80. package/dist/modules/workflow-processor/services/template-expression-evaluator.service.js.map +1 -1
  81. package/dist/modules/workflow-processor/services/tool-execution.service.d.ts +8 -20
  82. package/dist/modules/workflow-processor/services/tool-execution.service.js +31 -55
  83. package/dist/modules/workflow-processor/services/tool-execution.service.js.map +1 -1
  84. package/dist/modules/workflow-processor/services/workflow-context.service.d.ts +4 -0
  85. package/dist/modules/{common/services/template-engine.service.js → workflow-processor/services/workflow-context.service.js} +12 -15
  86. package/dist/modules/workflow-processor/services/workflow-context.service.js.map +1 -0
  87. package/dist/modules/workflow-processor/services/workflow-processor.service.d.ts +2 -2
  88. package/dist/modules/workflow-processor/services/workflow-processor.service.js +12 -8
  89. package/dist/modules/workflow-processor/services/workflow-processor.service.js.map +1 -1
  90. package/dist/modules/workflow-processor/services/workflow-state.service.d.ts +2 -2
  91. package/dist/modules/workflow-processor/services/workflow-state.service.js +5 -5
  92. package/dist/modules/workflow-processor/services/workflow-state.service.js.map +1 -1
  93. package/dist/modules/workflow-processor/tool-services/add-namespace.service.js +4 -4
  94. package/dist/modules/workflow-processor/tool-services/add-namespace.service.js.map +1 -1
  95. package/dist/modules/workflow-processor/tool-services/batch-create-documents.service.d.ts +4 -8
  96. package/dist/modules/workflow-processor/tool-services/batch-create-documents.service.js +38 -26
  97. package/dist/modules/workflow-processor/tool-services/batch-create-documents.service.js.map +1 -1
  98. package/dist/modules/workflow-processor/tool-services/create-document.service.d.ts +17 -138
  99. package/dist/modules/workflow-processor/tool-services/create-document.service.js +83 -31
  100. package/dist/modules/workflow-processor/tool-services/create-document.service.js.map +1 -1
  101. package/dist/modules/workflow-processor/tool-services/load-document.service.d.ts +61 -51
  102. package/dist/modules/workflow-processor/tool-services/load-document.service.js +57 -79
  103. package/dist/modules/workflow-processor/tool-services/load-document.service.js.map +1 -1
  104. package/dist/modules/workflow-processor/tool-services/mock.service.d.ts +11 -8
  105. package/dist/modules/workflow-processor/tool-services/mock.service.js +41 -9
  106. package/dist/modules/workflow-processor/tool-services/mock.service.js.map +1 -1
  107. package/dist/modules/workflow-processor/tool-services/set-context.service.d.ts +3 -0
  108. package/dist/modules/workflow-processor/tool-services/set-context.service.js +11 -5
  109. package/dist/modules/workflow-processor/tool-services/set-context.service.js.map +1 -1
  110. package/dist/modules/workflow-processor/tool-services/set-target-place.service.js +7 -6
  111. package/dist/modules/workflow-processor/tool-services/set-target-place.service.js.map +1 -1
  112. package/dist/modules/workflow-processor/tool-services/transition-selector.service.js +2 -2
  113. package/dist/modules/workflow-processor/tool-services/transition-selector.service.js.map +1 -1
  114. package/dist/modules/workflow-processor/tool-services/update-document.service.d.ts +32 -55
  115. package/dist/modules/workflow-processor/tool-services/update-document.service.js +92 -7
  116. package/dist/modules/workflow-processor/tool-services/update-document.service.js.map +1 -1
  117. package/dist/modules/workflow-processor/validators/workflow-option.validator.d.ts +1 -1
  118. package/dist/modules/workflow-processor/validators/workflow-option.validator.js +3 -3
  119. package/dist/modules/workflow-processor/validators/workflow-option.validator.js.map +1 -1
  120. package/dist/modules/workflow-processor/workflow-processor.module.js +2 -1
  121. package/dist/modules/workflow-processor/workflow-processor.module.js.map +1 -1
  122. package/dist/utils/load-configuration.js +5 -3
  123. package/dist/utils/load-configuration.js.map +1 -1
  124. package/package.json +5 -3
  125. package/dist/modules/common/services/document-helper.service.d.ts +0 -198
  126. package/dist/modules/common/services/document-helper.service.js +0 -53
  127. package/dist/modules/common/services/document-helper.service.js.map +0 -1
  128. package/dist/modules/common/services/expression-evaluator.service.d.ts +0 -5
  129. package/dist/modules/common/services/expression-evaluator.service.js +0 -44
  130. package/dist/modules/common/services/expression-evaluator.service.js.map +0 -1
  131. package/dist/modules/common/services/schema-validator.service.d.ts +0 -7
  132. package/dist/modules/common/services/schema-validator.service.js +0 -41
  133. package/dist/modules/common/services/schema-validator.service.js.map +0 -1
  134. package/dist/modules/common/services/template-engine.service.d.ts +0 -5
  135. package/dist/modules/common/services/template-engine.service.js.map +0 -1
  136. package/dist/modules/common/services/value-parser.service.d.ts +0 -19
  137. package/dist/modules/common/services/value-parser.service.js +0 -68
  138. package/dist/modules/common/services/value-parser.service.js.map +0 -1
  139. package/dist/modules/workflow-processor/services/tool-schema-validator.service.d.ts +0 -5
  140. package/dist/modules/workflow-processor/services/tool-schema-validator.service.js +0 -41
  141. package/dist/modules/workflow-processor/services/tool-schema-validator.service.js.map +0 -1
@@ -13,7 +13,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.CreateDocumentService = void 0;
14
14
  const common_1 = require("@nestjs/common");
15
15
  const shared_1 = require("@loopstack/shared");
16
- const common_2 = require("../../common");
17
16
  const configuration_1 = require("../../configuration");
18
17
  const zod_1 = require("zod");
19
18
  const persistence_1 = require("../../persistence");
@@ -21,56 +20,109 @@ const lodash_1 = require("lodash");
21
20
  const services_1 = require("../services");
22
21
  const schema = zod_1.z
23
22
  .object({
24
- document: zod_1.z.string().optional(),
25
- update: shared_1.PartialDocumentSchema.optional(),
26
- create: shared_1.DocumentSchema.optional(),
23
+ document: zod_1.z.string(),
24
+ update: zod_1.z
25
+ .object({
26
+ content: zod_1.z.any(),
27
+ tags: zod_1.z.array(zod_1.z.string()).optional(),
28
+ meta: zod_1.z
29
+ .object({
30
+ mimeType: shared_1.MimeTypeSchema.optional(),
31
+ invalidate: zod_1.z.boolean().optional(),
32
+ level: zod_1.z
33
+ .union([
34
+ zod_1.z.literal('debug'),
35
+ zod_1.z.literal('info'),
36
+ zod_1.z.literal('warning'),
37
+ zod_1.z.literal('error'),
38
+ ])
39
+ .optional(),
40
+ enableAtPlaces: zod_1.z.array(zod_1.z.string()).optional(),
41
+ hideAtPlaces: zod_1.z.array(zod_1.z.string()).optional(),
42
+ })
43
+ .optional(),
44
+ })
45
+ .optional(),
27
46
  })
28
47
  .strict();
29
48
  const config = zod_1.z
30
49
  .object({
31
- document: zod_1.z.string().optional(),
32
- update: shared_1.DocumentConfigSchema.partial().optional(),
33
- create: shared_1.DocumentConfigSchema.optional(),
50
+ document: zod_1.z.string(),
51
+ update: zod_1.z
52
+ .object({
53
+ content: zod_1.z.any(),
54
+ tags: zod_1.z.array(zod_1.z.string()).optional(),
55
+ meta: zod_1.z
56
+ .object({
57
+ mimeType: zod_1.z.union([shared_1.MimeTypeSchema, shared_1.ExpressionString]).optional(),
58
+ invalidate: zod_1.z.union([zod_1.z.boolean(), shared_1.ExpressionString]).optional(),
59
+ level: zod_1.z
60
+ .union([
61
+ shared_1.ExpressionString,
62
+ zod_1.z.literal('debug'),
63
+ zod_1.z.literal('info'),
64
+ zod_1.z.literal('warning'),
65
+ zod_1.z.literal('error'),
66
+ ])
67
+ .optional(),
68
+ enableAtPlaces: zod_1.z.array(zod_1.z.string()).optional(),
69
+ hideAtPlaces: zod_1.z.array(zod_1.z.string()).optional(),
70
+ })
71
+ .optional(),
72
+ })
73
+ .optional(),
34
74
  })
35
75
  .strict();
36
76
  let CreateDocumentService = CreateDocumentService_1 = class CreateDocumentService {
37
- actionHelperService;
38
77
  loopConfigService;
39
78
  documentService;
40
79
  templateExpressionEvaluatorService;
80
+ schemaRegistry;
41
81
  logger = new common_1.Logger(CreateDocumentService_1.name);
42
- constructor(actionHelperService, loopConfigService, documentService, templateExpressionEvaluatorService) {
43
- this.actionHelperService = actionHelperService;
82
+ constructor(loopConfigService, documentService, templateExpressionEvaluatorService, schemaRegistry) {
44
83
  this.loopConfigService = loopConfigService;
45
84
  this.documentService = documentService;
46
85
  this.templateExpressionEvaluatorService = templateExpressionEvaluatorService;
86
+ this.schemaRegistry = schemaRegistry;
47
87
  }
48
- getDocumentTemplate(props, workflow, context, transitionData) {
49
- if (!props?.document) {
50
- return {};
51
- }
52
- const template = this.loopConfigService.get('documents', props.document);
53
- if (!template) {
54
- throw new Error(`Document template ${props.document} not found.`);
55
- }
56
- return this.templateExpressionEvaluatorService.evaluate(template, {}, context, workflow, transitionData);
57
- }
58
- async apply(props, workflow, context, meta) {
88
+ async apply(props, workflow, context, meta, parentArguments) {
59
89
  if (!workflow) {
60
90
  throw new Error('Workflow is undefined');
61
91
  }
62
- const template = this.getDocumentTemplate(props, workflow, context, meta);
63
- const documentData = (0, lodash_1.merge)(template, props?.create ?? props?.update ?? {});
64
- if (!documentData) {
65
- throw new Error(`No document data provided.`);
92
+ const template = this.loopConfigService.resolveConfig('documents', props.document, context.includes);
93
+ const mergedTemplateData = (0, lodash_1.merge)({}, template.config, props.update ?? {});
94
+ const documentSkeleton = this.templateExpressionEvaluatorService.parse((0, lodash_1.omit)(mergedTemplateData, ['content']), {
95
+ arguments: parentArguments,
96
+ context,
97
+ workflow,
98
+ transition: meta,
99
+ }, {
100
+ schema: shared_1.DocumentSchema,
101
+ });
102
+ const zodSchema = this.schemaRegistry.getZodSchema(`${template.name}.content`);
103
+ if (!zodSchema && mergedTemplateData.content) {
104
+ throw Error(`Document creates with content no schema defined.`);
66
105
  }
67
- this.actionHelperService.validateDocument(documentData);
68
- this.logger.debug(`Create document "${documentData.name}".`);
106
+ const parsedDocumentContent = mergedTemplateData.content
107
+ ? this.templateExpressionEvaluatorService.parse(mergedTemplateData.content, {
108
+ arguments: parentArguments,
109
+ context,
110
+ workflow,
111
+ transition: meta,
112
+ }, {
113
+ schema: zodSchema,
114
+ })
115
+ : null;
116
+ const documentData = {
117
+ ...documentSkeleton,
118
+ content: parsedDocumentContent,
119
+ };
69
120
  const document = this.documentService.create(workflow, context, meta, documentData);
121
+ this.logger.debug(`Created document "${documentData.name}".`);
70
122
  return {
71
123
  success: true,
72
- workflow,
73
124
  persist: true,
125
+ workflow,
74
126
  data: document,
75
127
  };
76
128
  }
@@ -82,9 +134,9 @@ exports.CreateDocumentService = CreateDocumentService = CreateDocumentService_1
82
134
  config,
83
135
  schema,
84
136
  }),
85
- __metadata("design:paramtypes", [common_2.SchemaValidatorService,
86
- configuration_1.ConfigurationService,
137
+ __metadata("design:paramtypes", [configuration_1.ConfigurationService,
87
138
  persistence_1.DocumentService,
88
- services_1.TemplateExpressionEvaluatorService])
139
+ services_1.TemplateExpressionEvaluatorService,
140
+ configuration_1.SchemaRegistry])
89
141
  ], CreateDocumentService);
90
142
  //# sourceMappingURL=create-document.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-document.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tool-services/create-document.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAU2B;AAC3B,yCAAsD;AACtD,uDAA2D;AAE3D,6BAAwB;AAExB,mDAAoD;AAC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B,CAgFjC"}
1
+ {"version":3,"file":"create-document.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tool-services/create-document.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAW2B;AAC3B,uDAA2E;AAE3E,6BAAwB;AAExB,mDAAoD;AACpD,mCAAqC;AACrC,0CAAiE;AAEjE,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,OAAC;SACN,MAAM,CAAC;QACN,OAAO,EAAE,OAAC,CAAC,GAAG,EAAE;QAChB,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QACpC,IAAI,EAAE,OAAC;aACJ,MAAM,CAAC;YACN,QAAQ,EAAE,uBAAc,CAAC,QAAQ,EAAE;YACnC,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;YAClC,KAAK,EAAE,OAAC;iBACL,KAAK,CAAC;gBACL,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;gBAClB,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;gBACjB,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;gBACpB,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;aACnB,CAAC;iBACD,QAAQ,EAAE;YACb,cAAc,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;YAC9C,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;SAC7C,CAAC;aACD,QAAQ,EAAE;KACd,CAAC;SACD,QAAQ,EAAE;CACd,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,QAAQ,EAAE,OAAC,CA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I;aACjB,EACD;gBACE,MAAM,EAAE,SAAS;aAClB,CACF;YACH,CAAC,CAAC,IAAI,CAAC;QAGT,MAAM,YAAY,GAAG;YACnB,GAAG,gBAAgB;YACnB,OAAO,EAAE,qBAAqB;SAC/B,CAAC;QAGF,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAC1C,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,YAAuC,CACxC,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,YAAY,CAAC,IAAI,IAAI,CAAC,CAAC;QAE9D,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;YACb,QAAQ;YACR,IAAI,EAAE,QAAQ;SACf,CAAC;IACJ,CAAC;CACF,CAAA;AA5FY,sDAAqB;gCAArB,qBAAqB;IALjC,IAAA,mBAAU,GAAE;IACZ,IAAA,gBAAO,EAAC;QACP,MAAM;QACN,MAAM;KACP,CAAC;qCAK6B,oCAAoB;QACtB,6BAAe;QACI,6CAAkC;QACtD,8BAAc;GAP7B,qBAAqB,CA4FjC"}
@@ -1,68 +1,78 @@
1
- import { ContextImportInterface, ContextInterface, ServiceInterface, ServiceCallResult, TransitionMetadataInterface } from '@loopstack/shared';
1
+ import { ContextInterface, ServiceInterface, ServiceCallResult, TransitionMetadataInterface } from '@loopstack/shared';
2
2
  import { z } from 'zod';
3
- import { ExpressionEvaluatorService } from '../../common';
4
3
  import { DocumentEntity, WorkflowEntity } from '@loopstack/shared';
5
4
  import { DocumentService, WorkflowService } from '../../persistence';
6
5
  declare const schema: z.ZodObject<{
7
- where: any;
8
- map: z.ZodOptional<z.ZodString>;
9
- filter: z.ZodOptional<z.ZodString>;
10
- sort: z.ZodOptional<z.ZodBoolean>;
11
- sortBy: z.ZodOptional<z.ZodObject<{
12
- iteratees: z.ZodArray<z.ZodString, "many">;
13
- orders: z.ZodArray<z.ZodEnum<["asc", "desc"]>, "many">;
6
+ where: z.ZodUnion<[z.ZodObject<{
7
+ name: any;
14
8
  }, "strip", z.ZodTypeAny, {
15
- iteratees: string[];
16
- orders: ("asc" | "desc")[];
9
+ name?: any;
17
10
  }, {
18
- iteratees: string[];
19
- orders: ("asc" | "desc")[];
20
- }>>;
21
- many: z.ZodOptional<z.ZodBoolean>;
22
- flat: z.ZodOptional<z.ZodBoolean>;
23
- ignoreChanges: z.ZodOptional<z.ZodBoolean>;
24
- global: z.ZodOptional<z.ZodBoolean>;
25
- optional: z.ZodOptional<z.ZodBoolean>;
11
+ name?: any;
12
+ }>, z.ZodObject<{
13
+ and: z.ZodOptional<z.ZodArray<any, "many">>;
14
+ or: z.ZodOptional<z.ZodArray<any, "many">>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ and?: any[] | undefined;
17
+ or?: any[] | undefined;
18
+ }, {
19
+ and?: any[] | undefined;
20
+ or?: any[] | undefined;
21
+ }>, z.ZodObject<{
22
+ brackets: any;
23
+ }, "strip", z.ZodTypeAny, {
24
+ brackets?: any;
25
+ }, {
26
+ brackets?: any;
27
+ }>]>;
28
+ orderBy: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<"ASC">, z.ZodLiteral<"DESC">]>>>;
29
+ getMany: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
30
+ take: z.ZodDefault<z.ZodNumber>;
31
+ skip: z.ZodDefault<z.ZodNumber>;
32
+ isDependency: z.ZodDefault<z.ZodBoolean>;
33
+ isGlobal: z.ZodDefault<z.ZodBoolean>;
34
+ strictMode: z.ZodDefault<z.ZodBoolean>;
26
35
  }, "strict", z.ZodTypeAny, {
27
- sort?: boolean | undefined;
28
- map?: string | undefined;
29
- filter?: string | undefined;
30
- flat?: boolean | undefined;
31
- many?: boolean | undefined;
32
- where?: any;
33
- sortBy?: {
34
- iteratees: string[];
35
- orders: ("asc" | "desc")[];
36
- } | undefined;
37
- ignoreChanges?: boolean | undefined;
38
- global?: boolean | undefined;
39
- optional?: boolean | undefined;
36
+ where: {
37
+ brackets?: any;
38
+ } | {
39
+ name?: any;
40
+ } | {
41
+ and?: any[] | undefined;
42
+ or?: any[] | undefined;
43
+ };
44
+ orderBy: Record<string, "ASC" | "DESC">;
45
+ getMany: boolean;
46
+ take: number;
47
+ skip: number;
48
+ isDependency: boolean;
49
+ isGlobal: boolean;
50
+ strictMode: boolean;
40
51
  }, {
41
- sort?: boolean | undefined;
42
- map?: string | undefined;
43
- filter?: string | undefined;
44
- flat?: boolean | undefined;
45
- many?: boolean | undefined;
46
- where?: any;
47
- sortBy?: {
48
- iteratees: string[];
49
- orders: ("asc" | "desc")[];
50
- } | undefined;
51
- ignoreChanges?: boolean | undefined;
52
- global?: boolean | undefined;
53
- optional?: boolean | undefined;
52
+ where: {
53
+ brackets?: any;
54
+ } | {
55
+ name?: any;
56
+ } | {
57
+ and?: any[] | undefined;
58
+ or?: any[] | undefined;
59
+ };
60
+ orderBy?: Record<string, "ASC" | "DESC"> | undefined;
61
+ getMany?: boolean | undefined;
62
+ take?: number | undefined;
63
+ skip?: number | undefined;
64
+ isDependency?: boolean | undefined;
65
+ isGlobal?: boolean | undefined;
66
+ strictMode?: boolean | undefined;
54
67
  }>;
55
68
  export declare class LoadDocumentService implements ServiceInterface {
56
69
  private documentService;
57
70
  private workflowService;
58
- private functionCallService;
59
71
  private readonly logger;
60
- constructor(documentService: DocumentService, workflowService: WorkflowService, functionCallService: ExpressionEvaluatorService);
61
- applyFilters(props: z.infer<typeof schema>, items: DocumentEntity[]): DocumentEntity<any>[];
62
- applyModifiers(props: z.infer<typeof schema>, entities: DocumentEntity[]): any[];
63
- getDocumentsByQuery(props: z.infer<typeof schema>, pipelineId: string, workspaceId: string, workflow: WorkflowEntity): Promise<DocumentEntity[]>;
72
+ constructor(documentService: DocumentService, workflowService: WorkflowService);
73
+ getDocumentsByQuery(props: z.infer<typeof schema>, pipelineId: string, workspaceId: string, workflow: WorkflowEntity): Promise<DocumentEntity[] | DocumentEntity | null>;
64
74
  updateWorkflowDependenciesHash(workflow: WorkflowEntity): void;
65
- createImportItem(options: z.infer<typeof schema>, currentEntities: DocumentEntity[], prevImport: ContextImportInterface | undefined): ContextImportInterface;
75
+ trackDependencies(workflow: WorkflowEntity, transitionData: TransitionMetadataInterface, result: DocumentEntity[] | DocumentEntity): void;
66
76
  apply(props: z.infer<typeof schema>, workflow: WorkflowEntity | undefined, context: ContextInterface, transitionData: TransitionMetadataInterface): Promise<ServiceCallResult>;
67
77
  }
68
78
  export {};
@@ -8,83 +8,70 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
11
  var LoadDocumentService_1;
15
12
  Object.defineProperty(exports, "__esModule", { value: true });
16
13
  exports.LoadDocumentService = void 0;
17
14
  const common_1 = require("@nestjs/common");
18
- const lodash_1 = __importDefault(require("lodash"));
19
15
  const shared_1 = require("@loopstack/shared");
20
16
  const zod_1 = require("zod");
21
- const common_2 = require("../../common");
22
17
  const persistence_1 = require("../../persistence");
23
18
  const config = zod_1.z
24
19
  .object({
25
- where: persistence_1.WhereCondition,
26
- map: zod_1.z.string().optional(),
27
- filter: zod_1.z.string().optional(),
28
- sort: zod_1.z.boolean().optional(),
29
- sortBy: zod_1.z
30
- .object({
31
- iteratees: zod_1.z.array(zod_1.z.string()),
32
- orders: zod_1.z.array(zod_1.z.enum(['asc', 'desc'])),
33
- })
20
+ where: zod_1.z.union([persistence_1.WhereCondition, shared_1.ExpressionString]),
21
+ orderBy: zod_1.z
22
+ .union([
23
+ zod_1.z.record(zod_1.z.string(), zod_1.z.union([zod_1.z.literal('ASC'), zod_1.z.literal('DESC')])),
24
+ shared_1.ExpressionString,
25
+ ])
34
26
  .optional(),
35
- many: zod_1.z.boolean().optional(),
36
- flat: zod_1.z.boolean().optional(),
37
- ignoreChanges: zod_1.z.boolean().optional(),
38
- global: zod_1.z.boolean().optional(),
39
- optional: zod_1.z.boolean().optional(),
27
+ getMany: zod_1.z.union([zod_1.z.boolean(), shared_1.ExpressionString]).optional(),
28
+ take: zod_1.z.union([zod_1.z.number(), shared_1.ExpressionString]).optional(),
29
+ skip: zod_1.z.union([zod_1.z.number(), shared_1.ExpressionString]).optional(),
30
+ isDependency: zod_1.z.union([zod_1.z.boolean(), shared_1.ExpressionString]).optional(),
31
+ isGlobal: zod_1.z.union([zod_1.z.boolean(), shared_1.ExpressionString]).optional(),
32
+ strictMode: zod_1.z.union([zod_1.z.boolean(), shared_1.ExpressionString]).optional(),
33
+ })
34
+ .strict();
35
+ const schema = zod_1.z
36
+ .object({
37
+ where: persistence_1.WhereCondition,
38
+ orderBy: zod_1.z
39
+ .record(zod_1.z.string(), zod_1.z.union([zod_1.z.literal('ASC'), zod_1.z.literal('DESC')]))
40
+ .default({
41
+ workflow_index: 'DESC',
42
+ }),
43
+ getMany: zod_1.z.boolean().optional().default(false),
44
+ take: zod_1.z.number().default(100),
45
+ skip: zod_1.z.number().default(0),
46
+ isDependency: zod_1.z.boolean().default(true),
47
+ isGlobal: zod_1.z.boolean().default(false),
48
+ strictMode: zod_1.z.boolean().default(true),
40
49
  })
41
50
  .strict();
42
- const schema = config;
43
51
  let LoadDocumentService = LoadDocumentService_1 = class LoadDocumentService {
44
52
  documentService;
45
53
  workflowService;
46
- functionCallService;
47
54
  logger = new common_1.Logger(LoadDocumentService_1.name);
48
- constructor(documentService, workflowService, functionCallService) {
55
+ constructor(documentService, workflowService) {
49
56
  this.documentService = documentService;
50
57
  this.workflowService = workflowService;
51
- this.functionCallService = functionCallService;
52
- }
53
- applyFilters(props, items) {
54
- if (props.filter) {
55
- return items.filter((item) => this.functionCallService.evaluate(props.filter, { item }));
56
- }
57
- return items;
58
- }
59
- applyModifiers(props, entities) {
60
- const defaultMapFunction = '${ entity.content }';
61
- const mapFunc = props.map ?? defaultMapFunction;
62
- let documents = entities.map((entity) => this.functionCallService.evaluate(mapFunc, { entity }));
63
- if (props.flat) {
64
- documents = documents.flat();
65
- }
66
- if (props.sortBy) {
67
- documents = lodash_1.default.orderBy(documents, props.sortBy.iteratees, props.sortBy.orders);
68
- }
69
- if (props.sort) {
70
- documents = documents.sort();
71
- }
72
- return documents;
73
58
  }
74
59
  async getDocumentsByQuery(props, pipelineId, workspaceId, workflow) {
75
60
  const query = this.documentService.createDocumentsQuery(pipelineId, workspaceId, props.where, {
76
- isGlobal: !!props.global,
61
+ take: props.getMany ? props.take : undefined,
62
+ skip: props.getMany ? props.skip : undefined,
63
+ orderBy: props.orderBy,
64
+ isValidOnly: true,
65
+ isGlobal: !!props.isGlobal,
77
66
  ltWorkflowIndex: workflow.index,
78
67
  });
79
68
  this.logger.debug(query.getQuery());
80
69
  this.logger.debug(query.getParameters());
81
- const entities = props.many
82
- ? await query.getMany()
83
- : [await query.getOne()].filter((d) => !!d);
84
- if (!entities.length && !props.optional) {
70
+ const result = props.getMany ? await query.getMany() : await query.getOne();
71
+ if (!result && props.strictMode) {
85
72
  throw new Error(`Document(s) not found.`);
86
73
  }
87
- return this.applyFilters(props, entities);
74
+ return result;
88
75
  }
89
76
  updateWorkflowDependenciesHash(workflow) {
90
77
  const hash = this.workflowService.createDependenciesHash(workflow);
@@ -93,43 +80,35 @@ let LoadDocumentService = LoadDocumentService_1 = class LoadDocumentService {
93
80
  dependencies: hash,
94
81
  };
95
82
  }
96
- createImportItem(options, currentEntities, prevImport) {
97
- const currentDocuments = this.applyModifiers(options, currentEntities);
98
- const content = options.many ? currentDocuments : currentDocuments[0];
99
- return {
100
- ids: currentEntities.map((entity) => entity.id),
101
- tags: currentEntities.map((entity) => entity.tags),
102
- previousContent: prevImport?.content,
103
- content: content,
104
- isNew: !prevImport,
105
- isChanged: !!prevImport && !lodash_1.default.isEqual(prevImport.content, content),
106
- options,
107
- };
83
+ trackDependencies(workflow, transitionData, result) {
84
+ const prevImport = workflow.prevData?.imports?.[transitionData.transition];
85
+ if (!workflow.dependencies) {
86
+ workflow.dependencies = [];
87
+ }
88
+ if (prevImport) {
89
+ workflow.dependencies = workflow.dependencies.filter((dep) => !prevImport?.ids.includes(dep.id));
90
+ }
91
+ const existingDependencyIds = workflow.dependencies.map((dep) => dep.id);
92
+ const dependencyList = Array.isArray(result) ? result : [result];
93
+ const newDependencies = dependencyList.filter((entity) => !existingDependencyIds.includes(entity.id));
94
+ if (newDependencies.length) {
95
+ workflow.dependencies.push(...newDependencies);
96
+ this.updateWorkflowDependenciesHash(workflow);
97
+ }
108
98
  }
109
99
  async apply(props, workflow, context, transitionData) {
110
100
  if (!workflow) {
111
101
  throw new Error('Workflow is undefined');
112
102
  }
113
103
  this.logger.debug(`Load document ${transitionData.transition}`);
114
- const currentEntities = await this.getDocumentsByQuery(props, context.pipelineId, context.workspaceId, workflow);
115
- const prevImport = workflow.prevData?.imports?.[transitionData.transition];
116
- if (!props.ignoreChanges) {
117
- if (!workflow.dependencies) {
118
- workflow.dependencies = [];
119
- }
120
- if (prevImport) {
121
- workflow.dependencies = workflow.dependencies.filter((dep) => !prevImport?.ids.includes(dep.id));
122
- }
123
- const existingDependencyIds = workflow.dependencies.map((dep) => dep.id);
124
- const newDependencies = currentEntities.filter((entity) => !existingDependencyIds.includes(entity.id));
125
- workflow.dependencies.push(...newDependencies);
126
- this.updateWorkflowDependenciesHash(workflow);
104
+ const result = await this.getDocumentsByQuery(props, context.pipelineId, context.workspaceId, workflow);
105
+ if (result && props.isDependency) {
106
+ this.trackDependencies(workflow, transitionData, result);
127
107
  }
128
- const importItem = this.createImportItem(props, currentEntities, prevImport);
129
108
  return {
130
109
  success: true,
131
110
  workflow,
132
- data: importItem,
111
+ data: result,
133
112
  };
134
113
  }
135
114
  };
@@ -141,7 +120,6 @@ exports.LoadDocumentService = LoadDocumentService = LoadDocumentService_1 = __de
141
120
  schema,
142
121
  }),
143
122
  __metadata("design:paramtypes", [persistence_1.DocumentService,
144
- persistence_1.WorkflowService,
145
- common_2.ExpressionEvaluatorService])
123
+ persistence_1.WorkflowService])
146
124
  ], LoadDocumentService);
147
125
  //# sourceMappingURL=load-document.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"load-document.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tool-services/load-document.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,oDAAuB;AACvB,8CAO2B;AAC3B,6BAAwB;AACxB,yCAA0D;AAE1D,mDAI2B;AAE3B,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,KAAK,EAAE,4BAAc;IACrB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC5B,MAAM,EAAE,OAAC;SACN,MAAM,CAAC;QACN,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;QAC9B,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;KACzC,CAAC;SACD,QAAQ,EAAE;IACb,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC5B,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC5B,aAAa,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACrC,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,MAAM,GAAG,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,CAAC,aAAa,EAAE,CAAC;YACzB,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;gBAC3B,QAAQ,CAAC,YAAY,GAAG,EAAE,CAAC;YAC7B,CAAC;YAED,IAAI,UAAU,EAAE,CAAC;gBACf,QAAQ,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,MAAM,CAClD,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,UAAU,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAC3C,CAAC;YACJ,CAAC;YAED,MAAM,qBAAqB,GAAG,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACzE,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAC5C,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,qBAAqB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CACvD,CAAC;YACF,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC;YAE/C,IAAI,CAAC,8BAA8B,CAAC,QAAQ,CAAC,CAAC;QAChD,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CACtC,KAAK,EACL,eAAe,EACf,UAAU,CACX,CAAC;QAEF,OAAO;YACL,OAAO,EAAE,IAAI;YACb,QAAQ;YACR,IAAI,EAAE,UAAU;SACjB,CAAC;IACJ,CAAC;CACF,CAAA;AApLY,kDAAmB;8BAAnB,mBAAmB;IAL/B,IAAA,mBAAU,GAAE;IACZ,IAAA,gBAAO,EAAC;QACP,MAAM;QACN,MAAM;KACP,CAAC;qCAK2B,6BAAe;QACf,6BAAe;QACX,mCAA0B;GAN9C,mBAAmB,CAoL/B"}
1
+ {"version":3,"file":"load-document.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tool-services/load-document.service.ts"],"names":[],"mappings":";;;;;;;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AU,EAClB,OAAO,CAAC,WAAW,EACnB,QAAQ,CACT,CAAC;QAGF,IAAI,MAAM,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;YACjC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAI;YACb,QAAQ;YACR,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;CACF,CAAA;AAvHY,kDAAmB;8BAAnB,mBAAmB;IAL/B,IAAA,mBAAU,GAAE;IACZ,IAAA,gBAAO,EAAC;QACP,MAAM;QACN,MAAM;KACP,CAAC;qCAK2B,6BAAe;QACf,6BAAe;GAL/B,mBAAmB,CAuH/B"}
@@ -1,20 +1,23 @@
1
1
  import { z } from 'zod';
2
- import { ServiceInterface, ServiceCallResult } from '@loopstack/shared';
2
+ import { ServiceInterface, ServiceCallResult, WorkflowEntity, ContextInterface, TransitionMetadataInterface } from '@loopstack/shared';
3
+ import { TemplateExpressionEvaluatorService } from '../services';
3
4
  declare const schema: z.ZodObject<{
4
- input: z.ZodOptional<z.ZodString>;
5
- output: z.ZodOptional<z.ZodString>;
5
+ input: z.ZodOptional<z.ZodAny>;
6
+ output: z.ZodOptional<z.ZodAny>;
6
7
  error: z.ZodOptional<z.ZodString>;
7
8
  }, "strict", z.ZodTypeAny, {
8
9
  error?: string | undefined;
9
- input?: string | undefined;
10
- output?: string | undefined;
10
+ input?: any;
11
+ output?: any;
11
12
  }, {
12
13
  error?: string | undefined;
13
- input?: string | undefined;
14
- output?: string | undefined;
14
+ input?: any;
15
+ output?: any;
15
16
  }>;
16
17
  export declare class MockService implements ServiceInterface {
18
+ private templateExpressionEvaluatorService;
17
19
  private readonly logger;
18
- apply(props: z.infer<typeof schema>): Promise<ServiceCallResult>;
20
+ constructor(templateExpressionEvaluatorService: TemplateExpressionEvaluatorService);
21
+ apply(props: z.infer<typeof schema>, workflow: WorkflowEntity, context: ContextInterface, transitionData: TransitionMetadataInterface, parentArguments: any): Promise<ServiceCallResult>;
19
22
  }
20
23
  export {};