@dssp/dkpi 1.0.0-alpha.35 → 1.0.0-alpha.37

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dssp/dkpi",
3
- "version": "1.0.0-alpha.35",
3
+ "version": "1.0.0-alpha.37",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -39,7 +39,7 @@
39
39
  "docker:push": "docker image push hatiolab/dkpi:latest && docker image push hatiolab/dkpi:$npm_package_version"
40
40
  },
41
41
  "dependencies": {
42
- "@dssp/project": "^1.0.0-alpha.35",
42
+ "@dssp/project": "^1.0.0-alpha.37",
43
43
  "@material/web": "^2.1.0",
44
44
  "@operato/chart": "^9.0.0",
45
45
  "@operato/gantt": "^9.0.0",
@@ -93,5 +93,5 @@
93
93
  "devDependencies": {
94
94
  "@things-factory/builder": "^9.0.0"
95
95
  },
96
- "gitHead": "ed297576d670b3551aa9ba781f95ff36b0ba31e4"
96
+ "gitHead": "f06dfcc285fb02dfe4f175269c54c91ac264ae34"
97
97
  }
package/schema.graphql CHANGED
@@ -1506,6 +1506,53 @@ type BuildingInspection {
1506
1506
  status: String
1507
1507
  updatedAt: DateTimeISO
1508
1508
  updater: User
1509
+ worklog: BuildingInspectionDailyWorklog
1510
+ }
1511
+
1512
+ """Entity for BuildingInspectionDailyWorklog"""
1513
+ type BuildingInspectionDailyWorklog {
1514
+ buildingInspections: [BuildingInspection!]
1515
+ createdAt: DateTimeISO
1516
+ creator: User
1517
+ date: String
1518
+ deletedAt: DateTimeISO
1519
+ directiveMemo: String
1520
+ documentNo: String
1521
+ domain: Domain
1522
+ id: ID
1523
+ memo: String
1524
+
1525
+ """총괄 감리 책임자"""
1526
+ overallSupervisory: User
1527
+ overallSupervisorySignature: String
1528
+ projectId: String!
1529
+
1530
+ """건축사보 (공종별 감리 관리자)"""
1531
+ taskSupervisory: User
1532
+ taskSupervisorySignature: String
1533
+ updatedAt: DateTimeISO
1534
+ updater: User
1535
+ worklogs: Object
1536
+ }
1537
+
1538
+ input BuildingInspectionDailyWorklogNew {
1539
+ buildingInspectionIds: [String!]
1540
+ date: String!
1541
+ directiveMemo: String
1542
+ memo: String
1543
+ overallSupervisoryId: String
1544
+ overallSupervisorySignature: String
1545
+ projectId: String!
1546
+ taskSupervisoryId: String
1547
+ taskSupervisorySignature: String
1548
+ worklogs: Object
1549
+ }
1550
+
1551
+ input BuildingInspectionDailyWorklogPatch {
1552
+ directiveMemo: String
1553
+ id: ID!
1554
+ memo: String
1555
+ worklogs: Object
1509
1556
  }
1510
1557
 
1511
1558
  type BuildingInspectionList {
@@ -1546,7 +1593,9 @@ type BuildingInspectionSummaryOfLevel {
1546
1593
 
1547
1594
  input BuildingInspectionsOfBuildingLevel {
1548
1595
  buildingLevelId: String!
1596
+ endDate: String
1549
1597
  limit: Float
1598
+ startDate: String
1550
1599
  }
1551
1600
 
1552
1601
  input BuildingInspectionsOfProject {
@@ -1621,8 +1670,17 @@ type Checklist {
1621
1670
  id: ID!
1622
1671
  inspectionDrawingType: String
1623
1672
  inspectionParts: [String!]
1673
+ inspectionRequestDocumentNo: String
1674
+ inspectionRequestMemo: String
1675
+ inspectionRequestUpdatedAt: DateTimeISO
1676
+ inspectionResultDocumentNo: String
1677
+ inspectionResultMemo: String
1678
+ inspectionResultStatus: String
1679
+ inspectionResultType: String
1680
+ inspectionResultUpdatedAt: DateTimeISO
1624
1681
  location: String
1625
1682
  name: String
1683
+ nameListAttachment: Attachment
1626
1684
 
1627
1685
  """총괄 시공 책임자"""
1628
1686
  overallConstructor: User
@@ -1716,6 +1774,10 @@ type ChecklistList {
1716
1774
 
1717
1775
  input ChecklistSubmitInputType {
1718
1776
  id: String!
1777
+ inspectionRequestMemo: String
1778
+ inspectionResultMemo: String
1779
+ inspectionResultStatus: String
1780
+ inspectionResultType: String
1719
1781
  overallConstructorSignature: String
1720
1782
  overallSupervisorySignature: String
1721
1783
  taskConstructorSignature: String
@@ -4637,6 +4699,102 @@ enum KpiPeriodType {
4637
4699
  YEAR
4638
4700
  }
4639
4701
 
4702
+ """
4703
+ Defines the meaning and metadata for each scope level (scope01~05) in KpiOrgScope
4704
+ """
4705
+ type KpiScope {
4706
+ """Whether this scope definition is active and should be used"""
4707
+ active: Boolean!
4708
+ createdAt: DateTimeISO
4709
+ creator: User
4710
+
4711
+ """Detailed description of what this scope dimension represents"""
4712
+ description: String
4713
+
4714
+ """Order/priority for display and processing"""
4715
+ displayOrder: Int!
4716
+
4717
+ """Domain this scope definition belongs to"""
4718
+ domain: Domain
4719
+ id: ID!
4720
+
4721
+ """Whether this scope should be included in statistical calculations"""
4722
+ includeInStatistics: Boolean!
4723
+
4724
+ """Scope level (1-5) corresponding to scope01-scope05 in KpiOrgScope"""
4725
+ level: Int!
4726
+
4727
+ """Additional metadata for this scope dimension (colors, icons, etc.)"""
4728
+ metadata: Object
4729
+
4730
+ """Display name for this scope dimension (e.g., "지역", "회사", "프로젝트규모")"""
4731
+ name: String!
4732
+
4733
+ """Parent scope level if this forms a hierarchy"""
4734
+ parentLevel: Int
4735
+
4736
+ """Type category of this scope dimension"""
4737
+ scopeType: ScopeType!
4738
+
4739
+ """Whether this scope should be displayed in dashboard visualizations"""
4740
+ showInDashboard: Boolean!
4741
+ updatedAt: DateTimeISO
4742
+ updater: User
4743
+
4744
+ """
4745
+ List of valid values for this scope (e.g., ["서울", "부산", "대구"] for regions)
4746
+ """
4747
+ validValues: Object
4748
+
4749
+ """Regex pattern for validating values in this scope dimension"""
4750
+ validationPattern: String
4751
+ }
4752
+
4753
+ type KpiScopeList {
4754
+ items: [KpiScope!]!
4755
+ total: Float!
4756
+ }
4757
+
4758
+ input KpiScopePatch {
4759
+ """Whether this scope definition is active and should be used"""
4760
+ active: Boolean! = true
4761
+ cuFlag: String
4762
+
4763
+ """Detailed description of what this scope dimension represents"""
4764
+ description: String
4765
+
4766
+ """Order/priority for display and processing"""
4767
+ displayOrder: Int! = 1
4768
+ id: ID
4769
+
4770
+ """Whether this scope should be included in statistical calculations"""
4771
+ includeInStatistics: Boolean! = true
4772
+
4773
+ """Scope level (1-5) corresponding to scope01-scope05 in KpiOrgScope"""
4774
+ level: Int!
4775
+
4776
+ """Additional metadata for this scope dimension"""
4777
+ metadata: Object
4778
+
4779
+ """Display name for this scope dimension (e.g., "지역", "회사", "프로젝트규모")"""
4780
+ name: String!
4781
+
4782
+ """Parent scope level if this forms a hierarchy"""
4783
+ parentLevel: Int
4784
+
4785
+ """Type category of this scope dimension"""
4786
+ scopeType: ScopeType!
4787
+
4788
+ """Whether this scope should be displayed in dashboard visualizations"""
4789
+ showInDashboard: Boolean! = false
4790
+
4791
+ """List of valid values for this scope"""
4792
+ validValues: [String!]
4793
+
4794
+ """Regex pattern for validating values in this scope dimension"""
4795
+ validationPattern: String
4796
+ }
4797
+
4640
4798
  """
4641
4799
  KPI Statistics Entity - Stores comprehensive statistical information for KPIs and Categories including central tendency measures (mean, median), dispersion metrics (standard deviation, variance), range indicators (min, max), and percentile distributions (25th, 75th percentiles, IQR). Supports both KPI and Category targets with flexible period-based aggregation (daily, weekly, monthly, yearly). Includes extensible JSON fields for additional metrics and metadata for calculation tracking.
4642
4800
  """
@@ -4663,6 +4821,9 @@ type KpiStatistic {
4663
4821
  """Reference to the KPI definition for which this value is calculated."""
4664
4822
  kpi: Kpi
4665
4823
 
4824
+ """Organization scope for scoped statistics. Null for overall statistics."""
4825
+ kpiOrgScope: KpiOrgScope
4826
+
4666
4827
  """Lower fence for outlier detection (Q1 - 1.5 * IQR)"""
4667
4828
  lowerFence: Float
4668
4829
 
@@ -4696,7 +4857,7 @@ type KpiStatistic {
4696
4857
  range: Float
4697
4858
 
4698
4859
  """
4699
- Statistical scope - null for overall statistics, category value for scoped statistics (e.g., "서울", "부장", "대규모")
4860
+ Legacy scope field - use kpiOrgScope instead. Statistical scope - null for overall statistics, category value for scoped statistics (e.g., "서울", "부장", "대규모")
4700
4861
  """
4701
4862
  scope: String
4702
4863
 
@@ -4781,6 +4942,9 @@ type KpiValue {
4781
4942
  """ID of the domain (tenant) for this KPI value."""
4782
4943
  domainId: String
4783
4944
 
4945
+ """Group key for this value (organization, line, user, project, etc.)"""
4946
+ group: String
4947
+
4784
4948
  """Unique identifier for this KPI value record."""
4785
4949
  id: ID!
4786
4950
 
@@ -5438,8 +5602,21 @@ type Mutation {
5438
5602
  orgScopes: [NewKpiOrgScope!]!
5439
5603
  ): [KpiOrgScope!]!
5440
5604
 
5605
+ """
5606
+ Calculate statistics for all KPIs in a specific period from KpiValue data
5607
+ """
5608
+ calculateAllKpiStatistics(periodType: KpiPeriodType!, valueDate: String!): [KpiStatistic!]!
5609
+
5610
+ """Calculate statistics for a specific KPI and period from KpiValue data"""
5611
+ calculateKpiStatistics(kpiId: String!, periodType: KpiPeriodType!, valueDate: String!): [KpiStatistic!]!
5612
+
5441
5613
  """KPI 기준으로 formula 계산 및 KPI Value upsert"""
5442
5614
  calculateKpiValue(kpiId: String!, org: String, valueDate: String): KpiValue!
5615
+
5616
+ """
5617
+ Recalculate statistics for dashboard regions (scope02-based statistics)
5618
+ """
5619
+ calculateRegionalStatistics(periodType: KpiPeriodType! = MONTH, valueDate: String!): [KpiStatistic!]!
5443
5620
  cancelInvitation(email: EmailAddress!, reference: String!, type: String!): Boolean!
5444
5621
 
5445
5622
  """To clear translations cache"""
@@ -5504,6 +5681,9 @@ type Mutation {
5504
5681
  """To create Building Inspection information"""
5505
5682
  createBuildingInspection(patch: NewBuildingInspection!): BuildingInspection!
5506
5683
 
5684
+ """Create Daily Worklog by projectId+date"""
5685
+ createBuildingInspectionDailyWorklog(patch: BuildingInspectionDailyWorklogNew!): BuildingInspectionDailyWorklog!
5686
+
5507
5687
  """To create new ChecklistItemComment"""
5508
5688
  createChecklistItemComment(checklistItemComment: NewChecklistItemComment!): ChecklistItemComment!
5509
5689
 
@@ -5613,6 +5793,9 @@ type Mutation {
5613
5793
  kpiOrgScope: NewKpiOrgScope!
5614
5794
  ): KpiOrgScope!
5615
5795
 
5796
+ """Create a new scope dimension definition"""
5797
+ createKpiScope(kpiScope: NewKpiScope!): KpiScope!
5798
+
5616
5799
  """To create new KpiStatistic"""
5617
5800
  createKpiStatistic(kpiStatistic: NewKpiStatistic!): KpiStatistic!
5618
5801
 
@@ -6012,6 +6195,12 @@ type Mutation {
6012
6195
  ids: [String!]!
6013
6196
  ): Boolean!
6014
6197
 
6198
+ """Delete a scope dimension definition"""
6199
+ deleteKpiScope(id: String!): Boolean!
6200
+
6201
+ """Delete multiple scope dimension definitions"""
6202
+ deleteKpiScopes(ids: [String!]!): Boolean!
6203
+
6015
6204
  """To delete KpiStatistic"""
6016
6205
  deleteKpiStatistic(id: String!): Boolean!
6017
6206
 
@@ -6652,6 +6841,9 @@ type Mutation {
6652
6841
  """To create Building Inspection And Checklist information"""
6653
6842
  updateBuildingInspectionChecklist(buildingInspection: UpdateBuildingInspectionSubmitType!): Boolean!
6654
6843
 
6844
+ """Update Daily Worklog"""
6845
+ updateBuildingInspectionDailyWorklog(patch: BuildingInspectionDailyWorklogPatch!): BuildingInspectionDailyWorklog!
6846
+
6655
6847
  """To modify ChecklistItemComment information"""
6656
6848
  updateChecklistItemComment(id: String!, patch: ChecklistItemCommentPatch!): ChecklistItemComment!
6657
6849
 
@@ -6736,6 +6928,9 @@ type Mutation {
6736
6928
  """To modify KpiMetricValue information"""
6737
6929
  updateKpiMetricValue(id: String!, patch: KpiMetricValuePatch!): KpiMetricValue!
6738
6930
 
6931
+ """Update a scope dimension definition"""
6932
+ updateKpiScope(id: String!, patch: KpiScopePatch!): KpiScope!
6933
+
6739
6934
  """To modify KpiStatistic information"""
6740
6935
  updateKpiStatistic(id: String!, patch: KpiStatisticPatch!): KpiStatistic!
6741
6936
 
@@ -6878,6 +7073,9 @@ type Mutation {
6878
7073
  patches: [KpiOrgScopePatch!]!
6879
7074
  ): [KpiOrgScope!]!
6880
7075
 
7076
+ """Update multiple scope dimension definitions"""
7077
+ updateMultipleKpiScope(patches: [KpiScopePatch!]!): [KpiScope!]!
7078
+
6881
7079
  """To modify multiple KpiStatistics' information"""
6882
7080
  updateMultipleKpiStatistic(patches: [KpiStatisticPatch!]!): [KpiStatistic!]!
6883
7081
 
@@ -7827,6 +8025,44 @@ input NewKpiOrgScope {
7827
8025
  scope05: String
7828
8026
  }
7829
8027
 
8028
+ input NewKpiScope {
8029
+ """Whether this scope definition is active and should be used"""
8030
+ active: Boolean! = true
8031
+
8032
+ """Detailed description of what this scope dimension represents"""
8033
+ description: String
8034
+
8035
+ """Order/priority for display and processing"""
8036
+ displayOrder: Int! = 1
8037
+
8038
+ """Whether this scope should be included in statistical calculations"""
8039
+ includeInStatistics: Boolean! = true
8040
+
8041
+ """Scope level (1-5) corresponding to scope01-scope05 in KpiOrgScope"""
8042
+ level: Int!
8043
+
8044
+ """Additional metadata for this scope dimension"""
8045
+ metadata: Object
8046
+
8047
+ """Display name for this scope dimension (e.g., "지역", "회사", "프로젝트규모")"""
8048
+ name: String!
8049
+
8050
+ """Parent scope level if this forms a hierarchy"""
8051
+ parentLevel: Int
8052
+
8053
+ """Type category of this scope dimension"""
8054
+ scopeType: ScopeType!
8055
+
8056
+ """Whether this scope should be displayed in dashboard visualizations"""
8057
+ showInDashboard: Boolean! = false
8058
+
8059
+ """List of valid values for this scope"""
8060
+ validValues: [String!]
8061
+
8062
+ """Regex pattern for validating values in this scope dimension"""
8063
+ validationPattern: String
8064
+ }
8065
+
7830
8066
  input NewKpiStatistic {
7831
8067
  additionalStatistics: Object
7832
8068
  count: Float
@@ -8698,6 +8934,7 @@ type PDFDrawing {
8698
8934
  type PDFDrawingLink {
8699
8935
  box: String
8700
8936
  data: PDFDrawingLinkData
8937
+ dwgId: String
8701
8938
  id: String
8702
8939
  story: String
8703
8940
  symbol: String
@@ -9107,14 +9344,18 @@ type Project {
9107
9344
  createdAt: DateTimeISO
9108
9345
  creator: User
9109
9346
  deletedAt: DateTimeISO
9347
+ documentNaming: String
9110
9348
  domain: Domain
9111
9349
  endDate: String
9350
+ geoGroup: String
9112
9351
  id: ID!
9352
+ inputType: String
9113
9353
  inspPassRate: Float
9114
9354
  kpi: Float
9115
9355
  mainPhoto: Attachment
9116
9356
  name: String!
9117
- projectType: String!
9357
+ postalCode: String
9358
+ projectType: String
9118
9359
  robotCount: Float
9119
9360
  robotProgressRate: Float
9120
9361
  rootTasks: [Task!]
@@ -9150,6 +9391,9 @@ input ProjectPatch {
9150
9391
  """연관된 건물 복합체 정보 (선택 사항)"""
9151
9392
  buildingComplex: BuildingComplexPatch
9152
9393
 
9394
+ """프로젝트 문서 네이밍"""
9395
+ documentNaming: String
9396
+
9153
9397
  """프로젝트 준공일정"""
9154
9398
  endDate: String
9155
9399
 
@@ -9697,6 +9941,7 @@ type Query {
9697
9941
 
9698
9942
  """To fetch a BuildingInspection"""
9699
9943
  buildingInspection(id: String!): BuildingInspection
9944
+ buildingInspectionDailyWorklogByProjectIdAndDate(date: String!, projectId: String!): BuildingInspectionDailyWorklog
9700
9945
 
9701
9946
  """To fetch a BuildingInspection Summary"""
9702
9947
  buildingInspectionDateSummaryOfLevelAndPeriod(buildingLevelId: String!, endDate: String!, startDate: String!): [BuildingInspectionSummary!]
@@ -9974,6 +10219,10 @@ type Query {
9974
10219
  sortings: [Sorting!]
9975
10220
  ): ContactList!
9976
10221
  customers: [Domain!]!
10222
+ dailyWorklogDatesOfProject(endDate: String!, projectId: String!, startDate: String!): [BuildingInspectionDailyWorklog!]!
10223
+
10224
+ """Get aggregated statistics by scope02 (regional level) for dashboard"""
10225
+ dashboardRegionalStatistics(periodType: KpiPeriodType! = MONTH, valueDate: String!): [KpiStatistic!]!
9977
10226
 
9978
10227
  """
9979
10228
  Retrieves a single data archive by its unique identifier. This query fetches detailed information about a data archive request including its status, download URL, and associated dataset information for data export purposes.
@@ -10792,6 +11041,24 @@ type Query {
10792
11041
  searchTerm: String
10793
11042
  ): [String!]!
10794
11043
 
11044
+ """Fetch a scope dimension definition by ID"""
11045
+ kpiScope(id: String!): KpiScope
11046
+
11047
+ """Fetch multiple scope dimension definitions"""
11048
+ kpiScopes(
11049
+ """An array of filter conditions to apply to the list query."""
11050
+ filters: [Filter!]
11051
+
11052
+ """Inherited value type for the list query."""
11053
+ inherited: InheritedValueType
11054
+
11055
+ """Pagination options for the list query."""
11056
+ pagination: Pagination
11057
+
11058
+ """Sorting options for the list query."""
11059
+ sortings: [Sorting!]
11060
+ ): KpiScopeList!
11061
+
10795
11062
  """To fetch a KpiStatistic"""
10796
11063
  kpiStatistic(id: String!): KpiStatistic
10797
11064
 
@@ -11346,6 +11613,9 @@ type Query {
11346
11613
  """To query data in S3 using Amazon Athena SDK"""
11347
11614
  queryFromAthena(queryData: Object!): Any!
11348
11615
 
11616
+ """Get regional statistics for dashboard map visualization"""
11617
+ regionalKpiStatistics(periodType: KpiPeriodType! = MONTH, regions: [String!], valueDate: String!): [KpiStatistic!]!
11618
+
11349
11619
  """To fetch a Resource"""
11350
11620
  resource(id: String!): Resource
11351
11621
 
@@ -12125,6 +12395,16 @@ type ScenarioQueueState {
12125
12395
  queue: [PendingObject!]!
12126
12396
  }
12127
12397
 
12398
+ """Types of organizational scope dimensions"""
12399
+ enum ScopeType {
12400
+ BUSINESS
12401
+ CUSTOM
12402
+ GEOGRAPHIC
12403
+ ORGANIZATIONAL
12404
+ TECHNICAL
12405
+ TEMPORAL
12406
+ }
12407
+
12128
12408
  """Entity for Setting"""
12129
12409
  type Setting {
12130
12410
  category: String!