@workbuddy/sdk-js-vnext 1.0.73 → 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.
- package/index.d.ts +666 -37
- package/index.js +255 -27
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -87,6 +87,59 @@ export class WorkBuddyClient {
|
|
|
87
87
|
deleteStageItem: (params = {}, options = {}) =>
|
|
88
88
|
this.request('PublicApiJobController_deleteStageItem', params, options),
|
|
89
89
|
},
|
|
90
|
+
pendingItems: {
|
|
91
|
+
status: {
|
|
92
|
+
/**
|
|
93
|
+
* Set the dedicated pending-item status. No general item fields are accepted.
|
|
94
|
+
* Operation: PublicJobStagePendingItemController_updateStatus
|
|
95
|
+
*/
|
|
96
|
+
updateStatus: (params = {}, options = {}) =>
|
|
97
|
+
this.request('PublicJobStagePendingItemController_updateStatus', params, options),
|
|
98
|
+
},
|
|
99
|
+
approve: {
|
|
100
|
+
/**
|
|
101
|
+
* Approve a pending item and promote it to a standard stage item.
|
|
102
|
+
* Operation: PublicJobStagePendingItemController_approve
|
|
103
|
+
*/
|
|
104
|
+
approve: (params = {}, options = {}) =>
|
|
105
|
+
this.request('PublicJobStagePendingItemController_approve', params, options),
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* List items awaiting approval for a stage.
|
|
109
|
+
* Operation: PublicJobStagePendingItemController_list
|
|
110
|
+
*/
|
|
111
|
+
list: (params = {}, options = {}) =>
|
|
112
|
+
this.request('PublicJobStagePendingItemController_list', params, options),
|
|
113
|
+
/** Iterate all items by following cursor pagination for list(). */
|
|
114
|
+
all: (params = {}, options = {}) =>
|
|
115
|
+
this.paginate('PublicJobStagePendingItemController_list', params, options),
|
|
116
|
+
/** Iterate raw pages by following cursor pagination for list(). */
|
|
117
|
+
pages: (params = {}, options = {}) =>
|
|
118
|
+
this.paginatePages('PublicJobStagePendingItemController_list', params, options),
|
|
119
|
+
/**
|
|
120
|
+
* Create one or more items awaiting approval.
|
|
121
|
+
* Operation: PublicJobStagePendingItemController_create
|
|
122
|
+
*/
|
|
123
|
+
create: (params = {}, options = {}) =>
|
|
124
|
+
this.request('PublicJobStagePendingItemController_create', params, options),
|
|
125
|
+
/**
|
|
126
|
+
* Get a specific pending item within a stage.
|
|
127
|
+
* Operation: PublicJobStagePendingItemController_get
|
|
128
|
+
*/
|
|
129
|
+
get: (params = {}, options = {}) => this.request('PublicJobStagePendingItemController_get', params, options),
|
|
130
|
+
/**
|
|
131
|
+
* Update general pending-item fields. Use the status route for itemStatus.
|
|
132
|
+
* Operation: PublicJobStagePendingItemController_update
|
|
133
|
+
*/
|
|
134
|
+
update: (params = {}, options = {}) =>
|
|
135
|
+
this.request('PublicJobStagePendingItemController_update', params, options),
|
|
136
|
+
/**
|
|
137
|
+
* Delete or decline a pending item according to tenant deletion settings.
|
|
138
|
+
* Operation: PublicJobStagePendingItemController_delete
|
|
139
|
+
*/
|
|
140
|
+
delete: (params = {}, options = {}) =>
|
|
141
|
+
this.request('PublicJobStagePendingItemController_delete', params, options),
|
|
142
|
+
},
|
|
90
143
|
resources: {
|
|
91
144
|
reissue: {
|
|
92
145
|
/**
|
|
@@ -105,7 +158,7 @@ export class WorkBuddyClient {
|
|
|
105
158
|
this.request('PublicJobStageResourceController_updateStatus', params, options),
|
|
106
159
|
},
|
|
107
160
|
/**
|
|
108
|
-
*
|
|
161
|
+
* 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.
|
|
109
162
|
* Operation: PublicJobStageResourceController_list
|
|
110
163
|
*/
|
|
111
164
|
list: (params = {}, options = {}) => this.request('PublicJobStageResourceController_list', params, options),
|
|
@@ -115,13 +168,13 @@ export class WorkBuddyClient {
|
|
|
115
168
|
pages: (params = {}, options = {}) =>
|
|
116
169
|
this.paginatePages('PublicJobStageResourceController_list', params, options),
|
|
117
170
|
/**
|
|
118
|
-
* Assign
|
|
171
|
+
* 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).
|
|
119
172
|
* Operation: PublicJobStageResourceController_assign
|
|
120
173
|
*/
|
|
121
174
|
assign: (params = {}, options = {}) =>
|
|
122
175
|
this.request('PublicJobStageResourceController_assign', params, options),
|
|
123
176
|
/**
|
|
124
|
-
* Get
|
|
177
|
+
* 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).
|
|
125
178
|
* Operation: PublicJobStageResourceController_get
|
|
126
179
|
*/
|
|
127
180
|
get: (params = {}, options = {}) => this.request('PublicJobStageResourceController_get', params, options),
|
|
@@ -459,14 +512,29 @@ export class WorkBuddyClient {
|
|
|
459
512
|
list: (params = {}, options = {}) => this.request('PublicApiJobLineItemController_list', params, options),
|
|
460
513
|
};
|
|
461
514
|
|
|
515
|
+
this.pendingItems = {
|
|
516
|
+
/**
|
|
517
|
+
* Find a pending stage item by its external integration ID.
|
|
518
|
+
* Operation: PublicApiPendingItemController_list
|
|
519
|
+
*/
|
|
520
|
+
list: (params = {}, options = {}) => this.request('PublicApiPendingItemController_list', params, options),
|
|
521
|
+
};
|
|
522
|
+
|
|
462
523
|
this.stages = {
|
|
463
524
|
complete: {
|
|
464
525
|
/**
|
|
465
|
-
* Mark a stage as completed. Field work is done but stage may still need finalisation/billing.
|
|
526
|
+
* 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).
|
|
466
527
|
* Operation: PublicJobStageController_complete
|
|
467
528
|
*/
|
|
468
529
|
complete: (params = {}, options = {}) => this.request('PublicJobStageController_complete', params, options),
|
|
469
530
|
},
|
|
531
|
+
inProgress: {
|
|
532
|
+
/**
|
|
533
|
+
* 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).
|
|
534
|
+
* Operation: PublicJobStageController_inProgress
|
|
535
|
+
*/
|
|
536
|
+
inProgress: (params = {}, options = {}) => this.request('PublicJobStageController_inProgress', params, options),
|
|
537
|
+
},
|
|
470
538
|
finalise: {
|
|
471
539
|
/**
|
|
472
540
|
* Finalise a completed stage. This typically indicates billing/invoicing is complete.
|
|
@@ -527,7 +595,7 @@ export class WorkBuddyClient {
|
|
|
527
595
|
this.settings = {
|
|
528
596
|
entityStatuses: {
|
|
529
597
|
/**
|
|
530
|
-
* Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user
|
|
598
|
+
* Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user, pending-item
|
|
531
599
|
* Operation: PublicApiEntityStatusController_list
|
|
532
600
|
*/
|
|
533
601
|
list: (params = {}, options = {}) => this.request('PublicApiEntityStatusController_list', params, options),
|
|
@@ -562,12 +630,12 @@ export class WorkBuddyClient {
|
|
|
562
630
|
},
|
|
563
631
|
pricebooks: {
|
|
564
632
|
/**
|
|
565
|
-
* 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).
|
|
633
|
+
* 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.
|
|
566
634
|
* Operation: PublicApiPriceBookController_list
|
|
567
635
|
*/
|
|
568
636
|
list: (params = {}, options = {}) => this.request('PublicApiPriceBookController_list', params, options),
|
|
569
637
|
/**
|
|
570
|
-
* Retrieve a pricebook by id (preferred) or exact name (case-insensitive). Pass category when the name may exist in more than one category.
|
|
638
|
+
* 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.
|
|
571
639
|
* Operation: PublicApiPriceBookController_getByIdOrName
|
|
572
640
|
*/
|
|
573
641
|
getByIdOrName: (params = {}, options = {}) =>
|
|
@@ -575,9 +643,23 @@ export class WorkBuddyClient {
|
|
|
575
643
|
},
|
|
576
644
|
stageStatuses: {
|
|
577
645
|
/**
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
646
|
+
* Retrieve all stage statuses configured for the tenant (Settings > Stage Status).
|
|
647
|
+
Each item is a workflow state a stage (work order) can use (e.g. New, Dispatched, En Route, On Site, Completed, Finalised).
|
|
648
|
+
|
|
649
|
+
Response fields include:
|
|
650
|
+
- identity: id, name, systemName, systemStatus, sortOrder
|
|
651
|
+
- description (nullable)
|
|
652
|
+
- activityOptions: shareWithCustomer, shareWithField (always present; unset = false)
|
|
653
|
+
- displayOptions: showInContractorPortal, showInFieldApp (always present)
|
|
654
|
+
|
|
655
|
+
Display Options rules (match Settings UI):
|
|
656
|
+
- Only systemStatus On Hold or In Progress support display options; other systemStatus values return both flags as false
|
|
657
|
+
- showInFieldApp is not configurable for In Progress and is always false
|
|
658
|
+
- When supported and not configured, visibility defaults to true (Settings UI default)
|
|
659
|
+
|
|
660
|
+
Requires scope: settings:read
|
|
661
|
+
* Operation: PublicApiStageStatusController_list
|
|
662
|
+
*/
|
|
581
663
|
list: (params = {}, options = {}) => this.request('PublicApiStageStatusController_list', params, options),
|
|
582
664
|
},
|
|
583
665
|
tags: {
|
|
@@ -983,7 +1065,7 @@ export class WorkBuddyClient {
|
|
|
983
1065
|
pages: (params = {}, options = {}) =>
|
|
984
1066
|
this.paginatePages('PublicCrmExternalUserController_list', params, options),
|
|
985
1067
|
/**
|
|
986
|
-
*
|
|
1068
|
+
* Login Contact (portal user). parents lists active parent accounts only; portal role is parents[].role.
|
|
987
1069
|
* Operation: PublicCrmExternalUserController_getById
|
|
988
1070
|
*/
|
|
989
1071
|
get: (params = {}, options = {}) => this.request('PublicCrmExternalUserController_getById', params, options),
|
|
@@ -1007,7 +1089,7 @@ export class WorkBuddyClient {
|
|
|
1007
1089
|
/** Iterate raw pages by following cursor pagination for list(). */
|
|
1008
1090
|
pages: (params = {}, options = {}) => this.paginatePages('PublicCrmContactController_list', params, options),
|
|
1009
1091
|
/**
|
|
1010
|
-
*
|
|
1092
|
+
* 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.
|
|
1011
1093
|
* Operation: PublicCrmContactController_getById
|
|
1012
1094
|
*/
|
|
1013
1095
|
get: (params = {}, options = {}) => this.request('PublicCrmContactController_getById', params, options),
|
|
@@ -1034,8 +1116,20 @@ export class WorkBuddyClient {
|
|
|
1034
1116
|
get: (params = {}, options = {}) => this.request('PublicCrmInviteController_getById', params, options),
|
|
1035
1117
|
},
|
|
1036
1118
|
sites: {
|
|
1119
|
+
contacts: {
|
|
1120
|
+
/**
|
|
1121
|
+
* List contacts linked to this site (same pattern as GET /customers/{id}/contacts). Returns basic contacts and external users parented to the site.
|
|
1122
|
+
* Operation: PublicCrmSiteController_listContacts
|
|
1123
|
+
*/
|
|
1124
|
+
list: (params = {}, options = {}) => this.request('PublicCrmSiteController_listContacts', params, options),
|
|
1125
|
+
/** Iterate all items by following cursor pagination for list(). */
|
|
1126
|
+
all: (params = {}, options = {}) => this.paginate('PublicCrmSiteController_listContacts', params, options),
|
|
1127
|
+
/** Iterate raw pages by following cursor pagination for list(). */
|
|
1128
|
+
pages: (params = {}, options = {}) =>
|
|
1129
|
+
this.paginatePages('PublicCrmSiteController_listContacts', params, options),
|
|
1130
|
+
},
|
|
1037
1131
|
/**
|
|
1038
|
-
* List all
|
|
1132
|
+
* 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).
|
|
1039
1133
|
* Operation: PublicCrmSiteController_list
|
|
1040
1134
|
*/
|
|
1041
1135
|
list: (params = {}, options = {}) => this.request('PublicCrmSiteController_list', params, options),
|
|
@@ -1044,7 +1138,7 @@ export class WorkBuddyClient {
|
|
|
1044
1138
|
/** Iterate raw pages by following cursor pagination for list(). */
|
|
1045
1139
|
pages: (params = {}, options = {}) => this.paginatePages('PublicCrmSiteController_list', params, options),
|
|
1046
1140
|
/**
|
|
1047
|
-
*
|
|
1141
|
+
* 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.
|
|
1048
1142
|
* Operation: PublicCrmSiteController_getById
|
|
1049
1143
|
*/
|
|
1050
1144
|
get: (params = {}, options = {}) => this.request('PublicCrmSiteController_getById', params, options),
|
|
@@ -1597,6 +1691,104 @@ export const operations = [
|
|
|
1597
1691
|
queryParams: ['integrationId'],
|
|
1598
1692
|
hasRequestBody: false,
|
|
1599
1693
|
},
|
|
1694
|
+
{
|
|
1695
|
+
operationId: 'PublicApiPendingItemController_list',
|
|
1696
|
+
resourcePath: ['pendingItems'],
|
|
1697
|
+
actionName: 'list',
|
|
1698
|
+
displayName: 'Find a pending item',
|
|
1699
|
+
description: 'Find a pending stage item by its external integration ID.',
|
|
1700
|
+
method: 'GET',
|
|
1701
|
+
path: '/pending-items',
|
|
1702
|
+
pathParams: [],
|
|
1703
|
+
queryParams: ['integrationId'],
|
|
1704
|
+
hasRequestBody: false,
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
operationId: 'PublicJobStagePendingItemController_list',
|
|
1708
|
+
resourcePath: ['jobs', 'stages', 'pendingItems'],
|
|
1709
|
+
actionName: 'list',
|
|
1710
|
+
paginatedItemsActionName: 'all',
|
|
1711
|
+
paginatedPagesActionName: 'pages',
|
|
1712
|
+
displayName: 'List stage pending items',
|
|
1713
|
+
description: 'List items awaiting approval for a stage.',
|
|
1714
|
+
method: 'GET',
|
|
1715
|
+
path: '/jobs/{id}/stages/{stageId}/pending-items',
|
|
1716
|
+
pathParams: ['id', 'stageId'],
|
|
1717
|
+
queryParams: ['cursor', 'limit'],
|
|
1718
|
+
hasRequestBody: false,
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
operationId: 'PublicJobStagePendingItemController_create',
|
|
1722
|
+
resourcePath: ['jobs', 'stages', 'pendingItems'],
|
|
1723
|
+
actionName: 'create',
|
|
1724
|
+
displayName: 'Create stage pending items',
|
|
1725
|
+
description: 'Create one or more items awaiting approval.',
|
|
1726
|
+
method: 'POST',
|
|
1727
|
+
path: '/jobs/{id}/stages/{stageId}/pending-items',
|
|
1728
|
+
pathParams: ['id', 'stageId'],
|
|
1729
|
+
queryParams: [],
|
|
1730
|
+
hasRequestBody: true,
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
operationId: 'PublicJobStagePendingItemController_get',
|
|
1734
|
+
resourcePath: ['jobs', 'stages', 'pendingItems'],
|
|
1735
|
+
actionName: 'get',
|
|
1736
|
+
displayName: 'Get stage pending item',
|
|
1737
|
+
description: 'Get a specific pending item within a stage.',
|
|
1738
|
+
method: 'GET',
|
|
1739
|
+
path: '/jobs/{id}/stages/{stageId}/pending-items/{itemId}',
|
|
1740
|
+
pathParams: ['id', 'stageId', 'itemId'],
|
|
1741
|
+
queryParams: [],
|
|
1742
|
+
hasRequestBody: false,
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
operationId: 'PublicJobStagePendingItemController_update',
|
|
1746
|
+
resourcePath: ['jobs', 'stages', 'pendingItems'],
|
|
1747
|
+
actionName: 'update',
|
|
1748
|
+
displayName: 'Update stage pending item',
|
|
1749
|
+
description: 'Update general pending-item fields. Use the status route for itemStatus.',
|
|
1750
|
+
method: 'PATCH',
|
|
1751
|
+
path: '/jobs/{id}/stages/{stageId}/pending-items/{itemId}',
|
|
1752
|
+
pathParams: ['id', 'stageId', 'itemId'],
|
|
1753
|
+
queryParams: [],
|
|
1754
|
+
hasRequestBody: true,
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
operationId: 'PublicJobStagePendingItemController_delete',
|
|
1758
|
+
resourcePath: ['jobs', 'stages', 'pendingItems'],
|
|
1759
|
+
actionName: 'delete',
|
|
1760
|
+
displayName: 'Delete stage pending item',
|
|
1761
|
+
description: 'Delete or decline a pending item according to tenant deletion settings.',
|
|
1762
|
+
method: 'DELETE',
|
|
1763
|
+
path: '/jobs/{id}/stages/{stageId}/pending-items/{itemId}',
|
|
1764
|
+
pathParams: ['id', 'stageId', 'itemId'],
|
|
1765
|
+
queryParams: [],
|
|
1766
|
+
hasRequestBody: false,
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
operationId: 'PublicJobStagePendingItemController_updateStatus',
|
|
1770
|
+
resourcePath: ['jobs', 'stages', 'pendingItems', 'status'],
|
|
1771
|
+
actionName: 'updateStatus',
|
|
1772
|
+
displayName: 'Update pending-item status',
|
|
1773
|
+
description: 'Set the dedicated pending-item status. No general item fields are accepted.',
|
|
1774
|
+
method: 'PATCH',
|
|
1775
|
+
path: '/jobs/{id}/stages/{stageId}/pending-items/{itemId}/status',
|
|
1776
|
+
pathParams: ['id', 'stageId', 'itemId'],
|
|
1777
|
+
queryParams: [],
|
|
1778
|
+
hasRequestBody: true,
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
operationId: 'PublicJobStagePendingItemController_approve',
|
|
1782
|
+
resourcePath: ['jobs', 'stages', 'pendingItems', 'approve'],
|
|
1783
|
+
actionName: 'approve',
|
|
1784
|
+
displayName: 'Approve stage pending item',
|
|
1785
|
+
description: 'Approve a pending item and promote it to a standard stage item.',
|
|
1786
|
+
method: 'POST',
|
|
1787
|
+
path: '/jobs/{id}/stages/{stageId}/pending-items/{itemId}/approve',
|
|
1788
|
+
pathParams: ['id', 'stageId', 'itemId'],
|
|
1789
|
+
queryParams: [],
|
|
1790
|
+
hasRequestBody: false,
|
|
1791
|
+
},
|
|
1600
1792
|
{
|
|
1601
1793
|
operationId: 'PublicJobStageController_create',
|
|
1602
1794
|
resourcePath: ['stages'],
|
|
@@ -1651,13 +1843,27 @@ export const operations = [
|
|
|
1651
1843
|
resourcePath: ['stages', 'complete'],
|
|
1652
1844
|
actionName: 'complete',
|
|
1653
1845
|
displayName: 'Complete a stage',
|
|
1654
|
-
description:
|
|
1846
|
+
description:
|
|
1847
|
+
'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).',
|
|
1655
1848
|
method: 'POST',
|
|
1656
1849
|
path: '/stages/{id}/complete',
|
|
1657
1850
|
pathParams: ['id'],
|
|
1658
1851
|
queryParams: [],
|
|
1659
1852
|
hasRequestBody: true,
|
|
1660
1853
|
},
|
|
1854
|
+
{
|
|
1855
|
+
operationId: 'PublicJobStageController_inProgress',
|
|
1856
|
+
resourcePath: ['stages', 'inProgress'],
|
|
1857
|
+
actionName: 'inProgress',
|
|
1858
|
+
displayName: 'Mark a stage in progress',
|
|
1859
|
+
description:
|
|
1860
|
+
'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).',
|
|
1861
|
+
method: 'POST',
|
|
1862
|
+
path: '/stages/{id}/in-progress',
|
|
1863
|
+
pathParams: ['id'],
|
|
1864
|
+
queryParams: [],
|
|
1865
|
+
hasRequestBody: true,
|
|
1866
|
+
},
|
|
1661
1867
|
{
|
|
1662
1868
|
operationId: 'PublicJobStageController_finalise',
|
|
1663
1869
|
resourcePath: ['stages', 'finalise'],
|
|
@@ -1727,7 +1933,8 @@ export const operations = [
|
|
|
1727
1933
|
paginatedItemsActionName: 'all',
|
|
1728
1934
|
paginatedPagesActionName: 'pages',
|
|
1729
1935
|
displayName: 'List stage resources',
|
|
1730
|
-
description:
|
|
1936
|
+
description:
|
|
1937
|
+
'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.',
|
|
1731
1938
|
method: 'GET',
|
|
1732
1939
|
path: '/jobs/{jobId}/stages/{stageId}/resources',
|
|
1733
1940
|
pathParams: ['jobId', 'stageId'],
|
|
@@ -1739,7 +1946,8 @@ export const operations = [
|
|
|
1739
1946
|
resourcePath: ['jobs', 'stages', 'resources'],
|
|
1740
1947
|
actionName: 'assign',
|
|
1741
1948
|
displayName: 'Assign resource to stage',
|
|
1742
|
-
description:
|
|
1949
|
+
description:
|
|
1950
|
+
'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).',
|
|
1743
1951
|
method: 'POST',
|
|
1744
1952
|
path: '/jobs/{jobId}/stages/{stageId}/resources',
|
|
1745
1953
|
pathParams: ['jobId', 'stageId'],
|
|
@@ -1751,7 +1959,8 @@ export const operations = [
|
|
|
1751
1959
|
resourcePath: ['jobs', 'stages', 'resources'],
|
|
1752
1960
|
actionName: 'get',
|
|
1753
1961
|
displayName: 'Get stage resource',
|
|
1754
|
-
description:
|
|
1962
|
+
description:
|
|
1963
|
+
'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).',
|
|
1755
1964
|
method: 'GET',
|
|
1756
1965
|
path: '/jobs/{jobId}/stages/{stageId}/resources/{resourceId}',
|
|
1757
1966
|
pathParams: ['jobId', 'stageId', 'resourceId'],
|
|
@@ -1800,7 +2009,7 @@ export const operations = [
|
|
|
1800
2009
|
actionName: 'list',
|
|
1801
2010
|
displayName: 'List entity statuses',
|
|
1802
2011
|
description:
|
|
1803
|
-
'Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user',
|
|
2012
|
+
'Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user, pending-item',
|
|
1804
2013
|
method: 'GET',
|
|
1805
2014
|
path: '/settings/entity-statuses/{entity}',
|
|
1806
2015
|
pathParams: ['entity'],
|
|
@@ -1865,7 +2074,7 @@ export const operations = [
|
|
|
1865
2074
|
actionName: 'list',
|
|
1866
2075
|
displayName: 'List pricebooks',
|
|
1867
2076
|
description:
|
|
1868
|
-
'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).',
|
|
2077
|
+
'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.',
|
|
1869
2078
|
method: 'GET',
|
|
1870
2079
|
path: '/settings/pricebooks',
|
|
1871
2080
|
pathParams: [],
|
|
@@ -1878,7 +2087,7 @@ export const operations = [
|
|
|
1878
2087
|
actionName: 'getByIdOrName',
|
|
1879
2088
|
displayName: 'Get pricebook',
|
|
1880
2089
|
description:
|
|
1881
|
-
'Retrieve a pricebook by id (preferred) or exact name (case-insensitive). Pass category when the name may exist in more than one category.',
|
|
2090
|
+
'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.',
|
|
1882
2091
|
method: 'GET',
|
|
1883
2092
|
path: '/settings/pricebooks/{idOrName}',
|
|
1884
2093
|
pathParams: ['idOrName'],
|
|
@@ -1891,7 +2100,7 @@ export const operations = [
|
|
|
1891
2100
|
actionName: 'list',
|
|
1892
2101
|
displayName: 'List stage statuses',
|
|
1893
2102
|
description:
|
|
1894
|
-
'Retrieve all stage statuses configured for the tenant
|
|
2103
|
+
'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',
|
|
1895
2104
|
method: 'GET',
|
|
1896
2105
|
path: '/settings/stage-statuses',
|
|
1897
2106
|
pathParams: [],
|
|
@@ -3046,7 +3255,8 @@ export const operations = [
|
|
|
3046
3255
|
resourcePath: ['crm', 'externalUsers'],
|
|
3047
3256
|
actionName: 'get',
|
|
3048
3257
|
displayName: 'Get external user by ID',
|
|
3049
|
-
description:
|
|
3258
|
+
description:
|
|
3259
|
+
'Login Contact (portal user). parents lists active parent accounts only; portal role is parents[].role.',
|
|
3050
3260
|
method: 'GET',
|
|
3051
3261
|
path: '/external-users/{id}',
|
|
3052
3262
|
pathParams: ['id'],
|
|
@@ -3072,7 +3282,8 @@ export const operations = [
|
|
|
3072
3282
|
resourcePath: ['crm', 'contacts'],
|
|
3073
3283
|
actionName: 'get',
|
|
3074
3284
|
displayName: 'Get contact by ID',
|
|
3075
|
-
description:
|
|
3285
|
+
description:
|
|
3286
|
+
'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.',
|
|
3076
3287
|
method: 'GET',
|
|
3077
3288
|
path: '/contacts/{id}',
|
|
3078
3289
|
pathParams: ['id'],
|
|
@@ -3136,11 +3347,12 @@ export const operations = [
|
|
|
3136
3347
|
paginatedItemsActionName: 'all',
|
|
3137
3348
|
paginatedPagesActionName: 'pages',
|
|
3138
3349
|
displayName: 'List all sites',
|
|
3139
|
-
description:
|
|
3350
|
+
description:
|
|
3351
|
+
'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).',
|
|
3140
3352
|
method: 'GET',
|
|
3141
3353
|
path: '/sites',
|
|
3142
3354
|
pathParams: [],
|
|
3143
|
-
queryParams: ['status', 'cursor', 'limit'],
|
|
3355
|
+
queryParams: ['search', 'status', 'cursor', 'limit'],
|
|
3144
3356
|
hasRequestBody: false,
|
|
3145
3357
|
},
|
|
3146
3358
|
{
|
|
@@ -3148,13 +3360,29 @@ export const operations = [
|
|
|
3148
3360
|
resourcePath: ['crm', 'sites'],
|
|
3149
3361
|
actionName: 'get',
|
|
3150
3362
|
displayName: 'Get site by ID',
|
|
3151
|
-
description:
|
|
3363
|
+
description:
|
|
3364
|
+
'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.',
|
|
3152
3365
|
method: 'GET',
|
|
3153
3366
|
path: '/sites/{id}',
|
|
3154
3367
|
pathParams: ['id'],
|
|
3155
3368
|
queryParams: [],
|
|
3156
3369
|
hasRequestBody: false,
|
|
3157
3370
|
},
|
|
3371
|
+
{
|
|
3372
|
+
operationId: 'PublicCrmSiteController_listContacts',
|
|
3373
|
+
resourcePath: ['crm', 'sites', 'contacts'],
|
|
3374
|
+
actionName: 'list',
|
|
3375
|
+
paginatedItemsActionName: 'all',
|
|
3376
|
+
paginatedPagesActionName: 'pages',
|
|
3377
|
+
displayName: 'List contacts for site',
|
|
3378
|
+
description:
|
|
3379
|
+
'List contacts linked to this site (same pattern as GET /customers/{id}/contacts). Returns basic contacts and external users parented to the site.',
|
|
3380
|
+
method: 'GET',
|
|
3381
|
+
path: '/sites/{id}/contacts',
|
|
3382
|
+
pathParams: ['id'],
|
|
3383
|
+
queryParams: ['cursor', 'limit'],
|
|
3384
|
+
hasRequestBody: false,
|
|
3385
|
+
},
|
|
3158
3386
|
{
|
|
3159
3387
|
operationId: 'PublicApiWebhookV2Controller_listEntities',
|
|
3160
3388
|
resourcePath: ['webhooks', 'entities'],
|