@workbuddy/sdk-js-vnext 1.0.87 → 1.0.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +76 -2
  2. package/index.js +20 -2
  3. 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 {}
@@ -5624,7 +5659,37 @@ export type WorkBuddySettingsStageStatusesListResponse = {
5624
5659
  displayOptions: { showInContractorPortal: boolean; showInFieldApp: boolean };
5625
5660
  }[];
5626
5661
  };
5627
- export type WorkBuddySettingsTagsListResponse = { items: { id: string; name: string; color?: string }[] };
5662
+ export type WorkBuddySettingsTagsListResponse = {
5663
+ items: { id: string; name: string; color?: string; type?: string }[];
5664
+ colors: (
5665
+ | '#1abc9c'
5666
+ | '#16a085'
5667
+ | '#f1c40f'
5668
+ | '#f39c12'
5669
+ | '#2ecc71'
5670
+ | '#27ae60'
5671
+ | '#e67e22'
5672
+ | '#d35400'
5673
+ | '#3498db'
5674
+ | '#2980b9'
5675
+ | '#e74c3c'
5676
+ | '#c0392b'
5677
+ | '#9b59b6'
5678
+ | '#8e44ad'
5679
+ | '#bdc3c7'
5680
+ | '#34495e'
5681
+ | '#2c3e50'
5682
+ | '#95a5a6'
5683
+ | '#7f8c8d'
5684
+ | '#ec87bf'
5685
+ | '#d870ad'
5686
+ | '#f69785'
5687
+ | '#9ba37e'
5688
+ | '#b49255'
5689
+ | '#a94136'
5690
+ )[];
5691
+ };
5692
+ export type WorkBuddySettingsTagsUpsertResponse = { item: { id: string; name: string; color?: string; type?: string } };
5628
5693
  export type WorkBuddySettingsZonesListResponse = { items: { id: string; name: string }[] };
5629
5694
  export type WorkBuddySettingsWorkTypesListResponse = { items: { id: string; name: string }[] };
5630
5695
  export type WorkBuddySettingsTemplatesEmailListEmailTemplatesResponse = {
@@ -8409,13 +8474,22 @@ Requires scope: settings:read
8409
8474
 
8410
8475
  export interface WorkBuddySettingsTagsResource {
8411
8476
  /**
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.
8477
+ * 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
8478
  * Operation: PublicApiTagController_list
8414
8479
  */
8415
8480
  list<TResponse = WorkBuddySettingsTagsListResponse>(
8416
8481
  params?: WorkBuddySettingsTagsListParams,
8417
8482
  options?: WorkBuddyRequestOptions
8418
8483
  ): Promise<TResponse>;
8484
+
8485
+ /**
8486
+ * 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.
8487
+ * Operation: PublicApiTagController_upsert
8488
+ */
8489
+ upsert<TResponse = WorkBuddySettingsTagsUpsertResponse>(
8490
+ params: WorkBuddySettingsTagsUpsertParams,
8491
+ options?: WorkBuddyRequestOptions
8492
+ ): Promise<TResponse>;
8419
8493
  }
8420
8494
 
8421
8495
  export interface WorkBuddySettingsZonesResource {
package/index.js CHANGED
@@ -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
  /**
@@ -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'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workbuddy/sdk-js-vnext",
3
- "version": "1.0.87",
3
+ "version": "1.0.88",
4
4
  "description": "WorkBuddy Public API JavaScript client",
5
5
  "license": "MIT",
6
6
  "type": "module",