@docupace/ihub-config 1.1.28 → 1.1.30

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 (37) hide show
  1. package/README.md +182 -182
  2. package/dist/config-service.d.ts.map +1 -1
  3. package/dist/config-service.js +30 -21
  4. package/dist/config-service.js.map +1 -1
  5. package/dist/model/graphs/config/common.graphql +7 -7
  6. package/dist/model/graphs/config/fields.graphql +454 -442
  7. package/dist/model/graphs/config/menu.graphql +60 -60
  8. package/dist/model/graphs/config/mutation.graphql +30 -30
  9. package/dist/model/graphs/config/page.graphql +283 -264
  10. package/dist/model/graphs/config/panel.graphql +43 -37
  11. package/dist/model/graphs/config/query.graphql +93 -93
  12. package/dist/model/graphs/config/rules.graphql +116 -116
  13. package/dist/model/graphs/config/selectOptions.graphql +48 -48
  14. package/dist/model/graphs/config/table.graphql +231 -228
  15. package/dist/model/graphs/config/tests.graphql +16 -16
  16. package/dist/model/graphs/config/theme.graphql +41 -41
  17. package/dist/model/graphs/config/ui-components.graphql +11 -11
  18. package/dist/model/graphs/domains/scalars.graphql +3 -3
  19. package/dist/model/graphs/filter.graphql +5 -5
  20. package/dist/model/graphs/schema.graphql +7 -7
  21. package/model/graphs/config/common.graphql +7 -7
  22. package/model/graphs/config/fields.graphql +454 -442
  23. package/model/graphs/config/menu.graphql +60 -60
  24. package/model/graphs/config/mutation.graphql +30 -30
  25. package/model/graphs/config/page.graphql +283 -264
  26. package/model/graphs/config/panel.graphql +43 -37
  27. package/model/graphs/config/query.graphql +93 -93
  28. package/model/graphs/config/rules.graphql +116 -116
  29. package/model/graphs/config/selectOptions.graphql +48 -48
  30. package/model/graphs/config/table.graphql +231 -228
  31. package/model/graphs/config/tests.graphql +16 -16
  32. package/model/graphs/config/theme.graphql +41 -41
  33. package/model/graphs/config/ui-components.graphql +11 -11
  34. package/model/graphs/domains/scalars.graphql +3 -3
  35. package/model/graphs/filter.graphql +5 -5
  36. package/model/graphs/schema.graphql +7 -7
  37. package/package.json +83 -81
@@ -1,93 +1,93 @@
1
-
2
- type PageQuery {
3
- """
4
- impersonateRoleId / impersonateGeneral: preview this page's config as
5
- someone else would see it — either a specific role (impersonateRoleId)
6
- or the site default with no role/personal override at all
7
- (impersonateGeneral) — restricted to admins by the host's identity
8
- resolution (see docupace-graphql-server's resolveCurrentIdentity), which
9
- throws for a non-admin caller.
10
- """
11
- getPageConfig(path: String, context: JSON, impersonateRoleId: ID, impersonateGeneral: Boolean): Page
12
- getAIConfig(path: String, context: JSON): JSON
13
- }
14
-
15
- type RulesQuery {
16
- getRuleGroups(context: JSON): [RuleGroup!]!
17
- }
18
-
19
- type WidgetQuery {
20
- list(search: String) : [Widget!]
21
- get(path : String) : Widget
22
- }
23
-
24
- type ThemeQuery {
25
- get(path: String): Theme
26
- }
27
-
28
- """
29
- Input for querying dynamic menus
30
- """
31
- input MenuInput {
32
- """
33
- The menu reference/key that identifies which menu to load.
34
- The resolver can use this key to load menu items from any source:
35
- database, external API, cache, business logic, YAML config, etc.
36
- """
37
- menuRef: String!
38
- }
39
-
40
- """
41
- Query for loading dynamic menu items by reference key.
42
- """
43
- type MenuQuery {
44
- """
45
- Get menu items by reference key.
46
- """
47
- get(input: MenuInput!): [MenuItem!]
48
- }
49
-
50
- type ConfigQuery {
51
- pages: PageQuery
52
- widgets: WidgetQuery
53
- tests: TestQuery
54
- themes: ThemeQuery
55
- data: DataQuery
56
- rules: RulesQuery
57
- menus: MenuQuery
58
- }
59
-
60
- type DataQuery {
61
- get(path : String) : [DataResult!]
62
- list(path : String) : [String]
63
- getSeedConfig(path: String): SeedConfigResult
64
- }
65
-
66
- type DataResult {
67
- config: DataConfig
68
- data: JSON!
69
- }
70
-
71
- type DataConfig {
72
- severity: String
73
- }
74
-
75
- type SeedConfigResult {
76
- typeName: String!
77
- updateMethod: String
78
- updateInputType: String
79
- createMethod: String
80
- createInputType: String
81
- referenceByIdPaths: [String]
82
- referencePaths: [String]
83
- doNotUpdate: Boolean
84
- doNotDelete: Boolean
85
- uniqueColumns: [String]
86
- dependsOn: [String]
87
- }
88
-
89
- type GQLQuery {
90
- queryName: String
91
- operationName: String
92
- variableDefinitions: JSON
93
- }
1
+
2
+ type PageQuery {
3
+ """
4
+ impersonateRoleId / impersonateGeneral: preview this page's config as
5
+ someone else would see it — either a specific role (impersonateRoleId)
6
+ or the site default with no role/personal override at all
7
+ (impersonateGeneral) — restricted to admins by the host's identity
8
+ resolution (see docupace-graphql-server's resolveCurrentIdentity), which
9
+ throws for a non-admin caller.
10
+ """
11
+ getPageConfig(path: String, context: JSON, impersonateRoleId: ID, impersonateGeneral: Boolean): Page
12
+ getAIConfig(path: String, context: JSON): JSON
13
+ }
14
+
15
+ type RulesQuery {
16
+ getRuleGroups(context: JSON): [RuleGroup!]!
17
+ }
18
+
19
+ type WidgetQuery {
20
+ list(search: String) : [Widget!]
21
+ get(path : String) : Widget
22
+ }
23
+
24
+ type ThemeQuery {
25
+ get(path: String): Theme
26
+ }
27
+
28
+ """
29
+ Input for querying dynamic menus
30
+ """
31
+ input MenuInput {
32
+ """
33
+ The menu reference/key that identifies which menu to load.
34
+ The resolver can use this key to load menu items from any source:
35
+ database, external API, cache, business logic, YAML config, etc.
36
+ """
37
+ menuRef: String!
38
+ }
39
+
40
+ """
41
+ Query for loading dynamic menu items by reference key.
42
+ """
43
+ type MenuQuery {
44
+ """
45
+ Get menu items by reference key.
46
+ """
47
+ get(input: MenuInput!): [MenuItem!]
48
+ }
49
+
50
+ type ConfigQuery {
51
+ pages: PageQuery
52
+ widgets: WidgetQuery
53
+ tests: TestQuery
54
+ themes: ThemeQuery
55
+ data: DataQuery
56
+ rules: RulesQuery
57
+ menus: MenuQuery
58
+ }
59
+
60
+ type DataQuery {
61
+ get(path : String) : [DataResult!]
62
+ list(path : String) : [String]
63
+ getSeedConfig(path: String): SeedConfigResult
64
+ }
65
+
66
+ type DataResult {
67
+ config: DataConfig
68
+ data: JSON!
69
+ }
70
+
71
+ type DataConfig {
72
+ severity: String
73
+ }
74
+
75
+ type SeedConfigResult {
76
+ typeName: String!
77
+ updateMethod: String
78
+ updateInputType: String
79
+ createMethod: String
80
+ createInputType: String
81
+ referenceByIdPaths: [String]
82
+ referencePaths: [String]
83
+ doNotUpdate: Boolean
84
+ doNotDelete: Boolean
85
+ uniqueColumns: [String]
86
+ dependsOn: [String]
87
+ }
88
+
89
+ type GQLQuery {
90
+ queryName: String
91
+ operationName: String
92
+ variableDefinitions: JSON
93
+ }
@@ -1,116 +1,116 @@
1
- type RuleGroup {
2
- name: String
3
- description: String
4
-
5
- """Type to apply the role group to. For example IContact or BaseWorkItem"""
6
- type: String
7
- """Condition to define which rule groups will be applied. like for example custodian or registrationType"""
8
- condition: String
9
-
10
- """Priority defined when multiple rule groups are matched. Higher value wins."""
11
- priority: Int
12
- fieldRules: [IFieldRule!]!
13
-
14
- """Custom validators that are not individual field rules (e.g. validation across multiple fields or collections)."""
15
- validationRules: [ValidationRule!]
16
- }
17
-
18
- union ValidationRule = ArrayTotalRule | ArrayCountRule
19
-
20
- type ArrayTotalRule {
21
- name: String
22
- message: String!
23
-
24
- """Path to the collection whose elements should be validated."""
25
- path: String!
26
-
27
- """Field from each matching collection element to include in the sum."""
28
- fieldToSum: String!
29
-
30
- """Expected sum of the selected field values."""
31
- expectedTotal: Int!
32
-
33
- """Optional condition used to select collection elements."""
34
- filterCondition: String
35
-
36
- """Determines whether empty data should be considered valid."""
37
- emptyIsValid: Boolean
38
- }
39
-
40
- """Validates that the combined count of entries across multiple collections does not exceed a maximum."""
41
- type ArrayCountRule {
42
- name: String
43
- message: String!
44
-
45
- """Paths to the collections whose combined count should be validated."""
46
- paths: [String!]!
47
-
48
- """Maximum combined number of entries across all specified paths."""
49
- maxCount: Int!
50
- }
51
-
52
- interface IFieldRule {
53
- defaultValue: String
54
- messageLabel: String
55
- path: String!
56
- readonly: Boolean
57
- required: Boolean
58
- requiredCondition: String
59
- availabilityCondition: String # maps to visibilityCondition on UI
60
- }
61
-
62
- type ListFieldRule implements IFieldRule {
63
- defaultValue: String
64
- messageLabel: String
65
- path: String!
66
- readonly: Boolean
67
- required: Boolean
68
- requiredCondition: String
69
- availabilityCondition: String # maps to visibilityCondition on UI
70
- validationRules: [ListFieldValidationRule!]
71
- validation: GenericFieldValidation
72
- }
73
-
74
- type ListFieldValidationRule {
75
- condition: String
76
- errorMessage: String
77
- }
78
-
79
- type StringFieldRule implements IFieldRule {
80
- defaultValue: String
81
- maxLength: Int
82
- messageLabel: String
83
- minLength: Int
84
- path: String!
85
- readonly: Boolean
86
- required: Boolean
87
- requiredCondition: String
88
- type: FieldValueType
89
- validation: InputValidation
90
- availabilityCondition: String
91
- }
92
-
93
- type BooleanFieldRule implements IFieldRule {
94
- defaultValue: String
95
- messageLabel: String
96
- path: String!
97
- readonly: Boolean
98
- required: Boolean
99
- requiredCondition: String
100
- validation: InputValidation
101
- availabilityCondition: String
102
- }
103
-
104
-
105
- type DateFieldRule implements IFieldRule {
106
- defaultValue: String
107
- messageLabel: String
108
- path: String!
109
- readonly: Boolean
110
- required: Boolean
111
- requiredCondition: String
112
- availabilityCondition: String # maps to visibilityCondition on UI
113
- minDate: String # e.q. "now" or "2025-03-20"
114
- maxDate: String # e.q. "now" or "2025-03-20"
115
- validation: GenericFieldValidation
116
- }
1
+ type RuleGroup {
2
+ name: String
3
+ description: String
4
+
5
+ """Type to apply the role group to. For example IContact or BaseWorkItem"""
6
+ type: String
7
+ """Condition to define which rule groups will be applied. like for example custodian or registrationType"""
8
+ condition: String
9
+
10
+ """Priority defined when multiple rule groups are matched. Higher value wins."""
11
+ priority: Int
12
+ fieldRules: [IFieldRule!]!
13
+
14
+ """Custom validators that are not individual field rules (e.g. validation across multiple fields or collections)."""
15
+ validationRules: [ValidationRule!]
16
+ }
17
+
18
+ union ValidationRule = ArrayTotalRule | ArrayCountRule
19
+
20
+ type ArrayTotalRule {
21
+ name: String
22
+ message: String!
23
+
24
+ """Path to the collection whose elements should be validated."""
25
+ path: String!
26
+
27
+ """Field from each matching collection element to include in the sum."""
28
+ fieldToSum: String!
29
+
30
+ """Expected sum of the selected field values."""
31
+ expectedTotal: Int!
32
+
33
+ """Optional condition used to select collection elements."""
34
+ filterCondition: String
35
+
36
+ """Determines whether empty data should be considered valid."""
37
+ emptyIsValid: Boolean
38
+ }
39
+
40
+ """Validates that the combined count of entries across multiple collections does not exceed a maximum."""
41
+ type ArrayCountRule {
42
+ name: String
43
+ message: String!
44
+
45
+ """Paths to the collections whose combined count should be validated."""
46
+ paths: [String!]!
47
+
48
+ """Maximum combined number of entries across all specified paths."""
49
+ maxCount: Int!
50
+ }
51
+
52
+ interface IFieldRule {
53
+ defaultValue: String
54
+ messageLabel: String
55
+ path: String!
56
+ readonly: Boolean
57
+ required: Boolean
58
+ requiredCondition: String
59
+ availabilityCondition: String # maps to visibilityCondition on UI
60
+ }
61
+
62
+ type ListFieldRule implements IFieldRule {
63
+ defaultValue: String
64
+ messageLabel: String
65
+ path: String!
66
+ readonly: Boolean
67
+ required: Boolean
68
+ requiredCondition: String
69
+ availabilityCondition: String # maps to visibilityCondition on UI
70
+ validationRules: [ListFieldValidationRule!]
71
+ validation: GenericFieldValidation
72
+ }
73
+
74
+ type ListFieldValidationRule {
75
+ condition: String
76
+ errorMessage: String
77
+ }
78
+
79
+ type StringFieldRule implements IFieldRule {
80
+ defaultValue: String
81
+ maxLength: Int
82
+ messageLabel: String
83
+ minLength: Int
84
+ path: String!
85
+ readonly: Boolean
86
+ required: Boolean
87
+ requiredCondition: String
88
+ type: FieldValueType
89
+ validation: InputValidation
90
+ availabilityCondition: String
91
+ }
92
+
93
+ type BooleanFieldRule implements IFieldRule {
94
+ defaultValue: String
95
+ messageLabel: String
96
+ path: String!
97
+ readonly: Boolean
98
+ required: Boolean
99
+ requiredCondition: String
100
+ validation: InputValidation
101
+ availabilityCondition: String
102
+ }
103
+
104
+
105
+ type DateFieldRule implements IFieldRule {
106
+ defaultValue: String
107
+ messageLabel: String
108
+ path: String!
109
+ readonly: Boolean
110
+ required: Boolean
111
+ requiredCondition: String
112
+ availabilityCondition: String # maps to visibilityCondition on UI
113
+ minDate: String # e.q. "now" or "2025-03-20"
114
+ maxDate: String # e.q. "now" or "2025-03-20"
115
+ validation: GenericFieldValidation
116
+ }
@@ -1,48 +1,48 @@
1
- interface ISelectOptions {
2
- type: String
3
- }
4
-
5
- type SelectOptionsFilter {
6
- path: String
7
- }
8
-
9
- type QuerySelectOptions implements ISelectOptions {
10
- type: String
11
- labelProp: String # defaults to "name" in ui
12
- labelExpression: String # JS expression evaluated against each option (e.g. "`${option.name} (${option.internalId})`"); takes precedence over labelProp when set
13
- valueProp: String # defaults to "id" in ui
14
- queryName: String!
15
- variableDefinitions: JSON
16
- variables: JSON
17
- paths: [String!]!
18
- operationName: String
19
- expression: String
20
- maxRows: Int
21
- variablesExpressions: JSON
22
- responsePathPrefix: String
23
- where: WhereFilterConfig
24
- filter: SelectOptionsFilter
25
- excludeId: Boolean
26
- queryOnTyping: Boolean # if true, query will be triggered on typing
27
- minLength: Int # minimum length of input to trigger query
28
- }
29
-
30
- type ValueSelectOptions implements ISelectOptions {
31
- type: String
32
- values: [SelectValue!]!
33
- }
34
-
35
- type SelectValue {
36
- label: String!
37
- value: JSON!
38
- }
39
-
40
- type DropdownSelectOptions implements ISelectOptions {
41
- type: String
42
- dropdownName: String!
43
- }
44
-
45
- type WhereFilterConfig {
46
- type: String!
47
- value: JSON
48
- }
1
+ interface ISelectOptions {
2
+ type: String
3
+ }
4
+
5
+ type SelectOptionsFilter {
6
+ path: String
7
+ }
8
+
9
+ type QuerySelectOptions implements ISelectOptions {
10
+ type: String
11
+ labelProp: String # defaults to "name" in ui
12
+ labelExpression: String # JS expression evaluated against each option (e.g. "`${option.name} (${option.internalId})`"); takes precedence over labelProp when set
13
+ valueProp: String # defaults to "id" in ui
14
+ queryName: String!
15
+ variableDefinitions: JSON
16
+ variables: JSON
17
+ paths: [String!]!
18
+ operationName: String
19
+ expression: String
20
+ maxRows: Int
21
+ variablesExpressions: JSON
22
+ responsePathPrefix: String
23
+ where: WhereFilterConfig
24
+ filter: SelectOptionsFilter
25
+ excludeId: Boolean
26
+ queryOnTyping: Boolean # if true, query will be triggered on typing
27
+ minLength: Int # minimum length of input to trigger query
28
+ }
29
+
30
+ type ValueSelectOptions implements ISelectOptions {
31
+ type: String
32
+ values: [SelectValue!]!
33
+ }
34
+
35
+ type SelectValue {
36
+ label: String!
37
+ value: JSON!
38
+ }
39
+
40
+ type DropdownSelectOptions implements ISelectOptions {
41
+ type: String
42
+ dropdownName: String!
43
+ }
44
+
45
+ type WhereFilterConfig {
46
+ type: String!
47
+ value: JSON
48
+ }