@workbuddy/cli-vnext 1.0.7 → 1.0.9

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 (2) hide show
  1. package/dist/index.js +690 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3452,6 +3452,220 @@ var operations = [
3452
3452
  required: false,
3453
3453
  description: "Custom fields as key-value pairs — validated against tenant field definitions"
3454
3454
  },
3455
+ {
3456
+ name: "items",
3457
+ cliName: "items",
3458
+ optionKey: "items",
3459
+ source: "body",
3460
+ type: "array",
3461
+ required: false,
3462
+ description: ""
3463
+ },
3464
+ {
3465
+ name: "raw-body",
3466
+ cliName: "raw-body",
3467
+ optionKey: "rawBody",
3468
+ source: "body",
3469
+ type: "object",
3470
+ required: false,
3471
+ description: "Raw request body JSON (overrides individual fields)"
3472
+ }
3473
+ ],
3474
+ hasRequestBody: true,
3475
+ responseFields: [
3476
+ {
3477
+ name: "id",
3478
+ type: "string",
3479
+ description: "Entity ID"
3480
+ },
3481
+ {
3482
+ name: "integrationId",
3483
+ type: "string",
3484
+ description: "integration ID"
3485
+ },
3486
+ {
3487
+ name: "jobNumber",
3488
+ type: "string"
3489
+ },
3490
+ {
3491
+ name: "name",
3492
+ type: "string",
3493
+ description: "Display name"
3494
+ },
3495
+ {
3496
+ name: "description",
3497
+ type: "string",
3498
+ description: "Detailed description"
3499
+ },
3500
+ {
3501
+ name: "status",
3502
+ type: "object",
3503
+ description: "Status filter"
3504
+ },
3505
+ {
3506
+ name: "customer",
3507
+ type: "object",
3508
+ description: "Inline customer object — alternative to customerId"
3509
+ },
3510
+ {
3511
+ name: "site",
3512
+ type: "string",
3513
+ description: "Inline site object — alternative to siteId"
3514
+ },
3515
+ {
3516
+ name: "contact",
3517
+ type: "string",
3518
+ description: "Inline contact object — alternative to contactId"
3519
+ },
3520
+ {
3521
+ name: "customerSupervisor",
3522
+ type: "string"
3523
+ },
3524
+ {
3525
+ name: "type",
3526
+ type: "string"
3527
+ },
3528
+ {
3529
+ name: "priority",
3530
+ type: "string"
3531
+ },
3532
+ {
3533
+ name: "owner",
3534
+ type: "string"
3535
+ },
3536
+ {
3537
+ name: "fieldSupervisor",
3538
+ type: "string"
3539
+ },
3540
+ {
3541
+ name: "zones",
3542
+ type: "array"
3543
+ },
3544
+ {
3545
+ name: "tags",
3546
+ type: "array",
3547
+ description: "Tag operation — use set, add, or remove (mutually exclusive: set vs add/remove)"
3548
+ },
3549
+ {
3550
+ name: "systemTags",
3551
+ type: "array"
3552
+ },
3553
+ {
3554
+ name: "notes",
3555
+ type: "string",
3556
+ description: "Additional notes or comments"
3557
+ },
3558
+ {
3559
+ name: "reference",
3560
+ type: "string",
3561
+ description: "External reference number"
3562
+ },
3563
+ {
3564
+ name: "customerWO",
3565
+ type: "string",
3566
+ description: "Customer work order reference"
3567
+ },
3568
+ {
3569
+ name: "customerPO",
3570
+ type: "string",
3571
+ description: "Customer purchase order reference"
3572
+ },
3573
+ {
3574
+ name: "priceBook",
3575
+ type: "string"
3576
+ },
3577
+ {
3578
+ name: "billingCompany",
3579
+ type: "string"
3580
+ },
3581
+ {
3582
+ name: "policy",
3583
+ type: "string"
3584
+ },
3585
+ {
3586
+ name: "thresholds",
3587
+ type: "string"
3588
+ },
3589
+ {
3590
+ name: "stages",
3591
+ type: "array"
3592
+ },
3593
+ {
3594
+ name: "totals",
3595
+ type: "object"
3596
+ },
3597
+ {
3598
+ name: "customFields",
3599
+ type: "string",
3600
+ description: "Custom fields as key-value pairs — validated against tenant field definitions"
3601
+ },
3602
+ {
3603
+ name: "dueDate",
3604
+ type: "string",
3605
+ description: "Due date (ISO 8601 datetime)"
3606
+ },
3607
+ {
3608
+ name: "startDate",
3609
+ type: "string",
3610
+ description: "Start date (ISO 8601 datetime)"
3611
+ },
3612
+ {
3613
+ name: "createdAt",
3614
+ type: "string"
3615
+ },
3616
+ {
3617
+ name: "updatedAt",
3618
+ type: "string",
3619
+ description: "For optimistic concurrency — update fails if entity was modified after this timestamp"
3620
+ }
3621
+ ]
3622
+ },
3623
+ {
3624
+ operationId: "PublicApiJobController_updateStatus",
3625
+ displayName: "Update job status",
3626
+ description: "Change an existing job status and cascade the change to stages through the job domain command.",
3627
+ method: "PATCH",
3628
+ path: "/jobs/{id}/status",
3629
+ commandPath: ["jobs", "status", "update-status"],
3630
+ options: [
3631
+ {
3632
+ name: "id",
3633
+ cliName: "id",
3634
+ optionKey: "id",
3635
+ source: "path",
3636
+ type: "string",
3637
+ required: true,
3638
+ description: "Job ID"
3639
+ },
3640
+ {
3641
+ name: "updatedAt",
3642
+ cliName: "updated-at",
3643
+ optionKey: "updatedAt",
3644
+ source: "body",
3645
+ type: "string",
3646
+ required: false,
3647
+ description: "For optimistic concurrency — update fails if entity was modified after this timestamp",
3648
+ format: "date-time"
3649
+ },
3650
+ {
3651
+ name: "status",
3652
+ cliName: "status",
3653
+ optionKey: "status",
3654
+ source: "body",
3655
+ type: "string",
3656
+ required: true,
3657
+ description: "Status filter",
3658
+ enumValues: ["open", "in_progress", "on_hold", "completed", "finalised", "closed", "cancelled"]
3659
+ },
3660
+ {
3661
+ name: "note",
3662
+ cliName: "note",
3663
+ optionKey: "note",
3664
+ source: "body",
3665
+ type: "string",
3666
+ required: false,
3667
+ description: ""
3668
+ },
3455
3669
  {
3456
3670
  name: "raw-body",
3457
3671
  cliName: "raw-body",
@@ -4426,12 +4640,184 @@ var operations = [
4426
4640
  ]
4427
4641
  },
4428
4642
  {
4429
- operationId: "PublicApiJobController_getStageItem",
4430
- displayName: "Get stage item",
4431
- description: "Get a specific item within a stage.",
4432
- method: "GET",
4643
+ operationId: "PublicApiJobController_createStageItems",
4644
+ displayName: "Create stage items",
4645
+ description: "Add one or more catalogue-backed line items to a stage.",
4646
+ method: "POST",
4647
+ path: "/jobs/{id}/stages/{stageId}/items",
4648
+ commandPath: ["jobs", "create-stage-items"],
4649
+ options: [
4650
+ {
4651
+ name: "id",
4652
+ cliName: "id",
4653
+ optionKey: "id",
4654
+ source: "path",
4655
+ type: "string",
4656
+ required: true,
4657
+ description: "Job ID"
4658
+ },
4659
+ {
4660
+ name: "stageId",
4661
+ cliName: "stage-id",
4662
+ optionKey: "stageId",
4663
+ source: "path",
4664
+ type: "string",
4665
+ required: true,
4666
+ description: "Stage ID"
4667
+ },
4668
+ {
4669
+ name: "items",
4670
+ cliName: "items",
4671
+ optionKey: "items",
4672
+ source: "body",
4673
+ type: "array",
4674
+ required: true,
4675
+ description: ""
4676
+ },
4677
+ {
4678
+ name: "raw-body",
4679
+ cliName: "raw-body",
4680
+ optionKey: "rawBody",
4681
+ source: "body",
4682
+ type: "object",
4683
+ required: false,
4684
+ description: "Raw request body JSON (overrides individual fields)"
4685
+ }
4686
+ ],
4687
+ hasRequestBody: true,
4688
+ responseFields: [
4689
+ {
4690
+ name: "items",
4691
+ type: "array"
4692
+ }
4693
+ ]
4694
+ },
4695
+ {
4696
+ operationId: "PublicApiJobController_getStageItem",
4697
+ displayName: "Get stage item",
4698
+ description: "Get a specific item within a stage.",
4699
+ method: "GET",
4700
+ path: "/jobs/{id}/stages/{stageId}/items/{itemId}",
4701
+ commandPath: ["jobs", "stages", "items", "get"],
4702
+ options: [
4703
+ {
4704
+ name: "id",
4705
+ cliName: "id",
4706
+ optionKey: "id",
4707
+ source: "path",
4708
+ type: "string",
4709
+ required: true,
4710
+ description: "Job ID"
4711
+ },
4712
+ {
4713
+ name: "stageId",
4714
+ cliName: "stage-id",
4715
+ optionKey: "stageId",
4716
+ source: "path",
4717
+ type: "string",
4718
+ required: true,
4719
+ description: "Stage ID"
4720
+ },
4721
+ {
4722
+ name: "itemId",
4723
+ cliName: "item-id",
4724
+ optionKey: "itemId",
4725
+ source: "path",
4726
+ type: "string",
4727
+ required: true,
4728
+ description: "Item ID"
4729
+ }
4730
+ ],
4731
+ hasRequestBody: false,
4732
+ responseFields: [
4733
+ {
4734
+ name: "id",
4735
+ type: "string",
4736
+ description: "Entity ID"
4737
+ },
4738
+ {
4739
+ name: "jobId",
4740
+ type: "string",
4741
+ description: "Job ID or job number (e.g. J12345)"
4742
+ },
4743
+ {
4744
+ name: "stageId",
4745
+ type: "string",
4746
+ description: "Stage ID or stage number"
4747
+ },
4748
+ {
4749
+ name: "integrationId",
4750
+ type: "string",
4751
+ description: "integration ID"
4752
+ },
4753
+ {
4754
+ name: "code",
4755
+ type: "string"
4756
+ },
4757
+ {
4758
+ name: "description",
4759
+ type: "string",
4760
+ description: "Detailed description"
4761
+ },
4762
+ {
4763
+ name: "type",
4764
+ type: "string"
4765
+ },
4766
+ {
4767
+ name: "quantity",
4768
+ type: "number"
4769
+ },
4770
+ {
4771
+ name: "unit",
4772
+ type: "string"
4773
+ },
4774
+ {
4775
+ name: "location",
4776
+ type: "string"
4777
+ },
4778
+ {
4779
+ name: "note",
4780
+ type: "string"
4781
+ },
4782
+ {
4783
+ name: "status",
4784
+ type: "string",
4785
+ description: "Status filter"
4786
+ },
4787
+ {
4788
+ name: "buyPrice",
4789
+ type: "number"
4790
+ },
4791
+ {
4792
+ name: "sellPrice",
4793
+ type: "number"
4794
+ },
4795
+ {
4796
+ name: "invoicingStatus",
4797
+ type: "string"
4798
+ },
4799
+ {
4800
+ name: "suppliedBySubcontractor",
4801
+ type: "boolean"
4802
+ },
4803
+ {
4804
+ name: "createdAt",
4805
+ type: "string"
4806
+ },
4807
+ {
4808
+ name: "updatedAt",
4809
+ type: "string",
4810
+ description: "For optimistic concurrency — update fails if entity was modified after this timestamp"
4811
+ }
4812
+ ]
4813
+ },
4814
+ {
4815
+ operationId: "PublicApiJobController_updateStageItem",
4816
+ displayName: "Update stage item",
4817
+ description: "Update mutable fields on a stage line item.",
4818
+ method: "PATCH",
4433
4819
  path: "/jobs/{id}/stages/{stageId}/items/{itemId}",
4434
- commandPath: ["jobs", "stages", "items", "get"],
4820
+ commandPath: ["jobs", "stages", "items", "update-stage-item"],
4435
4821
  options: [
4436
4822
  {
4437
4823
  name: "id",
@@ -4459,9 +4845,111 @@ var operations = [
4459
4845
  type: "string",
4460
4846
  required: true,
4461
4847
  description: "Item ID"
4848
+ },
4849
+ {
4850
+ name: "updatedAt",
4851
+ cliName: "updated-at",
4852
+ optionKey: "updatedAt",
4853
+ source: "body",
4854
+ type: "string",
4855
+ required: true,
4856
+ description: "For optimistic concurrency — update fails if entity was modified after this timestamp",
4857
+ format: "date-time"
4858
+ },
4859
+ {
4860
+ name: "quantity",
4861
+ cliName: "quantity",
4862
+ optionKey: "quantity",
4863
+ source: "body",
4864
+ type: "number",
4865
+ required: false,
4866
+ description: ""
4867
+ },
4868
+ {
4869
+ name: "unit",
4870
+ cliName: "unit",
4871
+ optionKey: "unit",
4872
+ source: "body",
4873
+ type: "string",
4874
+ required: false,
4875
+ description: ""
4876
+ },
4877
+ {
4878
+ name: "location",
4879
+ cliName: "location",
4880
+ optionKey: "location",
4881
+ source: "body",
4882
+ type: "string",
4883
+ required: false,
4884
+ description: ""
4885
+ },
4886
+ {
4887
+ name: "note",
4888
+ cliName: "note",
4889
+ optionKey: "note",
4890
+ source: "body",
4891
+ type: "string",
4892
+ required: false,
4893
+ description: ""
4894
+ },
4895
+ {
4896
+ name: "buyPrice",
4897
+ cliName: "buy-price",
4898
+ optionKey: "buyPrice",
4899
+ source: "body",
4900
+ type: "number",
4901
+ required: false,
4902
+ description: ""
4903
+ },
4904
+ {
4905
+ name: "sellPrice",
4906
+ cliName: "sell-price",
4907
+ optionKey: "sellPrice",
4908
+ source: "body",
4909
+ type: "number",
4910
+ required: false,
4911
+ description: ""
4912
+ },
4913
+ {
4914
+ name: "status",
4915
+ cliName: "status",
4916
+ optionKey: "status",
4917
+ source: "body",
4918
+ type: "string",
4919
+ required: false,
4920
+ description: "Status filter",
4921
+ enumValues: ["Normal", "Variation", "Cancelled", "Requested", "Pending Review", "Declined", "Deleted"]
4922
+ },
4923
+ {
4924
+ name: "invoicingStatus",
4925
+ cliName: "invoicing-status",
4926
+ optionKey: "invoicingStatus",
4927
+ source: "body",
4928
+ type: "string",
4929
+ required: false,
4930
+ description: "",
4931
+ enumValues: ["Billable", "No Charge", "Not Billable"]
4932
+ },
4933
+ {
4934
+ name: "suppliedBySubcontractor",
4935
+ cliName: "supplied-by-subcontractor",
4936
+ optionKey: "suppliedBySubcontractor",
4937
+ source: "body",
4938
+ type: "boolean",
4939
+ required: false,
4940
+ description: ""
4941
+ },
4942
+ {
4943
+ name: "raw-body",
4944
+ cliName: "raw-body",
4945
+ optionKey: "rawBody",
4946
+ source: "body",
4947
+ type: "object",
4948
+ required: false,
4949
+ description: "Raw request body JSON (overrides individual fields)"
4462
4950
  }
4463
4951
  ],
4464
- hasRequestBody: false,
4952
+ hasRequestBody: true,
4465
4953
  responseFields: [
4466
4954
  {
4467
4955
  name: "id",
@@ -4478,6 +4966,11 @@ var operations = [
4478
4966
  type: "string",
4479
4967
  description: "Stage ID or stage number"
4480
4968
  },
4969
+ {
4970
+ name: "integrationId",
4971
+ type: "string",
4972
+ description: "integration ID"
4973
+ },
4481
4974
  {
4482
4975
  name: "code",
4483
4976
  type: "string"
@@ -4499,6 +4992,14 @@ var operations = [
4499
4992
  name: "unit",
4500
4993
  type: "string"
4501
4994
  },
4995
+ {
4996
+ name: "location",
4997
+ type: "string"
4998
+ },
4999
+ {
5000
+ name: "note",
5001
+ type: "string"
5002
+ },
4502
5003
  {
4503
5004
  name: "status",
4504
5005
  type: "string",
@@ -4531,6 +5032,80 @@ var operations = [
4531
5032
  }
4532
5033
  ]
4533
5034
  },
5035
+ {
5036
+ operationId: "PublicApiJobController_deleteStageItem",
5037
+ displayName: "Delete stage item",
5038
+ description: "Remove or cancel a stage item depending on tenant deletion settings.",
5039
+ method: "DELETE",
5040
+ path: "/jobs/{id}/stages/{stageId}/items/{itemId}",
5041
+ commandPath: ["jobs", "stages", "items", "delete-stage-item"],
5042
+ options: [
5043
+ {
5044
+ name: "id",
5045
+ cliName: "id",
5046
+ optionKey: "id",
5047
+ source: "path",
5048
+ type: "string",
5049
+ required: true,
5050
+ description: "Job ID"
5051
+ },
5052
+ {
5053
+ name: "stageId",
5054
+ cliName: "stage-id",
5055
+ optionKey: "stageId",
5056
+ source: "path",
5057
+ type: "string",
5058
+ required: true,
5059
+ description: "Stage ID"
5060
+ },
5061
+ {
5062
+ name: "itemId",
5063
+ cliName: "item-id",
5064
+ optionKey: "itemId",
5065
+ source: "path",
5066
+ type: "string",
5067
+ required: true,
5068
+ description: "Item ID"
5069
+ }
5070
+ ],
5071
+ hasRequestBody: false,
5072
+ responseFields: [
5073
+ {
5074
+ name: "deleted",
5075
+ type: "boolean"
5076
+ }
5077
+ ]
5078
+ },
5079
+ {
5080
+ operationId: "PublicApiJobLineItemController_list",
5081
+ displayName: "Find job line items",
5082
+ description: "Find a job line item by external integration ID.",
5083
+ method: "GET",
5084
+ path: "/items",
5085
+ commandPath: ["items", "list"],
5086
+ options: [
5087
+ {
5088
+ name: "integrationId",
5089
+ cliName: "integration-id",
5090
+ optionKey: "integrationId",
5091
+ source: "query",
5092
+ type: "string",
5093
+ required: true,
5094
+ description: "External integration ID for the line item"
5095
+ }
5096
+ ],
5097
+ hasRequestBody: false,
5098
+ responseFields: [
5099
+ {
5100
+ name: "items",
5101
+ type: "array"
5102
+ },
5103
+ {
5104
+ name: "pagination",
5105
+ type: "object"
5106
+ }
5107
+ ]
5108
+ },
4534
5109
  {
4535
5110
  operationId: "PublicJobStageController_create",
4536
5111
  displayName: "Create a new stage",
@@ -5389,6 +5964,15 @@ var operations = [
5389
5964
  description: "Finalisation date (ISO 8601 datetime)",
5390
5965
  format: "date-time"
5391
5966
  },
5967
+ {
5968
+ name: "note",
5969
+ cliName: "note",
5970
+ optionKey: "note",
5971
+ source: "body",
5972
+ type: "string",
5973
+ required: false,
5974
+ description: ""
5975
+ },
5392
5976
  {
5393
5977
  name: "raw-body",
5394
5978
  cliName: "raw-body",
@@ -7585,6 +8169,70 @@ var operations = [
7585
8169
  }
7586
8170
  ]
7587
8171
  },
8172
+ {
8173
+ operationId: "PublicApiCustomFieldController_listJobCustomFields",
8174
+ displayName: "List job custom fields",
8175
+ description: "Retrieve configured custom fields that may be used in Job customFields payloads.",
8176
+ method: "GET",
8177
+ path: "/settings/custom-fields/jobs",
8178
+ commandPath: ["settings", "custom", "fields", "custom-fields", "jobs", "list"],
8179
+ options: [],
8180
+ hasRequestBody: false,
8181
+ responseFields: [
8182
+ {
8183
+ name: "items",
8184
+ type: "array"
8185
+ }
8186
+ ]
8187
+ },
8188
+ {
8189
+ operationId: "PublicApiCustomFieldController_listStageCustomFields",
8190
+ displayName: "List stage custom fields",
8191
+ description: "Retrieve configured custom fields that may be used in Stage customFields payloads.",
8192
+ method: "GET",
8193
+ path: "/settings/custom-fields/stages",
8194
+ commandPath: ["settings", "custom", "fields", "custom-fields", "stages", "list"],
8195
+ options: [],
8196
+ hasRequestBody: false,
8197
+ responseFields: [
8198
+ {
8199
+ name: "items",
8200
+ type: "array"
8201
+ }
8202
+ ]
8203
+ },
8204
+ {
8205
+ operationId: "PublicApiCustomFieldController_listAccountCustomFields",
8206
+ displayName: "List account custom fields",
8207
+ description: "Retrieve configured custom fields that may be used in CRM account customFields payloads.",
8208
+ method: "GET",
8209
+ path: "/settings/custom-fields/accounts",
8210
+ commandPath: ["settings", "custom", "fields", "custom-fields", "accounts", "list"],
8211
+ options: [],
8212
+ hasRequestBody: false,
8213
+ responseFields: [
8214
+ {
8215
+ name: "items",
8216
+ type: "array"
8217
+ }
8218
+ ]
8219
+ },
8220
+ {
8221
+ operationId: "PublicApiCustomFieldController_listItemCustomFields",
8222
+ displayName: "List item custom fields",
8223
+ description: "Retrieve configured custom fields that may be used in settings item customFields payloads.",
8224
+ method: "GET",
8225
+ path: "/settings/custom-fields/items",
8226
+ commandPath: ["settings", "custom", "fields", "custom-fields", "items", "list"],
8227
+ options: [],
8228
+ hasRequestBody: false,
8229
+ responseFields: [
8230
+ {
8231
+ name: "items",
8232
+ type: "array"
8233
+ }
8234
+ ]
8235
+ },
7588
8236
  {
7589
8237
  operationId: "PublicAttachmentController_createUploadSession",
7590
8238
  displayName: "Create upload session",
@@ -10179,6 +10827,15 @@ var operations = [
10179
10827
  path: "/customers",
10180
10828
  commandPath: ["crm", "customers", "list"],
10181
10829
  options: [
10830
+ {
10831
+ name: "integrationId",
10832
+ cliName: "integration-id",
10833
+ optionKey: "integrationId",
10834
+ source: "query",
10835
+ type: "string",
10836
+ required: false,
10837
+ description: "Filter by external integration identifier"
10838
+ },
10182
10839
  {
10183
10840
  name: "status",
10184
10841
  cliName: "status",
@@ -10453,6 +11110,15 @@ var operations = [
10453
11110
  required: false,
10454
11111
  description: ""
10455
11112
  },
11113
+ {
11114
+ name: "primarySite",
11115
+ cliName: "primary-site",
11116
+ optionKey: "primarySite",
11117
+ source: "body",
11118
+ type: "object",
11119
+ required: false,
11120
+ description: ""
11121
+ },
10456
11122
  {
10457
11123
  name: "owner",
10458
11124
  cliName: "owner",
@@ -10942,6 +11608,15 @@ var operations = [
10942
11608
  required: false,
10943
11609
  description: ""
10944
11610
  },
11611
+ {
11612
+ name: "primarySite",
11613
+ cliName: "primary-site",
11614
+ optionKey: "primarySite",
11615
+ source: "body",
11616
+ type: "object",
11617
+ required: false,
11618
+ description: ""
11619
+ },
10945
11620
  {
10946
11621
  name: "owner",
10947
11622
  cliName: "owner",
@@ -11331,6 +12006,15 @@ var operations = [
11331
12006
  required: false,
11332
12007
  description: ""
11333
12008
  },
12009
+ {
12010
+ name: "primarySite",
12011
+ cliName: "primary-site",
12012
+ optionKey: "primarySite",
12013
+ source: "body",
12014
+ type: "object",
12015
+ required: false,
12016
+ description: ""
12017
+ },
11334
12018
  {
11335
12019
  name: "owner",
11336
12020
  cliName: "owner",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workbuddy/cli-vnext",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "WorkBuddy command line interface",
5
5
  "license": "MIT",
6
6
  "type": "module",