@workbuddy/sdk-js-vnext 1.0.87 → 1.0.89
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 +77 -42
- package/index.js +22 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1703,6 +1703,41 @@ export interface WorkBuddySettingsStageStatusesListParams extends WorkBuddyReque
|
|
|
1703
1703
|
|
|
1704
1704
|
export interface WorkBuddySettingsTagsListParams extends WorkBuddyRequestParams {}
|
|
1705
1705
|
|
|
1706
|
+
export interface WorkBuddySettingsTagsUpsertParams extends WorkBuddyRequestParams {
|
|
1707
|
+
type: 'service-type' | 'service-scope' | 'work-categories';
|
|
1708
|
+
/**
|
|
1709
|
+
* Display name
|
|
1710
|
+
*/
|
|
1711
|
+
name: string;
|
|
1712
|
+
|
|
1713
|
+
color?:
|
|
1714
|
+
| '#1abc9c'
|
|
1715
|
+
| '#16a085'
|
|
1716
|
+
| '#f1c40f'
|
|
1717
|
+
| '#f39c12'
|
|
1718
|
+
| '#2ecc71'
|
|
1719
|
+
| '#27ae60'
|
|
1720
|
+
| '#e67e22'
|
|
1721
|
+
| '#d35400'
|
|
1722
|
+
| '#3498db'
|
|
1723
|
+
| '#2980b9'
|
|
1724
|
+
| '#e74c3c'
|
|
1725
|
+
| '#c0392b'
|
|
1726
|
+
| '#9b59b6'
|
|
1727
|
+
| '#8e44ad'
|
|
1728
|
+
| '#bdc3c7'
|
|
1729
|
+
| '#34495e'
|
|
1730
|
+
| '#2c3e50'
|
|
1731
|
+
| '#95a5a6'
|
|
1732
|
+
| '#7f8c8d'
|
|
1733
|
+
| '#ec87bf'
|
|
1734
|
+
| '#d870ad'
|
|
1735
|
+
| '#f69785'
|
|
1736
|
+
| '#9ba37e'
|
|
1737
|
+
| '#b49255'
|
|
1738
|
+
| '#a94136';
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1706
1741
|
export interface WorkBuddySettingsZonesListParams extends WorkBuddyRequestParams {}
|
|
1707
1742
|
|
|
1708
1743
|
export interface WorkBuddySettingsWorkTypesListParams extends WorkBuddyRequestParams {}
|
|
@@ -2942,19 +2977,6 @@ export interface WorkBuddyCrmCustomersUpdateParams extends WorkBuddyRequestParam
|
|
|
2942
2977
|
*/
|
|
2943
2978
|
integrationId?: string;
|
|
2944
2979
|
|
|
2945
|
-
address?: {
|
|
2946
|
-
name?: string;
|
|
2947
|
-
street1?: string;
|
|
2948
|
-
street2?: string;
|
|
2949
|
-
suburb?: string;
|
|
2950
|
-
state?: string;
|
|
2951
|
-
postalCode?: string;
|
|
2952
|
-
country?: string;
|
|
2953
|
-
lat?: number;
|
|
2954
|
-
lgn?: number;
|
|
2955
|
-
timezone?: string;
|
|
2956
|
-
};
|
|
2957
|
-
|
|
2958
2980
|
primaryContact?: { id: string; name?: string; type?: string };
|
|
2959
2981
|
|
|
2960
2982
|
primarySite?: Record<string, unknown>;
|
|
@@ -3212,19 +3234,6 @@ export interface WorkBuddyCrmContractorsUpdateParams extends WorkBuddyRequestPar
|
|
|
3212
3234
|
*/
|
|
3213
3235
|
integrationId?: string;
|
|
3214
3236
|
|
|
3215
|
-
address?: {
|
|
3216
|
-
name?: string;
|
|
3217
|
-
street1?: string;
|
|
3218
|
-
street2?: string;
|
|
3219
|
-
suburb?: string;
|
|
3220
|
-
state?: string;
|
|
3221
|
-
postalCode?: string;
|
|
3222
|
-
country?: string;
|
|
3223
|
-
lat?: number;
|
|
3224
|
-
lgn?: number;
|
|
3225
|
-
timezone?: string;
|
|
3226
|
-
};
|
|
3227
|
-
|
|
3228
3237
|
primaryContact?: { id: string; name?: string; type?: string };
|
|
3229
3238
|
|
|
3230
3239
|
primarySite?: Record<string, unknown>;
|
|
@@ -3476,19 +3485,6 @@ export interface WorkBuddyCrmSuppliersUpdateParams extends WorkBuddyRequestParam
|
|
|
3476
3485
|
*/
|
|
3477
3486
|
integrationId?: string;
|
|
3478
3487
|
|
|
3479
|
-
address?: {
|
|
3480
|
-
name?: string;
|
|
3481
|
-
street1?: string;
|
|
3482
|
-
street2?: string;
|
|
3483
|
-
suburb?: string;
|
|
3484
|
-
state?: string;
|
|
3485
|
-
postalCode?: string;
|
|
3486
|
-
country?: string;
|
|
3487
|
-
lat?: number;
|
|
3488
|
-
lgn?: number;
|
|
3489
|
-
timezone?: string;
|
|
3490
|
-
};
|
|
3491
|
-
|
|
3492
3488
|
primaryContact?: { id: string; name?: string; type?: string };
|
|
3493
3489
|
|
|
3494
3490
|
primarySite?: Record<string, unknown>;
|
|
@@ -5624,7 +5620,37 @@ export type WorkBuddySettingsStageStatusesListResponse = {
|
|
|
5624
5620
|
displayOptions: { showInContractorPortal: boolean; showInFieldApp: boolean };
|
|
5625
5621
|
}[];
|
|
5626
5622
|
};
|
|
5627
|
-
export type WorkBuddySettingsTagsListResponse = {
|
|
5623
|
+
export type WorkBuddySettingsTagsListResponse = {
|
|
5624
|
+
items: { id: string; name: string; color?: string; type?: string }[];
|
|
5625
|
+
colors: (
|
|
5626
|
+
| '#1abc9c'
|
|
5627
|
+
| '#16a085'
|
|
5628
|
+
| '#f1c40f'
|
|
5629
|
+
| '#f39c12'
|
|
5630
|
+
| '#2ecc71'
|
|
5631
|
+
| '#27ae60'
|
|
5632
|
+
| '#e67e22'
|
|
5633
|
+
| '#d35400'
|
|
5634
|
+
| '#3498db'
|
|
5635
|
+
| '#2980b9'
|
|
5636
|
+
| '#e74c3c'
|
|
5637
|
+
| '#c0392b'
|
|
5638
|
+
| '#9b59b6'
|
|
5639
|
+
| '#8e44ad'
|
|
5640
|
+
| '#bdc3c7'
|
|
5641
|
+
| '#34495e'
|
|
5642
|
+
| '#2c3e50'
|
|
5643
|
+
| '#95a5a6'
|
|
5644
|
+
| '#7f8c8d'
|
|
5645
|
+
| '#ec87bf'
|
|
5646
|
+
| '#d870ad'
|
|
5647
|
+
| '#f69785'
|
|
5648
|
+
| '#9ba37e'
|
|
5649
|
+
| '#b49255'
|
|
5650
|
+
| '#a94136'
|
|
5651
|
+
)[];
|
|
5652
|
+
};
|
|
5653
|
+
export type WorkBuddySettingsTagsUpsertResponse = { item: { id: string; name: string; color?: string; type?: string } };
|
|
5628
5654
|
export type WorkBuddySettingsZonesListResponse = { items: { id: string; name: string }[] };
|
|
5629
5655
|
export type WorkBuddySettingsWorkTypesListResponse = { items: { id: string; name: string }[] };
|
|
5630
5656
|
export type WorkBuddySettingsTemplatesEmailListEmailTemplatesResponse = {
|
|
@@ -8384,7 +8410,7 @@ export interface WorkBuddySettingsPricebooksResource {
|
|
|
8384
8410
|
|
|
8385
8411
|
export interface WorkBuddySettingsStageStatusesResource {
|
|
8386
8412
|
/**
|
|
8387
|
-
* Retrieve
|
|
8413
|
+
* Retrieve active stage statuses configured for the tenant (Settings > Stage Status). Soft-deleted statuses are omitted.
|
|
8388
8414
|
Each item is a workflow state a stage (work order) can use (e.g. New, Dispatched, En Route, On Site, Completed, Finalised).
|
|
8389
8415
|
|
|
8390
8416
|
Response fields include:
|
|
@@ -8409,13 +8435,22 @@ Requires scope: settings:read
|
|
|
8409
8435
|
|
|
8410
8436
|
export interface WorkBuddySettingsTagsResource {
|
|
8411
8437
|
/**
|
|
8412
|
-
* Retrieve all active tags (labels) configured. Use the optional `type` query parameter to filter by label type. Defaults to `job` if not specified. Supported types: job, scheduling, quote, customer, user, overheads, form, finance, system, work-order-system, account, contact, zone, work-categories, lead-source, lead, opportunity, opportunity-lost, project, project-type, payment-type, file, asset, item-location, task, phase, site, service-type, subscriptions, agreement, work, integration-types, flag-category.
|
|
8438
|
+
* Retrieve all active tags (labels) configured. Use the optional `type` query parameter to filter by label type. Defaults to `job` if not specified. `colors` is the Settings label-picker palette used by PUT /settings/tags. Supported types: job, scheduling, quote, customer, user, overheads, form, finance, system, work-order-system, account, contact, zone, work-categories, lead-source, lead, opportunity, opportunity-lost, project, project-type, payment-type, file, asset, item-location, task, phase, site, service-type, service-scope, subscriptions, agreement, work, integration-types, flag-category.
|
|
8413
8439
|
* Operation: PublicApiTagController_list
|
|
8414
8440
|
*/
|
|
8415
8441
|
list<TResponse = WorkBuddySettingsTagsListResponse>(
|
|
8416
8442
|
params?: WorkBuddySettingsTagsListParams,
|
|
8417
8443
|
options?: WorkBuddyRequestOptions
|
|
8418
8444
|
): Promise<TResponse>;
|
|
8445
|
+
|
|
8446
|
+
/**
|
|
8447
|
+
* Create a tag, or return the existing active tag with the same type and name (case-insensitive). Limited to service-type, service-scope, and work-categories. Optional color must be a Settings label-picker hex; omitted color is chosen from that palette. Does not change color on an existing tag. Requires settings:tags:write — not settings:write.
|
|
8448
|
+
* Operation: PublicApiTagController_upsert
|
|
8449
|
+
*/
|
|
8450
|
+
upsert<TResponse = WorkBuddySettingsTagsUpsertResponse>(
|
|
8451
|
+
params: WorkBuddySettingsTagsUpsertParams,
|
|
8452
|
+
options?: WorkBuddyRequestOptions
|
|
8453
|
+
): Promise<TResponse>;
|
|
8419
8454
|
}
|
|
8420
8455
|
|
|
8421
8456
|
export interface WorkBuddySettingsZonesResource {
|
package/index.js
CHANGED
|
@@ -643,7 +643,7 @@ export class WorkBuddyClient {
|
|
|
643
643
|
},
|
|
644
644
|
stageStatuses: {
|
|
645
645
|
/**
|
|
646
|
-
* Retrieve
|
|
646
|
+
* Retrieve active stage statuses configured for the tenant (Settings > Stage Status). Soft-deleted statuses are omitted.
|
|
647
647
|
Each item is a workflow state a stage (work order) can use (e.g. New, Dispatched, En Route, On Site, Completed, Finalised).
|
|
648
648
|
|
|
649
649
|
Response fields include:
|
|
@@ -664,10 +664,15 @@ Requires scope: settings:read
|
|
|
664
664
|
},
|
|
665
665
|
tags: {
|
|
666
666
|
/**
|
|
667
|
-
* Retrieve all active tags (labels) configured. Use the optional `type` query parameter to filter by label type. Defaults to `job` if not specified. Supported types: job, scheduling, quote, customer, user, overheads, form, finance, system, work-order-system, account, contact, zone, work-categories, lead-source, lead, opportunity, opportunity-lost, project, project-type, payment-type, file, asset, item-location, task, phase, site, service-type, subscriptions, agreement, work, integration-types, flag-category.
|
|
667
|
+
* Retrieve all active tags (labels) configured. Use the optional `type` query parameter to filter by label type. Defaults to `job` if not specified. `colors` is the Settings label-picker palette used by PUT /settings/tags. Supported types: job, scheduling, quote, customer, user, overheads, form, finance, system, work-order-system, account, contact, zone, work-categories, lead-source, lead, opportunity, opportunity-lost, project, project-type, payment-type, file, asset, item-location, task, phase, site, service-type, service-scope, subscriptions, agreement, work, integration-types, flag-category.
|
|
668
668
|
* Operation: PublicApiTagController_list
|
|
669
669
|
*/
|
|
670
670
|
list: (params = {}, options = {}) => this.request('PublicApiTagController_list', params, options),
|
|
671
|
+
/**
|
|
672
|
+
* Create a tag, or return the existing active tag with the same type and name (case-insensitive). Limited to service-type, service-scope, and work-categories. Optional color must be a Settings label-picker hex; omitted color is chosen from that palette. Does not change color on an existing tag. Requires settings:tags:write — not settings:write.
|
|
673
|
+
* Operation: PublicApiTagController_upsert
|
|
674
|
+
*/
|
|
675
|
+
upsert: (params = {}, options = {}) => this.request('PublicApiTagController_upsert', params, options),
|
|
671
676
|
},
|
|
672
677
|
zones: {
|
|
673
678
|
/**
|
|
@@ -2219,7 +2224,7 @@ export const operations = [
|
|
|
2219
2224
|
actionName: 'list',
|
|
2220
2225
|
displayName: 'List stage statuses',
|
|
2221
2226
|
description:
|
|
2222
|
-
'Retrieve
|
|
2227
|
+
'Retrieve active stage statuses configured for the tenant (Settings > Stage Status). Soft-deleted statuses are omitted.\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',
|
|
2223
2228
|
method: 'GET',
|
|
2224
2229
|
path: '/settings/stage-statuses',
|
|
2225
2230
|
pathParams: [],
|
|
@@ -2232,13 +2237,26 @@ export const operations = [
|
|
|
2232
2237
|
actionName: 'list',
|
|
2233
2238
|
displayName: 'List tags',
|
|
2234
2239
|
description:
|
|
2235
|
-
'Retrieve all active tags (labels) configured. Use the optional `type` query parameter to filter by label type. Defaults to `job` if not specified. Supported types: job, scheduling, quote, customer, user, overheads, form, finance, system, work-order-system, account, contact, zone, work-categories, lead-source, lead, opportunity, opportunity-lost, project, project-type, payment-type, file, asset, item-location, task, phase, site, service-type, subscriptions, agreement, work, integration-types, flag-category.',
|
|
2240
|
+
'Retrieve all active tags (labels) configured. Use the optional `type` query parameter to filter by label type. Defaults to `job` if not specified. `colors` is the Settings label-picker palette used by PUT /settings/tags. Supported types: job, scheduling, quote, customer, user, overheads, form, finance, system, work-order-system, account, contact, zone, work-categories, lead-source, lead, opportunity, opportunity-lost, project, project-type, payment-type, file, asset, item-location, task, phase, site, service-type, service-scope, subscriptions, agreement, work, integration-types, flag-category.',
|
|
2236
2241
|
method: 'GET',
|
|
2237
2242
|
path: '/settings/tags',
|
|
2238
2243
|
pathParams: [],
|
|
2239
2244
|
queryParams: [],
|
|
2240
2245
|
hasRequestBody: false,
|
|
2241
2246
|
},
|
|
2247
|
+
{
|
|
2248
|
+
operationId: 'PublicApiTagController_upsert',
|
|
2249
|
+
resourcePath: ['settings', 'tags'],
|
|
2250
|
+
actionName: 'upsert',
|
|
2251
|
+
displayName: 'Upsert a tag',
|
|
2252
|
+
description:
|
|
2253
|
+
'Create a tag, or return the existing active tag with the same type and name (case-insensitive). Limited to service-type, service-scope, and work-categories. Optional color must be a Settings label-picker hex; omitted color is chosen from that palette. Does not change color on an existing tag. Requires settings:tags:write — not settings:write.',
|
|
2254
|
+
method: 'PUT',
|
|
2255
|
+
path: '/settings/tags',
|
|
2256
|
+
pathParams: [],
|
|
2257
|
+
queryParams: [],
|
|
2258
|
+
hasRequestBody: true,
|
|
2259
|
+
},
|
|
2242
2260
|
{
|
|
2243
2261
|
operationId: 'PublicApiZoneController_list',
|
|
2244
2262
|
resourcePath: ['settings', 'zones'],
|