node-autotask 0.71.0 → 0.73.0

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 (42) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/MCP_TOOL_CATALOG.json +196 -9
  3. package/README.md +1 -1
  4. package/capabilities.json +651 -9
  5. package/dist/capabilities-data.js +650 -8
  6. package/dist/capabilities.cjs +4 -4
  7. package/dist/capabilities.js +1 -1
  8. package/dist/{chunk-4DSLRDIF.cjs → chunk-CKIKNZEB.cjs} +31 -30
  9. package/dist/{chunk-QQFF7X67.cjs → chunk-CWSXFVF2.cjs} +229 -16
  10. package/dist/{chunk-YKQ2KNQO.js → chunk-L4J5EDCU.js} +3 -2
  11. package/dist/{chunk-LKJA57CH.js → chunk-PNMEXWYR.js} +3 -3
  12. package/dist/{chunk-5COLIVBE.js → chunk-RFH4VBMX.js} +126 -2
  13. package/dist/{chunk-QJ327YI6.cjs → chunk-STUQU7AX.cjs} +301 -177
  14. package/dist/{chunk-4OR3XBIP.js → chunk-VHN5B7OQ.js} +223 -12
  15. package/dist/{chunk-JLCHKCEB.cjs → chunk-VHNWLON6.cjs} +3 -3
  16. package/dist/{index-CM_SRgtH.d.cts → index-CGp16Cdm.d.cts} +49 -21
  17. package/dist/{index-CM_SRgtH.d.ts → index-CGp16Cdm.d.ts} +49 -21
  18. package/dist/{index-lGpxr4gY.d.ts → index-Dv8d9p_J.d.ts} +165 -4
  19. package/dist/{index-CAXT5ZKT.d.cts → index-MUM-uBX1.d.cts} +165 -4
  20. package/dist/index.cjs +84 -84
  21. package/dist/index.d.cts +3 -5
  22. package/dist/index.d.ts +3 -5
  23. package/dist/index.js +5 -5
  24. package/dist/operations/index.cjs +51 -51
  25. package/dist/operations/index.d.cts +5 -6
  26. package/dist/operations/index.d.ts +5 -6
  27. package/dist/operations/index.js +2 -2
  28. package/dist/pool.cjs +12 -12
  29. package/dist/pool.d.cts +1 -1
  30. package/dist/pool.d.ts +1 -1
  31. package/dist/pool.js +4 -4
  32. package/dist/resources/index.cjs +27 -27
  33. package/dist/resources/index.d.cts +2 -2
  34. package/dist/resources/index.d.ts +2 -2
  35. package/dist/resources/index.js +3 -3
  36. package/dist/types/index.d.cts +1 -1
  37. package/dist/types/index.d.ts +1 -1
  38. package/docs/API.md +26 -7
  39. package/docs/N8N-ADAPTER.md +1 -1
  40. package/package.json +1 -1
  41. package/dist/base-CHMATPq0.d.cts +0 -145
  42. package/dist/base-CHMATPq0.d.ts +0 -145
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkJLCHKCEB_cjs = require('./chunk-JLCHKCEB.cjs');
3
+ var chunkVHNWLON6_cjs = require('./chunk-VHNWLON6.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "CAPABILITY_PLAN_HASHES", {
8
8
  enumerable: true,
9
- get: function () { return chunkJLCHKCEB_cjs.CAPABILITY_PLAN_HASHES; }
9
+ get: function () { return chunkVHNWLON6_cjs.CAPABILITY_PLAN_HASHES; }
10
10
  });
11
11
  Object.defineProperty(exports, "loadCapabilities", {
12
12
  enumerable: true,
13
- get: function () { return chunkJLCHKCEB_cjs.loadCapabilities; }
13
+ get: function () { return chunkVHNWLON6_cjs.loadCapabilities; }
14
14
  });
15
15
  Object.defineProperty(exports, "loadCapabilityRecords", {
16
16
  enumerable: true,
17
- get: function () { return chunkJLCHKCEB_cjs.loadCapabilityRecords; }
17
+ get: function () { return chunkVHNWLON6_cjs.loadCapabilityRecords; }
18
18
  });
@@ -1 +1 @@
1
- export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-LKJA57CH.js';
1
+ export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-PNMEXWYR.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkQJ327YI6_cjs = require('./chunk-QJ327YI6.cjs');
4
- var chunkQQFF7X67_cjs = require('./chunk-QQFF7X67.cjs');
3
+ var chunkSTUQU7AX_cjs = require('./chunk-STUQU7AX.cjs');
4
+ var chunkCWSXFVF2_cjs = require('./chunk-CWSXFVF2.cjs');
5
5
 
6
6
  // src/client.ts
7
7
  var AutotaskClient = class {
@@ -123,6 +123,7 @@ var AutotaskClient = class {
123
123
  tagAliases;
124
124
  tagGroups;
125
125
  tags;
126
+ taskNotes;
126
127
  tasks;
127
128
  taskSecondaryResources;
128
129
  taxRegions;
@@ -157,34 +158,34 @@ var AutotaskClient = class {
157
158
  * anything is wired. Construction issues NO request.
158
159
  */
159
160
  constructor(options) {
160
- this.config = chunkQQFF7X67_cjs.resolveConfig(options);
161
- this.http = new chunkQQFF7X67_cjs.HttpClient(this.config);
161
+ this.config = chunkCWSXFVF2_cjs.resolveConfig(options);
162
+ this.http = new chunkCWSXFVF2_cjs.HttpClient(this.config);
162
163
  this.http.client = this;
163
- for (const entry of chunkQQFF7X67_cjs.SIMPLE_RESOURCES) {
164
- this[entry.accessor] = new chunkQQFF7X67_cjs.GenericResource(this.http, entry, this.config.pageSize);
164
+ for (const entry of chunkCWSXFVF2_cjs.SIMPLE_RESOURCES) {
165
+ this[entry.accessor] = new chunkCWSXFVF2_cjs.GenericResource(this.http, entry, this.config.pageSize);
165
166
  }
166
- this.companies = new chunkQQFF7X67_cjs.CompaniesResource(this.http, this.config.pageSize);
167
- this.configurationItems = new chunkQJ327YI6_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
168
- this.contacts = new chunkQJ327YI6_cjs.ContactsResource(this.http, this.config.pageSize);
169
- this.contracts = new chunkQQFF7X67_cjs.ContractsResource(this.http, this.config.pageSize);
170
- this.inventoryProducts = new chunkQJ327YI6_cjs.InventoryProductsResource(this.http, this.config.pageSize);
171
- this.invoices = new chunkQQFF7X67_cjs.InvoicesResource(this.http, this.config.pageSize);
172
- this.quotes = new chunkQJ327YI6_cjs.QuotesResource(this.http, this.config.pageSize);
173
- this.resourceTimeOffAdditional = new chunkQJ327YI6_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
174
- this.resourceTimeOffBalances = new chunkQJ327YI6_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
175
- this.resources = new chunkQJ327YI6_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
176
- this.serviceCalls = new chunkQJ327YI6_cjs.ServiceCallsResource(this.http, this.config.pageSize);
177
- this.ticketCharges = new chunkQJ327YI6_cjs.TicketChargesResource(this.http, this.config.pageSize);
178
- this.tickets = new chunkQJ327YI6_cjs.TicketsResource(this.http, this.config.pageSize);
179
- this.timeEntries = new chunkQQFF7X67_cjs.TimeEntriesResource(this.http, this.config.pageSize);
180
- this.timeOffRequests = new chunkQJ327YI6_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
181
- this.authenticateResource = new chunkQJ327YI6_cjs.AuthenticateResource(this.http);
182
- this.entityInformation = new chunkQJ327YI6_cjs.EntityInformationResource(this.http);
183
- this.modules = new chunkQJ327YI6_cjs.ModulesResource(this.http);
184
- this.thresholdInformation = new chunkQJ327YI6_cjs.ThresholdInformationResource(this.http);
185
- this.version = new chunkQJ327YI6_cjs.VersionResource(this.http);
186
- this.versionInformation = new chunkQJ327YI6_cjs.VersionInformationResource(this.http);
187
- this.zoneInformation = new chunkQJ327YI6_cjs.ZoneInformationResource(this.http);
167
+ this.companies = new chunkCWSXFVF2_cjs.CompaniesResource(this.http, this.config.pageSize);
168
+ this.configurationItems = new chunkSTUQU7AX_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
169
+ this.contacts = new chunkSTUQU7AX_cjs.ContactsResource(this.http, this.config.pageSize);
170
+ this.contracts = new chunkCWSXFVF2_cjs.ContractsResource(this.http, this.config.pageSize);
171
+ this.inventoryProducts = new chunkSTUQU7AX_cjs.InventoryProductsResource(this.http, this.config.pageSize);
172
+ this.invoices = new chunkCWSXFVF2_cjs.InvoicesResource(this.http, this.config.pageSize);
173
+ this.quotes = new chunkSTUQU7AX_cjs.QuotesResource(this.http, this.config.pageSize);
174
+ this.resourceTimeOffAdditional = new chunkSTUQU7AX_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
175
+ this.resourceTimeOffBalances = new chunkSTUQU7AX_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
176
+ this.resources = new chunkSTUQU7AX_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
177
+ this.serviceCalls = new chunkSTUQU7AX_cjs.ServiceCallsResource(this.http, this.config.pageSize);
178
+ this.ticketCharges = new chunkSTUQU7AX_cjs.TicketChargesResource(this.http, this.config.pageSize);
179
+ this.tickets = new chunkSTUQU7AX_cjs.TicketsResource(this.http, this.config.pageSize);
180
+ this.timeEntries = new chunkCWSXFVF2_cjs.TimeEntriesResource(this.http, this.config.pageSize);
181
+ this.timeOffRequests = new chunkSTUQU7AX_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
182
+ this.authenticateResource = new chunkSTUQU7AX_cjs.AuthenticateResource(this.http);
183
+ this.entityInformation = new chunkSTUQU7AX_cjs.EntityInformationResource(this.http);
184
+ this.modules = new chunkSTUQU7AX_cjs.ModulesResource(this.http);
185
+ this.thresholdInformation = new chunkSTUQU7AX_cjs.ThresholdInformationResource(this.http);
186
+ this.version = new chunkSTUQU7AX_cjs.VersionResource(this.http);
187
+ this.versionInformation = new chunkSTUQU7AX_cjs.VersionInformationResource(this.http);
188
+ this.zoneInformation = new chunkSTUQU7AX_cjs.ZoneInformationResource(this.http);
188
189
  }
189
190
  /**
190
191
  * `GET /V1.0/Authenticate` → `AuthTokenResultModel` (as-is). The SDK does
@@ -218,10 +219,10 @@ var AutotaskClient = class {
218
219
  * parameter on each: `await client.withSignal(signal, () => invoke(client, ...))`.
219
220
  */
220
221
  withSignal(signal, fn) {
221
- return chunkQQFF7X67_cjs.runWithSignal(signal, fn);
222
+ return chunkCWSXFVF2_cjs.runWithSignal(signal, fn);
222
223
  }
223
224
  async batch(fn, items, opts = {}) {
224
- return chunkQQFF7X67_cjs.runBounded(fn, items, { ...opts, concurrency: opts.concurrency ?? this.config.maxConcurrent });
225
+ return chunkCWSXFVF2_cjs.runBounded(fn, items, { ...opts, concurrency: opts.concurrency ?? this.config.maxConcurrent });
225
226
  }
226
227
  };
227
228
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkJLCHKCEB_cjs = require('./chunk-JLCHKCEB.cjs');
3
+ var chunkVHNWLON6_cjs = require('./chunk-VHNWLON6.cjs');
4
4
  var chunkBD4AUGCJ_cjs = require('./chunk-BD4AUGCJ.cjs');
5
5
  var crypto = require('crypto');
6
6
  var async_hooks = require('async_hooks');
@@ -6201,6 +6201,22 @@ var RELATIONSHIP_MAP = {
6201
6201
  "field": "projectID"
6202
6202
  },
6203
6203
  "children": [
6204
+ {
6205
+ "resource": "task_notes",
6206
+ "apiEntity": "TaskNote",
6207
+ "parentField": "taskID",
6208
+ "parentSegment": "Notes",
6209
+ "tier": "extended",
6210
+ "workflowResource": false,
6211
+ "specialOps": [],
6212
+ "searchCovers": null,
6213
+ "scopedOps": {
6214
+ "create": true,
6215
+ "query": true,
6216
+ "update": true,
6217
+ "delete": false
6218
+ }
6219
+ },
6204
6220
  {
6205
6221
  "resource": "task_secondary_resources",
6206
6222
  "apiEntity": "TaskSecondaryResource",
@@ -7116,6 +7132,25 @@ var RELATIONSHIP_MAP = {
7116
7132
  "update": false,
7117
7133
  "delete": false
7118
7134
  }
7135
+ },
7136
+ {
7137
+ "resource": "time_off_requests",
7138
+ "apiEntity": "TimeOffRequest",
7139
+ "parentField": "resourceID",
7140
+ "parentSegment": "TimeOffRequests",
7141
+ "tier": "extended",
7142
+ "workflowResource": false,
7143
+ "specialOps": [
7144
+ "approve",
7145
+ "reject"
7146
+ ],
7147
+ "searchCovers": null,
7148
+ "scopedOps": {
7149
+ "create": true,
7150
+ "query": true,
7151
+ "update": true,
7152
+ "delete": false
7153
+ }
7119
7154
  }
7120
7155
  ],
7121
7156
  "naturalKeys": {
@@ -9181,11 +9216,15 @@ var RELATIONSHIP_MAP = {
9181
9216
  "apiEntity": "TimeOffRequest",
9182
9217
  "kind": "entity",
9183
9218
  "path": "TimeOffRequests",
9184
- "parentScoped": false,
9219
+ "parentScoped": true,
9185
9220
  "tier": "extended",
9186
9221
  "workflowResource": false,
9187
9222
  "group": "B",
9188
- "parent": null,
9223
+ "parent": {
9224
+ "resource": "resources",
9225
+ "segment": "TimeOffRequests",
9226
+ "field": "resourceID"
9227
+ },
9189
9228
  "children": [],
9190
9229
  "naturalKeys": {
9191
9230
  "hasSearch": false,
@@ -9193,8 +9232,31 @@ var RELATIONSHIP_MAP = {
9193
9232
  "findBy": []
9194
9233
  },
9195
9234
  "blindSurfaces": null,
9196
- "zoneFacts": null,
9197
- "deleteBoundary": null,
9235
+ "zoneFacts": {
9236
+ "createGuidance": {
9237
+ "createOp": "time_off_requests.create",
9238
+ "parentScoped": true,
9239
+ "liveProvenPrefix": [],
9240
+ "unproven": true,
9241
+ "blocker": {
9242
+ "kind": "unknown",
9243
+ "message": "Submission is documented but has not been verified; the status must resolve uniquely to Submitted in exposed field metadata. Permissions and request fields remain subject to vendor validation.",
9244
+ "remedy": "Read time_off_requests.getFieldInfo to select Submitted, then preview with a known resource and valid leave request fields."
9245
+ },
9246
+ "vendorEvidence": [
9247
+ "Specification: POST /V1.0/Resources/{parentId}/TimeOffRequests returns OperationResultModel.",
9248
+ "Official TimeOffRequests entity documentation: create accepts Submitted only; https://autotask.net/help/developerhelp/Content/APIs/REST/Entities/TimeOffRequestsEntity.htm. No live validation performed."
9249
+ ],
9250
+ "deleteBoundary": {
9251
+ "available": false,
9252
+ "note": "The vendor defines no DELETE for time-off requests; cancel through time_off_requests.update using the Canceled status from exposed field metadata. Cancellation is leave management, not timesheet unposting."
9253
+ }
9254
+ }
9255
+ },
9256
+ "deleteBoundary": {
9257
+ "note": "The vendor defines no DELETE for time-off requests; cancel through time_off_requests.update using the Canceled status from exposed field metadata. Cancellation is leave management, not timesheet unposting.",
9258
+ "proof": "spec-derived"
9259
+ },
9198
9260
  "markerField": null
9199
9261
  },
9200
9262
  "inventory_products": {
@@ -9666,6 +9728,53 @@ var RELATIONSHIP_MAP = {
9666
9728
  },
9667
9729
  "deleteBoundary": null,
9668
9730
  "markerField": null
9731
+ },
9732
+ "task_notes": {
9733
+ "resource": "task_notes",
9734
+ "apiEntity": "TaskNote",
9735
+ "kind": "entity",
9736
+ "path": "TaskNotes",
9737
+ "parentScoped": true,
9738
+ "tier": "extended",
9739
+ "workflowResource": false,
9740
+ "group": "A",
9741
+ "parent": {
9742
+ "resource": "tasks",
9743
+ "segment": "Notes",
9744
+ "field": "taskID"
9745
+ },
9746
+ "children": [],
9747
+ "naturalKeys": {
9748
+ "hasSearch": false,
9749
+ "searchCovers": null,
9750
+ "findBy": []
9751
+ },
9752
+ "blindSurfaces": null,
9753
+ "zoneFacts": {
9754
+ "createGuidance": {
9755
+ "createOp": "task_notes.create",
9756
+ "parentScoped": true,
9757
+ "liveProvenPrefix": [],
9758
+ "unproven": true,
9759
+ "blocker": {
9760
+ "kind": "unknown",
9761
+ "message": "TaskNotes creation has not been verified; module, permissions, project state and category settings may restrict it.",
9762
+ "remedy": "Use current field metadata and preview first; baseline-project notes are read-only."
9763
+ },
9764
+ "vendorEvidence": [
9765
+ "https://autotask.net/help/developerhelp/Content/APIs/REST/Entities/TaskNotesEntity.htm"
9766
+ ],
9767
+ "deleteBoundary": {
9768
+ "available": false,
9769
+ "note": "The vendor defines no DELETE for task_notes (spec-derived); a created task note cannot be removed through the public API."
9770
+ }
9771
+ }
9772
+ },
9773
+ "deleteBoundary": {
9774
+ "note": "The vendor defines no DELETE for task_notes (spec-derived); a created task note cannot be removed through the public API.",
9775
+ "proof": "spec-derived"
9776
+ },
9777
+ "markerField": "title"
9669
9778
  }
9670
9779
  };
9671
9780
  var BLIND_SURFACE_STAMPS = {
@@ -9775,7 +9884,9 @@ var DELETE_BOUNDARY_NOTES = {
9775
9884
  "ticket_notes": "the vendor defines no DELETE for ticket_notes (spec-derived: the vendored api-docs.json defines no DELETE on the entity's paths) \u2014 a create cannot be undone through the API; cleanup is UI-only.",
9776
9885
  "tickets": "the vendor defines no DELETE for tickets (spec-derived: the vendored api-docs.json defines no DELETE on the entity's paths) \u2014 a create cannot be undone through the API; cleanup is UI-only.",
9777
9886
  "user_defined_field_definitions": "the vendor defines no DELETE for user_defined_field_definitions (spec-derived: the vendored api-docs.json defines no DELETE on the entity's paths) \u2014 a UDF definition cannot be deleted through the API; deactivation is via isActive (vendor soft-removal); hard cleanup is UI-only.",
9778
- "user_defined_field_list_items": "the vendor defines no DELETE for user_defined_field_list_items (spec-derived: the vendored api-docs.json defines no DELETE on the standalone or parent-scoped ListItems paths) \u2014 a picklist value cannot be deleted through the API; deactivation is via isActive (vendor soft-removal); hard cleanup is UI-only."
9887
+ "user_defined_field_list_items": "the vendor defines no DELETE for user_defined_field_list_items (spec-derived: the vendored api-docs.json defines no DELETE on the standalone or parent-scoped ListItems paths) \u2014 a picklist value cannot be deleted through the API; deactivation is via isActive (vendor soft-removal); hard cleanup is UI-only.",
9888
+ "task_notes": "The vendor defines no DELETE for task_notes (spec-derived); a created task note cannot be removed through the public API.",
9889
+ "time_off_requests": "The vendor defines no DELETE for time-off requests; cancel through time_off_requests.update using the Canceled status from exposed field metadata. Cancellation is leave management, not timesheet unposting."
9779
9890
  };
9780
9891
  var RESPONSE_DRIFT_MARKERS = {
9781
9892
  "ticket_checklist_libraries": {
@@ -13221,6 +13332,25 @@ var CREATE_GUIDANCE = {
13221
13332
  "note": null
13222
13333
  }
13223
13334
  },
13335
+ {
13336
+ "resource": "task_notes",
13337
+ "createOp": "task_notes.create",
13338
+ "parentScoped": true,
13339
+ "liveProvenPrefix": [],
13340
+ "unproven": true,
13341
+ "blocker": {
13342
+ "kind": "unknown",
13343
+ "message": "TaskNotes creation has not been verified; module, permissions, project state and category settings may restrict it.",
13344
+ "remedy": "Use current field metadata and preview first; baseline-project notes are read-only."
13345
+ },
13346
+ "vendorEvidence": [
13347
+ "https://autotask.net/help/developerhelp/Content/APIs/REST/Entities/TaskNotesEntity.htm"
13348
+ ],
13349
+ "deleteBoundary": {
13350
+ "available": false,
13351
+ "note": "The vendor defines no DELETE for task_notes (spec-derived); a created task note cannot be removed through the public API."
13352
+ }
13353
+ },
13224
13354
  {
13225
13355
  "resource": "task_secondary_resources",
13226
13356
  "createOp": "task_secondary_resources.create",
@@ -13707,6 +13837,26 @@ var CREATE_GUIDANCE = {
13707
13837
  "note": null
13708
13838
  }
13709
13839
  },
13840
+ {
13841
+ "resource": "time_off_requests",
13842
+ "createOp": "time_off_requests.create",
13843
+ "parentScoped": true,
13844
+ "liveProvenPrefix": [],
13845
+ "unproven": true,
13846
+ "blocker": {
13847
+ "kind": "unknown",
13848
+ "message": "Submission is documented but has not been verified; the status must resolve uniquely to Submitted in exposed field metadata. Permissions and request fields remain subject to vendor validation.",
13849
+ "remedy": "Read time_off_requests.getFieldInfo to select Submitted, then preview with a known resource and valid leave request fields."
13850
+ },
13851
+ "vendorEvidence": [
13852
+ "Specification: POST /V1.0/Resources/{parentId}/TimeOffRequests returns OperationResultModel.",
13853
+ "Official TimeOffRequests entity documentation: create accepts Submitted only; https://autotask.net/help/developerhelp/Content/APIs/REST/Entities/TimeOffRequestsEntity.htm. No live validation performed."
13854
+ ],
13855
+ "deleteBoundary": {
13856
+ "available": false,
13857
+ "note": "The vendor defines no DELETE for time-off requests; cancel through time_off_requests.update using the Canceled status from exposed field metadata. Cancellation is leave management, not timesheet unposting."
13858
+ }
13859
+ },
13710
13860
  {
13711
13861
  "resource": "user_defined_field_definitions",
13712
13862
  "createOp": "user_defined_field_definitions.create",
@@ -13756,7 +13906,7 @@ var CREATE_GUIDANCE = {
13756
13906
  }
13757
13907
  ],
13758
13908
  "counts": {
13759
- "total": 101,
13909
+ "total": 103,
13760
13910
  "byKind": {
13761
13911
  "ok": 41,
13762
13912
  "blind-reference": 16,
@@ -13766,7 +13916,7 @@ var CREATE_GUIDANCE = {
13766
13916
  "resource-role-pair": 2,
13767
13917
  "delete-absent": 0,
13768
13918
  "non-mutable": 0,
13769
- "unknown": 25
13919
+ "unknown": 27
13770
13920
  }
13771
13921
  }
13772
13922
  };
@@ -14492,6 +14642,10 @@ var UNTRUSTED_FIELDS_BY_RESOURCE = {
14492
14642
  ],
14493
14643
  "company_note_attachments": [
14494
14644
  "title"
14645
+ ],
14646
+ "task_notes": [
14647
+ "description",
14648
+ "title"
14495
14649
  ]
14496
14650
  };
14497
14651
 
@@ -16366,7 +16520,7 @@ async function capabilitySets() {
16366
16520
  const fieldOps = /* @__PURE__ */ new Map();
16367
16521
  const udfCapable = /* @__PURE__ */ new Set();
16368
16522
  const resources = /* @__PURE__ */ new Set();
16369
- for (const rec of await chunkJLCHKCEB_cjs.loadCapabilityRecords()) {
16523
+ for (const rec of await chunkVHNWLON6_cjs.loadCapabilityRecords()) {
16370
16524
  if (rec.resource === "operations") continue;
16371
16525
  resources.add(rec.resource);
16372
16526
  if (rec.operation === "getFieldInfo") fieldOps.set(rec.resource, rec);
@@ -16377,7 +16531,7 @@ async function capabilitySets() {
16377
16531
  var derivedIndexPromise = null;
16378
16532
  function derivedIndexLoad() {
16379
16533
  if (derivedIndexPromise === null) {
16380
- derivedIndexPromise = chunkJLCHKCEB_cjs.loadCapabilityRecords().then((records) => {
16534
+ derivedIndexPromise = chunkVHNWLON6_cjs.loadCapabilityRecords().then((records) => {
16381
16535
  const index = /* @__PURE__ */ new Map();
16382
16536
  for (const rec of records) {
16383
16537
  const declared = rec.metadata?.derivedFields;
@@ -17586,6 +17740,7 @@ var MODEL_FIELD_SETS = {
17586
17740
  "tag_aliases": ["id", "alias", "tagID", "soapParentPropertyId"],
17587
17741
  "tag_groups": ["id", "displayColor", "isActive", "isSystem", "label"],
17588
17742
  "tags": ["id", "createDateTime", "isActive", "isExcludedFromAutomaticTagging", "isSystem", "label", "lastModifiedDateTime", "tagGroupID"],
17743
+ "task_notes": ["id", "createDateTime", "creatorResourceID", "createdByContactID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "lastActivityDate", "noteType", "publish", "taskID", "title", "soapParentPropertyId"],
17589
17744
  "task_secondary_resources": ["id", "resourceID", "roleID", "taskID", "soapParentPropertyId"],
17590
17745
  "tasks": ["id", "assignedResourceID", "assignedResourceRoleID", "billingCodeID", "canClientPortalUserCompleteTask", "companyLocationID", "completedByResourceID", "completedByType", "completedDateTime", "createDateTime", "creatorResourceID", "creatorType", "departmentID", "description", "endDateTime", "estimatedHours", "externalID", "hoursToBeScheduled", "isTaskBillable", "isVisibleInClientPortal", "lastActivityDateTime", "lastActivityPersonType", "lastActivityResourceID", "phaseID", "priority", "priorityLabel", "projectID", "purchaseOrderNumber", "remainingHours", "startDateTime", "status", "taskCategoryID", "taskNumber", "taskType", "title", "soapParentPropertyId", "userDefinedFields"],
17591
17746
  "tax_regions": ["id", "isActive", "name"],
@@ -17662,6 +17817,7 @@ var MODEL_DATE_FIELDS = {
17662
17817
  "subscriptions": ["effectiveDate", "expirationDate"],
17663
17818
  "survey_results": ["completeDate", "sendDate"],
17664
17819
  "tags": ["createDateTime", "lastModifiedDateTime"],
17820
+ "task_notes": ["createDateTime", "lastActivityDate"],
17665
17821
  "tasks": ["completedDateTime", "createDateTime", "endDateTime", "lastActivityDateTime", "startDateTime"],
17666
17822
  "ticket_attachments": ["attachDate"],
17667
17823
  "ticket_change_request_approvals": ["approveRejectDateTime"],
@@ -19542,6 +19698,9 @@ var MutationBase = class extends MetaBase {
19542
19698
  checks.push({ name: "duplicate-detection", ok: existingId === void 0 });
19543
19699
  }
19544
19700
  const warnings = existingId !== void 0 ? [`duplicate match on ${dedupFields.join(", ")} (id ${existingId}); the create would be skipped`] : [];
19701
+ const wouldCreate = existingId === void 0 && checks.every((check) => check.ok);
19702
+ const deleteBoundaryNote = wouldCreate ? DELETE_BOUNDARY_NOTES[this.config.key] : void 0;
19703
+ if (deleteBoundaryNote !== void 0) warnings.push(deleteBoundaryNote);
19545
19704
  return buildDryRunResult({
19546
19705
  operation: `${this.config.key}.createIfNotExists`,
19547
19706
  method: "POST",
@@ -19549,7 +19708,7 @@ var MutationBase = class extends MetaBase {
19549
19708
  ids: existingId !== void 0 ? [existingId] : [],
19550
19709
  checks,
19551
19710
  warnings,
19552
- impact: { affected: 1, scope: "single-record", reversible: true },
19711
+ impact: { affected: 1, scope: "single-record", reversible: !wouldCreate || this.config.deletable !== false && DELETE_BOUNDARY_NOTES[this.config.key] === void 0 },
19553
19712
  data
19554
19713
  }, { redactPersonalData: this.http.redactPersonalData });
19555
19714
  }
@@ -19661,7 +19820,7 @@ var MutationBase = class extends MetaBase {
19661
19820
  path,
19662
19821
  ids: [],
19663
19822
  checks,
19664
- impact: { affected: 1, scope: "single-record", reversible: true },
19823
+ impact: { affected: 1, scope: "single-record", reversible: !checks.every((check) => check.ok) || this.config.deletable !== false && deleteBoundaryNote === void 0 },
19665
19824
  warnings,
19666
19825
  data
19667
19826
  }, { redactPersonalData: this.http.redactPersonalData });
@@ -19786,6 +19945,36 @@ var BaseResource = class extends MutationBase {
19786
19945
  }
19787
19946
  };
19788
19947
 
19948
+ // src/resources/special/taskNotes.ts
19949
+ var WRITABLE = /* @__PURE__ */ new Set(["id", "itemId", "createdByContactID", "description", "noteType", "publish", "taskID", "title"]);
19950
+ function admitTaskNote(data, parentId, creating) {
19951
+ const parent = parseIdentifier(parentId, "parentId");
19952
+ const fail = (message) => {
19953
+ throw new AutotaskConfigError(`task_notes: ${message}`);
19954
+ };
19955
+ if (data === null || typeof data !== "object" || Array.isArray(data)) fail("data must be a record");
19956
+ const body = data;
19957
+ for (const key of Object.keys(body)) if (!WRITABLE.has(key)) fail(`${key} is not a writable TaskNotes field`);
19958
+ for (const [field, maximum] of [["description", 3200], ["title", 250]]) {
19959
+ const value = body[field];
19960
+ if (value !== void 0 && (typeof value !== "string" || value.length > maximum)) fail(`${field} must be a string of at most ${maximum} characters`);
19961
+ }
19962
+ if (creating && (typeof body.description !== "string" || body.description.trim() === "")) fail("description is required");
19963
+ for (const field of ["noteType", "publish"]) {
19964
+ const value = body[field];
19965
+ if ((creating || value !== void 0) && (typeof value !== "number" || !Number.isSafeInteger(value))) fail(`${field} must be an integer from the current field metadata`);
19966
+ }
19967
+ if (creating && body.taskID === void 0) fail("taskID is required in the create body and must match parentId");
19968
+ for (const field of ["createdByContactID", "taskID"]) {
19969
+ if (body[field] !== void 0) {
19970
+ if (typeof body[field] !== "number") fail(`${field} must be a numeric identifier`);
19971
+ const id = parseIdentifier(body[field], field);
19972
+ if (field === "taskID" && String(id) !== String(parent)) fail("taskID must match the parentId path argument");
19973
+ }
19974
+ }
19975
+ if (!creating && !Object.keys(body).some((key) => key !== "id" && key !== "itemId")) fail("update must contain a writable field");
19976
+ }
19977
+
19789
19978
  // src/resources/simple.ts
19790
19979
  var isIdentifier = (v) => typeof v === "number" || typeof v === "string";
19791
19980
  var SIMPLE_RESOURCES = [
@@ -21017,6 +21206,19 @@ var SIMPLE_RESOURCES = [
21017
21206
  helpers: { search: false, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
21018
21207
  opForms: { get: "global", create: "global", update: "global", delete: "global" }
21019
21208
  },
21209
+ {
21210
+ key: "task_notes",
21211
+ accessor: "taskNotes",
21212
+ resourcePath: "/V1.0/TaskNotes",
21213
+ parentScopedPath: "/V1.0/Tasks/{parentId}/Notes",
21214
+ parentPath: "/V1.0/Tasks",
21215
+ parentField: "taskID",
21216
+ deletable: false,
21217
+ udfCapable: false,
21218
+ ops: { query: true, queryAll: false, count: true, get: true, create: true, update: true, delete: false, getEntityInfo: true, getFieldInfo: true, getUdfInfo: true },
21219
+ helpers: { search: false, resolve: false, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
21220
+ opForms: { get: "scoped", create: "scoped", update: "scoped" }
21221
+ },
21020
21222
  {
21021
21223
  key: "task_secondary_resources",
21022
21224
  accessor: "taskSecondaryResources",
@@ -21285,6 +21487,13 @@ var GenericResource = class extends BaseResource {
21285
21487
  if (config.ops?.create === false || config.key === "company_attachments") this.createIfNotExists = async () => {
21286
21488
  throw new OperationNotSupportedError(config.key, "createIfNotExists");
21287
21489
  };
21490
+ if (config.key === "task_notes") {
21491
+ const compose = this.createIfNotExists.bind(this);
21492
+ this.createIfNotExists = async (a, b, c = {}) => {
21493
+ admitTaskNote(b, a, true);
21494
+ return compose(a, b, c);
21495
+ };
21496
+ }
21288
21497
  }
21289
21498
  /** #293 QA F2: the superset exposes every generic method, but a row whose ops/helpers
21290
21499
  * flags mark an op absent (the plain entities) refuses it client-side, pre-wire — the
@@ -21334,6 +21543,7 @@ var GenericResource = class extends BaseResource {
21334
21543
  const parentId = a;
21335
21544
  const data2 = b;
21336
21545
  const opts2 = c ?? {};
21546
+ if (this.config.key === "task_notes") admitTaskNote(data2, parentId, true);
21337
21547
  if (opts2.dryRun === true) return this.runCreateDryRun(data2, parentId);
21338
21548
  return this.createScopedRaw(parentId, data2, opts2);
21339
21549
  }
@@ -21351,6 +21561,7 @@ var GenericResource = class extends BaseResource {
21351
21561
  const id2 = b;
21352
21562
  const data2 = c;
21353
21563
  const opts2 = d ?? {};
21564
+ if (this.config.key === "task_notes") admitTaskNote(data2, parentId, false);
21354
21565
  if (opts2.dryRun === true) return this.runUpdateDryRun(id2, data2, opts2, parentId);
21355
21566
  if (this.config.collectionUpdate !== true) {
21356
21567
  await this.guardStaleBeforeMutation(id2, opts2, `${this.config.key}.update`, parentId);
@@ -23262,7 +23473,7 @@ function dateBucketLabel(value, bucket) {
23262
23473
  var queryResourceKeysPromise = null;
23263
23474
  function queryResourceKeys() {
23264
23475
  if (queryResourceKeysPromise === null) {
23265
- queryResourceKeysPromise = chunkJLCHKCEB_cjs.loadCapabilityRecords().then((records) => {
23476
+ queryResourceKeysPromise = chunkVHNWLON6_cjs.loadCapabilityRecords().then((records) => {
23266
23477
  const s = /* @__PURE__ */ new Set();
23267
23478
  for (const rec of records) if (rec.operation === "query") s.add(rec.resource);
23268
23479
  return s;
@@ -23384,7 +23595,7 @@ function parseTopAndLimit(opts, problems) {
23384
23595
  return { top, limit };
23385
23596
  }
23386
23597
  async function checkFieldNames(resourceKey, conditions, opts, problems) {
23387
- const records = resourceKey === void 0 ? [] : await chunkJLCHKCEB_cjs.loadCapabilityRecords();
23598
+ const records = resourceKey === void 0 ? [] : await chunkVHNWLON6_cjs.loadCapabilityRecords();
23388
23599
  const record = resourceKey === void 0 ? void 0 : records.find((r) => r.resource === resourceKey && r.operation === "query");
23389
23600
  if (record === void 0) return void 0;
23390
23601
  const strings = (v) => Array.isArray(v) ? v.filter((f) => typeof f === "string" && f.trim() !== "") : [];
@@ -23729,7 +23940,7 @@ function validateFetchManyItems(items, cap, opName = "fetchByIds", capRef = `FET
23729
23940
  continue;
23730
23941
  }
23731
23942
  const rel = RELATIONSHIP_MAP[resourceKey];
23732
- if (rel !== void 0 && rel.parentScoped) {
23943
+ if (rel !== void 0 && rel.parentScoped && resourceKey !== "time_off_requests") {
23733
23944
  problems.push(
23734
23945
  `${at}.resource: "${resourceKey}" is a parent-scoped child \u2014 its get needs (parentId, id); ${opName} takes single numeric ids of TOP-LEVEL records (scoped reads: client.${camelKey(resourceKey)}.get(parentId, id))`
23735
23946
  );
@@ -24029,7 +24240,7 @@ async function uiLink(client, input) {
24029
24240
  var indexPromise = null;
24030
24241
  function operationIndex() {
24031
24242
  if (indexPromise === null) {
24032
- indexPromise = chunkJLCHKCEB_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
24243
+ indexPromise = chunkVHNWLON6_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
24033
24244
  }
24034
24245
  return indexPromise;
24035
24246
  }
@@ -28701,7 +28912,9 @@ exports.invokeReadPages = invokeReadPages;
28701
28912
  exports.invokeWrite = invokeWrite;
28702
28913
  exports.isAutotaskError = isAutotaskError;
28703
28914
  exports.isClosedStatus = isClosedStatus;
28915
+ exports.isDateYMD = isDateYMD;
28704
28916
  exports.isDeterministicVendor500 = isDeterministicVendor500;
28917
+ exports.isRecord = isRecord2;
28705
28918
  exports.joinedCompositePart = joinedCompositePart;
28706
28919
  exports.mergeDetails = mergeDetails;
28707
28920
  exports.mergePartialBody = mergePartialBody;
@@ -1,5 +1,5 @@
1
- import { ConfigurationItemsResource, ContactsResource, InventoryProductsResource, QuotesResource, ResourceTimeOffAdditionalResource, ResourceTimeOffBalancesResource, ResourcesResource, ServiceCallsResource, TicketChargesResource, TicketsResource, TimeOffRequestsResource, AuthenticateResource, EntityInformationResource, ModulesResource, ThresholdInformationResource, VersionResource, VersionInformationResource, ZoneInformationResource } from './chunk-5COLIVBE.js';
2
- import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, runBounded } from './chunk-4OR3XBIP.js';
1
+ import { ConfigurationItemsResource, ContactsResource, InventoryProductsResource, QuotesResource, ResourceTimeOffAdditionalResource, ResourceTimeOffBalancesResource, ResourcesResource, ServiceCallsResource, TicketChargesResource, TicketsResource, TimeOffRequestsResource, AuthenticateResource, EntityInformationResource, ModulesResource, ThresholdInformationResource, VersionResource, VersionInformationResource, ZoneInformationResource } from './chunk-RFH4VBMX.js';
2
+ import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, runBounded } from './chunk-VHN5B7OQ.js';
3
3
 
4
4
  // src/client.ts
5
5
  var AutotaskClient = class {
@@ -121,6 +121,7 @@ var AutotaskClient = class {
121
121
  tagAliases;
122
122
  tagGroups;
123
123
  tags;
124
+ taskNotes;
124
125
  tasks;
125
126
  taskSecondaryResources;
126
127
  taxRegions;
@@ -1,8 +1,8 @@
1
1
  // src/capabilities.ts
2
2
  var CAPABILITY_PLAN_HASHES = {
3
- "B": "275fdf2fd6712f9384c1a65f98c5faf1fda9695475ffbdf35c08e574c18b4157",
4
- "A": "275fdf2fd6712f9384c1a65f98c5faf1fda9695475ffbdf35c08e574c18b4157",
5
- "operations": "275fdf2fd6712f9384c1a65f98c5faf1fda9695475ffbdf35c08e574c18b4157"
3
+ "B": "3dfaa99bd81e843635bafd242e5229270f259de68c6a32d483a6640402f3b187",
4
+ "A": "3dfaa99bd81e843635bafd242e5229270f259de68c6a32d483a6640402f3b187",
5
+ "operations": "3dfaa99bd81e843635bafd242e5229270f259de68c6a32d483a6640402f3b187"
6
6
  };
7
7
  var cached = null;
8
8
  function loadCapabilities() {