@sme.up/kokos-sdk-node 2.3.0 → 3.0.0-SNAPSHOT

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 (198) hide show
  1. package/docs/assets/hierarchy.js +1 -1
  2. package/docs/assets/highlight.css +56 -0
  3. package/docs/assets/main.js +2 -2
  4. package/docs/assets/navigation.js +1 -1
  5. package/docs/assets/search.js +1 -1
  6. package/docs/classes/App.html +2 -2
  7. package/docs/classes/BatchContext.html +2 -2
  8. package/docs/classes/EntityOav.html +2 -2
  9. package/docs/classes/EntitySlice.html +2 -2
  10. package/docs/classes/ErrorWithStatus.html +28 -10
  11. package/docs/classes/ExecuteFunPayload.html +2 -2
  12. package/docs/classes/ExecutionContext.html +2 -2
  13. package/docs/classes/Fun.html +2 -2
  14. package/docs/classes/FunObject.html +2 -2
  15. package/docs/classes/KokosEntityDAOService.html +8 -8
  16. package/docs/classes/Registry.html +2 -2
  17. package/docs/classes/SmeupDataStructureWriter.html +6 -5
  18. package/docs/classes/SourceLibrary.html +2 -2
  19. package/docs/classes/User.html +2 -2
  20. package/docs/enums/ApiVersion.html +2 -2
  21. package/docs/enums/DynamismEvents.html +2 -2
  22. package/docs/enums/Format.html +2 -2
  23. package/docs/enums/FunStatus.html +2 -2
  24. package/docs/enums/Level.html +2 -2
  25. package/docs/enums/LoadType.html +2 -2
  26. package/docs/enums/SectionTypes.html +2 -2
  27. package/docs/enums/Shapes.html +2 -2
  28. package/docs/enums/SmeupDataStructureType.html +5 -5
  29. package/docs/enums/SmeupLayoutSectionType.html +2 -2
  30. package/docs/enums/ToolbarState.html +2 -2
  31. package/docs/enums/YesNo.html +2 -2
  32. package/docs/functions/clearLoggerContext.html +1 -1
  33. package/docs/functions/closeEventUtils.html +1 -1
  34. package/docs/functions/configureLogger.html +1 -1
  35. package/docs/functions/createLoggerContext.html +1 -1
  36. package/docs/functions/executeFun.html +1 -1
  37. package/docs/functions/funObjectToString.html +1 -1
  38. package/docs/functions/funToString.html +1 -1
  39. package/docs/functions/getSmeupDataStructureType.html +1 -1
  40. package/docs/functions/parseArrayString.html +5 -5
  41. package/docs/functions/parseFieldValues.html +2 -2
  42. package/docs/functions/parseKeyValueBetweenBrackets.html +1 -1
  43. package/docs/functions/parseUpdatePayload.html +1 -1
  44. package/docs/functions/parseUpdatePayloadMultipleRows.html +1 -1
  45. package/docs/functions/startServer.html +1 -1
  46. package/docs/functions/startServerWithCustomConfig.html +1 -1
  47. package/docs/functions/stringToFun.html +1 -1
  48. package/docs/functions/submitBusinessEvent.html +1 -1
  49. package/docs/functions/toDateCell.html +1 -1
  50. package/docs/functions/toIconButtonCell.html +1 -1
  51. package/docs/functions/toNumberCell.html +1 -1
  52. package/docs/functions/toSingleChipCell.html +1 -1
  53. package/docs/functions/toStringCell.html +1 -1
  54. package/docs/functions/toTextButtonCell.html +1 -1
  55. package/docs/functions/toTimeCell.html +1 -1
  56. package/docs/hierarchy.html +1 -1
  57. package/docs/interfaces/ComponentOptions.html +2 -2
  58. package/docs/interfaces/DebugInfo.html +2 -2
  59. package/docs/interfaces/DocumentDatabaseDataSource.html +2 -2
  60. package/docs/interfaces/IKokosEntityDAOService.html +2 -2
  61. package/docs/interfaces/IKokosInputPanelService.html +2 -2
  62. package/docs/interfaces/KokosEntityDAOServiceMethods.html +7 -7
  63. package/docs/interfaces/KokosInputPanelServiceMethods.html +6 -6
  64. package/docs/interfaces/KokosService.html +2 -2
  65. package/docs/interfaces/KokosServiceMethods.html +1 -1
  66. package/docs/interfaces/KokosServiceModule.html +2 -2
  67. package/docs/interfaces/LoggerContext.html +2 -2
  68. package/docs/interfaces/MicroExecutorConfiguration.html +2 -2
  69. package/docs/interfaces/RawDynamism.html +7 -7
  70. package/docs/interfaces/SmeupAction.html +2 -2
  71. package/docs/interfaces/SmeupBusinessEvent.html +2 -2
  72. package/docs/interfaces/SmeupDataCell.html +2 -2
  73. package/docs/interfaces/SmeupDataColumn.html +3 -2
  74. package/docs/interfaces/SmeupDataNode.html +2 -2
  75. package/docs/interfaces/SmeupDataRow.html +2 -2
  76. package/docs/interfaces/SmeupDataStructure.html +2 -2
  77. package/docs/interfaces/SmeupDataTable.html +2 -2
  78. package/docs/interfaces/SmeupDataTree.html +2 -2
  79. package/docs/interfaces/SmeupFeedback.html +2 -2
  80. package/docs/interfaces/SmeupLayout.html +2 -2
  81. package/docs/interfaces/SmeupLayoutField.html +2 -2
  82. package/docs/interfaces/SmeupLayoutSection.html +2 -2
  83. package/docs/interfaces/SmeupMessage.html +2 -2
  84. package/docs/interfaces/SmeupSch.html +3 -3
  85. package/docs/interfaces/SmeupSchComponent.html +2 -2
  86. package/docs/interfaces/SmeupSchSection.html +2 -2
  87. package/docs/interfaces/SmeupSetup.html +2 -2
  88. package/docs/interfaces/SmeupStyle.html +2 -2
  89. package/docs/interfaces/SmeupStyleOptions.html +2 -2
  90. package/docs/interfaces/SmeupVariable.html +2 -2
  91. package/docs/interfaces/UpdateResult.html +2 -2
  92. package/docs/modules.html +1 -1
  93. package/docs/types/SmeupDataCellInputSettingsKeys.html +1 -1
  94. package/docs/types/SmeupDataCellInputSettingsValue.html +1 -1
  95. package/docs/types/SmeupDataCellShapes.html +1 -1
  96. package/docs/types/SmeupMessageGravity.html +1 -1
  97. package/docs/types/SmeupSetupBase.html +1 -1
  98. package/docs/types/SmeupVariableType.html +1 -1
  99. package/docs/variables/DEFAULT_TTL.html +1 -1
  100. package/docs/variables/LOGGER.html +1 -1
  101. package/docs/variables/SMEUP_ACTION_TYPE.html +1 -1
  102. package/docs/variables/SMEUP_DATA_CELL_INPUT_SETTINGS_KEYS.html +1 -1
  103. package/docs/variables/SMEUP_MESSAGE_GRAVITY.html +1 -1
  104. package/docs/variables/SMEUP_MESSAGE_MODE.html +1 -1
  105. package/docs/variables/SMEUP_VARIABLE_TYPE.html +1 -1
  106. package/docs/variables/SmeupDataCellShapes.html +1 -1
  107. package/lib/caller/executeFun.js +9 -6
  108. package/lib/caller/executeFun.js.map +1 -1
  109. package/lib/caller/microExecutorServiceCaller.js +13 -7
  110. package/lib/caller/microExecutorServiceCaller.js.map +1 -1
  111. package/lib/caller/serviceCaller.js +43 -78
  112. package/lib/caller/serviceCaller.js.map +1 -1
  113. package/lib/configuration/configuration.js +28 -20
  114. package/lib/configuration/configuration.js.map +1 -1
  115. package/lib/entrypoint/restapi/executeFunPayloadValidator.js +5 -3
  116. package/lib/entrypoint/restapi/executeFunPayloadValidator.js.map +1 -1
  117. package/lib/entrypoint/restapi/index.js +4 -2
  118. package/lib/entrypoint/restapi/index.js.map +1 -1
  119. package/lib/entrypoint/restapi/restapi.js +50 -47
  120. package/lib/entrypoint/restapi/restapi.js.map +1 -1
  121. package/lib/events/eventUtils.js +16 -11
  122. package/lib/events/eventUtils.js.map +1 -1
  123. package/lib/events/rabbitmq.js +26 -16
  124. package/lib/events/rabbitmq.js.map +1 -1
  125. package/lib/index.js +32 -16
  126. package/lib/index.js.map +1 -1
  127. package/lib/logger/logger.js +21 -12
  128. package/lib/logger/logger.js.map +1 -1
  129. package/lib/services/JS_00_01.js +17 -15
  130. package/lib/services/JS_00_01.js.map +1 -1
  131. package/lib/services/JS_00_02.js +3 -1
  132. package/lib/services/JS_00_02.js.map +1 -1
  133. package/lib/types/component.js +7 -4
  134. package/lib/types/component.js.map +1 -1
  135. package/lib/types/data-structures/smeupDataStructure.js +16 -12
  136. package/lib/types/data-structures/smeupDataStructure.js.map +1 -1
  137. package/lib/types/data-structures/smeupDataTable.js +4 -1
  138. package/lib/types/data-structures/smeupDataTable.js.map +1 -1
  139. package/lib/types/data-structures/smeupDataTree.js +2 -1
  140. package/lib/types/data-structures/smeupSch.js +5 -2
  141. package/lib/types/data-structures/smeupSch.js.map +1 -1
  142. package/lib/types/dynamism.js +7 -4
  143. package/lib/types/dynamism.js.map +1 -1
  144. package/lib/types/exceptions/application.js +5 -3
  145. package/lib/types/exceptions/application.js.map +1 -1
  146. package/lib/types/exceptions/validation.js +6 -2
  147. package/lib/types/exceptions/validation.js.map +1 -1
  148. package/lib/types/general.js +33 -61
  149. package/lib/types/general.js.map +1 -1
  150. package/lib/types/helpers.js +7 -4
  151. package/lib/types/helpers.js.map +1 -1
  152. package/lib/utils/batchUtils.js +23 -17
  153. package/lib/utils/batchUtils.js.map +1 -1
  154. package/lib/utils/cells.js +16 -7
  155. package/lib/utils/cells.js.map +1 -1
  156. package/lib/utils/dataStructureStream.js +7 -3
  157. package/lib/utils/dataStructureStream.js.map +1 -1
  158. package/lib/utils/fun.js +10 -5
  159. package/lib/utils/fun.js.map +1 -1
  160. package/lib/utils/path.js +12 -6
  161. package/lib/utils/path.js.map +1 -1
  162. package/lib/utils/regex.js +22 -18
  163. package/lib/utils/regex.js.map +1 -1
  164. package/lib/utils/smeupDataStructureWriter.js +48 -36
  165. package/lib/utils/smeupDataStructureWriter.js.map +1 -1
  166. package/package.json +9 -13
  167. package/tsconfig.json +15 -27
  168. package/docs/interfaces/SmeupDataCellOption.html +0 -4
  169. package/lib/caller/executeFun.d.ts +0 -10
  170. package/lib/caller/microExecutorServiceCaller.d.ts +0 -11
  171. package/lib/caller/serviceCaller.d.ts +0 -33
  172. package/lib/configuration/configuration.d.ts +0 -13
  173. package/lib/entrypoint/restapi/executeFunPayloadValidator.d.ts +0 -1
  174. package/lib/entrypoint/restapi/index.d.ts +0 -1
  175. package/lib/entrypoint/restapi/restapi.d.ts +0 -3
  176. package/lib/events/eventUtils.d.ts +0 -12
  177. package/lib/events/rabbitmq.d.ts +0 -21
  178. package/lib/index.d.ts +0 -22
  179. package/lib/logger/logger.d.ts +0 -26
  180. package/lib/services/JS_00_01.d.ts +0 -3
  181. package/lib/services/JS_00_02.d.ts +0 -11
  182. package/lib/types/component.d.ts +0 -53
  183. package/lib/types/data-structures/smeupDataStructure.d.ts +0 -215
  184. package/lib/types/data-structures/smeupDataTable.d.ts +0 -116
  185. package/lib/types/data-structures/smeupDataTree.d.ts +0 -13
  186. package/lib/types/data-structures/smeupSch.d.ts +0 -72
  187. package/lib/types/dynamism.d.ts +0 -45
  188. package/lib/types/exceptions/application.d.ts +0 -8
  189. package/lib/types/exceptions/validation.d.ts +0 -7
  190. package/lib/types/general.d.ts +0 -221
  191. package/lib/types/helpers.d.ts +0 -9
  192. package/lib/utils/batchUtils.d.ts +0 -6
  193. package/lib/utils/cells.d.ts +0 -8
  194. package/lib/utils/dataStructureStream.d.ts +0 -8
  195. package/lib/utils/fun.d.ts +0 -4
  196. package/lib/utils/path.d.ts +0 -5
  197. package/lib/utils/regex.d.ts +0 -48
  198. package/lib/utils/smeupDataStructureWriter.d.ts +0 -49
@@ -1,116 +0,0 @@
1
- import { SmeupDataStructure, SmeupDataStructureType, SmeupLayout } from "./smeupDataStructure.js";
2
- export interface SmeupDataTable extends SmeupDataStructure {
3
- type: SmeupDataStructureType.SmeupDataTable;
4
- columns: SmeupDataColumn[];
5
- rows: SmeupDataRow[];
6
- layout?: SmeupLayout;
7
- }
8
- export interface SmeupDataColumn {
9
- name: string;
10
- title?: string;
11
- visible?: boolean;
12
- isEditable?: boolean;
13
- isKey?: boolean;
14
- fill?: string;
15
- obj?: {
16
- t: string;
17
- p: string;
18
- };
19
- maxLength?: number;
20
- length?: number;
21
- integers?: number;
22
- decimals?: number;
23
- tooltip?: boolean;
24
- formula?: string;
25
- shape?: SmeupDataCellShapes;
26
- useAs?: string;
27
- hideValuesRepetitions?: boolean;
28
- }
29
- export interface SmeupDataRow {
30
- cells?: {
31
- [columnName: string]: SmeupDataCell;
32
- };
33
- layout?: SmeupLayout;
34
- rowId?: string;
35
- error?: boolean;
36
- }
37
- export interface SmeupDataCell {
38
- value: string;
39
- obj?: {
40
- t: string;
41
- p: string;
42
- k: string;
43
- };
44
- options?: SmeupDataCellOption[];
45
- icon?: string;
46
- isEditable?: boolean;
47
- hasMCell?: boolean;
48
- mandatory?: boolean;
49
- shape?: SmeupDataCellShapes;
50
- fun?: string;
51
- tooltip?: boolean;
52
- data?: {
53
- [key: string]: Object;
54
- };
55
- disabled?: boolean;
56
- styleName?: string;
57
- styleAttributes?: {
58
- [attributeKey: string]: string;
59
- };
60
- inputSettings?: {
61
- [key: string]: Object;
62
- };
63
- }
64
- /**
65
- * Represents the single option of the cell
66
- */
67
- export interface SmeupDataCellOption {
68
- id: string;
69
- label: string;
70
- }
71
- /**
72
- * Represent the possible shapes of a field
73
- */
74
- export declare const SmeupDataCellShapes: {
75
- readonly AUTOCOMPLETE: "ACP";
76
- readonly BUTTON_LIST: "BTN";
77
- readonly CHART: "GRA";
78
- readonly CHECKBOX: "CHK";
79
- readonly CHIP: "CHI";
80
- readonly COLOR_PICKER: "CLP";
81
- readonly COMBOBOX: "CMB";
82
- readonly DATE: "CAL";
83
- readonly EDITOR: "EDT";
84
- readonly GAUGE: "GAU";
85
- readonly ICON: "ICO";
86
- readonly IMAGE: "IMG";
87
- readonly INPUT_CHECKBOX: "INC";
88
- readonly INPUT_FIELD: "INF";
89
- readonly KNOB: "KNB";
90
- readonly LABEL: "LBL";
91
- readonly MEMO: "MEM";
92
- readonly MULTI_AUTOCOMPLETE: "AML";
93
- readonly MULTI_COMBOBOX: "CML";
94
- readonly OBJECT: "OBJ";
95
- readonly PROGRESS_BAR: "PGB";
96
- readonly RADIO: "RAD";
97
- readonly RATING: "RTG";
98
- readonly SWITCH: "SWT";
99
- readonly TABLE: "TBL";
100
- readonly TEXT_FIELD: "ITX";
101
- readonly TIME: "TIM";
102
- readonly INPUT_NUMBER: "INR";
103
- readonly BOOLEAN_BUTTON: "BNB";
104
- readonly RANGE: "RNG";
105
- readonly FILE_UPLOAD: "FUP";
106
- readonly FILE_READER: "FRE";
107
- readonly COMMAND_EXECUTE: "RUN";
108
- readonly ONE_BUTTON: "BTO";
109
- readonly PASSWORD: "PWD";
110
- readonly SPINNER: "SPN";
111
- readonly DECODE: "DEC";
112
- };
113
- /**
114
- * Represent the type of the shape (like enum)
115
- */
116
- export type SmeupDataCellShapes = (typeof SmeupDataCellShapes)[keyof typeof SmeupDataCellShapes] | string;
@@ -1,13 +0,0 @@
1
- import { SmeupDataStructure, SmeupDataStructureType } from "./smeupDataStructure.js";
2
- import { SmeupDataCell, SmeupDataColumn } from "./smeupDataTable.js";
3
- export interface SmeupDataTree extends SmeupDataStructure {
4
- type: SmeupDataStructureType.SmeupDataTree;
5
- children: SmeupDataNode[];
6
- columns?: SmeupDataColumn[];
7
- }
8
- export interface SmeupDataNode extends SmeupDataCell {
9
- children?: SmeupDataNode[];
10
- cells?: {
11
- [columnName: string]: SmeupDataCell;
12
- };
13
- }
@@ -1,72 +0,0 @@
1
- import { YesNo } from "../helpers.js";
2
- import { SmeupDataStructure, SmeupDataStructureType, SmeupSetupBase, SmeupVariable } from "./smeupDataStructure.js";
3
- import { RawDynamism } from "../dynamism.js";
4
- import { SmeupDataTable } from "./smeupDataTable.js";
5
- import { SmeupDataTree, SmeupDataNode } from "./smeupDataTree.js";
6
- import { Shapes, ToolbarState } from "../component.js";
7
- export interface SmeupSch extends SmeupDataStructure {
8
- type: SmeupDataStructureType.SmeupScheda;
9
- title: string;
10
- sections: SmeupSchSection[];
11
- info?: string;
12
- id?: string;
13
- styles?: SmeupStyle[];
14
- layout?: string;
15
- /** other setup: for example "Menu", left menù */
16
- laySetup?: any;
17
- dynamisms?: RawDynamism[];
18
- }
19
- export interface SmeupSchSection {
20
- id: string;
21
- layout: string;
22
- dim?: string;
23
- variables?: SmeupVariable[];
24
- sections?: SmeupSchSection[];
25
- components?: SmeupSchComponent[];
26
- type?: SectionTypes;
27
- }
28
- export interface SmeupSchComponent {
29
- type: Shapes;
30
- title: string;
31
- load?: boolean;
32
- subNote?: string;
33
- id?: string;
34
- fun?: string;
35
- data?: SmeupDataTree | SmeupDataTable;
36
- dynamisms?: RawDynamism[];
37
- variables?: {
38
- [key: string]: SmeupVariable;
39
- };
40
- options?: SmeupSetupBase;
41
- icon?: string;
42
- buttons?: SmeupDataNode[];
43
- toolbarState?: ToolbarState;
44
- context?: string;
45
- }
46
- export interface SmeupStyle {
47
- name: string;
48
- value: SmeupStyleOptions;
49
- }
50
- export interface SmeupStyleOptions {
51
- Align?: string;
52
- FontBold?: YesNo;
53
- FontItalic?: YesNo;
54
- FontName?: string;
55
- FontSize?: string;
56
- FontULine?: YesNo;
57
- FontUnder?: YesNo;
58
- FontColor?: string;
59
- BackColor?: string;
60
- Padding?: string;
61
- Border?: string;
62
- TxtOri?: string;
63
- }
64
- export declare enum SectionTypes {
65
- Acc = "Acc",
66
- Tab = "Tab",
67
- TabVer = "TabVer",
68
- Radio = "Radio",
69
- Combo = "Combo",
70
- OneBut = "OneBut",
71
- Menu = "Menu"
72
- }
@@ -1,45 +0,0 @@
1
- import { SmeupVariable } from "./data-structures/smeupDataStructure.js";
2
- /**
3
- * Raw Dynamism
4
- */
5
- export interface RawDynamism {
6
- /** Event type */
7
- event: string;
8
- /** Fun or Action */
9
- exec?: string;
10
- /** Component ids */
11
- targets?: string[];
12
- /** Declared variables */
13
- variables?: SmeupVariable[];
14
- /** Enable conditions */
15
- enabled?: string;
16
- /** Load method */
17
- Load?: LoadType;
18
- }
19
- /**
20
- * Dynamism Event
21
- */
22
- export declare enum DynamismEvents {
23
- ALL = "*all",
24
- BTN_CLICK = "btnclick",
25
- CHANGE = "change",
26
- CHANGE_MONTH = "changemonth",
27
- CHANGE_ROW = "changerow",
28
- CHANGE_VAL = "changeval",
29
- CLICK = "click",
30
- DBLCLICK = "dblclick",
31
- DETAIL_CLICK = "detailclick",
32
- EXPAND = "expand",
33
- RESIZE = "resize",
34
- DATESELECT = "dateselect",
35
- DROP = "drop",
36
- SELECT = "select",
37
- UPDATE = "update",
38
- CHECK = "check",
39
- INIT = "init",
40
- CLOSE = "close",
41
- UNMOUNT = "unmount"
42
- }
43
- export declare enum LoadType {
44
- D = "D"
45
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Generic application exception
3
- */
4
- export declare class ApplicationException extends Error {
5
- status: number;
6
- message: string;
7
- constructor(status: number, message: string);
8
- }
@@ -1,7 +0,0 @@
1
- import { ApplicationException } from "./application.js";
2
- /**
3
- * Validation Exception
4
- */
5
- export declare class ValidationException extends ApplicationException {
6
- constructor(message: string);
7
- }
@@ -1,221 +0,0 @@
1
- import { SmeupDataStructureWriter } from "../utils/smeupDataStructureWriter.js";
2
- import { Format, Level } from "../logger/logger.js";
3
- export declare class ErrorWithStatus extends Error {
4
- status: number;
5
- constructor(message: string, status: number);
6
- }
7
- /**
8
- * Micro Executor base config. To personalize the configuration you can extend this interface
9
- */
10
- export interface MicroExecutorConfiguration {
11
- server: {
12
- port: 8011 | number;
13
- };
14
- logger: {
15
- format: Format;
16
- level: Level;
17
- };
18
- }
19
- /**
20
- * Fun Object
21
- */
22
- export declare class FunObject {
23
- t: string;
24
- p: string;
25
- k: string;
26
- }
27
- /**
28
- * Fun
29
- */
30
- export declare class Fun {
31
- component: string;
32
- service: string;
33
- function: string;
34
- obj1?: FunObject;
35
- obj2?: FunObject;
36
- obj3?: FunObject;
37
- obj4?: FunObject;
38
- obj5?: FunObject;
39
- obj6?: FunObject;
40
- P?: string;
41
- INPUT?: string;
42
- SS?: string;
43
- }
44
- /**
45
- * User Type
46
- */
47
- export declare class User {
48
- sessionId: string;
49
- username: string;
50
- app: string;
51
- device: string;
52
- expiresAt: number;
53
- properties?: {
54
- [key: string]: string;
55
- };
56
- }
57
- export declare class SourceLibrary {
58
- path: string;
59
- }
60
- export interface DocumentDatabaseDataSource {
61
- id: string;
62
- description: string;
63
- uri: string;
64
- database: string;
65
- }
66
- /**
67
- * Registry
68
- */
69
- export declare class Registry {
70
- handlers?: {
71
- [id: string]: string;
72
- };
73
- services?: {
74
- [key: string]: string;
75
- };
76
- aliases?: {
77
- [key: string]: string;
78
- };
79
- defaultHandler?: string;
80
- }
81
- /**
82
- * App
83
- */
84
- export declare class App {
85
- registry?: Registry;
86
- libraries?: {
87
- [key: string]: SourceLibrary;
88
- };
89
- otherConfigs?: Map<string, string>;
90
- }
91
- /**
92
- * Execution Context
93
- */
94
- export declare class ExecutionContext {
95
- user?: User;
96
- app?: App;
97
- batchContext?: BatchContext;
98
- }
99
- /**
100
- * Batch Context
101
- */
102
- export declare class BatchContext {
103
- batchJobId?: string;
104
- scheduledJobId?: string;
105
- progress?: number;
106
- }
107
- /**
108
- * Execute Fun payload DTO
109
- */
110
- export declare class ExecuteFunPayload {
111
- fun: Fun;
112
- context: ExecutionContext;
113
- }
114
- /**
115
- * Type of Kokos Service ES Module
116
- */
117
- export interface KokosServiceModule {
118
- default: KokosService;
119
- }
120
- /**
121
- * Kokos Service Interface
122
- */
123
- export interface KokosService {
124
- methods: KokosServiceMethods;
125
- }
126
- /**
127
- * Kokos Service Method
128
- */
129
- export interface KokosServiceMethods {
130
- [key: string]: (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
131
- }
132
- /**
133
- * KokosEntityDAOService is a specific KokosService used to funize a DAO
134
- */
135
- export interface IKokosEntityDAOService {
136
- methods: KokosEntityDAOServiceMethods;
137
- }
138
- export interface KokosEntityDAOServiceMethods {
139
- /** F(EXB;XXX;FND.BID) 1([T];[P];[K]). K is Id. */
140
- "FND.BID": (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
141
- /** F(EXB;XXX;FND.ALL) 1(OG;;[T][P]). */
142
- "FND.ALL": (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
143
- /** F(EXB;XXX;FND.MNY) 1(OG;;[T][P]) INPUT(IDS(xxx;yyy;zzz)) */
144
- "FND.MNY": (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
145
- /** F(FBK;XXX;DEL.BID) 1([T];[P];[K]) */
146
- "DEL.BID": (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
147
- /** F(EXB;XXX;INS.NEW) 1([T];[P];[K]) INPUT(OAVS(oav_key(oav_value) oav_key(oav_value)...)) */
148
- "INS.NEW": (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
149
- /** F(EXB;XXX;UPD.BID) 1([T];[P];[K]) INPUT(OAVS(oav_key(oav_value) oav_key(oav_value)...)) */
150
- "UPD.BID": (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
151
- }
152
- export declare class EntitySlice {
153
- code: string;
154
- oavs: Map<string, EntityOav>;
155
- constructor(code?: string, oavs?: Map<string, EntityOav>);
156
- }
157
- export declare class EntityOav {
158
- type: string;
159
- parameter: string;
160
- value: any;
161
- readOnly: boolean;
162
- constructor(type?: string, parameter?: string, value?: any, readOnly?: boolean);
163
- }
164
- export declare abstract class KokosEntityDAOService implements KokosEntityDAOServiceMethods, IKokosEntityDAOService {
165
- static readonly ID_COLUMN_CODE: string;
166
- get methods(): KokosEntityDAOServiceMethods;
167
- protected abstract findById(context: ExecutionContext, id: string): Promise<EntitySlice>;
168
- protected abstract findMany(context: ExecutionContext, ids: string[]): Promise<EntitySlice[]>;
169
- protected abstract findAll(context: ExecutionContext): Promise<EntitySlice[]>;
170
- protected abstract create(context: ExecutionContext, slice: EntitySlice): Promise<EntitySlice>;
171
- protected abstract update(context: ExecutionContext, slice: EntitySlice): Promise<void>;
172
- protected abstract delete(context: ExecutionContext, id: string): Promise<void>;
173
- /**
174
- * FND.BID: Finds an entity by its Id.
175
- * Signature: F(EXB;XXX;FND.BID) 1([T];[P];[K])
176
- */
177
- "FND.BID"(fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter): Promise<void>;
178
- /**
179
- * FND.ALL: Finds all entities.
180
- * Signature: F(EXB;XXX;FND.ALL) 1(OG;;[T][P])
181
- */
182
- "FND.ALL"(fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter): Promise<void>;
183
- /**
184
- * FND.MNY: Finds a set of entities based on provided Ids.
185
- * Signature: F(EXB;XXX;FND.MNY) 1(OG;;[T][P]) INPUT(IDS(xxx;yyy;zzz))
186
- */
187
- "FND.MNY"(fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter): Promise<void>;
188
- /**
189
- * DEL.BID: Deletes an entity and sends a feedback message.
190
- * Signature: F(FBK;XXX;DEL.BID) 1([T];[P];[K])
191
- */
192
- "DEL.BID"(fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter): Promise<void>;
193
- /**
194
- * INS.NEW: Adds a new entity with provided oavs and returns a feedback.
195
- * Signature: F(EXB;XXX;INS.NEW) 1([T];[P];[K]) INPUT(OAVS(oav_key(oav_value) ...))
196
- */
197
- "INS.NEW"(fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter): Promise<void>;
198
- /**
199
- * UPD.BID: Updates a new entity with provided oavs and returns a feedback.
200
- * Signature: F(EXB;XXX;UPD.BID) 1([T];[P];[K]) INPUT(OAVS(oav_key(oav_value) ...))
201
- */
202
- "UPD.BID"(fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter): Promise<void>;
203
- }
204
- /**
205
- * KokosInputPanelService is a specific KokosService used to handle input panels.
206
- */
207
- export interface IKokosInputPanelService {
208
- methods: KokosInputPanelServiceMethods;
209
- }
210
- export interface KokosInputPanelServiceMethods {
211
- /** F(EXB;XXX;*INIT) */
212
- "*INIT": (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
213
- /** F(EXB;XXX;*UPDATE) INPUT(BEFORE() AFTER()) */
214
- "*UPDATE": (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
215
- /** F(EXB;XXX;*SETUP) */
216
- "*SETUP": (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
217
- /** F(FBK;XXX;*EXIT) */
218
- "*EXIT": (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
219
- /** F(FBK;XXX;*CHECK) */
220
- "*CHECK": (fun: Fun, context: ExecutionContext, printer: SmeupDataStructureWriter) => Promise<void>;
221
- }
@@ -1,9 +0,0 @@
1
- export declare enum YesNo {
2
- Yes = "Yes",
3
- No = "No"
4
- }
5
- export declare enum FunStatus {
6
- RUNNING = "RUNNING",
7
- COMPLETED = "COMPLETED",
8
- FAILED = "FAILED"
9
- }
@@ -1,6 +0,0 @@
1
- import { ExecutionContext, Fun } from "../types/general.js";
2
- import { FunStatus } from "../types/helpers.js";
3
- export declare function isBatch(context: ExecutionContext): boolean;
4
- export declare function trackFun(meId: string, context: ExecutionContext, fun: Fun, status: FunStatus, exception?: Error): Promise<void>;
5
- export declare function trackProgress(context: ExecutionContext, progress: number): Promise<void>;
6
- export declare function probe(context: ExecutionContext): Promise<boolean>;
@@ -1,8 +0,0 @@
1
- import { SmeupDataCell } from "../types/data-structures/smeupDataTable.js";
2
- export declare function toTextButtonCell(value: string): SmeupDataCell;
3
- export declare function toIconButtonCell(k: string, icon: string, value: string): SmeupDataCell;
4
- export declare function toSingleChipCell(value: string): SmeupDataCell;
5
- export declare function toDateCell(value: string | Date): SmeupDataCell;
6
- export declare function toTimeCell(value: string | Date): SmeupDataCell;
7
- export declare function toStringCell(value?: string): SmeupDataCell;
8
- export declare function toNumberCell(value: string): SmeupDataCell;
@@ -1,8 +0,0 @@
1
- import { Writable } from "stream";
2
- import { SmeupDataStructure } from "../../src/types/data-structures/smeupDataStructure.js";
3
- export declare class DataStructureStream<T extends SmeupDataStructure> extends Writable {
4
- private chunks;
5
- constructor();
6
- _write(chunk: Buffer, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
7
- getDataStructure(): T;
8
- }
@@ -1,4 +0,0 @@
1
- import { Fun, FunObject } from "../types/general.js";
2
- export declare function funToString(fun: Fun): string;
3
- export declare function funObjectToString(obj: FunObject): string;
4
- export declare function stringToFun(funString: string): Fun;
@@ -1,5 +0,0 @@
1
- /**
2
- * Get the project root
3
- * @returns
4
- */
5
- export declare function getProjectRoot(): string;
@@ -1,48 +0,0 @@
1
- /**
2
- * Parse key(value) expression NB. Nested brackets must be even
3
- *
4
- * @param expression
5
- * @return
6
- */
7
- export declare function parseKeyValueBetweenBrackets(expression: string): {
8
- [key: string]: string;
9
- };
10
- /**
11
- * Parses a flat string with nested objects into a structured array of objects
12
- * @param input A string in the format "key1(value1) key2(key21(value21) key22(value22))[separator]key1(value1)"
13
- * @param separator The char that will be used to split the input string. Defaults to ';'
14
- * @returns An array of structured objects
15
- */
16
- export declare function parseArrayString(input: string, separator?: string): any[];
17
- export interface UpdateResult {
18
- rowNumber: number;
19
- operation: string;
20
- values: {
21
- [key: string]: string;
22
- };
23
- }
24
- /**
25
- * Parse ROW () OP() VALUES(BEFORE() AFTER()) payload from *UPDATE service
26
- *
27
- * @param fun input string in the format "INPUT(ROW(rowNumber) OP(operation) VALUES(BEFORE(key1(value1) key2(value2)) AFTER(key3(value3) key4(value4));)"
28
- * @return An array with an object for each row, with keys and values, where values are the latest ones from AFTER or BEFORE
29
- */
30
- export declare function parseUpdatePayloadMultipleRows(input: string): UpdateResult[];
31
- /**
32
- * Parse BEFORE() AFTER() payload from *UPDATE service
33
- *
34
- * @param fun input string in the format "INPUT(BEFORE(key1(value1) key2(value2)) AFTER(key3(value3) key4(value4)))"
35
- * @return An object with keys and values, where values are the latest ones from AFTER or BEFORE
36
- */
37
- export declare function parseUpdatePayload(input: string): {
38
- [key: string]: string;
39
- };
40
- /**
41
- * Parse key(value) pairs from a string in the format "INPUT(BEFORE(key1(;;value1) key2(;;value2)) AFTER(key3(;;value3) key4(;;value4)))"
42
- *
43
- * @param raw Input string containing key(value) pairs
44
- * @return An object where keys are the field names and values are the corresponding values (ignoring the ";;" prefix)
45
- */
46
- export declare function parseFieldValues(raw: string): {
47
- [key: string]: string;
48
- };
@@ -1,49 +0,0 @@
1
- import stream from "stream";
2
- import { ApiVersion, SmeupAction, SmeupMessage, SmeupSetup, SmeupVariable } from "../types/data-structures/smeupDataStructure.js";
3
- import { Fun } from "../types/general.js";
4
- import { SmeupDataNode } from "../types/data-structures/smeupDataTree.js";
5
- import { SmeupDataColumn, SmeupDataRow } from "../types/data-structures/smeupDataTable.js";
6
- import { SmeupSch } from "../types/data-structures/smeupSch.js";
7
- export declare class SmeupDataStructureWriter {
8
- #private;
9
- private out;
10
- private version;
11
- private initalTimestamp;
12
- private messages;
13
- private dataColumns;
14
- private variables;
15
- private actions;
16
- private setup;
17
- private firstElement;
18
- private lastElementWritten;
19
- private isInitializationWritten;
20
- private isFinalizationWritten;
21
- private isColumnWritten;
22
- private isRowWritten;
23
- private isNodeWritten;
24
- constructor(out: stream.Writable, version?: ApiVersion);
25
- writeDataStructureInitialization(fun: Fun): void;
26
- writeDataStructureFinalization(fun: Fun): void;
27
- /**
28
- * Write a SmeupDataNode instance to stream
29
- * @param node
30
- */
31
- writeDataNode(node: SmeupDataNode): void;
32
- /**
33
- * Write SmeupDataColumns
34
- * @param columns
35
- */
36
- writeDataColumns(columns: SmeupDataColumn[]): void;
37
- /**
38
- * Write a SmeupDataColumn
39
- * @param col
40
- */
41
- writeDataColumn(col: SmeupDataColumn): void;
42
- writeDataRow(row: SmeupDataRow): void;
43
- writeSmeupSch(scheda: SmeupSch): void;
44
- writeMessage(message: SmeupMessage): void;
45
- writeVariable(variable: SmeupVariable): void;
46
- writeRawData(rawData: string): void;
47
- writeAction(action: SmeupAction): void;
48
- writeSetup(setup: SmeupSetup): void;
49
- }