@dssp/dkpi 1.0.0-alpha.10 → 1.0.0-alpha.11

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 (38) hide show
  1. package/dist-client/tsconfig.tsbuildinfo +1 -1
  2. package/dist-server/index.d.ts +1 -0
  3. package/dist-server/index.js +4 -0
  4. package/dist-server/index.js.map +1 -1
  5. package/dist-server/migrations/1752188906708-SeedKpiCategory.d.ts +5 -0
  6. package/dist-server/migrations/1752188906708-SeedKpiCategory.js +53 -0
  7. package/dist-server/migrations/1752188906708-SeedKpiCategory.js.map +1 -0
  8. package/dist-server/migrations/1752190849681-SeedKpi.d.ts +5 -0
  9. package/dist-server/migrations/1752190849681-SeedKpi.js +255 -0
  10. package/dist-server/migrations/1752190849681-SeedKpi.js.map +1 -0
  11. package/dist-server/migrations/1752192090123-add-grades-to-kpi.d.ts +7 -0
  12. package/dist-server/migrations/1752192090123-add-grades-to-kpi.js +51 -0
  13. package/dist-server/migrations/1752192090123-add-grades-to-kpi.js.map +1 -0
  14. package/dist-server/migrations/grade-data/x11-performance-table.json +962 -0
  15. package/dist-server/migrations/grade-data/x12-performance-table.json +611 -0
  16. package/dist-server/migrations/grade-data/x14-performance-table.json +42 -0
  17. package/dist-server/migrations/grade-data/x21-performance-table.json +889 -0
  18. package/dist-server/migrations/grade-data/x22-performance-table.json +1064 -0
  19. package/dist-server/migrations/grade-data/x23-performance-table.json +42 -0
  20. package/dist-server/migrations/grade-data/x31-performance-table.json +644 -0
  21. package/dist-server/migrations/grade-data/x32-performance-table.json +993 -0
  22. package/dist-server/migrations/grade-data/x33-performance-table.json +195 -0
  23. package/dist-server/migrations/grade-data/x34-performance-table.json +12 -0
  24. package/dist-server/migrations/grade-data/x35-performance-table.json +42 -0
  25. package/dist-server/migrations/grade-data/x41-performance-table.json +825 -0
  26. package/dist-server/migrations/grade-data/x42-performance-table.json +786 -0
  27. package/dist-server/migrations/grade-data/x43-performance-table.json +12 -0
  28. package/dist-server/migrations/grade-data/x44-performance-table.json +42 -0
  29. package/dist-server/migrations/grade-data/x51-performance-table.json +924 -0
  30. package/dist-server/migrations/grade-data/x52-performance-table.json +42 -0
  31. package/dist-server/migrations/grade-data/x61-performance-table.json +261 -0
  32. package/dist-server/migrations/grade-data/x62-performance-table.json +42 -0
  33. package/dist-server/migrations/index.d.ts +1 -0
  34. package/dist-server/migrations/index.js +12 -0
  35. package/dist-server/migrations/index.js.map +1 -0
  36. package/dist-server/tsconfig.tsbuildinfo +1 -1
  37. package/package.json +3 -3
  38. package/schema.graphql +30 -181
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dssp/dkpi",
3
- "version": "1.0.0-alpha.10",
3
+ "version": "1.0.0-alpha.11",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -24,7 +24,7 @@
24
24
  "build:client:watch": "npm run copy:files && tsc --p ./client/tsconfig.json --watch --preserveWatchOutput",
25
25
  "build:server": "npm run clean:server && tsc --p ./server/tsconfig.json",
26
26
  "build:app": "npm run clean:app && webpack --config ../../node_modules/@things-factory/builder/webpack.config.js",
27
- "clean:server": "rimraf dist-server",
27
+ "clean:server": "rimraf dist-server && copyfiles -u 1 \"./server/migrations/grade-data/**/*\" dist-server/",
28
28
  "clean:client": "rimraf dist-client",
29
29
  "clean:app": "rimraf dist-app",
30
30
  "clean": "npm run clean:server && npm run clean:client",
@@ -93,5 +93,5 @@
93
93
  "devDependencies": {
94
94
  "@things-factory/builder": "^9.0.0"
95
95
  },
96
- "gitHead": "7322fc8da4c5c286a5956e48dd9ef31a18cba0d1"
96
+ "gitHead": "ec5b3970ffbc8d3ca7175f28426b8677f2b6d322"
97
97
  }
package/schema.graphql CHANGED
@@ -3477,6 +3477,21 @@ input FontPatch {
3477
3477
  uri: String
3478
3478
  }
3479
3479
 
3480
+ """Grade information for KPI value"""
3481
+ type GradeInfo {
3482
+ """Color code for visualization"""
3483
+ color: String
3484
+
3485
+ """Grade description"""
3486
+ description: String
3487
+
3488
+ """Grade name (e.g., A, B, C, 우수, 양호)"""
3489
+ name: String!
3490
+
3491
+ """Grade score or performance value"""
3492
+ score: Float
3493
+ }
3494
+
3480
3495
  """Represents a role that is granted to a specific domain."""
3481
3496
  type GrantedRole {
3482
3497
  """The domain to which the role is granted."""
@@ -3725,8 +3740,8 @@ type Kpi {
3725
3740
  """
3726
3741
  formula: String
3727
3742
 
3728
- """List of grades for this KPI."""
3729
- grades: [KpiGrade!]
3743
+ """Grade configuration for this KPI version"""
3744
+ grades: Object
3730
3745
  histories(limit: Int): [KpiHistory!]
3731
3746
 
3732
3747
  """Unique identifier for this KPI."""
@@ -3871,111 +3886,6 @@ input KpiCategoryPatch {
3871
3886
  parentId: ID
3872
3887
  }
3873
3888
 
3874
- """
3875
- KPI grade entity. Represents a grade/section for a KPI version, with value range, score, color, and description.
3876
- """
3877
- type KpiGrade {
3878
- """Indicates whether this KPI grade is active and usable."""
3879
- active: Boolean
3880
-
3881
- """Color code for this grade (for visualization purposes)."""
3882
- color: String
3883
-
3884
- """Timestamp when this KPI grade was created."""
3885
- createdAt: DateTimeISO
3886
-
3887
- """User who created this KPI grade."""
3888
- creator: User
3889
-
3890
- """ID of the user who created this KPI grade."""
3891
- creatorId: String
3892
-
3893
- """Detailed description of this KPI grade."""
3894
- description: String
3895
-
3896
- """Domain (tenant) to which this KPI grade belongs."""
3897
- domain: Domain
3898
-
3899
- """ID of the domain (tenant) for this KPI grade."""
3900
- domainId: String
3901
-
3902
- """Unique identifier for this KPI grade."""
3903
- id: ID!
3904
-
3905
- """Reference to the KPI to which this grade belongs."""
3906
- kpi: Kpi!
3907
-
3908
- """ID of the referenced KPI."""
3909
- kpiId: String!
3910
-
3911
- """Maximum value for this grade section."""
3912
- maxValue: Float!
3913
-
3914
- """Minimum value for this grade section."""
3915
- minValue: Float!
3916
-
3917
- """Name of the grade or section for this KPI."""
3918
- name: String
3919
-
3920
- """Score or weight for this grade (optional)."""
3921
- score: Float
3922
-
3923
- """Timestamp when this KPI grade was last updated."""
3924
- updatedAt: DateTimeISO
3925
-
3926
- """User who last updated this KPI grade."""
3927
- updater: User
3928
-
3929
- """ID of the user who last updated this KPI grade."""
3930
- updaterId: String
3931
-
3932
- """Version of the KPI definition to which this grade belongs."""
3933
- version: Int!
3934
- }
3935
-
3936
- type KpiGradeList {
3937
- items: [KpiGrade!]!
3938
- total: Int!
3939
- }
3940
-
3941
- """
3942
- Input type for updating an existing KPI grade. Used in mutations to patch grade details.
3943
- """
3944
- input KpiGradePatch {
3945
- """Indicates whether this KPI grade is active and usable."""
3946
- active: Boolean
3947
-
3948
- """Color code for this grade (for visualization purposes)."""
3949
- color: String
3950
-
3951
- """Custom flag for update operations (internal use)."""
3952
- cuFlag: String
3953
-
3954
- """Detailed description of this KPI grade."""
3955
- description: String
3956
-
3957
- """ID of the KPI grade to update."""
3958
- id: ID
3959
-
3960
- """ID of the KPI to which this grade belongs."""
3961
- kpiId: ID
3962
-
3963
- """Maximum value for this grade section."""
3964
- maxValue: Int
3965
-
3966
- """Minimum value for this grade section."""
3967
- minValue: Int
3968
-
3969
- """Name of the grade or section for this KPI."""
3970
- name: String
3971
-
3972
- """Score or weight for this grade (optional)."""
3973
- score: Int
3974
-
3975
- """Version of the KPI definition to which this grade belongs."""
3976
- version: Int
3977
- }
3978
-
3979
3889
  """History Entity of Kpi"""
3980
3890
  type KpiHistory {
3981
3891
  """Whether this KPI is active (usable) or not."""
@@ -3991,6 +3901,9 @@ type KpiHistory {
3991
3901
 
3992
3902
  """Calculation formula for the KPI."""
3993
3903
  formula: String
3904
+
3905
+ """Grade configuration for this KPI version"""
3906
+ grades: Object
3994
3907
  id: ID!
3995
3908
  name: String!
3996
3909
 
@@ -4138,6 +4051,9 @@ input KpiPatch {
4138
4051
  """Calculation formula for the KPI, using metric codes and operators."""
4139
4052
  formula: String
4140
4053
 
4054
+ """Grade configuration for this KPI version"""
4055
+ grades: Object
4056
+
4141
4057
  """ID of the KPI to update."""
4142
4058
  id: ID
4143
4059
 
@@ -4192,6 +4108,7 @@ type KpiValue {
4192
4108
 
4193
4109
  """ID of the domain (tenant) for this KPI value."""
4194
4110
  domainId: String
4111
+ grade: GradeInfo
4195
4112
 
4196
4113
  """
4197
4114
  ID of the group (organization, department, project, etc.) this value is associated with.
@@ -4958,12 +4875,6 @@ type Mutation {
4958
4875
  category: NewKpiCategory!
4959
4876
  ): KpiCategory!
4960
4877
 
4961
- """Create a new KPI grade with the provided details."""
4962
- createKpiGrade(
4963
- """Input object containing details for the new KPI grade."""
4964
- grade: NewKpiGrade!
4965
- ): KpiGrade!
4966
-
4967
4878
  """Create a new KPI metric with the provided details."""
4968
4879
  createKpiMetric(
4969
4880
  """Input object containing details for the new KPI metric."""
@@ -5300,12 +5211,6 @@ type Mutation {
5300
5211
  """To delete KpiCategory"""
5301
5212
  deleteKpiCategory(id: String!): Boolean!
5302
5213
 
5303
- """To delete KpiGrade"""
5304
- deleteKpiGrade(id: String!): Boolean!
5305
-
5306
- """To delete multiple KpiGrades"""
5307
- deleteKpiGrades(ids: [String!]!): Boolean!
5308
-
5309
5214
  """To delete KpiMetric"""
5310
5215
  deleteKpiMetric(id: String!): Boolean!
5311
5216
 
@@ -5620,9 +5525,6 @@ type Mutation {
5620
5525
  """To import multiple KpiCategories"""
5621
5526
  importKpiCategories(kpiCategories: [KpiCategoryPatch!]!): Boolean!
5622
5527
 
5623
- """To import multiple KpiGrades"""
5624
- importKpiGrades(kpiGrades: [KpiGradePatch!]!): Boolean!
5625
-
5626
5528
  """To import multiple KpiMetrics"""
5627
5529
  importKpiMetrics(kpiMetrics: [KpiMetricPatch!]!): Boolean!
5628
5530
 
@@ -5719,6 +5621,9 @@ type Mutation {
5719
5621
  """
5720
5622
  pickActivityInstance(id: String!): ActivityThread
5721
5623
 
5624
+ """Recalculate grades for all KpiValues of a specific KPI"""
5625
+ recalculateGradesForKpi(kpiId: String!): Boolean!
5626
+
5722
5627
  """To refresh oauth2 access token"""
5723
5628
  refreshOauth2AccessToken(id: String!): Oauth2Client!
5724
5629
 
@@ -5962,9 +5867,6 @@ type Mutation {
5962
5867
  """To modify KpiCategory information"""
5963
5868
  updateKpiCategory(id: String!, patch: KpiCategoryPatch!): KpiCategory!
5964
5869
 
5965
- """To modify KpiGrade information"""
5966
- updateKpiGrade(id: String!, patch: KpiGradePatch!): KpiGrade!
5967
-
5968
5870
  """To modify KpiMetric information"""
5969
5871
  updateKpiMetric(id: String!, patch: KpiMetricPatch!): KpiMetric!
5970
5872
 
@@ -6080,9 +5982,6 @@ type Mutation {
6080
5982
  """To modify multiple KpiCategories' information"""
6081
5983
  updateMultipleKpiCategory(patches: [KpiCategoryPatch!]!): [KpiCategory!]!
6082
5984
 
6083
- """To modify multiple KpiGrades' information"""
6084
- updateMultipleKpiGrade(patches: [KpiGradePatch!]!): [KpiGrade!]!
6085
-
6086
5985
  """To modify multiple KpiMetrics' information"""
6087
5986
  updateMultipleKpiMetric(patches: [KpiMetricPatch!]!): [KpiMetric!]!
6088
5987
 
@@ -6813,6 +6712,9 @@ input NewKpi {
6813
6712
  """Calculation formula for the KPI, using metric codes and operators."""
6814
6713
  formula: String
6815
6714
 
6715
+ """Grade configuration for this KPI version"""
6716
+ grades: Object
6717
+
6816
6718
  """Name of the KPI."""
6817
6719
  name: String!
6818
6720
 
@@ -6857,38 +6759,6 @@ input NewKpiCategory {
6857
6759
  parentId: ID
6858
6760
  }
6859
6761
 
6860
- """
6861
- Input type for creating a new KPI grade. Used in mutations to provide grade details.
6862
- """
6863
- input NewKpiGrade {
6864
- """Indicates whether this KPI grade is active and usable."""
6865
- active: Boolean
6866
-
6867
- """Color code for this grade (for visualization purposes)."""
6868
- color: String
6869
-
6870
- """Detailed description of this KPI grade."""
6871
- description: String
6872
-
6873
- """ID of the KPI to which this grade belongs."""
6874
- kpiId: ID!
6875
-
6876
- """Maximum value for this grade section."""
6877
- maxValue: Int!
6878
-
6879
- """Minimum value for this grade section."""
6880
- minValue: Int!
6881
-
6882
- """Name of the grade or section for this KPI."""
6883
- name: String!
6884
-
6885
- """Score or weight for this grade (optional)."""
6886
- score: Int
6887
-
6888
- """Version of the KPI definition to which this grade belongs."""
6889
- version: Int!
6890
- }
6891
-
6892
6762
  """
6893
6763
  Input type for creating a new KPI metric. Used in mutations to provide metric details.
6894
6764
  """
@@ -9515,27 +9385,6 @@ type Query {
9515
9385
  id: String!
9516
9386
  ): KpiCategory
9517
9387
 
9518
- """Fetch a single KPI grade by its unique identifier."""
9519
- kpiGrade(
9520
- """Unique identifier of the KPI grade to fetch."""
9521
- id: String!
9522
- ): KpiGrade
9523
-
9524
- """To fetch multiple KpiGrades"""
9525
- kpiGrades(
9526
- """An array of filter conditions to apply to the list query."""
9527
- filters: [Filter!]
9528
-
9529
- """Inherited value type for the list query."""
9530
- inherited: InheritedValueType
9531
-
9532
- """Pagination options for the list query."""
9533
- pagination: Pagination
9534
-
9535
- """Sorting options for the list query."""
9536
- sortings: [Sorting!]
9537
- ): KpiGradeList!
9538
-
9539
9388
  """Fetch a single KPI metric by its unique identifier."""
9540
9389
  kpiMetric(
9541
9390
  """Unique identifier of the KPI metric to fetch."""