@workbuddy/n8n-nodes-workbuddy-vnext 1.0.83 → 1.0.85

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.
@@ -112,6 +112,14 @@ class WorkBuddy {
112
112
  name: 'Items',
113
113
  value: 'items',
114
114
  },
115
+ {
116
+ name: 'Pending Items',
117
+ value: 'pending-items',
118
+ },
119
+ {
120
+ name: 'Stages Pending Items',
121
+ value: 'stages-pending-items',
122
+ },
115
123
  {
116
124
  name: 'Stages',
117
125
  value: 'stages',
@@ -5310,18 +5318,6 @@ class WorkBuddy {
5310
5318
  name: 'Cancelled',
5311
5319
  value: 'Cancelled',
5312
5320
  },
5313
- {
5314
- name: 'Requested',
5315
- value: 'Requested',
5316
- },
5317
- {
5318
- name: 'Pending Review',
5319
- value: 'Pending Review',
5320
- },
5321
- {
5322
- name: 'Declined',
5323
- value: 'Declined',
5324
- },
5325
5321
  {
5326
5322
  name: 'Deleted',
5327
5323
  value: 'Deleted',
@@ -5369,22 +5365,697 @@ class WorkBuddy {
5369
5365
  },
5370
5366
  },
5371
5367
  {
5372
- displayName: 'Supplied By Subcontractor',
5373
- name: 'suppliedBySubcontractor',
5374
- type: 'boolean',
5375
- default: false,
5376
- description: '',
5377
- required: false,
5368
+ displayName: 'Supplied By Subcontractor',
5369
+ name: 'suppliedBySubcontractor',
5370
+ type: 'boolean',
5371
+ default: false,
5372
+ description: '',
5373
+ required: false,
5374
+ displayOptions: {
5375
+ show: {
5376
+ resource: ['jobs'],
5377
+ operation: ['PublicApiJobController_updateStageItem'],
5378
+ },
5379
+ },
5380
+ routing: {
5381
+ send: {
5382
+ type: 'body',
5383
+ property: 'suppliedBySubcontractor',
5384
+ },
5385
+ },
5386
+ },
5387
+ {
5388
+ displayName: 'Id',
5389
+ name: 'id',
5390
+ type: 'string',
5391
+ default: '',
5392
+ description: 'Job ID',
5393
+ required: true,
5394
+ displayOptions: {
5395
+ show: {
5396
+ resource: ['jobs'],
5397
+ operation: ['PublicApiJobController_deleteStageItem'],
5398
+ },
5399
+ },
5400
+ },
5401
+ {
5402
+ displayName: 'Stage Id',
5403
+ name: 'stageId',
5404
+ type: 'string',
5405
+ default: '',
5406
+ description: 'Stage ID',
5407
+ required: true,
5408
+ displayOptions: {
5409
+ show: {
5410
+ resource: ['jobs'],
5411
+ operation: ['PublicApiJobController_deleteStageItem'],
5412
+ },
5413
+ },
5414
+ },
5415
+ {
5416
+ displayName: 'Item Id',
5417
+ name: 'itemId',
5418
+ type: 'string',
5419
+ default: '',
5420
+ description: 'Item ID',
5421
+ required: true,
5422
+ displayOptions: {
5423
+ show: {
5424
+ resource: ['jobs'],
5425
+ operation: ['PublicApiJobController_deleteStageItem'],
5426
+ },
5427
+ },
5428
+ },
5429
+ // Items Operations
5430
+ {
5431
+ displayName: 'Operation',
5432
+ name: 'operation',
5433
+ type: 'options',
5434
+ noDataExpression: true,
5435
+ displayOptions: {
5436
+ show: {
5437
+ resource: ['items'],
5438
+ },
5439
+ },
5440
+ options: [
5441
+ {
5442
+ name: 'Find job line items',
5443
+ value: 'PublicApiJobLineItemController_list',
5444
+ action: 'Find a job line item by external integration ID.',
5445
+ description: 'Find a job line item by external integration ID.',
5446
+ routing: {
5447
+ request: {
5448
+ method: 'GET',
5449
+ url: '/api/v2/public/items',
5450
+ },
5451
+ },
5452
+ },
5453
+ ],
5454
+ default: 'PublicApiJobLineItemController_list',
5455
+ },
5456
+ {
5457
+ displayName: 'Integration Id',
5458
+ name: 'integrationId',
5459
+ type: 'string',
5460
+ default: '',
5461
+ description: 'External integration ID for the line item',
5462
+ required: true,
5463
+ displayOptions: {
5464
+ show: {
5465
+ resource: ['items'],
5466
+ operation: ['PublicApiJobLineItemController_list'],
5467
+ },
5468
+ },
5469
+ routing: {
5470
+ request: {
5471
+ qs: {
5472
+ integrationId: '={{$value}}',
5473
+ },
5474
+ },
5475
+ },
5476
+ },
5477
+ // Pending Items Operations
5478
+ {
5479
+ displayName: 'Operation',
5480
+ name: 'operation',
5481
+ type: 'options',
5482
+ noDataExpression: true,
5483
+ displayOptions: {
5484
+ show: {
5485
+ resource: ['pending-items'],
5486
+ },
5487
+ },
5488
+ options: [
5489
+ {
5490
+ name: 'Find a pending item',
5491
+ value: 'PublicApiPendingItemController_list',
5492
+ action: 'Find a pending stage item by its external integration ID.',
5493
+ description: 'Find a pending stage item by its external integration ID.',
5494
+ routing: {
5495
+ request: {
5496
+ method: 'GET',
5497
+ url: '/api/v2/public/pending-items',
5498
+ },
5499
+ },
5500
+ },
5501
+ ],
5502
+ default: 'PublicApiPendingItemController_list',
5503
+ },
5504
+ {
5505
+ displayName: 'Integration Id',
5506
+ name: 'integrationId',
5507
+ type: 'string',
5508
+ default: '',
5509
+ description: 'External integration ID for the pending item',
5510
+ required: true,
5511
+ displayOptions: {
5512
+ show: {
5513
+ resource: ['pending-items'],
5514
+ operation: ['PublicApiPendingItemController_list'],
5515
+ },
5516
+ },
5517
+ routing: {
5518
+ request: {
5519
+ qs: {
5520
+ integrationId: '={{$value}}',
5521
+ },
5522
+ },
5523
+ },
5524
+ },
5525
+ // Stages Pending Items Operations
5526
+ {
5527
+ displayName: 'Operation',
5528
+ name: 'operation',
5529
+ type: 'options',
5530
+ noDataExpression: true,
5531
+ displayOptions: {
5532
+ show: {
5533
+ resource: ['stages-pending-items'],
5534
+ },
5535
+ },
5536
+ options: [
5537
+ {
5538
+ name: 'List stage pending items',
5539
+ value: 'PublicJobStagePendingItemController_list',
5540
+ action: 'List items awaiting approval for a stage.',
5541
+ description: 'List items awaiting approval for a stage.',
5542
+ routing: {
5543
+ request: {
5544
+ method: 'GET',
5545
+ url: '/api/v2/public/jobs/={{ $parameter["id"] }}/stages/={{ $parameter["stageId"] }}/pending-items',
5546
+ },
5547
+ },
5548
+ },
5549
+ {
5550
+ name: 'Create stage pending items',
5551
+ value: 'PublicJobStagePendingItemController_create',
5552
+ action: 'Create one or more items awaiting approval.',
5553
+ description: 'Create one or more items awaiting approval.',
5554
+ routing: {
5555
+ request: {
5556
+ method: 'POST',
5557
+ url: '/api/v2/public/jobs/={{ $parameter["id"] }}/stages/={{ $parameter["stageId"] }}/pending-items',
5558
+ },
5559
+ },
5560
+ },
5561
+ {
5562
+ name: 'Get stage pending item',
5563
+ value: 'PublicJobStagePendingItemController_get',
5564
+ action: 'Get a specific pending item within a stage.',
5565
+ description: 'Get a specific pending item within a stage.',
5566
+ routing: {
5567
+ request: {
5568
+ method: 'GET',
5569
+ url: '/api/v2/public/jobs/={{ $parameter["id"] }}/stages/={{ $parameter["stageId"] }}/pending-items/={{ $parameter["itemId"] }}',
5570
+ },
5571
+ },
5572
+ },
5573
+ {
5574
+ name: 'Update stage pending item',
5575
+ value: 'PublicJobStagePendingItemController_update',
5576
+ action: 'Update general pending-item fields. Use the status route for itemStatus.',
5577
+ description: 'Update general pending-item fields. Use the status route for itemStatus.',
5578
+ routing: {
5579
+ request: {
5580
+ method: 'PATCH',
5581
+ url: '/api/v2/public/jobs/={{ $parameter["id"] }}/stages/={{ $parameter["stageId"] }}/pending-items/={{ $parameter["itemId"] }}',
5582
+ },
5583
+ },
5584
+ },
5585
+ {
5586
+ name: 'Delete stage pending item',
5587
+ value: 'PublicJobStagePendingItemController_delete',
5588
+ action: 'Delete or decline a pending item according to tenant deletion settings.',
5589
+ description: 'Delete or decline a pending item according to tenant deletion settings.',
5590
+ routing: {
5591
+ request: {
5592
+ method: 'DELETE',
5593
+ url: '/api/v2/public/jobs/={{ $parameter["id"] }}/stages/={{ $parameter["stageId"] }}/pending-items/={{ $parameter["itemId"] }}',
5594
+ },
5595
+ },
5596
+ },
5597
+ {
5598
+ name: 'Update pending-item status',
5599
+ value: 'PublicJobStagePendingItemController_updateStatus',
5600
+ action: 'Set the dedicated pending-item status. No general item fields are accepted.',
5601
+ description: 'Set the dedicated pending-item status. No general item fields are accepted.',
5602
+ routing: {
5603
+ request: {
5604
+ method: 'PATCH',
5605
+ url: '/api/v2/public/jobs/={{ $parameter["id"] }}/stages/={{ $parameter["stageId"] }}/pending-items/={{ $parameter["itemId"] }}/status',
5606
+ },
5607
+ },
5608
+ },
5609
+ {
5610
+ name: 'Approve stage pending item',
5611
+ value: 'PublicJobStagePendingItemController_approve',
5612
+ action: 'Approve a pending item and promote it to a standard stage item.',
5613
+ description: 'Approve a pending item and promote it to a standard stage item.',
5614
+ routing: {
5615
+ request: {
5616
+ method: 'POST',
5617
+ url: '/api/v2/public/jobs/={{ $parameter["id"] }}/stages/={{ $parameter["stageId"] }}/pending-items/={{ $parameter["itemId"] }}/approve',
5618
+ },
5619
+ },
5620
+ },
5621
+ ],
5622
+ default: 'PublicJobStagePendingItemController_list',
5623
+ },
5624
+ {
5625
+ displayName: 'Id',
5626
+ name: 'id',
5627
+ type: 'string',
5628
+ default: '',
5629
+ description: 'Job ID',
5630
+ required: true,
5631
+ displayOptions: {
5632
+ show: {
5633
+ resource: ['stages-pending-items'],
5634
+ operation: ['PublicJobStagePendingItemController_list'],
5635
+ },
5636
+ },
5637
+ },
5638
+ {
5639
+ displayName: 'Stage Id',
5640
+ name: 'stageId',
5641
+ type: 'string',
5642
+ default: '',
5643
+ description: 'Stage ID',
5644
+ required: true,
5645
+ displayOptions: {
5646
+ show: {
5647
+ resource: ['stages-pending-items'],
5648
+ operation: ['PublicJobStagePendingItemController_list'],
5649
+ },
5650
+ },
5651
+ },
5652
+ {
5653
+ displayName: 'Cursor',
5654
+ name: 'cursor',
5655
+ type: 'string',
5656
+ default: '',
5657
+ description: 'Pending item ID after which to continue',
5658
+ required: false,
5659
+ displayOptions: {
5660
+ show: {
5661
+ resource: ['stages-pending-items'],
5662
+ operation: ['PublicJobStagePendingItemController_list'],
5663
+ },
5664
+ },
5665
+ routing: {
5666
+ request: {
5667
+ qs: {
5668
+ cursor: '={{$value}}',
5669
+ },
5670
+ },
5671
+ },
5672
+ },
5673
+ {
5674
+ displayName: 'Limit',
5675
+ name: 'limit',
5676
+ type: 'number',
5677
+ default: '',
5678
+ description: 'Maximum results (1-200)',
5679
+ required: false,
5680
+ displayOptions: {
5681
+ show: {
5682
+ resource: ['stages-pending-items'],
5683
+ operation: ['PublicJobStagePendingItemController_list'],
5684
+ },
5685
+ },
5686
+ routing: {
5687
+ request: {
5688
+ qs: {
5689
+ limit: '={{$value}}',
5690
+ },
5691
+ },
5692
+ },
5693
+ },
5694
+ {
5695
+ displayName: 'Id',
5696
+ name: 'id',
5697
+ type: 'string',
5698
+ default: '',
5699
+ description: 'Job ID',
5700
+ required: true,
5701
+ displayOptions: {
5702
+ show: {
5703
+ resource: ['stages-pending-items'],
5704
+ operation: ['PublicJobStagePendingItemController_create'],
5705
+ },
5706
+ },
5707
+ },
5708
+ {
5709
+ displayName: 'Stage Id',
5710
+ name: 'stageId',
5711
+ type: 'string',
5712
+ default: '',
5713
+ description: 'Stage ID',
5714
+ required: true,
5715
+ displayOptions: {
5716
+ show: {
5717
+ resource: ['stages-pending-items'],
5718
+ operation: ['PublicJobStagePendingItemController_create'],
5719
+ },
5720
+ },
5721
+ },
5722
+ {
5723
+ displayName: 'Items',
5724
+ name: 'items',
5725
+ type: 'json',
5726
+ default: {},
5727
+ description: '',
5728
+ required: true,
5729
+ displayOptions: {
5730
+ show: {
5731
+ resource: ['stages-pending-items'],
5732
+ operation: ['PublicJobStagePendingItemController_create'],
5733
+ },
5734
+ },
5735
+ routing: {
5736
+ send: {
5737
+ type: 'body',
5738
+ property: 'items',
5739
+ },
5740
+ },
5741
+ },
5742
+ {
5743
+ displayName: 'Id',
5744
+ name: 'id',
5745
+ type: 'string',
5746
+ default: '',
5747
+ description: 'Job ID',
5748
+ required: true,
5749
+ displayOptions: {
5750
+ show: {
5751
+ resource: ['stages-pending-items'],
5752
+ operation: ['PublicJobStagePendingItemController_get'],
5753
+ },
5754
+ },
5755
+ },
5756
+ {
5757
+ displayName: 'Stage Id',
5758
+ name: 'stageId',
5759
+ type: 'string',
5760
+ default: '',
5761
+ description: 'Stage ID',
5762
+ required: true,
5763
+ displayOptions: {
5764
+ show: {
5765
+ resource: ['stages-pending-items'],
5766
+ operation: ['PublicJobStagePendingItemController_get'],
5767
+ },
5768
+ },
5769
+ },
5770
+ {
5771
+ displayName: 'Item Id',
5772
+ name: 'itemId',
5773
+ type: 'string',
5774
+ default: '',
5775
+ description: 'Pending item ID',
5776
+ required: true,
5777
+ displayOptions: {
5778
+ show: {
5779
+ resource: ['stages-pending-items'],
5780
+ operation: ['PublicJobStagePendingItemController_get'],
5781
+ },
5782
+ },
5783
+ },
5784
+ {
5785
+ displayName: 'Id',
5786
+ name: 'id',
5787
+ type: 'string',
5788
+ default: '',
5789
+ description: 'Job ID',
5790
+ required: true,
5791
+ displayOptions: {
5792
+ show: {
5793
+ resource: ['stages-pending-items'],
5794
+ operation: ['PublicJobStagePendingItemController_update'],
5795
+ },
5796
+ },
5797
+ },
5798
+ {
5799
+ displayName: 'Stage Id',
5800
+ name: 'stageId',
5801
+ type: 'string',
5802
+ default: '',
5803
+ description: 'Stage ID',
5804
+ required: true,
5805
+ displayOptions: {
5806
+ show: {
5807
+ resource: ['stages-pending-items'],
5808
+ operation: ['PublicJobStagePendingItemController_update'],
5809
+ },
5810
+ },
5811
+ },
5812
+ {
5813
+ displayName: 'Item Id',
5814
+ name: 'itemId',
5815
+ type: 'string',
5816
+ default: '',
5817
+ description: 'Pending item ID',
5818
+ required: true,
5819
+ displayOptions: {
5820
+ show: {
5821
+ resource: ['stages-pending-items'],
5822
+ operation: ['PublicJobStagePendingItemController_update'],
5823
+ },
5824
+ },
5825
+ },
5826
+ {
5827
+ displayName: 'Updated At',
5828
+ name: 'updatedAt',
5829
+ type: 'dateTime',
5830
+ default: '',
5831
+ description: 'For optimistic concurrency — update fails if entity was modified after this timestamp',
5832
+ required: false,
5833
+ displayOptions: {
5834
+ show: {
5835
+ resource: ['stages-pending-items'],
5836
+ operation: ['PublicJobStagePendingItemController_update'],
5837
+ },
5838
+ },
5839
+ routing: {
5840
+ send: {
5841
+ type: 'body',
5842
+ property: 'updatedAt',
5843
+ },
5844
+ },
5845
+ },
5846
+ {
5847
+ displayName: 'Quantity',
5848
+ name: 'quantity',
5849
+ type: 'number',
5850
+ default: 0,
5851
+ description: '',
5852
+ required: false,
5853
+ displayOptions: {
5854
+ show: {
5855
+ resource: ['stages-pending-items'],
5856
+ operation: ['PublicJobStagePendingItemController_update'],
5857
+ },
5858
+ },
5859
+ routing: {
5860
+ send: {
5861
+ type: 'body',
5862
+ property: 'quantity',
5863
+ },
5864
+ },
5865
+ },
5866
+ {
5867
+ displayName: 'Unit',
5868
+ name: 'unit',
5869
+ type: 'string',
5870
+ default: '',
5871
+ description: '',
5872
+ required: false,
5873
+ displayOptions: {
5874
+ show: {
5875
+ resource: ['stages-pending-items'],
5876
+ operation: ['PublicJobStagePendingItemController_update'],
5877
+ },
5878
+ },
5879
+ routing: {
5880
+ send: {
5881
+ type: 'body',
5882
+ property: 'unit',
5883
+ },
5884
+ },
5885
+ },
5886
+ {
5887
+ displayName: 'Location',
5888
+ name: 'location',
5889
+ type: 'string',
5890
+ default: '',
5891
+ description: '',
5892
+ required: false,
5893
+ displayOptions: {
5894
+ show: {
5895
+ resource: ['stages-pending-items'],
5896
+ operation: ['PublicJobStagePendingItemController_update'],
5897
+ },
5898
+ },
5899
+ routing: {
5900
+ send: {
5901
+ type: 'body',
5902
+ property: 'location',
5903
+ },
5904
+ },
5905
+ },
5906
+ {
5907
+ displayName: 'Note',
5908
+ name: 'note',
5909
+ type: 'string',
5910
+ default: '',
5911
+ description: '',
5912
+ required: false,
5913
+ displayOptions: {
5914
+ show: {
5915
+ resource: ['stages-pending-items'],
5916
+ operation: ['PublicJobStagePendingItemController_update'],
5917
+ },
5918
+ },
5919
+ routing: {
5920
+ send: {
5921
+ type: 'body',
5922
+ property: 'note',
5923
+ },
5924
+ },
5925
+ },
5926
+ {
5927
+ displayName: 'Buy Price',
5928
+ name: 'buyPrice',
5929
+ type: 'number',
5930
+ default: 0,
5931
+ description: '',
5932
+ required: false,
5933
+ displayOptions: {
5934
+ show: {
5935
+ resource: ['stages-pending-items'],
5936
+ operation: ['PublicJobStagePendingItemController_update'],
5937
+ },
5938
+ },
5939
+ routing: {
5940
+ send: {
5941
+ type: 'body',
5942
+ property: 'buyPrice',
5943
+ },
5944
+ },
5945
+ },
5946
+ {
5947
+ displayName: 'Sell Price',
5948
+ name: 'sellPrice',
5949
+ type: 'number',
5950
+ default: 0,
5951
+ description: '',
5952
+ required: false,
5953
+ displayOptions: {
5954
+ show: {
5955
+ resource: ['stages-pending-items'],
5956
+ operation: ['PublicJobStagePendingItemController_update'],
5957
+ },
5958
+ },
5959
+ routing: {
5960
+ send: {
5961
+ type: 'body',
5962
+ property: 'sellPrice',
5963
+ },
5964
+ },
5965
+ },
5966
+ {
5967
+ displayName: 'Invoicing Status',
5968
+ name: 'invoicingStatus',
5969
+ type: 'options',
5970
+ default: '',
5971
+ description: '',
5972
+ required: false,
5973
+ displayOptions: {
5974
+ show: {
5975
+ resource: ['stages-pending-items'],
5976
+ operation: ['PublicJobStagePendingItemController_update'],
5977
+ },
5978
+ },
5979
+ options: [
5980
+ {
5981
+ name: 'Billable',
5982
+ value: 'Billable',
5983
+ },
5984
+ {
5985
+ name: 'No Charge',
5986
+ value: 'No Charge',
5987
+ },
5988
+ {
5989
+ name: 'Not Billable',
5990
+ value: 'Not Billable',
5991
+ },
5992
+ ],
5993
+ routing: {
5994
+ send: {
5995
+ type: 'body',
5996
+ property: 'invoicingStatus',
5997
+ },
5998
+ },
5999
+ },
6000
+ {
6001
+ displayName: 'Supplied By Subcontractor',
6002
+ name: 'suppliedBySubcontractor',
6003
+ type: 'boolean',
6004
+ default: false,
6005
+ description: '',
6006
+ required: false,
6007
+ displayOptions: {
6008
+ show: {
6009
+ resource: ['stages-pending-items'],
6010
+ operation: ['PublicJobStagePendingItemController_update'],
6011
+ },
6012
+ },
6013
+ routing: {
6014
+ send: {
6015
+ type: 'body',
6016
+ property: 'suppliedBySubcontractor',
6017
+ },
6018
+ },
6019
+ },
6020
+ {
6021
+ displayName: 'Id',
6022
+ name: 'id',
6023
+ type: 'string',
6024
+ default: '',
6025
+ description: 'Job ID',
6026
+ required: true,
6027
+ displayOptions: {
6028
+ show: {
6029
+ resource: ['stages-pending-items'],
6030
+ operation: ['PublicJobStagePendingItemController_delete'],
6031
+ },
6032
+ },
6033
+ },
6034
+ {
6035
+ displayName: 'Stage Id',
6036
+ name: 'stageId',
6037
+ type: 'string',
6038
+ default: '',
6039
+ description: 'Stage ID',
6040
+ required: true,
6041
+ displayOptions: {
6042
+ show: {
6043
+ resource: ['stages-pending-items'],
6044
+ operation: ['PublicJobStagePendingItemController_delete'],
6045
+ },
6046
+ },
6047
+ },
6048
+ {
6049
+ displayName: 'Item Id',
6050
+ name: 'itemId',
6051
+ type: 'string',
6052
+ default: '',
6053
+ description: 'Pending item ID',
6054
+ required: true,
5378
6055
  displayOptions: {
5379
6056
  show: {
5380
- resource: ['jobs'],
5381
- operation: ['PublicApiJobController_updateStageItem'],
5382
- },
5383
- },
5384
- routing: {
5385
- send: {
5386
- type: 'body',
5387
- property: 'suppliedBySubcontractor',
6057
+ resource: ['stages-pending-items'],
6058
+ operation: ['PublicJobStagePendingItemController_delete'],
5388
6059
  },
5389
6060
  },
5390
6061
  },
@@ -5397,8 +6068,8 @@ class WorkBuddy {
5397
6068
  required: true,
5398
6069
  displayOptions: {
5399
6070
  show: {
5400
- resource: ['jobs'],
5401
- operation: ['PublicApiJobController_deleteStageItem'],
6071
+ resource: ['stages-pending-items'],
6072
+ operation: ['PublicJobStagePendingItemController_updateStatus'],
5402
6073
  },
5403
6074
  },
5404
6075
  },
@@ -5411,8 +6082,8 @@ class WorkBuddy {
5411
6082
  required: true,
5412
6083
  displayOptions: {
5413
6084
  show: {
5414
- resource: ['jobs'],
5415
- operation: ['PublicApiJobController_deleteStageItem'],
6085
+ resource: ['stages-pending-items'],
6086
+ operation: ['PublicJobStagePendingItemController_updateStatus'],
5416
6087
  },
5417
6088
  },
5418
6089
  },
@@ -5421,60 +6092,74 @@ class WorkBuddy {
5421
6092
  name: 'itemId',
5422
6093
  type: 'string',
5423
6094
  default: '',
5424
- description: 'Item ID',
6095
+ description: 'Pending item ID',
5425
6096
  required: true,
5426
6097
  displayOptions: {
5427
6098
  show: {
5428
- resource: ['jobs'],
5429
- operation: ['PublicApiJobController_deleteStageItem'],
6099
+ resource: ['stages-pending-items'],
6100
+ operation: ['PublicJobStagePendingItemController_updateStatus'],
5430
6101
  },
5431
6102
  },
5432
6103
  },
5433
- // Items Operations
5434
6104
  {
5435
- displayName: 'Operation',
5436
- name: 'operation',
5437
- type: 'options',
5438
- noDataExpression: true,
6105
+ displayName: 'Item Status Id',
6106
+ name: 'itemStatusId',
6107
+ type: 'string',
6108
+ default: '',
6109
+ description: 'item status ID',
6110
+ required: true,
5439
6111
  displayOptions: {
5440
6112
  show: {
5441
- resource: ['items'],
6113
+ resource: ['stages-pending-items'],
6114
+ operation: ['PublicJobStagePendingItemController_updateStatus'],
5442
6115
  },
5443
6116
  },
5444
- options: [
5445
- {
5446
- name: 'Find job line items',
5447
- value: 'PublicApiJobLineItemController_list',
5448
- action: 'Find a job line item by external integration ID.',
5449
- description: 'Find a job line item by external integration ID.',
5450
- routing: {
5451
- request: {
5452
- method: 'GET',
5453
- url: '/api/v2/public/items',
5454
- },
5455
- },
6117
+ routing: {
6118
+ send: {
6119
+ type: 'body',
6120
+ property: 'itemStatusId',
5456
6121
  },
5457
- ],
5458
- default: 'PublicApiJobLineItemController_list',
6122
+ },
5459
6123
  },
5460
6124
  {
5461
- displayName: 'Integration Id',
5462
- name: 'integrationId',
6125
+ displayName: 'Id',
6126
+ name: 'id',
5463
6127
  type: 'string',
5464
6128
  default: '',
5465
- description: 'External integration ID for the line item',
6129
+ description: 'Job ID',
5466
6130
  required: true,
5467
6131
  displayOptions: {
5468
6132
  show: {
5469
- resource: ['items'],
5470
- operation: ['PublicApiJobLineItemController_list'],
6133
+ resource: ['stages-pending-items'],
6134
+ operation: ['PublicJobStagePendingItemController_approve'],
5471
6135
  },
5472
6136
  },
5473
- routing: {
5474
- request: {
5475
- qs: {
5476
- integrationId: '={{$value}}',
5477
- },
6137
+ },
6138
+ {
6139
+ displayName: 'Stage Id',
6140
+ name: 'stageId',
6141
+ type: 'string',
6142
+ default: '',
6143
+ description: 'Stage ID',
6144
+ required: true,
6145
+ displayOptions: {
6146
+ show: {
6147
+ resource: ['stages-pending-items'],
6148
+ operation: ['PublicJobStagePendingItemController_approve'],
6149
+ },
6150
+ },
6151
+ },
6152
+ {
6153
+ displayName: 'Item Id',
6154
+ name: 'itemId',
6155
+ type: 'string',
6156
+ default: '',
6157
+ description: 'Pending item ID',
6158
+ required: true,
6159
+ displayOptions: {
6160
+ show: {
6161
+ resource: ['stages-pending-items'],
6162
+ operation: ['PublicJobStagePendingItemController_approve'],
5478
6163
  },
5479
6164
  },
5480
6165
  },
@@ -5541,8 +6226,8 @@ class WorkBuddy {
5541
6226
  {
5542
6227
  name: 'Complete a stage',
5543
6228
  value: 'PublicJobStageController_complete',
5544
- action: 'Mark a stage as completed. Field work is done but stage may still need finalisation/billing.',
5545
- description: 'Mark a stage as completed. Field work is done but stage may still need finalisation/billing.',
6229
+ action: '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).',
6230
+ description: '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).',
5546
6231
  routing: {
5547
6232
  request: {
5548
6233
  method: 'POST',
@@ -5550,6 +6235,18 @@ class WorkBuddy {
5550
6235
  },
5551
6236
  },
5552
6237
  },
6238
+ {
6239
+ name: 'Mark a stage in progress',
6240
+ value: 'PublicJobStageController_inProgress',
6241
+ action: '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).',
6242
+ description: '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).',
6243
+ routing: {
6244
+ request: {
6245
+ method: 'POST',
6246
+ url: '/api/v2/public/stages/={{ $parameter["id"] }}/in-progress',
6247
+ },
6248
+ },
6249
+ },
5553
6250
  {
5554
6251
  name: 'Finalise a stage',
5555
6252
  value: 'PublicJobStageController_finalise',
@@ -6027,6 +6724,26 @@ class WorkBuddy {
6027
6724
  },
6028
6725
  },
6029
6726
  },
6727
+ {
6728
+ displayName: 'Status Id',
6729
+ name: 'statusId',
6730
+ type: 'string',
6731
+ default: '',
6732
+ description: 'status ID',
6733
+ required: false,
6734
+ displayOptions: {
6735
+ show: {
6736
+ resource: ['stages'],
6737
+ operation: ['PublicJobStageController_complete'],
6738
+ },
6739
+ },
6740
+ routing: {
6741
+ send: {
6742
+ type: 'body',
6743
+ property: 'statusId',
6744
+ },
6745
+ },
6746
+ },
6030
6747
  {
6031
6748
  displayName: 'Completed Date',
6032
6749
  name: 'completedDate',
@@ -6067,6 +6784,60 @@ class WorkBuddy {
6067
6784
  },
6068
6785
  },
6069
6786
  },
6787
+ {
6788
+ displayName: 'Id',
6789
+ name: 'id',
6790
+ type: 'string',
6791
+ default: '',
6792
+ description: 'Stage ID',
6793
+ required: true,
6794
+ displayOptions: {
6795
+ show: {
6796
+ resource: ['stages'],
6797
+ operation: ['PublicJobStageController_inProgress'],
6798
+ },
6799
+ },
6800
+ },
6801
+ {
6802
+ displayName: 'Status Id',
6803
+ name: 'statusId',
6804
+ type: 'string',
6805
+ default: '',
6806
+ description: 'status ID',
6807
+ required: true,
6808
+ displayOptions: {
6809
+ show: {
6810
+ resource: ['stages'],
6811
+ operation: ['PublicJobStageController_inProgress'],
6812
+ },
6813
+ },
6814
+ routing: {
6815
+ send: {
6816
+ type: 'body',
6817
+ property: 'statusId',
6818
+ },
6819
+ },
6820
+ },
6821
+ {
6822
+ displayName: 'Note',
6823
+ name: 'note',
6824
+ type: 'string',
6825
+ default: '',
6826
+ description: '',
6827
+ required: false,
6828
+ displayOptions: {
6829
+ show: {
6830
+ resource: ['stages'],
6831
+ operation: ['PublicJobStageController_inProgress'],
6832
+ },
6833
+ },
6834
+ routing: {
6835
+ send: {
6836
+ type: 'body',
6837
+ property: 'note',
6838
+ },
6839
+ },
6840
+ },
6070
6841
  {
6071
6842
  displayName: 'Id',
6072
6843
  name: 'id',
@@ -6322,8 +7093,8 @@ class WorkBuddy {
6322
7093
  {
6323
7094
  name: 'List stage resources',
6324
7095
  value: 'PublicJobStageResourceController_list',
6325
- action: 'Get all assigned resources for a stage.',
6326
- description: 'Get all assigned resources for a stage.',
7096
+ action: '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.',
7097
+ description: '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.',
6327
7098
  routing: {
6328
7099
  request: {
6329
7100
  method: 'GET',
@@ -6334,8 +7105,8 @@ class WorkBuddy {
6334
7105
  {
6335
7106
  name: 'Assign resource to stage',
6336
7107
  value: 'PublicJobStageResourceController_assign',
6337
- action: 'Assign a technician or contractor.',
6338
- description: 'Assign a technician or contractor.',
7108
+ action: '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).',
7109
+ description: '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).',
6339
7110
  routing: {
6340
7111
  request: {
6341
7112
  method: 'POST',
@@ -6346,8 +7117,8 @@ class WorkBuddy {
6346
7117
  {
6347
7118
  name: 'Get stage resource',
6348
7119
  value: 'PublicJobStageResourceController_get',
6349
- action: 'Get a specific resource assignment.',
6350
- description: 'Get a specific resource assignment.',
7120
+ action: '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).',
7121
+ description: '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).',
6351
7122
  routing: {
6352
7123
  request: {
6353
7124
  method: 'GET',
@@ -6565,7 +7336,7 @@ class WorkBuddy {
6565
7336
  name: 'resourceId',
6566
7337
  type: 'string',
6567
7338
  default: '',
6568
- description: 'Resource ID',
7339
+ description: 'Resource or contractor contact ID',
6569
7340
  required: true,
6570
7341
  displayOptions: {
6571
7342
  show: {
@@ -6802,8 +7573,8 @@ class WorkBuddy {
6802
7573
  {
6803
7574
  name: 'List entity statuses',
6804
7575
  value: 'PublicApiEntityStatusController_list',
6805
- action: 'Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user',
6806
- description: 'Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user',
7576
+ action: 'Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user, pending-item',
7577
+ description: 'Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user, pending-item',
6807
7578
  routing: {
6808
7579
  request: {
6809
7580
  method: 'GET',
@@ -6862,8 +7633,8 @@ class WorkBuddy {
6862
7633
  {
6863
7634
  name: 'List pricebooks',
6864
7635
  value: 'PublicApiPriceBookController_list',
6865
- action: '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).',
6866
- description: '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).',
7636
+ action: '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.',
7637
+ description: '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.',
6867
7638
  routing: {
6868
7639
  request: {
6869
7640
  method: 'GET',
@@ -6874,8 +7645,8 @@ class WorkBuddy {
6874
7645
  {
6875
7646
  name: 'Get pricebook',
6876
7647
  value: 'PublicApiPriceBookController_getByIdOrName',
6877
- action: 'Retrieve a pricebook by id (preferred) or exact name (case-insensitive). Pass category when the name may exist in more than one category.',
6878
- description: 'Retrieve a pricebook by id (preferred) or exact name (case-insensitive). Pass category when the name may exist in more than one category.',
7648
+ action: '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.',
7649
+ description: '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.',
6879
7650
  routing: {
6880
7651
  request: {
6881
7652
  method: 'GET',
@@ -6886,8 +7657,8 @@ class WorkBuddy {
6886
7657
  {
6887
7658
  name: 'List stage statuses',
6888
7659
  value: 'PublicApiStageStatusController_list',
6889
- action: '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).',
6890
- description: '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).',
7660
+ action: 'Retrieve all stage statuses configured for the tenant (Settings > Stage Status).\nEach item is a workflow state a stage (work order) can use (e.g. New, Dispatched, En Route, On Site, Completed, Finalised).\n\nResponse fields include:\n- identity: id, name, systemName, systemStatus, sortOrder\n- description (nullable)\n- activityOptions: shareWithCustomer, shareWithField (always present; unset = false)\n- displayOptions: showInContractorPortal, showInFieldApp (always present)\n\nDisplay Options rules (match Settings UI):\n- Only systemStatus On Hold or In Progress support display options; other systemStatus values return both flags as false\n- showInFieldApp is not configurable for In Progress and is always false\n- When supported and not configured, visibility defaults to true (Settings UI default)\n\nRequires scope: settings:read',
7661
+ description: 'Retrieve all stage statuses configured for the tenant (Settings > Stage Status).\nEach item is a workflow state a stage (work order) can use (e.g. New, Dispatched, En Route, On Site, Completed, Finalised).\n\nResponse fields include:\n- identity: id, name, systemName, systemStatus, sortOrder\n- description (nullable)\n- activityOptions: shareWithCustomer, shareWithField (always present; unset = false)\n- displayOptions: showInContractorPortal, showInFieldApp (always present)\n\nDisplay Options rules (match Settings UI):\n- Only systemStatus On Hold or In Progress support display options; other systemStatus values return both flags as false\n- showInFieldApp is not configurable for In Progress and is always false\n- When supported and not configured, visibility defaults to true (Settings UI default)\n\nRequires scope: settings:read',
6891
7662
  routing: {
6892
7663
  request: {
6893
7664
  method: 'GET',
@@ -6963,7 +7734,7 @@ class WorkBuddy {
6963
7734
  name: 'entity',
6964
7735
  type: 'options',
6965
7736
  default: '',
6966
- description: 'Entity type (customer, contractor, supplier, contact, external-user)',
7737
+ description: 'Entity type (customer, contractor, supplier, contact, external-user, pending-item)',
6967
7738
  required: true,
6968
7739
  displayOptions: {
6969
7740
  show: {
@@ -6992,6 +7763,10 @@ class WorkBuddy {
6992
7763
  name: 'external-user',
6993
7764
  value: 'external-user',
6994
7765
  },
7766
+ {
7767
+ name: 'pending-item',
7768
+ value: 'pending-item',
7769
+ },
6995
7770
  ],
6996
7771
  },
6997
7772
  {
@@ -18600,8 +19375,8 @@ class WorkBuddy {
18600
19375
  {
18601
19376
  name: 'Get external user by ID',
18602
19377
  value: 'PublicCrmExternalUserController_getById',
18603
- action: '',
18604
- description: '',
19378
+ action: 'Login Contact (portal user). parents lists active parent accounts only; portal role is parents[].role.',
19379
+ description: 'Login Contact (portal user). parents lists active parent accounts only; portal role is parents[].role.',
18605
19380
  routing: {
18606
19381
  request: {
18607
19382
  method: 'GET',
@@ -18695,8 +19470,8 @@ class WorkBuddy {
18695
19470
  {
18696
19471
  name: 'Get contact by ID',
18697
19472
  value: 'PublicCrmContactController_getById',
18698
- action: '',
18699
- description: '',
19473
+ action: '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.',
19474
+ description: '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.',
18700
19475
  routing: {
18701
19476
  request: {
18702
19477
  method: 'GET',
@@ -19166,8 +19941,8 @@ class WorkBuddy {
19166
19941
  {
19167
19942
  name: 'List all sites',
19168
19943
  value: 'PublicCrmSiteController_list',
19169
- action: '',
19170
- description: '',
19944
+ action: '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).',
19945
+ description: '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).',
19171
19946
  routing: {
19172
19947
  request: {
19173
19948
  method: 'GET',
@@ -19178,8 +19953,8 @@ class WorkBuddy {
19178
19953
  {
19179
19954
  name: 'Get site by ID',
19180
19955
  value: 'PublicCrmSiteController_getById',
19181
- action: '',
19182
- description: '',
19956
+ action: '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.',
19957
+ description: '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.',
19183
19958
  routing: {
19184
19959
  request: {
19185
19960
  method: 'GET',
@@ -19187,9 +19962,42 @@ class WorkBuddy {
19187
19962
  },
19188
19963
  },
19189
19964
  },
19965
+ {
19966
+ name: 'List contacts for site',
19967
+ value: 'PublicCrmSiteController_listContacts',
19968
+ action: 'List contacts linked to this site (same pattern as GET /customers/{id}/contacts). Returns basic contacts and external users parented to the site.',
19969
+ description: 'List contacts linked to this site (same pattern as GET /customers/{id}/contacts). Returns basic contacts and external users parented to the site.',
19970
+ routing: {
19971
+ request: {
19972
+ method: 'GET',
19973
+ url: '/api/v2/public/sites/={{ $parameter["id"] }}/contacts',
19974
+ },
19975
+ },
19976
+ },
19190
19977
  ],
19191
19978
  default: 'PublicCrmSiteController_list',
19192
19979
  },
19980
+ {
19981
+ displayName: 'Search',
19982
+ name: 'search',
19983
+ type: 'string',
19984
+ default: '',
19985
+ description: 'Search by name/address (space-separated words; all must match as token prefixes)',
19986
+ required: false,
19987
+ displayOptions: {
19988
+ show: {
19989
+ resource: ['crm-sites'],
19990
+ operation: ['PublicCrmSiteController_list'],
19991
+ },
19992
+ },
19993
+ routing: {
19994
+ request: {
19995
+ qs: {
19996
+ search: '={{$value}}',
19997
+ },
19998
+ },
19999
+ },
20000
+ },
19193
20001
  {
19194
20002
  displayName: 'Status',
19195
20003
  name: 'status',
@@ -19267,6 +20075,62 @@ class WorkBuddy {
19267
20075
  },
19268
20076
  },
19269
20077
  },
20078
+ {
20079
+ displayName: 'Id',
20080
+ name: 'id',
20081
+ type: 'string',
20082
+ default: '',
20083
+ description: 'Site ID',
20084
+ required: true,
20085
+ displayOptions: {
20086
+ show: {
20087
+ resource: ['crm-sites'],
20088
+ operation: ['PublicCrmSiteController_listContacts'],
20089
+ },
20090
+ },
20091
+ },
20092
+ {
20093
+ displayName: 'Cursor',
20094
+ name: 'cursor',
20095
+ type: 'string',
20096
+ default: '',
20097
+ description: '',
20098
+ required: false,
20099
+ displayOptions: {
20100
+ show: {
20101
+ resource: ['crm-sites'],
20102
+ operation: ['PublicCrmSiteController_listContacts'],
20103
+ },
20104
+ },
20105
+ routing: {
20106
+ request: {
20107
+ qs: {
20108
+ cursor: '={{$value}}',
20109
+ },
20110
+ },
20111
+ },
20112
+ },
20113
+ {
20114
+ displayName: 'Limit',
20115
+ name: 'limit',
20116
+ type: 'number',
20117
+ default: '',
20118
+ description: '',
20119
+ required: false,
20120
+ displayOptions: {
20121
+ show: {
20122
+ resource: ['crm-sites'],
20123
+ operation: ['PublicCrmSiteController_listContacts'],
20124
+ },
20125
+ },
20126
+ routing: {
20127
+ request: {
20128
+ qs: {
20129
+ limit: '={{$value}}',
20130
+ },
20131
+ },
20132
+ },
20133
+ },
19270
20134
  // Webhooks V2 Operations
19271
20135
  {
19272
20136
  displayName: 'Operation',