@workbuddy/sdk-js-vnext 1.0.101 → 1.0.102

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 +242 -0
  2. package/index.js +42 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -844,8 +844,11 @@ export interface WorkBuddyJobsCreateParams extends WorkBuddyRequestParams {
844
844
  buyPrice?: number;
845
845
  sellPrice?: number;
846
846
  invoicingStatus?: 'Billable' | 'No Charge' | 'Not Billable';
847
+ payable?: boolean;
847
848
  suppliedBySubcontractor?: boolean;
848
849
  }[];
850
+
851
+ finance?: { nonBillable?: boolean; nonPayable?: boolean };
849
852
  }
850
853
 
851
854
  export interface WorkBuddyJobsTemplateCreateFromTemplateParams extends WorkBuddyRequestParams {
@@ -963,8 +966,24 @@ export interface WorkBuddyJobsTemplateCreateFromTemplateParams extends WorkBuddy
963
966
  buyPrice?: number;
964
967
  sellPrice?: number;
965
968
  invoicingStatus?: 'Billable' | 'No Charge' | 'Not Billable';
969
+ payable?: boolean;
966
970
  suppliedBySubcontractor?: boolean;
967
971
  }[];
972
+
973
+ finance?: { nonBillable?: boolean; nonPayable?: boolean };
974
+ }
975
+
976
+ export interface WorkBuddyJobsFinanceUpdateFinanceParams extends WorkBuddyRequestParams {
977
+ /**
978
+ * Job ID
979
+ */
980
+ id: string;
981
+
982
+ nonBillable?: boolean;
983
+
984
+ nonPayable?: boolean;
985
+
986
+ note?: string;
968
987
  }
969
988
 
970
989
  export interface WorkBuddyJobsStatusUpdateStatusParams extends WorkBuddyRequestParams {
@@ -1153,6 +1172,7 @@ export interface WorkBuddyJobsStagesItemsCreateStageItemsParams extends WorkBudd
1153
1172
  buyPrice?: number;
1154
1173
  sellPrice?: number;
1155
1174
  invoicingStatus?: 'Billable' | 'No Charge' | 'Not Billable';
1175
+ payable?: boolean;
1156
1176
  suppliedBySubcontractor?: boolean;
1157
1177
  }[];
1158
1178
  }
@@ -1208,6 +1228,8 @@ export interface WorkBuddyJobsStagesItemsUpdateStageItemParams extends WorkBuddy
1208
1228
 
1209
1229
  invoicingStatus?: 'Billable' | 'No Charge' | 'Not Billable';
1210
1230
 
1231
+ payable?: boolean;
1232
+
1211
1233
  suppliedBySubcontractor?: boolean;
1212
1234
  }
1213
1235
 
@@ -1409,6 +1431,21 @@ export interface WorkBuddyStagesCreateParams extends WorkBuddyRequestParams {
1409
1431
  * Custom fields as key-value pairs — validated against tenant field definitions
1410
1432
  */
1411
1433
  customFields?: Record<string, unknown>;
1434
+
1435
+ finance?: { nonBillable?: boolean; nonPayable?: boolean };
1436
+ }
1437
+
1438
+ export interface WorkBuddyStagesFinanceUpdateFinanceParams extends WorkBuddyRequestParams {
1439
+ /**
1440
+ * Stage ID
1441
+ */
1442
+ id: string;
1443
+
1444
+ nonBillable?: boolean;
1445
+
1446
+ nonPayable?: boolean;
1447
+
1448
+ note?: string;
1412
1449
  }
1413
1450
 
1414
1451
  export interface WorkBuddyStagesUpdateParams extends WorkBuddyRequestParams {
@@ -5726,16 +5763,19 @@ export type WorkBuddyJobsSearchResponse = {
5726
5763
  buyPrice?: number;
5727
5764
  sellPrice?: number;
5728
5765
  invoicingStatus?: string;
5766
+ payable: boolean;
5729
5767
  suppliedBySubcontractor: boolean;
5730
5768
  createdAt: string;
5731
5769
  updatedAt: string;
5732
5770
  }[];
5733
5771
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
5772
+ finance: { nonBillable: boolean; nonPayable: boolean };
5734
5773
  customFields?: string;
5735
5774
  createdAt: string;
5736
5775
  updatedAt: string;
5737
5776
  }[];
5738
5777
  totals?: { sellTotal: number; buyTotal: number };
5778
+ finance: { nonBillable: boolean; nonPayable: boolean };
5739
5779
  customFields?: string;
5740
5780
  dueDate?: string;
5741
5781
  startDate?: string;
@@ -5807,16 +5847,19 @@ export type WorkBuddyJobsGetResponse = {
5807
5847
  buyPrice?: number;
5808
5848
  sellPrice?: number;
5809
5849
  invoicingStatus?: string;
5850
+ payable: boolean;
5810
5851
  suppliedBySubcontractor: boolean;
5811
5852
  createdAt: string;
5812
5853
  updatedAt: string;
5813
5854
  }[];
5814
5855
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
5856
+ finance: { nonBillable: boolean; nonPayable: boolean };
5815
5857
  customFields?: string;
5816
5858
  createdAt: string;
5817
5859
  updatedAt: string;
5818
5860
  }[];
5819
5861
  totals?: { sellTotal: number; buyTotal: number };
5862
+ finance: { nonBillable: boolean; nonPayable: boolean };
5820
5863
  customFields?: string;
5821
5864
  dueDate?: string;
5822
5865
  startDate?: string;
@@ -5887,16 +5930,19 @@ export type WorkBuddyJobsCreateResponse = {
5887
5930
  buyPrice?: number;
5888
5931
  sellPrice?: number;
5889
5932
  invoicingStatus?: string;
5933
+ payable: boolean;
5890
5934
  suppliedBySubcontractor: boolean;
5891
5935
  createdAt: string;
5892
5936
  updatedAt: string;
5893
5937
  }[];
5894
5938
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
5939
+ finance: { nonBillable: boolean; nonPayable: boolean };
5895
5940
  customFields?: string;
5896
5941
  createdAt: string;
5897
5942
  updatedAt: string;
5898
5943
  }[];
5899
5944
  totals?: { sellTotal: number; buyTotal: number };
5945
+ finance: { nonBillable: boolean; nonPayable: boolean };
5900
5946
  customFields?: string;
5901
5947
  dueDate?: string;
5902
5948
  startDate?: string;
@@ -5966,22 +6012,108 @@ export type WorkBuddyJobsTemplateCreateFromTemplateResponse = {
5966
6012
  buyPrice?: number;
5967
6013
  sellPrice?: number;
5968
6014
  invoicingStatus?: string;
6015
+ payable: boolean;
5969
6016
  suppliedBySubcontractor: boolean;
5970
6017
  createdAt: string;
5971
6018
  updatedAt: string;
5972
6019
  }[];
5973
6020
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6021
+ finance: { nonBillable: boolean; nonPayable: boolean };
5974
6022
  customFields?: string;
5975
6023
  createdAt: string;
5976
6024
  updatedAt: string;
5977
6025
  }[];
5978
6026
  totals?: { sellTotal: number; buyTotal: number };
6027
+ finance: { nonBillable: boolean; nonPayable: boolean };
5979
6028
  customFields?: string;
5980
6029
  dueDate?: string;
5981
6030
  startDate?: string;
5982
6031
  createdAt: string;
5983
6032
  updatedAt: string;
5984
6033
  };
6034
+ export type WorkBuddyJobsFinanceUpdateFinanceResponse = {
6035
+ id: string;
6036
+ integrationId?: string;
6037
+ jobNumber: string;
6038
+ name?: string;
6039
+ description: string;
6040
+ status: { id?: string; name?: string; systemStatus: string };
6041
+ customer: { id: string; name: string };
6042
+ site?: string;
6043
+ contact?: string;
6044
+ customerSupervisor?: string;
6045
+ type?: string;
6046
+ priority?: string;
6047
+ owner?: string;
6048
+ fieldSupervisor?: string;
6049
+ zones?: { id: string; name: string }[];
6050
+ tags?: { id: string; name: string; color?: string }[];
6051
+ systemTags?: { id: string; name: string; color?: string }[];
6052
+ notes?: string;
6053
+ reference?: string;
6054
+ customerWO?: string;
6055
+ customerPO?: string;
6056
+ priceBook?: string;
6057
+ billingCompany?: string;
6058
+ policy?: string;
6059
+ thresholds?: string;
6060
+ stages?: {
6061
+ id: string;
6062
+ stageNumber: string;
6063
+ jobId: string;
6064
+ job?: { id: string; jobNumber: string; description?: string };
6065
+ name?: string;
6066
+ status: { id?: string; name?: string; systemStatus: string };
6067
+ sequence?: string;
6068
+ owner?: string;
6069
+ contractor?: string;
6070
+ pricebook?: string;
6071
+ resources?: string;
6072
+ startDate?: string;
6073
+ dueDate?: string;
6074
+ completedDate?: string;
6075
+ completedBy?: string;
6076
+ completedNote?: string;
6077
+ finalisedDate?: string;
6078
+ tags?: string;
6079
+ systemTags?: string;
6080
+ schedulingTags?: string;
6081
+ items?: {
6082
+ id: string;
6083
+ jobId: string;
6084
+ stageId: string;
6085
+ integrationId?: string;
6086
+ code?: string;
6087
+ description: string;
6088
+ type?: string;
6089
+ quantity: number;
6090
+ unit?: string;
6091
+ location?: string;
6092
+ note?: string;
6093
+ status?: string;
6094
+ buyPrice?: number;
6095
+ sellPrice?: number;
6096
+ invoicingStatus?: string;
6097
+ payable: boolean;
6098
+ suppliedBySubcontractor: boolean;
6099
+ createdAt: string;
6100
+ updatedAt: string;
6101
+ }[];
6102
+ totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6103
+ finance: { nonBillable: boolean; nonPayable: boolean };
6104
+ customFields?: string;
6105
+ createdAt: string;
6106
+ updatedAt: string;
6107
+ }[];
6108
+ totals?: { sellTotal: number; buyTotal: number };
6109
+ finance: { nonBillable: boolean; nonPayable: boolean };
6110
+ customFields?: string;
6111
+ dueDate?: string;
6112
+ startDate?: string;
6113
+ createdAt: string;
6114
+ updatedAt: string;
6115
+ summary: { itemsUpdated: number; itemsSkipped: number; draftDocumentsDeleted: number; stagesMarked: number };
6116
+ };
5985
6117
  export type WorkBuddyJobsStatusUpdateStatusResponse = {
5986
6118
  id: string;
5987
6119
  integrationId?: string;
@@ -6045,16 +6177,19 @@ export type WorkBuddyJobsStatusUpdateStatusResponse = {
6045
6177
  buyPrice?: number;
6046
6178
  sellPrice?: number;
6047
6179
  invoicingStatus?: string;
6180
+ payable: boolean;
6048
6181
  suppliedBySubcontractor: boolean;
6049
6182
  createdAt: string;
6050
6183
  updatedAt: string;
6051
6184
  }[];
6052
6185
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6186
+ finance: { nonBillable: boolean; nonPayable: boolean };
6053
6187
  customFields?: string;
6054
6188
  createdAt: string;
6055
6189
  updatedAt: string;
6056
6190
  }[];
6057
6191
  totals?: { sellTotal: number; buyTotal: number };
6192
+ finance: { nonBillable: boolean; nonPayable: boolean };
6058
6193
  customFields?: string;
6059
6194
  dueDate?: string;
6060
6195
  startDate?: string;
@@ -6124,16 +6259,19 @@ export type WorkBuddyJobsUpdateResponse = {
6124
6259
  buyPrice?: number;
6125
6260
  sellPrice?: number;
6126
6261
  invoicingStatus?: string;
6262
+ payable: boolean;
6127
6263
  suppliedBySubcontractor: boolean;
6128
6264
  createdAt: string;
6129
6265
  updatedAt: string;
6130
6266
  }[];
6131
6267
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6268
+ finance: { nonBillable: boolean; nonPayable: boolean };
6132
6269
  customFields?: string;
6133
6270
  createdAt: string;
6134
6271
  updatedAt: string;
6135
6272
  }[];
6136
6273
  totals?: { sellTotal: number; buyTotal: number };
6274
+ finance: { nonBillable: boolean; nonPayable: boolean };
6137
6275
  customFields?: string;
6138
6276
  dueDate?: string;
6139
6277
  startDate?: string;
@@ -6203,16 +6341,19 @@ export type WorkBuddyJobsDispatchResponse = {
6203
6341
  buyPrice?: number;
6204
6342
  sellPrice?: number;
6205
6343
  invoicingStatus?: string;
6344
+ payable: boolean;
6206
6345
  suppliedBySubcontractor: boolean;
6207
6346
  createdAt: string;
6208
6347
  updatedAt: string;
6209
6348
  }[];
6210
6349
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6350
+ finance: { nonBillable: boolean; nonPayable: boolean };
6211
6351
  customFields?: string;
6212
6352
  createdAt: string;
6213
6353
  updatedAt: string;
6214
6354
  }[];
6215
6355
  totals?: { sellTotal: number; buyTotal: number };
6356
+ finance: { nonBillable: boolean; nonPayable: boolean };
6216
6357
  customFields?: string;
6217
6358
  dueDate?: string;
6218
6359
  startDate?: string;
@@ -6273,11 +6414,13 @@ export type WorkBuddyJobsStagesGetJobStageResponse = {
6273
6414
  buyPrice?: number;
6274
6415
  sellPrice?: number;
6275
6416
  invoicingStatus?: string;
6417
+ payable: boolean;
6276
6418
  suppliedBySubcontractor: boolean;
6277
6419
  createdAt: string;
6278
6420
  updatedAt: string;
6279
6421
  }[];
6280
6422
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6423
+ finance: { nonBillable: boolean; nonPayable: boolean };
6281
6424
  customFields?: string;
6282
6425
  createdAt: string;
6283
6426
  updatedAt: string;
@@ -6299,6 +6442,7 @@ export type WorkBuddyJobsStagesItemsListResponse = {
6299
6442
  buyPrice?: number;
6300
6443
  sellPrice?: number;
6301
6444
  invoicingStatus?: string;
6445
+ payable: boolean;
6302
6446
  suppliedBySubcontractor: boolean;
6303
6447
  createdAt: string;
6304
6448
  updatedAt: string;
@@ -6322,6 +6466,7 @@ export type WorkBuddyJobsStagesItemsCreateStageItemsResponse = {
6322
6466
  buyPrice?: number;
6323
6467
  sellPrice?: number;
6324
6468
  invoicingStatus?: string;
6469
+ payable: boolean;
6325
6470
  suppliedBySubcontractor: boolean;
6326
6471
  createdAt: string;
6327
6472
  updatedAt: string;
@@ -6343,6 +6488,7 @@ export type WorkBuddyJobsStagesItemsGetStageItemResponse = {
6343
6488
  buyPrice?: number;
6344
6489
  sellPrice?: number;
6345
6490
  invoicingStatus?: string;
6491
+ payable: boolean;
6346
6492
  suppliedBySubcontractor: boolean;
6347
6493
  createdAt: string;
6348
6494
  updatedAt: string;
@@ -6363,6 +6509,7 @@ export type WorkBuddyJobsStagesItemsUpdateStageItemResponse = {
6363
6509
  buyPrice?: number;
6364
6510
  sellPrice?: number;
6365
6511
  invoicingStatus?: string;
6512
+ payable: boolean;
6366
6513
  suppliedBySubcontractor: boolean;
6367
6514
  createdAt: string;
6368
6515
  updatedAt: string;
@@ -6385,6 +6532,7 @@ export type WorkBuddyItemsListResponse = {
6385
6532
  buyPrice?: number;
6386
6533
  sellPrice?: number;
6387
6534
  invoicingStatus?: string;
6535
+ payable: boolean;
6388
6536
  suppliedBySubcontractor: boolean;
6389
6537
  createdAt: string;
6390
6538
  updatedAt: string;
@@ -6536,6 +6684,7 @@ export type WorkBuddyJobsStagesPendingItemsApproveApproveResponse = {
6536
6684
  buyPrice?: number;
6537
6685
  sellPrice?: number;
6538
6686
  invoicingStatus?: string;
6687
+ payable: boolean;
6539
6688
  suppliedBySubcontractor: boolean;
6540
6689
  createdAt: string;
6541
6690
  updatedAt: string;
@@ -6577,15 +6726,66 @@ export type WorkBuddyStagesCreateResponse = {
6577
6726
  buyPrice?: number;
6578
6727
  sellPrice?: number;
6579
6728
  invoicingStatus?: string;
6729
+ payable: boolean;
6580
6730
  suppliedBySubcontractor: boolean;
6581
6731
  createdAt: string;
6582
6732
  updatedAt: string;
6583
6733
  }[];
6584
6734
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6735
+ finance: { nonBillable: boolean; nonPayable: boolean };
6585
6736
  customFields?: string;
6586
6737
  createdAt: string;
6587
6738
  updatedAt: string;
6588
6739
  };
6740
+ export type WorkBuddyStagesFinanceUpdateFinanceResponse = {
6741
+ id: string;
6742
+ stageNumber: string;
6743
+ jobId: string;
6744
+ job?: { id: string; jobNumber: string; description?: string };
6745
+ name?: string;
6746
+ status: { id?: string; name?: string; systemStatus: string };
6747
+ sequence?: string;
6748
+ owner?: string;
6749
+ contractor?: string;
6750
+ pricebook?: string;
6751
+ resources?: string;
6752
+ startDate?: string;
6753
+ dueDate?: string;
6754
+ completedDate?: string;
6755
+ completedBy?: string;
6756
+ completedNote?: string;
6757
+ finalisedDate?: string;
6758
+ tags?: string;
6759
+ systemTags?: string;
6760
+ schedulingTags?: string;
6761
+ items?: {
6762
+ id: string;
6763
+ jobId: string;
6764
+ stageId: string;
6765
+ integrationId?: string;
6766
+ code?: string;
6767
+ description: string;
6768
+ type?: string;
6769
+ quantity: number;
6770
+ unit?: string;
6771
+ location?: string;
6772
+ note?: string;
6773
+ status?: string;
6774
+ buyPrice?: number;
6775
+ sellPrice?: number;
6776
+ invoicingStatus?: string;
6777
+ payable: boolean;
6778
+ suppliedBySubcontractor: boolean;
6779
+ createdAt: string;
6780
+ updatedAt: string;
6781
+ }[];
6782
+ totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6783
+ finance: { nonBillable: boolean; nonPayable: boolean };
6784
+ customFields?: string;
6785
+ createdAt: string;
6786
+ updatedAt: string;
6787
+ summary: { itemsUpdated: number; itemsSkipped: number; draftDocumentsDeleted: number; stagesMarked: number };
6788
+ };
6589
6789
  export type WorkBuddyStagesUpdateResponse = {
6590
6790
  id: string;
6591
6791
  stageNumber: string;
@@ -6623,11 +6823,13 @@ export type WorkBuddyStagesUpdateResponse = {
6623
6823
  buyPrice?: number;
6624
6824
  sellPrice?: number;
6625
6825
  invoicingStatus?: string;
6826
+ payable: boolean;
6626
6827
  suppliedBySubcontractor: boolean;
6627
6828
  createdAt: string;
6628
6829
  updatedAt: string;
6629
6830
  }[];
6630
6831
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6832
+ finance: { nonBillable: boolean; nonPayable: boolean };
6631
6833
  customFields?: string;
6632
6834
  createdAt: string;
6633
6835
  updatedAt: string;
@@ -6670,11 +6872,13 @@ export type WorkBuddyStagesDispatchResponse = {
6670
6872
  buyPrice?: number;
6671
6873
  sellPrice?: number;
6672
6874
  invoicingStatus?: string;
6875
+ payable: boolean;
6673
6876
  suppliedBySubcontractor: boolean;
6674
6877
  createdAt: string;
6675
6878
  updatedAt: string;
6676
6879
  }[];
6677
6880
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6881
+ finance: { nonBillable: boolean; nonPayable: boolean };
6678
6882
  customFields?: string;
6679
6883
  createdAt: string;
6680
6884
  updatedAt: string;
@@ -6716,11 +6920,13 @@ export type WorkBuddyStagesCompleteCompleteResponse = {
6716
6920
  buyPrice?: number;
6717
6921
  sellPrice?: number;
6718
6922
  invoicingStatus?: string;
6923
+ payable: boolean;
6719
6924
  suppliedBySubcontractor: boolean;
6720
6925
  createdAt: string;
6721
6926
  updatedAt: string;
6722
6927
  }[];
6723
6928
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6929
+ finance: { nonBillable: boolean; nonPayable: boolean };
6724
6930
  customFields?: string;
6725
6931
  createdAt: string;
6726
6932
  updatedAt: string;
@@ -6762,11 +6968,13 @@ export type WorkBuddyStagesInProgressInProgressResponse = {
6762
6968
  buyPrice?: number;
6763
6969
  sellPrice?: number;
6764
6970
  invoicingStatus?: string;
6971
+ payable: boolean;
6765
6972
  suppliedBySubcontractor: boolean;
6766
6973
  createdAt: string;
6767
6974
  updatedAt: string;
6768
6975
  }[];
6769
6976
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
6977
+ finance: { nonBillable: boolean; nonPayable: boolean };
6770
6978
  customFields?: string;
6771
6979
  createdAt: string;
6772
6980
  updatedAt: string;
@@ -6808,11 +7016,13 @@ export type WorkBuddyStagesFinaliseFinaliseResponse = {
6808
7016
  buyPrice?: number;
6809
7017
  sellPrice?: number;
6810
7018
  invoicingStatus?: string;
7019
+ payable: boolean;
6811
7020
  suppliedBySubcontractor: boolean;
6812
7021
  createdAt: string;
6813
7022
  updatedAt: string;
6814
7023
  }[];
6815
7024
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
7025
+ finance: { nonBillable: boolean; nonPayable: boolean };
6816
7026
  customFields?: string;
6817
7027
  createdAt: string;
6818
7028
  updatedAt: string;
@@ -6854,11 +7064,13 @@ export type WorkBuddyStagesCancelCancelResponse = {
6854
7064
  buyPrice?: number;
6855
7065
  sellPrice?: number;
6856
7066
  invoicingStatus?: string;
7067
+ payable: boolean;
6857
7068
  suppliedBySubcontractor: boolean;
6858
7069
  createdAt: string;
6859
7070
  updatedAt: string;
6860
7071
  }[];
6861
7072
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
7073
+ finance: { nonBillable: boolean; nonPayable: boolean };
6862
7074
  customFields?: string;
6863
7075
  createdAt: string;
6864
7076
  updatedAt: string;
@@ -6900,11 +7112,13 @@ export type WorkBuddyStagesOnHoldOnHoldResponse = {
6900
7112
  buyPrice?: number;
6901
7113
  sellPrice?: number;
6902
7114
  invoicingStatus?: string;
7115
+ payable: boolean;
6903
7116
  suppliedBySubcontractor: boolean;
6904
7117
  createdAt: string;
6905
7118
  updatedAt: string;
6906
7119
  }[];
6907
7120
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
7121
+ finance: { nonBillable: boolean; nonPayable: boolean };
6908
7122
  customFields?: string;
6909
7123
  createdAt: string;
6910
7124
  updatedAt: string;
@@ -6946,11 +7160,13 @@ export type WorkBuddyStagesReverseReverseResponse = {
6946
7160
  buyPrice?: number;
6947
7161
  sellPrice?: number;
6948
7162
  invoicingStatus?: string;
7163
+ payable: boolean;
6949
7164
  suppliedBySubcontractor: boolean;
6950
7165
  createdAt: string;
6951
7166
  updatedAt: string;
6952
7167
  }[];
6953
7168
  totals?: { sellTotal: number; buyTotal: number; pendingSellTotal: number; pendingBuyTotal: number };
7169
+ finance: { nonBillable: boolean; nonPayable: boolean };
6954
7170
  customFields?: string;
6955
7171
  createdAt: string;
6956
7172
  updatedAt: string;
@@ -13004,6 +13220,8 @@ export type WorkBuddyMcpDeleteResponse = unknown;
13004
13220
  export interface WorkBuddyJobsResource {
13005
13221
  /** Template API operations. */
13006
13222
  template: WorkBuddyJobsTemplateResource;
13223
+ /** Finance API operations. */
13224
+ finance: WorkBuddyJobsFinanceResource;
13007
13225
  /** Status API operations. */
13008
13226
  status: WorkBuddyJobsStatusResource;
13009
13227
  /** Stages API operations. */
@@ -13091,6 +13309,17 @@ export interface WorkBuddyJobsTemplateResource {
13091
13309
  ): Promise<TResponse>;
13092
13310
  }
13093
13311
 
13312
+ export interface WorkBuddyJobsFinanceResource {
13313
+ /**
13314
+ * Mark or unmark a job Non-Billable and/or Non-Payable. Dispatches the domain finance-lock command once per changed side. Same value is a no-op. Requires jobs:financial.
13315
+ * Operation: PublicApiJobController_updateFinance
13316
+ */
13317
+ updateFinance<TResponse = WorkBuddyJobsFinanceUpdateFinanceResponse>(
13318
+ params: WorkBuddyJobsFinanceUpdateFinanceParams,
13319
+ options?: WorkBuddyRequestOptions
13320
+ ): Promise<TResponse>;
13321
+ }
13322
+
13094
13323
  export interface WorkBuddyJobsStatusResource {
13095
13324
  /**
13096
13325
  * Change an existing job status and cascade the change to stages through the job domain command.
@@ -13834,6 +14063,8 @@ export interface WorkBuddyPendingItemsResource {
13834
14063
  }
13835
14064
 
13836
14065
  export interface WorkBuddyStagesResource {
14066
+ /** Finance API operations. */
14067
+ finance: WorkBuddyStagesFinanceResource;
13837
14068
  /** Complete API operations. */
13838
14069
  complete: WorkBuddyStagesCompleteResource;
13839
14070
  /** In Progress API operations. */
@@ -13885,6 +14116,17 @@ export interface WorkBuddyStagesResource {
13885
14116
  ): Promise<TResponse>;
13886
14117
  }
13887
14118
 
14119
+ export interface WorkBuddyStagesFinanceResource {
14120
+ /**
14121
+ * Mark or unmark a stage Non-Billable and/or Non-Payable. Dispatches the domain finance-lock command once per changed side. Same value is a no-op. Unmarking a stage while the job holds that mark is refused. Requires jobs:financial.
14122
+ * Operation: PublicJobStageController_updateFinance
14123
+ */
14124
+ updateFinance<TResponse = WorkBuddyStagesFinanceUpdateFinanceResponse>(
14125
+ params: WorkBuddyStagesFinanceUpdateFinanceParams,
14126
+ options?: WorkBuddyRequestOptions
14127
+ ): Promise<TResponse>;
14128
+ }
14129
+
13888
14130
  export interface WorkBuddyStagesCompleteResource {
13889
14131
  /**
13890
14132
  * 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).
package/index.js CHANGED
@@ -42,6 +42,14 @@ export class WorkBuddyClient {
42
42
  createFromTemplate: (params = {}, options = {}) =>
43
43
  this.request('PublicApiJobController_createFromTemplate', params, options),
44
44
  },
45
+ finance: {
46
+ /**
47
+ * Mark or unmark a job Non-Billable and/or Non-Payable. Dispatches the domain finance-lock command once per changed side. Same value is a no-op. Requires jobs:financial.
48
+ * Operation: PublicApiJobController_updateFinance
49
+ */
50
+ updateFinance: (params = {}, options = {}) =>
51
+ this.request('PublicApiJobController_updateFinance', params, options),
52
+ },
45
53
  status: {
46
54
  /**
47
55
  * Change an existing job status and cascade the change to stages through the job domain command.
@@ -525,6 +533,14 @@ export class WorkBuddyClient {
525
533
  };
526
534
 
527
535
  this.stages = {
536
+ finance: {
537
+ /**
538
+ * Mark or unmark a stage Non-Billable and/or Non-Payable. Dispatches the domain finance-lock command once per changed side. Same value is a no-op. Unmarking a stage while the job holds that mark is refused. Requires jobs:financial.
539
+ * Operation: PublicJobStageController_updateFinance
540
+ */
541
+ updateFinance: (params = {}, options = {}) =>
542
+ this.request('PublicJobStageController_updateFinance', params, options),
543
+ },
528
544
  complete: {
529
545
  /**
530
546
  * 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).
@@ -1683,6 +1699,19 @@ export const operations = [
1683
1699
  queryParams: [],
1684
1700
  hasRequestBody: true,
1685
1701
  },
1702
+ {
1703
+ operationId: 'PublicApiJobController_updateFinance',
1704
+ resourcePath: ['jobs', 'finance'],
1705
+ actionName: 'updateFinance',
1706
+ displayName: 'Set job finance marks',
1707
+ description:
1708
+ 'Mark or unmark a job Non-Billable and/or Non-Payable. Dispatches the domain finance-lock command once per changed side. Same value is a no-op. Requires jobs:financial.',
1709
+ method: 'PATCH',
1710
+ path: '/jobs/{id}/finance',
1711
+ pathParams: ['id'],
1712
+ queryParams: [],
1713
+ hasRequestBody: true,
1714
+ },
1686
1715
  {
1687
1716
  operationId: 'PublicApiJobController_updateStatus',
1688
1717
  resourcePath: ['jobs', 'status'],
@@ -1929,6 +1958,19 @@ export const operations = [
1929
1958
  queryParams: [],
1930
1959
  hasRequestBody: true,
1931
1960
  },
1961
+ {
1962
+ operationId: 'PublicJobStageController_updateFinance',
1963
+ resourcePath: ['stages', 'finance'],
1964
+ actionName: 'updateFinance',
1965
+ displayName: 'Set stage finance marks',
1966
+ description:
1967
+ 'Mark or unmark a stage Non-Billable and/or Non-Payable. Dispatches the domain finance-lock command once per changed side. Same value is a no-op. Unmarking a stage while the job holds that mark is refused. Requires jobs:financial.',
1968
+ method: 'PATCH',
1969
+ path: '/stages/{id}/finance',
1970
+ pathParams: ['id'],
1971
+ queryParams: [],
1972
+ hasRequestBody: true,
1973
+ },
1932
1974
  {
1933
1975
  operationId: 'PublicJobStageController_update',
1934
1976
  resourcePath: ['stages'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workbuddy/sdk-js-vnext",
3
- "version": "1.0.101",
3
+ "version": "1.0.102",
4
4
  "description": "WorkBuddy Public API JavaScript client",
5
5
  "license": "MIT",
6
6
  "type": "module",