@livetronics/pipesurf-types 1.1.13 → 1.1.15

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.
@@ -175,7 +175,7 @@ export interface paths {
175
175
  message: string | null;
176
176
  data: components["schemas"]["User"][] | null;
177
177
  /** @example 100 */
178
- count: number;
178
+ totalCount: number;
179
179
  /** @example 1 */
180
180
  page: number;
181
181
  /** @example 10 */
@@ -638,7 +638,7 @@ export interface paths {
638
638
  message: string | null;
639
639
  data: components["schemas"]["Project"][] | null;
640
640
  /** @example 100 */
641
- count: number;
641
+ totalCount: number;
642
642
  /** @example 1 */
643
643
  page: number;
644
644
  /** @example 10 */
@@ -699,7 +699,7 @@ export interface paths {
699
699
  message: string | null;
700
700
  data: components["schemas"]["Company"][] | null;
701
701
  /** @example 100 */
702
- count: number;
702
+ totalCount: number;
703
703
  /** @example 1 */
704
704
  page: number;
705
705
  /** @example 10 */
@@ -941,7 +941,7 @@ export interface paths {
941
941
  };
942
942
  /**
943
943
  * List projects
944
- * @description Get paginated list of projects accessible to the user.
944
+ * @description Get paginated list of projects accessible to the user. Returns role-specific metrics for each project based on the authenticated user role.
945
945
  */
946
946
  get: {
947
947
  parameters: {
@@ -958,7 +958,7 @@ export interface paths {
958
958
  };
959
959
  requestBody?: never;
960
960
  responses: {
961
- /** @description Projects list */
961
+ /** @description Projects list with role-specific metrics */
962
962
  200: {
963
963
  headers: {
964
964
  [name: string]: unknown;
@@ -973,9 +973,9 @@ export interface paths {
973
973
  error: string | null;
974
974
  /** @example Operation successful */
975
975
  message: string | null;
976
- data: components["schemas"]["Project"][] | null;
976
+ data: components["schemas"]["ProjectListItem"][] | null;
977
977
  /** @example 100 */
978
- count: number;
978
+ totalCount: number;
979
979
  /** @example 1 */
980
980
  page: number;
981
981
  /** @example 10 */
@@ -1039,7 +1039,10 @@ export interface paths {
1039
1039
  path?: never;
1040
1040
  cookie?: never;
1041
1041
  };
1042
- /** Get project details */
1042
+ /**
1043
+ * Get project details
1044
+ * @description Get detailed information about a specific project including phase weights and progress breakdown.
1045
+ */
1043
1046
  get: {
1044
1047
  parameters: {
1045
1048
  query?: never;
@@ -1051,7 +1054,7 @@ export interface paths {
1051
1054
  };
1052
1055
  requestBody?: never;
1053
1056
  responses: {
1054
- /** @description Project details with phases and roles */
1057
+ /** @description Project details with phases (including weights) and progress */
1055
1058
  200: {
1056
1059
  headers: {
1057
1060
  [name: string]: unknown;
@@ -1066,7 +1069,7 @@ export interface paths {
1066
1069
  error: string | null;
1067
1070
  /** @example Operation successful */
1068
1071
  message: string | null;
1069
- data: components["schemas"]["Project"] & unknown;
1072
+ data: components["schemas"]["ProjectDetails"] & unknown;
1070
1073
  };
1071
1074
  };
1072
1075
  };
@@ -1358,13 +1361,21 @@ export interface paths {
1358
1361
  path?: never;
1359
1362
  cookie?: never;
1360
1363
  };
1361
- /** List welders */
1364
+ /**
1365
+ * List welders
1366
+ * @description Get all welders for the company. Can be filtered by WPS, WPS Entry, welding process, and material grades. Material grade filters only apply when idWPS is provided.
1367
+ */
1362
1368
  get: {
1363
1369
  parameters: {
1364
1370
  query?: {
1365
1371
  page?: string;
1366
1372
  limit?: string;
1367
1373
  searchQuery?: string;
1374
+ idWPS?: string;
1375
+ idWPSEntry?: string;
1376
+ idWeldingProcess?: string;
1377
+ idMaterialGradePrimary?: string;
1378
+ idMaterialGradeSecondary?: string;
1368
1379
  };
1369
1380
  header?: never;
1370
1381
  path?: never;
@@ -1389,7 +1400,7 @@ export interface paths {
1389
1400
  message: string | null;
1390
1401
  data: components["schemas"]["Welder"][] | null;
1391
1402
  /** @example 100 */
1392
- count: number;
1403
+ totalCount: number;
1393
1404
  /** @example 1 */
1394
1405
  page: number;
1395
1406
  /** @example 10 */
@@ -1561,6 +1572,61 @@ export interface paths {
1561
1572
  };
1562
1573
  trace?: never;
1563
1574
  };
1575
+ "/welders/{idWelder}/status": {
1576
+ parameters: {
1577
+ query?: never;
1578
+ header?: never;
1579
+ path?: never;
1580
+ cookie?: never;
1581
+ };
1582
+ get?: never;
1583
+ put?: never;
1584
+ post?: never;
1585
+ delete?: never;
1586
+ options?: never;
1587
+ head?: never;
1588
+ /**
1589
+ * Change welder status
1590
+ * @description Block or unblock a welder.
1591
+ */
1592
+ patch: {
1593
+ parameters: {
1594
+ query?: never;
1595
+ header?: never;
1596
+ path: {
1597
+ idWelder: string;
1598
+ };
1599
+ cookie?: never;
1600
+ };
1601
+ requestBody?: {
1602
+ content: {
1603
+ "application/json": components["schemas"]["ChangeWelderStatusRequest"];
1604
+ };
1605
+ };
1606
+ responses: {
1607
+ /** @description Status changed */
1608
+ 200: {
1609
+ headers: {
1610
+ [name: string]: unknown;
1611
+ };
1612
+ content: {
1613
+ "application/json": {
1614
+ /**
1615
+ * @example SUCCESS
1616
+ * @enum {string}
1617
+ */
1618
+ status: "SUCCESS" | "FAILED";
1619
+ error: string | null;
1620
+ /** @example Operation successful */
1621
+ message: string | null;
1622
+ data: unknown;
1623
+ };
1624
+ };
1625
+ };
1626
+ };
1627
+ };
1628
+ trace?: never;
1629
+ };
1564
1630
  "/wps": {
1565
1631
  parameters: {
1566
1632
  query?: never;
@@ -1601,7 +1667,7 @@ export interface paths {
1601
1667
  message: string | null;
1602
1668
  data: components["schemas"]["WPS"][] | null;
1603
1669
  /** @example 100 */
1604
- count: number;
1670
+ totalCount: number;
1605
1671
  /** @example 1 */
1606
1672
  page: number;
1607
1673
  /** @example 10 */
@@ -2043,6 +2109,64 @@ export interface paths {
2043
2109
  patch?: never;
2044
2110
  trace?: never;
2045
2111
  };
2112
+ "/wps/{idWPS}/status": {
2113
+ parameters: {
2114
+ query?: never;
2115
+ header?: never;
2116
+ path?: never;
2117
+ cookie?: never;
2118
+ };
2119
+ get?: never;
2120
+ put?: never;
2121
+ post?: never;
2122
+ delete?: never;
2123
+ options?: never;
2124
+ head?: never;
2125
+ /**
2126
+ * Change WPS status
2127
+ * @description Block or unblock a WPS document. Only ACTIVE and DISABLED WPS documents can have their status changed. REMOVED WPS documents cannot be modified. Only accessible to COMPANY_ADMIN users.
2128
+ */
2129
+ patch: {
2130
+ parameters: {
2131
+ query?: never;
2132
+ header?: never;
2133
+ path: {
2134
+ idWPS: string;
2135
+ };
2136
+ cookie?: never;
2137
+ };
2138
+ requestBody?: {
2139
+ content: {
2140
+ "application/json": components["schemas"]["ChangeWPSStatusRequest"];
2141
+ };
2142
+ };
2143
+ responses: {
2144
+ /** @description WPS status changed */
2145
+ 200: {
2146
+ headers: {
2147
+ [name: string]: unknown;
2148
+ };
2149
+ content: {
2150
+ "application/json": {
2151
+ /**
2152
+ * @example SUCCESS
2153
+ * @enum {string}
2154
+ */
2155
+ status: "SUCCESS" | "FAILED";
2156
+ error: string | null;
2157
+ /** @example Operation successful */
2158
+ message: string | null;
2159
+ data: {
2160
+ /** @example WPS disabled successfully. */
2161
+ message: string;
2162
+ } | null;
2163
+ };
2164
+ };
2165
+ };
2166
+ };
2167
+ };
2168
+ trace?: never;
2169
+ };
2046
2170
  "/wps/{idWPS}/entries/{idWPSEntry}": {
2047
2171
  parameters: {
2048
2172
  query?: never;
@@ -2144,7 +2268,7 @@ export interface paths {
2144
2268
  message: string | null;
2145
2269
  data: components["schemas"]["Draft"][] | null;
2146
2270
  /** @example 100 */
2147
- count: number;
2271
+ totalCount: number;
2148
2272
  /** @example 1 */
2149
2273
  page: number;
2150
2274
  /** @example 10 */
@@ -2313,8 +2437,11 @@ export interface paths {
2313
2437
  requestBody?: {
2314
2438
  content: {
2315
2439
  "multipart/form-data": {
2316
- /** @description Excel file (.xlsx) */
2317
- file?: unknown;
2440
+ /**
2441
+ * Format: binary
2442
+ * @description Excel file (.xlsx)
2443
+ */
2444
+ file?: string;
2318
2445
  remarks?: string;
2319
2446
  };
2320
2447
  };
@@ -2857,8 +2984,11 @@ export interface paths {
2857
2984
  requestBody?: {
2858
2985
  content: {
2859
2986
  "multipart/form-data": {
2860
- /** @description Excel file (.xlsx) to validate */
2861
- file?: unknown;
2987
+ /**
2988
+ * Format: binary
2989
+ * @description Excel file (.xlsx) to validate
2990
+ */
2991
+ file?: string;
2862
2992
  };
2863
2993
  };
2864
2994
  };
@@ -3157,7 +3287,7 @@ export interface paths {
3157
3287
  };
3158
3288
  /**
3159
3289
  * Get sheets in project
3160
- * @description Get a paginated list of all sheets in a project with optional filters for sheet number, drawing name, and creation date range.
3290
+ * @description Get a paginated list of all sheets in a project with optional filters for sheet number, drawing name, creation date range, and joint-based filters through the SheetSpool junction.
3161
3291
  */
3162
3292
  get: {
3163
3293
  parameters: {
@@ -3171,6 +3301,15 @@ export interface paths {
3171
3301
  dateTo?: string;
3172
3302
  sortBy?: string;
3173
3303
  order?: string;
3304
+ jointPhase?: string;
3305
+ jointStatus?: string;
3306
+ jointAssignedTo?: string;
3307
+ jointFitupMinCount?: string;
3308
+ jointFitupMaxCount?: string;
3309
+ jointWeldingMinCount?: string;
3310
+ jointWeldingMaxCount?: string;
3311
+ jointNdtMinCount?: string;
3312
+ jointNdtMaxCount?: string;
3174
3313
  };
3175
3314
  header?: never;
3176
3315
  path?: never;
@@ -3259,12 +3398,21 @@ export interface paths {
3259
3398
  };
3260
3399
  /**
3261
3400
  * Get live drawings
3262
- * @description Get all distinct live drawing names for a project, sorted alphabetically.
3401
+ * @description Get all distinct live drawing names for a project, sorted alphabetically. Supports joint-based filters through the SheetSpool junction.
3263
3402
  */
3264
3403
  get: {
3265
3404
  parameters: {
3266
3405
  query: {
3267
3406
  idProject: string;
3407
+ jointPhase?: string;
3408
+ jointStatus?: string;
3409
+ jointAssignedTo?: string;
3410
+ jointFitupMinCount?: string;
3411
+ jointFitupMaxCount?: string;
3412
+ jointWeldingMinCount?: string;
3413
+ jointWeldingMaxCount?: string;
3414
+ jointNdtMinCount?: string;
3415
+ jointNdtMaxCount?: string;
3268
3416
  };
3269
3417
  header?: never;
3270
3418
  path?: never;
@@ -3361,6 +3509,8 @@ export interface paths {
3361
3509
  paintCount?: string;
3362
3510
  paintCountMin?: string;
3363
3511
  paintCountMax?: string;
3512
+ idMaterialGradePrimary?: string;
3513
+ idMaterialGradeSecondary?: string;
3364
3514
  };
3365
3515
  header?: never;
3366
3516
  path?: never;
@@ -3385,7 +3535,7 @@ export interface paths {
3385
3535
  message: string | null;
3386
3536
  data: components["schemas"]["Joint"][] | null;
3387
3537
  /** @example 100 */
3388
- count: number;
3538
+ totalCount: number;
3389
3539
  /** @example 1 */
3390
3540
  page: number;
3391
3541
  /** @example 10 */
@@ -3455,7 +3605,7 @@ export interface paths {
3455
3605
  message: string | null;
3456
3606
  data: components["schemas"]["Joint"][] | null;
3457
3607
  /** @example 100 */
3458
- count: number;
3608
+ totalCount: number;
3459
3609
  /** @example 1 */
3460
3610
  page: number;
3461
3611
  /** @example 10 */
@@ -3604,6 +3754,75 @@ export interface paths {
3604
3754
  patch?: never;
3605
3755
  trace?: never;
3606
3756
  };
3757
+ "/joints/{idJoint}/ndt-results": {
3758
+ parameters: {
3759
+ query?: never;
3760
+ header?: never;
3761
+ path?: never;
3762
+ cookie?: never;
3763
+ };
3764
+ /**
3765
+ * Get NDT results for joint
3766
+ * @description Get all NDT test submissions and their individual test results for a specific joint. Returns submissions sorted by creation date (newest first). Each submission contains the overall result, remarks, and an array of individual test results with test type, result, coverage, and remarks.
3767
+ */
3768
+ get: {
3769
+ parameters: {
3770
+ query?: never;
3771
+ header?: never;
3772
+ path: {
3773
+ idJoint: string;
3774
+ };
3775
+ cookie?: never;
3776
+ };
3777
+ requestBody?: never;
3778
+ responses: {
3779
+ /** @description NDT results for joint */
3780
+ 200: {
3781
+ headers: {
3782
+ [name: string]: unknown;
3783
+ };
3784
+ content: {
3785
+ "application/json": {
3786
+ /**
3787
+ * @example SUCCESS
3788
+ * @enum {string}
3789
+ */
3790
+ status: "SUCCESS" | "FAILED";
3791
+ error: string | null;
3792
+ /** @example Operation successful */
3793
+ message: string | null;
3794
+ data: components["schemas"]["NDTResult"][] | null;
3795
+ };
3796
+ };
3797
+ };
3798
+ /** @description User does not have access to this joint */
3799
+ 403: {
3800
+ headers: {
3801
+ [name: string]: unknown;
3802
+ };
3803
+ content: {
3804
+ "application/json": components["schemas"]["ErrorResponse"];
3805
+ };
3806
+ };
3807
+ /** @description Joint not found */
3808
+ 404: {
3809
+ headers: {
3810
+ [name: string]: unknown;
3811
+ };
3812
+ content: {
3813
+ "application/json": components["schemas"]["ErrorResponse"];
3814
+ };
3815
+ };
3816
+ };
3817
+ };
3818
+ put?: never;
3819
+ post?: never;
3820
+ delete?: never;
3821
+ options?: never;
3822
+ head?: never;
3823
+ patch?: never;
3824
+ trace?: never;
3825
+ };
3607
3826
  "/joints/{idJoint}/action": {
3608
3827
  parameters: {
3609
3828
  query?: never;
@@ -3624,7 +3843,7 @@ export interface paths {
3624
3843
  * - VERIFY_REJECTION (PE)
3625
3844
  *
3626
3845
  * **WELDING Phase Actions:**
3627
- * - ASSIGN_WELDER_WPS (QC Inspector only) - Assign welder and WPS before WF can mark complete. Validates: WPS belongs to company, WPS has entry with joint material grades, welder belongs to at least one of those WPS entries
3846
+ * - ASSIGN_WELDER_WPS (QC Inspector only) - Assign WPS and optionally welder. idWPS is required, idWelder is optional. Validates: WPS belongs to company, WPS has entry with joint material grades. If welder provided, validates welder belongs to at least one of those WPS entries
3628
3847
  * - COMPLETE (Welding Foreman, PE) - Requires welder/WPS to be assigned by QC first
3629
3848
  * - APPROVE/REJECT (PE)
3630
3849
  * - QC_APPROVE/QC_REJECT (QC Inspector)
@@ -3704,62 +3923,57 @@ export interface paths {
3704
3923
  patch?: never;
3705
3924
  trace?: never;
3706
3925
  };
3707
- "/spools": {
3926
+ "/joints/bulk-action": {
3708
3927
  parameters: {
3709
3928
  query?: never;
3710
3929
  header?: never;
3711
3930
  path?: never;
3712
3931
  cookie?: never;
3713
3932
  };
3933
+ get?: never;
3934
+ put?: never;
3714
3935
  /**
3715
- * List spools
3716
- * @description Get all spools for a project with optional filtering by phase, status, sheet, and drawing. Multi-value filters (phase, status, idSheet, drawing) accept comma-separated values and use OR conditions for flexible querying.
3936
+ * Perform bulk action on multiple joints
3937
+ * @description Perform a workflow action on multiple joints at once. All joints must be live, belong to the same project, and be in the same phase.
3938
+ *
3939
+ * **Validations:**
3940
+ * - Maximum 100 joints per request
3941
+ * - All joints must exist and be live (not removed)
3942
+ * - All joints must belong to the same project
3943
+ * - All joints must be in the same phase
3944
+ * - User must have access to the project
3945
+ * - User must have permission to perform the action on the phase
3946
+ *
3947
+ * **Response:**
3948
+ * - SUCCESS: All joints processed successfully
3949
+ * - PARTIAL: Some joints succeeded, some failed (returns detailed breakdown)
3950
+ * - FAILED: All joints failed
3951
+ *
3952
+ * Same actions available as single joint action endpoint.
3717
3953
  */
3718
- get: {
3954
+ post: {
3719
3955
  parameters: {
3720
- query: {
3721
- idProject: string;
3722
- page?: string;
3723
- limit?: string;
3724
- phase?: string;
3725
- status?: string;
3726
- idSheet?: string;
3727
- drawing?: string;
3728
- };
3956
+ query?: never;
3729
3957
  header?: never;
3730
3958
  path?: never;
3731
3959
  cookie?: never;
3732
3960
  };
3733
- requestBody?: never;
3961
+ requestBody?: {
3962
+ content: {
3963
+ "application/json": components["schemas"]["BulkJointActionRequest"];
3964
+ };
3965
+ };
3734
3966
  responses: {
3735
- /** @description Paginated list of spools */
3967
+ /** @description Bulk action completed (may be partial success) */
3736
3968
  200: {
3737
3969
  headers: {
3738
3970
  [name: string]: unknown;
3739
3971
  };
3740
3972
  content: {
3741
- "application/json": {
3742
- /**
3743
- * @example SUCCESS
3744
- * @enum {string}
3745
- */
3746
- status: "SUCCESS" | "FAILED";
3747
- error: string | null;
3748
- /** @example Operation successful */
3749
- message: string | null;
3750
- data: components["schemas"]["Spool"][] | null;
3751
- /** @example 100 */
3752
- count: number;
3753
- /** @example 1 */
3754
- page: number;
3755
- /** @example 10 */
3756
- limit: number;
3757
- /** @example 10 */
3758
- totalPages: number;
3759
- };
3973
+ "application/json": components["schemas"]["BulkJointActionResponse"];
3760
3974
  };
3761
3975
  };
3762
- /** @description idProject is required */
3976
+ /** @description Invalid request (missing fields, joints not in same project/phase) */
3763
3977
  400: {
3764
3978
  headers: {
3765
3979
  [name: string]: unknown;
@@ -3768,10 +3982,113 @@ export interface paths {
3768
3982
  "application/json": components["schemas"]["ErrorResponse"];
3769
3983
  };
3770
3984
  };
3985
+ /** @description User does not have permission for this action */
3986
+ 403: {
3987
+ headers: {
3988
+ [name: string]: unknown;
3989
+ };
3990
+ content: {
3991
+ "application/json": components["schemas"]["ErrorResponse"];
3992
+ };
3993
+ };
3994
+ /** @description No valid joints found */
3995
+ 404: {
3996
+ headers: {
3997
+ [name: string]: unknown;
3998
+ };
3999
+ content: {
4000
+ "application/json": components["schemas"]["ErrorResponse"];
4001
+ };
4002
+ };
3771
4003
  };
3772
4004
  };
3773
- put?: never;
3774
- post?: never;
4005
+ delete?: never;
4006
+ options?: never;
4007
+ head?: never;
4008
+ patch?: never;
4009
+ trace?: never;
4010
+ };
4011
+ "/spools": {
4012
+ parameters: {
4013
+ query?: never;
4014
+ header?: never;
4015
+ path?: never;
4016
+ cookie?: never;
4017
+ };
4018
+ /**
4019
+ * List spools
4020
+ * @description Get all spools for a project with optional filtering by phase, status, sheet, drawing, and hydrotest count. Multi-value filters (phase, status, idSheet, drawing) accept comma-separated values and use OR conditions for flexible querying.
4021
+ */
4022
+ get: {
4023
+ parameters: {
4024
+ query: {
4025
+ idProject: string;
4026
+ page?: string;
4027
+ limit?: string;
4028
+ phase?: string;
4029
+ status?: string;
4030
+ idSheet?: string;
4031
+ drawing?: string;
4032
+ minHydrotestCount?: string;
4033
+ maxHydrotestCount?: string;
4034
+ minPaintCount?: string;
4035
+ maxPaintCount?: string;
4036
+ jointPhase?: string;
4037
+ jointStatus?: string;
4038
+ jointAssignedTo?: string;
4039
+ jointFitupMinCount?: string;
4040
+ jointFitupMaxCount?: string;
4041
+ jointWeldingMinCount?: string;
4042
+ jointWeldingMaxCount?: string;
4043
+ jointNdtMinCount?: string;
4044
+ jointNdtMaxCount?: string;
4045
+ };
4046
+ header?: never;
4047
+ path?: never;
4048
+ cookie?: never;
4049
+ };
4050
+ requestBody?: never;
4051
+ responses: {
4052
+ /** @description Paginated list of spools */
4053
+ 200: {
4054
+ headers: {
4055
+ [name: string]: unknown;
4056
+ };
4057
+ content: {
4058
+ "application/json": {
4059
+ /**
4060
+ * @example SUCCESS
4061
+ * @enum {string}
4062
+ */
4063
+ status: "SUCCESS" | "FAILED";
4064
+ error: string | null;
4065
+ /** @example Operation successful */
4066
+ message: string | null;
4067
+ data: components["schemas"]["Spool"][] | null;
4068
+ /** @example 100 */
4069
+ totalCount: number;
4070
+ /** @example 1 */
4071
+ page: number;
4072
+ /** @example 10 */
4073
+ limit: number;
4074
+ /** @example 10 */
4075
+ totalPages: number;
4076
+ };
4077
+ };
4078
+ };
4079
+ /** @description idProject is required */
4080
+ 400: {
4081
+ headers: {
4082
+ [name: string]: unknown;
4083
+ };
4084
+ content: {
4085
+ "application/json": components["schemas"]["ErrorResponse"];
4086
+ };
4087
+ };
4088
+ };
4089
+ };
4090
+ put?: never;
4091
+ post?: never;
3775
4092
  delete?: never;
3776
4093
  options?: never;
3777
4094
  head?: never;
@@ -3819,7 +4136,7 @@ export interface paths {
3819
4136
  message: string | null;
3820
4137
  data: components["schemas"]["Spool"][] | null;
3821
4138
  /** @example 100 */
3822
- count: number;
4139
+ totalCount: number;
3823
4140
  /** @example 1 */
3824
4141
  page: number;
3825
4142
  /** @example 10 */
@@ -3953,7 +4270,7 @@ export interface paths {
3953
4270
  message: string | null;
3954
4271
  data: components["schemas"]["Joint"][] | null;
3955
4272
  /** @example 100 */
3956
- count: number;
4273
+ totalCount: number;
3957
4274
  /** @example 1 */
3958
4275
  page: number;
3959
4276
  /** @example 10 */
@@ -4135,6 +4452,100 @@ export interface paths {
4135
4452
  patch?: never;
4136
4453
  trace?: never;
4137
4454
  };
4455
+ "/spools/bulk-action": {
4456
+ parameters: {
4457
+ query?: never;
4458
+ header?: never;
4459
+ path?: never;
4460
+ cookie?: never;
4461
+ };
4462
+ get?: never;
4463
+ put?: never;
4464
+ /**
4465
+ * Perform bulk action on multiple spools
4466
+ * @description Perform a workflow action on multiple spools at once. All spools must be live, belong to the same project, and be in the same phase.
4467
+ *
4468
+ * **Validations:**
4469
+ * - Maximum 100 spools per request
4470
+ * - All spools must exist and be live (not removed)
4471
+ * - All spools must belong to the same project
4472
+ * - All spools must be in the same phase
4473
+ * - User must have access to the project
4474
+ * - User must have permission to perform the action on the phase
4475
+ *
4476
+ * **Response:**
4477
+ * - SUCCESS: All spools processed successfully
4478
+ * - PARTIAL: Some spools succeeded, some failed (returns detailed breakdown)
4479
+ * - FAILED: All spools failed
4480
+ *
4481
+ * **HYDROTEST Phase Actions:**
4482
+ * - PASS/FAIL (Hydrotest Team)
4483
+ * - VERIFY_FAILURE (PE)
4484
+ *
4485
+ * **PAINTING Phase Actions:**
4486
+ * - RFI (Painting Foreman)
4487
+ * - PQC_APPROVE/PQC_REJECT (Painting QC)
4488
+ *
4489
+ * **DISPATCH Phase Actions:**
4490
+ * - PM_APPROVE (Project Manager)
4491
+ */
4492
+ post: {
4493
+ parameters: {
4494
+ query?: never;
4495
+ header?: never;
4496
+ path?: never;
4497
+ cookie?: never;
4498
+ };
4499
+ requestBody?: {
4500
+ content: {
4501
+ "application/json": components["schemas"]["BulkSpoolActionRequest"];
4502
+ };
4503
+ };
4504
+ responses: {
4505
+ /** @description Bulk action completed (may be partial success) */
4506
+ 200: {
4507
+ headers: {
4508
+ [name: string]: unknown;
4509
+ };
4510
+ content: {
4511
+ "application/json": components["schemas"]["BulkSpoolActionResponse"];
4512
+ };
4513
+ };
4514
+ /** @description Invalid request (missing fields, spools not in same project/phase) */
4515
+ 400: {
4516
+ headers: {
4517
+ [name: string]: unknown;
4518
+ };
4519
+ content: {
4520
+ "application/json": components["schemas"]["ErrorResponse"];
4521
+ };
4522
+ };
4523
+ /** @description User does not have permission for this action */
4524
+ 403: {
4525
+ headers: {
4526
+ [name: string]: unknown;
4527
+ };
4528
+ content: {
4529
+ "application/json": components["schemas"]["ErrorResponse"];
4530
+ };
4531
+ };
4532
+ /** @description No valid spools found */
4533
+ 404: {
4534
+ headers: {
4535
+ [name: string]: unknown;
4536
+ };
4537
+ content: {
4538
+ "application/json": components["schemas"]["ErrorResponse"];
4539
+ };
4540
+ };
4541
+ };
4542
+ };
4543
+ delete?: never;
4544
+ options?: never;
4545
+ head?: never;
4546
+ patch?: never;
4547
+ trace?: never;
4548
+ };
4138
4549
  "/profile": {
4139
4550
  parameters: {
4140
4551
  query?: never;
@@ -4329,7 +4740,7 @@ export interface paths {
4329
4740
  put?: never;
4330
4741
  /**
4331
4742
  * Enable project phases
4332
- * @description Enable one or more phases for a project. Only PM can enable phases.
4743
+ * @description Enable one or more optional phases for a project. Only NDT, HYDROTEST, and PAINTING phases can be enabled/disabled. FIT_UP, WELDING, and DISPATCH are mandatory phases. Only PM can enable phases.
4333
4744
  */
4334
4745
  post: {
4335
4746
  parameters: {
@@ -4402,7 +4813,7 @@ export interface paths {
4402
4813
  put?: never;
4403
4814
  /**
4404
4815
  * Disable project phases
4405
- * @description Disable one or more phases for a project. Only PM can disable phases.
4816
+ * @description Disable one or more optional phases for a project. Only NDT, HYDROTEST, and PAINTING phases can be enabled/disabled. FIT_UP, WELDING, and DISPATCH are mandatory phases. Phases with active joints or spools cannot be disabled. Only PM can disable phases.
4406
4817
  */
4407
4818
  post: {
4408
4819
  parameters: {
@@ -4464,7 +4875,7 @@ export interface paths {
4464
4875
  patch?: never;
4465
4876
  trace?: never;
4466
4877
  };
4467
- "/dashboard/overview": {
4878
+ "/projects/{idProject}/phases/progress": {
4468
4879
  parameters: {
4469
4880
  query?: never;
4470
4881
  header?: never;
@@ -4472,21 +4883,21 @@ export interface paths {
4472
4883
  cookie?: never;
4473
4884
  };
4474
4885
  /**
4475
- * Get dashboard overview
4476
- * @description Get project-wide statistics including joint and spool phase stats. Only PM/PE can access.
4886
+ * Get project progress
4887
+ * @description Get overall project progress percentage with phase-by-phase breakdown. Progress is calculated based on phase weights and item completion rates.
4477
4888
  */
4478
4889
  get: {
4479
4890
  parameters: {
4480
- query: {
4891
+ query?: never;
4892
+ header?: never;
4893
+ path: {
4481
4894
  idProject: string;
4482
4895
  };
4483
- header?: never;
4484
- path?: never;
4485
4896
  cookie?: never;
4486
4897
  };
4487
4898
  requestBody?: never;
4488
4899
  responses: {
4489
- /** @description Dashboard overview statistics */
4900
+ /** @description Project progress with phase breakdown */
4490
4901
  200: {
4491
4902
  headers: {
4492
4903
  [name: string]: unknown;
@@ -4501,12 +4912,12 @@ export interface paths {
4501
4912
  error: string | null;
4502
4913
  /** @example Operation successful */
4503
4914
  message: string | null;
4504
- data: components["schemas"]["DashboardOverview"] & unknown;
4915
+ data: components["schemas"]["ProjectProgress"] & unknown;
4505
4916
  };
4506
4917
  };
4507
4918
  };
4508
- /** @description idProject is required */
4509
- 400: {
4919
+ /** @description User does not have access to this project */
4920
+ 403: {
4510
4921
  headers: {
4511
4922
  [name: string]: unknown;
4512
4923
  };
@@ -4514,8 +4925,8 @@ export interface paths {
4514
4925
  "application/json": components["schemas"]["ErrorResponse"];
4515
4926
  };
4516
4927
  };
4517
- /** @description Only PM or PE can view dashboard overview */
4518
- 403: {
4928
+ /** @description Project not found */
4929
+ 404: {
4519
4930
  headers: {
4520
4931
  [name: string]: unknown;
4521
4932
  };
@@ -4533,29 +4944,39 @@ export interface paths {
4533
4944
  patch?: never;
4534
4945
  trace?: never;
4535
4946
  };
4536
- "/dashboard/queue-count": {
4947
+ "/projects/{idProject}/phases/weights": {
4537
4948
  parameters: {
4538
4949
  query?: never;
4539
4950
  header?: never;
4540
4951
  path?: never;
4541
4952
  cookie?: never;
4542
4953
  };
4954
+ get?: never;
4955
+ put?: never;
4956
+ post?: never;
4957
+ delete?: never;
4958
+ options?: never;
4959
+ head?: never;
4543
4960
  /**
4544
- * Get queue counts
4545
- * @description Get count of items in each role queue for a project.
4961
+ * Update phase weights
4962
+ * @description Update the weights for project phases. Weights determine how much each phase contributes to overall project progress. Total weights must sum to 100.
4546
4963
  */
4547
- get: {
4964
+ patch: {
4548
4965
  parameters: {
4549
- query: {
4966
+ query?: never;
4967
+ header?: never;
4968
+ path: {
4550
4969
  idProject: string;
4551
4970
  };
4552
- header?: never;
4553
- path?: never;
4554
4971
  cookie?: never;
4555
4972
  };
4556
- requestBody?: never;
4973
+ requestBody?: {
4974
+ content: {
4975
+ "application/json": components["schemas"]["UpdatePhaseWeightsRequest"];
4976
+ };
4977
+ };
4557
4978
  responses: {
4558
- /** @description Queue counts by role */
4979
+ /** @description Phase weights updated successfully */
4559
4980
  200: {
4560
4981
  headers: {
4561
4982
  [name: string]: unknown;
@@ -4570,11 +4991,11 @@ export interface paths {
4570
4991
  error: string | null;
4571
4992
  /** @example Operation successful */
4572
4993
  message: string | null;
4573
- data: components["schemas"]["QueueCount"][] | null;
4994
+ data: components["schemas"]["ProjectPhase"][] | null;
4574
4995
  };
4575
4996
  };
4576
4997
  };
4577
- /** @description idProject is required */
4998
+ /** @description Invalid weights or weights do not sum to 100 */
4578
4999
  400: {
4579
5000
  headers: {
4580
5001
  [name: string]: unknown;
@@ -4583,17 +5004,29 @@ export interface paths {
4583
5004
  "application/json": components["schemas"]["ErrorResponse"];
4584
5005
  };
4585
5006
  };
5007
+ /** @description Only Project Manager or Company Admin can update weights */
5008
+ 403: {
5009
+ headers: {
5010
+ [name: string]: unknown;
5011
+ };
5012
+ content: {
5013
+ "application/json": components["schemas"]["ErrorResponse"];
5014
+ };
5015
+ };
5016
+ /** @description Project not found */
5017
+ 404: {
5018
+ headers: {
5019
+ [name: string]: unknown;
5020
+ };
5021
+ content: {
5022
+ "application/json": components["schemas"]["ErrorResponse"];
5023
+ };
5024
+ };
4586
5025
  };
4587
5026
  };
4588
- put?: never;
4589
- post?: never;
4590
- delete?: never;
4591
- options?: never;
4592
- head?: never;
4593
- patch?: never;
4594
5027
  trace?: never;
4595
5028
  };
4596
- "/dashboard/phase-breakdown": {
5029
+ "/dashboard/overview": {
4597
5030
  parameters: {
4598
5031
  query?: never;
4599
5032
  header?: never;
@@ -4601,8 +5034,8 @@ export interface paths {
4601
5034
  cookie?: never;
4602
5035
  };
4603
5036
  /**
4604
- * Get phase breakdown
4605
- * @description Get joints and spools count grouped by phase. Only PM/PE can access.
5037
+ * Get dashboard overview
5038
+ * @description Get project-wide statistics including joint and spool phase stats. Only PM/PE can access.
4606
5039
  */
4607
5040
  get: {
4608
5041
  parameters: {
@@ -4615,7 +5048,7 @@ export interface paths {
4615
5048
  };
4616
5049
  requestBody?: never;
4617
5050
  responses: {
4618
- /** @description Phase breakdown statistics */
5051
+ /** @description Dashboard overview statistics */
4619
5052
  200: {
4620
5053
  headers: {
4621
5054
  [name: string]: unknown;
@@ -4630,7 +5063,7 @@ export interface paths {
4630
5063
  error: string | null;
4631
5064
  /** @example Operation successful */
4632
5065
  message: string | null;
4633
- data: components["schemas"]["PhaseBreakdown"] & unknown;
5066
+ data: components["schemas"]["DashboardOverview"] & unknown;
4634
5067
  };
4635
5068
  };
4636
5069
  };
@@ -4643,7 +5076,7 @@ export interface paths {
4643
5076
  "application/json": components["schemas"]["ErrorResponse"];
4644
5077
  };
4645
5078
  };
4646
- /** @description Only PM or PE can view phase breakdown */
5079
+ /** @description Only PM or PE can view dashboard overview */
4647
5080
  403: {
4648
5081
  headers: {
4649
5082
  [name: string]: unknown;
@@ -4662,7 +5095,7 @@ export interface paths {
4662
5095
  patch?: never;
4663
5096
  trace?: never;
4664
5097
  };
4665
- "/dashboard/draftsman": {
5098
+ "/dashboard/queue-count": {
4666
5099
  parameters: {
4667
5100
  query?: never;
4668
5101
  header?: never;
@@ -4670,8 +5103,8 @@ export interface paths {
4670
5103
  cookie?: never;
4671
5104
  };
4672
5105
  /**
4673
- * Get draftsman dashboard
4674
- * @description Get dashboard metrics for draftsman including total joints, drafts, and pending approvals.
5106
+ * Get queue counts
5107
+ * @description Get count of items in each role queue for a project.
4675
5108
  */
4676
5109
  get: {
4677
5110
  parameters: {
@@ -4684,7 +5117,7 @@ export interface paths {
4684
5117
  };
4685
5118
  requestBody?: never;
4686
5119
  responses: {
4687
- /** @description Draftsman dashboard statistics */
5120
+ /** @description Queue counts by role */
4688
5121
  200: {
4689
5122
  headers: {
4690
5123
  [name: string]: unknown;
@@ -4699,7 +5132,7 @@ export interface paths {
4699
5132
  error: string | null;
4700
5133
  /** @example Operation successful */
4701
5134
  message: string | null;
4702
- data: components["schemas"]["DraftsmanDashboard"] & unknown;
5135
+ data: components["schemas"]["QueueCount"][] | null;
4703
5136
  };
4704
5137
  };
4705
5138
  };
@@ -4712,15 +5145,6 @@ export interface paths {
4712
5145
  "application/json": components["schemas"]["ErrorResponse"];
4713
5146
  };
4714
5147
  };
4715
- /** @description Only Draftsman can access this dashboard */
4716
- 403: {
4717
- headers: {
4718
- [name: string]: unknown;
4719
- };
4720
- content: {
4721
- "application/json": components["schemas"]["ErrorResponse"];
4722
- };
4723
- };
4724
5148
  };
4725
5149
  };
4726
5150
  put?: never;
@@ -4731,7 +5155,7 @@ export interface paths {
4731
5155
  patch?: never;
4732
5156
  trace?: never;
4733
5157
  };
4734
- "/dashboard/fitup-foreman": {
5158
+ "/dashboard/phase-breakdown": {
4735
5159
  parameters: {
4736
5160
  query?: never;
4737
5161
  header?: never;
@@ -4739,8 +5163,8 @@ export interface paths {
4739
5163
  cookie?: never;
4740
5164
  };
4741
5165
  /**
4742
- * Get fitup foreman dashboard
4743
- * @description Get dashboard metrics for fitup foreman including pending fitup work, rejections from other phases, NDT failures, hydrotest failures, and completed work this week. Only accessible to FITUP_FOREMAN users.
5166
+ * Get phase breakdown
5167
+ * @description Get joints and spools count grouped by phase. Only PM/PE can access.
4744
5168
  */
4745
5169
  get: {
4746
5170
  parameters: {
@@ -4753,7 +5177,145 @@ export interface paths {
4753
5177
  };
4754
5178
  requestBody?: never;
4755
5179
  responses: {
4756
- /** @description Fitup foreman dashboard statistics */
5180
+ /** @description Phase breakdown statistics */
5181
+ 200: {
5182
+ headers: {
5183
+ [name: string]: unknown;
5184
+ };
5185
+ content: {
5186
+ "application/json": {
5187
+ /**
5188
+ * @example SUCCESS
5189
+ * @enum {string}
5190
+ */
5191
+ status: "SUCCESS" | "FAILED";
5192
+ error: string | null;
5193
+ /** @example Operation successful */
5194
+ message: string | null;
5195
+ data: components["schemas"]["PhaseBreakdown"] & unknown;
5196
+ };
5197
+ };
5198
+ };
5199
+ /** @description idProject is required */
5200
+ 400: {
5201
+ headers: {
5202
+ [name: string]: unknown;
5203
+ };
5204
+ content: {
5205
+ "application/json": components["schemas"]["ErrorResponse"];
5206
+ };
5207
+ };
5208
+ /** @description Only PM or PE can view phase breakdown */
5209
+ 403: {
5210
+ headers: {
5211
+ [name: string]: unknown;
5212
+ };
5213
+ content: {
5214
+ "application/json": components["schemas"]["ErrorResponse"];
5215
+ };
5216
+ };
5217
+ };
5218
+ };
5219
+ put?: never;
5220
+ post?: never;
5221
+ delete?: never;
5222
+ options?: never;
5223
+ head?: never;
5224
+ patch?: never;
5225
+ trace?: never;
5226
+ };
5227
+ "/dashboard/draftsman": {
5228
+ parameters: {
5229
+ query?: never;
5230
+ header?: never;
5231
+ path?: never;
5232
+ cookie?: never;
5233
+ };
5234
+ /**
5235
+ * Get draftsman dashboard
5236
+ * @description Get dashboard metrics for draftsman including total joints, drafts, and pending approvals.
5237
+ */
5238
+ get: {
5239
+ parameters: {
5240
+ query: {
5241
+ idProject: string;
5242
+ };
5243
+ header?: never;
5244
+ path?: never;
5245
+ cookie?: never;
5246
+ };
5247
+ requestBody?: never;
5248
+ responses: {
5249
+ /** @description Draftsman dashboard statistics */
5250
+ 200: {
5251
+ headers: {
5252
+ [name: string]: unknown;
5253
+ };
5254
+ content: {
5255
+ "application/json": {
5256
+ /**
5257
+ * @example SUCCESS
5258
+ * @enum {string}
5259
+ */
5260
+ status: "SUCCESS" | "FAILED";
5261
+ error: string | null;
5262
+ /** @example Operation successful */
5263
+ message: string | null;
5264
+ data: components["schemas"]["DraftsmanDashboard"] & unknown;
5265
+ };
5266
+ };
5267
+ };
5268
+ /** @description idProject is required */
5269
+ 400: {
5270
+ headers: {
5271
+ [name: string]: unknown;
5272
+ };
5273
+ content: {
5274
+ "application/json": components["schemas"]["ErrorResponse"];
5275
+ };
5276
+ };
5277
+ /** @description Only Draftsman can access this dashboard */
5278
+ 403: {
5279
+ headers: {
5280
+ [name: string]: unknown;
5281
+ };
5282
+ content: {
5283
+ "application/json": components["schemas"]["ErrorResponse"];
5284
+ };
5285
+ };
5286
+ };
5287
+ };
5288
+ put?: never;
5289
+ post?: never;
5290
+ delete?: never;
5291
+ options?: never;
5292
+ head?: never;
5293
+ patch?: never;
5294
+ trace?: never;
5295
+ };
5296
+ "/dashboard/fitup-foreman": {
5297
+ parameters: {
5298
+ query?: never;
5299
+ header?: never;
5300
+ path?: never;
5301
+ cookie?: never;
5302
+ };
5303
+ /**
5304
+ * Get fitup foreman dashboard
5305
+ * @description Get dashboard metrics for fitup foreman including pending fitup work, rejections from other phases, NDT failures, hydrotest failures, and completed work this week. Only accessible to FITUP_FOREMAN users.
5306
+ */
5307
+ get: {
5308
+ parameters: {
5309
+ query: {
5310
+ idProject: string;
5311
+ };
5312
+ header?: never;
5313
+ path?: never;
5314
+ cookie?: never;
5315
+ };
5316
+ requestBody?: never;
5317
+ responses: {
5318
+ /** @description Fitup foreman dashboard statistics */
4757
5319
  200: {
4758
5320
  headers: {
4759
5321
  [name: string]: unknown;
@@ -5172,10 +5734,15 @@ export interface paths {
5172
5734
  idCompany: number;
5173
5735
  name: string;
5174
5736
  status: string;
5737
+ adminName: string | null;
5738
+ adminEmail: string | null;
5739
+ projectsCount: number;
5740
+ usersCount: number;
5175
5741
  latestActivityType: string;
5176
5742
  latestActivityTime: string | null;
5177
5743
  entityType: string;
5178
5744
  entityId: number | null;
5745
+ latestActivityLog: string | null;
5179
5746
  }[];
5180
5747
  } | null;
5181
5748
  };
@@ -5580,62 +6147,742 @@ export interface paths {
5580
6147
  patch?: never;
5581
6148
  trace?: never;
5582
6149
  };
5583
- }
5584
- export type webhooks = Record<string, never>;
5585
- export interface components {
5586
- schemas: {
5587
- PaginationQuery: {
5588
- /**
5589
- * @description Page number
5590
- * @default 1
5591
- * @example 1
5592
- */
5593
- page: string;
5594
- /**
5595
- * @description Items per page (max 100)
5596
- * @default 10
5597
- * @example 10
5598
- */
5599
- limit: string;
5600
- };
5601
- ErrorResponse: {
5602
- /**
5603
- * @example FAILED
5604
- * @enum {string}
5605
- */
5606
- status: "FAILED";
5607
- /** @example UNAUTHORIZED */
5608
- error: string;
5609
- /** @example You are not authorized */
5610
- message: string;
5611
- data: unknown;
6150
+ "/notification/send": {
6151
+ parameters: {
6152
+ query?: never;
6153
+ header?: never;
6154
+ path?: never;
6155
+ cookie?: never;
5612
6156
  };
5613
- SendOTPRequest: {
5614
- /**
5615
- * Format: email
5616
- * @example user@example.com
5617
- */
5618
- emailId: string;
5619
- /**
5620
- * @example LOGIN
5621
- * @enum {string}
5622
- */
5623
- purpose: "LOGIN" | "PASSWORD_RESET";
6157
+ get?: never;
6158
+ put?: never;
6159
+ /**
6160
+ * Queue a notification for sending
6161
+ * @description Queues a notification for processing. The notification will be sent via FCM push notification and stored in history. Processing happens via Change Stream (real-time) or cron job (fallback).
6162
+ */
6163
+ post: {
6164
+ parameters: {
6165
+ query?: never;
6166
+ header?: never;
6167
+ path?: never;
6168
+ cookie?: never;
6169
+ };
6170
+ requestBody?: {
6171
+ content: {
6172
+ "application/json": components["schemas"]["CreateNotificationRequest"];
6173
+ };
6174
+ };
6175
+ responses: {
6176
+ /** @description Notification queued for processing */
6177
+ 202: {
6178
+ headers: {
6179
+ [name: string]: unknown;
6180
+ };
6181
+ content: {
6182
+ "application/json": {
6183
+ /**
6184
+ * @example SUCCESS
6185
+ * @enum {string}
6186
+ */
6187
+ status: "SUCCESS" | "FAILED";
6188
+ error: string | null;
6189
+ /** @example Operation successful */
6190
+ message: string | null;
6191
+ data: components["schemas"]["NotificationQueueResponse"] & unknown;
6192
+ };
6193
+ };
6194
+ };
6195
+ /** @description Invalid request data */
6196
+ 400: {
6197
+ headers: {
6198
+ [name: string]: unknown;
6199
+ };
6200
+ content: {
6201
+ "application/json": components["schemas"]["ErrorResponse"];
6202
+ };
6203
+ };
6204
+ /** @description Duplicate idempotency key */
6205
+ 409: {
6206
+ headers: {
6207
+ [name: string]: unknown;
6208
+ };
6209
+ content: {
6210
+ "application/json": components["schemas"]["ErrorResponse"];
6211
+ };
6212
+ };
6213
+ };
5624
6214
  };
5625
- LoginViaOTPRequest: {
5626
- /**
5627
- * Format: email
5628
- * @example user@example.com
5629
- */
5630
- emailId: string;
5631
- /** @example 123456 */
5632
- otp: string;
6215
+ delete?: never;
6216
+ options?: never;
6217
+ head?: never;
6218
+ patch?: never;
6219
+ trace?: never;
6220
+ };
6221
+ "/notification/send-bulk": {
6222
+ parameters: {
6223
+ query?: never;
6224
+ header?: never;
6225
+ path?: never;
6226
+ cookie?: never;
5633
6227
  };
5634
- User: {
5635
- /** @example 1 */
5636
- idUser: number;
5637
- /**
5638
- * Format: email
6228
+ get?: never;
6229
+ put?: never;
6230
+ /**
6231
+ * Queue multiple notifications
6232
+ * @description Queues multiple notifications for batch processing. Maximum 100 notifications per request.
6233
+ */
6234
+ post: {
6235
+ parameters: {
6236
+ query?: never;
6237
+ header?: never;
6238
+ path?: never;
6239
+ cookie?: never;
6240
+ };
6241
+ requestBody?: {
6242
+ content: {
6243
+ "application/json": {
6244
+ notifications: components["schemas"]["CreateNotificationRequest"][];
6245
+ };
6246
+ };
6247
+ };
6248
+ responses: {
6249
+ /** @description Notifications queued */
6250
+ 202: {
6251
+ headers: {
6252
+ [name: string]: unknown;
6253
+ };
6254
+ content: {
6255
+ "application/json": {
6256
+ /**
6257
+ * @example SUCCESS
6258
+ * @enum {string}
6259
+ */
6260
+ status: "SUCCESS" | "FAILED";
6261
+ error: string | null;
6262
+ /** @example Operation successful */
6263
+ message: string | null;
6264
+ data: {
6265
+ successCount: number;
6266
+ failureCount: number;
6267
+ results: {
6268
+ success: boolean;
6269
+ queueId?: string;
6270
+ error?: string;
6271
+ }[];
6272
+ } | null;
6273
+ };
6274
+ };
6275
+ };
6276
+ /** @description Invalid request data */
6277
+ 400: {
6278
+ headers: {
6279
+ [name: string]: unknown;
6280
+ };
6281
+ content: {
6282
+ "application/json": components["schemas"]["ErrorResponse"];
6283
+ };
6284
+ };
6285
+ };
6286
+ };
6287
+ delete?: never;
6288
+ options?: never;
6289
+ head?: never;
6290
+ patch?: never;
6291
+ trace?: never;
6292
+ };
6293
+ "/notification/history": {
6294
+ parameters: {
6295
+ query?: never;
6296
+ header?: never;
6297
+ path?: never;
6298
+ cookie?: never;
6299
+ };
6300
+ /**
6301
+ * Get notification history for authenticated user
6302
+ * @description Returns paginated notification history. Requires authentication (idUser from token).
6303
+ */
6304
+ get: {
6305
+ parameters: {
6306
+ query?: {
6307
+ limit?: string;
6308
+ offset?: string;
6309
+ unreadOnly?: string;
6310
+ idProject?: string;
6311
+ };
6312
+ header?: never;
6313
+ path?: never;
6314
+ cookie?: never;
6315
+ };
6316
+ requestBody?: never;
6317
+ responses: {
6318
+ /** @description Notification history retrieved */
6319
+ 200: {
6320
+ headers: {
6321
+ [name: string]: unknown;
6322
+ };
6323
+ content: {
6324
+ "application/json": {
6325
+ /**
6326
+ * @example SUCCESS
6327
+ * @enum {string}
6328
+ */
6329
+ status: "SUCCESS" | "FAILED";
6330
+ error: string | null;
6331
+ /** @example Operation successful */
6332
+ message: string | null;
6333
+ data: components["schemas"]["NotificationHistoryResponse"] & unknown;
6334
+ };
6335
+ };
6336
+ };
6337
+ /** @description Authentication required */
6338
+ 401: {
6339
+ headers: {
6340
+ [name: string]: unknown;
6341
+ };
6342
+ content: {
6343
+ "application/json": components["schemas"]["ErrorResponse"];
6344
+ };
6345
+ };
6346
+ };
6347
+ };
6348
+ put?: never;
6349
+ post?: never;
6350
+ delete?: never;
6351
+ options?: never;
6352
+ head?: never;
6353
+ patch?: never;
6354
+ trace?: never;
6355
+ };
6356
+ "/notification/unread-count": {
6357
+ parameters: {
6358
+ query?: never;
6359
+ header?: never;
6360
+ path?: never;
6361
+ cookie?: never;
6362
+ };
6363
+ /**
6364
+ * Get unread notification count
6365
+ * @description Returns the count of unread notifications for authenticated user.
6366
+ */
6367
+ get: {
6368
+ parameters: {
6369
+ query?: never;
6370
+ header?: never;
6371
+ path?: never;
6372
+ cookie?: never;
6373
+ };
6374
+ requestBody?: never;
6375
+ responses: {
6376
+ /** @description Unread count retrieved */
6377
+ 200: {
6378
+ headers: {
6379
+ [name: string]: unknown;
6380
+ };
6381
+ content: {
6382
+ "application/json": {
6383
+ /**
6384
+ * @example SUCCESS
6385
+ * @enum {string}
6386
+ */
6387
+ status: "SUCCESS" | "FAILED";
6388
+ error: string | null;
6389
+ /** @example Operation successful */
6390
+ message: string | null;
6391
+ data: {
6392
+ unreadCount: number;
6393
+ } | null;
6394
+ };
6395
+ };
6396
+ };
6397
+ /** @description Authentication required */
6398
+ 401: {
6399
+ headers: {
6400
+ [name: string]: unknown;
6401
+ };
6402
+ content: {
6403
+ "application/json": components["schemas"]["ErrorResponse"];
6404
+ };
6405
+ };
6406
+ };
6407
+ };
6408
+ put?: never;
6409
+ post?: never;
6410
+ delete?: never;
6411
+ options?: never;
6412
+ head?: never;
6413
+ patch?: never;
6414
+ trace?: never;
6415
+ };
6416
+ "/notification/{id}/read": {
6417
+ parameters: {
6418
+ query?: never;
6419
+ header?: never;
6420
+ path?: never;
6421
+ cookie?: never;
6422
+ };
6423
+ get?: never;
6424
+ put?: never;
6425
+ post?: never;
6426
+ delete?: never;
6427
+ options?: never;
6428
+ head?: never;
6429
+ /**
6430
+ * Mark notification as read
6431
+ * @description Marks a specific notification as read.
6432
+ */
6433
+ patch: {
6434
+ parameters: {
6435
+ query?: never;
6436
+ header?: never;
6437
+ path: {
6438
+ id: string;
6439
+ };
6440
+ cookie?: never;
6441
+ };
6442
+ requestBody?: never;
6443
+ responses: {
6444
+ /** @description Notification marked as read */
6445
+ 200: {
6446
+ headers: {
6447
+ [name: string]: unknown;
6448
+ };
6449
+ content: {
6450
+ "application/json": {
6451
+ /**
6452
+ * @example SUCCESS
6453
+ * @enum {string}
6454
+ */
6455
+ status: "SUCCESS" | "FAILED";
6456
+ error: string | null;
6457
+ /** @example Operation successful */
6458
+ message: string | null;
6459
+ data: {
6460
+ message: string;
6461
+ } | null;
6462
+ };
6463
+ };
6464
+ };
6465
+ /** @description Notification not found */
6466
+ 404: {
6467
+ headers: {
6468
+ [name: string]: unknown;
6469
+ };
6470
+ content: {
6471
+ "application/json": components["schemas"]["ErrorResponse"];
6472
+ };
6473
+ };
6474
+ };
6475
+ };
6476
+ trace?: never;
6477
+ };
6478
+ "/notification/read-all": {
6479
+ parameters: {
6480
+ query?: never;
6481
+ header?: never;
6482
+ path?: never;
6483
+ cookie?: never;
6484
+ };
6485
+ get?: never;
6486
+ put?: never;
6487
+ post?: never;
6488
+ delete?: never;
6489
+ options?: never;
6490
+ head?: never;
6491
+ /**
6492
+ * Mark all notifications as read
6493
+ * @description Marks all unread notifications as read for authenticated user.
6494
+ */
6495
+ patch: {
6496
+ parameters: {
6497
+ query?: never;
6498
+ header?: never;
6499
+ path?: never;
6500
+ cookie?: never;
6501
+ };
6502
+ requestBody?: never;
6503
+ responses: {
6504
+ /** @description All notifications marked as read */
6505
+ 200: {
6506
+ headers: {
6507
+ [name: string]: unknown;
6508
+ };
6509
+ content: {
6510
+ "application/json": {
6511
+ /**
6512
+ * @example SUCCESS
6513
+ * @enum {string}
6514
+ */
6515
+ status: "SUCCESS" | "FAILED";
6516
+ error: string | null;
6517
+ /** @example Operation successful */
6518
+ message: string | null;
6519
+ data: {
6520
+ markedCount: number;
6521
+ } | null;
6522
+ };
6523
+ };
6524
+ };
6525
+ /** @description Authentication required */
6526
+ 401: {
6527
+ headers: {
6528
+ [name: string]: unknown;
6529
+ };
6530
+ content: {
6531
+ "application/json": components["schemas"]["ErrorResponse"];
6532
+ };
6533
+ };
6534
+ };
6535
+ };
6536
+ trace?: never;
6537
+ };
6538
+ "/notification/stats": {
6539
+ parameters: {
6540
+ query?: never;
6541
+ header?: never;
6542
+ path?: never;
6543
+ cookie?: never;
6544
+ };
6545
+ /**
6546
+ * Get notification queue statistics
6547
+ * @description Returns queue statistics and stream status. For admin/monitoring purposes.
6548
+ */
6549
+ get: {
6550
+ parameters: {
6551
+ query?: never;
6552
+ header?: never;
6553
+ path?: never;
6554
+ cookie?: never;
6555
+ };
6556
+ requestBody?: never;
6557
+ responses: {
6558
+ /** @description Statistics retrieved */
6559
+ 200: {
6560
+ headers: {
6561
+ [name: string]: unknown;
6562
+ };
6563
+ content: {
6564
+ "application/json": {
6565
+ /**
6566
+ * @example SUCCESS
6567
+ * @enum {string}
6568
+ */
6569
+ status: "SUCCESS" | "FAILED";
6570
+ error: string | null;
6571
+ /** @example Operation successful */
6572
+ message: string | null;
6573
+ data: components["schemas"]["NotificationStats"] & unknown;
6574
+ };
6575
+ };
6576
+ };
6577
+ };
6578
+ };
6579
+ put?: never;
6580
+ post?: never;
6581
+ delete?: never;
6582
+ options?: never;
6583
+ head?: never;
6584
+ patch?: never;
6585
+ trace?: never;
6586
+ };
6587
+ "/device/register": {
6588
+ parameters: {
6589
+ query?: never;
6590
+ header?: never;
6591
+ path?: never;
6592
+ cookie?: never;
6593
+ };
6594
+ get?: never;
6595
+ put?: never;
6596
+ /**
6597
+ * Register a device token for push notifications
6598
+ * @description Registers or updates an FCM device token for a user. Used by mobile and web clients to receive push notifications.
6599
+ */
6600
+ post: {
6601
+ parameters: {
6602
+ query?: never;
6603
+ header?: never;
6604
+ path?: never;
6605
+ cookie?: never;
6606
+ };
6607
+ requestBody?: {
6608
+ content: {
6609
+ "application/json": components["schemas"]["RegisterDeviceRequest"];
6610
+ };
6611
+ };
6612
+ responses: {
6613
+ /** @description Device registered successfully */
6614
+ 200: {
6615
+ headers: {
6616
+ [name: string]: unknown;
6617
+ };
6618
+ content: {
6619
+ "application/json": {
6620
+ /**
6621
+ * @example SUCCESS
6622
+ * @enum {string}
6623
+ */
6624
+ status: "SUCCESS" | "FAILED";
6625
+ error: string | null;
6626
+ /** @example Operation successful */
6627
+ message: string | null;
6628
+ data: {
6629
+ id: string;
6630
+ platform: string;
6631
+ isActive: boolean;
6632
+ } | null;
6633
+ };
6634
+ };
6635
+ };
6636
+ /** @description Invalid request data */
6637
+ 400: {
6638
+ headers: {
6639
+ [name: string]: unknown;
6640
+ };
6641
+ content: {
6642
+ "application/json": components["schemas"]["ErrorResponse"];
6643
+ };
6644
+ };
6645
+ };
6646
+ };
6647
+ delete?: never;
6648
+ options?: never;
6649
+ head?: never;
6650
+ patch?: never;
6651
+ trace?: never;
6652
+ };
6653
+ "/device/unregister": {
6654
+ parameters: {
6655
+ query?: never;
6656
+ header?: never;
6657
+ path?: never;
6658
+ cookie?: never;
6659
+ };
6660
+ get?: never;
6661
+ put?: never;
6662
+ /**
6663
+ * Unregister a device token
6664
+ * @description Marks a device token as inactive. Used when user logs out or uninstalls the app.
6665
+ */
6666
+ post: {
6667
+ parameters: {
6668
+ query?: never;
6669
+ header?: never;
6670
+ path?: never;
6671
+ cookie?: never;
6672
+ };
6673
+ requestBody?: {
6674
+ content: {
6675
+ "application/json": components["schemas"]["UnregisterDeviceRequest"];
6676
+ };
6677
+ };
6678
+ responses: {
6679
+ /** @description Device unregistered successfully */
6680
+ 200: {
6681
+ headers: {
6682
+ [name: string]: unknown;
6683
+ };
6684
+ content: {
6685
+ "application/json": {
6686
+ /**
6687
+ * @example SUCCESS
6688
+ * @enum {string}
6689
+ */
6690
+ status: "SUCCESS" | "FAILED";
6691
+ error: string | null;
6692
+ /** @example Operation successful */
6693
+ message: string | null;
6694
+ data: {
6695
+ message: string;
6696
+ } | null;
6697
+ };
6698
+ };
6699
+ };
6700
+ /** @description Device token not found */
6701
+ 404: {
6702
+ headers: {
6703
+ [name: string]: unknown;
6704
+ };
6705
+ content: {
6706
+ "application/json": components["schemas"]["ErrorResponse"];
6707
+ };
6708
+ };
6709
+ };
6710
+ };
6711
+ delete?: never;
6712
+ options?: never;
6713
+ head?: never;
6714
+ patch?: never;
6715
+ trace?: never;
6716
+ };
6717
+ "/device/tokens/{idUser}": {
6718
+ parameters: {
6719
+ query?: never;
6720
+ header?: never;
6721
+ path?: never;
6722
+ cookie?: never;
6723
+ };
6724
+ /**
6725
+ * Get device tokens for a user
6726
+ * @description Returns all active device tokens for a specific user.
6727
+ */
6728
+ get: {
6729
+ parameters: {
6730
+ query?: never;
6731
+ header?: never;
6732
+ path: {
6733
+ idUser: string;
6734
+ };
6735
+ cookie?: never;
6736
+ };
6737
+ requestBody?: never;
6738
+ responses: {
6739
+ /** @description Device tokens retrieved */
6740
+ 200: {
6741
+ headers: {
6742
+ [name: string]: unknown;
6743
+ };
6744
+ content: {
6745
+ "application/json": {
6746
+ /**
6747
+ * @example SUCCESS
6748
+ * @enum {string}
6749
+ */
6750
+ status: "SUCCESS" | "FAILED";
6751
+ error: string | null;
6752
+ /** @example Operation successful */
6753
+ message: string | null;
6754
+ data: components["schemas"]["DeviceTokensResponse"] & unknown;
6755
+ };
6756
+ };
6757
+ };
6758
+ };
6759
+ };
6760
+ put?: never;
6761
+ post?: never;
6762
+ delete?: never;
6763
+ options?: never;
6764
+ head?: never;
6765
+ patch?: never;
6766
+ trace?: never;
6767
+ };
6768
+ "/device/company/{idCompany}": {
6769
+ parameters: {
6770
+ query?: never;
6771
+ header?: never;
6772
+ path?: never;
6773
+ cookie?: never;
6774
+ };
6775
+ /**
6776
+ * Get all device tokens for a company
6777
+ * @description Returns paginated device tokens for a company. Admin only. Used for monitoring.
6778
+ */
6779
+ get: {
6780
+ parameters: {
6781
+ query?: {
6782
+ page?: string;
6783
+ limit?: string;
6784
+ };
6785
+ header?: never;
6786
+ path: {
6787
+ idCompany: string;
6788
+ };
6789
+ cookie?: never;
6790
+ };
6791
+ requestBody?: never;
6792
+ responses: {
6793
+ /** @description Company tokens retrieved */
6794
+ 200: {
6795
+ headers: {
6796
+ [name: string]: unknown;
6797
+ };
6798
+ content: {
6799
+ "application/json": {
6800
+ /**
6801
+ * @example SUCCESS
6802
+ * @enum {string}
6803
+ */
6804
+ status: "SUCCESS" | "FAILED";
6805
+ error: string | null;
6806
+ /** @example Operation successful */
6807
+ message: string | null;
6808
+ data: {
6809
+ tokens: components["schemas"]["DeviceTokensResponse"][];
6810
+ pagination: {
6811
+ total: number;
6812
+ page: number;
6813
+ limit: number;
6814
+ totalPages: number;
6815
+ };
6816
+ } | null;
6817
+ };
6818
+ };
6819
+ };
6820
+ };
6821
+ };
6822
+ put?: never;
6823
+ post?: never;
6824
+ delete?: never;
6825
+ options?: never;
6826
+ head?: never;
6827
+ patch?: never;
6828
+ trace?: never;
6829
+ };
6830
+ }
6831
+ export type webhooks = Record<string, never>;
6832
+ export interface components {
6833
+ schemas: {
6834
+ PaginationQuery: {
6835
+ /**
6836
+ * @description Page number
6837
+ * @default 1
6838
+ * @example 1
6839
+ */
6840
+ page: string;
6841
+ /**
6842
+ * @description Items per page (max 100)
6843
+ * @default 10
6844
+ * @example 10
6845
+ */
6846
+ limit: string;
6847
+ };
6848
+ ErrorResponse: {
6849
+ /**
6850
+ * @example FAILED
6851
+ * @enum {string}
6852
+ */
6853
+ status: "FAILED";
6854
+ /** @example UNAUTHORIZED */
6855
+ error: string;
6856
+ /** @example You are not authorized */
6857
+ message: string;
6858
+ data: unknown;
6859
+ };
6860
+ SendOTPRequest: {
6861
+ /**
6862
+ * Format: email
6863
+ * @example user@example.com
6864
+ */
6865
+ emailId: string;
6866
+ /**
6867
+ * @example LOGIN
6868
+ * @enum {string}
6869
+ */
6870
+ purpose: "LOGIN" | "PASSWORD_RESET";
6871
+ };
6872
+ LoginViaOTPRequest: {
6873
+ /**
6874
+ * Format: email
6875
+ * @example user@example.com
6876
+ */
6877
+ emailId: string;
6878
+ /** @example 123456 */
6879
+ otp: string;
6880
+ };
6881
+ User: {
6882
+ /** @example 1 */
6883
+ idUser: number;
6884
+ /**
6885
+ * Format: email
5639
6886
  * @example user@example.com
5640
6887
  */
5641
6888
  emailId?: string;
@@ -5881,6 +7128,147 @@ export interface components {
5881
7128
  */
5882
7129
  users: number[];
5883
7130
  }[];
7131
+ ProjectListItem: {
7132
+ /** @example 1 */
7133
+ idProject: number;
7134
+ /** @example PRJ-001 */
7135
+ code: string;
7136
+ /** @example Pipeline Installation Project */
7137
+ name: string;
7138
+ /** @example Client Corp */
7139
+ clientName: string;
7140
+ /** @example 2024-01-01 */
7141
+ startDate: string;
7142
+ /** @example 2024-12-31 */
7143
+ endDate: string;
7144
+ /**
7145
+ * @example ACTIVE
7146
+ * @enum {string}
7147
+ */
7148
+ status: "ACTIVE" | "COMPLETED" | "ON_HOLD" | "REMOVED";
7149
+ /** @example Houston, TX */
7150
+ location: string;
7151
+ /**
7152
+ * Format: date-time
7153
+ * @example 2024-01-01T00:00:00Z
7154
+ */
7155
+ createdAt: string;
7156
+ /**
7157
+ * @description Total joints in the project
7158
+ * @example 150
7159
+ */
7160
+ totalJoints?: number;
7161
+ /**
7162
+ * @description Total spools in the project
7163
+ * @example 50
7164
+ */
7165
+ totalSpools?: number;
7166
+ /**
7167
+ * @description Company name (PA only)
7168
+ * @example Acme Corp
7169
+ */
7170
+ companyName?: string;
7171
+ /**
7172
+ * @description Project manager name (PA only)
7173
+ * @example John Doe
7174
+ */
7175
+ projectManager?: string | null;
7176
+ /**
7177
+ * @description Overall project progress percentage (PM only)
7178
+ * @example 65
7179
+ */
7180
+ projectProgress?: number;
7181
+ /**
7182
+ * @description Last activity datetime (PM only)
7183
+ * @example 2024-03-15T14:30:00Z
7184
+ */
7185
+ lastActivity?: string | null;
7186
+ /**
7187
+ * @description Initial draft status (Draftsman only)
7188
+ * @example PENDING_PE
7189
+ */
7190
+ initialDraftStatus?: string | null;
7191
+ /**
7192
+ * @description Pending draft reviews count (Draftsman only)
7193
+ * @example 5
7194
+ */
7195
+ pendingDraftReviews?: number;
7196
+ /**
7197
+ * @description Completed joints count (FF only)
7198
+ * @example 75
7199
+ */
7200
+ completedJoints?: number;
7201
+ /**
7202
+ * @description Fit-up progress percentage (FF only)
7203
+ * @example 50
7204
+ */
7205
+ fitupProgress?: number;
7206
+ /**
7207
+ * @description Pending approvals count (PE only)
7208
+ * @example 10
7209
+ */
7210
+ pendingApprovals?: number;
7211
+ /**
7212
+ * @description QC rejections count (PE only)
7213
+ * @example 3
7214
+ */
7215
+ qcRejections?: number;
7216
+ /**
7217
+ * @description Joints ready for welding (WF only)
7218
+ * @example 25
7219
+ */
7220
+ jointsReadyForWelding?: number;
7221
+ /**
7222
+ * @description Welding progress percentage (WF only)
7223
+ * @example 40
7224
+ */
7225
+ weldingProgress?: number;
7226
+ /**
7227
+ * @description Joints ready for QC verification (QC only)
7228
+ * @example 15
7229
+ */
7230
+ jointsReadyForVerification?: number;
7231
+ /**
7232
+ * @description Failed inspections count (QC only)
7233
+ * @example 5
7234
+ */
7235
+ failedInspections?: number;
7236
+ /**
7237
+ * @description Joints ready for NDT (NDT only)
7238
+ * @example 20
7239
+ */
7240
+ jointsReadyForNDT?: number;
7241
+ /**
7242
+ * @description NDT progress percentage (NDT only)
7243
+ * @example 35
7244
+ */
7245
+ ndtProgress?: number;
7246
+ /**
7247
+ * @description Spools ready for hydrotest (HYD only)
7248
+ * @example 10
7249
+ */
7250
+ spoolsReadyForHydrotest?: number;
7251
+ /**
7252
+ * @description Hydrotest progress percentage (HYD only)
7253
+ * @example 20
7254
+ */
7255
+ hydrotestProgress?: number;
7256
+ /**
7257
+ * @description Spools ready for painting (PF only)
7258
+ * @example 8
7259
+ */
7260
+ spoolsReadyForPainting?: number;
7261
+ /**
7262
+ * @description Spools ready for inspection (PF, PQC)
7263
+ * @example 5
7264
+ */
7265
+ spoolsReadyForInspection?: number;
7266
+ /**
7267
+ * @description Spools rejected in inspection (PQC only)
7268
+ * @example 2
7269
+ */
7270
+ spoolsRejectedInInspection?: number;
7271
+ };
5884
7272
  Welder: {
5885
7273
  /** @example 1 */
5886
7274
  idWelder?: number;
@@ -5935,6 +7323,13 @@ export interface components {
5935
7323
  */
5936
7324
  processSets?: number[];
5937
7325
  };
7326
+ ChangeWelderStatusRequest: {
7327
+ /**
7328
+ * @example BLOCK
7329
+ * @enum {string}
7330
+ */
7331
+ action: "BLOCK" | "UNBLOCK";
7332
+ };
5938
7333
  WPS: {
5939
7334
  /** @example 1 */
5940
7335
  idWPS?: number;
@@ -5981,6 +7376,13 @@ export interface components {
5981
7376
  * ]
5982
7377
  */
5983
7378
  AddWeldersToWPSEntryRequest: number[];
7379
+ ChangeWPSStatusRequest: {
7380
+ /**
7381
+ * @example BLOCK
7382
+ * @enum {string}
7383
+ */
7384
+ action: "BLOCK" | "UNBLOCK";
7385
+ };
5984
7386
  Draft: {
5985
7387
  /** @example 1 */
5986
7388
  idDraft: number;
@@ -6154,17 +7556,18 @@ export interface components {
6154
7556
  * @example 2024-01-15T10:30:00.000Z
6155
7557
  */
6156
7558
  lastActionAt?: string | null;
6157
- spool?: {
6158
- idSpool: number;
6159
- number: string;
6160
- pipeClass?: string | null;
6161
- };
7559
+ /** @description Direct sheet reference for this joint */
6162
7560
  sheet?: {
6163
7561
  idSheet: number;
6164
7562
  drawing: string;
6165
7563
  sheet: string;
6166
7564
  revisionNumber?: string | null;
6167
7565
  };
7566
+ spool?: {
7567
+ idSpool: number;
7568
+ number: string;
7569
+ pipeClass?: string | null;
7570
+ };
6168
7571
  materialGradePrimary?: {
6169
7572
  idMaterialGrade: number;
6170
7573
  name: string;
@@ -6208,7 +7611,102 @@ export interface components {
6208
7611
  idWelder?: number;
6209
7612
  /** @example 1 */
6210
7613
  idWPS?: number;
7614
+ /** @description Required for PASS/FAIL actions in NDT phase. Array of test results. */
7615
+ tests?: {
7616
+ /**
7617
+ * @example RT
7618
+ * @enum {string}
7619
+ */
7620
+ testType: "RT" | "UT" | "PT" | "MT" | "VT";
7621
+ /**
7622
+ * @example PASSED
7623
+ * @enum {string}
7624
+ */
7625
+ result: "PASSED" | "FAILED";
7626
+ /**
7627
+ * @description Coverage percentage (0-100)
7628
+ * @example 100
7629
+ */
7630
+ coverage: number;
7631
+ remarks?: string | null;
7632
+ }[];
7633
+ };
7634
+ };
7635
+ BulkJointActionRequest: {
7636
+ /**
7637
+ * @example COMPLETE
7638
+ * @enum {string}
7639
+ */
7640
+ action: "COMPLETE" | "APPROVE" | "REJECT" | "QC_APPROVE" | "QC_REJECT" | "VERIFY_REJECTION" | "ASSIGN_WELDER_WPS" | "PASS" | "FAIL" | "PE_APPROVE";
7641
+ /**
7642
+ * @example [
7643
+ * 1,
7644
+ * 2,
7645
+ * 3,
7646
+ * 4,
7647
+ * 5
7648
+ * ]
7649
+ */
7650
+ idJoints: number[];
7651
+ /**
7652
+ * @example FIT_UP
7653
+ * @enum {string}
7654
+ */
7655
+ phase?: "FIT_UP" | "WELDING" | "NDT";
7656
+ data?: {
7657
+ /** @example Bulk action completed */
7658
+ remarks?: string;
7659
+ /** @enum {string} */
7660
+ decision?: "approve" | "reject";
7661
+ /** @example 1 */
7662
+ idWelder?: number;
7663
+ /** @example 1 */
7664
+ idWPS?: number;
7665
+ /** @description Required for PASS/FAIL actions in NDT phase. Array of test results. */
7666
+ tests?: {
7667
+ /**
7668
+ * @example RT
7669
+ * @enum {string}
7670
+ */
7671
+ testType: "RT" | "UT" | "PT" | "MT" | "VT";
7672
+ /**
7673
+ * @example PASSED
7674
+ * @enum {string}
7675
+ */
7676
+ result: "PASSED" | "FAILED";
7677
+ /**
7678
+ * @description Coverage percentage (0-100)
7679
+ * @example 100
7680
+ */
7681
+ coverage: number;
7682
+ remarks?: string | null;
7683
+ }[];
7684
+ };
7685
+ };
7686
+ BulkJointActionResult: {
7687
+ /** @example 1 */
7688
+ idJoint: number;
7689
+ /** @example J-001 */
7690
+ number: string;
7691
+ /** @example true */
7692
+ success: boolean;
7693
+ /** @example Action "COMPLETE" performed successfully. */
7694
+ message: string;
7695
+ joint?: components["schemas"]["Joint"] & unknown;
7696
+ };
7697
+ BulkJointActionResponse: {
7698
+ /**
7699
+ * @example SUCCESS
7700
+ * @enum {string}
7701
+ */
7702
+ status: "SUCCESS" | "PARTIAL" | "FAILED";
7703
+ /** @example Bulk action "COMPLETE" completed successfully on 5 joint(s). */
7704
+ message: string;
7705
+ data: {
7706
+ successful: components["schemas"]["BulkJointActionResult"][];
7707
+ failed: components["schemas"]["BulkJointActionResult"][];
6211
7708
  };
7709
+ error: string | null;
6212
7710
  };
6213
7711
  JointLog: {
6214
7712
  /** @example 507f1f77bcf86cd799439011 */
@@ -6232,13 +7730,66 @@ export interface components {
6232
7730
  /** @example 2024-01-15T10:30:00.000Z */
6233
7731
  createdAt: string;
6234
7732
  };
7733
+ NDTResultTest: {
7734
+ /** @example 1 */
7735
+ idNDTResultTest: number;
7736
+ /** @example 1 */
7737
+ idNDTResult: number;
7738
+ /**
7739
+ * @example RT
7740
+ * @enum {string}
7741
+ */
7742
+ testType: "RT" | "UT" | "PT" | "MT" | "VT";
7743
+ /**
7744
+ * @example PASSED
7745
+ * @enum {string}
7746
+ */
7747
+ result: "PASSED" | "FAILED";
7748
+ /**
7749
+ * @description Coverage percentage (0-100)
7750
+ * @example 100
7751
+ */
7752
+ coverage: number;
7753
+ /** @example No defects found */
7754
+ remarks: string | null;
7755
+ };
7756
+ NDTResult: {
7757
+ /** @example 1 */
7758
+ idNDTResult: number;
7759
+ /** @example 1 */
7760
+ idCompany: number;
7761
+ /** @example 1 */
7762
+ idProject: number;
7763
+ /** @example 1 */
7764
+ idJoint: number;
7765
+ /**
7766
+ * @description Overall result - PASSED if all tests pass, FAILED if any test fails
7767
+ * @example PASSED
7768
+ * @enum {string}
7769
+ */
7770
+ result: "PASSED" | "FAILED";
7771
+ /** @example All tests completed successfully */
7772
+ remarks: string | null;
7773
+ /** @example 1 */
7774
+ createdBy: number;
7775
+ /** @example 2024-01-15T10:30:00.000Z */
7776
+ createdAt: string;
7777
+ /** @description Individual test results within this submission */
7778
+ tests?: components["schemas"]["NDTResultTest"][];
7779
+ /** @description User who created this NDT result */
7780
+ createdByUser?: {
7781
+ idUser: number;
7782
+ firstName: string;
7783
+ lastName: string | null;
7784
+ emailId: string;
7785
+ role: string;
7786
+ };
7787
+ };
6235
7788
  Spool: {
6236
7789
  /** @example 1 */
6237
7790
  idSpool: number;
6238
7791
  /** @example 1 */
6239
7792
  idProject: number;
6240
- /** @example 1 */
6241
- idSheet: number;
6242
7793
  /** @example SP-001 */
6243
7794
  number: string;
6244
7795
  /** @example A1 */
@@ -6259,12 +7810,18 @@ export interface components {
6259
7810
  createdAt: string;
6260
7811
  /** @example 2024-01-15T10:30:00.000Z */
6261
7812
  updatedAt: string;
6262
- sheet?: {
7813
+ /**
7814
+ * @description Timestamp when all joints were processed and spool became ready
7815
+ * @example 2024-01-15T10:30:00.000Z
7816
+ */
7817
+ readyAt?: string | null;
7818
+ /** @description Sheets associated with this spool via SheetSpool junction */
7819
+ sheets?: {
6263
7820
  idSheet: number;
6264
7821
  drawing: string;
6265
7822
  sheet: string;
6266
7823
  revisionNumber?: string | null;
6267
- };
7824
+ }[];
6268
7825
  };
6269
7826
  SpoolActionRequest: {
6270
7827
  /**
@@ -6284,6 +7841,58 @@ export interface components {
6284
7841
  decision?: "approve" | "reject";
6285
7842
  };
6286
7843
  };
7844
+ BulkSpoolActionRequest: {
7845
+ /**
7846
+ * @example PASS
7847
+ * @enum {string}
7848
+ */
7849
+ action: "PASS" | "FAIL" | "VERIFY_FAILURE" | "RFI" | "PQC_APPROVE" | "PQC_REJECT" | "PM_APPROVE";
7850
+ /**
7851
+ * @example [
7852
+ * 1,
7853
+ * 2,
7854
+ * 3,
7855
+ * 4,
7856
+ * 5
7857
+ * ]
7858
+ */
7859
+ idSpools: number[];
7860
+ /**
7861
+ * @example HYDROTEST
7862
+ * @enum {string}
7863
+ */
7864
+ phase?: "HYDROTEST" | "PAINTING" | "DISPATCH";
7865
+ data?: {
7866
+ /** @example Bulk action completed */
7867
+ remarks?: string;
7868
+ /** @enum {string} */
7869
+ decision?: "approve" | "reject";
7870
+ };
7871
+ };
7872
+ BulkSpoolActionResult: {
7873
+ /** @example 1 */
7874
+ idSpool: number;
7875
+ /** @example SP-001 */
7876
+ number: string;
7877
+ /** @example true */
7878
+ success: boolean;
7879
+ /** @example Action "PASS" performed successfully. */
7880
+ message: string;
7881
+ };
7882
+ BulkSpoolActionResponse: {
7883
+ /**
7884
+ * @example SUCCESS
7885
+ * @enum {string}
7886
+ */
7887
+ status: "SUCCESS" | "PARTIAL" | "FAILED";
7888
+ /** @example Bulk action "PASS" completed successfully on 5 spool(s). */
7889
+ message: string;
7890
+ data: {
7891
+ successful: components["schemas"]["BulkSpoolActionResult"][];
7892
+ failed: components["schemas"]["BulkSpoolActionResult"][];
7893
+ };
7894
+ error: string | null;
7895
+ };
6287
7896
  SpoolLog: {
6288
7897
  /** @example 507f1f77bcf86cd799439011 */
6289
7898
  idLog: string;
@@ -6336,23 +7945,128 @@ export interface components {
6336
7945
  type: "FIT_UP" | "WELDING" | "NDT" | "HYDROTEST" | "PAINTING" | "DISPATCH";
6337
7946
  /** @example true */
6338
7947
  isEnabled: boolean;
7948
+ /**
7949
+ * @description Phase weight for progress calculation (0-100)
7950
+ * @example 15
7951
+ */
7952
+ weight: number;
7953
+ };
7954
+ PhaseWeightUpdate: {
7955
+ /** @example 1 */
7956
+ idProjectPhase: number;
7957
+ /**
7958
+ * @description Phase weight (0-100)
7959
+ * @example 20
7960
+ */
7961
+ weight: number;
7962
+ };
7963
+ UpdatePhaseWeightsRequest: {
7964
+ /** @description Array of phase weight updates. Total must sum to 100. */
7965
+ weights: components["schemas"]["PhaseWeightUpdate"][];
7966
+ };
7967
+ PhaseProgress: {
7968
+ /** @example 1 */
7969
+ idProjectPhase: number;
7970
+ /**
7971
+ * @example FIT_UP
7972
+ * @enum {string}
7973
+ */
7974
+ phase: "FIT_UP" | "WELDING" | "NDT" | "HYDROTEST" | "PAINTING" | "DISPATCH";
7975
+ /**
7976
+ * @description Phase weight (0-100)
7977
+ * @example 15
7978
+ */
7979
+ weight: number;
7980
+ /**
7981
+ * @description Total items in this phase scope
7982
+ * @example 100
7983
+ */
7984
+ totalItems: number;
7985
+ /**
7986
+ * @description Items that completed this phase
7987
+ * @example 80
7988
+ */
7989
+ completedItems: number;
7990
+ /**
7991
+ * @description Phase completion percentage
7992
+ * @example 80
7993
+ */
7994
+ phaseCompletion: number;
7995
+ /**
7996
+ * @description Contribution to total progress (weight * phaseCompletion / 100)
7997
+ * @example 12
7998
+ */
7999
+ contribution: number;
8000
+ };
8001
+ ProjectProgress: {
8002
+ /** @example 1 */
8003
+ idProject: number;
8004
+ /**
8005
+ * @description Overall project completion percentage
8006
+ * @example 45.5
8007
+ */
8008
+ totalProgress: number;
8009
+ /** @description Progress breakdown by phase */
8010
+ phaseBreakdown: components["schemas"]["PhaseProgress"][];
8011
+ };
8012
+ ProjectDetailsProgress: {
8013
+ /**
8014
+ * @description Overall project completion percentage
8015
+ * @example 45.5
8016
+ */
8017
+ totalProgress: number;
8018
+ /** @description Progress breakdown by phase */
8019
+ phaseBreakdown: components["schemas"]["PhaseProgress"][];
8020
+ };
8021
+ ProjectDetails: {
8022
+ /** @example 1 */
8023
+ idProject: number;
8024
+ /** @example 1 */
8025
+ idCompany?: number;
8026
+ /** @example PRJ-001 */
8027
+ code?: string;
8028
+ /** @example Pipeline Installation Project */
8029
+ name?: string;
8030
+ /** @example Client Corp */
8031
+ clientName?: string;
8032
+ /** @example 2024-01-01 */
8033
+ startDate?: string;
8034
+ /** @example 2024-12-31 */
8035
+ endDate?: string;
8036
+ /**
8037
+ * @example ACTIVE
8038
+ * @enum {string}
8039
+ */
8040
+ status?: "ACTIVE" | "COMPLETED" | "ON_HOLD" | "REMOVED";
8041
+ /** @example Houston, TX */
8042
+ location?: string;
8043
+ /**
8044
+ * Format: date-time
8045
+ * @example 2024-01-01T00:00:00Z
8046
+ */
8047
+ createdAt?: string;
8048
+ /** @description Project phases with weights */
8049
+ phases: components["schemas"]["ProjectPhase"][];
8050
+ progress: components["schemas"]["ProjectDetailsProgress"] & unknown;
6339
8051
  };
6340
8052
  EnablePhasesRequest: {
6341
8053
  /**
8054
+ * @description Only NDT, HYDROTEST, and PAINTING phases can be enabled. FIT_UP, WELDING, and DISPATCH are mandatory.
6342
8055
  * @example [
6343
8056
  * "HYDROTEST",
6344
8057
  * "PAINTING"
6345
8058
  * ]
6346
8059
  */
6347
- phases: ("FIT_UP" | "WELDING" | "NDT" | "HYDROTEST" | "PAINTING" | "DISPATCH")[];
8060
+ phases: ("NDT" | "HYDROTEST" | "PAINTING")[];
6348
8061
  };
6349
8062
  DisablePhasesRequest: {
6350
8063
  /**
8064
+ * @description Only NDT, HYDROTEST, and PAINTING phases can be disabled. FIT_UP, WELDING, and DISPATCH are mandatory.
6351
8065
  * @example [
6352
8066
  * "PAINTING"
6353
8067
  * ]
6354
8068
  */
6355
- phases: ("FIT_UP" | "WELDING" | "NDT" | "HYDROTEST" | "PAINTING" | "DISPATCH")[];
8069
+ phases: ("NDT" | "HYDROTEST" | "PAINTING")[];
6356
8070
  };
6357
8071
  PhaseStats: {
6358
8072
  /** @example FIT_UP */
@@ -6416,6 +8130,201 @@ export interface components {
6416
8130
  jointsCount: number;
6417
8131
  } | null;
6418
8132
  };
8133
+ NotificationRecipient: {
8134
+ /** @example 1 */
8135
+ idUser: number;
8136
+ /**
8137
+ * @default default
8138
+ * @example default
8139
+ * @enum {string}
8140
+ */
8141
+ recipientType: "user" | "project-manager" | "production-engineer" | "draftsman" | "fitup-foreman" | "welding-foreman" | "qc-inspector" | "ndt-team" | "hydrotest-team" | "painting-foreman" | "painting-qc" | "default";
8142
+ };
8143
+ NotificationNavigation: {
8144
+ /**
8145
+ * @example common
8146
+ * @enum {string}
8147
+ */
8148
+ platform: "common" | "web" | "mobile";
8149
+ /** @example JointDetail */
8150
+ section: string;
8151
+ /**
8152
+ * @example {
8153
+ * "idJoint": 123,
8154
+ * "idProject": 1
8155
+ * }
8156
+ */
8157
+ params?: {
8158
+ [key: string]: string | number;
8159
+ };
8160
+ };
8161
+ CreateNotificationRequest: {
8162
+ /**
8163
+ * @example FitUp
8164
+ * @enum {string}
8165
+ */
8166
+ category: "General" | "Project" | "JointList" | "FitUp" | "Welding" | "NDT" | "Hydrotest" | "Painting" | "Revision" | "Dispatch" | "Spool";
8167
+ /** @example Joints-Assigned */
8168
+ eventType: string;
8169
+ /** @example 1 */
8170
+ idCompany: number;
8171
+ /** @example 1 */
8172
+ idProject?: number;
8173
+ /**
8174
+ * @example [
8175
+ * {
8176
+ * "idUser": 5,
8177
+ * "recipientType": "fitup-foreman"
8178
+ * }
8179
+ * ]
8180
+ */
8181
+ recipients: components["schemas"]["NotificationRecipient"][];
8182
+ /**
8183
+ * @example {
8184
+ * "jointsCount": "5",
8185
+ * "projectName": "Pipeline Project A",
8186
+ * "jointIds": "J-001, J-002, J-003"
8187
+ * }
8188
+ */
8189
+ data: {
8190
+ [key: string]: string;
8191
+ };
8192
+ navigation?: components["schemas"]["NotificationNavigation"];
8193
+ /**
8194
+ * @default normal
8195
+ * @example normal
8196
+ * @enum {string}
8197
+ */
8198
+ priority: "high" | "normal";
8199
+ /**
8200
+ * Format: date-time
8201
+ * @example 2024-01-01T10:00:00Z
8202
+ */
8203
+ scheduledFor?: string;
8204
+ /** @example joint-assignment-20240101-12345 */
8205
+ idempotencyKey?: string;
8206
+ };
8207
+ NotificationQueueResponse: {
8208
+ /** @example 507f1f77bcf86cd799439011 */
8209
+ queueId: string;
8210
+ /**
8211
+ * @example pending
8212
+ * @enum {string}
8213
+ */
8214
+ status: "pending" | "processing" | "completed" | "failed";
8215
+ /**
8216
+ * Format: date-time
8217
+ * @example 2024-01-01T10:00:00Z
8218
+ */
8219
+ scheduledFor: string | null;
8220
+ };
8221
+ NotificationHistoryItem: {
8222
+ /** @example 507f1f77bcf86cd799439011 */
8223
+ _id: string;
8224
+ /**
8225
+ * @example FitUp
8226
+ * @enum {string}
8227
+ */
8228
+ category: "General" | "Project" | "JointList" | "FitUp" | "Welding" | "NDT" | "Hydrotest" | "Painting" | "Revision" | "Dispatch" | "Spool";
8229
+ /** @example Joints-Assigned */
8230
+ eventType: string;
8231
+ /** @example 5 joints assigned for fit-up */
8232
+ title: string;
8233
+ /** @example 5 new joints assigned to you for fit-up in project ABC */
8234
+ body: string;
8235
+ /** @example false */
8236
+ isRead: boolean;
8237
+ /**
8238
+ * Format: date-time
8239
+ * @example 2024-01-01T10:00:00Z
8240
+ */
8241
+ createdAt: string;
8242
+ /**
8243
+ * Format: date-time
8244
+ * @example 2024-01-01T11:00:00Z
8245
+ */
8246
+ readAt: string | null;
8247
+ };
8248
+ NotificationHistoryResponse: {
8249
+ notifications: components["schemas"]["NotificationHistoryItem"][];
8250
+ pagination: {
8251
+ /** @example 150 */
8252
+ total: number;
8253
+ /** @example 20 */
8254
+ limit: number;
8255
+ /** @example 0 */
8256
+ offset: number;
8257
+ /** @example true */
8258
+ hasMore: boolean;
8259
+ };
8260
+ };
8261
+ NotificationStats: {
8262
+ queue: {
8263
+ /** @example 10 */
8264
+ pending: number;
8265
+ /** @example 2 */
8266
+ processing: number;
8267
+ /** @example 1500 */
8268
+ completed: number;
8269
+ /** @example 5 */
8270
+ failed: number;
8271
+ };
8272
+ streams: {
8273
+ [key: string]: {
8274
+ /** @example true */
8275
+ running: boolean;
8276
+ /** @example true */
8277
+ hasStream: boolean;
8278
+ resumeToken?: unknown;
8279
+ };
8280
+ };
8281
+ };
8282
+ RegisterDeviceRequest: {
8283
+ /** @example 1 */
8284
+ idUser: number;
8285
+ /** @example 1 */
8286
+ idCompany: number;
8287
+ /** @example fGZxvK9gRUuGhx3m2W_Xvk:APA91bE... */
8288
+ token: string;
8289
+ /**
8290
+ * @example android
8291
+ * @enum {string}
8292
+ */
8293
+ platform: "ios" | "android" | "web";
8294
+ /** @example device-12345 */
8295
+ deviceId?: string;
8296
+ /** @example 1.0.0 */
8297
+ appVersion?: string;
8298
+ };
8299
+ UnregisterDeviceRequest: {
8300
+ /** @example fGZxvK9gRUuGhx3m2W_Xvk:APA91bE... */
8301
+ token: string;
8302
+ };
8303
+ DeviceToken: {
8304
+ /** @example 507f1f77bcf86cd799439011 */
8305
+ id: string;
8306
+ /**
8307
+ * @example android
8308
+ * @enum {string}
8309
+ */
8310
+ platform: "ios" | "android" | "web";
8311
+ /** @example device-12345 */
8312
+ deviceId?: string;
8313
+ /** @example 1.0.0 */
8314
+ appVersion?: string;
8315
+ /**
8316
+ * Format: date-time
8317
+ * @example 2024-01-01T10:00:00Z
8318
+ */
8319
+ lastUsedAt: string;
8320
+ /** @example true */
8321
+ isActive: boolean;
8322
+ };
8323
+ DeviceTokensResponse: {
8324
+ /** @example 3 */
8325
+ count: number;
8326
+ tokens: components["schemas"]["DeviceToken"][];
8327
+ };
6419
8328
  };
6420
8329
  responses: never;
6421
8330
  parameters: never;