node-autotask 0.87.0 → 0.88.1

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 (45) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/MCP_TOOL_CATALOG.json +152 -9
  3. package/README.md +1 -1
  4. package/capabilities.json +546 -26
  5. package/dist/capabilities-data.js +545 -25
  6. package/dist/capabilities.cjs +4 -4
  7. package/dist/capabilities.js +1 -1
  8. package/dist/{chunk-G57Q7OAC.js → chunk-33UVHMFN.js} +2 -2
  9. package/dist/{chunk-BD4AUGCJ.cjs → chunk-CM5O672I.cjs} +5 -4
  10. package/dist/{chunk-HUA4WB4N.cjs → chunk-DSHWQMF2.cjs} +31 -30
  11. package/dist/{chunk-RU4ECNQN.cjs → chunk-JHDT4O7N.cjs} +200 -200
  12. package/dist/{chunk-NXSQXXNK.js → chunk-JVVE4XEN.js} +3 -2
  13. package/dist/{chunk-GAFG7RHG.js → chunk-KM7ITBOT.js} +541 -304
  14. package/dist/{chunk-YVNGUGG6.cjs → chunk-SHJ7EOBW.cjs} +3 -3
  15. package/dist/{chunk-7NKB4UXV.js → chunk-X6VWD6WW.js} +5 -4
  16. package/dist/{chunk-CUZJJCI5.cjs → chunk-YTOBU3Z6.cjs} +553 -316
  17. package/dist/{chunk-EXNDYJPG.js → chunk-ZADTVF6M.js} +3 -3
  18. package/dist/{index-Cxfr_DOD.d.cts → index-4jmitXBs.d.cts} +29 -1
  19. package/dist/{index-Cxfr_DOD.d.ts → index-4jmitXBs.d.ts} +29 -1
  20. package/dist/{index-CsL5gGJo.d.ts → index-GSA44LRd.d.ts} +13 -7
  21. package/dist/{index-DGiua9uK.d.cts → index-XDIy_GvD.d.cts} +13 -7
  22. package/dist/index.cjs +90 -87
  23. package/dist/index.d.cts +4 -3
  24. package/dist/index.d.ts +4 -3
  25. package/dist/index.js +9 -6
  26. package/dist/operations/index.cjs +53 -53
  27. package/dist/operations/index.d.cts +4 -4
  28. package/dist/operations/index.d.ts +4 -4
  29. package/dist/operations/index.js +3 -3
  30. package/dist/pool.cjs +13 -13
  31. package/dist/pool.d.cts +1 -1
  32. package/dist/pool.d.ts +1 -1
  33. package/dist/pool.js +5 -5
  34. package/dist/resources/index.cjs +28 -28
  35. package/dist/resources/index.d.cts +2 -2
  36. package/dist/resources/index.d.ts +2 -2
  37. package/dist/resources/index.js +4 -4
  38. package/dist/types/index.d.cts +1 -1
  39. package/dist/types/index.d.ts +1 -1
  40. package/dist/untrusted.cjs +11 -11
  41. package/dist/untrusted.d.cts +1 -1
  42. package/dist/untrusted.d.ts +1 -1
  43. package/dist/untrusted.js +1 -1
  44. package/docs/API.md +6 -2
  45. package/package.json +1 -1
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkYVNGUGG6_cjs = require('./chunk-YVNGUGG6.cjs');
3
+ var chunkSHJ7EOBW_cjs = require('./chunk-SHJ7EOBW.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "CAPABILITY_PLAN_HASHES", {
8
8
  enumerable: true,
9
- get: function () { return chunkYVNGUGG6_cjs.CAPABILITY_PLAN_HASHES; }
9
+ get: function () { return chunkSHJ7EOBW_cjs.CAPABILITY_PLAN_HASHES; }
10
10
  });
11
11
  Object.defineProperty(exports, "loadCapabilities", {
12
12
  enumerable: true,
13
- get: function () { return chunkYVNGUGG6_cjs.loadCapabilities; }
13
+ get: function () { return chunkSHJ7EOBW_cjs.loadCapabilities; }
14
14
  });
15
15
  Object.defineProperty(exports, "loadCapabilityRecords", {
16
16
  enumerable: true,
17
- get: function () { return chunkYVNGUGG6_cjs.loadCapabilityRecords; }
17
+ get: function () { return chunkSHJ7EOBW_cjs.loadCapabilityRecords; }
18
18
  });
@@ -1 +1 @@
1
- export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-EXNDYJPG.js';
1
+ export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-ZADTVF6M.js';
@@ -1,5 +1,5 @@
1
- import { GenericResource, readTasks, OperationNotSupportedError, parseIdentifier, AutotaskConfigError, isRecord, isDateYMD, isAutotaskError, RateLimitError, MaintenanceError, AutotaskError, StaleObjectError, buildDryRunResult, createNamePlan, resolveCompositeNames, addNameSibling, NotFoundError, unwrapItems, ConflictError, clientOf, compositePartLimit, invokeRead, compositePart, openTicketsOfPart, unwrapOperation, unwrapItem, ResolutionError, joinedCompositePart, runMove, resolveTicketStatusSemantics, openStatusFilter, isClosedStatus, vendorId, resolveLineOfBusinessChain, cachedRecordGet, uiLinkFor, refuse, queryRows, mergePartialBody, TICKET_LABEL_FIELDS, addLabelSibling, parseVendorErrors, RELATIONSHIP_MAP, cursorToPath } from './chunk-GAFG7RHG.js';
2
- import { loadCapabilityRecords } from './chunk-EXNDYJPG.js';
1
+ import { GenericResource, readTasks, OperationNotSupportedError, parseIdentifier, AutotaskConfigError, isRecord, isDateYMD, isAutotaskError, RateLimitError, MaintenanceError, AutotaskError, StaleObjectError, buildDryRunResult, createNamePlan, resolveCompositeNames, addNameSibling, NotFoundError, unwrapItems, ConflictError, clientOf, compositePartLimit, invokeRead, compositePart, openTicketsOfPart, unwrapOperation, unwrapItem, ResolutionError, joinedCompositePart, runMove, resolveTicketStatusSemantics, openStatusFilter, isClosedStatus, vendorId, resolveLineOfBusinessChain, cachedRecordGet, uiLinkFor, refuse, queryRows, mergePartialBody, TICKET_LABEL_FIELDS, addLabelSibling, parseVendorErrors, RELATIONSHIP_MAP, cursorToPath } from './chunk-KM7ITBOT.js';
2
+ import { loadCapabilityRecords } from './chunk-ZADTVF6M.js';
3
3
 
4
4
  // src/resources/special/configuration_items.ts
5
5
  async function fetchRecord(http, path, label, readOpts) {
@@ -48,7 +48,7 @@ function markUntrusted(record, fields) {
48
48
  }
49
49
  function deepMarkUntrusted(value, fields, projector) {
50
50
  const fieldSet = new Set(fields);
51
- const walk = (input, depth, wrap = false, udf = false, target, key) => {
51
+ const walk = (input, depth, wrap = false, udf = false, target, key, diff = false) => {
52
52
  if (typeof input === "string") {
53
53
  if (!wrap) return input;
54
54
  return projector !== void 0 && target !== void 0 && key !== void 0 ? projector(input, target, key) : wrapUntrusted(input) ?? input;
@@ -59,7 +59,7 @@ function deepMarkUntrusted(value, fields, projector) {
59
59
  const out2 = new Array(input.length);
60
60
  let changed2 = fieldSet.size > 0;
61
61
  input.forEach((entry, index) => {
62
- const projected = walk(entry, depth + 1, wrap, udf && isPlainRecord(entry), out2, index);
62
+ const projected = walk(entry, depth + 1, wrap, udf && isPlainRecord(entry), out2, index, diff);
63
63
  out2[index] = projected;
64
64
  if (projected !== entry || projector !== void 0 && wrap && typeof entry === "string") changed2 = true;
65
65
  });
@@ -67,9 +67,10 @@ function deepMarkUntrusted(value, fields, projector) {
67
67
  }
68
68
  const out = {};
69
69
  let changed = fieldSet.size > 0;
70
+ const untrustedDiff = diff && typeof input.field === "string" && fieldSet.has(input.field);
70
71
  for (const [key2, entry] of Object.entries(input)) {
71
- const marked = fieldSet.has(key2) || udf && key2 === "value";
72
- const projected = walk(entry, depth + 1, marked, key2 === "userDefinedFields" && Array.isArray(entry), out, key2);
72
+ const marked = fieldSet.has(key2) || udf && key2 === "value" || untrustedDiff && (key2 === "from" || key2 === "to");
73
+ const projected = walk(entry, depth + 1, marked, key2 === "userDefinedFields" && Array.isArray(entry), out, key2, input.simulated === true && key2 === "diff" && Array.isArray(entry));
73
74
  if (projected !== entry || projector !== void 0 && marked && typeof entry === "string") changed = true;
74
75
  Object.defineProperty(out, key2, { value: projected, enumerable: true, writable: true, configurable: true });
75
76
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkRU4ECNQN_cjs = require('./chunk-RU4ECNQN.cjs');
4
- var chunkCUZJJCI5_cjs = require('./chunk-CUZJJCI5.cjs');
3
+ var chunkJHDT4O7N_cjs = require('./chunk-JHDT4O7N.cjs');
4
+ var chunkYTOBU3Z6_cjs = require('./chunk-YTOBU3Z6.cjs');
5
5
 
6
6
  // src/client.ts
7
7
  var AutotaskClient = class {
@@ -81,6 +81,7 @@ var AutotaskClient = class {
81
81
  expenseReports;
82
82
  holidays;
83
83
  holidaySets;
84
+ inventoryLocations;
84
85
  inventoryProducts;
85
86
  invoices;
86
87
  invoiceTemplates;
@@ -174,34 +175,34 @@ var AutotaskClient = class {
174
175
  * anything is wired. Construction issues NO request.
175
176
  */
176
177
  constructor(options) {
177
- this.config = chunkCUZJJCI5_cjs.resolveConfig(options);
178
- this.http = new chunkCUZJJCI5_cjs.HttpClient(this.config);
178
+ this.config = chunkYTOBU3Z6_cjs.resolveConfig(options);
179
+ this.http = new chunkYTOBU3Z6_cjs.HttpClient(this.config);
179
180
  this.http.client = this;
180
- for (const entry of chunkCUZJJCI5_cjs.SIMPLE_RESOURCES) {
181
- this[entry.accessor] = new chunkCUZJJCI5_cjs.GenericResource(this.http, entry, this.config.pageSize);
181
+ for (const entry of chunkYTOBU3Z6_cjs.SIMPLE_RESOURCES) {
182
+ this[entry.accessor] = new chunkYTOBU3Z6_cjs.GenericResource(this.http, entry, this.config.pageSize);
182
183
  }
183
- this.companies = new chunkCUZJJCI5_cjs.CompaniesResource(this.http, this.config.pageSize);
184
- this.configurationItems = new chunkRU4ECNQN_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
185
- this.contacts = new chunkRU4ECNQN_cjs.ContactsResource(this.http, this.config.pageSize);
186
- this.contracts = new chunkCUZJJCI5_cjs.ContractsResource(this.http, this.config.pageSize);
187
- this.inventoryProducts = new chunkRU4ECNQN_cjs.InventoryProductsResource(this.http, this.config.pageSize);
188
- this.invoices = new chunkCUZJJCI5_cjs.InvoicesResource(this.http, this.config.pageSize);
189
- this.quotes = new chunkRU4ECNQN_cjs.QuotesResource(this.http, this.config.pageSize);
190
- this.resourceTimeOffAdditional = new chunkRU4ECNQN_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
191
- this.resourceTimeOffBalances = new chunkRU4ECNQN_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
192
- this.resources = new chunkRU4ECNQN_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
193
- this.serviceCalls = new chunkRU4ECNQN_cjs.ServiceCallsResource(this.http, this.config.pageSize);
194
- this.ticketCharges = new chunkRU4ECNQN_cjs.TicketChargesResource(this.http, this.config.pageSize);
195
- this.tickets = new chunkRU4ECNQN_cjs.TicketsResource(this.http, this.config.pageSize);
196
- this.timeEntries = new chunkCUZJJCI5_cjs.TimeEntriesResource(this.http, this.config.pageSize);
197
- this.timeOffRequests = new chunkRU4ECNQN_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
198
- this.authenticateResource = new chunkRU4ECNQN_cjs.AuthenticateResource(this.http);
199
- this.entityInformation = new chunkRU4ECNQN_cjs.EntityInformationResource(this.http);
200
- this.modules = new chunkRU4ECNQN_cjs.ModulesResource(this.http);
201
- this.thresholdInformation = new chunkRU4ECNQN_cjs.ThresholdInformationResource(this.http);
202
- this.version = new chunkRU4ECNQN_cjs.VersionResource(this.http);
203
- this.versionInformation = new chunkRU4ECNQN_cjs.VersionInformationResource(this.http);
204
- this.zoneInformation = new chunkRU4ECNQN_cjs.ZoneInformationResource(this.http);
184
+ this.companies = new chunkYTOBU3Z6_cjs.CompaniesResource(this.http, this.config.pageSize);
185
+ this.configurationItems = new chunkJHDT4O7N_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
186
+ this.contacts = new chunkJHDT4O7N_cjs.ContactsResource(this.http, this.config.pageSize);
187
+ this.contracts = new chunkYTOBU3Z6_cjs.ContractsResource(this.http, this.config.pageSize);
188
+ this.inventoryProducts = new chunkJHDT4O7N_cjs.InventoryProductsResource(this.http, this.config.pageSize);
189
+ this.invoices = new chunkYTOBU3Z6_cjs.InvoicesResource(this.http, this.config.pageSize);
190
+ this.quotes = new chunkJHDT4O7N_cjs.QuotesResource(this.http, this.config.pageSize);
191
+ this.resourceTimeOffAdditional = new chunkJHDT4O7N_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
192
+ this.resourceTimeOffBalances = new chunkJHDT4O7N_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
193
+ this.resources = new chunkJHDT4O7N_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
194
+ this.serviceCalls = new chunkJHDT4O7N_cjs.ServiceCallsResource(this.http, this.config.pageSize);
195
+ this.ticketCharges = new chunkJHDT4O7N_cjs.TicketChargesResource(this.http, this.config.pageSize);
196
+ this.tickets = new chunkJHDT4O7N_cjs.TicketsResource(this.http, this.config.pageSize);
197
+ this.timeEntries = new chunkYTOBU3Z6_cjs.TimeEntriesResource(this.http, this.config.pageSize);
198
+ this.timeOffRequests = new chunkJHDT4O7N_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
199
+ this.authenticateResource = new chunkJHDT4O7N_cjs.AuthenticateResource(this.http);
200
+ this.entityInformation = new chunkJHDT4O7N_cjs.EntityInformationResource(this.http);
201
+ this.modules = new chunkJHDT4O7N_cjs.ModulesResource(this.http);
202
+ this.thresholdInformation = new chunkJHDT4O7N_cjs.ThresholdInformationResource(this.http);
203
+ this.version = new chunkJHDT4O7N_cjs.VersionResource(this.http);
204
+ this.versionInformation = new chunkJHDT4O7N_cjs.VersionInformationResource(this.http);
205
+ this.zoneInformation = new chunkJHDT4O7N_cjs.ZoneInformationResource(this.http);
205
206
  }
206
207
  /**
207
208
  * `GET /V1.0/Authenticate` → `AuthTokenResultModel` (as-is). The SDK does
@@ -235,10 +236,10 @@ var AutotaskClient = class {
235
236
  * parameter on each: `await client.withSignal(signal, () => invoke(client, ...))`.
236
237
  */
237
238
  withSignal(signal, fn) {
238
- return chunkCUZJJCI5_cjs.runWithSignal(signal, fn);
239
+ return chunkYTOBU3Z6_cjs.runWithSignal(signal, fn);
239
240
  }
240
241
  async batch(fn, items, opts = {}) {
241
- return chunkCUZJJCI5_cjs.runBounded(fn, items, { ...opts, concurrency: opts.concurrency ?? this.config.maxConcurrent });
242
+ return chunkYTOBU3Z6_cjs.runBounded(fn, items, { ...opts, concurrency: opts.concurrency ?? this.config.maxConcurrent });
242
243
  }
243
244
  };
244
245