@creatio-devkit/common 0.821.0 → 0.823.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/esm2022/lib/internal/models/data-source-load-parameters.mjs +2 -0
  3. package/esm2022/lib/internal/models/index.mjs +3 -1
  4. package/esm2022/lib/internal/models/internal-module-definition.mjs +1 -1
  5. package/esm2022/lib/internal/models/lazy-module-metadata.mjs +1 -1
  6. package/esm2022/lib/internal/models/lazy-module-ref.mjs +4 -4
  7. package/esm2022/lib/internal/models/lazy-registry-item.mjs +1 -1
  8. package/esm2022/lib/internal/services/global-converters-registry/converter-registry.mjs +8 -4
  9. package/esm2022/lib/internal/services/request-handler-registry/request-handler-registry.service.mjs +46 -21
  10. package/esm2022/lib/internal/services/validator-registry/validator-registry.mjs +9 -6
  11. package/esm2022/lib/public/decorators/inject/inject.decorator.mjs +1 -1
  12. package/esm2022/lib/public/enums/index.mjs +2 -1
  13. package/esm2022/lib/public/enums/process-status.enum.mjs +28 -0
  14. package/esm2022/lib/public/functions/bootstrap-crt-module.mjs +66 -19
  15. package/esm2022/lib/public/models/index.mjs +2 -1
  16. package/esm2022/lib/public/models/process-engine/index.mjs +4 -0
  17. package/esm2022/lib/public/models/process-engine/process-parameter-value.model.mjs +2 -0
  18. package/esm2022/lib/public/models/process-engine/run-process-request.model.mjs +12 -0
  19. package/esm2022/lib/public/models/process-engine/run-process-response.model.mjs +2 -0
  20. package/esm2022/lib/public/services/index.mjs +2 -1
  21. package/esm2022/lib/public/services/process-engine/index.mjs +2 -0
  22. package/esm2022/lib/public/services/process-engine/process-engine.service.mjs +27 -0
  23. package/esm2022/lib/public/services/sys-values/sys-values.mjs +1 -1
  24. package/fesm2022/creatio-devkit-common.mjs +193 -50
  25. package/fesm2022/creatio-devkit-common.mjs.map +1 -1
  26. package/index.d.ts +137 -1
  27. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -444,6 +444,7 @@ export declare interface BootstrapOptions {
444
444
  */
445
445
  resolveDependency?: ResolveDependencyFn;
446
446
  /* Excluded from this release type: moduleType */
447
+ /* Excluded from this release type: featureValues */
447
448
  /* Excluded from this release type: onContextCreate */
448
449
  /* Excluded from this release type: onContextUpdate */
449
450
  /* Excluded from this release type: onContextDestroy */
@@ -608,7 +609,7 @@ export declare function CrtConverter(): (type: Type | AbstractType) => void;
608
609
  * constructor(@CrtInject(USER_NAME_TOKEN) userName: string) {}
609
610
  * }
610
611
  */
611
- export declare function CrtInject(token: unknown): (target: any, paramKey: string, paramIndex: number) => void;
612
+ export declare function CrtInject(token: unknown): any;
612
613
 
613
614
  /* Excluded from this release type: crtInjectPrefix */
614
615
 
@@ -941,6 +942,8 @@ export declare interface DataSourceLoadOptions extends ɵDataSourceLoadOptions {
941
942
  /* Excluded from this release type: isDistinct */
942
943
  }
943
944
 
945
+ /* Excluded from this release type: DataSourceLoadParameters */
946
+
944
947
  /* Excluded from this release type: DataSourceLoadType */
945
948
  export { DataSourcePagingConfig }
946
949
 
@@ -1463,6 +1466,10 @@ export { JsonData }
1463
1466
 
1464
1467
  export { JsonObject }
1465
1468
 
1469
+ /* Excluded from this release type: LazyModuleDefinition */
1470
+
1471
+ /* Excluded from this release type: LazyModuleDefinitionWithMetadata */
1472
+
1466
1473
  /* Excluded from this release type: LazyModuleMetadata */
1467
1474
 
1468
1475
  /* Excluded from this release type: LazyModuleRef */
@@ -1778,6 +1785,74 @@ export declare interface PreloadSysSettingsResponse extends BaseResponse {
1778
1785
 
1779
1786
  export { PrimaryDisplayFilterDataSourceParameter }
1780
1787
 
1788
+ /**
1789
+ * @public
1790
+ * @class ProcessEngineService
1791
+ * @classdesc Service, used for starting and completing business processes using handler chain
1792
+ * @extends {BaseHandlerChainService}
1793
+ */
1794
+ export declare class ProcessEngineService extends BaseHandlerChainService {
1795
+ /* Excluded from this release type: requestType */
1796
+ /**
1797
+ * Executes process by name.
1798
+ * @param processName Process name.
1799
+ * @param parameters Process parameters.
1800
+ * @param resultParameterNames Resulting process parameters.
1801
+ */
1802
+ executeProcessByName: (processName: string, parameters?: Record<string, unknown>, resultParameterNames?: string[]) => Promise<RunProcessResponse>;
1803
+ /**
1804
+ * Completes process element execution.
1805
+ * @param {Guid} processElementUId Process element unique identifier.
1806
+ * @param {Record<string, JsonData>} parameters Process parameters.
1807
+ */
1808
+ completeExecuting: (processElementUId: Guid, parameters?: Record<string, JsonData>) => Promise<BaseResponse>;
1809
+ }
1810
+
1811
+ /**
1812
+ * @public
1813
+ * @interface
1814
+ * @description Interface representing a process parameter value.
1815
+ * @property {string} name - The name of the process parameter.
1816
+ * @property {string} value - The value of the process parameter.
1817
+ */
1818
+ export declare interface ProcessParameterValue {
1819
+ /**
1820
+ * @description The name of the process parameter.
1821
+ */
1822
+ name: string;
1823
+ /**
1824
+ * @description The value of the process parameter.
1825
+ */
1826
+ value: string;
1827
+ }
1828
+
1829
+ /**
1830
+ * @public
1831
+ * @description Enum representing the status of a process.
1832
+ */
1833
+ export declare enum ProcessStatus {
1834
+ /**
1835
+ * The process is inactive.
1836
+ */
1837
+ Inactive = 0,
1838
+ /**
1839
+ * The process is currently running.
1840
+ */
1841
+ Running = 1,
1842
+ /**
1843
+ * The process has completed successfully.
1844
+ */
1845
+ Completed = 2,
1846
+ /**
1847
+ * The process encountered an error.
1848
+ */
1849
+ Error = 3,
1850
+ /**
1851
+ * The process was cancelled.
1852
+ */
1853
+ Cancelled = 4
1854
+ }
1855
+
1781
1856
  export { QueryMacrosType }
1782
1857
 
1783
1858
  export { QueryOperationType }
@@ -1896,6 +1971,62 @@ export declare class RightsService extends BaseHandlerChainService {
1896
1971
  getCanExecuteOperations: (operationNames: string[]) => Promise<boolean[]>;
1897
1972
  }
1898
1973
 
1974
+ /**
1975
+ * @public
1976
+ * @class
1977
+ * @classdesc Class representing a request to run a process.
1978
+ * @property {Guid} schemaUId - The unique identifier of the process schema.
1979
+ * @property {string} schemaName - The name of the process schema.
1980
+ * @property {ProcessParameterValue[]} parameterValues - The values of the process parameters.
1981
+ * @property {string[]} resultParameterNames - The names of the resulting process parameters.
1982
+ */
1983
+ export declare class RunProcessRequest {
1984
+ /**
1985
+ * @description Represents process schema unique identifier to run.
1986
+ */
1987
+ schemaUId?: Guid;
1988
+ /**
1989
+ * @description Represents process schema name to run.
1990
+ */
1991
+ schemaName?: string;
1992
+ /**
1993
+ * @description Used to pass the parameters to a starting process.
1994
+ */
1995
+ parameterValues?: ProcessParameterValue[];
1996
+ /**
1997
+ * @description Used to specify the names of the result parameters to retrieve on process completion.
1998
+ */
1999
+ resultParameterNames?: string[];
2000
+ }
2001
+
2002
+ /**
2003
+ * @public
2004
+ * @interface
2005
+ * @extends {BaseResponse}
2006
+ * @description Interface representing the response from running a process.
2007
+ * @property {string} message - The message returned from the process execution.
2008
+ * @property {Guid} processId - The unique identifier of the executed process.
2009
+ * @property {Record<string, unknown>} resultParameterValues - The resulting parameter values from the process.
2010
+ */
2011
+ export declare interface RunProcessResponse extends BaseResponse {
2012
+ /**
2013
+ * @description The message returned from the process execution.
2014
+ */
2015
+ message: string;
2016
+ /**
2017
+ * @description The unique identifier of the executed process.
2018
+ */
2019
+ processId: Guid;
2020
+ /**
2021
+ * @description The status of the executed process.
2022
+ */
2023
+ processStatus: ProcessStatus;
2024
+ /**
2025
+ * @description The resulting parameter values from the process execution.
2026
+ */
2027
+ resultParameterValues?: Record<string, unknown>;
2028
+ }
2029
+
1899
2030
  /**
1900
2031
  * @public
1901
2032
  * @description Response for saving system settings
@@ -2067,6 +2198,7 @@ export declare class SysSettingValue {
2067
2198
  * @property {LookupValueWithCode} primaryLanguage - primary language
2068
2199
  * @property {LookupValue} primaryCulture - primary culture
2069
2200
  * @property {LookupValue} userCulture - user culture
2201
+ * @property {string} environmentType - type of the environment
2070
2202
  */
2071
2203
  export declare interface SysValues {
2072
2204
  /**
@@ -2121,6 +2253,10 @@ export declare interface SysValues {
2121
2253
  * @description Freedom UI new schema version
2122
2254
  */
2123
2255
  freedomUiSchemaVersion: number;
2256
+ /**
2257
+ * @description environment type
2258
+ */
2259
+ environmentType: string;
2124
2260
  }
2125
2261
 
2126
2262
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creatio-devkit/common",
3
- "version": "0.821.0",
3
+ "version": "0.823.0",
4
4
  "description": "Allows developers to create customizations and integrate them to Creatio platform.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "keywords": [
@@ -14,7 +14,7 @@
14
14
  "class-transformer": "^0.5.1",
15
15
  "reflect-metadata": "^0.1.13",
16
16
  "lodash": "^4.17.21",
17
- "@creatio/base": "0.821.0"
17
+ "@creatio/base": "0.823.0"
18
18
  },
19
19
  "sideEffects": false,
20
20
  "module": "fesm2022/creatio-devkit-common.mjs",