@docupace/ihub-config 1.1.20 → 1.1.21

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.
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/types/graphql.ts"],"names":[],"mappings":"AA4CA,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,4CAAqB,CAAA;IACrB,wCAAiB,CAAA;IACjB,yDAAkC,CAAA;AACpC,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAscD,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,6BAAW,CAAA;AACb,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AA0UD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAsZD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,yCAAmB,CAAA;AACrB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAwBD,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,sCAAe,CAAA;AACjB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B"}
1
+ {"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/types/graphql.ts"],"names":[],"mappings":"AA4CA,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,4CAAqB,CAAA;IACrB,wCAAiB,CAAA;IACjB,yDAAkC,CAAA;AACpC,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AA0dD,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,6BAAW,CAAA;AACb,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAkVD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AA2ZD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,yCAAmB,CAAA;AACrB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAwBD,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,sCAAe,CAAA;AACjB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B"}
@@ -1,80 +1,104 @@
1
-
2
1
  type RuleGroup {
3
- name: String
4
- description: String
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
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!
5
32
 
6
- """Type to apply the role group to. For example IContact or BaseWorkItem"""
7
- type: String
8
- """Condition to define which rule groups will be applied. like for example custodian or registrationType"""
9
- condition: String
33
+ """Optional condition used to select collection elements."""
34
+ filterCondition: String
10
35
 
11
- """Priority defined when multiple rule groups are matched. Higher value wins."""
12
- priority: Int
13
- fieldRules: [IFieldRule!]!
36
+ """Determines whether empty data should be considered valid."""
37
+ emptyIsValid: Boolean
14
38
  }
15
39
 
16
40
  interface IFieldRule {
17
- defaultValue: String
18
- messageLabel: String
19
- path: String!
20
- readonly: Boolean
21
- required: Boolean
22
- requiredCondition: String
23
- availabilityCondition: String # maps to visibilityCondition on UI
41
+ defaultValue: String
42
+ messageLabel: String
43
+ path: String!
44
+ readonly: Boolean
45
+ required: Boolean
46
+ requiredCondition: String
47
+ availabilityCondition: String # maps to visibilityCondition on UI
24
48
  }
25
49
 
26
50
  type ListFieldRule implements IFieldRule {
27
- defaultValue: String
28
- messageLabel: String
29
- path: String!
30
- readonly: Boolean
31
- required: Boolean
32
- requiredCondition: String
33
- availabilityCondition: String # maps to visibilityCondition on UI
34
- validationRules: [ValidationRule!]
35
- validation: FieldValidation
51
+ defaultValue: String
52
+ messageLabel: String
53
+ path: String!
54
+ readonly: Boolean
55
+ required: Boolean
56
+ requiredCondition: String
57
+ availabilityCondition: String # maps to visibilityCondition on UI
58
+ validationRules: [ListFieldValidationRule!]
59
+ validation: FieldValidation
36
60
  }
37
61
 
38
- type ValidationRule {
39
- condition: String
40
- errorMessage: String
62
+ type ListFieldValidationRule {
63
+ condition: String
64
+ errorMessage: String
41
65
  }
42
66
 
43
67
  type StringFieldRule implements IFieldRule {
44
- defaultValue: String
45
- maxLength: Int
46
- messageLabel: String
47
- minLength: Int
48
- path: String!
49
- readonly: Boolean
50
- required: Boolean
51
- requiredCondition: String
52
- type: FieldValueType
53
- validation: InputValidation
54
- availabilityCondition: String
68
+ defaultValue: String
69
+ maxLength: Int
70
+ messageLabel: String
71
+ minLength: Int
72
+ path: String!
73
+ readonly: Boolean
74
+ required: Boolean
75
+ requiredCondition: String
76
+ type: FieldValueType
77
+ validation: InputValidation
78
+ availabilityCondition: String
55
79
  }
56
80
 
57
81
  type BooleanFieldRule implements IFieldRule {
58
- defaultValue: String
59
- messageLabel: String
60
- path: String!
61
- readonly: Boolean
62
- required: Boolean
63
- requiredCondition: String
64
- validation: InputValidation
65
- availabilityCondition: String
82
+ defaultValue: String
83
+ messageLabel: String
84
+ path: String!
85
+ readonly: Boolean
86
+ required: Boolean
87
+ requiredCondition: String
88
+ validation: InputValidation
89
+ availabilityCondition: String
66
90
  }
67
91
 
68
92
 
69
93
  type DateFieldRule implements IFieldRule {
70
- defaultValue: String
71
- messageLabel: String
72
- path: String!
73
- readonly: Boolean
74
- required: Boolean
75
- requiredCondition: String
76
- availabilityCondition: String # maps to visibilityCondition on UI
77
- minDate: String # e.q. "now" or "2025-03-20"
78
- maxDate: String # e.q. "now" or "2025-03-20"
79
- validation: FieldValidation
94
+ defaultValue: String
95
+ messageLabel: String
96
+ path: String!
97
+ readonly: Boolean
98
+ required: Boolean
99
+ requiredCondition: String
100
+ availabilityCondition: String # maps to visibilityCondition on UI
101
+ minDate: String # e.q. "now" or "2025-03-20"
102
+ maxDate: String # e.q. "now" or "2025-03-20"
103
+ validation: FieldValidation
80
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/ihub-config",
3
- "version": "1.1.20",
3
+ "version": "1.1.21",
4
4
  "description": "Reusable config GraphQL extension and standalone server",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",