@workbuddy/sdk-js-vnext 1.0.74 → 1.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +666 -37
  2. package/index.js +255 -27
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -87,6 +87,8 @@ export class WorkBuddyClient {
87
87
  jobs: WorkBuddyJobsResource;
88
88
  /** Items API operations. */
89
89
  items: WorkBuddyItemsResource;
90
+ /** Pending Items API operations. */
91
+ pendingItems: WorkBuddyPendingItemsResource;
90
92
  /** Stages API operations. */
91
93
  stages: WorkBuddyStagesResource;
92
94
  /** Settings API operations. */
@@ -836,6 +838,7 @@ export interface WorkBuddyJobsCreateParams extends WorkBuddyRequestParams {
836
838
  quantity: number;
837
839
  location?: string;
838
840
  note?: string;
841
+ status?: 'Normal' | 'Variation' | 'Cancelled' | 'Deleted';
839
842
  buyPrice?: number;
840
843
  sellPrice?: number;
841
844
  invoicingStatus?: 'Billable' | 'No Charge' | 'Not Billable';
@@ -954,6 +957,7 @@ export interface WorkBuddyJobsTemplateCreateFromTemplateParams extends WorkBuddy
954
957
  quantity: number;
955
958
  location?: string;
956
959
  note?: string;
960
+ status?: 'Normal' | 'Variation' | 'Cancelled' | 'Deleted';
957
961
  buyPrice?: number;
958
962
  sellPrice?: number;
959
963
  invoicingStatus?: 'Billable' | 'No Charge' | 'Not Billable';
@@ -1139,6 +1143,7 @@ export interface WorkBuddyJobsStagesItemsCreateStageItemsParams extends WorkBudd
1139
1143
  quantity: number;
1140
1144
  location?: string;
1141
1145
  note?: string;
1146
+ status?: 'Normal' | 'Variation' | 'Cancelled' | 'Deleted';
1142
1147
  buyPrice?: number;
1143
1148
  sellPrice?: number;
1144
1149
  invoicingStatus?: 'Billable' | 'No Charge' | 'Not Billable';
@@ -1193,7 +1198,7 @@ export interface WorkBuddyJobsStagesItemsUpdateStageItemParams extends WorkBuddy
1193
1198
  /**
1194
1199
  * Status filter
1195
1200
  */
1196
- status?: 'Normal' | 'Variation' | 'Cancelled' | 'Requested' | 'Pending Review' | 'Declined' | 'Deleted';
1201
+ status?: 'Normal' | 'Variation' | 'Cancelled' | 'Deleted';
1197
1202
 
1198
1203
  invoicingStatus?: 'Billable' | 'No Charge' | 'Not Billable';
1199
1204
 
@@ -1222,6 +1227,157 @@ export interface WorkBuddyItemsListParams extends WorkBuddyRequestParams {
1222
1227
  integrationId: string;
1223
1228
  }
1224
1229
 
1230
+ export interface WorkBuddyPendingItemsListParams extends WorkBuddyRequestParams {
1231
+ /**
1232
+ * External integration ID for the pending item
1233
+ */
1234
+ integrationId: string;
1235
+ }
1236
+
1237
+ export interface WorkBuddyJobsStagesPendingItemsListParams extends WorkBuddyRequestParams {
1238
+ /**
1239
+ * Job ID
1240
+ */
1241
+ id: string;
1242
+ /**
1243
+ * Stage ID
1244
+ */
1245
+ stageId: string;
1246
+ /**
1247
+ * Pending item ID after which to continue
1248
+ */
1249
+ cursor?: string;
1250
+ /**
1251
+ * Maximum results (1-200)
1252
+ */
1253
+ limit?: number;
1254
+ }
1255
+
1256
+ export interface WorkBuddyJobsStagesPendingItemsCreateParams extends WorkBuddyRequestParams {
1257
+ /**
1258
+ * Job ID
1259
+ */
1260
+ id: string;
1261
+ /**
1262
+ * Stage ID
1263
+ */
1264
+ stageId: string;
1265
+
1266
+ items: {
1267
+ integrationId?: string;
1268
+ code: string;
1269
+ description?: string;
1270
+ longDescription?: string;
1271
+ quantity: number;
1272
+ location?: string;
1273
+ note?: string;
1274
+ itemStatusId: string;
1275
+ buyPrice?: number;
1276
+ sellPrice?: number;
1277
+ invoicingStatus?: 'Billable' | 'No Charge' | 'Not Billable';
1278
+ suppliedBySubcontractor?: boolean;
1279
+ }[];
1280
+ }
1281
+
1282
+ export interface WorkBuddyJobsStagesPendingItemsGetParams extends WorkBuddyRequestParams {
1283
+ /**
1284
+ * Job ID
1285
+ */
1286
+ id: string;
1287
+ /**
1288
+ * Stage ID
1289
+ */
1290
+ stageId: string;
1291
+ /**
1292
+ * Pending item ID
1293
+ */
1294
+ itemId: string;
1295
+ }
1296
+
1297
+ export interface WorkBuddyJobsStagesPendingItemsUpdateParams extends WorkBuddyRequestParams {
1298
+ /**
1299
+ * Job ID
1300
+ */
1301
+ id: string;
1302
+ /**
1303
+ * Stage ID
1304
+ */
1305
+ stageId: string;
1306
+ /**
1307
+ * Pending item ID
1308
+ */
1309
+ itemId: string;
1310
+ /**
1311
+ * For optimistic concurrency — update fails if entity was modified after this timestamp
1312
+ */
1313
+ updatedAt?: string;
1314
+
1315
+ quantity?: number;
1316
+
1317
+ unit?: string;
1318
+
1319
+ location?: string;
1320
+
1321
+ note?: string;
1322
+
1323
+ buyPrice?: number;
1324
+
1325
+ sellPrice?: number;
1326
+
1327
+ invoicingStatus?: 'Billable' | 'No Charge' | 'Not Billable';
1328
+
1329
+ suppliedBySubcontractor?: boolean;
1330
+ }
1331
+
1332
+ export interface WorkBuddyJobsStagesPendingItemsDeleteParams extends WorkBuddyRequestParams {
1333
+ /**
1334
+ * Job ID
1335
+ */
1336
+ id: string;
1337
+ /**
1338
+ * Stage ID
1339
+ */
1340
+ stageId: string;
1341
+ /**
1342
+ * Pending item ID
1343
+ */
1344
+ itemId: string;
1345
+ }
1346
+
1347
+ export interface WorkBuddyJobsStagesPendingItemsStatusUpdateStatusParams extends WorkBuddyRequestParams {
1348
+ /**
1349
+ * Job ID
1350
+ */
1351
+ id: string;
1352
+ /**
1353
+ * Stage ID
1354
+ */
1355
+ stageId: string;
1356
+ /**
1357
+ * Pending item ID
1358
+ */
1359
+ itemId: string;
1360
+ /**
1361
+ * item status ID
1362
+ */
1363
+ itemStatusId: string;
1364
+ }
1365
+
1366
+ export interface WorkBuddyJobsStagesPendingItemsApproveApproveParams extends WorkBuddyRequestParams {
1367
+ /**
1368
+ * Job ID
1369
+ */
1370
+ id: string;
1371
+ /**
1372
+ * Stage ID
1373
+ */
1374
+ stageId: string;
1375
+ /**
1376
+ * Pending item ID
1377
+ */
1378
+ itemId: string;
1379
+ }
1380
+
1225
1381
  export interface WorkBuddyStagesCreateParams extends WorkBuddyRequestParams {
1226
1382
  /**
1227
1383
  * Job ID or job number (e.g. J12345)
@@ -1303,6 +1459,10 @@ export interface WorkBuddyStagesCompleteCompleteParams extends WorkBuddyRequestP
1303
1459
  * Stage ID
1304
1460
  */
1305
1461
  id: string;
1462
+ /**
1463
+ * status ID
1464
+ */
1465
+ statusId?: string;
1306
1466
  /**
1307
1467
  * Completion date (ISO 8601 datetime)
1308
1468
  */
@@ -1313,6 +1473,19 @@ export interface WorkBuddyStagesCompleteCompleteParams extends WorkBuddyRequestP
1313
1473
  notes?: string;
1314
1474
  }
1315
1475
 
1476
+ export interface WorkBuddyStagesInProgressInProgressParams extends WorkBuddyRequestParams {
1477
+ /**
1478
+ * Stage ID
1479
+ */
1480
+ id: string;
1481
+ /**
1482
+ * status ID
1483
+ */
1484
+ statusId: string;
1485
+
1486
+ note?: string;
1487
+ }
1488
+
1316
1489
  export interface WorkBuddyStagesFinaliseFinaliseParams extends WorkBuddyRequestParams {
1317
1490
  /**
1318
1491
  * Stage ID
@@ -1414,7 +1587,7 @@ export interface WorkBuddyJobsStagesResourcesGetParams extends WorkBuddyRequestP
1414
1587
  */
1415
1588
  stageId: string;
1416
1589
  /**
1417
- * Resource ID
1590
+ * Resource or contractor contact ID
1418
1591
  */
1419
1592
  resourceId: string;
1420
1593
  }
@@ -1476,9 +1649,9 @@ export interface WorkBuddyJobsStagesResourcesStatusUpdateStatusParams extends Wo
1476
1649
 
1477
1650
  export interface WorkBuddySettingsEntityStatusesListParams extends WorkBuddyRequestParams {
1478
1651
  /**
1479
- * Entity type (customer, contractor, supplier, contact, external-user)
1652
+ * Entity type (customer, contractor, supplier, contact, external-user, pending-item)
1480
1653
  */
1481
- entity: 'customer' | 'contractor' | 'supplier' | 'contact' | 'external-user';
1654
+ entity: 'customer' | 'contractor' | 'supplier' | 'contact' | 'external-user' | 'pending-item';
1482
1655
  }
1483
1656
 
1484
1657
  export interface WorkBuddySettingsJobStatusesListParams extends WorkBuddyRequestParams {}
@@ -3451,6 +3624,10 @@ export interface WorkBuddyCrmInvitesGetParams extends WorkBuddyRequestParams {
3451
3624
  }
3452
3625
 
3453
3626
  export interface WorkBuddyCrmSitesListParams extends WorkBuddyRequestParams {
3627
+ /**
3628
+ * Search by name/address (space-separated words; all must match as token prefixes)
3629
+ */
3630
+ search?: string;
3454
3631
  /**
3455
3632
  * Filter by status (e.g. Active, Inactive). Default: Active only
3456
3633
  */
@@ -3468,6 +3645,17 @@ export interface WorkBuddyCrmSitesGetParams extends WorkBuddyRequestParams {
3468
3645
  id: string;
3469
3646
  }
3470
3647
 
3648
+ export interface WorkBuddyCrmSitesContactsListParams extends WorkBuddyRequestParams {
3649
+ /**
3650
+ * Site ID
3651
+ */
3652
+ id: string;
3653
+
3654
+ cursor?: string;
3655
+
3656
+ limit?: number;
3657
+ }
3658
+
3471
3659
  export interface WorkBuddyWebhooksEntitiesListParams extends WorkBuddyRequestParams {}
3472
3660
 
3473
3661
  export interface WorkBuddyWebhooksEntitiesEventsListParams extends WorkBuddyRequestParams {
@@ -3689,7 +3877,7 @@ export type WorkBuddyJobsSearchResponse = {
3689
3877
  sequence?: string;
3690
3878
  owner?: string;
3691
3879
  contractor?: string;
3692
- technician?: string;
3880
+ pricebook?: string;
3693
3881
  resources?: string;
3694
3882
  startDate?: string;
3695
3883
  dueDate?: string;
@@ -3770,7 +3958,7 @@ export type WorkBuddyJobsGetResponse = {
3770
3958
  sequence?: string;
3771
3959
  owner?: string;
3772
3960
  contractor?: string;
3773
- technician?: string;
3961
+ pricebook?: string;
3774
3962
  resources?: string;
3775
3963
  startDate?: string;
3776
3964
  dueDate?: string;
@@ -3850,7 +4038,7 @@ export type WorkBuddyJobsCreateResponse = {
3850
4038
  sequence?: string;
3851
4039
  owner?: string;
3852
4040
  contractor?: string;
3853
- technician?: string;
4041
+ pricebook?: string;
3854
4042
  resources?: string;
3855
4043
  startDate?: string;
3856
4044
  dueDate?: string;
@@ -3929,7 +4117,7 @@ export type WorkBuddyJobsTemplateCreateFromTemplateResponse = {
3929
4117
  sequence?: string;
3930
4118
  owner?: string;
3931
4119
  contractor?: string;
3932
- technician?: string;
4120
+ pricebook?: string;
3933
4121
  resources?: string;
3934
4122
  startDate?: string;
3935
4123
  dueDate?: string;
@@ -4008,7 +4196,7 @@ export type WorkBuddyJobsStatusUpdateStatusResponse = {
4008
4196
  sequence?: string;
4009
4197
  owner?: string;
4010
4198
  contractor?: string;
4011
- technician?: string;
4199
+ pricebook?: string;
4012
4200
  resources?: string;
4013
4201
  startDate?: string;
4014
4202
  dueDate?: string;
@@ -4087,7 +4275,7 @@ export type WorkBuddyJobsUpdateResponse = {
4087
4275
  sequence?: string;
4088
4276
  owner?: string;
4089
4277
  contractor?: string;
4090
- technician?: string;
4278
+ pricebook?: string;
4091
4279
  resources?: string;
4092
4280
  startDate?: string;
4093
4281
  dueDate?: string;
@@ -4166,7 +4354,7 @@ export type WorkBuddyJobsDispatchResponse = {
4166
4354
  sequence?: string;
4167
4355
  owner?: string;
4168
4356
  contractor?: string;
4169
- technician?: string;
4357
+ pricebook?: string;
4170
4358
  resources?: string;
4171
4359
  startDate?: string;
4172
4360
  dueDate?: string;
@@ -4218,7 +4406,7 @@ export type WorkBuddyJobsStagesListResponse = {
4218
4406
  status: { id?: string; name?: string; systemStatus: string };
4219
4407
  sequence?: string;
4220
4408
  contractor?: string;
4221
- technician?: string;
4409
+ pricebook?: string;
4222
4410
  startDate?: string;
4223
4411
  dueDate?: string;
4224
4412
  createdAt: string;
@@ -4236,7 +4424,7 @@ export type WorkBuddyJobsStagesGetJobStageResponse = {
4236
4424
  sequence?: string;
4237
4425
  owner?: string;
4238
4426
  contractor?: string;
4239
- technician?: string;
4427
+ pricebook?: string;
4240
4428
  resources?: string;
4241
4429
  startDate?: string;
4242
4430
  dueDate?: string;
@@ -4381,6 +4569,155 @@ export type WorkBuddyItemsListResponse = {
4381
4569
  }[];
4382
4570
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
4383
4571
  };
4572
+ export type WorkBuddyPendingItemsListResponse = {
4573
+ items: {
4574
+ id: string;
4575
+ jobId: string;
4576
+ stageId: string;
4577
+ integrationId?: string;
4578
+ code?: string;
4579
+ description: string;
4580
+ type?: string;
4581
+ quantity: number;
4582
+ unit?: string;
4583
+ location?: string;
4584
+ note?: string;
4585
+ itemStatus: { id: string; name: string };
4586
+ buyPrice?: number;
4587
+ sellPrice?: number;
4588
+ invoicingStatus?: string;
4589
+ suppliedBySubcontractor: boolean;
4590
+ createdAt: string;
4591
+ updatedAt: string;
4592
+ }[];
4593
+ pagination: { limit: number; hasMore: boolean; nextCursor: string };
4594
+ };
4595
+ export type WorkBuddyJobsStagesPendingItemsListResponse = {
4596
+ items: {
4597
+ id: string;
4598
+ jobId: string;
4599
+ stageId: string;
4600
+ integrationId?: string;
4601
+ code?: string;
4602
+ description: string;
4603
+ type?: string;
4604
+ quantity: number;
4605
+ unit?: string;
4606
+ location?: string;
4607
+ note?: string;
4608
+ itemStatus: { id: string; name: string };
4609
+ buyPrice?: number;
4610
+ sellPrice?: number;
4611
+ invoicingStatus?: string;
4612
+ suppliedBySubcontractor: boolean;
4613
+ createdAt: string;
4614
+ updatedAt: string;
4615
+ }[];
4616
+ pagination: { limit: number; hasMore: boolean; nextCursor: string };
4617
+ };
4618
+ export type WorkBuddyJobsStagesPendingItemsCreateResponse = {
4619
+ items: {
4620
+ id: string;
4621
+ jobId: string;
4622
+ stageId: string;
4623
+ integrationId?: string;
4624
+ code?: string;
4625
+ description: string;
4626
+ type?: string;
4627
+ quantity: number;
4628
+ unit?: string;
4629
+ location?: string;
4630
+ note?: string;
4631
+ itemStatus: { id: string; name: string };
4632
+ buyPrice?: number;
4633
+ sellPrice?: number;
4634
+ invoicingStatus?: string;
4635
+ suppliedBySubcontractor: boolean;
4636
+ createdAt: string;
4637
+ updatedAt: string;
4638
+ }[];
4639
+ };
4640
+ export type WorkBuddyJobsStagesPendingItemsGetResponse = {
4641
+ id: string;
4642
+ jobId: string;
4643
+ stageId: string;
4644
+ integrationId?: string;
4645
+ code?: string;
4646
+ description: string;
4647
+ type?: string;
4648
+ quantity: number;
4649
+ unit?: string;
4650
+ location?: string;
4651
+ note?: string;
4652
+ itemStatus: { id: string; name: string };
4653
+ buyPrice?: number;
4654
+ sellPrice?: number;
4655
+ invoicingStatus?: string;
4656
+ suppliedBySubcontractor: boolean;
4657
+ createdAt: string;
4658
+ updatedAt: string;
4659
+ };
4660
+ export type WorkBuddyJobsStagesPendingItemsUpdateResponse = {
4661
+ id: string;
4662
+ jobId: string;
4663
+ stageId: string;
4664
+ integrationId?: string;
4665
+ code?: string;
4666
+ description: string;
4667
+ type?: string;
4668
+ quantity: number;
4669
+ unit?: string;
4670
+ location?: string;
4671
+ note?: string;
4672
+ itemStatus: { id: string; name: string };
4673
+ buyPrice?: number;
4674
+ sellPrice?: number;
4675
+ invoicingStatus?: string;
4676
+ suppliedBySubcontractor: boolean;
4677
+ createdAt: string;
4678
+ updatedAt: string;
4679
+ };
4680
+ export type WorkBuddyJobsStagesPendingItemsDeleteResponse = { deleted: boolean };
4681
+ export type WorkBuddyJobsStagesPendingItemsStatusUpdateStatusResponse = {
4682
+ id: string;
4683
+ jobId: string;
4684
+ stageId: string;
4685
+ integrationId?: string;
4686
+ code?: string;
4687
+ description: string;
4688
+ type?: string;
4689
+ quantity: number;
4690
+ unit?: string;
4691
+ location?: string;
4692
+ note?: string;
4693
+ itemStatus: { id: string; name: string };
4694
+ buyPrice?: number;
4695
+ sellPrice?: number;
4696
+ invoicingStatus?: string;
4697
+ suppliedBySubcontractor: boolean;
4698
+ createdAt: string;
4699
+ updatedAt: string;
4700
+ };
4701
+ export type WorkBuddyJobsStagesPendingItemsApproveApproveResponse = {
4702
+ id: string;
4703
+ jobId: string;
4704
+ stageId: string;
4705
+ integrationId?: string;
4706
+ code?: string;
4707
+ description: string;
4708
+ type?: string;
4709
+ quantity: number;
4710
+ unit?: string;
4711
+ location?: string;
4712
+ note?: string;
4713
+ status?: string;
4714
+ buyPrice?: number;
4715
+ sellPrice?: number;
4716
+ invoicingStatus?: string;
4717
+ suppliedBySubcontractor: boolean;
4718
+ createdAt: string;
4719
+ updatedAt: string;
4720
+ };
4384
4721
  export type WorkBuddyStagesCreateResponse = {
4385
4722
  id: string;
4386
4723
  stageNumber: string;
@@ -4391,7 +4728,7 @@ export type WorkBuddyStagesCreateResponse = {
4391
4728
  sequence?: string;
4392
4729
  owner?: string;
4393
4730
  contractor?: string;
4394
- technician?: string;
4731
+ pricebook?: string;
4395
4732
  resources?: string;
4396
4733
  startDate?: string;
4397
4734
  dueDate?: string;
@@ -4437,7 +4774,7 @@ export type WorkBuddyStagesUpdateResponse = {
4437
4774
  sequence?: string;
4438
4775
  owner?: string;
4439
4776
  contractor?: string;
4440
- technician?: string;
4777
+ pricebook?: string;
4441
4778
  resources?: string;
4442
4779
  startDate?: string;
4443
4780
  dueDate?: string;
@@ -4484,7 +4821,7 @@ export type WorkBuddyStagesDispatchResponse = {
4484
4821
  sequence?: string;
4485
4822
  owner?: string;
4486
4823
  contractor?: string;
4487
- technician?: string;
4824
+ pricebook?: string;
4488
4825
  resources?: string;
4489
4826
  startDate?: string;
4490
4827
  dueDate?: string;
@@ -4530,7 +4867,53 @@ export type WorkBuddyStagesCompleteCompleteResponse = {
4530
4867
  sequence?: string;
4531
4868
  owner?: string;
4532
4869
  contractor?: string;
4533
- technician?: string;
4870
+ pricebook?: string;
4871
+ resources?: string;
4872
+ startDate?: string;
4873
+ dueDate?: string;
4874
+ completedDate?: string;
4875
+ completedBy?: string;
4876
+ completedNote?: string;
4877
+ finalisedDate?: string;
4878
+ tags?: string;
4879
+ systemTags?: string;
4880
+ schedulingTags?: string;
4881
+ items?: {
4882
+ id: string;
4883
+ jobId: string;
4884
+ stageId: string;
4885
+ integrationId?: string;
4886
+ code?: string;
4887
+ description: string;
4888
+ type?: string;
4889
+ quantity: number;
4890
+ unit?: string;
4891
+ location?: string;
4892
+ note?: string;
4893
+ status?: string;
4894
+ buyPrice?: number;
4895
+ sellPrice?: number;
4896
+ invoicingStatus?: string;
4897
+ suppliedBySubcontractor: boolean;
4898
+ createdAt: string;
4899
+ updatedAt: string;
4900
+ }[];
4901
+ totals?: { sellTotal: number; buyTotal: number };
4902
+ customFields?: string;
4903
+ createdAt: string;
4904
+ updatedAt: string;
4905
+ };
4906
+ export type WorkBuddyStagesInProgressInProgressResponse = {
4907
+ id: string;
4908
+ stageNumber: string;
4909
+ jobId: string;
4910
+ job?: { id: string; jobNumber: string; description?: string };
4911
+ name?: string;
4912
+ status: { id?: string; name?: string; systemStatus: string };
4913
+ sequence?: string;
4914
+ owner?: string;
4915
+ contractor?: string;
4916
+ pricebook?: string;
4534
4917
  resources?: string;
4535
4918
  startDate?: string;
4536
4919
  dueDate?: string;
@@ -4576,7 +4959,7 @@ export type WorkBuddyStagesFinaliseFinaliseResponse = {
4576
4959
  sequence?: string;
4577
4960
  owner?: string;
4578
4961
  contractor?: string;
4579
- technician?: string;
4962
+ pricebook?: string;
4580
4963
  resources?: string;
4581
4964
  startDate?: string;
4582
4965
  dueDate?: string;
@@ -4622,7 +5005,7 @@ export type WorkBuddyStagesCancelCancelResponse = {
4622
5005
  sequence?: string;
4623
5006
  owner?: string;
4624
5007
  contractor?: string;
4625
- technician?: string;
5008
+ pricebook?: string;
4626
5009
  resources?: string;
4627
5010
  startDate?: string;
4628
5011
  dueDate?: string;
@@ -4668,7 +5051,7 @@ export type WorkBuddyStagesOnHoldOnHoldResponse = {
4668
5051
  sequence?: string;
4669
5052
  owner?: string;
4670
5053
  contractor?: string;
4671
- technician?: string;
5054
+ pricebook?: string;
4672
5055
  resources?: string;
4673
5056
  startDate?: string;
4674
5057
  dueDate?: string;
@@ -4714,7 +5097,7 @@ export type WorkBuddyStagesReverseReverseResponse = {
4714
5097
  sequence?: string;
4715
5098
  owner?: string;
4716
5099
  contractor?: string;
4717
- technician?: string;
5100
+ pricebook?: string;
4718
5101
  resources?: string;
4719
5102
  startDate?: string;
4720
5103
  dueDate?: string;
@@ -4801,6 +5184,7 @@ export type WorkBuddySettingsPricebooksListResponse = {
4801
5184
  parentOnly: boolean;
4802
5185
  isGlobal: boolean;
4803
5186
  account?: string;
5187
+ company?: string;
4804
5188
  dateStart?: string;
4805
5189
  dateEnd?: string;
4806
5190
  }[];
@@ -4815,11 +5199,21 @@ export type WorkBuddySettingsPricebooksGetByIdOrNameResponse = {
4815
5199
  parentOnly: boolean;
4816
5200
  isGlobal: boolean;
4817
5201
  account?: string;
5202
+ company?: string;
4818
5203
  dateStart?: string;
4819
5204
  dateEnd?: string;
4820
5205
  };
4821
5206
  export type WorkBuddySettingsStageStatusesListResponse = {
4822
- items: { id: string; name: string; systemName: string; systemStatus: string; sortOrder?: number }[];
5207
+ items: {
5208
+ id: string;
5209
+ name: string;
5210
+ systemName: string;
5211
+ systemStatus: string;
5212
+ sortOrder?: number;
5213
+ description: string;
5214
+ activityOptions: { shareWithCustomer: boolean; shareWithField: boolean };
5215
+ displayOptions: { showInContractorPortal: boolean; showInFieldApp: boolean };
5216
+ }[];
4823
5217
  };
4824
5218
  export type WorkBuddySettingsTagsListResponse = { items: { id: string; name: string; color?: string }[] };
4825
5219
  export type WorkBuddySettingsZonesListResponse = { items: { id: string; name: string }[] };
@@ -5168,6 +5562,8 @@ export type WorkBuddyCrmCustomersListResponse = {
5168
5562
  firstName?: string;
5169
5563
  lastName?: string;
5170
5564
  title?: string;
5565
+ legalName?: string;
5566
+ website?: string;
5171
5567
  integrationId?: string;
5172
5568
  address?: string;
5173
5569
  phone?: string;
@@ -5179,6 +5575,7 @@ export type WorkBuddyCrmCustomersListResponse = {
5179
5575
  autoDispatch?: string;
5180
5576
  status?: string;
5181
5577
  note?: string;
5578
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5182
5579
  }[];
5183
5580
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5184
5581
  };
@@ -5286,6 +5683,8 @@ export type WorkBuddyCrmCustomersContactsListResponse = {
5286
5683
  firstName?: string;
5287
5684
  lastName?: string;
5288
5685
  title?: string;
5686
+ legalName?: string;
5687
+ website?: string;
5289
5688
  integrationId?: string;
5290
5689
  address?: string;
5291
5690
  phone?: string;
@@ -5297,6 +5696,7 @@ export type WorkBuddyCrmCustomersContactsListResponse = {
5297
5696
  autoDispatch?: string;
5298
5697
  status?: string;
5299
5698
  note?: string;
5699
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5300
5700
  }[];
5301
5701
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5302
5702
  };
@@ -5308,6 +5708,8 @@ export type WorkBuddyCrmCustomersContactsCreateContactResponse = {
5308
5708
  firstName?: string;
5309
5709
  lastName?: string;
5310
5710
  title?: string;
5711
+ legalName?: string;
5712
+ website?: string;
5311
5713
  integrationId?: string;
5312
5714
  address?: string;
5313
5715
  phone?: string;
@@ -5319,6 +5721,7 @@ export type WorkBuddyCrmCustomersContactsCreateContactResponse = {
5319
5721
  autoDispatch?: string;
5320
5722
  status?: string;
5321
5723
  note?: string;
5724
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5322
5725
  };
5323
5726
  };
5324
5727
  export type WorkBuddyCrmCustomersContactsDeleteContactResponse = unknown;
@@ -5330,6 +5733,8 @@ export type WorkBuddyCrmCustomersContactsInviteInviteContactResponse = {
5330
5733
  firstName?: string;
5331
5734
  lastName?: string;
5332
5735
  title?: string;
5736
+ legalName?: string;
5737
+ website?: string;
5333
5738
  integrationId?: string;
5334
5739
  address?: string;
5335
5740
  phone?: string;
@@ -5341,10 +5746,11 @@ export type WorkBuddyCrmCustomersContactsInviteInviteContactResponse = {
5341
5746
  autoDispatch?: string;
5342
5747
  status?: string;
5343
5748
  note?: string;
5749
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5344
5750
  };
5345
5751
  };
5346
5752
  export type WorkBuddyCrmCustomersSitesListResponse = {
5347
- items: { id: string; name: string; address: string }[];
5753
+ items: { id: string; name: string; type: string; primaryContact?: string; address: string }[];
5348
5754
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5349
5755
  };
5350
5756
  export type WorkBuddyCrmEmployeesListResponse = {
@@ -5355,6 +5761,8 @@ export type WorkBuddyCrmEmployeesListResponse = {
5355
5761
  firstName?: string;
5356
5762
  lastName?: string;
5357
5763
  title?: string;
5764
+ legalName?: string;
5765
+ website?: string;
5358
5766
  integrationId?: string;
5359
5767
  address?: string;
5360
5768
  phone?: string;
@@ -5366,6 +5774,7 @@ export type WorkBuddyCrmEmployeesListResponse = {
5366
5774
  autoDispatch?: string;
5367
5775
  status?: string;
5368
5776
  note?: string;
5777
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5369
5778
  }[];
5370
5779
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5371
5780
  };
@@ -5377,6 +5786,8 @@ export type WorkBuddyCrmEmployeesGetResponse = {
5377
5786
  firstName?: string;
5378
5787
  lastName?: string;
5379
5788
  title?: string;
5789
+ legalName?: string;
5790
+ website?: string;
5380
5791
  integrationId?: string;
5381
5792
  address?: string;
5382
5793
  phone?: string;
@@ -5388,6 +5799,7 @@ export type WorkBuddyCrmEmployeesGetResponse = {
5388
5799
  autoDispatch?: string;
5389
5800
  status?: string;
5390
5801
  note?: string;
5802
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5391
5803
  };
5392
5804
  };
5393
5805
  export type WorkBuddyCrmContractorsListResponse = {
@@ -5398,6 +5810,8 @@ export type WorkBuddyCrmContractorsListResponse = {
5398
5810
  firstName?: string;
5399
5811
  lastName?: string;
5400
5812
  title?: string;
5813
+ legalName?: string;
5814
+ website?: string;
5401
5815
  integrationId?: string;
5402
5816
  address?: string;
5403
5817
  phone?: string;
@@ -5409,6 +5823,7 @@ export type WorkBuddyCrmContractorsListResponse = {
5409
5823
  autoDispatch?: string;
5410
5824
  status?: string;
5411
5825
  note?: string;
5826
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5412
5827
  }[];
5413
5828
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5414
5829
  };
@@ -5548,6 +5963,8 @@ export type WorkBuddyCrmContractorsContactsListResponse = {
5548
5963
  firstName?: string;
5549
5964
  lastName?: string;
5550
5965
  title?: string;
5966
+ legalName?: string;
5967
+ website?: string;
5551
5968
  integrationId?: string;
5552
5969
  address?: string;
5553
5970
  phone?: string;
@@ -5559,6 +5976,7 @@ export type WorkBuddyCrmContractorsContactsListResponse = {
5559
5976
  autoDispatch?: string;
5560
5977
  status?: string;
5561
5978
  note?: string;
5979
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5562
5980
  }[];
5563
5981
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5564
5982
  };
@@ -5570,6 +5988,8 @@ export type WorkBuddyCrmContractorsContactsCreateContactResponse = {
5570
5988
  firstName?: string;
5571
5989
  lastName?: string;
5572
5990
  title?: string;
5991
+ legalName?: string;
5992
+ website?: string;
5573
5993
  integrationId?: string;
5574
5994
  address?: string;
5575
5995
  phone?: string;
@@ -5581,6 +6001,7 @@ export type WorkBuddyCrmContractorsContactsCreateContactResponse = {
5581
6001
  autoDispatch?: string;
5582
6002
  status?: string;
5583
6003
  note?: string;
6004
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5584
6005
  };
5585
6006
  };
5586
6007
  export type WorkBuddyCrmContractorsContactsDeleteContactResponse = unknown;
@@ -5592,6 +6013,8 @@ export type WorkBuddyCrmContractorsContactsInviteInviteContactResponse = {
5592
6013
  firstName?: string;
5593
6014
  lastName?: string;
5594
6015
  title?: string;
6016
+ legalName?: string;
6017
+ website?: string;
5595
6018
  integrationId?: string;
5596
6019
  address?: string;
5597
6020
  phone?: string;
@@ -5603,6 +6026,7 @@ export type WorkBuddyCrmContractorsContactsInviteInviteContactResponse = {
5603
6026
  autoDispatch?: string;
5604
6027
  status?: string;
5605
6028
  note?: string;
6029
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5606
6030
  };
5607
6031
  };
5608
6032
  export type WorkBuddyCrmSuppliersListResponse = {
@@ -5613,6 +6037,8 @@ export type WorkBuddyCrmSuppliersListResponse = {
5613
6037
  firstName?: string;
5614
6038
  lastName?: string;
5615
6039
  title?: string;
6040
+ legalName?: string;
6041
+ website?: string;
5616
6042
  integrationId?: string;
5617
6043
  address?: string;
5618
6044
  phone?: string;
@@ -5624,6 +6050,7 @@ export type WorkBuddyCrmSuppliersListResponse = {
5624
6050
  autoDispatch?: string;
5625
6051
  status?: string;
5626
6052
  note?: string;
6053
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5627
6054
  }[];
5628
6055
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5629
6056
  };
@@ -5767,6 +6194,8 @@ export type WorkBuddyCrmCompaniesListResponse = {
5767
6194
  firstName?: string;
5768
6195
  lastName?: string;
5769
6196
  title?: string;
6197
+ legalName?: string;
6198
+ website?: string;
5770
6199
  integrationId?: string;
5771
6200
  address?: string;
5772
6201
  phone?: string;
@@ -5777,6 +6206,7 @@ export type WorkBuddyCrmCompaniesListResponse = {
5777
6206
  autoDispatch?: string;
5778
6207
  status?: string;
5779
6208
  note?: string;
6209
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5780
6210
  }[];
5781
6211
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5782
6212
  };
@@ -5788,6 +6218,8 @@ export type WorkBuddyCrmCompaniesGetResponse = {
5788
6218
  firstName?: string;
5789
6219
  lastName?: string;
5790
6220
  title?: string;
6221
+ legalName?: string;
6222
+ website?: string;
5791
6223
  integrationId?: string;
5792
6224
  address?: string;
5793
6225
  phone?: string;
@@ -5798,6 +6230,7 @@ export type WorkBuddyCrmCompaniesGetResponse = {
5798
6230
  autoDispatch?: string;
5799
6231
  status?: string;
5800
6232
  note?: string;
6233
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5801
6234
  };
5802
6235
  };
5803
6236
  export type WorkBuddyCrmExternalUsersListResponse = {
@@ -5808,6 +6241,8 @@ export type WorkBuddyCrmExternalUsersListResponse = {
5808
6241
  firstName?: string;
5809
6242
  lastName?: string;
5810
6243
  title?: string;
6244
+ legalName?: string;
6245
+ website?: string;
5811
6246
  integrationId?: string;
5812
6247
  address?: string;
5813
6248
  phone?: string;
@@ -5819,6 +6254,7 @@ export type WorkBuddyCrmExternalUsersListResponse = {
5819
6254
  autoDispatch?: string;
5820
6255
  status?: string;
5821
6256
  note?: string;
6257
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5822
6258
  }[];
5823
6259
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5824
6260
  };
@@ -5830,6 +6266,8 @@ export type WorkBuddyCrmExternalUsersGetResponse = {
5830
6266
  firstName?: string;
5831
6267
  lastName?: string;
5832
6268
  title?: string;
6269
+ legalName?: string;
6270
+ website?: string;
5833
6271
  integrationId?: string;
5834
6272
  address?: string;
5835
6273
  phone?: string;
@@ -5841,6 +6279,7 @@ export type WorkBuddyCrmExternalUsersGetResponse = {
5841
6279
  autoDispatch?: string;
5842
6280
  status?: string;
5843
6281
  note?: string;
6282
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5844
6283
  };
5845
6284
  };
5846
6285
  export type WorkBuddyCrmContactsListResponse = {
@@ -5851,6 +6290,8 @@ export type WorkBuddyCrmContactsListResponse = {
5851
6290
  firstName?: string;
5852
6291
  lastName?: string;
5853
6292
  title?: string;
6293
+ legalName?: string;
6294
+ website?: string;
5854
6295
  integrationId?: string;
5855
6296
  address?: string;
5856
6297
  phone?: string;
@@ -5862,6 +6303,7 @@ export type WorkBuddyCrmContactsListResponse = {
5862
6303
  autoDispatch?: string;
5863
6304
  status?: string;
5864
6305
  note?: string;
6306
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5865
6307
  }[];
5866
6308
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5867
6309
  };
@@ -5873,6 +6315,8 @@ export type WorkBuddyCrmContactsGetResponse = {
5873
6315
  firstName?: string;
5874
6316
  lastName?: string;
5875
6317
  title?: string;
6318
+ legalName?: string;
6319
+ website?: string;
5876
6320
  integrationId?: string;
5877
6321
  address?: string;
5878
6322
  phone?: string;
@@ -5884,6 +6328,7 @@ export type WorkBuddyCrmContactsGetResponse = {
5884
6328
  autoDispatch?: string;
5885
6329
  status?: string;
5886
6330
  note?: string;
6331
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5887
6332
  };
5888
6333
  };
5889
6334
  export type WorkBuddyCrmContactsUpdateResponse = {
@@ -5894,6 +6339,8 @@ export type WorkBuddyCrmContactsUpdateResponse = {
5894
6339
  firstName?: string;
5895
6340
  lastName?: string;
5896
6341
  title?: string;
6342
+ legalName?: string;
6343
+ website?: string;
5897
6344
  integrationId?: string;
5898
6345
  address?: string;
5899
6346
  phone?: string;
@@ -5905,6 +6352,7 @@ export type WorkBuddyCrmContactsUpdateResponse = {
5905
6352
  autoDispatch?: string;
5906
6353
  status?: string;
5907
6354
  note?: string;
6355
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5908
6356
  };
5909
6357
  };
5910
6358
  export type WorkBuddyCrmContactsStatusUpdateStatusResponse = {
@@ -5915,6 +6363,8 @@ export type WorkBuddyCrmContactsStatusUpdateStatusResponse = {
5915
6363
  firstName?: string;
5916
6364
  lastName?: string;
5917
6365
  title?: string;
6366
+ legalName?: string;
6367
+ website?: string;
5918
6368
  integrationId?: string;
5919
6369
  address?: string;
5920
6370
  phone?: string;
@@ -5926,6 +6376,7 @@ export type WorkBuddyCrmContactsStatusUpdateStatusResponse = {
5926
6376
  autoDispatch?: string;
5927
6377
  status?: string;
5928
6378
  note?: string;
6379
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5929
6380
  };
5930
6381
  };
5931
6382
  export type WorkBuddyCrmInvitesListResponse = {
@@ -5936,6 +6387,8 @@ export type WorkBuddyCrmInvitesListResponse = {
5936
6387
  firstName?: string;
5937
6388
  lastName?: string;
5938
6389
  title?: string;
6390
+ legalName?: string;
6391
+ website?: string;
5939
6392
  integrationId?: string;
5940
6393
  address?: string;
5941
6394
  phone?: string;
@@ -5947,6 +6400,7 @@ export type WorkBuddyCrmInvitesListResponse = {
5947
6400
  autoDispatch?: string;
5948
6401
  status?: string;
5949
6402
  note?: string;
6403
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5950
6404
  }[];
5951
6405
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5952
6406
  };
@@ -5958,6 +6412,8 @@ export type WorkBuddyCrmInvitesGetResponse = {
5958
6412
  firstName?: string;
5959
6413
  lastName?: string;
5960
6414
  title?: string;
6415
+ legalName?: string;
6416
+ website?: string;
5961
6417
  integrationId?: string;
5962
6418
  address?: string;
5963
6419
  phone?: string;
@@ -5969,13 +6425,41 @@ export type WorkBuddyCrmInvitesGetResponse = {
5969
6425
  autoDispatch?: string;
5970
6426
  status?: string;
5971
6427
  note?: string;
6428
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
5972
6429
  };
5973
6430
  };
5974
6431
  export type WorkBuddyCrmSitesListResponse = {
5975
- items: { id: string; name: string; address: string }[];
6432
+ items: { id: string; name: string; type: string; primaryContact?: string; address: string }[];
6433
+ pagination: { limit: number; hasMore: boolean; nextCursor: string };
6434
+ };
6435
+ export type WorkBuddyCrmSitesGetResponse = {
6436
+ item: { id: string; name: string; type: string; primaryContact?: string; address: string };
6437
+ };
6438
+ export type WorkBuddyCrmSitesContactsListResponse = {
6439
+ items: {
6440
+ id: string;
6441
+ name: string;
6442
+ type: string;
6443
+ firstName?: string;
6444
+ lastName?: string;
6445
+ title?: string;
6446
+ legalName?: string;
6447
+ website?: string;
6448
+ integrationId?: string;
6449
+ address?: string;
6450
+ phone?: string;
6451
+ mobile?: string;
6452
+ email?: string;
6453
+ username?: string;
6454
+ login?: boolean;
6455
+ invitePending?: boolean;
6456
+ autoDispatch?: string;
6457
+ status?: string;
6458
+ note?: string;
6459
+ parents?: { id: string; name: string; type: string; primary?: boolean; role?: string; invitePending?: boolean }[];
6460
+ }[];
5976
6461
  pagination: { limit: number; hasMore: boolean; nextCursor: string };
5977
6462
  };
5978
- export type WorkBuddyCrmSitesGetResponse = { item: { id: string; name: string; address: string } };
5979
6463
  export type WorkBuddyWebhooksEntitiesListResponse = unknown;
5980
6464
  export type WorkBuddyWebhooksEntitiesEventsListResponse = unknown;
5981
6465
  export type WorkBuddyWebhooksEntitiesFiltersListResponse = unknown;
@@ -6149,6 +6633,8 @@ export interface WorkBuddyJobsStatusResource {
6149
6633
  export interface WorkBuddyJobsStagesResource {
6150
6634
  /** Items API operations. */
6151
6635
  items: WorkBuddyJobsStagesItemsResource;
6636
+ /** Pending Items API operations. */
6637
+ pendingItems: WorkBuddyJobsStagesPendingItemsResource;
6152
6638
  /** Resources API operations. */
6153
6639
  resources: WorkBuddyJobsStagesResourcesResource;
6154
6640
  /** Activities API operations. */
@@ -6241,13 +6727,95 @@ export interface WorkBuddyJobsStagesItemsResource {
6241
6727
  ): Promise<TResponse>;
6242
6728
  }
6243
6729
 
6730
+ export interface WorkBuddyJobsStagesPendingItemsResource {
6731
+ /** Status API operations. */
6732
+ status: WorkBuddyJobsStagesPendingItemsStatusResource;
6733
+ /** Approve API operations. */
6734
+ approve: WorkBuddyJobsStagesPendingItemsApproveResource;
6735
+ /**
6736
+ * List items awaiting approval for a stage.
6737
+ * Operation: PublicJobStagePendingItemController_list
6738
+ */
6739
+ list<TResponse = WorkBuddyJobsStagesPendingItemsListResponse>(
6740
+ params: WorkBuddyJobsStagesPendingItemsListParams,
6741
+ options?: WorkBuddyRequestOptions
6742
+ ): Promise<TResponse>;
6743
+ /** Iterate all items by following cursor pagination for list(). */
6744
+ all<TItem = WorkBuddyPageItem<WorkBuddyJobsStagesPendingItemsListResponse>>(
6745
+ params: WorkBuddyJobsStagesPendingItemsListParams,
6746
+ options?: WorkBuddyRequestOptions
6747
+ ): AsyncIterable<TItem>;
6748
+ /** Iterate raw pages by following cursor pagination for list(). */
6749
+ pages<TPage = WorkBuddyJobsStagesPendingItemsListResponse>(
6750
+ params: WorkBuddyJobsStagesPendingItemsListParams,
6751
+ options?: WorkBuddyRequestOptions
6752
+ ): AsyncIterable<TPage>;
6753
+ /**
6754
+ * Create one or more items awaiting approval.
6755
+ * Operation: PublicJobStagePendingItemController_create
6756
+ */
6757
+ create<TResponse = WorkBuddyJobsStagesPendingItemsCreateResponse>(
6758
+ params: WorkBuddyJobsStagesPendingItemsCreateParams,
6759
+ options?: WorkBuddyRequestOptions
6760
+ ): Promise<TResponse>;
6761
+
6762
+ /**
6763
+ * Get a specific pending item within a stage.
6764
+ * Operation: PublicJobStagePendingItemController_get
6765
+ */
6766
+ get<TResponse = WorkBuddyJobsStagesPendingItemsGetResponse>(
6767
+ params: WorkBuddyJobsStagesPendingItemsGetParams,
6768
+ options?: WorkBuddyRequestOptions
6769
+ ): Promise<TResponse>;
6770
+
6771
+ /**
6772
+ * Update general pending-item fields. Use the status route for itemStatus.
6773
+ * Operation: PublicJobStagePendingItemController_update
6774
+ */
6775
+ update<TResponse = WorkBuddyJobsStagesPendingItemsUpdateResponse>(
6776
+ params: WorkBuddyJobsStagesPendingItemsUpdateParams,
6777
+ options?: WorkBuddyRequestOptions
6778
+ ): Promise<TResponse>;
6779
+
6780
+ /**
6781
+ * Delete or decline a pending item according to tenant deletion settings.
6782
+ * Operation: PublicJobStagePendingItemController_delete
6783
+ */
6784
+ delete<TResponse = WorkBuddyJobsStagesPendingItemsDeleteResponse>(
6785
+ params: WorkBuddyJobsStagesPendingItemsDeleteParams,
6786
+ options?: WorkBuddyRequestOptions
6787
+ ): Promise<TResponse>;
6788
+ }
6789
+
6790
+ export interface WorkBuddyJobsStagesPendingItemsStatusResource {
6791
+ /**
6792
+ * Set the dedicated pending-item status. No general item fields are accepted.
6793
+ * Operation: PublicJobStagePendingItemController_updateStatus
6794
+ */
6795
+ updateStatus<TResponse = WorkBuddyJobsStagesPendingItemsStatusUpdateStatusResponse>(
6796
+ params: WorkBuddyJobsStagesPendingItemsStatusUpdateStatusParams,
6797
+ options?: WorkBuddyRequestOptions
6798
+ ): Promise<TResponse>;
6799
+ }
6800
+
6801
+ export interface WorkBuddyJobsStagesPendingItemsApproveResource {
6802
+ /**
6803
+ * Approve a pending item and promote it to a standard stage item.
6804
+ * Operation: PublicJobStagePendingItemController_approve
6805
+ */
6806
+ approve<TResponse = WorkBuddyJobsStagesPendingItemsApproveApproveResponse>(
6807
+ params: WorkBuddyJobsStagesPendingItemsApproveApproveParams,
6808
+ options?: WorkBuddyRequestOptions
6809
+ ): Promise<TResponse>;
6810
+ }
6811
+
6244
6812
  export interface WorkBuddyJobsStagesResourcesResource {
6245
6813
  /** Reissue API operations. */
6246
6814
  reissue: WorkBuddyJobsStagesResourcesReissueResource;
6247
6815
  /** Status API operations. */
6248
6816
  status: WorkBuddyJobsStagesResourcesStatusResource;
6249
6817
  /**
6250
- * Get all assigned resources for a stage.
6818
+ * List people assigned to the stage via this API: employees (resource rows) and the stage contractor when set. Contractors assigned with POST .../resources appear here with isContractor=true (same shape as the assign response) (WBS-10448). Login contacts auto-created for contractor dispatch are excluded.
6251
6819
  * Operation: PublicJobStageResourceController_list
6252
6820
  */
6253
6821
  list<TResponse = WorkBuddyJobsStagesResourcesListResponse>(
@@ -6265,7 +6833,7 @@ export interface WorkBuddyJobsStagesResourcesResource {
6265
6833
  options?: WorkBuddyRequestOptions
6266
6834
  ): AsyncIterable<TPage>;
6267
6835
  /**
6268
- * Assign a technician or contractor.
6836
+ * Assign an Employee or Subcontractor by contactId. Employee → resource row. Subcontractor → stage contractor (isContractor=true). Both appear on GET list (WBS-10448). contactId is a person Contact id (use /employees for staff), not a CRM Contact from /contacts (WBS-10445 / WBS-10442).
6269
6837
  * Operation: PublicJobStageResourceController_assign
6270
6838
  */
6271
6839
  assign<TResponse = WorkBuddyJobsStagesResourcesAssignResponse>(
@@ -6274,7 +6842,7 @@ export interface WorkBuddyJobsStagesResourcesResource {
6274
6842
  ): Promise<TResponse>;
6275
6843
 
6276
6844
  /**
6277
- * Get a specific resource assignment.
6845
+ * Get one assignment by id. Employee rows use the resource/contact id; the stage contractor uses the contractor contact id (same id as POST assign when isContractor=true) (WBS-10448).
6278
6846
  * Operation: PublicJobStageResourceController_get
6279
6847
  */
6280
6848
  get<TResponse = WorkBuddyJobsStagesResourcesGetResponse>(
@@ -6773,9 +7341,22 @@ export interface WorkBuddyItemsResource {
6773
7341
  ): Promise<TResponse>;
6774
7342
  }
6775
7343
 
7344
+ export interface WorkBuddyPendingItemsResource {
7345
+ /**
7346
+ * Find a pending stage item by its external integration ID.
7347
+ * Operation: PublicApiPendingItemController_list
7348
+ */
7349
+ list<TResponse = WorkBuddyPendingItemsListResponse>(
7350
+ params: WorkBuddyPendingItemsListParams,
7351
+ options?: WorkBuddyRequestOptions
7352
+ ): Promise<TResponse>;
7353
+ }
7354
+
6776
7355
  export interface WorkBuddyStagesResource {
6777
7356
  /** Complete API operations. */
6778
7357
  complete: WorkBuddyStagesCompleteResource;
7358
+ /** In Progress API operations. */
7359
+ inProgress: WorkBuddyStagesInProgressResource;
6779
7360
  /** Finalise API operations. */
6780
7361
  finalise: WorkBuddyStagesFinaliseResource;
6781
7362
  /** Cancel API operations. */
@@ -6825,7 +7406,7 @@ export interface WorkBuddyStagesResource {
6825
7406
 
6826
7407
  export interface WorkBuddyStagesCompleteResource {
6827
7408
  /**
6828
- * Mark a stage as completed. Field work is done but stage may still need finalisation/billing.
7409
+ * Mark a stage as completed. Field work is done but stage may still need finalisation/billing. Optional statusId selects a tenant Completed status from GET /settings/stage-statuses (systemStatus Completed); omit to use the system Completed status (MAI-2101).
6829
7410
  * Operation: PublicJobStageController_complete
6830
7411
  */
6831
7412
  complete<TResponse = WorkBuddyStagesCompleteCompleteResponse>(
@@ -6834,6 +7415,17 @@ export interface WorkBuddyStagesCompleteResource {
6834
7415
  ): Promise<TResponse>;
6835
7416
  }
6836
7417
 
7418
+ export interface WorkBuddyStagesInProgressResource {
7419
+ /**
7420
+ * Set the stage to an In Progress status. Pass statusId from GET /settings/stage-statuses with systemStatus In Progress (multiple peer statuses may share that systemStatus) (MAI-2101).
7421
+ * Operation: PublicJobStageController_inProgress
7422
+ */
7423
+ inProgress<TResponse = WorkBuddyStagesInProgressInProgressResponse>(
7424
+ params: WorkBuddyStagesInProgressInProgressParams,
7425
+ options?: WorkBuddyRequestOptions
7426
+ ): Promise<TResponse>;
7427
+ }
7428
+
6837
7429
  export interface WorkBuddyStagesFinaliseResource {
6838
7430
  /**
6839
7431
  * Finalise a completed stage. This typically indicates billing/invoicing is complete.
@@ -6926,7 +7518,7 @@ export interface WorkBuddySettingsResource {
6926
7518
 
6927
7519
  export interface WorkBuddySettingsEntityStatusesResource {
6928
7520
  /**
6929
- * Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user
7521
+ * Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user, pending-item
6930
7522
  * Operation: PublicApiEntityStatusController_list
6931
7523
  */
6932
7524
  list<TResponse = WorkBuddySettingsEntityStatusesListResponse>(
@@ -6981,7 +7573,7 @@ export interface WorkBuddySettingsPrioritiesResource {
6981
7573
 
6982
7574
  export interface WorkBuddySettingsPricebooksResource {
6983
7575
  /**
6984
- * Discover tenant pricebooks for a category (customer / contractor / supplier). Use category=customer&status=current&assignableOnly=true for job-create candidates. Optional accountId scopes to a CRM account (includeGlobal defaults true).
7576
+ * Discover tenant pricebooks for a category (customer / contractor / supplier). Use category=customer&status=current&assignableOnly=true for job-create candidates. Optional accountId scopes to a CRM account (includeGlobal defaults true). Each item includes company (owning company) and optional account — both match Settings UI fields.
6985
7577
  * Operation: PublicApiPriceBookController_list
6986
7578
  */
6987
7579
  list<TResponse = WorkBuddySettingsPricebooksListResponse>(
@@ -6990,7 +7582,7 @@ export interface WorkBuddySettingsPricebooksResource {
6990
7582
  ): Promise<TResponse>;
6991
7583
 
6992
7584
  /**
6993
- * Retrieve a pricebook by id (preferred) or exact name (case-insensitive). Pass category when the name may exist in more than one category.
7585
+ * Retrieve a pricebook by id (preferred) or exact name (case-insensitive). Pass category when the name may exist in more than one category. Response includes company (owning company) and optional account, matching Settings UI.
6994
7586
  * Operation: PublicApiPriceBookController_getByIdOrName
6995
7587
  */
6996
7588
  getByIdOrName<TResponse = WorkBuddySettingsPricebooksGetByIdOrNameResponse>(
@@ -7001,7 +7593,21 @@ export interface WorkBuddySettingsPricebooksResource {
7001
7593
 
7002
7594
  export interface WorkBuddySettingsStageStatusesResource {
7003
7595
  /**
7004
- * Retrieve all stage statuses configured for the tenant. Stage statuses represent the workflow states a stage (work order) can transition through (e.g., New, Dispatched, En Route, On Site, Completed, Finalised).
7596
+ * Retrieve all stage statuses configured for the tenant (Settings > Stage Status).
7597
+ Each item is a workflow state a stage (work order) can use (e.g. New, Dispatched, En Route, On Site, Completed, Finalised).
7598
+
7599
+ Response fields include:
7600
+ - identity: id, name, systemName, systemStatus, sortOrder
7601
+ - description (nullable)
7602
+ - activityOptions: shareWithCustomer, shareWithField (always present; unset = false)
7603
+ - displayOptions: showInContractorPortal, showInFieldApp (always present)
7604
+
7605
+ Display Options rules (match Settings UI):
7606
+ - Only systemStatus On Hold or In Progress support display options; other systemStatus values return both flags as false
7607
+ - showInFieldApp is not configurable for In Progress and is always false
7608
+ - When supported and not configured, visibility defaults to true (Settings UI default)
7609
+
7610
+ Requires scope: settings:read
7005
7611
  * Operation: PublicApiStageStatusController_list
7006
7612
  */
7007
7613
  list<TResponse = WorkBuddySettingsStageStatusesListResponse>(
@@ -7689,7 +8295,7 @@ export interface WorkBuddyCrmExternalUsersResource {
7689
8295
  options?: WorkBuddyRequestOptions
7690
8296
  ): AsyncIterable<TPage>;
7691
8297
  /**
7692
- * Get external user by ID
8298
+ * Login Contact (portal user). parents lists active parent accounts only; portal role is parents[].role.
7693
8299
  * Operation: PublicCrmExternalUserController_getById
7694
8300
  */
7695
8301
  get<TResponse = WorkBuddyCrmExternalUsersGetResponse>(
@@ -7720,7 +8326,7 @@ export interface WorkBuddyCrmContactsResource {
7720
8326
  options?: WorkBuddyRequestOptions
7721
8327
  ): AsyncIterable<TPage>;
7722
8328
  /**
7723
- * Get contact by ID
8329
+ * Returns a people contact (basic or Login Contact). parents lists active parent accounts only (inactive/soft-deleted omitted); portal role for Login Contacts is parents[].role.
7724
8330
  * Operation: PublicCrmContactController_getById
7725
8331
  */
7726
8332
  get<TResponse = WorkBuddyCrmContactsGetResponse>(
@@ -7779,8 +8385,10 @@ export interface WorkBuddyCrmInvitesResource {
7779
8385
  }
7780
8386
 
7781
8387
  export interface WorkBuddyCrmSitesResource {
8388
+ /** Contacts API operations. */
8389
+ contacts: WorkBuddyCrmSitesContactsResource;
7782
8390
  /**
7783
- * List all sites
8391
+ * List CRM sites for the tenant (Managed and Account only — Adhoc sites are excluded). Each item includes type (Managed | Account), optional primaryContact, and address. Optional search filters by site name/address tokens (space-separated words; all must match).
7784
8392
  * Operation: PublicCrmSiteController_list
7785
8393
  */
7786
8394
  list<TResponse = WorkBuddyCrmSitesListResponse>(
@@ -7798,7 +8406,7 @@ export interface WorkBuddyCrmSitesResource {
7798
8406
  options?: WorkBuddyRequestOptions
7799
8407
  ): AsyncIterable<TPage>;
7800
8408
  /**
7801
- * Get site by ID
8409
+ * Retrieve a CRM site by id (Managed or Account only). Adhoc sites are not exposed. Includes primaryContact when set (UI Primary Contact). type is CRM Site Type — not address.type.
7802
8410
  * Operation: PublicCrmSiteController_getById
7803
8411
  */
7804
8412
  get<TResponse = WorkBuddyCrmSitesGetResponse>(
@@ -7807,6 +8415,27 @@ export interface WorkBuddyCrmSitesResource {
7807
8415
  ): Promise<TResponse>;
7808
8416
  }
7809
8417
 
8418
+ export interface WorkBuddyCrmSitesContactsResource {
8419
+ /**
8420
+ * List contacts linked to this site (same pattern as GET /customers/{id}/contacts). Returns basic contacts and external users parented to the site.
8421
+ * Operation: PublicCrmSiteController_listContacts
8422
+ */
8423
+ list<TResponse = WorkBuddyCrmSitesContactsListResponse>(
8424
+ params: WorkBuddyCrmSitesContactsListParams,
8425
+ options?: WorkBuddyRequestOptions
8426
+ ): Promise<TResponse>;
8427
+ /** Iterate all items by following cursor pagination for list(). */
8428
+ all<TItem = WorkBuddyPageItem<WorkBuddyCrmSitesContactsListResponse>>(
8429
+ params: WorkBuddyCrmSitesContactsListParams,
8430
+ options?: WorkBuddyRequestOptions
8431
+ ): AsyncIterable<TItem>;
8432
+ /** Iterate raw pages by following cursor pagination for list(). */
8433
+ pages<TPage = WorkBuddyCrmSitesContactsListResponse>(
8434
+ params: WorkBuddyCrmSitesContactsListParams,
8435
+ options?: WorkBuddyRequestOptions
8436
+ ): AsyncIterable<TPage>;
8437
+ }
8438
+
7810
8439
  export interface WorkBuddyWebhooksResource {
7811
8440
  /** Entities API operations. */
7812
8441
  entities: WorkBuddyWebhooksEntitiesResource;