n8n 1.85.4 → 1.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/n8n +0 -1
- package/dist/abstract-server.js +15 -11
- package/dist/abstract-server.js.map +1 -1
- package/dist/active-workflow-manager.js +6 -1
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/license/clear.js +3 -13
- package/dist/commands/license/clear.js.map +1 -1
- package/dist/config/index.d.ts +0 -3
- package/dist/config/schema.d.ts +0 -8
- package/dist/config/schema.js +0 -8
- package/dist/config/schema.js.map +1 -1
- package/dist/constants.d.ts +7 -0
- package/dist/constants.js +8 -1
- package/dist/constants.js.map +1 -1
- package/dist/controllers/annotation-tags.controller.ee.js +2 -2
- package/dist/controllers/annotation-tags.controller.ee.js.map +1 -1
- package/dist/controllers/binary-data.controller.js +6 -2
- package/dist/controllers/binary-data.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.js +1 -4
- package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
- package/dist/controllers/tags.controller.js +2 -2
- package/dist/controllers/tags.controller.js.map +1 -1
- package/dist/credentials-helper.js +1 -1
- package/dist/credentials-helper.js.map +1 -1
- package/dist/databases/entities/index.d.ts +3 -3
- package/dist/databases/entities/index.js +3 -3
- package/dist/databases/entities/index.js.map +1 -1
- package/dist/decorators/controller.registry.js +11 -7
- package/dist/decorators/controller.registry.js.map +1 -1
- package/dist/environments.ee/variables/variables.controller.ee.js +1 -1
- package/dist/environments.ee/variables/variables.controller.ee.js.map +1 -1
- package/dist/evaluation.ee/test-definitions.types.ee.d.ts +0 -19
- package/dist/evaluation.ee/test-runner/errors.ee.d.ts +1 -1
- package/dist/evaluation.ee/test-runner/errors.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runner/evaluation-metrics.ee.js +0 -10
- package/dist/evaluation.ee/test-runner/evaluation-metrics.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +4 -1
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +52 -32
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
- package/dist/executions/execution.service.d.ts +1 -1
- package/dist/executions/execution.service.js +1 -1
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/executions.controller.d.ts +1 -1
- package/dist/license.d.ts +7 -0
- package/dist/license.js +27 -1
- package/dist/license.js.map +1 -1
- package/dist/load-nodes-and-credentials.d.ts +3 -8
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/metrics/prometheus-metrics.service.js +2 -2
- package/dist/metrics/prometheus-metrics.service.js.map +1 -1
- package/dist/modules/insights/{entities → database/entities}/insights-by-period.d.ts +2 -0
- package/dist/modules/insights/{entities → database/entities}/insights-by-period.js +7 -1
- package/dist/modules/insights/database/entities/insights-by-period.js.map +1 -0
- package/dist/modules/insights/database/entities/insights-metadata.js.map +1 -0
- package/dist/modules/insights/{entities → database/entities}/insights-raw.js +1 -1
- package/dist/modules/insights/database/entities/insights-raw.js.map +1 -0
- package/dist/modules/insights/database/entities/insights-shared.js.map +1 -0
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +71 -0
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js +264 -0
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +1 -0
- package/dist/modules/insights/database/repositories/insights-metadata.repository.js.map +1 -0
- package/dist/modules/insights/{repositories → database/repositories}/insights-raw.repository.d.ts +7 -1
- package/dist/modules/insights/{repositories → database/repositories}/insights-raw.repository.js +2 -1
- package/dist/modules/insights/database/repositories/insights-raw.repository.js.map +1 -0
- package/dist/modules/insights/insights.config.d.ts +2 -0
- package/dist/modules/insights/insights.config.js +10 -0
- package/dist/modules/insights/insights.config.js.map +1 -1
- package/dist/modules/insights/insights.controller.d.ts +6 -1
- package/dist/modules/insights/insights.controller.js +37 -0
- package/dist/modules/insights/insights.controller.js.map +1 -1
- package/dist/modules/insights/insights.service.d.ts +39 -2
- package/dist/modules/insights/insights.service.js +70 -18
- package/dist/modules/insights/insights.service.js.map +1 -1
- package/dist/public-api/index.js +1 -1
- package/dist/public-api/index.js.map +1 -1
- package/dist/push/index.d.ts +9 -4
- package/dist/push/index.js +49 -45
- package/dist/push/index.js.map +1 -1
- package/dist/push/push.config.d.ts +3 -0
- package/dist/push/push.config.js +27 -0
- package/dist/push/push.config.js.map +1 -0
- package/dist/push/types.d.ts +2 -1
- package/dist/response-helper.js.map +1 -1
- package/dist/scaling/worker-server.js +6 -2
- package/dist/scaling/worker-server.js.map +1 -1
- package/dist/server.d.ts +0 -1
- package/dist/server.js +9 -9
- package/dist/server.js.map +1 -1
- package/dist/services/frontend.service.d.ts +5 -1
- package/dist/services/frontend.service.js +19 -3
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker-server.js +3 -1
- package/dist/task-runners/task-broker/task-broker-server.js.map +1 -1
- package/dist/utils/object-to-error.js +5 -5
- package/dist/utils/object-to-error.js.map +1 -1
- package/dist/webhooks/webhook-helpers.d.ts +8 -2
- package/dist/webhooks/webhook-helpers.js +107 -125
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-request-handler.js +4 -0
- package/dist/webhooks/webhook-request-handler.js.map +1 -1
- package/dist/workflows/workflow.service.ee.js +1 -0
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/package.json +28 -29
- package/templates/form-trigger-404.handlebars +1 -0
- package/templates/form-trigger-409.handlebars +1 -0
- package/templates/form-trigger-completion.handlebars +31 -0
- package/templates/form-trigger.handlebars +115 -130
- package/dist/evaluation.ee/metrics.controller.d.ts +0 -19
- package/dist/evaluation.ee/metrics.controller.js +0 -140
- package/dist/evaluation.ee/metrics.controller.js.map +0 -1
- package/dist/modules/insights/entities/insights-by-period.js.map +0 -1
- package/dist/modules/insights/entities/insights-metadata.js.map +0 -1
- package/dist/modules/insights/entities/insights-raw.js.map +0 -1
- package/dist/modules/insights/entities/insights-shared.js.map +0 -1
- package/dist/modules/insights/repositories/insights-by-period.repository.d.ts +0 -21
- package/dist/modules/insights/repositories/insights-by-period.repository.js +0 -179
- package/dist/modules/insights/repositories/insights-by-period.repository.js.map +0 -1
- package/dist/modules/insights/repositories/insights-metadata.repository.js.map +0 -1
- package/dist/modules/insights/repositories/insights-raw.repository.js.map +0 -1
- /package/dist/modules/insights/{entities → database/entities}/insights-metadata.d.ts +0 -0
- /package/dist/modules/insights/{entities → database/entities}/insights-metadata.js +0 -0
- /package/dist/modules/insights/{entities → database/entities}/insights-raw.d.ts +0 -0
- /package/dist/modules/insights/{entities → database/entities}/insights-shared.d.ts +0 -0
- /package/dist/modules/insights/{entities → database/entities}/insights-shared.js +0 -0
- /package/dist/modules/insights/{repositories → database/repositories}/insights-metadata.repository.d.ts +0 -0
- /package/dist/modules/insights/{repositories → database/repositories}/insights-metadata.repository.js +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
1
2
|
<html lang='en'>
|
|
2
3
|
|
|
3
4
|
<head>
|
|
@@ -157,6 +158,33 @@
|
|
|
157
158
|
<a id='redirectUrl' href='{{redirectUrl}}' style='display: none;'></a>
|
|
158
159
|
{{/if}}
|
|
159
160
|
<script>
|
|
161
|
+
let interval = 1000;
|
|
162
|
+
let timeoutId;
|
|
163
|
+
const checkExecutionStatus = async () => {
|
|
164
|
+
if (!interval) return;
|
|
165
|
+
|
|
166
|
+
try {
|
|
167
|
+
const response = await fetch(`${ window.location.href }/n8n-execution-status`);
|
|
168
|
+
const text = (await response.text()).trim();
|
|
169
|
+
|
|
170
|
+
if (text === "form-waiting") {
|
|
171
|
+
window.location.replace(window.location.href);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if(["canceled", "crashed", "error", "success", "null" ].includes(text)) {
|
|
176
|
+
interval = 0;
|
|
177
|
+
clearTimeout(timeoutId);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
interval = Math.round(interval * 1.1);
|
|
182
|
+
timeoutId = setTimeout(checkExecutionStatus, interval);
|
|
183
|
+
} catch (error) {
|
|
184
|
+
console.error("Error fetching data:", error);
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
160
188
|
document.addEventListener('DOMContentLoaded', function () {
|
|
161
189
|
const binary = "{{{responseBinary}}}"
|
|
162
190
|
? JSON.parse(decodeURIComponent("{{{responseBinary}}}"))
|
|
@@ -210,6 +238,9 @@
|
|
|
210
238
|
})
|
|
211
239
|
.catch(function (error) {
|
|
212
240
|
console.error('Error:', error);
|
|
241
|
+
})
|
|
242
|
+
.finally(() => {
|
|
243
|
+
timeoutId = setTimeout(checkExecutionStatus, interval);
|
|
213
244
|
});
|
|
214
245
|
</script>
|
|
215
246
|
</body>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
1
2
|
<html lang='en'>
|
|
2
3
|
<head>
|
|
3
4
|
<meta charset='UTF-8' />
|
|
@@ -432,146 +433,130 @@
|
|
|
432
433
|
<section>
|
|
433
434
|
{{#if testRun}}
|
|
434
435
|
<div class='test-notice'>
|
|
435
|
-
<p>This is test version of your form</p>
|
|
436
|
+
<p>This is a test version of your form</p>
|
|
436
437
|
</div>
|
|
437
438
|
<hr>
|
|
438
439
|
{{/if}}
|
|
439
440
|
|
|
440
|
-
|
|
441
|
-
<
|
|
442
|
-
<
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
</div>
|
|
446
|
-
|
|
447
|
-
<div class='inputs-wrapper'>
|
|
448
|
-
{{#each formFields}}
|
|
449
|
-
{{#if isMultiSelect}}
|
|
450
|
-
<div>
|
|
451
|
-
<label class='form-label {{inputRequired}}'>{{label}}</label>
|
|
452
|
-
<div class='multiselect {{inputRequired}}' id='{{id}}'>
|
|
453
|
-
{{#each multiSelectOptions}}
|
|
454
|
-
<div class='multiselect-option'>
|
|
455
|
-
<input type='checkbox' class='multiselect-checkbox' id='{{id}}' />
|
|
456
|
-
<label for='{{id}}'>{{label}}</label>
|
|
457
|
-
</div>
|
|
458
|
-
{{/each}}
|
|
459
|
-
</div>
|
|
460
|
-
<p class='{{errorId}} error-hidden'>
|
|
461
|
-
This field is required
|
|
462
|
-
</p>
|
|
463
|
-
</div>
|
|
464
|
-
{{/if}}
|
|
465
|
-
|
|
466
|
-
{{#if isSelect}}
|
|
467
|
-
<div class='form-group'>
|
|
468
|
-
<label class='form-label {{inputRequired}}' for='{{id}}'>{{label}}</label>
|
|
469
|
-
<div class='select-input'>
|
|
470
|
-
<select id='{{id}}' name='{{id}}' class='{{inputRequired}}'>
|
|
471
|
-
<option value='' disabled selected>Select an option ...</option>
|
|
472
|
-
{{#each selectOptions}}
|
|
473
|
-
<option value='{{this}}'>{{this}}</option>
|
|
474
|
-
{{/each}}
|
|
475
|
-
</select>
|
|
476
|
-
</div>
|
|
477
|
-
<p class='{{errorId}} error-hidden'>
|
|
478
|
-
This field is required
|
|
479
|
-
</p>
|
|
480
|
-
</div>
|
|
481
|
-
{{/if}}
|
|
441
|
+
<form class='card' action='#' method='POST' name='n8n-form' id='n8n-form' novalidate>
|
|
442
|
+
<div class='form-header'>
|
|
443
|
+
<h1>{{formTitle}}</h1>
|
|
444
|
+
<p style="white-space: pre-line">{{{formDescription}}} </p>
|
|
445
|
+
</div>
|
|
482
446
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
</
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
<div class='form-group'>
|
|
496
|
-
<label class='form-label {{inputRequired}}' for='{{id}}'>{{label}}</label>
|
|
497
|
-
<textarea
|
|
498
|
-
class='form-input {{inputRequired}}'
|
|
499
|
-
id='{{id}}'
|
|
500
|
-
name='{{id}}'
|
|
501
|
-
placeholder="{{placeholder}}"
|
|
502
|
-
>{{defaultValue}}</textarea>
|
|
503
|
-
<p class='{{errorId}} error-hidden'>
|
|
504
|
-
This field is required
|
|
505
|
-
</p>
|
|
506
|
-
</div>
|
|
507
|
-
{{/if}}
|
|
508
|
-
|
|
509
|
-
{{#if isFileInput}}
|
|
510
|
-
<div class='form-group file-input-wrapper'>
|
|
511
|
-
<label class='form-label {{inputRequired}}' for='{{id}}'>{{label}}</label>
|
|
512
|
-
<input
|
|
513
|
-
class='form-input {{inputRequired}}'
|
|
514
|
-
type='file'
|
|
515
|
-
id='{{id}}'
|
|
516
|
-
name='{{id}}'
|
|
517
|
-
accept='{{acceptFileTypes}}'
|
|
518
|
-
{{multipleFiles}}
|
|
519
|
-
placeholder="{{placeholder}}"
|
|
520
|
-
/>
|
|
521
|
-
<button class="clear-button">×</button>
|
|
522
|
-
<p class='{{errorId}} error-hidden'>
|
|
523
|
-
This field is required
|
|
524
|
-
</p>
|
|
447
|
+
<div class='inputs-wrapper'>
|
|
448
|
+
{{#each formFields}}
|
|
449
|
+
{{#if isMultiSelect}}
|
|
450
|
+
<div>
|
|
451
|
+
<label class='form-label {{inputRequired}}'>{{label}}</label>
|
|
452
|
+
<div class='multiselect {{inputRequired}}' id='{{id}}'>
|
|
453
|
+
{{#each multiSelectOptions}}
|
|
454
|
+
<div class='multiselect-option'>
|
|
455
|
+
<input type='checkbox' class='multiselect-checkbox' id='{{id}}' />
|
|
456
|
+
<label for='{{id}}'>{{label}}</label>
|
|
457
|
+
</div>
|
|
458
|
+
{{/each}}
|
|
525
459
|
</div>
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
</
|
|
460
|
+
<p class='{{errorId}} error-hidden'>
|
|
461
|
+
This field is required
|
|
462
|
+
</p>
|
|
463
|
+
</div>
|
|
464
|
+
{{/if}}
|
|
465
|
+
|
|
466
|
+
{{#if isSelect}}
|
|
467
|
+
<div class='form-group'>
|
|
468
|
+
<label class='form-label {{inputRequired}}' for='{{id}}'>{{label}}</label>
|
|
469
|
+
<div class='select-input'>
|
|
470
|
+
<select id='{{id}}' name='{{id}}' class='{{inputRequired}}'>
|
|
471
|
+
<option value='' disabled selected>Select an option ...</option>
|
|
472
|
+
{{#each selectOptions}}
|
|
473
|
+
<option value='{{this}}'>{{this}}</option>
|
|
474
|
+
{{/each}}
|
|
475
|
+
</select>
|
|
542
476
|
</div>
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
477
|
+
<p class='{{errorId}} error-hidden'>
|
|
478
|
+
This field is required
|
|
479
|
+
</p>
|
|
480
|
+
</div>
|
|
481
|
+
{{/if}}
|
|
482
|
+
|
|
483
|
+
{{#if isHtml}}
|
|
484
|
+
<div class="form-group html">
|
|
485
|
+
{{{html}}}
|
|
486
|
+
<input type="hidden" id="{{id}}" name="{{id}}" value="{{html}}" />
|
|
487
|
+
</div>
|
|
488
|
+
{{/if}}
|
|
489
|
+
|
|
490
|
+
{{#if isHidden}}
|
|
491
|
+
<input type="hidden" id="{{id}}" name="{{id}}" value="{{hiddenValue}}" />
|
|
492
|
+
{{/if}}
|
|
493
|
+
|
|
494
|
+
{{#if isTextarea}}
|
|
495
|
+
<div class='form-group'>
|
|
496
|
+
<label class='form-label {{inputRequired}}' for='{{id}}'>{{label}}</label>
|
|
497
|
+
<textarea
|
|
498
|
+
class='form-input {{inputRequired}}'
|
|
499
|
+
id='{{id}}'
|
|
500
|
+
name='{{id}}'
|
|
501
|
+
placeholder="{{placeholder}}"
|
|
502
|
+
>{{defaultValue}}</textarea>
|
|
503
|
+
<p class='{{errorId}} error-hidden'>
|
|
504
|
+
This field is required
|
|
505
|
+
</p>
|
|
506
|
+
</div>
|
|
507
|
+
{{/if}}
|
|
508
|
+
|
|
509
|
+
{{#if isFileInput}}
|
|
510
|
+
<div class='form-group file-input-wrapper'>
|
|
511
|
+
<label class='form-label {{inputRequired}}' for='{{id}}'>{{label}}</label>
|
|
512
|
+
<input
|
|
513
|
+
class='form-input {{inputRequired}}'
|
|
514
|
+
type='file'
|
|
515
|
+
id='{{id}}'
|
|
516
|
+
name='{{id}}'
|
|
517
|
+
accept='{{acceptFileTypes}}'
|
|
518
|
+
{{multipleFiles}}
|
|
519
|
+
placeholder="{{placeholder}}"
|
|
520
|
+
/>
|
|
521
|
+
<button class="clear-button">×</button>
|
|
522
|
+
<p class='{{errorId}} error-hidden'>
|
|
523
|
+
This field is required
|
|
524
|
+
</p>
|
|
525
|
+
</div>
|
|
526
|
+
{{/if}}
|
|
527
|
+
|
|
528
|
+
{{#if isInput}}
|
|
529
|
+
<div class='form-group'>
|
|
530
|
+
<label class='form-label {{inputRequired}}' for='{{id}}'>{{label}}</label>
|
|
531
|
+
<input
|
|
532
|
+
class='form-input {{inputRequired}}'
|
|
533
|
+
type='{{type}}'
|
|
534
|
+
id='{{id}}'
|
|
535
|
+
name='{{id}}'
|
|
536
|
+
value="{{defaultValue}}"
|
|
537
|
+
placeholder="{{placeholder}}"
|
|
555
538
|
/>
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
{{else}}
|
|
561
|
-
<div class='card'>
|
|
562
|
-
<div class='form-header'>
|
|
563
|
-
{{#if testRun}}
|
|
564
|
-
<h1>Please add at least one field to your form</h1>
|
|
565
|
-
{{else}}
|
|
566
|
-
<h1>Problem loading form</h1>
|
|
567
|
-
<p>
|
|
568
|
-
This usually occurs if the n8n workflow serving this form is deactivated or no
|
|
569
|
-
longer exist
|
|
570
|
-
</p>
|
|
539
|
+
<p class='{{errorId}} error-hidden'>
|
|
540
|
+
This field is required
|
|
541
|
+
</p>
|
|
542
|
+
</div>
|
|
571
543
|
{{/if}}
|
|
572
|
-
|
|
544
|
+
{{/each}}
|
|
573
545
|
</div>
|
|
574
|
-
|
|
546
|
+
|
|
547
|
+
<button id='submit-btn' type='submit'>
|
|
548
|
+
<span><svg
|
|
549
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
550
|
+
height='18px'
|
|
551
|
+
viewBox='0 0 512 512'
|
|
552
|
+
>
|
|
553
|
+
<path
|
|
554
|
+
d='M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z'
|
|
555
|
+
/>
|
|
556
|
+
</svg></span>
|
|
557
|
+
{{ buttonLabel }}
|
|
558
|
+
</button>
|
|
559
|
+
</form>
|
|
575
560
|
|
|
576
561
|
<div class='card' id='submitted-form' style='display: none;'>
|
|
577
562
|
<div class='form-header'>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import express from 'express';
|
|
2
|
-
import { TestMetricRepository } from '../databases/repositories/test-metric.repository.ee';
|
|
3
|
-
import { Telemetry } from '../telemetry';
|
|
4
|
-
import { TestDefinitionService } from './test-definition.service.ee';
|
|
5
|
-
import { TestMetricsRequest } from './test-definitions.types.ee';
|
|
6
|
-
export declare class TestMetricsController {
|
|
7
|
-
private readonly testDefinitionService;
|
|
8
|
-
private readonly testMetricRepository;
|
|
9
|
-
private readonly telemetry;
|
|
10
|
-
constructor(testDefinitionService: TestDefinitionService, testMetricRepository: TestMetricRepository, telemetry: Telemetry);
|
|
11
|
-
private getTestDefinition;
|
|
12
|
-
getMany(req: TestMetricsRequest.GetMany): Promise<import("../databases/entities/test-metric.ee").TestMetric[]>;
|
|
13
|
-
getOne(req: TestMetricsRequest.GetOne): Promise<import("../databases/entities/test-metric.ee").TestMetric>;
|
|
14
|
-
create(req: TestMetricsRequest.Create, res: express.Response): Promise<import("../databases/entities/test-metric.ee").TestMetric | undefined>;
|
|
15
|
-
patch(req: TestMetricsRequest.Patch, res: express.Response): Promise<import("../databases/entities/test-metric.ee").TestMetric | null | undefined>;
|
|
16
|
-
delete(req: TestMetricsRequest.Delete): Promise<{
|
|
17
|
-
success: boolean;
|
|
18
|
-
}>;
|
|
19
|
-
}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.TestMetricsController = void 0;
|
|
16
|
-
const express_1 = __importDefault(require("express"));
|
|
17
|
-
const test_metric_repository_ee_1 = require("../databases/repositories/test-metric.repository.ee");
|
|
18
|
-
const decorators_1 = require("../decorators");
|
|
19
|
-
const not_found_error_1 = require("../errors/response-errors/not-found.error");
|
|
20
|
-
const metric_schema_1 = require("../evaluation.ee/metric.schema");
|
|
21
|
-
const workflows_service_1 = require("../public-api/v1/handlers/workflows/workflows.service");
|
|
22
|
-
const telemetry_1 = require("../telemetry");
|
|
23
|
-
const test_definition_service_ee_1 = require("./test-definition.service.ee");
|
|
24
|
-
let TestMetricsController = class TestMetricsController {
|
|
25
|
-
constructor(testDefinitionService, testMetricRepository, telemetry) {
|
|
26
|
-
this.testDefinitionService = testDefinitionService;
|
|
27
|
-
this.testMetricRepository = testMetricRepository;
|
|
28
|
-
this.telemetry = telemetry;
|
|
29
|
-
}
|
|
30
|
-
async getTestDefinition(req) {
|
|
31
|
-
const { testDefinitionId } = req.params;
|
|
32
|
-
const userAccessibleWorkflowIds = await (0, workflows_service_1.getSharedWorkflowIds)(req.user, ['workflow:read']);
|
|
33
|
-
const testDefinition = await this.testDefinitionService.findOne(testDefinitionId, userAccessibleWorkflowIds);
|
|
34
|
-
if (!testDefinition)
|
|
35
|
-
throw new not_found_error_1.NotFoundError('Test definition not found');
|
|
36
|
-
return testDefinition;
|
|
37
|
-
}
|
|
38
|
-
async getMany(req) {
|
|
39
|
-
const { testDefinitionId } = req.params;
|
|
40
|
-
await this.getTestDefinition(req);
|
|
41
|
-
return await this.testMetricRepository.find({
|
|
42
|
-
where: { testDefinition: { id: testDefinitionId } },
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
async getOne(req) {
|
|
46
|
-
const { id: metricId, testDefinitionId } = req.params;
|
|
47
|
-
await this.getTestDefinition(req);
|
|
48
|
-
const metric = await this.testMetricRepository.findOne({
|
|
49
|
-
where: { id: metricId, testDefinition: { id: testDefinitionId } },
|
|
50
|
-
});
|
|
51
|
-
if (!metric)
|
|
52
|
-
throw new not_found_error_1.NotFoundError('Metric not found');
|
|
53
|
-
return metric;
|
|
54
|
-
}
|
|
55
|
-
async create(req, res) {
|
|
56
|
-
const bodyParseResult = metric_schema_1.testMetricCreateRequestBodySchema.safeParse(req.body);
|
|
57
|
-
if (!bodyParseResult.success) {
|
|
58
|
-
res.status(400).json({ errors: bodyParseResult.error.errors });
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
const testDefinition = await this.getTestDefinition(req);
|
|
62
|
-
const metric = this.testMetricRepository.create({
|
|
63
|
-
...req.body,
|
|
64
|
-
testDefinition,
|
|
65
|
-
});
|
|
66
|
-
return await this.testMetricRepository.save(metric);
|
|
67
|
-
}
|
|
68
|
-
async patch(req, res) {
|
|
69
|
-
const { id: metricId, testDefinitionId } = req.params;
|
|
70
|
-
const bodyParseResult = metric_schema_1.testMetricPatchRequestBodySchema.safeParse(req.body);
|
|
71
|
-
if (!bodyParseResult.success) {
|
|
72
|
-
res.status(400).json({ errors: bodyParseResult.error.errors });
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
await this.getTestDefinition(req);
|
|
76
|
-
const metric = await this.testMetricRepository.findOne({
|
|
77
|
-
where: { id: metricId, testDefinition: { id: testDefinitionId } },
|
|
78
|
-
});
|
|
79
|
-
if (!metric)
|
|
80
|
-
throw new not_found_error_1.NotFoundError('Metric not found');
|
|
81
|
-
const updateResult = await this.testMetricRepository.update(metricId, bodyParseResult.data);
|
|
82
|
-
if (updateResult.affected === 1 && metric.name !== bodyParseResult.data.name) {
|
|
83
|
-
this.telemetry.track('User added metrics to test', {
|
|
84
|
-
metric_id: metricId,
|
|
85
|
-
metric_name: bodyParseResult.data.name,
|
|
86
|
-
test_id: testDefinitionId,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
return await this.testMetricRepository.findOneBy({ id: metricId });
|
|
90
|
-
}
|
|
91
|
-
async delete(req) {
|
|
92
|
-
const { id: metricId, testDefinitionId } = req.params;
|
|
93
|
-
await this.getTestDefinition(req);
|
|
94
|
-
const metric = await this.testMetricRepository.findOne({
|
|
95
|
-
where: { id: metricId, testDefinition: { id: testDefinitionId } },
|
|
96
|
-
});
|
|
97
|
-
if (!metric)
|
|
98
|
-
throw new not_found_error_1.NotFoundError('Metric not found');
|
|
99
|
-
await this.testMetricRepository.delete(metricId);
|
|
100
|
-
return { success: true };
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
exports.TestMetricsController = TestMetricsController;
|
|
104
|
-
__decorate([
|
|
105
|
-
(0, decorators_1.Get)('/:testDefinitionId/metrics'),
|
|
106
|
-
__metadata("design:type", Function),
|
|
107
|
-
__metadata("design:paramtypes", [Object]),
|
|
108
|
-
__metadata("design:returntype", Promise)
|
|
109
|
-
], TestMetricsController.prototype, "getMany", null);
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, decorators_1.Get)('/:testDefinitionId/metrics/:id'),
|
|
112
|
-
__metadata("design:type", Function),
|
|
113
|
-
__metadata("design:paramtypes", [Object]),
|
|
114
|
-
__metadata("design:returntype", Promise)
|
|
115
|
-
], TestMetricsController.prototype, "getOne", null);
|
|
116
|
-
__decorate([
|
|
117
|
-
(0, decorators_1.Post)('/:testDefinitionId/metrics'),
|
|
118
|
-
__metadata("design:type", Function),
|
|
119
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
120
|
-
__metadata("design:returntype", Promise)
|
|
121
|
-
], TestMetricsController.prototype, "create", null);
|
|
122
|
-
__decorate([
|
|
123
|
-
(0, decorators_1.Patch)('/:testDefinitionId/metrics/:id'),
|
|
124
|
-
__metadata("design:type", Function),
|
|
125
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
126
|
-
__metadata("design:returntype", Promise)
|
|
127
|
-
], TestMetricsController.prototype, "patch", null);
|
|
128
|
-
__decorate([
|
|
129
|
-
(0, decorators_1.Delete)('/:testDefinitionId/metrics/:id'),
|
|
130
|
-
__metadata("design:type", Function),
|
|
131
|
-
__metadata("design:paramtypes", [Object]),
|
|
132
|
-
__metadata("design:returntype", Promise)
|
|
133
|
-
], TestMetricsController.prototype, "delete", null);
|
|
134
|
-
exports.TestMetricsController = TestMetricsController = __decorate([
|
|
135
|
-
(0, decorators_1.RestController)('/evaluation/test-definitions'),
|
|
136
|
-
__metadata("design:paramtypes", [test_definition_service_ee_1.TestDefinitionService,
|
|
137
|
-
test_metric_repository_ee_1.TestMetricRepository,
|
|
138
|
-
telemetry_1.Telemetry])
|
|
139
|
-
], TestMetricsController);
|
|
140
|
-
//# sourceMappingURL=metrics.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.controller.js","sourceRoot":"","sources":["../../src/evaluation.ee/metrics.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAA8B;AAE9B,kGAA0F;AAC1F,6CAAwE;AACxE,8EAAyE;AACzE,iEAGuC;AACvC,4FAA4F;AAC5F,2CAAwC;AAExC,6EAAqE;AAI9D,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACjC,YACkB,qBAA4C,EAC5C,oBAA0C,EAC1C,SAAoB;QAFpB,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,cAAS,GAAT,SAAS,CAAW;IACnC,CAAC;IAII,KAAK,CAAC,iBAAiB,CAC9B,GAK4B;QAE5B,MAAM,EAAE,gBAAgB,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;QAExC,MAAM,yBAAyB,GAAG,MAAM,IAAA,wCAAoB,EAAC,GAAG,CAAC,IAAI,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;QAE1F,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAC9D,gBAAgB,EAChB,yBAAyB,CACzB,CAAC;QAEF,IAAI,CAAC,cAAc;YAAE,MAAM,IAAI,+BAAa,CAAC,2BAA2B,CAAC,CAAC;QAE1E,OAAO,cAAc,CAAC;IACvB,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAC,GAA+B;QAC5C,MAAM,EAAE,gBAAgB,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;QAExC,MAAM,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CA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,IAAI;qDAAC;2BA7CN,gBAAgB;IAD5B,IAAA,gBAAM,GAAE;GACI,gBAAgB,CA8C5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insights-metadata.js","sourceRoot":"","sources":["../../../../src/modules/insights/entities/insights-metadata.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAkF;AAG3E,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,oBAAU;CAe/C,CAAA;AAfY,4CAAgB;AAE5B;IADC,IAAA,gCAAsB,GAAE;;gDACV;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;oDACnC;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;mDACtB;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;sDACpB;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;qDACrB;2BAdR,gBAAgB;IAD5B,IAAA,gBAAM,GAAE;GACI,gBAAgB,CAe5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insights-raw.js","sourceRoot":"","sources":["../../../../src/modules/insights/entities/insights-raw.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAA2C;AAC3C,gCAAoC;AACpC,0CAAkF;AAClF,+CAA+C;AAE/C,uDAAkF;AAClF,iFAAiF;AAE5D,cAAM,GAAK,cAAS,CAAC,GAAG,CAAC,qBAAY,CAAC,CAAC,QAAQ,MAAC;AAG9D,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,oBAAU;IAC1C;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,CAAC;IAWD,IAAI,IAAI;QACP,IAAI,CAAC,IAAA,mCAAiB,EAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,8BAAe,CACxB,SAAS,IAAI,CAAC,KAAK,mDAAmD,CACtE,CAAC;QACH,CAAC;QAED,OAAO,8BAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,IAAI,CAAC,KAAgC;QACxC,IAAI,CAAC,KAAK,GAAG,8BAAY,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;CAUD,CAAA;AArCY,kCAAW;AAOvB;IADC,IAAA,gCAAsB,GAAE;;uCACd;AAGX;IADC,IAAA,gBAAM,GAAE;;2CACM;AAGP;IADP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;0CAChB;AAiBtB;IADC,IAAA,gBAAM,GAAE;;0CACK;AAMd;IAJC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,oCAAkB;KACxB,CAAC;8BACS,IAAI;8CAAC;sBApCJ,WAAW;IADvB,IAAA,gBAAM,GAAE;;GACI,WAAW,CAqCvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insights-shared.js","sourceRoot":"","sources":["../../../../src/modules/insights/entities/insights-shared.ts"],"names":[],"mappings":";;;AAwBA,kDAEC;AAqBD,8CAEC;AAjDD,SAAS,OAAO,CACf,KAA+B,EAC/B,QAAW;IAEX,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;AACzD,CAAC;AAGY,QAAA,kBAAkB,GAAG;IACjC,IAAI,EAAE,CAAC;IACP,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;CACE,CAAC;AAKE,QAAA,kBAAkB,GAAG,MAAM,CAAC,OAAO,CAAC,0BAAkB,CAAC,CAAC,MAAM,CAC1E,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAiC,EAAE,EAAE;IACrD,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;IACjB,OAAO,GAAG,CAAC;AACZ,CAAC,EACD,EAA0C,CAC1C,CAAC;AACF,SAAgB,mBAAmB,CAAC,KAAa;IAChD,OAAO,OAAO,CAAC,KAAK,EAAE,0BAAkB,CAAC,CAAC;AAC3C,CAAC;AAGY,QAAA,YAAY,GAAG;IAC3B,cAAc,EAAE,CAAC;IACjB,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;CACD,CAAC;AAKE,QAAA,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,oBAAY,CAAC,CAAC,MAAM,CAC9D,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAA6B,EAAE,EAAE;IACjD,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;IACjB,OAAO,GAAG,CAAC;AACZ,CAAC,EACD,EAAsC,CACtC,CAAC;AAEF,SAAgB,iBAAiB,CAAC,KAAa;IAC9C,OAAO,OAAO,CAAC,KAAK,EAAE,oBAAY,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DataSource, Repository } from '@n8n/typeorm';
|
|
2
|
-
import { InsightsByPeriod } from '../entities/insights-by-period';
|
|
3
|
-
import type { PeriodUnit } from '../entities/insights-shared';
|
|
4
|
-
export declare class InsightsByPeriodRepository extends Repository<InsightsByPeriod> {
|
|
5
|
-
constructor(dataSource: DataSource);
|
|
6
|
-
private escapeField;
|
|
7
|
-
private getPeriodFilterExpr;
|
|
8
|
-
private getPeriodStartExpr;
|
|
9
|
-
getPeriodInsightsBatchQuery(periodUnit: PeriodUnit, compactionBatchSize: number): import("@n8n/typeorm").SelectQueryBuilder<InsightsByPeriod>;
|
|
10
|
-
getAggregationQuery(periodUnit: PeriodUnit): import("@n8n/typeorm").SelectQueryBuilder<import("@n8n/typeorm").ObjectLiteral>;
|
|
11
|
-
compactSourceDataIntoInsightPeriod({ sourceBatchQuery, sourceTableName, periodUnit, }: {
|
|
12
|
-
sourceBatchQuery: string;
|
|
13
|
-
sourceTableName?: string;
|
|
14
|
-
periodUnit: PeriodUnit;
|
|
15
|
-
}): Promise<number>;
|
|
16
|
-
getPreviousAndCurrentPeriodTypeAggregates(): Promise<Array<{
|
|
17
|
-
period: 'previous' | 'current';
|
|
18
|
-
type: 0 | 1 | 2 | 3;
|
|
19
|
-
total_value: string | number;
|
|
20
|
-
}>>;
|
|
21
|
-
}
|