-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschemas.go
244 lines (222 loc) · 9.75 KB
/
schemas.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
package squeeze_go_client
import "time"
type BoundingBox struct {
Page int `json:"page"`
X0 int `json:"x0"`
Y0 int `json:"y0"`
X1 int `json:"x1"`
Y1 int `json:"y1"`
}
type CreatedIntDto struct {
Id int `json:"id"`
}
type Document struct {
Id int `json:"id"`
Name string `json:"name"`
RepoPath string `json:"repoPath"`
BatchClassId int `json:"batchClassId"`
DocumentClassId int `json:"documentClassId"`
ExternalId string `json:"externalId"`
CreatedBy int `json:"createdBy"`
CreatedAt time.Time `json:"createdAt"`
ModifiedBy int `json:"modifiedBy"`
ModifiedAt time.Time `json:"modifiedAt"`
DeletedBy int `json:"deletedBy"`
DeletedTs time.Time `json:"deletedTs"`
WorkflowContext *WorkflowContext `json:"workflowContext"`
FieldGroups []*DocumentFieldGroup `json:"fieldGroups"`
Fields []*DocumentField `json:"fields"`
Tables []*DocumentTable `json:"tables"`
}
type DocumentField struct {
Id int `json:"id"`
DocumentClassId int `json:"documentClassId"`
SortOrder int `json:"sortOrder"`
FieldGroupId int `json:"fieldGroupId"`
LocatorId int `json:"locatorId"`
Name string `json:"name"`
Description string `json:"description"`
DataType string `json:"dataType"`
TranslationKey string `json:"translationKey"`
TranslatedDescription string `json:"translatedDescription"`
Value *DocumentFieldValue `json:"value"`
DefaultValue string `json:"defaultValue"`
SameLineAsPreviousField bool `json:"sameLineAsPreviousField"`
Alternatives []*DocumentFieldValue `json:"alternatives"`
SubFieldName string `json:"subFieldName"`
Mandatory bool `json:"mandatory"`
Readonly bool `json:"readonly"`
Hidden bool `json:"hidden"`
ForceValidation bool `json:"forceValidation"`
State string `json:"state"`
ExternalName string `json:"externalName"`
Lookup *LookupDefinition `json:"lookup"`
}
type DocumentFieldValue struct {
Id int `json:"id"`
Value string `json:"value"`
BoundingBox *BoundingBox `json:"boundingBox"`
Alternative bool `json:"alternative"`
FieldId int `json:"fieldId"`
Confidence int `json:"confidence"`
SubFieldName string `json:"subFieldName"`
State string `json:"state"`
ErrorText string `json:"errorText"`
Subfields []string `json:"subfields"`
}
type LookupDefinition struct {
Active bool `json:"active"`
AllowCustomValues bool `json:"allowCustomValues"`
TableId int `json:"tableId"`
ResultKeyColumnId int `json:"resultKeyColumnId"`
SearchColumnIds []int `json:"searchColumnIds"`
ResultValueColumnIds []int `json:"resultValueColumnIds"`
LookupFieldFilters []struct {
Id int `json:"id"`
DocumentFieldId int `json:"documentFieldId"`
MasterDataColumnId int `json:"masterDataColumnId"`
Operand string `json:"operand"`
ValueFieldId int `json:"valueFieldId"`
RowBasedFilter bool `json:"rowBasedFilter"`
} `json:"lookupFieldFilters"`
MinInputLength int `json:"minInputLength"`
IgnoreInputValue bool `json:"ignoreInputValue"`
MaxLookupResultValues int `json:"maxLookupResultValues"`
}
type DocumentTable struct {
Id int `json:"id"`
DocumentClassId int `json:"documentClassId"`
// removed because not actively being used
// FieldGroupId int `json:"fieldGroupId"`
LocatorId int `json:"locatorId"`
Name string `json:"name"`
Description string `json:"description"`
Mandatory bool `json:"mandatory"`
Readonly bool `json:"readonly"`
Hidden bool `json:"hidden"`
ForceValidation bool `json:"forceValidation"`
ExternalName string `json:"externalName"`
Columns []*DocumentTableColumn `json:"columns"`
Rows []*DocumentTableRow `json:"rows"`
State string `json:"state"`
ErrorText string `json:"errorText"`
ErrorCode int `json:"errorCode"`
TableBehaviour string `json:"tableBehaviour"`
TranslationKey string `json:"translationKey"`
TranslatedDescription string `json:"translatedDescription"`
}
type DocumentTableColumn struct {
Id int `json:"id"`
SortOrder int `json:"sortOrder"`
TableId int `json:"tableId"`
HeaderLocatorId int `json:"headerLocatorId"`
ValueLocatorId int `json:"valueLocatorId"`
Name string `json:"name"`
Description string `json:"description"`
DataType string `json:"dataType"`
Mandatory bool `json:"mandatory"`
Readonly bool `json:"readonly"`
Hidden bool `json:"hidden"`
ForceValidation bool `json:"forceValidation"`
ExternalName string `json:"externalName"`
Lookup *LookupDefinition `json:"lookup"`
TranslationKey string `json:"translationKey"`
TranslatedDescription string `json:"translatedDescription"`
}
type DocumentTableRow struct {
Value *DocumentFieldValue `json:"value"`
Cells []*DocumentTableCell `json:"cells"`
State string `json:"state"`
ErrorText string `json:"errorText"`
ErrorCode int `json:"errorCode"`
}
type DocumentTableCell struct {
Id int `json:"id"`
ColumnId int `json:"columnId"`
ColumnName string `json:"columnName"`
Value string `json:"value"`
RowId int `json:"rowId"`
BoundingBox *BoundingBox `json:"boundingBox"`
Confidence int `json:"confidence"`
State string `json:"state"`
ErrorText string `json:"errorText"`
ErrorCode int `json:"errorCode"`
}
type DocumentFieldGroup struct {
Id int `json:"id"`
DocumentClassId int `json:"documentClassId"`
Name string `json:"name"`
Description string `json:"description"`
// removed because these are not actively being used.
// Type int `json:"type"`
// TableField string `json:"tableField"`
SortOrder int `json:"sortOrder"`
TranslationKey string `json:"translationKey"`
TranslatedDescription string `json:"translatedDescription"`
}
type DocumentClassDto struct {
Id int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
MaySeeDocuments bool `json:"maySeeDocuments"`
TranslationKey string `json:"translationKey"`
TranslatedDescription string `json:"translatedDescription"`
}
type DocumentClass = DocumentClassDto
type Job struct {
Id int `json:"id"`
Name string `json:"name"`
CronExpression string `json:"cronExpression"`
ScriptId string `json:"scriptId"`
Active bool `json:"active"`
}
type ScriptDto struct {
Id string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
Internal bool `json:"internal"`
}
type QueueEntryDto struct {
Id int `json:"id"`
DocumentId int `json:"documentId"`
WorkflowContext *WorkflowContext `json:"workflowContext"`
}
type QueueStepDto struct {
Name string `json:"name"`
Count int `json:"count"`
ErrorCount int `json:"errorCount"`
StepDetails []*QueueStepDetailsDto `json:"stepDetails"`
}
type QueueStepDetailsDto struct {
DocumentClass *DocumentClass `json:"documentClass"`
Count int `json:"count"`
ErrorCount int `json:"errorCount"`
}
type WorkflowContext struct {
Status string `json:"status"`
Step string `json:"step"`
CreatedTs time.Time `json:"createdTs"`
ModifiedTs time.Time `json:"modifiedTs"`
Priority int `json:"priority"`
Creator string `json:"creator"`
Receiver string `json:"receiver"`
ErrorText string `json:"errorText"`
LockedBy int `json:"lockedBy"`
LockedTs time.Time `json:"lockedTs"`
ValidatedBy int `json:"validatedBy"`
ValidatedTs time.Time `json:"validatedTs"`
SuspendedBy int `json:"suspendedBy"`
SuspendedTs time.Time `json:"suspendedTs"`
ExportedBy int `json:"exportedBy"`
ExportedTs time.Time `json:"exportedTs"`
}
type PaginationDto struct {
PageSize int `json:"pageSize"`
Page int `json:"page"`
Total int `json:"total"`
}
type PaginationResponse[T any] struct {
Pagination *PaginationDto `json:"pagination"`
Elements []T `json:"elements"`
}