@solidxai/core 0.1.22-beta.3 → 0.1.22-beta.5
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/CHANGELOG.md +44 -0
- package/dist/constants/error-messages.d.ts +1 -1
- package/dist/constants/error-messages.d.ts.map +1 -1
- package/dist/constants/error-messages.js +1 -1
- package/dist/constants/error-messages.js.map +1 -1
- package/dist/controllers/admin-embed.controller.d.ts +5 -0
- package/dist/controllers/admin-embed.controller.d.ts.map +1 -0
- package/dist/controllers/admin-embed.controller.js +58 -0
- package/dist/controllers/admin-embed.controller.js.map +1 -0
- package/dist/controllers/agent-registry.controller.d.ts +2 -0
- package/dist/controllers/agent-registry.controller.d.ts.map +1 -1
- package/dist/controllers/agent-registry.controller.js +14 -0
- package/dist/controllers/agent-registry.controller.js.map +1 -1
- package/dist/controllers/agent-session.controller.d.ts +8 -1
- package/dist/controllers/agent-session.controller.d.ts.map +1 -1
- package/dist/controllers/agent-session.controller.js +88 -2
- package/dist/controllers/agent-session.controller.js.map +1 -1
- package/dist/controllers/authentication.controller.d.ts +12 -1
- package/dist/controllers/authentication.controller.d.ts.map +1 -1
- package/dist/controllers/authentication.controller.js +26 -2
- package/dist/controllers/authentication.controller.js.map +1 -1
- package/dist/controllers/test-data.controller.d.ts +12 -0
- package/dist/controllers/test-data.controller.d.ts.map +1 -0
- package/dist/controllers/test-data.controller.js +66 -0
- package/dist/controllers/test-data.controller.js.map +1 -0
- package/dist/controllers/test-data.controller.spec.d.ts +2 -0
- package/dist/controllers/test-data.controller.spec.d.ts.map +1 -0
- package/dist/controllers/test-data.controller.spec.js +78 -0
- package/dist/controllers/test-data.controller.spec.js.map +1 -0
- package/dist/dtos/create-agent-job.dto.d.ts +1 -0
- package/dist/dtos/create-agent-job.dto.d.ts.map +1 -1
- package/dist/dtos/create-agent-job.dto.js +8 -1
- package/dist/dtos/create-agent-job.dto.js.map +1 -1
- package/dist/dtos/create-agent-process.dto.d.ts +5 -0
- package/dist/dtos/create-agent-process.dto.d.ts.map +1 -1
- package/dist/dtos/create-agent-process.dto.js +37 -1
- package/dist/dtos/create-agent-process.dto.js.map +1 -1
- package/dist/dtos/create-agent-registry.dto.d.ts +5 -0
- package/dist/dtos/create-agent-registry.dto.d.ts.map +1 -1
- package/dist/dtos/create-agent-registry.dto.js +39 -1
- package/dist/dtos/create-agent-registry.dto.js.map +1 -1
- package/dist/dtos/create-agent-session.dto.js +1 -1
- package/dist/dtos/create-agent-session.dto.js.map +1 -1
- package/dist/dtos/test-run-request.dto.d.ts +1 -0
- package/dist/dtos/test-run-request.dto.d.ts.map +1 -1
- package/dist/dtos/test-run-request.dto.js +7 -1
- package/dist/dtos/test-run-request.dto.js.map +1 -1
- package/dist/dtos/update-agent-deployment.dto.d.ts +8 -0
- package/dist/dtos/update-agent-deployment.dto.d.ts.map +1 -0
- package/dist/dtos/update-agent-deployment.dto.js +60 -0
- package/dist/dtos/update-agent-deployment.dto.js.map +1 -0
- package/dist/dtos/update-agent-job.dto.d.ts +1 -0
- package/dist/dtos/update-agent-job.dto.d.ts.map +1 -1
- package/dist/dtos/update-agent-job.dto.js +8 -1
- package/dist/dtos/update-agent-job.dto.js.map +1 -1
- package/dist/dtos/update-agent-process.dto.d.ts +5 -0
- package/dist/dtos/update-agent-process.dto.d.ts.map +1 -1
- package/dist/dtos/update-agent-process.dto.js +37 -1
- package/dist/dtos/update-agent-process.dto.js.map +1 -1
- package/dist/dtos/update-agent-registry.dto.d.ts +5 -0
- package/dist/dtos/update-agent-registry.dto.d.ts.map +1 -1
- package/dist/dtos/update-agent-registry.dto.js +39 -1
- package/dist/dtos/update-agent-registry.dto.js.map +1 -1
- package/dist/dtos/update-agent-session.dto.js +1 -1
- package/dist/dtos/update-agent-session.dto.js.map +1 -1
- package/dist/entities/agent-job.entity.d.ts +1 -0
- package/dist/entities/agent-job.entity.d.ts.map +1 -1
- package/dist/entities/agent-job.entity.js +7 -2
- package/dist/entities/agent-job.entity.js.map +1 -1
- package/dist/entities/agent-process.entity.d.ts +8 -0
- package/dist/entities/agent-process.entity.d.ts.map +1 -1
- package/dist/entities/agent-process.entity.js +38 -1
- package/dist/entities/agent-process.entity.js.map +1 -1
- package/dist/entities/agent-registry.entity.d.ts +5 -0
- package/dist/entities/agent-registry.entity.d.ts.map +1 -1
- package/dist/entities/agent-registry.entity.js +22 -1
- package/dist/entities/agent-registry.entity.js.map +1 -1
- package/dist/entities/agent-session.entity.d.ts.map +1 -1
- package/dist/entities/agent-session.entity.js +3 -1
- package/dist/entities/agent-session.entity.js.map +1 -1
- package/dist/guards/access-token.guard.d.ts +3 -1
- package/dist/guards/access-token.guard.d.ts.map +1 -1
- package/dist/guards/access-token.guard.js +11 -2
- package/dist/guards/access-token.guard.js.map +1 -1
- package/dist/helpers/agent-config-version-name.d.ts +2 -0
- package/dist/helpers/agent-config-version-name.d.ts.map +1 -0
- package/dist/helpers/agent-config-version-name.js +17 -0
- package/dist/helpers/agent-config-version-name.js.map +1 -0
- package/dist/helpers/agent-config-version-name.spec.d.ts +2 -0
- package/dist/helpers/agent-config-version-name.spec.d.ts.map +1 -0
- package/dist/helpers/agent-config-version-name.spec.js +31 -0
- package/dist/helpers/agent-config-version-name.spec.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/active-user-data.interface.d.ts +1 -0
- package/dist/interfaces/active-user-data.interface.d.ts.map +1 -1
- package/dist/interfaces/active-user-data.interface.js.map +1 -1
- package/dist/jobs/database/test-run-queue-subscriber-database.service.d.ts.map +1 -1
- package/dist/jobs/database/test-run-queue-subscriber-database.service.js +8 -4
- package/dist/jobs/database/test-run-queue-subscriber-database.service.js.map +1 -1
- package/dist/resources/admin-embed/solid-admin-embed.js +133 -0
- package/dist/resources/agent-embed/solid-agent-embed.js +243 -4
- package/dist/seeders/module-test-data.service.d.ts +19 -0
- package/dist/seeders/module-test-data.service.d.ts.map +1 -1
- package/dist/seeders/module-test-data.service.js +95 -15
- package/dist/seeders/module-test-data.service.js.map +1 -1
- package/dist/seeders/module-test-data.service.spec.d.ts +2 -0
- package/dist/seeders/module-test-data.service.spec.d.ts.map +1 -0
- package/dist/seeders/module-test-data.service.spec.js +158 -0
- package/dist/seeders/module-test-data.service.spec.js.map +1 -0
- package/dist/seeders/seed-data/solid-core-metadata.json +375 -11
- package/dist/services/agent-hub-process-manager.service.d.ts +16 -0
- package/dist/services/agent-hub-process-manager.service.d.ts.map +1 -1
- package/dist/services/agent-hub-process-manager.service.js +27 -3
- package/dist/services/agent-hub-process-manager.service.js.map +1 -1
- package/dist/services/agent-registry.service.d.ts +2 -0
- package/dist/services/agent-registry.service.d.ts.map +1 -1
- package/dist/services/agent-registry.service.js +36 -1
- package/dist/services/agent-registry.service.js.map +1 -1
- package/dist/services/api-key-portal-session.spec.d.ts +2 -0
- package/dist/services/api-key-portal-session.spec.d.ts.map +1 -0
- package/dist/services/api-key-portal-session.spec.js +71 -0
- package/dist/services/api-key-portal-session.spec.js.map +1 -0
- package/dist/services/api-key.service.d.ts +12 -0
- package/dist/services/api-key.service.d.ts.map +1 -1
- package/dist/services/api-key.service.js +58 -0
- package/dist/services/api-key.service.js.map +1 -1
- package/dist/services/authentication.service.d.ts +1 -0
- package/dist/services/authentication.service.d.ts.map +1 -1
- package/dist/services/authentication.service.js +14 -1
- package/dist/services/authentication.service.js.map +1 -1
- package/dist/services/crud.service.d.ts +1 -0
- package/dist/services/crud.service.d.ts.map +1 -1
- package/dist/services/crud.service.js +26 -2
- package/dist/services/crud.service.js.map +1 -1
- package/dist/services/settings/default-settings-provider.service.d.ts +16 -6
- package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
- package/dist/services/settings/default-settings-provider.service.js +9 -3
- package/dist/services/settings/default-settings-provider.service.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +5 -0
- package/dist/solid-core.module.js.map +1 -1
- package/dist/testing/adapters/ui/browser-provisioner.d.ts +11 -0
- package/dist/testing/adapters/ui/browser-provisioner.d.ts.map +1 -1
- package/dist/testing/adapters/ui/browser-provisioner.js +51 -1
- package/dist/testing/adapters/ui/browser-provisioner.js.map +1 -1
- package/dist/testing/adapters/ui/browser-provisioner.spec.d.ts +2 -0
- package/dist/testing/adapters/ui/browser-provisioner.spec.d.ts.map +1 -0
- package/dist/testing/adapters/ui/browser-provisioner.spec.js +137 -0
- package/dist/testing/adapters/ui/browser-provisioner.spec.js.map +1 -0
- package/dist/testing/adapters/ui/playwright-adapter.d.ts +7 -0
- package/dist/testing/adapters/ui/playwright-adapter.d.ts.map +1 -1
- package/dist/testing/adapters/ui/playwright-adapter.js +40 -9
- package/dist/testing/adapters/ui/playwright-adapter.js.map +1 -1
- package/dist/testing/adapters/ui/run-video.d.ts +40 -0
- package/dist/testing/adapters/ui/run-video.d.ts.map +1 -0
- package/dist/testing/adapters/ui/run-video.js +113 -0
- package/dist/testing/adapters/ui/run-video.js.map +1 -0
- package/dist/testing/adapters/ui/run-video.spec.d.ts +2 -0
- package/dist/testing/adapters/ui/run-video.spec.d.ts.map +1 -0
- package/dist/testing/adapters/ui/run-video.spec.js +62 -0
- package/dist/testing/adapters/ui/run-video.spec.js.map +1 -0
- package/dist/testing/contracts/runtime-context.types.d.ts +7 -0
- package/dist/testing/contracts/runtime-context.types.d.ts.map +1 -1
- package/dist/testing/contracts/runtime-context.types.js.map +1 -1
- package/dist/testing/contracts/testing-metadata.types.d.ts +1 -0
- package/dist/testing/contracts/testing-metadata.types.d.ts.map +1 -1
- package/dist/testing/contracts/testing-metadata.types.js.map +1 -1
- package/dist/testing/core/interpolation.d.ts.map +1 -1
- package/dist/testing/core/interpolation.js +14 -2
- package/dist/testing/core/interpolation.js.map +1 -1
- package/dist/testing/core/step-data.d.ts +5 -0
- package/dist/testing/core/step-data.d.ts.map +1 -0
- package/dist/testing/core/step-data.js +14 -0
- package/dist/testing/core/step-data.js.map +1 -0
- package/dist/testing/core/step-data.spec.d.ts +2 -0
- package/dist/testing/core/step-data.spec.d.ts.map +1 -0
- package/dist/testing/core/step-data.spec.js +48 -0
- package/dist/testing/core/step-data.spec.js.map +1 -0
- package/dist/testing/core/testing-engine.d.ts +1 -1
- package/dist/testing/core/testing-engine.d.ts.map +1 -1
- package/dist/testing/core/testing-engine.js +27 -4
- package/dist/testing/core/testing-engine.js.map +1 -1
- package/dist/testing/reporter/lifecycle-events.types.d.ts +3 -2
- package/dist/testing/reporter/lifecycle-events.types.d.ts.map +1 -1
- package/dist/testing/reporter/lifecycle-events.types.js.map +1 -1
- package/dist/testing/reporter/lifecycle-webhook-reporter.d.ts +2 -1
- package/dist/testing/reporter/lifecycle-webhook-reporter.d.ts.map +1 -1
- package/dist/testing/reporter/lifecycle-webhook-reporter.js +3 -0
- package/dist/testing/reporter/lifecycle-webhook-reporter.js.map +1 -1
- package/dist/testing/reporter/reporter.types.d.ts +2 -1
- package/dist/testing/reporter/reporter.types.d.ts.map +1 -1
- package/dist/testing/reporter/reporter.types.js.map +1 -1
- package/dist/testing/runner/read-scenarios-file.d.ts +1 -0
- package/dist/testing/runner/read-scenarios-file.d.ts.map +1 -1
- package/dist/testing/runner/read-scenarios-file.js +20 -0
- package/dist/testing/runner/read-scenarios-file.js.map +1 -1
- package/dist/testing/runner/run-from-metadata.d.ts.map +1 -1
- package/dist/testing/runner/run-from-metadata.js +48 -10
- package/dist/testing/runner/run-from-metadata.js.map +1 -1
- package/dist/testing/runner/run-from-metadata.spec.js +41 -1
- package/dist/testing/runner/run-from-metadata.spec.js.map +1 -1
- package/dist/testing/runner/scenario-graph.d.ts +9 -0
- package/dist/testing/runner/scenario-graph.d.ts.map +1 -1
- package/dist/testing/runner/scenario-graph.js +47 -13
- package/dist/testing/runner/scenario-graph.js.map +1 -1
- package/dist/testing/steps/ui/navigation.step.d.ts.map +1 -1
- package/dist/testing/steps/ui/navigation.step.js +4 -1
- package/dist/testing/steps/ui/navigation.step.js.map +1 -1
- package/dist/testing/steps/util/random.step.d.ts.map +1 -1
- package/dist/testing/steps/util/random.step.js +4 -1
- package/dist/testing/steps/util/random.step.js.map +1 -1
- package/package.json +1 -1
- package/resources/admin-embed/solid-admin-embed.js +133 -0
- package/resources/agent-embed/solid-agent-embed.js +243 -4
- package/src/constants/error-messages.ts +2 -1
- package/src/controllers/admin-embed.controller.ts +34 -0
- package/src/controllers/agent-registry.controller.ts +8 -1
- package/src/controllers/agent-session.controller.ts +53 -2
- package/src/controllers/authentication.controller.ts +20 -1
- package/src/controllers/test-data.controller.spec.ts +94 -0
- package/src/controllers/test-data.controller.ts +58 -0
- package/src/dtos/create-agent-job.dto.ts +6 -0
- package/src/dtos/create-agent-process.dto.ts +32 -1
- package/src/dtos/create-agent-registry.dto.ts +34 -1
- package/src/dtos/create-agent-session.dto.ts +1 -1
- package/src/dtos/test-run-request.dto.ts +6 -0
- package/src/dtos/update-agent-deployment.dto.ts +37 -0
- package/src/dtos/update-agent-job.dto.ts +6 -0
- package/src/dtos/update-agent-process.dto.ts +32 -1
- package/src/dtos/update-agent-registry.dto.ts +34 -1
- package/src/dtos/update-agent-session.dto.ts +1 -1
- package/src/entities/agent-job.entity.ts +5 -1
- package/src/entities/agent-process.entity.ts +28 -0
- package/src/entities/agent-registry.entity.ts +15 -0
- package/src/entities/agent-session.entity.ts +3 -0
- package/src/guards/access-token.guard.ts +11 -1
- package/src/helpers/agent-config-version-name.spec.ts +35 -0
- package/src/helpers/agent-config-version-name.ts +16 -0
- package/src/index.ts +5 -0
- package/src/interfaces/active-user-data.interface.ts +3 -0
- package/src/jobs/database/test-run-queue-subscriber-database.service.ts +10 -6
- package/src/seeders/module-test-data.service.spec.ts +184 -0
- package/src/seeders/module-test-data.service.ts +136 -20
- package/src/seeders/seed-data/solid-core-metadata.json +376 -12
- package/src/services/agent-hub-process-manager.service.ts +35 -4
- package/src/services/agent-registry.service.ts +38 -2
- package/src/services/api-key-portal-session.spec.ts +75 -0
- package/src/services/api-key.service.ts +61 -0
- package/src/services/authentication.service.ts +16 -2
- package/src/services/crud.service.ts +30 -2
- package/src/services/settings/default-settings-provider.service.ts +13 -3
- package/src/solid-core.module.ts +5 -0
- package/src/testing/adapters/ui/browser-provisioner.spec.ts +131 -0
- package/src/testing/adapters/ui/browser-provisioner.ts +85 -2
- package/src/testing/adapters/ui/playwright-adapter.ts +53 -11
- package/src/testing/adapters/ui/run-video.spec.ts +72 -0
- package/src/testing/adapters/ui/run-video.ts +122 -0
- package/src/testing/contracts/runtime-context.types.ts +16 -0
- package/src/testing/contracts/testing-metadata.types.ts +5 -0
- package/src/testing/core/interpolation.ts +11 -2
- package/src/testing/core/step-data.spec.ts +59 -0
- package/src/testing/core/step-data.ts +14 -0
- package/src/testing/core/testing-engine.ts +33 -5
- package/src/testing/reporter/lifecycle-events.types.ts +5 -2
- package/src/testing/reporter/lifecycle-webhook-reporter.ts +4 -1
- package/src/testing/reporter/reporter.types.ts +3 -1
- package/src/testing/runner/read-scenarios-file.ts +24 -0
- package/src/testing/runner/run-from-metadata.spec.ts +48 -1
- package/src/testing/runner/run-from-metadata.ts +66 -21
- package/src/testing/runner/scenario-graph.ts +55 -12
- package/src/testing/steps/ui/navigation.step.ts +4 -1
- package/src/testing/steps/util/random.step.ts +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.22-beta.5] - 2026-11-17
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- implement admin embed functionality with SDK and session management
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- update admin embed controller to fallback to agent embed UI URL
|
|
12
|
+
- update deployment logic to mark active agents as draft when changes occur
|
|
13
|
+
|
|
14
|
+
### Other
|
|
15
|
+
|
|
16
|
+
- a broken restoreFrom fails only its scenario, run video at viewport size, no video or timeline for API scenarios
|
|
17
|
+
- report the random values and match extractions each step used
|
|
18
|
+
- make SolidX Agent Enabled an admin-editable setting
|
|
19
|
+
|
|
20
|
+
## [0.1.22-beta.4] - 2026-11-16
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- enhance agent management with deployment updates and new properties
|
|
25
|
+
- implement buildAgentConfigVersionName function and integrate it into AgentRegistryService
|
|
26
|
+
|
|
27
|
+
### Other
|
|
28
|
+
|
|
29
|
+
- changes to support force change password on first login using env
|
|
30
|
+
- Lm migration (#215)
|
|
31
|
+
- recover conflict record unique key added in error msg (#214)
|
|
32
|
+
- set forceChangePasswordOnFirstLogin to true as per the requirement. (#211)
|
|
33
|
+
|
|
34
|
+
## [0.1.22-beta.4] - 2026-11-16
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- enhance agent management with deployment updates and new properties
|
|
39
|
+
- implement buildAgentConfigVersionName function and integrate it into AgentRegistryService
|
|
40
|
+
|
|
41
|
+
### Other
|
|
42
|
+
|
|
43
|
+
- Lm migration (#215)
|
|
44
|
+
- recover conflict record unique key added in error msg (#214)
|
|
45
|
+
- set forceChangePasswordOnFirstLogin to true as per the requirement. (#211)
|
|
46
|
+
|
|
3
47
|
## [0.1.22-beta.3] - 2026-11-12
|
|
4
48
|
|
|
5
49
|
### Added
|
|
@@ -52,7 +52,7 @@ export declare const ERROR_MESSAGES: {
|
|
|
52
52
|
ID_REQUIRED_FOR_DELETE: string;
|
|
53
53
|
RELATION_TYPE_NOT_SUPPORTED: string;
|
|
54
54
|
NO_SOFT_DELETED_RECORD_FOUND: string;
|
|
55
|
-
CONFLICTING_RECORD_ON_UNARCHIVE: string;
|
|
55
|
+
CONFLICTING_RECORD_ON_UNARCHIVE: (conflictDetails?: string) => string;
|
|
56
56
|
NO_SOFT_DELETED_RECORDS_FOUND: string;
|
|
57
57
|
EMPTY_PATH_PARTS: string;
|
|
58
58
|
MISSING_HEADERS_OR_FUNCTION: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-messages.d.ts","sourceRoot":"","sources":["../../src/constants/error-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BA2CE,MAAM,EAAE;2CACM,MAAM;+BAClB,MAAM;uCACE,MAAM;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"error-messages.d.ts","sourceRoot":"","sources":["../../src/constants/error-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BA2CE,MAAM,EAAE;2CACM,MAAM;+BAClB,MAAM;uCACE,MAAM;;;;;;;;;;;;;;;;;6BAkChB,MAAM;;;;0BAOT,MAAM,GAAG,MAAM;mCACN,MAAM;;;;;;mCASN,MAAM,GAAG,MAAM;qCACb,MAAM;yDACc,MAAM;qCAC1B,MAAM;;mCAIR,MAAM;8BACX,MAAM,GAAG,MAAM;gCAGb,MAAM,GAAG,MAAM;;;kCAKb,MAAM,GAAG,MAAM;qCACZ,MAAM;8CAGG,MAAM,GAAG,MAAM;;yCAIpB,MAAM;;;;;;;;;;;;yBA0BtC,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CAElD,CAAC"}
|
|
@@ -55,7 +55,7 @@ exports.ERROR_MESSAGES = {
|
|
|
55
55
|
ID_REQUIRED_FOR_DELETE: 'Id is required for deletion.',
|
|
56
56
|
RELATION_TYPE_NOT_SUPPORTED: 'Relation type not supported in CRUD service.',
|
|
57
57
|
NO_SOFT_DELETED_RECORD_FOUND: 'No soft-deleted record found with the given ID.',
|
|
58
|
-
CONFLICTING_RECORD_ON_UNARCHIVE: 'A record with
|
|
58
|
+
CONFLICTING_RECORD_ON_UNARCHIVE: (conflictDetails = 'the same details') => `A record with ${conflictDetails} already exists. Update or delete the active record before restoring this one.`,
|
|
59
59
|
NO_SOFT_DELETED_RECORDS_FOUND: 'No matching soft-deleted records found.',
|
|
60
60
|
EMPTY_PATH_PARTS: 'Path parts cannot be empty',
|
|
61
61
|
MISSING_HEADERS_OR_FUNCTION: 'Either headers or data records function must be provided.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-messages.js","sourceRoot":"","sources":["../../src/constants/error-messages.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAG;IAE1B,cAAc,EAAE,sBAAsB;IACtC,eAAe,EAAE,gCAAgC;IACjD,aAAa,EAAE,mBAAmB;IAClC,eAAe,EAAE,sEAAsE;IACvF,kBAAkB,EAAE,0BAA0B;IAC9C,4BAA4B,EAAE,oCAAoC;IAClE,2BAA2B,EAAE,yCAAyC;IACtE,kCAAkC,EAAE,2CAA2C;IAC/E,6BAA6B,EAAE,iEAAiE;IAChG,6BAA6B,EAAE,gDAAgD;IAC/E,8BAA8B,EAAE,kDAAkD;IAClF,mBAAmB,EAAE,sCAAsC;IAC3D,0BAA0B,EAAE,6CAA6C;IACzE,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,kBAAkB;IAC/B,yBAAyB,EAAE,+CAA+C;IAC1E,kBAAkB,EAAE,8DAA8D;IAClF,gBAAgB,EAAE,yBAAyB;IAC3C,iBAAiB,EAAE,+BAA+B;IAClD,0BAA0B,EAAE,uCAAuC;IACnE,eAAe,EAAE,0BAA0B;IAC3C,0BAA0B,EAAE,4BAA4B;IACxD,qBAAqB,EAAE,uBAAuB;IAC9C,aAAa,EAAE,eAAe;IAC9B,oBAAoB,EAAE,sBAAsB;IAC5C,iCAAiC,EAAE,wDAAwD;IAC3F,qDAAqD,EAAE,4EAA4E;IACnI,aAAa,EAAE,2CAA2C;IAE1D,mBAAmB,EAAE,qBAAqB;IAC1C,YAAY,EAAE,cAAc;IAC5B,yBAAyB,EAAE,qDAAqD;IAChF,2BAA2B,EAAE,8EAA8E;IAC3G,sBAAsB,EAAE,+CAA+C;IACvE,oBAAoB,EAAE,u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CAAuC;IAEtE,4CAA4C,EAAE,wBAAwB;IAQtE,YAAY,EAAE,eAAe;IAC7B,WAAW,EAAE,qEAAqE;IAClF,YAAY,EAAE,0EAA0E;IACxF,gBAAgB,EAAE,8BAA8B;IAChD,mBAAmB,EAAE,yCAAyC;IAC9D,oBAAoB,EAAE,iEAAiE;IACvF,yBAAyB,EAAE,mCAAmC;IAE9D,mBAAmB,EAAE;QACrB,UAAU,EAAE,CAAC,KAAc,EAAE,EAAE,CAC7B,wCAAwC,KAAK,IAAI,OAAO,WAAW;KACtB;CAElD,CAAC","sourcesContent":["// backend/common/constants/error-messages.ts\n\nexport const ERROR_MESSAGES = {\n //authentication errors\n USER_NOT_FOUND: 'User does not exist.',\n USER_NOT_ACTIVE: 'User profile is not activated.',\n USER_INACTIVE: 'User is inactive.',\n ACCOUNT_BLOCKED: 'Your account has been blocked due to multiple failed login attempts.',\n PASSWORD_INCORRECT: 'Password does not match.',\n PUBLIC_REGISTRATION_DISABLED: 'Public registrations are disabled.',\n UNIQUE_CONSTRAINT_VIOLATION: 'A unique constraint violation occurred.',\n PASSWORDLESS_REGISTRATION_DISABLED: 'Passwordless registration is not enabled.',\n REGISTRATION_REQUIRES_CONTACT: 'Either mobile or email is required for initiating registration.',\n EMAIL_REQUIRED_FOR_VALIDATION: 'Email is required for email validation source.',\n MOBILE_REQUIRED_FOR_VALIDATION: 'Mobile is required for mobile validation source.',\n USER_ALREADY_EXISTS: 'User already exists. Please sign in.',\n VALIDATION_SOURCE_REQUIRED: 'At least one validation source is required.',\n INVALID_OTP: 'Invalid OTP.',\n OTP_EXPIRED: 'OTP has expired.',\n INVALID_VERIFICATION_TYPE: 'Invalid type. Must be either email or mobile.',\n NON_LOCAL_PROVIDER: 'User seems to have used a passwordless mode to authenticate.',\n USER_ID_MISMATCH: \"User ID's do not match.\",\n USERNAME_MISMATCH: \"User username's do not match.\",\n INCORRECT_CURRENT_PASSWORD: 'Incorrect current password specified.',\n PASSWORD_REUSED: 'Try a different password',\n INVALID_VERIFICATION_TOKEN: 'Invalid verification token',\n INVALID_REFRESH_TOKEN: 'Invalid refresh token',\n ACCESS_DENIED: 'Access denied',\n INVALID_USER_PROFILE: 'Invalid user profile',\n GOOGLE_OAUTH_PROFILE_FETCH_FAILED: 'Failed to fetch user profile from Google OAuth service',\n MICROSOFT_ACTIVE_DIRECTORY_OAUTH_PROFILE_FETCH_FAILED: 'Failed to fetch user profile from Microsoft Active Directory OAuth service',\n LOGOUT_FAILED: 'Logout failed due to an unexpected error.',\n\n INVALID_CREDENTIALS: 'Invalid credentials',\n LOGIN_FAILED: 'Login Failed',\n LOGIN_DENIED_BY_EXTENSION: 'Login was denied by an external verification check.',\n LOGIN_EXTENSION_UNAVAILABLE: 'An external verification check is temporarily unavailable. Please try again.',\n OLD_PASSWORD_INCORRECT: 'You have specified an incorrect old password.',\n INVALID_NEW_PASSWORD: 'Invalid new password.',\n PASSWORDS_DO_NOT_MATCH: 'New passwords are not matching.',\n\n // user management errors\n DELETE_SELF_NOT_ALLOWED: 'Deleting logged-in user is not allowed.',\n DELETE_IDS_REQUIRED: 'At least one ID is required for deletion.',\n USER_MISSING_ID: 'User must exist before initializing roles.',\n ROLES_NOT_FOUND: (roles: string[]) => `The following roles were not found: ${roles.join(', ')}`,\n USER_NOT_FOUND_BY_USERNAME: (username: string) => `User with username '${username}' not found.`,\n ROLE_NOT_FOUND: (roleName: string) => `Role '${roleName}' not found.`,\n PERMISSION_NOT_EXIST: (permission: string) => `Permission '${permission}' does not exist.`,\n\n // session errors\n SESSION_INVALID: 'Your session is no longer valid. Please log in again.',\n SESSION_EXPIRED: 'Your session has expired. Please log in again.',\n\n // filter errors\n GROUP_BY_LIMIT: 'buildFilterQuery: Only 1 Group by field is supported currently.',\n INVALID_GROUP_BY_COUNT: 'Exactly one groupBy field is required to count grouped records.',\n\n // general errors\n FORBIDDEN: 'Forbidden',\n RESOURCE_NOT_FOUND: 'The requested resource was not found.',\n\n\n // database errors\n DUPLICATE_ENTRY: 'Duplicate entry. A record with similar unique fields already exists.',\n\n // validation errors\n ID_REQUIRED_FOR_UPDATE: 'Id is required for update.',\n ID_REQUIRED_FOR_DELETE: 'Id is required for deletion.',\n\n // CRUD service errors\n RELATION_TYPE_NOT_SUPPORTED: 'Relation type not supported in CRUD service.',\n NO_SOFT_DELETED_RECORD_FOUND: 'No soft-deleted record found with the given ID.',\n CONFLICTING_RECORD_ON_UNARCHIVE: 'A record with the same details already exists. Update or delete the active record before restoring this one.',\n NO_SOFT_DELETED_RECORDS_FOUND: 'No matching soft-deleted records found.',\n EMPTY_PATH_PARTS: 'Path parts cannot be empty',\n\n\n // CSV/Excel service errors\n MISSING_HEADERS_OR_FUNCTION: 'Either headers or data records function must be provided.',\n INVALID_CHUNK_SIZE: 'Chunk size must be greater than 0 when data records function is provided.',\n INVALID_FORMAT: (format: string) => `Invalid ${format} format`,\n\n\n //field errors\n INVALID_INVERSE_FIELD_TYPE: 'Only relation fields can have inverse fields.',\n MODEL_AND_MODULE_REQUIRED_TO_UPDATE_INVERSE_FIELD: 'Model and module are required to update inverse field.',\n MODEL_NAME_AND_MODULE_NAME_REQUIRED_TO_CREATE_INVERSE_FIELD: 'Model name and module name are required to create inverse field.',\n FIELD_NOT_FOUND: (id: number | string) => `No field with id #${id} exists`,\n PROVIDER_NOT_FOUND: (provider: string) => `Field incorrectly configured. No provider with name ${provider} registered in backend.`,\n FILE_WRITE_FAILED: 'File creation failed, rolling back transaction',\n FILE_DELETE_FAILED: 'File deletion failed, rolling back transaction',\n // file service errors\n FILE_NOT_FOUND: 'File not found',\n FILE_COPY_ERROR: 'Error copying file',\n S3_CLIENT_NOT_INITIALIZED: 'S3 Client not initialized. Please check the S3 configuration.',\n\n // model errors\n MODEL_METADATA_NOT_FOUND: (id: string | number) => `Model metadata with ID ${id} not found.`,\n MODEL_SERVICE_NOT_FOUND: (model: string) => `Model service for ${model} not found.`,\n RELATION_CO_MODEL_NOT_DEFINED_FOR_FIELD: (fieldName: string) => `Relation coModelSingularName is not defined for relation field ${fieldName}`,\n MODEL_NOT_FOUND: (singularName?: string) => `Model${singularName ? ` with singular name \"${singularName}\"` : ''} not found.`,\n MODEL_REQUIRED_FOR_CODE_GENERATION: 'Model ID or Model Name is required for generating code.',\n\n //module errors\n MODULE_NOT_FOUND: (moduleName: string) => `Module with name ${moduleName} not found.`,\n MODULE_ID_NOT_FOUND: (id: string | number) => `Module with ID ${id} not found.`,\n\n //entity errors\n ENTITY_NOT_FOUND: (entity?: string | number) => `Entity${entity ? ' ' + entity : ''} not found.`,\n ENTITY_NAME_REQUIRED: 'Entity name is required to find the entity.',\n ENTITY_ID_REQUIRED: 'Entity ID is required to find the entity.',\n\n // import errors\n NO_ERROR_LOG_FOR_IMPORT: (id: string | number) => `No error log entries found for import transaction ID ${id}.`,\n FILE_READ_FAILED_FROM_URL: (url: string) => `Failed to read file from URL: ${url}`,\n\n // media storage provider errors\n MEDIA_STORAGE_PROVIDER_ID_NOT_FOUND: (id: number | string) => `Media Storage Provider with #${id} not found.`,\n MEDIA_STORAGE_PROVIDER_NOT_FOUND: 'Media Storage Provider not found',\n\n // SQL errors\n UNSUPPORTED_SQL_OPERATOR: (operator: string) => `Unsupported SQL operator: ${operator}`,\n\n // AI interaction errors\n PYTHON_EXECUTABLE_NOT_CONFIGURED: 'SolidX AI MCP python executable or client path not configured.',\n UNABLE_TO_RESOLVE_SOLID_COMMAND: 'Unable to resolve a solid_ command that was used to come up with this response.',\n UNABLE_TO_RESOLVE_MCP_HANDLER: 'Unable to resolve a mcp tool handler.',\n\n DEFAULT_REGEX_PATTERN_NOT_MATCHING_ERROR_MSG: 'Invalid regex pattern.',\n\n // MPIN errors.\n // MPIN_INVALID is deliberately shared by \"wrong MPIN\" and \"unknown handle\",\n // so a failed sign-in never reveals whether the credential handle was real.\n // MPIN_REVOKED is separate and is returned for any attempt against a\n // deactivated credential - it discloses nothing useful, since a dead\n // credential grants no capability, and it lets the client stop retrying.\n MPIN_INVALID: 'Invalid MPIN.',\n MPIN_LOCKED: 'MPIN sign-in is temporarily locked due to repeated failed attempts.',\n MPIN_REVOKED: 'MPIN sign-in has been disabled for this device. Please sign in normally.',\n MPIN_NOT_ENABLED: 'MPIN sign-in is not enabled.',\n MPIN_FORMAT_INVALID: 'MPIN does not meet the required format.',\n MPIN_TOO_PREDICTABLE: 'MPIN is too easy to guess. Avoid repeated or sequential digits.',\n MPIN_CREDENTIAL_NOT_FOUND: 'MPIN device credential not found.',\n\n PERMISSION_MESSAGES: {\n insertMany: (model?: string) =>\n `You do not have permission to import ${model ?? 'these'} records.`,\n } as Record<string, (model?: string) => string>,\n\n};\n"]}
|
|
1
|
+
{"version":3,"file":"error-messages.js","sourceRoot":"","sources":["../../src/constants/error-messages.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAG;IAE1B,cAAc,EAAE,sBAAsB;IACtC,eAAe,EAAE,gCAAgC;IACjD,aAAa,EAAE,mBAAmB;IAClC,eAAe,EAAE,sEAAsE;IACvF,kBAAkB,EAAE,0BAA0B;IAC9C,4BAA4B,EAAE,oCAAoC;IAClE,2BAA2B,EAAE,yCAAyC;IACtE,kCAAkC,EAAE,2CAA2C;IAC/E,6BAA6B,EAAE,iEAAiE;IAChG,6BAA6B,EAAE,gDAAgD;IAC/E,8BAA8B,EAAE,kDAAkD;IAClF,mBAAmB,EAAE,sCAAsC;IAC3D,0BAA0B,EAAE,6CAA6C;IACzE,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,kBAAkB;IAC/B,yBAAyB,EAAE,+CAA+C;IAC1E,kBAAkB,EAAE,8DAA8D;IAClF,gBAAgB,EAAE,yBAAyB;IAC3C,iBAAiB,EAAE,+BAA+B;IAClD,0BAA0B,EAAE,uCAAuC;IACnE,eAAe,EAAE,0BAA0B;IAC3C,0BAA0B,EAAE,4BAA4B;IACxD,qBAAqB,EAAE,uBAAuB;IAC9C,aAAa,EAAE,eAAe;IAC9B,oBAAoB,EAAE,sBAAsB;IAC5C,iCAAiC,EAAE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AAE,CAAC,iCAAiC,GAAG,EAAE;IAGlF,mCAAmC,EAAE,CAAC,EAAmB,EAAE,EAAE,CAAC,gCAAgC,EAAE,aAAa;IAC7G,gCAAgC,EAAE,kCAAkC;IAGpE,wBAAwB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,6BAA6B,QAAQ,EAAE;IAGvF,gCAAgC,EAAE,gEAAgE;IAClG,+BAA+B,EAAE,iFAAiF;IAClH,6BAA6B,EAAE,uCAAuC;IAEtE,4CAA4C,EAAE,wBAAwB;IAQtE,YAAY,EAAE,eAAe;IAC7B,WAAW,EAAE,qEAAqE;IAClF,YAAY,EAAE,0EAA0E;IACxF,gBAAgB,EAAE,8BAA8B;IAChD,mBAAmB,EAAE,yCAAyC;IAC9D,oBAAoB,EAAE,iEAAiE;IACvF,yBAAyB,EAAE,mCAAmC;IAE9D,mBAAmB,EAAE;QACrB,UAAU,EAAE,CAAC,KAAc,EAAE,EAAE,CAC7B,wCAAwC,KAAK,IAAI,OAAO,WAAW;KACtB;CAElD,CAAC","sourcesContent":["// backend/common/constants/error-messages.ts\n\nexport const ERROR_MESSAGES = {\n //authentication errors\n USER_NOT_FOUND: 'User does not exist.',\n USER_NOT_ACTIVE: 'User profile is not activated.',\n USER_INACTIVE: 'User is inactive.',\n ACCOUNT_BLOCKED: 'Your account has been blocked due to multiple failed login attempts.',\n PASSWORD_INCORRECT: 'Password does not match.',\n PUBLIC_REGISTRATION_DISABLED: 'Public registrations are disabled.',\n UNIQUE_CONSTRAINT_VIOLATION: 'A unique constraint violation occurred.',\n PASSWORDLESS_REGISTRATION_DISABLED: 'Passwordless registration is not enabled.',\n REGISTRATION_REQUIRES_CONTACT: 'Either mobile or email is required for initiating registration.',\n EMAIL_REQUIRED_FOR_VALIDATION: 'Email is required for email validation source.',\n MOBILE_REQUIRED_FOR_VALIDATION: 'Mobile is required for mobile validation source.',\n USER_ALREADY_EXISTS: 'User already exists. Please sign in.',\n VALIDATION_SOURCE_REQUIRED: 'At least one validation source is required.',\n INVALID_OTP: 'Invalid OTP.',\n OTP_EXPIRED: 'OTP has expired.',\n INVALID_VERIFICATION_TYPE: 'Invalid type. Must be either email or mobile.',\n NON_LOCAL_PROVIDER: 'User seems to have used a passwordless mode to authenticate.',\n USER_ID_MISMATCH: \"User ID's do not match.\",\n USERNAME_MISMATCH: \"User username's do not match.\",\n INCORRECT_CURRENT_PASSWORD: 'Incorrect current password specified.',\n PASSWORD_REUSED: 'Try a different password',\n INVALID_VERIFICATION_TOKEN: 'Invalid verification token',\n INVALID_REFRESH_TOKEN: 'Invalid refresh token',\n ACCESS_DENIED: 'Access denied',\n INVALID_USER_PROFILE: 'Invalid user profile',\n GOOGLE_OAUTH_PROFILE_FETCH_FAILED: 'Failed to fetch user profile from Google OAuth service',\n MICROSOFT_ACTIVE_DIRECTORY_OAUTH_PROFILE_FETCH_FAILED: 'Failed to fetch user profile from Microsoft Active Directory OAuth service',\n LOGOUT_FAILED: 'Logout failed due to an unexpected error.',\n\n INVALID_CREDENTIALS: 'Invalid credentials',\n LOGIN_FAILED: 'Login Failed',\n LOGIN_DENIED_BY_EXTENSION: 'Login was denied by an external verification check.',\n LOGIN_EXTENSION_UNAVAILABLE: 'An external verification check is temporarily unavailable. Please try again.',\n OLD_PASSWORD_INCORRECT: 'You have specified an incorrect old password.',\n INVALID_NEW_PASSWORD: 'Invalid new password.',\n PASSWORDS_DO_NOT_MATCH: 'New passwords are not matching.',\n\n // user management errors\n DELETE_SELF_NOT_ALLOWED: 'Deleting logged-in user is not allowed.',\n DELETE_IDS_REQUIRED: 'At least one ID is required for deletion.',\n USER_MISSING_ID: 'User must exist before initializing roles.',\n ROLES_NOT_FOUND: (roles: string[]) => `The following roles were not found: ${roles.join(', ')}`,\n USER_NOT_FOUND_BY_USERNAME: (username: string) => `User with username '${username}' not found.`,\n ROLE_NOT_FOUND: (roleName: string) => `Role '${roleName}' not found.`,\n PERMISSION_NOT_EXIST: (permission: string) => `Permission '${permission}' does not exist.`,\n\n // session errors\n SESSION_INVALID: 'Your session is no longer valid. Please log in again.',\n SESSION_EXPIRED: 'Your session has expired. Please log in again.',\n\n // filter errors\n GROUP_BY_LIMIT: 'buildFilterQuery: Only 1 Group by field is supported currently.',\n INVALID_GROUP_BY_COUNT: 'Exactly one groupBy field is required to count grouped records.',\n\n // general errors\n FORBIDDEN: 'Forbidden',\n RESOURCE_NOT_FOUND: 'The requested resource was not found.',\n\n\n // database errors\n DUPLICATE_ENTRY: 'Duplicate entry. A record with similar unique fields already exists.',\n\n // validation errors\n ID_REQUIRED_FOR_UPDATE: 'Id is required for update.',\n ID_REQUIRED_FOR_DELETE: 'Id is required for deletion.',\n\n // CRUD service errors\n RELATION_TYPE_NOT_SUPPORTED: 'Relation type not supported in CRUD service.',\n NO_SOFT_DELETED_RECORD_FOUND: 'No soft-deleted record found with the given ID.',\n CONFLICTING_RECORD_ON_UNARCHIVE: (conflictDetails = 'the same details') =>\n `A record with ${conflictDetails} already exists. Update or delete the active record before restoring this one.`,\n NO_SOFT_DELETED_RECORDS_FOUND: 'No matching soft-deleted records found.',\n EMPTY_PATH_PARTS: 'Path parts cannot be empty',\n\n\n // CSV/Excel service errors\n MISSING_HEADERS_OR_FUNCTION: 'Either headers or data records function must be provided.',\n INVALID_CHUNK_SIZE: 'Chunk size must be greater than 0 when data records function is provided.',\n INVALID_FORMAT: (format: string) => `Invalid ${format} format`,\n\n\n //field errors\n INVALID_INVERSE_FIELD_TYPE: 'Only relation fields can have inverse fields.',\n MODEL_AND_MODULE_REQUIRED_TO_UPDATE_INVERSE_FIELD: 'Model and module are required to update inverse field.',\n MODEL_NAME_AND_MODULE_NAME_REQUIRED_TO_CREATE_INVERSE_FIELD: 'Model name and module name are required to create inverse field.',\n FIELD_NOT_FOUND: (id: number | string) => `No field with id #${id} exists`,\n PROVIDER_NOT_FOUND: (provider: string) => `Field incorrectly configured. No provider with name ${provider} registered in backend.`,\n FILE_WRITE_FAILED: 'File creation failed, rolling back transaction',\n FILE_DELETE_FAILED: 'File deletion failed, rolling back transaction',\n // file service errors\n FILE_NOT_FOUND: 'File not found',\n FILE_COPY_ERROR: 'Error copying file',\n S3_CLIENT_NOT_INITIALIZED: 'S3 Client not initialized. Please check the S3 configuration.',\n\n // model errors\n MODEL_METADATA_NOT_FOUND: (id: string | number) => `Model metadata with ID ${id} not found.`,\n MODEL_SERVICE_NOT_FOUND: (model: string) => `Model service for ${model} not found.`,\n RELATION_CO_MODEL_NOT_DEFINED_FOR_FIELD: (fieldName: string) => `Relation coModelSingularName is not defined for relation field ${fieldName}`,\n MODEL_NOT_FOUND: (singularName?: string) => `Model${singularName ? ` with singular name \"${singularName}\"` : ''} not found.`,\n MODEL_REQUIRED_FOR_CODE_GENERATION: 'Model ID or Model Name is required for generating code.',\n\n //module errors\n MODULE_NOT_FOUND: (moduleName: string) => `Module with name ${moduleName} not found.`,\n MODULE_ID_NOT_FOUND: (id: string | number) => `Module with ID ${id} not found.`,\n\n //entity errors\n ENTITY_NOT_FOUND: (entity?: string | number) => `Entity${entity ? ' ' + entity : ''} not found.`,\n ENTITY_NAME_REQUIRED: 'Entity name is required to find the entity.',\n ENTITY_ID_REQUIRED: 'Entity ID is required to find the entity.',\n\n // import errors\n NO_ERROR_LOG_FOR_IMPORT: (id: string | number) => `No error log entries found for import transaction ID ${id}.`,\n FILE_READ_FAILED_FROM_URL: (url: string) => `Failed to read file from URL: ${url}`,\n\n // media storage provider errors\n MEDIA_STORAGE_PROVIDER_ID_NOT_FOUND: (id: number | string) => `Media Storage Provider with #${id} not found.`,\n MEDIA_STORAGE_PROVIDER_NOT_FOUND: 'Media Storage Provider not found',\n\n // SQL errors\n UNSUPPORTED_SQL_OPERATOR: (operator: string) => `Unsupported SQL operator: ${operator}`,\n\n // AI interaction errors\n PYTHON_EXECUTABLE_NOT_CONFIGURED: 'SolidX AI MCP python executable or client path not configured.',\n UNABLE_TO_RESOLVE_SOLID_COMMAND: 'Unable to resolve a solid_ command that was used to come up with this response.',\n UNABLE_TO_RESOLVE_MCP_HANDLER: 'Unable to resolve a mcp tool handler.',\n\n DEFAULT_REGEX_PATTERN_NOT_MATCHING_ERROR_MSG: 'Invalid regex pattern.',\n\n // MPIN errors.\n // MPIN_INVALID is deliberately shared by \"wrong MPIN\" and \"unknown handle\",\n // so a failed sign-in never reveals whether the credential handle was real.\n // MPIN_REVOKED is separate and is returned for any attempt against a\n // deactivated credential - it discloses nothing useful, since a dead\n // credential grants no capability, and it lets the client stop retrying.\n MPIN_INVALID: 'Invalid MPIN.',\n MPIN_LOCKED: 'MPIN sign-in is temporarily locked due to repeated failed attempts.',\n MPIN_REVOKED: 'MPIN sign-in has been disabled for this device. Please sign in normally.',\n MPIN_NOT_ENABLED: 'MPIN sign-in is not enabled.',\n MPIN_FORMAT_INVALID: 'MPIN does not meet the required format.',\n MPIN_TOO_PREDICTABLE: 'MPIN is too easy to guess. Avoid repeated or sequential digits.',\n MPIN_CREDENTIAL_NOT_FOUND: 'MPIN device credential not found.',\n\n PERMISSION_MESSAGES: {\n insertMany: (model?: string) =>\n `You do not have permission to import ${model ?? 'these'} records.`,\n } as Record<string, (model?: string) => string>,\n\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-embed.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/admin-embed.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKnC,qBACa,oBAAoB;IAG7B,GAAG,CAAQ,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAuBvC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AdminEmbedController = void 0;
|
|
16
|
+
const openapi = require("@nestjs/swagger");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const fs_1 = require("fs");
|
|
19
|
+
const path_1 = require("path");
|
|
20
|
+
const public_decorator_1 = require("../decorators/public.decorator");
|
|
21
|
+
let AdminEmbedController = class AdminEmbedController {
|
|
22
|
+
sdk(response) {
|
|
23
|
+
let embedUrl;
|
|
24
|
+
try {
|
|
25
|
+
const ui = new URL(process.env.ADMIN_EMBED_UI_URL || process.env.AGENT_EMBED_UI_URL || '');
|
|
26
|
+
if (!['http:', 'https:'].includes(ui.protocol) || ui.username || ui.password || ui.search || ui.hash) {
|
|
27
|
+
throw new Error('Invalid admin embed UI URL');
|
|
28
|
+
}
|
|
29
|
+
ui.pathname = `${ui.pathname.replace(/\/$/, '')}/embed/admin`;
|
|
30
|
+
embedUrl = ui;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
response.status(503).type('text/plain').send('Admin embed UI is not configured.');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const packaged = (0, path_1.resolve)(__dirname, '../resources/admin-embed/solid-admin-embed.js');
|
|
37
|
+
const source = (0, path_1.resolve)(__dirname, '../../resources/admin-embed/solid-admin-embed.js');
|
|
38
|
+
const sdk = (0, fs_1.readFileSync)((0, fs_1.existsSync)(packaged) ? packaged : source, 'utf8');
|
|
39
|
+
response.type('application/javascript');
|
|
40
|
+
response.setHeader('Cache-Control', 'no-cache');
|
|
41
|
+
response.setHeader('Cross-Origin-Resource-Policy', 'cross-origin');
|
|
42
|
+
response.send(sdk.replace('__SOLIDX_ADMIN_EMBED_UI_URL__', () => JSON.stringify(embedUrl.href)));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.AdminEmbedController = AdminEmbedController;
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, public_decorator_1.Public)(),
|
|
48
|
+
(0, common_1.Get)('sdk.js'),
|
|
49
|
+
openapi.ApiResponse({ status: 200 }),
|
|
50
|
+
__param(0, (0, common_1.Res)()),
|
|
51
|
+
__metadata("design:type", Function),
|
|
52
|
+
__metadata("design:paramtypes", [Object]),
|
|
53
|
+
__metadata("design:returntype", void 0)
|
|
54
|
+
], AdminEmbedController.prototype, "sdk", null);
|
|
55
|
+
exports.AdminEmbedController = AdminEmbedController = __decorate([
|
|
56
|
+
(0, common_1.Controller)('admin-embed')
|
|
57
|
+
], AdminEmbedController);
|
|
58
|
+
//# sourceMappingURL=admin-embed.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-embed.controller.js","sourceRoot":"","sources":["../../src/controllers/admin-embed.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAsD;AAEtD,2BAA8C;AAC9C,+BAA+B;AAC/B,qEAAwD;AAGjD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAG7B,GAAG,CAAQ,QAAkB;QACzB,IAAI,QAAa,CAAC;QAClB,IAAI,CAAC;YAED,MAAM,EAAE,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC;YAC3F,IAAI,CAAC,CAAC,OAAO,EAAE,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M,GAAE;IACR,IAAA,YAAG,EAAC,QAAQ,CAAC;;IACT,WAAA,IAAA,YAAG,GAAE,CAAA;;;;+CAsBT;+BAzBQ,oBAAoB;IADhC,IAAA,mBAAU,EAAC,aAAa,CAAC;GACb,oBAAoB,CA0BhC","sourcesContent":["import { Controller, Get, Res } from '@nestjs/common';\nimport { Response } from 'express';\nimport { existsSync, readFileSync } from 'fs';\nimport { resolve } from 'path';\nimport { Public } from '../decorators/public.decorator';\n\n@Controller('admin-embed')\nexport class AdminEmbedController {\n @Public()\n @Get('sdk.js')\n sdk(@Res() response: Response): void {\n let embedUrl: URL;\n try {\n // Falls back to the agent embed's UI URL: both point at the same hosted SolidX UI.\n const ui = new URL(process.env.ADMIN_EMBED_UI_URL || process.env.AGENT_EMBED_UI_URL || '');\n if (!['http:', 'https:'].includes(ui.protocol) || ui.username || ui.password || ui.search || ui.hash) {\n throw new Error('Invalid admin embed UI URL');\n }\n ui.pathname = `${ui.pathname.replace(/\\/$/, '')}/embed/admin`;\n embedUrl = ui;\n } catch {\n response.status(503).type('text/plain').send('Admin embed UI is not configured.');\n return;\n }\n\n const packaged = resolve(__dirname, '../resources/admin-embed/solid-admin-embed.js');\n const source = resolve(__dirname, '../../resources/admin-embed/solid-admin-embed.js');\n const sdk = readFileSync(existsSync(packaged) ? packaged : source, 'utf8');\n response.type('application/javascript');\n response.setHeader('Cache-Control', 'no-cache');\n response.setHeader('Cross-Origin-Resource-Policy', 'cross-origin');\n response.send(sdk.replace('__SOLIDX_ADMIN_EMBED_UI_URL__', () => JSON.stringify(embedUrl.href)));\n }\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import { AgentRegistryService } from '../services/agent-registry.service';
|
|
|
2
2
|
import { CreateAgentRegistryDto } from '../dtos/create-agent-registry.dto';
|
|
3
3
|
import { UpdateAgentRegistryDto } from '../dtos/update-agent-registry.dto';
|
|
4
4
|
import { ActivateAgentRegistryDto } from '../dtos/activate-agent-registry.dto';
|
|
5
|
+
import { UpdateAgentDeploymentDto } from '../dtos/update-agent-deployment.dto';
|
|
5
6
|
export declare class AgentRegistryController {
|
|
6
7
|
private readonly service;
|
|
7
8
|
constructor(service: AgentRegistryService);
|
|
@@ -9,6 +10,7 @@ export declare class AgentRegistryController {
|
|
|
9
10
|
insertMany(createDtos: CreateAgentRegistryDto[], filesArray?: Express.Multer.File[][]): Promise<import("..").AgentRegistry[]>;
|
|
10
11
|
update(id: number, updateDto: UpdateAgentRegistryDto, files: Array<Express.Multer.File>): Promise<import("..").AgentRegistry>;
|
|
11
12
|
partialUpdate(id: number, updateDto: UpdateAgentRegistryDto, files: Array<Express.Multer.File>): Promise<import("..").AgentRegistry>;
|
|
13
|
+
updateDeployment(id: number, dto: UpdateAgentDeploymentDto): Promise<import("..").AgentRegistry>;
|
|
12
14
|
activate(id: number, dto: ActivateAgentRegistryDto): Promise<import("..").AgentRegistry>;
|
|
13
15
|
recoverMany(ids: number[]): Promise<{
|
|
14
16
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-registry.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/agent-registry.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAG/E,qBAEa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,oBAAoB;IAK1D,MAAM,CAAS,SAAS,EAAE,sBAAsB,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAOpG,UAAU,CAAS,UAAU,EAAE,sBAAsB,EAAE,EAAmB,UAAU,GAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,EAAO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OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,EAAO;IAQlH,MAAM,CAAc,EAAE,EAAE,MAAM,EAAU,SAAS,EAAE,sBAAsB,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAO7H,aAAa,CAAc,EAAE,EAAE,MAAM,EAAU,SAAS,EAAE,sBAAsB,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAMpI,gBAAgB,CAA4B,EAAE,EAAE,MAAM,EAAU,GAAG,EAAE,wBAAwB;IAM7F,QAAQ,CAAc,EAAE,EAAE,MAAM,EAAU,GAAG,EAAE,wBAAwB;IAMjE,WAAW,CAAS,GAAG,EAAE,MAAM,EAAE;;;;IAMjC,OAAO,CAAc,EAAE,EAAE,MAAM;;;;IAgB/B,QAAQ,CAAU,KAAK,EAAE,GAAG;IAM5B,OAAO,CAAc,EAAE,EAAE,MAAM,EAAW,KAAK,EAAE,GAAG;IAMpD,UAAU,CAAS,GAAG,EAAE,MAAM,EAAE;IAMhC,MAAM,CAAc,EAAE,EAAE,MAAM;CAMrC"}
|
|
@@ -21,6 +21,7 @@ const agent_registry_service_1 = require("../services/agent-registry.service");
|
|
|
21
21
|
const create_agent_registry_dto_1 = require("../dtos/create-agent-registry.dto");
|
|
22
22
|
const update_agent_registry_dto_1 = require("../dtos/update-agent-registry.dto");
|
|
23
23
|
const activate_agent_registry_dto_1 = require("../dtos/activate-agent-registry.dto");
|
|
24
|
+
const update_agent_deployment_dto_1 = require("../dtos/update-agent-deployment.dto");
|
|
24
25
|
const show_soft_deleted_enum_1 = require("../enums/show-soft-deleted.enum");
|
|
25
26
|
let AgentRegistryController = class AgentRegistryController {
|
|
26
27
|
constructor(service) {
|
|
@@ -38,6 +39,9 @@ let AgentRegistryController = class AgentRegistryController {
|
|
|
38
39
|
partialUpdate(id, updateDto, files) {
|
|
39
40
|
return this.service.update(id, updateDto, files, true);
|
|
40
41
|
}
|
|
42
|
+
updateDeployment(id, dto) {
|
|
43
|
+
return this.service.updateDeployment(id, dto);
|
|
44
|
+
}
|
|
41
45
|
activate(id, dto) {
|
|
42
46
|
return this.service.activate(id, dto);
|
|
43
47
|
}
|
|
@@ -107,6 +111,16 @@ __decorate([
|
|
|
107
111
|
__metadata("design:paramtypes", [Number, update_agent_registry_dto_1.UpdateAgentRegistryDto, Array]),
|
|
108
112
|
__metadata("design:returntype", void 0)
|
|
109
113
|
], AgentRegistryController.prototype, "partialUpdate", null);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, swagger_1.ApiBearerAuth)("jwt"),
|
|
116
|
+
(0, common_1.Patch)(':id/deployment'),
|
|
117
|
+
openapi.ApiResponse({ status: 200, type: require("../entities/agent-registry.entity").AgentRegistry }),
|
|
118
|
+
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
119
|
+
__param(1, (0, common_1.Body)()),
|
|
120
|
+
__metadata("design:type", Function),
|
|
121
|
+
__metadata("design:paramtypes", [Number, update_agent_deployment_dto_1.UpdateAgentDeploymentDto]),
|
|
122
|
+
__metadata("design:returntype", void 0)
|
|
123
|
+
], AgentRegistryController.prototype, "updateDeployment", null);
|
|
110
124
|
__decorate([
|
|
111
125
|
(0, swagger_1.ApiBearerAuth)("jwt"),
|
|
112
126
|
(0, common_1.Post)(':id/activate'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-registry.controller.js","sourceRoot":"","sources":["../../src/controllers/agent-registry.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"agent-registry.controller.js","sourceRoot":"","sources":["../../src/controllers/agent-registry.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA6I;AAC7I,+DAA+D;AAC/D,6CAAmE;AACnE,+EAA0E;AAC1E,iFAA2E;AAC3E,iFAA2E;AAC3E,qFAA+E;AAC/E,qFAA+E;AAC/E,4EAAkE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AAC;IACpB,IAAA,eAAM,EAAC,KAAK,CAAC;;IACA,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;qDAExB;kCAxFU,uBAAuB;IAFnC,IAAA,iBAAO,EAAC,WAAW,CAAC;IACpB,IAAA,mBAAU,EAAC,gBAAgB,CAAC;qCAEW,6CAAoB;GAD/C,uBAAuB,CA4FnC","sourcesContent":["import { Controller, Post, Body, Param, UploadedFiles, UseInterceptors, Put, Get, Query, Delete, Patch, ParseIntPipe } from '@nestjs/common';\nimport { AnyFilesInterceptor } from \"@nestjs/platform-express\";\nimport { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';\nimport { AgentRegistryService } from '../services/agent-registry.service';\nimport { CreateAgentRegistryDto } from '../dtos/create-agent-registry.dto';\nimport { UpdateAgentRegistryDto } from '../dtos/update-agent-registry.dto';\nimport { ActivateAgentRegistryDto } from '../dtos/activate-agent-registry.dto';\nimport { UpdateAgentDeploymentDto } from '../dtos/update-agent-deployment.dto';\nimport { ShowSoftDeleted } from '../enums/show-soft-deleted.enum';\n\n@ApiTags('Agent Hub')\n@Controller('agent-registry')\nexport class AgentRegistryController {\n constructor(private readonly service: AgentRegistryService) {}\n\n @ApiBearerAuth(\"jwt\")\n @Post()\n @UseInterceptors(AnyFilesInterceptor())\n create(@Body() createDto: CreateAgentRegistryDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.create(createDto, files);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('/bulk')\n @UseInterceptors(AnyFilesInterceptor())\n insertMany(@Body() createDtos: CreateAgentRegistryDto[], @UploadedFiles() filesArray: Express.Multer.File[][] = []) {\n return this.service.insertMany(createDtos, filesArray);\n }\n\n\n @ApiBearerAuth(\"jwt\")\n @Put(':id')\n @UseInterceptors(AnyFilesInterceptor())\n update(@Param('id') id: number, @Body() updateDto: UpdateAgentRegistryDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, updateDto, files);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Patch(':id')\n @UseInterceptors(AnyFilesInterceptor())\n partialUpdate(@Param('id') id: number, @Body() updateDto: UpdateAgentRegistryDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, updateDto, files, true);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Patch(':id/deployment')\n updateDeployment(@Param('id', ParseIntPipe) id: number, @Body() dto: UpdateAgentDeploymentDto) {\n return this.service.updateDeployment(id, dto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post(':id/activate')\n activate(@Param('id') id: number, @Body() dto: ActivateAgentRegistryDto) {\n return this.service.activate(id, dto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('/bulk-recover')\n async recoverMany(@Body() ids: number[]) {\n return this.service.recoverMany(ids);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get('/recover/:id')\n async recover(@Param('id') id: number) {\n return this.service.recover(id);\n }\n \n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'showSoftDeleted', required: false, enum: ShowSoftDeleted })\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array }) \n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n\n @Get()\n async findMany(@Query() query: any) { \n return this.service.find(query); \n }\n\n @ApiBearerAuth(\"jwt\")\n @Get(':id')\n async findOne(@Param('id') id: string, @Query() query: any) {\n return this.service.findOne(+id, query);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Delete('/bulk')\n async deleteMany(@Body() ids: number[]) {\n return this.service.deleteMany(ids);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Delete(':id')\n async delete(@Param('id') id: number) {\n return this.service.delete(id);\n }\n\n\n\n}\n"]}
|
|
@@ -2,9 +2,16 @@ import { AgentSessionService } from '../services/agent-session.service';
|
|
|
2
2
|
import { CreateAgentSessionDto } from '../dtos/create-agent-session.dto';
|
|
3
3
|
import { UpdateAgentSessionDto } from '../dtos/update-agent-session.dto';
|
|
4
4
|
import { ActiveUserData } from '../interfaces/active-user-data.interface';
|
|
5
|
+
import { AgentHubProcessManagerService } from '../services/agent-hub-process-manager.service';
|
|
5
6
|
export declare class AgentSessionController {
|
|
6
7
|
private readonly service;
|
|
7
|
-
|
|
8
|
+
private readonly manager;
|
|
9
|
+
constructor(service: AgentSessionService, manager: AgentHubProcessManagerService);
|
|
10
|
+
private bearer;
|
|
11
|
+
listInbox(authorization: string, review: string, offset: string, limit: string, agent: string, status: string, trigger: string, runtime: string, startedFrom: string, startedTo: string, search: string, sort: string): Promise<unknown>;
|
|
12
|
+
getInboxRun(authorization: string, sessionId: string): Promise<unknown>;
|
|
13
|
+
connectInboxRun(authorization: string, sessionId: string): Promise<unknown>;
|
|
14
|
+
answerInboxRun(authorization: string, sessionId: string, requestId: number, answer: unknown): Promise<unknown>;
|
|
8
15
|
create(createDto: CreateAgentSessionDto, files: Array<Express.Multer.File>): Promise<import("..").AgentSession>;
|
|
9
16
|
insertMany(createDtos: CreateAgentSessionDto[], filesArray?: Express.Multer.File[][]): Promise<import("..").AgentSession[]>;
|
|
10
17
|
update(id: number, updateDto: UpdateAgentSessionDto, files: Array<Express.Multer.File>): Promise<import("..").AgentSession>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-session.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/agent-session.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,OAAO,EAAE,cAAc,EAAE,MAAM,0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UAAU,EAAE,qBAAqB,EAAE,EAAmB,UAAU,GAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,EAAO;IAQjH,MAAM,CAAc,EAAE,EAAE,MAAM,EAAU,SAAS,EAAE,qBAAqB,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAO5H,aAAa,CAAc,EAAE,EAAE,MAAM,EAAU,SAAS,EAAE,qBAAqB,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAM7H,WAAW,CAAS,GAAG,EAAE,MAAM,EAAE;;;;IAMjC,OAAO,CAAc,EAAE,EAAE,MAAM;;;;IAgB/B,QAAQ,CAAU,KAAK,EAAE,GAAG;IAQ5B,QAAQ,CACe,EAAE,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,EACP,QAAQ,EAAE,MAAM,EACtB,UAAU,EAAE,cAAc;;;;;;;;;;;;;;;;;IAOpC,OAAO,CAAc,EAAE,EAAE,MAAM,EAAW,KAAK,EAAE,GAAG;IAMpD,UAAU,CAAS,GAAG,EAAE,MAAM,EAAE;IAMhC,MAAM,CAAc,EAAE,EAAE,MAAM;CAMrC"}
|
|
@@ -22,9 +22,42 @@ const create_agent_session_dto_1 = require("../dtos/create-agent-session.dto");
|
|
|
22
22
|
const update_agent_session_dto_1 = require("../dtos/update-agent-session.dto");
|
|
23
23
|
const show_soft_deleted_enum_1 = require("../enums/show-soft-deleted.enum");
|
|
24
24
|
const active_user_decorator_1 = require("../decorators/active-user.decorator");
|
|
25
|
+
const agent_hub_process_manager_service_1 = require("../services/agent-hub-process-manager.service");
|
|
25
26
|
let AgentSessionController = class AgentSessionController {
|
|
26
|
-
constructor(service) {
|
|
27
|
+
constructor(service, manager) {
|
|
27
28
|
this.service = service;
|
|
29
|
+
this.manager = manager;
|
|
30
|
+
}
|
|
31
|
+
bearer(authorization) {
|
|
32
|
+
if (!authorization?.startsWith('Bearer '))
|
|
33
|
+
throw new common_1.UnauthorizedException();
|
|
34
|
+
return authorization;
|
|
35
|
+
}
|
|
36
|
+
listInbox(authorization, review, offset, limit, agent, status, trigger, runtime, startedFrom, startedTo, search, sort) {
|
|
37
|
+
const start = Number(offset);
|
|
38
|
+
const pageSize = Number(limit);
|
|
39
|
+
return this.manager.listJobSessions(this.bearer(authorization), {
|
|
40
|
+
review: review === 'true',
|
|
41
|
+
offset: Number.isSafeInteger(start) && start > 0 ? start : 0,
|
|
42
|
+
limit: Number.isSafeInteger(pageSize) && pageSize > 0 ? Math.min(pageSize, 100) : 25,
|
|
43
|
+
agent: agent?.trim() || undefined,
|
|
44
|
+
status: status?.trim() || undefined,
|
|
45
|
+
trigger: trigger?.trim() || undefined,
|
|
46
|
+
runtime: runtime?.trim() || undefined,
|
|
47
|
+
startedFrom: startedFrom?.trim() || undefined,
|
|
48
|
+
startedTo: startedTo?.trim() || undefined,
|
|
49
|
+
search: search?.trim() || undefined,
|
|
50
|
+
sort: sort?.trim() || undefined,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
getInboxRun(authorization, sessionId) {
|
|
54
|
+
return this.manager.getJobSession(this.bearer(authorization), sessionId);
|
|
55
|
+
}
|
|
56
|
+
connectInboxRun(authorization, sessionId) {
|
|
57
|
+
return this.manager.connectJobSession(this.bearer(authorization), sessionId);
|
|
58
|
+
}
|
|
59
|
+
answerInboxRun(authorization, sessionId, requestId, answer) {
|
|
60
|
+
return this.manager.answerJobSession(this.bearer(authorization), sessionId, requestId, answer);
|
|
28
61
|
}
|
|
29
62
|
create(createDto, files) {
|
|
30
63
|
return this.service.create(createDto, files);
|
|
@@ -61,6 +94,59 @@ let AgentSessionController = class AgentSessionController {
|
|
|
61
94
|
}
|
|
62
95
|
};
|
|
63
96
|
exports.AgentSessionController = AgentSessionController;
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
99
|
+
(0, common_1.Get)('inbox'),
|
|
100
|
+
openapi.ApiResponse({ status: 200, type: Object }),
|
|
101
|
+
__param(0, (0, common_1.Headers)('authorization')),
|
|
102
|
+
__param(1, (0, common_1.Query)('review')),
|
|
103
|
+
__param(2, (0, common_1.Query)('offset')),
|
|
104
|
+
__param(3, (0, common_1.Query)('limit')),
|
|
105
|
+
__param(4, (0, common_1.Query)('agent')),
|
|
106
|
+
__param(5, (0, common_1.Query)('status')),
|
|
107
|
+
__param(6, (0, common_1.Query)('trigger')),
|
|
108
|
+
__param(7, (0, common_1.Query)('runtime')),
|
|
109
|
+
__param(8, (0, common_1.Query)('startedFrom')),
|
|
110
|
+
__param(9, (0, common_1.Query)('startedTo')),
|
|
111
|
+
__param(10, (0, common_1.Query)('q')),
|
|
112
|
+
__param(11, (0, common_1.Query)('sort')),
|
|
113
|
+
__metadata("design:type", Function),
|
|
114
|
+
__metadata("design:paramtypes", [String, String, String, String, String, String, String, String, String, String, String, String]),
|
|
115
|
+
__metadata("design:returntype", void 0)
|
|
116
|
+
], AgentSessionController.prototype, "listInbox", null);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
119
|
+
(0, common_1.Get)('inbox/:sessionId'),
|
|
120
|
+
openapi.ApiResponse({ status: 200, type: Object }),
|
|
121
|
+
__param(0, (0, common_1.Headers)('authorization')),
|
|
122
|
+
__param(1, (0, common_1.Param)('sessionId')),
|
|
123
|
+
__metadata("design:type", Function),
|
|
124
|
+
__metadata("design:paramtypes", [String, String]),
|
|
125
|
+
__metadata("design:returntype", void 0)
|
|
126
|
+
], AgentSessionController.prototype, "getInboxRun", null);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
129
|
+
(0, common_1.Header)('Cache-Control', 'no-store'),
|
|
130
|
+
(0, common_1.Post)('inbox/:sessionId/connect'),
|
|
131
|
+
openapi.ApiResponse({ status: 201, type: Object }),
|
|
132
|
+
__param(0, (0, common_1.Headers)('authorization')),
|
|
133
|
+
__param(1, (0, common_1.Param)('sessionId')),
|
|
134
|
+
__metadata("design:type", Function),
|
|
135
|
+
__metadata("design:paramtypes", [String, String]),
|
|
136
|
+
__metadata("design:returntype", void 0)
|
|
137
|
+
], AgentSessionController.prototype, "connectInboxRun", null);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
140
|
+
(0, common_1.Post)('inbox/:sessionId/requests/:requestId/answer'),
|
|
141
|
+
openapi.ApiResponse({ status: 201, type: Object }),
|
|
142
|
+
__param(0, (0, common_1.Headers)('authorization')),
|
|
143
|
+
__param(1, (0, common_1.Param)('sessionId')),
|
|
144
|
+
__param(2, (0, common_1.Param)('requestId', common_1.ParseIntPipe)),
|
|
145
|
+
__param(3, (0, common_1.Body)()),
|
|
146
|
+
__metadata("design:type", Function),
|
|
147
|
+
__metadata("design:paramtypes", [String, String, Number, Object]),
|
|
148
|
+
__metadata("design:returntype", void 0)
|
|
149
|
+
], AgentSessionController.prototype, "answerInboxRun", null);
|
|
64
150
|
__decorate([
|
|
65
151
|
(0, swagger_1.ApiBearerAuth)("jwt"),
|
|
66
152
|
(0, common_1.Post)(),
|
|
@@ -188,6 +274,6 @@ __decorate([
|
|
|
188
274
|
exports.AgentSessionController = AgentSessionController = __decorate([
|
|
189
275
|
(0, swagger_1.ApiTags)('Agent Hub'),
|
|
190
276
|
(0, common_1.Controller)('agent-session'),
|
|
191
|
-
__metadata("design:paramtypes", [agent_session_service_1.AgentSessionService])
|
|
277
|
+
__metadata("design:paramtypes", [agent_session_service_1.AgentSessionService, agent_hub_process_manager_service_1.AgentHubProcessManagerService])
|
|
192
278
|
], AgentSessionController);
|
|
193
279
|
//# sourceMappingURL=agent-session.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-session.controller.js","sourceRoot":"","sources":["../../src/controllers/agent-session.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA6I;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A;IAAc,WAAA,IAAA,cAAK,GAAE,CAAA;;;;qDAE9C;AAIK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,eAAM,EAAC,OAAO,CAAC;;IACE,WAAA,IAAA,aAAI,GAAE,CAAA;;;;wDAEvB;AAIK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,eAAM,EAAC,KAAK,CAAC;;IACA,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;oDAExB;iCAzFU,sBAAsB;IAFlC,IAAA,iBAAO,EAAC,WAAW,CAAC;IACpB,IAAA,mBAAU,EAAC,eAAe,CAAC;qCAEY,2CAAmB;GAD9C,sBAAsB,CA6FlC","sourcesContent":["import { Controller, Post, Body, Param, UploadedFiles, UseInterceptors, Put, Get, Query, Delete, Patch, ParseIntPipe } from '@nestjs/common';\nimport { AnyFilesInterceptor } from \"@nestjs/platform-express\";\nimport { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';\nimport { AgentSessionService } from '../services/agent-session.service';\nimport { CreateAgentSessionDto } from '../dtos/create-agent-session.dto';\nimport { UpdateAgentSessionDto } from '../dtos/update-agent-session.dto';\nimport { ShowSoftDeleted } from '../enums/show-soft-deleted.enum';\nimport { ActiveUser } from '../decorators/active-user.decorator';\nimport { ActiveUserData } from '../interfaces/active-user-data.interface';\n\n@ApiTags('Agent Hub')\n@Controller('agent-session')\nexport class AgentSessionController {\n constructor(private readonly service: AgentSessionService) {}\n\n @ApiBearerAuth(\"jwt\")\n @Post()\n @UseInterceptors(AnyFilesInterceptor())\n create(@Body() createDto: CreateAgentSessionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.create(createDto, files);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('/bulk')\n @UseInterceptors(AnyFilesInterceptor())\n insertMany(@Body() createDtos: CreateAgentSessionDto[], @UploadedFiles() filesArray: Express.Multer.File[][] = []) {\n return this.service.insertMany(createDtos, filesArray);\n }\n\n\n @ApiBearerAuth(\"jwt\")\n @Put(':id')\n @UseInterceptors(AnyFilesInterceptor())\n update(@Param('id') id: number, @Body() updateDto: UpdateAgentSessionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, updateDto, files);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Patch(':id')\n @UseInterceptors(AnyFilesInterceptor())\n partialUpdate(@Param('id') id: number, @Body() updateDto: UpdateAgentSessionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, updateDto, files, true);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('/bulk-recover')\n async recoverMany(@Body() ids: number[]) {\n return this.service.recoverMany(ids);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get('/recover/:id')\n async recover(@Param('id') id: number) {\n return this.service.recover(id);\n }\n \n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'showSoftDeleted', required: false, enum: ShowSoftDeleted })\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array }) \n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n\n @Get()\n async findMany(@Query() query: any) { \n return this.service.find(query); \n }\n\n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'page', required: false, type: Number })\n @ApiQuery({ name: 'page_size', required: false, type: Number })\n @Get(':id/messages')\n async messages(\n @Param('id', ParseIntPipe) id: number,\n @Query('page') page: string,\n @Query('page_size') pageSize: string,\n @ActiveUser() activeUser: ActiveUserData,\n ) {\n return this.service.getMessages(id, Number(page) || 1, Number(pageSize) || 50, activeUser);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get(':id')\n async findOne(@Param('id') id: string, @Query() query: any) {\n return this.service.findOne(+id, query);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Delete('/bulk')\n async deleteMany(@Body() ids: number[]) {\n return this.service.deleteMany(ids);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Delete(':id')\n async delete(@Param('id') id: number) {\n return this.service.delete(id);\n }\n\n\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"agent-session.controller.js","sourceRoot":"","sources":["../../src/controllers/agent-session.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAqL;AACrL,+DAA+D;AAC/D,6CAAmE;AACnE,6EAAwE;AACxE,+EAAyE;AACzE,+EAAyE;AACzE,4EAAkE;AAClE,+EAAiE;AAEjE,qGAA8F;AAIvF,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAA6B,OAA4B,EAAmB,OAAsC;QAArF,YAAO,GAAP,OAAO,CAAqB;QAAmB,YAAO,GAAP,OAAO,CAA+B;IAAG,CAAC;IAE9G,MAAM,CAAC,aAAsB;QACnC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,SAAS,CAAC;YAAE,MAAM,IAAI,8BAAqB,EAAE,CAAC;QAC7E,OAAO,aAAa,CAAC;IACvB,CAAC;IAID,SAAS,CAA2B,aAAqB,EAAmB,MAAc,EAC/D,MAAc,EAAkB,KAAa,EAC9C,KAAa,EAAmB,MAAc,EAC5C,OAAe,EAAoB,OAAe,EAC9C,WAAmB,EAAsB,SAAiB,EACpE,MAAc,EAAiB,IAAY;QAC/D,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;YAC9D,MAAM,EAAE,MAAM,KAAK,MAAM;YACzB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KA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AE,CAAA;;;;qDAE9C;AAIK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,eAAM,EAAC,OAAO,CAAC;;IACE,WAAA,IAAA,aAAI,GAAE,CAAA;;;;wDAEvB;AAIK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,eAAM,EAAC,KAAK,CAAC;;IACA,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;oDAExB;iCA3IU,sBAAsB;IAFlC,IAAA,iBAAO,EAAC,WAAW,CAAC;IACpB,IAAA,mBAAU,EAAC,eAAe,CAAC;qCAEY,2CAAmB,EAA4B,iEAA6B;GADvG,sBAAsB,CA+IlC","sourcesContent":["import { Controller, Post, Body, Param, UploadedFiles, UseInterceptors, Put, Get, Query, Delete, Patch, ParseIntPipe, Headers, UnauthorizedException, Header } from '@nestjs/common';\nimport { AnyFilesInterceptor } from \"@nestjs/platform-express\";\nimport { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';\nimport { AgentSessionService } from '../services/agent-session.service';\nimport { CreateAgentSessionDto } from '../dtos/create-agent-session.dto';\nimport { UpdateAgentSessionDto } from '../dtos/update-agent-session.dto';\nimport { ShowSoftDeleted } from '../enums/show-soft-deleted.enum';\nimport { ActiveUser } from '../decorators/active-user.decorator';\nimport { ActiveUserData } from '../interfaces/active-user-data.interface';\nimport { AgentHubProcessManagerService } from '../services/agent-hub-process-manager.service';\n\n@ApiTags('Agent Hub')\n@Controller('agent-session')\nexport class AgentSessionController {\n constructor(private readonly service: AgentSessionService, private readonly manager: AgentHubProcessManagerService) {}\n\n private bearer(authorization?: string) {\n if (!authorization?.startsWith('Bearer ')) throw new UnauthorizedException();\n return authorization;\n }\n\n @ApiBearerAuth('jwt')\n @Get('inbox')\n listInbox(@Headers('authorization') authorization: string, @Query('review') review: string,\n @Query('offset') offset: string, @Query('limit') limit: string,\n @Query('agent') agent: string, @Query('status') status: string,\n @Query('trigger') trigger: string, @Query('runtime') runtime: string,\n @Query('startedFrom') startedFrom: string, @Query('startedTo') startedTo: string,\n @Query('q') search: string, @Query('sort') sort: string) {\n const start = Number(offset);\n const pageSize = Number(limit);\n return this.manager.listJobSessions(this.bearer(authorization), {\n review: review === 'true',\n offset: Number.isSafeInteger(start) && start > 0 ? start : 0,\n limit: Number.isSafeInteger(pageSize) && pageSize > 0 ? Math.min(pageSize, 100) : 25,\n agent: agent?.trim() || undefined,\n status: status?.trim() || undefined,\n trigger: trigger?.trim() || undefined,\n runtime: runtime?.trim() || undefined,\n startedFrom: startedFrom?.trim() || undefined,\n startedTo: startedTo?.trim() || undefined,\n search: search?.trim() || undefined,\n sort: sort?.trim() || undefined,\n });\n }\n\n @ApiBearerAuth('jwt')\n @Get('inbox/:sessionId')\n getInboxRun(@Headers('authorization') authorization: string, @Param('sessionId') sessionId: string) {\n return this.manager.getJobSession(this.bearer(authorization), sessionId);\n }\n\n @ApiBearerAuth('jwt')\n @Header('Cache-Control', 'no-store')\n @Post('inbox/:sessionId/connect')\n connectInboxRun(@Headers('authorization') authorization: string, @Param('sessionId') sessionId: string) {\n return this.manager.connectJobSession(this.bearer(authorization), sessionId);\n }\n\n @ApiBearerAuth('jwt')\n @Post('inbox/:sessionId/requests/:requestId/answer')\n answerInboxRun(@Headers('authorization') authorization: string, @Param('sessionId') sessionId: string,\n @Param('requestId', ParseIntPipe) requestId: number, @Body() answer: unknown) {\n return this.manager.answerJobSession(this.bearer(authorization), sessionId, requestId, answer);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post()\n @UseInterceptors(AnyFilesInterceptor())\n create(@Body() createDto: CreateAgentSessionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.create(createDto, files);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('/bulk')\n @UseInterceptors(AnyFilesInterceptor())\n insertMany(@Body() createDtos: CreateAgentSessionDto[], @UploadedFiles() filesArray: Express.Multer.File[][] = []) {\n return this.service.insertMany(createDtos, filesArray);\n }\n\n\n @ApiBearerAuth(\"jwt\")\n @Put(':id')\n @UseInterceptors(AnyFilesInterceptor())\n update(@Param('id') id: number, @Body() updateDto: UpdateAgentSessionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, updateDto, files);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Patch(':id')\n @UseInterceptors(AnyFilesInterceptor())\n partialUpdate(@Param('id') id: number, @Body() updateDto: UpdateAgentSessionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, updateDto, files, true);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('/bulk-recover')\n async recoverMany(@Body() ids: number[]) {\n return this.service.recoverMany(ids);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get('/recover/:id')\n async recover(@Param('id') id: number) {\n return this.service.recover(id);\n }\n \n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'showSoftDeleted', required: false, enum: ShowSoftDeleted })\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array }) \n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n\n @Get()\n async findMany(@Query() query: any) { \n return this.service.find(query); \n }\n\n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'page', required: false, type: Number })\n @ApiQuery({ name: 'page_size', required: false, type: Number })\n @Get(':id/messages')\n async messages(\n @Param('id', ParseIntPipe) id: number,\n @Query('page') page: string,\n @Query('page_size') pageSize: string,\n @ActiveUser() activeUser: ActiveUserData,\n ) {\n return this.service.getMessages(id, Number(page) || 1, Number(pageSize) || 50, activeUser);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get(':id')\n async findOne(@Param('id') id: string, @Query() query: any) {\n return this.service.findOne(+id, query);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Delete('/bulk')\n async deleteMany(@Body() ids: number[]) {\n return this.service.deleteMany(ids);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Delete(':id')\n async delete(@Param('id') id: number) {\n return this.service.delete(id);\n }\n\n\n\n}\n"]}
|
|
@@ -17,6 +17,7 @@ export declare class AuthenticationController {
|
|
|
17
17
|
private readonly apiKeyService;
|
|
18
18
|
private readonly logger;
|
|
19
19
|
constructor(authService: AuthenticationService, apiKeyService: ApiKeyService);
|
|
20
|
+
private requireInteractiveSession;
|
|
20
21
|
signUp(signUpDto: SignUpDto): Promise<import("..").User>;
|
|
21
22
|
signUpPrivate(signUpDto: RegisterPrivateDto, activeUser: ActiveUserData): Promise<import("..").User>;
|
|
22
23
|
signIn(response: Response, signInDto: SignInDto): Promise<{
|
|
@@ -72,7 +73,7 @@ export declare class AuthenticationController {
|
|
|
72
73
|
apiKey: string;
|
|
73
74
|
record: import("..").UserApiKey;
|
|
74
75
|
}>;
|
|
75
|
-
generateApiKeyForUser(userId: number, dto: CreateApiKeyDto): Promise<{
|
|
76
|
+
generateApiKeyForUser(userId: number, dto: CreateApiKeyDto, activeUser: ActiveUserData): Promise<{
|
|
76
77
|
apiKey: string;
|
|
77
78
|
record: import("..").UserApiKey;
|
|
78
79
|
}>;
|
|
@@ -89,6 +90,16 @@ export declare class AuthenticationController {
|
|
|
89
90
|
roles: string[];
|
|
90
91
|
};
|
|
91
92
|
}>;
|
|
93
|
+
createPortalSession(apiKey: string): Promise<{
|
|
94
|
+
accessToken: string;
|
|
95
|
+
user: {
|
|
96
|
+
id: number;
|
|
97
|
+
email: string;
|
|
98
|
+
mobile: string;
|
|
99
|
+
username: string;
|
|
100
|
+
roles: string[];
|
|
101
|
+
};
|
|
102
|
+
}>;
|
|
92
103
|
generateSsoCode(activeUser: ActiveUserData, authorization: string): Promise<{
|
|
93
104
|
ssoCode: string;
|
|
94
105
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/authentication.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAI3E,qBAIa,wBAAwB;IAI7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAJlC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6C;gBAG/C,WAAW,EAAE,qBAAqB,EAClC,aAAa,EAAE,aAAa;
|
|
1
|
+
{"version":3,"file":"authentication.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/authentication.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAA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