node-autotask 0.86.0 → 0.88.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 (46) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/MCP_TOOL_CATALOG.json +152 -9
  3. package/README.md +1 -1
  4. package/capabilities.json +714 -194
  5. package/dist/capabilities-data.js +713 -193
  6. package/dist/capabilities.cjs +4 -4
  7. package/dist/capabilities.js +1 -1
  8. package/dist/{chunk-SZ33SCCI.cjs → chunk-AB326MJO.cjs} +200 -200
  9. package/dist/{chunk-BD4AUGCJ.cjs → chunk-CM5O672I.cjs} +5 -4
  10. package/dist/{chunk-23LTWBKP.cjs → chunk-ESKQAINP.cjs} +31 -30
  11. package/dist/{chunk-YX6SSS4I.cjs → chunk-GEFUSYH5.cjs} +739 -378
  12. package/dist/{chunk-ELZTECDS.js → chunk-K72PPAAD.js} +726 -365
  13. package/dist/{chunk-AZ54RMQR.js → chunk-LGOJ2HBH.js} +3 -2
  14. package/dist/{chunk-DVD7RZIB.js → chunk-QKRHKLVY.js} +2 -2
  15. package/dist/{chunk-EYRQUMA2.cjs → chunk-SHJ7EOBW.cjs} +3 -3
  16. package/dist/{chunk-7NKB4UXV.js → chunk-X6VWD6WW.js} +5 -4
  17. package/dist/{chunk-KYFJOIG4.js → chunk-ZADTVF6M.js} +3 -3
  18. package/dist/{index-B3zO78nP.d.ts → index-BFgZJsqx.d.ts} +19 -13
  19. package/dist/{index-CIgmz8qI.d.cts → index-D0KHVqoO.d.cts} +37 -3
  20. package/dist/{index-CIgmz8qI.d.ts → index-D0KHVqoO.d.ts} +37 -3
  21. package/dist/{index-C2p8D2mZ.d.cts → index-DsA1-2GA.d.cts} +19 -13
  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/docs/VENDOR-QUIRKS.md +34 -17
  46. package/package.json +1 -1
@@ -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 chunkSZ33SCCI_cjs = require('./chunk-SZ33SCCI.cjs');
4
- var chunkYX6SSS4I_cjs = require('./chunk-YX6SSS4I.cjs');
3
+ var chunkAB326MJO_cjs = require('./chunk-AB326MJO.cjs');
4
+ var chunkGEFUSYH5_cjs = require('./chunk-GEFUSYH5.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 = chunkYX6SSS4I_cjs.resolveConfig(options);
178
- this.http = new chunkYX6SSS4I_cjs.HttpClient(this.config);
178
+ this.config = chunkGEFUSYH5_cjs.resolveConfig(options);
179
+ this.http = new chunkGEFUSYH5_cjs.HttpClient(this.config);
179
180
  this.http.client = this;
180
- for (const entry of chunkYX6SSS4I_cjs.SIMPLE_RESOURCES) {
181
- this[entry.accessor] = new chunkYX6SSS4I_cjs.GenericResource(this.http, entry, this.config.pageSize);
181
+ for (const entry of chunkGEFUSYH5_cjs.SIMPLE_RESOURCES) {
182
+ this[entry.accessor] = new chunkGEFUSYH5_cjs.GenericResource(this.http, entry, this.config.pageSize);
182
183
  }
183
- this.companies = new chunkYX6SSS4I_cjs.CompaniesResource(this.http, this.config.pageSize);
184
- this.configurationItems = new chunkSZ33SCCI_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
185
- this.contacts = new chunkSZ33SCCI_cjs.ContactsResource(this.http, this.config.pageSize);
186
- this.contracts = new chunkYX6SSS4I_cjs.ContractsResource(this.http, this.config.pageSize);
187
- this.inventoryProducts = new chunkSZ33SCCI_cjs.InventoryProductsResource(this.http, this.config.pageSize);
188
- this.invoices = new chunkYX6SSS4I_cjs.InvoicesResource(this.http, this.config.pageSize);
189
- this.quotes = new chunkSZ33SCCI_cjs.QuotesResource(this.http, this.config.pageSize);
190
- this.resourceTimeOffAdditional = new chunkSZ33SCCI_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
191
- this.resourceTimeOffBalances = new chunkSZ33SCCI_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
192
- this.resources = new chunkSZ33SCCI_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
193
- this.serviceCalls = new chunkSZ33SCCI_cjs.ServiceCallsResource(this.http, this.config.pageSize);
194
- this.ticketCharges = new chunkSZ33SCCI_cjs.TicketChargesResource(this.http, this.config.pageSize);
195
- this.tickets = new chunkSZ33SCCI_cjs.TicketsResource(this.http, this.config.pageSize);
196
- this.timeEntries = new chunkYX6SSS4I_cjs.TimeEntriesResource(this.http, this.config.pageSize);
197
- this.timeOffRequests = new chunkSZ33SCCI_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
198
- this.authenticateResource = new chunkSZ33SCCI_cjs.AuthenticateResource(this.http);
199
- this.entityInformation = new chunkSZ33SCCI_cjs.EntityInformationResource(this.http);
200
- this.modules = new chunkSZ33SCCI_cjs.ModulesResource(this.http);
201
- this.thresholdInformation = new chunkSZ33SCCI_cjs.ThresholdInformationResource(this.http);
202
- this.version = new chunkSZ33SCCI_cjs.VersionResource(this.http);
203
- this.versionInformation = new chunkSZ33SCCI_cjs.VersionInformationResource(this.http);
204
- this.zoneInformation = new chunkSZ33SCCI_cjs.ZoneInformationResource(this.http);
184
+ this.companies = new chunkGEFUSYH5_cjs.CompaniesResource(this.http, this.config.pageSize);
185
+ this.configurationItems = new chunkAB326MJO_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
186
+ this.contacts = new chunkAB326MJO_cjs.ContactsResource(this.http, this.config.pageSize);
187
+ this.contracts = new chunkGEFUSYH5_cjs.ContractsResource(this.http, this.config.pageSize);
188
+ this.inventoryProducts = new chunkAB326MJO_cjs.InventoryProductsResource(this.http, this.config.pageSize);
189
+ this.invoices = new chunkGEFUSYH5_cjs.InvoicesResource(this.http, this.config.pageSize);
190
+ this.quotes = new chunkAB326MJO_cjs.QuotesResource(this.http, this.config.pageSize);
191
+ this.resourceTimeOffAdditional = new chunkAB326MJO_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
192
+ this.resourceTimeOffBalances = new chunkAB326MJO_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
193
+ this.resources = new chunkAB326MJO_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
194
+ this.serviceCalls = new chunkAB326MJO_cjs.ServiceCallsResource(this.http, this.config.pageSize);
195
+ this.ticketCharges = new chunkAB326MJO_cjs.TicketChargesResource(this.http, this.config.pageSize);
196
+ this.tickets = new chunkAB326MJO_cjs.TicketsResource(this.http, this.config.pageSize);
197
+ this.timeEntries = new chunkGEFUSYH5_cjs.TimeEntriesResource(this.http, this.config.pageSize);
198
+ this.timeOffRequests = new chunkAB326MJO_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
199
+ this.authenticateResource = new chunkAB326MJO_cjs.AuthenticateResource(this.http);
200
+ this.entityInformation = new chunkAB326MJO_cjs.EntityInformationResource(this.http);
201
+ this.modules = new chunkAB326MJO_cjs.ModulesResource(this.http);
202
+ this.thresholdInformation = new chunkAB326MJO_cjs.ThresholdInformationResource(this.http);
203
+ this.version = new chunkAB326MJO_cjs.VersionResource(this.http);
204
+ this.versionInformation = new chunkAB326MJO_cjs.VersionInformationResource(this.http);
205
+ this.zoneInformation = new chunkAB326MJO_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 chunkYX6SSS4I_cjs.runWithSignal(signal, fn);
239
+ return chunkGEFUSYH5_cjs.runWithSignal(signal, fn);
239
240
  }
240
241
  async batch(fn, items, opts = {}) {
241
- return chunkYX6SSS4I_cjs.runBounded(fn, items, { ...opts, concurrency: opts.concurrency ?? this.config.maxConcurrent });
242
+ return chunkGEFUSYH5_cjs.runBounded(fn, items, { ...opts, concurrency: opts.concurrency ?? this.config.maxConcurrent });
242
243
  }
243
244
  };
244
245