@things-factory/dataset 9.0.1 → 9.0.3

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 (67) hide show
  1. package/dist-server/service/data-archive/data-archive-mutation.js +18 -6
  2. package/dist-server/service/data-archive/data-archive-mutation.js.map +1 -1
  3. package/dist-server/service/data-archive/data-archive-query.js +15 -5
  4. package/dist-server/service/data-archive/data-archive-query.js.map +1 -1
  5. package/dist-server/service/data-archive/data-archive-type.js +11 -8
  6. package/dist-server/service/data-archive/data-archive-type.js.map +1 -1
  7. package/dist-server/service/data-archive/data-archive.js +10 -5
  8. package/dist-server/service/data-archive/data-archive.js.map +1 -1
  9. package/dist-server/service/data-key-set/data-key-item-type.js +10 -8
  10. package/dist-server/service/data-key-set/data-key-item-type.js.map +1 -1
  11. package/dist-server/service/data-key-set/data-key-set-mutation.js +18 -6
  12. package/dist-server/service/data-key-set/data-key-set-mutation.js.map +1 -1
  13. package/dist-server/service/data-key-set/data-key-set-query.js +19 -6
  14. package/dist-server/service/data-key-set/data-key-set-query.js.map +1 -1
  15. package/dist-server/service/data-key-set/data-key-set-type.js +17 -11
  16. package/dist-server/service/data-key-set/data-key-set-type.js.map +1 -1
  17. package/dist-server/service/data-key-set/data-key-set.js +8 -3
  18. package/dist-server/service/data-key-set/data-key-set.js.map +1 -1
  19. package/dist-server/service/data-ooc/data-ooc-mutation.js +6 -2
  20. package/dist-server/service/data-ooc/data-ooc-mutation.js.map +1 -1
  21. package/dist-server/service/data-ooc/data-ooc-query.js +27 -9
  22. package/dist-server/service/data-ooc/data-ooc-query.js.map +1 -1
  23. package/dist-server/service/data-ooc/data-ooc-subscription.d.ts +5 -0
  24. package/dist-server/service/data-ooc/data-ooc-subscription.js +15 -1
  25. package/dist-server/service/data-ooc/data-ooc-subscription.js.map +1 -1
  26. package/dist-server/service/data-ooc/data-ooc-type.js +29 -20
  27. package/dist-server/service/data-ooc/data-ooc-type.js.map +1 -1
  28. package/dist-server/service/data-ooc/data-ooc.js +11 -6
  29. package/dist-server/service/data-ooc/data-ooc.js.map +1 -1
  30. package/dist-server/service/data-sample/data-sample-mutation.js +3 -1
  31. package/dist-server/service/data-sample/data-sample-mutation.js.map +1 -1
  32. package/dist-server/service/data-sample/data-sample-query.js +24 -8
  33. package/dist-server/service/data-sample/data-sample-query.js.map +1 -1
  34. package/dist-server/service/data-sample/data-sample-type.js +13 -13
  35. package/dist-server/service/data-sample/data-sample-type.js.map +1 -1
  36. package/dist-server/service/data-sample/data-sample.js +11 -6
  37. package/dist-server/service/data-sample/data-sample.js.map +1 -1
  38. package/dist-server/service/data-sensor/data-sensor-mutation.js +15 -5
  39. package/dist-server/service/data-sensor/data-sensor-mutation.js.map +1 -1
  40. package/dist-server/service/data-sensor/data-sensor-query.js +24 -8
  41. package/dist-server/service/data-sensor/data-sensor-query.js.map +1 -1
  42. package/dist-server/service/data-sensor/data-sensor-type.js +19 -19
  43. package/dist-server/service/data-sensor/data-sensor-type.js.map +1 -1
  44. package/dist-server/service/data-sensor/data-sensor.js +11 -9
  45. package/dist-server/service/data-sensor/data-sensor.js.map +1 -1
  46. package/dist-server/service/data-set/data-set-mutation.js +25 -9
  47. package/dist-server/service/data-set/data-set-mutation.js.map +1 -1
  48. package/dist-server/service/data-set/data-set-query.js +24 -8
  49. package/dist-server/service/data-set/data-set-query.js.map +1 -1
  50. package/dist-server/service/data-set/data-set-type.js +3 -1
  51. package/dist-server/service/data-set/data-set-type.js.map +1 -1
  52. package/dist-server/service/data-set-history/data-set-history-type.js +3 -3
  53. package/dist-server/service/data-set-history/data-set-history-type.js.map +1 -1
  54. package/dist-server/service/data-set-history/data-set-history.js +56 -37
  55. package/dist-server/service/data-set-history/data-set-history.js.map +1 -1
  56. package/dist-server/service/data-spec/data-spec.js +24 -14
  57. package/dist-server/service/data-spec/data-spec.js.map +1 -1
  58. package/dist-server/service/data-summary/data-summary-mutation.js +6 -2
  59. package/dist-server/service/data-summary/data-summary-mutation.js.map +1 -1
  60. package/dist-server/service/data-summary/data-summary-query.js +25 -8
  61. package/dist-server/service/data-summary/data-summary-query.js.map +1 -1
  62. package/dist-server/service/data-summary/data-summary-type.js +25 -23
  63. package/dist-server/service/data-summary/data-summary-type.js.map +1 -1
  64. package/dist-server/service/data-summary/data-summary.js +8 -6
  65. package/dist-server/service/data-summary/data-summary.js.map +1 -1
  66. package/dist-server/tsconfig.tsbuildinfo +1 -1
  67. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"file":"data-set-history-type.js","sourceRoot":"","sources":["../../../server/service/data-set-history/data-set-history-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAqD;AAErD,iFAAwE;AAGjE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAM9B,CAAA;AANY,gDAAkB;AAE7B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,oCAAc,CAAC,CAAC;;iDACT;AAGvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;iDACN;6BALF,kBAAkB;IAD9B,IAAA,yBAAU,GAAE;GACA,kBAAkB,CAM9B","sourcesContent":["import { Field, Int, ObjectType } from 'type-graphql'\n\nimport { DataSetHistory } from '../data-set-history/data-set-history.js'\n\n@ObjectType()\nexport class DataSetHistoryList {\n @Field(type => [DataSetHistory])\n items: DataSetHistory[]\n\n @Field(type => Int)\n total: number\n}\n"]}
1
+ {"version":3,"file":"data-set-history-type.js","sourceRoot":"","sources":["../../../server/service/data-set-history/data-set-history-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAqD;AAErD,iFAAwE;AAGjE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAM9B,CAAA;AANY,gDAAkB;AAE7B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,oCAAc,CAAC,EAAE,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;;iDAC9D;AAGvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,sDAAsD,EAAE,CAAC;;iDAC/E;6BALF,kBAAkB;IAD9B,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,yDAAyD,EAAE,CAAC;GAC1E,kBAAkB,CAM9B","sourcesContent":["import { Field, Int, ObjectType } from 'type-graphql'\n\nimport { DataSetHistory } from '../data-set-history/data-set-history.js'\n\n@ObjectType({ description: 'Represents a paginated list of dataset history records.' })\nexport class DataSetHistoryList {\n @Field(type => [DataSetHistory], { description: 'List of dataset history records.' })\n items: DataSetHistory[]\n\n @Field(type => Int, { description: 'Total number of dataset history records in the list.' })\n total: number\n}\n"]}
@@ -22,12 +22,12 @@ let DataSetHistory = class DataSetHistory {
22
22
  exports.DataSetHistory = DataSetHistory;
23
23
  tslib_1.__decorate([
24
24
  (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
25
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
25
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Unique identifier for the dataset history record.' }),
26
26
  tslib_1.__metadata("design:type", String)
27
27
  ], DataSetHistory.prototype, "id", void 0);
28
28
  tslib_1.__decorate([
29
29
  (0, typeorm_1.Column)({ default: 1 }),
30
- (0, type_graphql_1.Field)({ nullable: true }),
30
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Version number of this historical dataset configuration.' }),
31
31
  tslib_1.__metadata("design:type", Number)
32
32
  ], DataSetHistory.prototype, "version", void 0);
33
33
  tslib_1.__decorate([
@@ -41,166 +41,181 @@ tslib_1.__decorate([
41
41
  ], DataSetHistory.prototype, "domainId", void 0);
42
42
  tslib_1.__decorate([
43
43
  (0, typeorm_1.Column)(),
44
- (0, type_graphql_1.Field)(),
44
+ (0, type_graphql_1.Field)({ description: 'Name of the dataset at the time of this historical version.' }),
45
45
  tslib_1.__metadata("design:type", String)
46
46
  ], DataSetHistory.prototype, "name", void 0);
47
47
  tslib_1.__decorate([
48
48
  (0, typeorm_1.Column)({ nullable: true }),
49
- (0, type_graphql_1.Field)({ nullable: true }),
49
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Description of the dataset at the time of this historical version.' }),
50
50
  tslib_1.__metadata("design:type", String)
51
51
  ], DataSetHistory.prototype, "description", void 0);
52
52
  tslib_1.__decorate([
53
53
  (0, typeorm_1.Column)({ nullable: true }),
54
- (0, type_graphql_1.Field)({ nullable: true }),
54
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Tag name of the dataset at the time of this historical version.' }),
55
55
  tslib_1.__metadata("design:type", String)
56
56
  ], DataSetHistory.prototype, "tag", void 0);
57
57
  tslib_1.__decorate([
58
58
  (0, typeorm_1.Column)({ nullable: true }),
59
- (0, type_graphql_1.Field)({ nullable: true }),
59
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Active status of the dataset at the time of this historical version.' }),
60
60
  tslib_1.__metadata("design:type", Boolean)
61
61
  ], DataSetHistory.prototype, "active", void 0);
62
62
  tslib_1.__decorate([
63
63
  (0, typeorm_1.Column)({ nullable: true }),
64
- (0, type_graphql_1.Field)({ nullable: true }),
64
+ (0, type_graphql_1.Field)({ nullable: true, description: 'ID of the data key set at the time of this historical version.' }),
65
65
  tslib_1.__metadata("design:type", String)
66
66
  ], DataSetHistory.prototype, "dataKeySetId", void 0);
67
67
  tslib_1.__decorate([
68
68
  (0, typeorm_1.Column)({ nullable: true }),
69
- (0, type_graphql_1.Field)({ nullable: true }),
69
+ (0, type_graphql_1.Field)({ nullable: true, description: 'ID of the entry role at the time of this historical version.' }),
70
70
  tslib_1.__metadata("design:type", String)
71
71
  ], DataSetHistory.prototype, "entryRoleId", void 0);
72
72
  tslib_1.__decorate([
73
73
  (0, typeorm_1.Column)({ nullable: true }),
74
- (0, type_graphql_1.Field)({ nullable: true }),
74
+ (0, type_graphql_1.Field)({ nullable: true, description: 'ID of the supervisory role at the time of this historical version.' }),
75
75
  tslib_1.__metadata("design:type", String)
76
76
  ], DataSetHistory.prototype, "supervisoryRoleId", void 0);
77
77
  tslib_1.__decorate([
78
78
  (0, typeorm_1.Column)('simple-json', { nullable: true }),
79
- (0, type_graphql_1.Field)(type => [worklist_1.AssigneeItem], { nullable: true }),
79
+ (0, type_graphql_1.Field)(type => [worklist_1.AssigneeItem], {
80
+ nullable: true,
81
+ description: 'Assignee configuration at the time of this historical version.'
82
+ }),
80
83
  tslib_1.__metadata("design:type", Array)
81
84
  ], DataSetHistory.prototype, "assignees", void 0);
82
85
  tslib_1.__decorate([
83
86
  (0, typeorm_1.Column)('simple-json', { nullable: true }),
84
- (0, type_graphql_1.Field)(type => [organization_1.ApprovalLineItem], { nullable: true }),
87
+ (0, type_graphql_1.Field)(type => [organization_1.ApprovalLineItem], {
88
+ nullable: true,
89
+ description: 'Review approval line configuration at the time of this historical version.'
90
+ }),
85
91
  tslib_1.__metadata("design:type", Array)
86
92
  ], DataSetHistory.prototype, "reviewApprovalLine", void 0);
87
93
  tslib_1.__decorate([
88
94
  (0, typeorm_1.Column)('simple-json', { nullable: true }),
89
- (0, type_graphql_1.Field)(type => [organization_1.ApprovalLineItem], { nullable: true }),
95
+ (0, type_graphql_1.Field)(type => [organization_1.ApprovalLineItem], {
96
+ nullable: true,
97
+ description: 'Outlier approval line configuration at the time of this historical version.'
98
+ }),
90
99
  tslib_1.__metadata("design:type", Array)
91
100
  ], DataSetHistory.prototype, "outlierApprovalLine", void 0);
92
101
  tslib_1.__decorate([
93
102
  (0, typeorm_1.Column)({ nullable: true }),
94
- (0, type_graphql_1.Field)({ nullable: true }),
103
+ (0, type_graphql_1.Field)({ nullable: true, description: 'ID of the normal scenario at the time of this historical version.' }),
95
104
  tslib_1.__metadata("design:type", String)
96
105
  ], DataSetHistory.prototype, "normalScenarioId", void 0);
97
106
  tslib_1.__decorate([
98
107
  (0, typeorm_1.Column)({ nullable: true }),
99
- (0, type_graphql_1.Field)({ nullable: true }),
108
+ (0, type_graphql_1.Field)({ nullable: true, description: 'ID of the outlier scenario at the time of this historical version.' }),
100
109
  tslib_1.__metadata("design:type", String)
101
110
  ], DataSetHistory.prototype, "outlierScenarioId", void 0);
102
111
  tslib_1.__decorate([
103
112
  (0, typeorm_1.Column)({ nullable: true }),
104
- (0, type_graphql_1.Field)({ nullable: true }),
113
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Type of the dataset at the time of this historical version.' }),
105
114
  tslib_1.__metadata("design:type", String)
106
115
  ], DataSetHistory.prototype, "type", void 0);
107
116
  tslib_1.__decorate([
108
117
  (0, typeorm_1.Column)({ nullable: true }),
109
- (0, type_graphql_1.Field)({ nullable: true }),
118
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Entry type of the dataset at the time of this historical version.' }),
110
119
  tslib_1.__metadata("design:type", String)
111
120
  ], DataSetHistory.prototype, "entryType", void 0);
112
121
  tslib_1.__decorate([
113
122
  (0, typeorm_1.Column)({ nullable: true }),
114
- (0, type_graphql_1.Field)({ nullable: true }),
123
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Entry view of the dataset at the time of this historical version.' }),
115
124
  tslib_1.__metadata("design:type", String)
116
125
  ], DataSetHistory.prototype, "entryView", void 0);
117
126
  tslib_1.__decorate([
118
127
  (0, typeorm_1.Column)({ nullable: true }),
119
- (0, type_graphql_1.Field)({ nullable: true }),
128
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Monitor type of the dataset at the time of this historical version.' }),
120
129
  tslib_1.__metadata("design:type", String)
121
130
  ], DataSetHistory.prototype, "monitorType", void 0);
122
131
  tslib_1.__decorate([
123
132
  (0, typeorm_1.Column)({ nullable: true }),
124
- (0, type_graphql_1.Field)({ nullable: true }),
133
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Monitor view of the dataset at the time of this historical version.' }),
125
134
  tslib_1.__metadata("design:type", String)
126
135
  ], DataSetHistory.prototype, "monitorView", void 0);
127
136
  tslib_1.__decorate([
128
137
  (0, typeorm_1.Column)({ nullable: true }),
129
- (0, type_graphql_1.Field)({ nullable: true }),
138
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Report type of the dataset at the time of this historical version.' }),
130
139
  tslib_1.__metadata("design:type", String)
131
140
  ], DataSetHistory.prototype, "reportType", void 0);
132
141
  tslib_1.__decorate([
133
142
  (0, typeorm_1.Column)({ nullable: true }),
134
- (0, type_graphql_1.Field)({ nullable: true }),
143
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Report view of the dataset at the time of this historical version.' }),
135
144
  tslib_1.__metadata("design:type", String)
136
145
  ], DataSetHistory.prototype, "reportView", void 0);
137
146
  tslib_1.__decorate([
138
- (0, type_graphql_1.Field)({ nullable: true }),
147
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Report template of the dataset at the time of this historical version.' }),
139
148
  tslib_1.__metadata("design:type", String)
140
149
  ], DataSetHistory.prototype, "reportTemplate", void 0);
141
150
  tslib_1.__decorate([
142
151
  (0, typeorm_1.Column)({ nullable: true }),
143
- (0, type_graphql_1.Field)({ nullable: true }),
152
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Use case of the dataset at the time of this historical version.' }),
144
153
  tslib_1.__metadata("design:type", String)
145
154
  ], DataSetHistory.prototype, "useCase", void 0);
146
155
  tslib_1.__decorate([
147
156
  (0, typeorm_1.Column)('simple-json', { nullable: true }),
148
- (0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
157
+ (0, type_graphql_1.Field)(type => shell_1.ScalarObject, {
158
+ nullable: true,
159
+ description: 'Partition keys configuration at the time of this historical version.'
160
+ }),
149
161
  tslib_1.__metadata("design:type", Object)
150
162
  ], DataSetHistory.prototype, "partitionKeys", void 0);
151
163
  tslib_1.__decorate([
152
164
  (0, typeorm_1.Column)('simple-json', { nullable: true }),
153
- (0, type_graphql_1.Field)(type => [data_item_type_js_1.DataItem], { nullable: true }),
165
+ (0, type_graphql_1.Field)(type => [data_item_type_js_1.DataItem], {
166
+ nullable: true,
167
+ description: 'Data items configuration at the time of this historical version.'
168
+ }),
154
169
  tslib_1.__metadata("design:type", Array)
155
170
  ], DataSetHistory.prototype, "dataItems", void 0);
156
171
  tslib_1.__decorate([
157
172
  (0, typeorm_1.Column)({ nullable: true }),
158
- (0, type_graphql_1.Field)({ nullable: true }),
173
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Schedule configuration at the time of this historical version.' }),
159
174
  tslib_1.__metadata("design:type", String)
160
175
  ], DataSetHistory.prototype, "schedule", void 0);
161
176
  tslib_1.__decorate([
162
177
  (0, typeorm_1.Column)({ nullable: true }),
163
- (0, type_graphql_1.Field)({ nullable: true }),
178
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Schedule ID at the time of this historical version.' }),
164
179
  tslib_1.__metadata("design:type", String)
165
180
  ], DataSetHistory.prototype, "scheduleId", void 0);
166
181
  tslib_1.__decorate([
167
182
  (0, typeorm_1.Column)({ nullable: true }),
168
- (0, type_graphql_1.Field)({ nullable: true }),
183
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Timezone configuration at the time of this historical version.' }),
169
184
  tslib_1.__metadata("design:type", String)
170
185
  ], DataSetHistory.prototype, "timezone", void 0);
171
186
  tslib_1.__decorate([
172
187
  (0, typeorm_1.Column)({ nullable: true }),
173
- (0, type_graphql_1.Field)({ nullable: true }),
188
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Review requirement setting at the time of this historical version.' }),
174
189
  tslib_1.__metadata("design:type", Boolean)
175
190
  ], DataSetHistory.prototype, "requiresReview", void 0);
176
191
  tslib_1.__decorate([
177
192
  (0, typeorm_1.Column)({ nullable: true }),
178
- (0, type_graphql_1.Field)({ nullable: true }),
193
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Summary period configuration at the time of this historical version.' }),
179
194
  tslib_1.__metadata("design:type", String)
180
195
  ], DataSetHistory.prototype, "summaryPeriod", void 0);
181
196
  tslib_1.__decorate([
182
197
  (0, typeorm_1.Column)({ nullable: true }),
183
- (0, type_graphql_1.Field)({ nullable: true }),
198
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Summary schedule configuration at the time of this historical version.' }),
184
199
  tslib_1.__metadata("design:type", String)
185
200
  ], DataSetHistory.prototype, "summarySchedule", void 0);
186
201
  tslib_1.__decorate([
187
202
  (0, typeorm_1.Column)({ nullable: true }),
188
- (0, type_graphql_1.Field)({ nullable: true }),
203
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Summary schedule ID at the time of this historical version.' }),
189
204
  tslib_1.__metadata("design:type", String)
190
205
  ], DataSetHistory.prototype, "summaryScheduleId", void 0);
191
206
  tslib_1.__decorate([
192
207
  (0, typeorm_1.Column)({ nullable: true }),
193
- (0, type_graphql_1.Field)({ nullable: true }),
208
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Creation timestamp of this historical version.' }),
194
209
  tslib_1.__metadata("design:type", Date)
195
210
  ], DataSetHistory.prototype, "createdAt", void 0);
196
211
  tslib_1.__decorate([
197
212
  (0, typeorm_1.Column)({ nullable: true }),
198
- (0, type_graphql_1.Field)({ nullable: true }),
213
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Last update timestamp of this historical version.' }),
199
214
  tslib_1.__metadata("design:type", Date)
200
215
  ], DataSetHistory.prototype, "updatedAt", void 0);
201
216
  tslib_1.__decorate([
202
217
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
203
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
218
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'User who created this historical version.' }),
204
219
  tslib_1.__metadata("design:type", auth_base_1.User)
205
220
  ], DataSetHistory.prototype, "creator", void 0);
206
221
  tslib_1.__decorate([
@@ -209,7 +224,7 @@ tslib_1.__decorate([
209
224
  ], DataSetHistory.prototype, "creatorId", void 0);
210
225
  tslib_1.__decorate([
211
226
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
212
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
227
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'User who last updated this historical version.' }),
213
228
  tslib_1.__metadata("design:type", auth_base_1.User)
214
229
  ], DataSetHistory.prototype, "updater", void 0);
215
230
  tslib_1.__decorate([
@@ -218,6 +233,7 @@ tslib_1.__decorate([
218
233
  ], DataSetHistory.prototype, "updaterId", void 0);
219
234
  tslib_1.__decorate([
220
235
  (0, typeorm_history_1.HistoryOriginalIdColumn)({ nullable: true }),
236
+ (0, type_graphql_1.Field)({ description: 'ID of the original dataset that this history record belongs to.' }),
221
237
  tslib_1.__metadata("design:type", String)
222
238
  ], DataSetHistory.prototype, "originalId", void 0);
223
239
  tslib_1.__decorate([
@@ -235,12 +251,15 @@ tslib_1.__decorate([
235
251
  : undefined,
236
252
  length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10
237
253
  }),
254
+ (0, type_graphql_1.Field)({ description: 'Type of action performed on the dataset (INSERT, UPDATE, DELETE).' }),
238
255
  tslib_1.__metadata("design:type", String)
239
256
  ], DataSetHistory.prototype, "action", void 0);
240
257
  exports.DataSetHistory = DataSetHistory = tslib_1.__decorate([
241
258
  (0, typeorm_1.Entity)(),
242
259
  (0, typeorm_1.Index)('ix_data_set_history_0', (dataSetHistory) => [dataSetHistory.originalId, dataSetHistory.version], { unique: true }),
243
260
  (0, typeorm_1.Index)('ix_data_set_history_1', (dataSetHistory) => [dataSetHistory.domain, dataSetHistory.originalId, dataSetHistory.version], { unique: true }),
244
- (0, type_graphql_1.ObjectType)({ description: 'Entity for DataSetHistory' })
261
+ (0, type_graphql_1.ObjectType)({
262
+ description: 'Represents a historical version of a dataset configuration. This entity tracks all changes made to datasets over time for audit and rollback purposes.'
263
+ })
245
264
  ], DataSetHistory);
246
265
  //# sourceMappingURL=data-set-history.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-set-history.js","sourceRoot":"","sources":["../../../server/service/data-set-history/data-set-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9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, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'\n\nimport {\n HistoryActionColumn,\n HistoryActionType,\n HistoryEntityInterface,\n HistoryOriginalIdColumn\n} from '@operato/typeorm-history'\nimport { User } from '@things-factory/auth-base'\nimport { ApprovalLineItem } from '@things-factory/organization'\nimport { Domain, ScalarObject } from '@things-factory/shell'\nimport { AssigneeItem } from '@things-factory/worklist'\nimport { config } from '@things-factory/env'\n\nimport { DataItem } from '../data-set/data-item-type.js'\nimport {\n DataSet,\n DataSetEntryType,\n DataSetMonitorType,\n DataSetReportType,\n DataSetSummaryPeriodType\n} from '../data-set/data-set.js'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index(\n 'ix_data_set_history_0',\n (dataSetHistory: DataSetHistory) => [dataSetHistory.originalId, dataSetHistory.version],\n { unique: true }\n)\n@Index(\n 'ix_data_set_history_1',\n (dataSetHistory: DataSetHistory) => [dataSetHistory.domain, dataSetHistory.originalId, dataSetHistory.version],\n { unique: true }\n)\n@ObjectType({ description: 'Entity for DataSetHistory' })\nexport class DataSetHistory implements HistoryEntityInterface<DataSet> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ default: 1 })\n @Field({ nullable: true })\n readonly version: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((dataSetHistory: DataSetHistory) => dataSetHistory.domain)\n domainId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n tag?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n dataKeySetId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n entryRoleId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n supervisoryRoleId?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => [AssigneeItem], { nullable: true })\n assignees?: AssigneeItem[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ApprovalLineItem], { nullable: true })\n reviewApprovalLine?: ApprovalLineItem[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ApprovalLineItem], { nullable: true })\n outlierApprovalLine?: ApprovalLineItem[]\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n normalScenarioId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n outlierScenarioId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n type?: 'manual' | 'automatic' | string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n entryType?: DataSetEntryType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n entryView?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n monitorType?: DataSetMonitorType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n monitorView?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n reportType?: DataSetReportType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n reportView?: string\n\n @Field({ nullable: true })\n reportTemplate?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n useCase?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, { nullable: true })\n partitionKeys?: { [key: string]: any }\n\n @Column('simple-json', { nullable: true })\n @Field(type => [DataItem], { nullable: true })\n dataItems: DataItem[]\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n schedule?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n scheduleId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n timezone?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n requiresReview?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n summaryPeriod?: DataSetSummaryPeriodType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n summarySchedule?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n summaryScheduleId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n createdAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((dataSetHistory: DataSetHistory) => dataSetHistory.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((dataSetHistory: DataSetHistory) => dataSetHistory.updater)\n updaterId?: string\n\n @HistoryOriginalIdColumn({ nullable: true })\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n enum:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? HistoryActionType\n : undefined,\n length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10\n })\n public action!: HistoryActionType\n}\n"]}
1
+ {"version":3,"file":"data-set-history.js","sourceRoot":"","sources":["../../../server/service/data-set-history/data-set-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAgD;AAChD,+DAA+D;AAC/D,iDAA4D;AAC5D,uDAAuD;AACvD,6CAA4C;AAE5C,qEAAwD;AACxD,yDAMgC;AAEhC,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAiB7B,IAAM,cAAc,GAApB,MAAM,cAAc;IAApB;QAOI,YAAO,GAAW,CAAC,CAAA;IA2L9B,CAAC;CAAA,CAAA;AAl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AAI,SAAS;YACnF,CAAC,CAAC,mCAAiB;YACnB,CAAC,CAAC,SAAS;QACf,MAAM,EAAE,aAAa,IAAI,UAAU,IAAI,aAAa,IAAI,OAAO,IAAI,aAAa,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;KAC/G,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,mEAAmE,EAAE,CAAC;;8CAC3D;yBAjMtB,cAAc;IAf1B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,uBAAuB,EACvB,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,EACvF,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EACJ,uBAAuB,EACvB,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,EAC9G,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC;QACV,WAAW,EACT,wJAAwJ;KAC3J,CAAC;GACW,cAAc,CAkM1B","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport { Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'\n\nimport {\n HistoryActionColumn,\n HistoryActionType,\n HistoryEntityInterface,\n HistoryOriginalIdColumn\n} from '@operato/typeorm-history'\nimport { User } from '@things-factory/auth-base'\nimport { ApprovalLineItem } from '@things-factory/organization'\nimport { Domain, ScalarObject } from '@things-factory/shell'\nimport { AssigneeItem } from '@things-factory/worklist'\nimport { config } from '@things-factory/env'\n\nimport { DataItem } from '../data-set/data-item-type.js'\nimport {\n DataSet,\n DataSetEntryType,\n DataSetMonitorType,\n DataSetReportType,\n DataSetSummaryPeriodType\n} from '../data-set/data-set.js'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index(\n 'ix_data_set_history_0',\n (dataSetHistory: DataSetHistory) => [dataSetHistory.originalId, dataSetHistory.version],\n { unique: true }\n)\n@Index(\n 'ix_data_set_history_1',\n (dataSetHistory: DataSetHistory) => [dataSetHistory.domain, dataSetHistory.originalId, dataSetHistory.version],\n { unique: true }\n)\n@ObjectType({\n description:\n 'Represents a historical version of a dataset configuration. This entity tracks all changes made to datasets over time for audit and rollback purposes.'\n})\nexport class DataSetHistory implements HistoryEntityInterface<DataSet> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the dataset history record.' })\n readonly id: string\n\n @Column({ default: 1 })\n @Field({ nullable: true, description: 'Version number of this historical dataset configuration.' })\n readonly version: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((dataSetHistory: DataSetHistory) => dataSetHistory.domain)\n domainId?: string\n\n @Column()\n @Field({ description: 'Name of the dataset at the time of this historical version.' })\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Description of the dataset at the time of this historical version.' })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Tag name of the dataset at the time of this historical version.' })\n tag?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Active status of the dataset at the time of this historical version.' })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'ID of the data key set at the time of this historical version.' })\n dataKeySetId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'ID of the entry role at the time of this historical version.' })\n entryRoleId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'ID of the supervisory role at the time of this historical version.' })\n supervisoryRoleId?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => [AssigneeItem], {\n nullable: true,\n description: 'Assignee configuration at the time of this historical version.'\n })\n assignees?: AssigneeItem[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ApprovalLineItem], {\n nullable: true,\n description: 'Review approval line configuration at the time of this historical version.'\n })\n reviewApprovalLine?: ApprovalLineItem[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ApprovalLineItem], {\n nullable: true,\n description: 'Outlier approval line configuration at the time of this historical version.'\n })\n outlierApprovalLine?: ApprovalLineItem[]\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'ID of the normal scenario at the time of this historical version.' })\n normalScenarioId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'ID of the outlier scenario at the time of this historical version.' })\n outlierScenarioId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Type of the dataset at the time of this historical version.' })\n type?: 'manual' | 'automatic' | string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Entry type of the dataset at the time of this historical version.' })\n entryType?: DataSetEntryType\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Entry view of the dataset at the time of this historical version.' })\n entryView?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Monitor type of the dataset at the time of this historical version.' })\n monitorType?: DataSetMonitorType\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Monitor view of the dataset at the time of this historical version.' })\n monitorView?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Report type of the dataset at the time of this historical version.' })\n reportType?: DataSetReportType\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Report view of the dataset at the time of this historical version.' })\n reportView?: string\n\n @Field({ nullable: true, description: 'Report template of the dataset at the time of this historical version.' })\n reportTemplate?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Use case of the dataset at the time of this historical version.' })\n useCase?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, {\n nullable: true,\n description: 'Partition keys configuration at the time of this historical version.'\n })\n partitionKeys?: { [key: string]: any }\n\n @Column('simple-json', { nullable: true })\n @Field(type => [DataItem], {\n nullable: true,\n description: 'Data items configuration at the time of this historical version.'\n })\n dataItems: DataItem[]\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Schedule configuration at the time of this historical version.' })\n schedule?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Schedule ID at the time of this historical version.' })\n scheduleId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Timezone configuration at the time of this historical version.' })\n timezone?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Review requirement setting at the time of this historical version.' })\n requiresReview?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Summary period configuration at the time of this historical version.' })\n summaryPeriod?: DataSetSummaryPeriodType\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Summary schedule configuration at the time of this historical version.' })\n summarySchedule?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Summary schedule ID at the time of this historical version.' })\n summaryScheduleId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Creation timestamp of this historical version.' })\n createdAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Last update timestamp of this historical version.' })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'User who created this historical version.' })\n creator?: User\n\n @RelationId((dataSetHistory: DataSetHistory) => dataSetHistory.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'User who last updated this historical version.' })\n updater?: User\n\n @RelationId((dataSetHistory: DataSetHistory) => dataSetHistory.updater)\n updaterId?: string\n\n @HistoryOriginalIdColumn({ nullable: true })\n @Field({ description: 'ID of the original dataset that this history record belongs to.' })\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n enum:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? HistoryActionType\n : undefined,\n length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10\n })\n @Field({ description: 'Type of action performed on the dataset (INSERT, UPDATE, DELETE).' })\n public action!: HistoryActionType\n}\n"]}
@@ -8,62 +8,72 @@ let DataSpecItem = class DataSpecItem {
8
8
  };
9
9
  exports.DataSpecItem = DataSpecItem;
10
10
  tslib_1.__decorate([
11
- (0, type_graphql_1.Field)(),
11
+ (0, type_graphql_1.Field)({ description: 'The data type of the specification item.' }),
12
12
  tslib_1.__metadata("design:type", String)
13
13
  ], DataSpecItem.prototype, "type", void 0);
14
14
  tslib_1.__decorate([
15
- (0, type_graphql_1.Field)(),
15
+ (0, type_graphql_1.Field)({ description: 'The display label for the specification item.' }),
16
16
  tslib_1.__metadata("design:type", String)
17
17
  ], DataSpecItem.prototype, "label", void 0);
18
18
  tslib_1.__decorate([
19
- (0, type_graphql_1.Field)(),
19
+ (0, type_graphql_1.Field)({ description: 'The unique name identifier for the specification item.' }),
20
20
  tslib_1.__metadata("design:type", String)
21
21
  ], DataSpecItem.prototype, "name", void 0);
22
22
  tslib_1.__decorate([
23
- (0, type_graphql_1.Field)({ nullable: true }),
23
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Placeholder text for the input field.' }),
24
24
  tslib_1.__metadata("design:type", String)
25
25
  ], DataSpecItem.prototype, "placeholder", void 0);
26
26
  tslib_1.__decorate([
27
- (0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
27
+ (0, type_graphql_1.Field)(type => shell_1.ScalarObject, {
28
+ nullable: true,
29
+ description: 'Additional properties and configuration for the specification item.'
30
+ }),
28
31
  tslib_1.__metadata("design:type", Object)
29
32
  ], DataSpecItem.prototype, "property", void 0);
30
33
  exports.DataSpecItem = DataSpecItem = tslib_1.__decorate([
31
- (0, type_graphql_1.ObjectType)()
34
+ (0, type_graphql_1.ObjectType)({
35
+ description: 'Represents a specification item that defines the structure and validation rules for a data field.'
36
+ })
32
37
  ], DataSpecItem);
33
38
  let DataSpec = class DataSpec {
34
39
  };
35
40
  exports.DataSpec = DataSpec;
36
41
  tslib_1.__decorate([
37
- (0, type_graphql_1.Field)(),
42
+ (0, type_graphql_1.Field)({ description: 'The unique name identifier for the data specification.' }),
38
43
  tslib_1.__metadata("design:type", String)
39
44
  ], DataSpec.prototype, "name", void 0);
40
45
  tslib_1.__decorate([
41
- (0, type_graphql_1.Field)({ nullable: true }),
46
+ (0, type_graphql_1.Field)({ nullable: true, description: 'A description of the data specification and its purpose.' }),
42
47
  tslib_1.__metadata("design:type", String)
43
48
  ], DataSpec.prototype, "description", void 0);
44
49
  tslib_1.__decorate([
45
- (0, type_graphql_1.Field)({ nullable: true }),
50
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Help text or documentation for the data specification.' }),
46
51
  tslib_1.__metadata("design:type", String)
47
52
  ], DataSpec.prototype, "help", void 0);
48
53
  tslib_1.__decorate([
49
- (0, type_graphql_1.Field)(type => [DataSpecItem], { nullable: true }),
54
+ (0, type_graphql_1.Field)(type => [DataSpecItem], {
55
+ nullable: true,
56
+ description: 'The specification items that define the data structure and validation rules.'
57
+ }),
50
58
  tslib_1.__metadata("design:type", Array)
51
59
  ], DataSpec.prototype, "specItems", void 0);
52
60
  exports.DataSpec = DataSpec = tslib_1.__decorate([
53
- (0, type_graphql_1.ObjectType)()
61
+ (0, type_graphql_1.ObjectType)({
62
+ description: 'Represents a data specification that defines the structure, validation rules, and metadata for a dataset.'
63
+ })
54
64
  ], DataSpec);
55
65
  let DataSpecList = class DataSpecList {
56
66
  };
57
67
  exports.DataSpecList = DataSpecList;
58
68
  tslib_1.__decorate([
59
- (0, type_graphql_1.Field)(type => [DataSpec]),
69
+ (0, type_graphql_1.Field)(type => [DataSpec], { description: 'List of data specifications.' }),
60
70
  tslib_1.__metadata("design:type", Array)
61
71
  ], DataSpecList.prototype, "items", void 0);
62
72
  tslib_1.__decorate([
63
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
73
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Total number of data specifications in the list.' }),
64
74
  tslib_1.__metadata("design:type", Number)
65
75
  ], DataSpecList.prototype, "total", void 0);
66
76
  exports.DataSpecList = DataSpecList = tslib_1.__decorate([
67
- (0, type_graphql_1.ObjectType)()
77
+ (0, type_graphql_1.ObjectType)({ description: 'Represents a paginated list of data specifications.' })
68
78
  ], DataSpecList);
69
79
  //# sourceMappingURL=data-spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-spec.js","sourceRoot":"","sources":["../../../server/service/data-spec/data-spec.ts"],"names":[],"mappings":";;;;AAAA,+CAAqD;AAErD,iDAAoD;AAG7C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAexB,CAAA;AAfY,oCAAY;AAEvB;IADC,IAAA,oBAAK,GAAE;;0CACI;AAGZ;IADC,IAAA,oBAAK,GAAE;;2CACK;AAGb;IADC,IAAA,oBAAK,GAAE;;0CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACf;uBAdtB,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAexB;AAGM,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAYpB,CAAA;AAZY,4BAAQ;AAEnB;IADC,IAAA,oBAAK,GAAE;;sCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACP;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACd;AAGZ;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACzB;mBAXd,QAAQ;IADpB,IAAA,yBAAU,GAAE;GACA,QAAQ,CAYpB;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AANY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;;2CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;2CACN;uBALF,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAMxB","sourcesContent":["import { Field, Int, ObjectType } from 'type-graphql'\n\nimport { ScalarObject } from '@things-factory/shell'\n\n@ObjectType()\nexport class DataSpecItem {\n @Field()\n type: string\n\n @Field()\n label: string\n\n @Field()\n name: string\n\n @Field({ nullable: true })\n placeholder?: string\n\n @Field(type => ScalarObject, { nullable: true })\n property?: { [key: string]: any }\n}\n\n@ObjectType()\nexport class DataSpec {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description: string\n\n @Field({ nullable: true })\n help: string\n\n @Field(type => [DataSpecItem], { nullable: true })\n specItems: DataSpecItem[]\n}\n\n@ObjectType()\nexport class DataSpecList {\n @Field(type => [DataSpec])\n items: DataSpec[]\n\n @Field(type => Int)\n total: number\n}\n"]}
1
+ {"version":3,"file":"data-spec.js","sourceRoot":"","sources":["../../../server/service/data-spec/data-spec.ts"],"names":[],"mappings":";;;;AAAA,+CAAqD;AAErD,iDAAoD;AAK7C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAkBxB,CAAA;AAlBY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,0CAA0C,EAAE,CAAC;;0CACvD;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,+CAA+C,EAAE,CAAC;;2CAC3D;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,WA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kBAAG,EAAE,EAAE,WAAW,EAAE,kDAAkD,EAAE,CAAC;;2CAC3E;uBALF,YAAY;IADxB,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,qDAAqD,EAAE,CAAC;GACtE,YAAY,CAMxB","sourcesContent":["import { Field, Int, ObjectType } from 'type-graphql'\n\nimport { ScalarObject } from '@things-factory/shell'\n\n@ObjectType({\n description: 'Represents a specification item that defines the structure and validation rules for a data field.'\n})\nexport class DataSpecItem {\n @Field({ description: 'The data type of the specification item.' })\n type: string\n\n @Field({ description: 'The display label for the specification item.' })\n label: string\n\n @Field({ description: 'The unique name identifier for the specification item.' })\n name: string\n\n @Field({ nullable: true, description: 'Placeholder text for the input field.' })\n placeholder?: string\n\n @Field(type => ScalarObject, {\n nullable: true,\n description: 'Additional properties and configuration for the specification item.'\n })\n property?: { [key: string]: any }\n}\n\n@ObjectType({\n description:\n 'Represents a data specification that defines the structure, validation rules, and metadata for a dataset.'\n})\nexport class DataSpec {\n @Field({ description: 'The unique name identifier for the data specification.' })\n name: string\n\n @Field({ nullable: true, description: 'A description of the data specification and its purpose.' })\n description: string\n\n @Field({ nullable: true, description: 'Help text or documentation for the data specification.' })\n help: string\n\n @Field(type => [DataSpecItem], {\n nullable: true,\n description: 'The specification items that define the data structure and validation rules.'\n })\n specItems: DataSpecItem[]\n}\n\n@ObjectType({ description: 'Represents a paginated list of data specifications.' })\nexport class DataSpecList {\n @Field(type => [DataSpec], { description: 'List of data specifications.' })\n items: DataSpec[]\n\n @Field(type => Int, { description: 'Total number of data specifications in the list.' })\n total: number\n}\n"]}
@@ -34,7 +34,9 @@ tslib_1.__decorate([
34
34
  ], DataSummaryMutation.prototype, "generateLatestDataSummaries", null);
35
35
  tslib_1.__decorate([
36
36
  (0, type_graphql_1.Directive)('@transaction'),
37
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To finalize new Data Summaries' }),
37
+ (0, type_graphql_1.Mutation)(returns => Boolean, {
38
+ description: 'Finalizes and generates the latest data summaries for the specified dataset. This operation aggregates collected data into summary records for reporting and analysis.'
39
+ }),
38
40
  tslib_1.__param(0, (0, type_graphql_1.Arg)('dataSetId')),
39
41
  tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
40
42
  tslib_1.__metadata("design:type", Function),
@@ -57,7 +59,9 @@ tslib_1.__decorate([
57
59
  ], DataSummaryMutation.prototype, "generateDataSummaries", null);
58
60
  tslib_1.__decorate([
59
61
  (0, type_graphql_1.Directive)('@transaction'),
60
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To finalize data collection for the given period' }),
62
+ (0, type_graphql_1.Mutation)(returns => Boolean, {
63
+ description: 'Finalizes data collection for a specific period and generates summary records. This operation processes all collected data within the specified time range.'
64
+ }),
61
65
  tslib_1.__param(0, (0, type_graphql_1.Arg)('dataSetId')),
62
66
  tslib_1.__param(1, (0, type_graphql_1.Arg)('date')),
63
67
  tslib_1.__param(2, (0, type_graphql_1.Arg)('period')),
@@ -1 +1 @@
1
- {"version":3,"file":"data-summary-mutation.js","sourceRoot":"","sources":["../../../server/service/data-summary/data-summary-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AAEtE,uDAA+C;AAC/C,+FAAoH;AAG7G,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAMxB,AAAN,KAAK,CAAC,2BAA2B,CACb,SAAiB,EAC5B,OAAwB;QAE/B,OAAO,MAAM,IAAA,0DAA4B,EAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAC/D,CAAC;IAIK,AAAN,KAAK,CAAC,4BAA4B,CACd,SAAiB,EAC5B,OAAwB;QAE/B,OAAO,MAAM,IAAA,0DAA4B,EAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAC/D,CAAC;IAOK,AAAN,KAAK,CAAC,qBAAqB,CACP,SAAiB,EACtB,IAAY,EACV,MAAc,EACtB,OAAwB;QAE/B,OAAO,MAAM,IAAA,oDAAsB,EAAC,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OA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AO,EAAE,EAAE,WAAW,EAAE,kDAAkD,EAAE,CAAC;IAE/F,mBAAA,IAAA,kBAAG,EAAC,WAAW,CAAC,CAAA;IAChB,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,mBAAA,IAAA,kBAAG,EAAC,QAAQ,CAAC,CAAA;IACb,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iEAGP;8BA7CU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,6BAAW,CAAC;GACT,mBAAmB,CA8C/B","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\n\nimport { DataSummary } from './data-summary.js'\nimport { finalizeDataCollection, finalizeLatestDataCollection } from '../../controllers/finalize-data-collection.js'\n\n@Resolver(DataSummary)\nexport class DataSummaryMutation {\n @Directive('@transaction')\n @Mutation(returns => Boolean, {\n description: 'Deprecated. Use finalizeLatestDataCollection',\n deprecationReason: 'This resolver has been replaced by finalizeLatestDataCollection'\n })\n async generateLatestDataSummaries(\n @Arg('dataSetId') dataSetId: string,\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n return await finalizeLatestDataCollection(dataSetId, context)\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To finalize new Data Summaries' })\n async finalizeLatestDataCollection(\n @Arg('dataSetId') dataSetId: string,\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n return await finalizeLatestDataCollection(dataSetId, context)\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, {\n description: 'Deprecated. Use finalizeDataCollection',\n deprecationReason: 'This resolver has been replaced by finalizeDataCollection'\n })\n async generateDataSummaries(\n @Arg('dataSetId') dataSetId: string,\n @Arg('date') date: string,\n @Arg('period') period: string,\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n return await finalizeDataCollection(dataSetId, date, period, context)\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To finalize data collection for the given period' })\n async finalizeDataCollection(\n @Arg('dataSetId') dataSetId: string,\n @Arg('date') date: string,\n @Arg('period') period: string,\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n return await finalizeDataCollection(dataSetId, date, period, context)\n }\n}\n"]}
1
+ {"version":3,"file":"data-summary-mutation.js","sourceRoot":"","sources":["../../../server/service/data-summary/data-summary-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AAEtE,uDAA+C;AAC/C,+FAAoH;AAG7G,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAMxB,AAAN,KAAK,CAAC,2BAA2B,CACb,SAAiB,EAC5B,OAAwB;QAE/B,OAAO,MAAM,IAAA,0DAA4B,EAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAC/D,CAAC;IAOK,AAAN,KAAK,CAAC,4BAA4B,CACd,SAAiB,EAC5B,OAAwB;QAE/B,OAAO,MAAM,IAAA,0DAA4B,EAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAC/D,CAAC;IAOK,AAAN,KAAK,CAAC,qBAAqB,CACP,SAAiB,EACtB,IAAY,EACV,MAAc,EACtB,OAAwB;QAE/B,OAAO,MAAM,IAAA,oDAAsB,EAAC,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;IACvE,CAAC;IAOK,AAAN,KAAK,CAAC,sBAAsB,CACR,SAAiB,EACtB,IAAY,EACV,MAAc,EACtB,OAAwB;QAE/B,OAAO,MAAM,IAAA,oDAAsB,EAAC,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;IACvE,CAAC;CACF,CAAA;AApDY,kDAAmB;AAMxB;IALL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE;QAC5B,WAAW,EAAE,8CAA8C;QAC3D,iBAAiB,EAAE,iEAAiE;KACrF,CAAC;IAEC,mBAAA,IAAA,kBAAG,EAAC,WAAW,CAAC,CAAA;IAChB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;sEAGP;AAOK;IALL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE;QAC5B,WAAW,EACT,wKAAwK;KAC3K,CAAC;IAEC,mBAAA,IAAA,kBAAG,EAAC,WAAW,CAAC,CAAA;IAChB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uEAGP;AAOK;IALL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE;QAC5B,WAAW,EAAE,wCAAwC;QACrD,iBAAiB,EAAE,2DAA2D;KAC/E,CAAC;IAEC,mBAAA,IAAA,kBAAG,EAAC,WAAW,CAAC,CAAA;IAChB,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,mBAAA,IAAA,kBAAG,EAAC,QAAQ,CAAC,CAAA;IACb,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;gEAGP;AAOK;IALL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE;QAC5B,WAAW,EACT,6JAA6J;KAChK,CAAC;IAEC,mBAAA,IAAA,kBAAG,EAAC,WAAW,CAAC,CAAA;IAChB,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,mBAAA,IAAA,kBAAG,EAAC,QAAQ,CAAC,CAAA;IACb,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iEAGP;8BAnDU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,6BAAW,CAAC;GACT,mBAAmB,CAoD/B","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\n\nimport { DataSummary } from './data-summary.js'\nimport { finalizeDataCollection, finalizeLatestDataCollection } from '../../controllers/finalize-data-collection.js'\n\n@Resolver(DataSummary)\nexport class DataSummaryMutation {\n @Directive('@transaction')\n @Mutation(returns => Boolean, {\n description: 'Deprecated. Use finalizeLatestDataCollection',\n deprecationReason: 'This resolver has been replaced by finalizeLatestDataCollection'\n })\n async generateLatestDataSummaries(\n @Arg('dataSetId') dataSetId: string,\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n return await finalizeLatestDataCollection(dataSetId, context)\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, {\n description:\n 'Finalizes and generates the latest data summaries for the specified dataset. This operation aggregates collected data into summary records for reporting and analysis.'\n })\n async finalizeLatestDataCollection(\n @Arg('dataSetId') dataSetId: string,\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n return await finalizeLatestDataCollection(dataSetId, context)\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, {\n description: 'Deprecated. Use finalizeDataCollection',\n deprecationReason: 'This resolver has been replaced by finalizeDataCollection'\n })\n async generateDataSummaries(\n @Arg('dataSetId') dataSetId: string,\n @Arg('date') date: string,\n @Arg('period') period: string,\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n return await finalizeDataCollection(dataSetId, date, period, context)\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, {\n description:\n 'Finalizes data collection for a specific period and generates summary records. This operation processes all collected data within the specified time range.'\n })\n async finalizeDataCollection(\n @Arg('dataSetId') dataSetId: string,\n @Arg('date') date: string,\n @Arg('period') period: string,\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n return await finalizeDataCollection(dataSetId, date, period, context)\n }\n}\n"]}
@@ -115,7 +115,10 @@ let DataSummaryQuery = class DataSummaryQuery {
115
115
  };
116
116
  exports.DataSummaryQuery = DataSummaryQuery;
117
117
  tslib_1.__decorate([
118
- (0, type_graphql_1.Query)(returns => data_summary_js_1.DataSummary, { nullable: true, description: 'To fetch a DataSummary' }),
118
+ (0, type_graphql_1.Query)(returns => data_summary_js_1.DataSummary, {
119
+ nullable: true,
120
+ description: 'Retrieves a single data summary by its unique identifier. This query fetches aggregated statistical information about data samples including averages, counts, and other summary statistics for a specific time period.'
121
+ }),
119
122
  tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
120
123
  tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
121
124
  tslib_1.__metadata("design:type", Function),
@@ -123,7 +126,9 @@ tslib_1.__decorate([
123
126
  tslib_1.__metadata("design:returntype", Promise)
124
127
  ], DataSummaryQuery.prototype, "dataSummary", null);
125
128
  tslib_1.__decorate([
126
- (0, type_graphql_1.Query)(returns => data_summary_type_js_1.DataSummaryList, { description: 'To fetch multiple DataSummaries' }),
129
+ (0, type_graphql_1.Query)(returns => data_summary_type_js_1.DataSummaryList, {
130
+ description: 'Retrieves multiple data summaries with pagination and filtering support. This query allows searching summaries by name and description, and is used for listing and browsing aggregated statistical data across all datasets.'
131
+ }),
127
132
  tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
128
133
  tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
129
134
  tslib_1.__metadata("design:type", Function),
@@ -131,7 +136,9 @@ tslib_1.__decorate([
131
136
  tslib_1.__metadata("design:returntype", Promise)
132
137
  ], DataSummaryQuery.prototype, "dataSummaries", null);
133
138
  tslib_1.__decorate([
134
- (0, type_graphql_1.Query)(returns => [data_summary_type_js_1.DynamicDataSummary], { description: 'To fetch multiple dynamically grouped DataSummaries' }),
139
+ (0, type_graphql_1.Query)(returns => [data_summary_type_js_1.DynamicDataSummary], {
140
+ description: 'Retrieves dynamically grouped data summaries for a specific time period and dataset. This query provides aggregated statistical information grouped by data keys, enabling trend analysis and performance monitoring across different dimensions.'
141
+ }),
135
142
  tslib_1.__param(0, (0, type_graphql_1.Arg)('period')),
136
143
  tslib_1.__param(1, (0, type_graphql_1.Arg)('dataSetName')),
137
144
  tslib_1.__param(2, (0, type_graphql_1.Arg)('dataKeys', type => [String], { nullable: true })),
@@ -143,7 +150,9 @@ tslib_1.__decorate([
143
150
  ], DataSummaryQuery.prototype, "dataSummaryByPeriod", null);
144
151
  tslib_1.__decorate([
145
152
  (0, type_graphql_1.Directive)('@privilege(category: "data-summary", privilege: "query", domainOwnerGranted: true)'),
146
- (0, type_graphql_1.Query)(returns => data_summary_type_js_1.DataSummaryList, { description: 'To fetch multiple data summaries by data set name' }),
153
+ (0, type_graphql_1.Query)(returns => data_summary_type_js_1.DataSummaryList, {
154
+ description: "Retrieves data summaries that belong to a specific dataset by dataset name. This query filters summaries by dataset name and includes searchable fields based on the dataset's key configuration, enabling targeted statistical analysis within a particular dataset context."
155
+ }),
147
156
  tslib_1.__param(0, (0, type_graphql_1.Arg)('dataSetName')),
148
157
  tslib_1.__param(1, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
149
158
  tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
@@ -153,7 +162,9 @@ tslib_1.__decorate([
153
162
  ], DataSummaryQuery.prototype, "dataSummariesByDataSetName", null);
154
163
  tslib_1.__decorate([
155
164
  (0, type_graphql_1.Directive)('@privilege(category: "data-summary", privilege: "query", domainOwnerGranted: true)'),
156
- (0, type_graphql_1.Query)(returns => data_summary_type_js_1.DataSummaryList, { description: 'To fetch multiple data summaries by data set' }),
165
+ (0, type_graphql_1.Query)(returns => data_summary_type_js_1.DataSummaryList, {
166
+ description: "Retrieves data summaries that belong to a specific dataset by dataset ID. This query filters summaries by dataset ID and includes searchable fields based on the dataset's key configuration, enabling targeted statistical analysis within a particular dataset context."
167
+ }),
157
168
  tslib_1.__param(0, (0, type_graphql_1.Arg)('dataSetId')),
158
169
  tslib_1.__param(1, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
159
170
  tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
@@ -163,7 +174,9 @@ tslib_1.__decorate([
163
174
  ], DataSummaryQuery.prototype, "dataSummariesByDataSet", null);
164
175
  tslib_1.__decorate([
165
176
  (0, type_graphql_1.Directive)('@privilege(category: "data-summary", privilege: "query", domainOwnerGranted: true)'),
166
- (0, type_graphql_1.Query)(returns => data_summary_type_js_1.DataSummaryList, { description: 'To fetch multiple data summaries by data key set' }),
177
+ (0, type_graphql_1.Query)(returns => data_summary_type_js_1.DataSummaryList, {
178
+ description: 'Retrieves data summaries that belong to datasets using a specific data key set. This query filters summaries by key set ID and enables cross-dataset statistical analysis based on shared key configurations, useful for comparing aggregated data across related datasets.'
179
+ }),
167
180
  tslib_1.__param(0, (0, type_graphql_1.Arg)('dataKeySetId')),
168
181
  tslib_1.__param(1, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
169
182
  tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
@@ -172,14 +185,18 @@ tslib_1.__decorate([
172
185
  tslib_1.__metadata("design:returntype", Promise)
173
186
  ], DataSummaryQuery.prototype, "dataSummariesByDataKeySet", null);
174
187
  tslib_1.__decorate([
175
- (0, type_graphql_1.FieldResolver)(type => [data_item_type_js_1.DataItem]),
188
+ (0, type_graphql_1.FieldResolver)(type => [data_item_type_js_1.DataItem], {
189
+ description: 'Retrieves the data items (field definitions) associated with this data summary. These items define the structure and validation rules for the summary data, including field names, types, and constraints.'
190
+ }),
176
191
  tslib_1.__param(0, (0, type_graphql_1.Root)()),
177
192
  tslib_1.__metadata("design:type", Function),
178
193
  tslib_1.__metadata("design:paramtypes", [data_summary_js_1.DataSummary]),
179
194
  tslib_1.__metadata("design:returntype", Promise)
180
195
  ], DataSummaryQuery.prototype, "dataItems", null);
181
196
  tslib_1.__decorate([
182
- (0, type_graphql_1.FieldResolver)(type => data_set_js_1.DataSet),
197
+ (0, type_graphql_1.FieldResolver)(type => data_set_js_1.DataSet, {
198
+ description: 'Retrieves the dataset that this data summary belongs to. This field resolver provides access to the dataset configuration and settings associated with the summary.'
199
+ }),
183
200
  tslib_1.__param(0, (0, type_graphql_1.Root)()),
184
201
  tslib_1.__metadata("design:type", Function),
185
202
  tslib_1.__metadata("design:paramtypes", [data_summary_js_1.DataSummary]),