@livetronics/pipesurf-types 1.1.10 → 1.1.13

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.
@@ -1575,6 +1575,8 @@ export interface paths {
1575
1575
  page?: string;
1576
1576
  limit?: string;
1577
1577
  searchQuery?: string;
1578
+ idMaterialGradePrimary?: string;
1579
+ idMaterialGradeSecondary?: string;
1578
1580
  };
1579
1581
  header?: never;
1580
1582
  path?: never;
@@ -3248,6 +3250,75 @@ export interface paths {
3248
3250
  patch?: never;
3249
3251
  trace?: never;
3250
3252
  };
3253
+ "/sheets/drawings": {
3254
+ parameters: {
3255
+ query?: never;
3256
+ header?: never;
3257
+ path?: never;
3258
+ cookie?: never;
3259
+ };
3260
+ /**
3261
+ * Get live drawings
3262
+ * @description Get all distinct live drawing names for a project, sorted alphabetically.
3263
+ */
3264
+ get: {
3265
+ parameters: {
3266
+ query: {
3267
+ idProject: string;
3268
+ };
3269
+ header?: never;
3270
+ path?: never;
3271
+ cookie?: never;
3272
+ };
3273
+ requestBody?: never;
3274
+ responses: {
3275
+ /** @description List of live drawings */
3276
+ 200: {
3277
+ headers: {
3278
+ [name: string]: unknown;
3279
+ };
3280
+ content: {
3281
+ "application/json": {
3282
+ /**
3283
+ * @example SUCCESS
3284
+ * @enum {string}
3285
+ */
3286
+ status: "SUCCESS" | "FAILED";
3287
+ error: string | null;
3288
+ /** @example Operation successful */
3289
+ message: string | null;
3290
+ data: string[] | null;
3291
+ };
3292
+ };
3293
+ };
3294
+ /** @description idProject is required or invalid */
3295
+ 400: {
3296
+ headers: {
3297
+ [name: string]: unknown;
3298
+ };
3299
+ content: {
3300
+ "application/json": components["schemas"]["ErrorResponse"];
3301
+ };
3302
+ };
3303
+ /** @description User does not have access to this project */
3304
+ 403: {
3305
+ headers: {
3306
+ [name: string]: unknown;
3307
+ };
3308
+ content: {
3309
+ "application/json": components["schemas"]["ErrorResponse"];
3310
+ };
3311
+ };
3312
+ };
3313
+ };
3314
+ put?: never;
3315
+ post?: never;
3316
+ delete?: never;
3317
+ options?: never;
3318
+ head?: never;
3319
+ patch?: never;
3320
+ trace?: never;
3321
+ };
3251
3322
  "/joints": {
3252
3323
  parameters: {
3253
3324
  query?: never;
@@ -3265,7 +3336,7 @@ export interface paths {
3265
3336
  idProject: string;
3266
3337
  page?: string;
3267
3338
  limit?: string;
3268
- phase?: "FIT_UP" | "WELDING" | "NDT" | "PAINTING" | "HYDROTEST" | "COMPLETE";
3339
+ phase?: string;
3269
3340
  status?: string;
3270
3341
  idSpool?: string;
3271
3342
  idSheet?: string;
@@ -3553,7 +3624,7 @@ export interface paths {
3553
3624
  * - VERIFY_REJECTION (PE)
3554
3625
  *
3555
3626
  * **WELDING Phase Actions:**
3556
- * - ASSIGN_WELDER_WPS (QC Inspector only) - Assign welder and WPS before WF can mark complete
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
3557
3628
  * - COMPLETE (Welding Foreman, PE) - Requires welder/WPS to be assigned by QC first
3558
3629
  * - APPROVE/REJECT (PE)
3559
3630
  * - QC_APPROVE/QC_REJECT (QC Inspector)
@@ -3642,7 +3713,7 @@ export interface paths {
3642
3713
  };
3643
3714
  /**
3644
3715
  * List spools
3645
- * @description Get all spools for a project with optional filtering by phase, status, or sheet.
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.
3646
3717
  */
3647
3718
  get: {
3648
3719
  parameters: {
@@ -3650,9 +3721,10 @@ export interface paths {
3650
3721
  idProject: string;
3651
3722
  page?: string;
3652
3723
  limit?: string;
3653
- phase?: "PENDING_JOINTS" | "HYDROTEST" | "PAINTING" | "DISPATCH";
3724
+ phase?: string;
3654
3725
  status?: string;
3655
3726
  idSheet?: string;
3727
+ drawing?: string;
3656
3728
  };
3657
3729
  header?: never;
3658
3730
  path?: never;
@@ -3990,6 +4062,8 @@ export interface paths {
3990
4062
  * **PAINTING Phase Actions:**
3991
4063
  * - RFI (Painting Foreman)
3992
4064
  * - PQC_APPROVE/PQC_REJECT (Painting QC)
4065
+ *
4066
+ * **DISPATCH Phase Actions:**
3993
4067
  * - PM_APPROVE (Project Manager)
3994
4068
  */
3995
4069
  post: {
@@ -5042,6 +5116,470 @@ export interface paths {
5042
5116
  patch?: never;
5043
5117
  trace?: never;
5044
5118
  };
5119
+ "/dashboard/product-admin": {
5120
+ parameters: {
5121
+ query?: never;
5122
+ header?: never;
5123
+ path?: never;
5124
+ cookie?: never;
5125
+ };
5126
+ /**
5127
+ * Get product admin dashboard
5128
+ * @description Get comprehensive system statistics for product admin including total companies (active/disabled), total projects (active/on_hold/completed), total users (active/disabled), and top 5 companies with latest activity logs. Only accessible to PRODUCT_ADMIN users.
5129
+ */
5130
+ get: {
5131
+ parameters: {
5132
+ query?: never;
5133
+ header?: never;
5134
+ path?: never;
5135
+ cookie?: never;
5136
+ };
5137
+ requestBody?: never;
5138
+ responses: {
5139
+ /** @description Product admin dashboard statistics */
5140
+ 200: {
5141
+ headers: {
5142
+ [name: string]: unknown;
5143
+ };
5144
+ content: {
5145
+ "application/json": {
5146
+ /**
5147
+ * @example SUCCESS
5148
+ * @enum {string}
5149
+ */
5150
+ status: "SUCCESS" | "FAILED";
5151
+ error: string | null;
5152
+ /** @example Operation successful */
5153
+ message: string | null;
5154
+ data: {
5155
+ companies: {
5156
+ active: number;
5157
+ disabled: number;
5158
+ total: number;
5159
+ };
5160
+ projects: {
5161
+ active: number;
5162
+ onHold: number;
5163
+ completed: number;
5164
+ total: number;
5165
+ };
5166
+ users: {
5167
+ active: number;
5168
+ disabled: number;
5169
+ total: number;
5170
+ };
5171
+ topCompaniesActivity: {
5172
+ idCompany: number;
5173
+ name: string;
5174
+ status: string;
5175
+ latestActivityType: string;
5176
+ latestActivityTime: string | null;
5177
+ entityType: string;
5178
+ entityId: number | null;
5179
+ }[];
5180
+ } | null;
5181
+ };
5182
+ };
5183
+ };
5184
+ /** @description Only PRODUCT_ADMIN can access this dashboard */
5185
+ 403: {
5186
+ headers: {
5187
+ [name: string]: unknown;
5188
+ };
5189
+ content: {
5190
+ "application/json": components["schemas"]["ErrorResponse"];
5191
+ };
5192
+ };
5193
+ };
5194
+ };
5195
+ put?: never;
5196
+ post?: never;
5197
+ delete?: never;
5198
+ options?: never;
5199
+ head?: never;
5200
+ patch?: never;
5201
+ trace?: never;
5202
+ };
5203
+ "/dashboard/company-admin": {
5204
+ parameters: {
5205
+ query?: never;
5206
+ header?: never;
5207
+ path?: never;
5208
+ cookie?: never;
5209
+ };
5210
+ /**
5211
+ * Get company admin dashboard
5212
+ * @description Get company-specific statistics including total projects (active/on_hold/completed), total users (active/disabled), total unique welders, and total unique WPS records. Only accessible to COMPANY_ADMIN users.
5213
+ */
5214
+ get: {
5215
+ parameters: {
5216
+ query?: never;
5217
+ header?: never;
5218
+ path?: never;
5219
+ cookie?: never;
5220
+ };
5221
+ requestBody?: never;
5222
+ responses: {
5223
+ /** @description Company admin dashboard statistics */
5224
+ 200: {
5225
+ headers: {
5226
+ [name: string]: unknown;
5227
+ };
5228
+ content: {
5229
+ "application/json": {
5230
+ /**
5231
+ * @example SUCCESS
5232
+ * @enum {string}
5233
+ */
5234
+ status: "SUCCESS" | "FAILED";
5235
+ error: string | null;
5236
+ /** @example Operation successful */
5237
+ message: string | null;
5238
+ data: {
5239
+ projects: {
5240
+ active: number;
5241
+ onHold: number;
5242
+ completed: number;
5243
+ total: number;
5244
+ };
5245
+ users: {
5246
+ active: number;
5247
+ disabled: number;
5248
+ total: number;
5249
+ };
5250
+ welders: number;
5251
+ wps: number;
5252
+ } | null;
5253
+ };
5254
+ };
5255
+ };
5256
+ /** @description Only COMPANY_ADMIN can access this dashboard */
5257
+ 403: {
5258
+ headers: {
5259
+ [name: string]: unknown;
5260
+ };
5261
+ content: {
5262
+ "application/json": components["schemas"]["ErrorResponse"];
5263
+ };
5264
+ };
5265
+ };
5266
+ };
5267
+ put?: never;
5268
+ post?: never;
5269
+ delete?: never;
5270
+ options?: never;
5271
+ head?: never;
5272
+ patch?: never;
5273
+ trace?: never;
5274
+ };
5275
+ "/dashboard/project-manager": {
5276
+ parameters: {
5277
+ query?: never;
5278
+ header?: never;
5279
+ path?: never;
5280
+ cookie?: never;
5281
+ };
5282
+ /**
5283
+ * Get project manager dashboard
5284
+ * @description Get dashboard metrics for project manager including spools pending dispatch approval, joints pending approval (if first draft is PENDING_PM), and draft revisions pending approval (excluding first draft). Only accessible to PROJECT_MANAGER users.
5285
+ */
5286
+ get: {
5287
+ parameters: {
5288
+ query: {
5289
+ idProject: string;
5290
+ };
5291
+ header?: never;
5292
+ path?: never;
5293
+ cookie?: never;
5294
+ };
5295
+ requestBody?: never;
5296
+ responses: {
5297
+ /** @description Project manager dashboard statistics */
5298
+ 200: {
5299
+ headers: {
5300
+ [name: string]: unknown;
5301
+ };
5302
+ content: {
5303
+ "application/json": {
5304
+ /**
5305
+ * @example SUCCESS
5306
+ * @enum {string}
5307
+ */
5308
+ status: "SUCCESS" | "FAILED";
5309
+ error: string | null;
5310
+ /** @example Operation successful */
5311
+ message: string | null;
5312
+ data: {
5313
+ [key: string]: {
5314
+ count: number;
5315
+ label: string;
5316
+ filters?: {
5317
+ [key: string]: string;
5318
+ };
5319
+ };
5320
+ } | null;
5321
+ };
5322
+ };
5323
+ };
5324
+ /** @description idProject is required or invalid */
5325
+ 400: {
5326
+ headers: {
5327
+ [name: string]: unknown;
5328
+ };
5329
+ content: {
5330
+ "application/json": components["schemas"]["ErrorResponse"];
5331
+ };
5332
+ };
5333
+ /** @description Only PROJECT_MANAGER can access this dashboard */
5334
+ 403: {
5335
+ headers: {
5336
+ [name: string]: unknown;
5337
+ };
5338
+ content: {
5339
+ "application/json": components["schemas"]["ErrorResponse"];
5340
+ };
5341
+ };
5342
+ };
5343
+ };
5344
+ put?: never;
5345
+ post?: never;
5346
+ delete?: never;
5347
+ options?: never;
5348
+ head?: never;
5349
+ patch?: never;
5350
+ trace?: never;
5351
+ };
5352
+ "/dashboard/hydrotest-team": {
5353
+ parameters: {
5354
+ query?: never;
5355
+ header?: never;
5356
+ path?: never;
5357
+ cookie?: never;
5358
+ };
5359
+ /**
5360
+ * Get hydrotest team dashboard
5361
+ * @description Get dashboard metrics for hydrotest team including total spools, spools pending hydrotest for first time, spools pending hydrotest for retest, total tests completed, and total spools passed. Metrics are retrieved from both Spool and ActivityLog models. Only accessible to HYDROTEST_TEAM users.
5362
+ */
5363
+ get: {
5364
+ parameters: {
5365
+ query: {
5366
+ idProject: string;
5367
+ };
5368
+ header?: never;
5369
+ path?: never;
5370
+ cookie?: never;
5371
+ };
5372
+ requestBody?: never;
5373
+ responses: {
5374
+ /** @description Hydrotest team dashboard statistics */
5375
+ 200: {
5376
+ headers: {
5377
+ [name: string]: unknown;
5378
+ };
5379
+ content: {
5380
+ "application/json": {
5381
+ /**
5382
+ * @example SUCCESS
5383
+ * @enum {string}
5384
+ */
5385
+ status: "SUCCESS" | "FAILED";
5386
+ error: string | null;
5387
+ /** @example Operation successful */
5388
+ message: string | null;
5389
+ data: {
5390
+ [key: string]: {
5391
+ count: number;
5392
+ label: string;
5393
+ filters?: {
5394
+ [key: string]: string;
5395
+ };
5396
+ };
5397
+ } | null;
5398
+ };
5399
+ };
5400
+ };
5401
+ /** @description idProject is required or invalid */
5402
+ 400: {
5403
+ headers: {
5404
+ [name: string]: unknown;
5405
+ };
5406
+ content: {
5407
+ "application/json": components["schemas"]["ErrorResponse"];
5408
+ };
5409
+ };
5410
+ /** @description Only HYDROTEST_TEAM can access this dashboard */
5411
+ 403: {
5412
+ headers: {
5413
+ [name: string]: unknown;
5414
+ };
5415
+ content: {
5416
+ "application/json": components["schemas"]["ErrorResponse"];
5417
+ };
5418
+ };
5419
+ };
5420
+ };
5421
+ put?: never;
5422
+ post?: never;
5423
+ delete?: never;
5424
+ options?: never;
5425
+ head?: never;
5426
+ patch?: never;
5427
+ trace?: never;
5428
+ };
5429
+ "/dashboard/painting-foreman": {
5430
+ parameters: {
5431
+ query?: never;
5432
+ header?: never;
5433
+ path?: never;
5434
+ cookie?: never;
5435
+ };
5436
+ /**
5437
+ * Get painting foreman dashboard
5438
+ * @description Get dashboard metrics for painting foreman including total spools, spools pending painting for first time, spools pending painting after rejection, total RFI raised, and total spools approved by painting QC. Metrics are retrieved from both Spool and ActivityLog models. Only accessible to PAINTING_FOREMAN users.
5439
+ */
5440
+ get: {
5441
+ parameters: {
5442
+ query: {
5443
+ idProject: string;
5444
+ };
5445
+ header?: never;
5446
+ path?: never;
5447
+ cookie?: never;
5448
+ };
5449
+ requestBody?: never;
5450
+ responses: {
5451
+ /** @description Painting foreman dashboard statistics */
5452
+ 200: {
5453
+ headers: {
5454
+ [name: string]: unknown;
5455
+ };
5456
+ content: {
5457
+ "application/json": {
5458
+ /**
5459
+ * @example SUCCESS
5460
+ * @enum {string}
5461
+ */
5462
+ status: "SUCCESS" | "FAILED";
5463
+ error: string | null;
5464
+ /** @example Operation successful */
5465
+ message: string | null;
5466
+ data: {
5467
+ [key: string]: {
5468
+ count: number;
5469
+ label: string;
5470
+ filters?: {
5471
+ [key: string]: string;
5472
+ };
5473
+ };
5474
+ } | null;
5475
+ };
5476
+ };
5477
+ };
5478
+ /** @description idProject is required or invalid */
5479
+ 400: {
5480
+ headers: {
5481
+ [name: string]: unknown;
5482
+ };
5483
+ content: {
5484
+ "application/json": components["schemas"]["ErrorResponse"];
5485
+ };
5486
+ };
5487
+ /** @description Only PAINTING_FOREMAN can access this dashboard */
5488
+ 403: {
5489
+ headers: {
5490
+ [name: string]: unknown;
5491
+ };
5492
+ content: {
5493
+ "application/json": components["schemas"]["ErrorResponse"];
5494
+ };
5495
+ };
5496
+ };
5497
+ };
5498
+ put?: never;
5499
+ post?: never;
5500
+ delete?: never;
5501
+ options?: never;
5502
+ head?: never;
5503
+ patch?: never;
5504
+ trace?: never;
5505
+ };
5506
+ "/dashboard/painting-qc": {
5507
+ parameters: {
5508
+ query?: never;
5509
+ header?: never;
5510
+ path?: never;
5511
+ cookie?: never;
5512
+ };
5513
+ /**
5514
+ * Get painting QC dashboard
5515
+ * @description Get dashboard metrics for painting QC including total spools, spools pending inspection, spools rejected by PQC, total RFI completed, and total spools approved by PQC. Metrics are retrieved from both Spool and ActivityLog models. Only accessible to PAINTING_QC users.
5516
+ */
5517
+ get: {
5518
+ parameters: {
5519
+ query: {
5520
+ idProject: string;
5521
+ };
5522
+ header?: never;
5523
+ path?: never;
5524
+ cookie?: never;
5525
+ };
5526
+ requestBody?: never;
5527
+ responses: {
5528
+ /** @description Painting QC dashboard statistics */
5529
+ 200: {
5530
+ headers: {
5531
+ [name: string]: unknown;
5532
+ };
5533
+ content: {
5534
+ "application/json": {
5535
+ /**
5536
+ * @example SUCCESS
5537
+ * @enum {string}
5538
+ */
5539
+ status: "SUCCESS" | "FAILED";
5540
+ error: string | null;
5541
+ /** @example Operation successful */
5542
+ message: string | null;
5543
+ data: {
5544
+ [key: string]: {
5545
+ count: number;
5546
+ label: string;
5547
+ filters?: {
5548
+ [key: string]: string;
5549
+ };
5550
+ };
5551
+ } | null;
5552
+ };
5553
+ };
5554
+ };
5555
+ /** @description idProject is required or invalid */
5556
+ 400: {
5557
+ headers: {
5558
+ [name: string]: unknown;
5559
+ };
5560
+ content: {
5561
+ "application/json": components["schemas"]["ErrorResponse"];
5562
+ };
5563
+ };
5564
+ /** @description Only PAINTING_QC can access this dashboard */
5565
+ 403: {
5566
+ headers: {
5567
+ [name: string]: unknown;
5568
+ };
5569
+ content: {
5570
+ "application/json": components["schemas"]["ErrorResponse"];
5571
+ };
5572
+ };
5573
+ };
5574
+ };
5575
+ put?: never;
5576
+ post?: never;
5577
+ delete?: never;
5578
+ options?: never;
5579
+ head?: never;
5580
+ patch?: never;
5581
+ trace?: never;
5582
+ };
5045
5583
  }
5046
5584
  export type webhooks = Record<string, never>;
5047
5585
  export interface components {
@@ -5738,7 +6276,7 @@ export interface components {
5738
6276
  * @example HYDROTEST
5739
6277
  * @enum {string}
5740
6278
  */
5741
- phase?: "HYDROTEST" | "PAINTING";
6279
+ phase?: "HYDROTEST" | "PAINTING" | "DISPATCH";
5742
6280
  data?: {
5743
6281
  /** @example Test passed */
5744
6282
  remarks?: string;