@workbuddy/sdk-js-vnext 1.0.125 → 1.0.127

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 +45 -0
  2. package/index.js +23 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -95,6 +95,8 @@ export class WorkBuddyClient {
95
95
  settings: WorkBuddySettingsResource;
96
96
  /** Attachments API operations. */
97
97
  attachments: WorkBuddyAttachmentsResource;
98
+ /** Tasks API operations. */
99
+ tasks: WorkBuddyTasksResource;
98
100
  /** Crm API operations. */
99
101
  crm: WorkBuddyCrmResource;
100
102
  /** Webhooks API operations. */
@@ -4003,6 +4005,8 @@ export interface WorkBuddyJobsTasksCreateParams extends WorkBuddyRequestParams {
4003
4005
  */
4004
4006
  tagIds?: string[];
4005
4007
 
4008
+ mustResolveBefore?: 'notEnforced' | 'stageCompletion' | 'claimSubmission';
4009
+
4006
4010
  evidenceOptions?: {
4007
4011
  mandatory?: boolean;
4008
4012
  signatureEnabled?: boolean;
@@ -4061,6 +4065,12 @@ export interface WorkBuddyJobsTasksUpdateParams extends WorkBuddyRequestParams {
4061
4065
  */
4062
4066
  status?: 'open' | 'completed';
4063
4067
 
4068
+ taskStatus?: { id?: string; name?: string; reason?: string; note?: string };
4069
+
4070
+ mustResolveBefore?: 'notEnforced' | 'stageCompletion' | 'claimSubmission';
4071
+
4072
+ evidenceOptions?: { mandatory?: boolean };
4073
+
4064
4074
  target?: 'office' | 'supervisor' | 'field';
4065
4075
  /**
4066
4076
  * assignee ID
@@ -4179,6 +4189,8 @@ export interface WorkBuddyJobsStagesTasksCreateParams extends WorkBuddyRequestPa
4179
4189
  */
4180
4190
  tagIds?: string[];
4181
4191
 
4192
+ mustResolveBefore?: 'notEnforced' | 'stageCompletion' | 'claimSubmission';
4193
+
4182
4194
  evidenceOptions?: {
4183
4195
  mandatory?: boolean;
4184
4196
  signatureEnabled?: boolean;
@@ -4241,6 +4253,12 @@ export interface WorkBuddyJobsStagesTasksUpdateParams extends WorkBuddyRequestPa
4241
4253
  */
4242
4254
  status?: 'open' | 'completed';
4243
4255
 
4256
+ taskStatus?: { id?: string; name?: string; reason?: string; note?: string };
4257
+
4258
+ mustResolveBefore?: 'notEnforced' | 'stageCompletion' | 'claimSubmission';
4259
+
4260
+ evidenceOptions?: { mandatory?: boolean };
4261
+
4244
4262
  target?: 'office' | 'supervisor' | 'field';
4245
4263
  /**
4246
4264
  * assignee ID
@@ -4320,6 +4338,8 @@ export interface WorkBuddyJobsStagesTasksEvidenceSubmitEvidenceParams extends Wo
4320
4338
  complete?: boolean;
4321
4339
  }
4322
4340
 
4341
+ export interface WorkBuddyTasksStatusesListParams extends WorkBuddyRequestParams {}
4342
+
4323
4343
  export interface WorkBuddyJobsContactsListParams extends WorkBuddyRequestParams {
4324
4344
  /**
4325
4345
  * Job ID or job number (e.g. J12345)
@@ -12347,6 +12367,15 @@ export type WorkBuddyJobsStagesTasksGetResponse = unknown;
12347
12367
  export type WorkBuddyJobsStagesTasksUpdateResponse = unknown;
12348
12368
  export type WorkBuddyJobsStagesTasksDeleteResponse = unknown;
12349
12369
  export type WorkBuddyJobsStagesTasksEvidenceSubmitEvidenceResponse = unknown;
12370
+ export type WorkBuddyTasksStatusesListResponse = {
12371
+ items: {
12372
+ id: string;
12373
+ name: string;
12374
+ closed: boolean;
12375
+ reasonRequired: boolean;
12376
+ reasons: { id: string; name: string }[];
12377
+ }[];
12378
+ };
12350
12379
  export type WorkBuddyJobsContactsListResponse = {
12351
12380
  items: {
12352
12381
  id: string;
@@ -15295,6 +15324,22 @@ export interface WorkBuddyAttachmentsResource {
15295
15324
  ): Promise<TResponse>;
15296
15325
  }
15297
15326
 
15327
+ export interface WorkBuddyTasksResource {
15328
+ /** Statuses API operations. */
15329
+ statuses: WorkBuddyTasksStatusesResource;
15330
+ }
15331
+
15332
+ export interface WorkBuddyTasksStatusesResource {
15333
+ /**
15334
+ * Retrieve the tenant's active task statuses in display order. Use id or name in a task update's taskStatus; send a reason (id or name from reasons) when reasonRequired is true.
15335
+ * Operation: PublicApiTaskStatusController_list
15336
+ */
15337
+ list<TResponse = WorkBuddyTasksStatusesListResponse>(
15338
+ params?: WorkBuddyTasksStatusesListParams,
15339
+ options?: WorkBuddyRequestOptions
15340
+ ): Promise<TResponse>;
15341
+ }
15342
+
15298
15343
  export interface WorkBuddyCrmResource {
15299
15344
  /** Customers API operations. */
15300
15345
  customers: WorkBuddyCrmCustomersResource;
package/index.js CHANGED
@@ -872,6 +872,16 @@ Requires scope: settings:read
872
872
  download: (params = {}, options = {}) => this.request('PublicAttachmentController_download', params, options),
873
873
  };
874
874
 
875
+ this.tasks = {
876
+ statuses: {
877
+ /**
878
+ * Retrieve the tenant's active task statuses in display order. Use id or name in a task update's taskStatus; send a reason (id or name from reasons) when reasonRequired is true.
879
+ * Operation: PublicApiTaskStatusController_list
880
+ */
881
+ list: (params = {}, options = {}) => this.request('PublicApiTaskStatusController_list', params, options),
882
+ },
883
+ };
884
+
875
885
  this.crm = {
876
886
  customers: {
877
887
  status: {
@@ -3033,6 +3043,19 @@ export const operations = [
3033
3043
  queryParams: [],
3034
3044
  hasRequestBody: true,
3035
3045
  },
3046
+ {
3047
+ operationId: 'PublicApiTaskStatusController_list',
3048
+ resourcePath: ['tasks', 'statuses'],
3049
+ actionName: 'list',
3050
+ displayName: 'List task statuses',
3051
+ description:
3052
+ "Retrieve the tenant's active task statuses in display order. Use id or name in a task update's taskStatus; send a reason (id or name from reasons) when reasonRequired is true.",
3053
+ method: 'GET',
3054
+ path: '/tasks/statuses',
3055
+ pathParams: [],
3056
+ queryParams: [],
3057
+ hasRequestBody: false,
3058
+ },
3036
3059
  {
3037
3060
  operationId: 'PublicJobContactsController_list',
3038
3061
  resourcePath: ['jobs', 'contacts'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workbuddy/sdk-js-vnext",
3
- "version": "1.0.125",
3
+ "version": "1.0.127",
4
4
  "description": "WorkBuddy Public API JavaScript client",
5
5
  "license": "MIT",
6
6
  "type": "module",