node-autotask 0.88.1 → 0.90.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.90.0] - 2026-11-21
11
+
12
+ ### Added
13
+
14
+ - The time-entry relationship map now warns that billing approval fields do not establish posted status and points to the billing-item link (#472).
15
+
16
+ ## [0.89.0] - 2026-11-21
17
+
18
+ ### Changed
19
+
20
+ - **Breaking:** Personal and business-sensitive fields now pass through by default in parsed responses, vendor errors and dry-run results. Set `redactPersonalData: true` to retain the previous redaction policy. Structured secret fields remain redacted under either policy (#498).
21
+
10
22
  ## [0.88.1] - 2026-11-21
11
23
 
12
24
  - Require own submitted and current InventoryLocations fields for create validation, inactivation guards and persisted verification. Validate the requested identity and response envelope, keep mutation IDs out of create bodies, and clarify the collection PATCH input comment (#504).
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "generatedBy": "scripts/build-tool-catalog.mjs",
3
- "generatedAt": "2026-11-20T22:03:19.483Z",
4
- "planHash": "911f1470a0ebbe66c39579e8d26d97253914f4fecfe3b8d69ee61bd1710be132",
3
+ "generatedAt": "2026-11-21T03:40:53.270Z",
4
+ "planHash": "2f78ad6e25fd96f024dfc749c3c9d1b8dbf52d8a23e097bd5046605a9975787c",
5
5
  "metaTools": [
6
6
  {
7
7
  "name": "autotask_catalog",
package/README.md CHANGED
@@ -6,10 +6,9 @@ dependencies. Built for building MCP servers and integrations.
6
6
  The SDK is also the **deterministic execution layer for agents**: a generated capability registry (one record per operation, across the entity
7
7
  registry in `capabilities.json`), a mechanical MCP substrate (registry → manifest → overrides → core tier +
8
8
  catalog meta-tool), and a write governor (dry-run-first, destructive
9
- confirmation). The SDK boundary also redacts response field values — the
10
- secret fields (`password`, `secretKey`, `secret`) always, personal and
11
- business-sensitive data by default (`redactPersonalData` opt-out; `authToken`
12
- exempt).
9
+ confirmation). The SDK always redacts structured secret fields
10
+ (`password`, `secretKey`, `secret`). Set `redactPersonalData: true` to also
11
+ redact personal and business-sensitive fields. `authToken` is exempt.
13
12
  It is MCP-import-free by design — the generated data and `operations.invoke` are the
14
13
  substrate; the integration layers (the MCP server
15
14
  [`iit-mcp-autotask`](https://github.com/msoukhomlinov/iit-mcp-autotask), the n8n thin importer) build
package/capabilities.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
- "generatedAt": "2026-11-20T22:03:19.300Z",
2
+ "generatedAt": "2026-11-21T03:40:52.155Z",
3
3
  "groups": {
4
4
  "B": {
5
- "planHash": "911f1470a0ebbe66c39579e8d26d97253914f4fecfe3b8d69ee61bd1710be132",
6
- "builtAt": "2026-11-20T22:03:19.289Z",
5
+ "planHash": "2f78ad6e25fd96f024dfc749c3c9d1b8dbf52d8a23e097bd5046605a9975787c",
6
+ "builtAt": "2026-11-21T03:40:52.139Z",
7
7
  "records": [
8
8
  {
9
9
  "id": "appointments.count",
@@ -46603,8 +46603,8 @@
46603
46603
  ]
46604
46604
  },
46605
46605
  "A": {
46606
- "planHash": "911f1470a0ebbe66c39579e8d26d97253914f4fecfe3b8d69ee61bd1710be132",
46607
- "builtAt": "2026-11-20T22:03:19.289Z",
46606
+ "planHash": "2f78ad6e25fd96f024dfc749c3c9d1b8dbf52d8a23e097bd5046605a9975787c",
46607
+ "builtAt": "2026-11-21T03:40:52.140Z",
46608
46608
  "records": [
46609
46609
  {
46610
46610
  "id": "attachment_info.count",
@@ -92289,8 +92289,8 @@
92289
92289
  ]
92290
92290
  },
92291
92291
  "operations": {
92292
- "planHash": "911f1470a0ebbe66c39579e8d26d97253914f4fecfe3b8d69ee61bd1710be132",
92293
- "builtAt": "2026-11-20T22:03:19.289Z",
92292
+ "planHash": "2f78ad6e25fd96f024dfc749c3c9d1b8dbf52d8a23e097bd5046605a9975787c",
92293
+ "builtAt": "2026-11-21T03:40:52.140Z",
92294
92294
  "records": [
92295
92295
  {
92296
92296
  "id": "operations.aggregate",
@@ -462,8 +462,8 @@ const CAPABILITY_DATA = {
462
462
  ],
463
463
  "groups": {
464
464
  "B": {
465
- "planHash": "911f1470a0ebbe66c39579e8d26d97253914f4fecfe3b8d69ee61bd1710be132",
466
- "builtAt": "2026-11-20T22:03:19.289Z",
465
+ "planHash": "2f78ad6e25fd96f024dfc749c3c9d1b8dbf52d8a23e097bd5046605a9975787c",
466
+ "builtAt": "2026-11-21T03:40:52.139Z",
467
467
  "records": [
468
468
  {
469
469
  "id": "appointments.count",
@@ -47063,8 +47063,8 @@ const CAPABILITY_DATA = {
47063
47063
  ]
47064
47064
  },
47065
47065
  "A": {
47066
- "planHash": "911f1470a0ebbe66c39579e8d26d97253914f4fecfe3b8d69ee61bd1710be132",
47067
- "builtAt": "2026-11-20T22:03:19.289Z",
47066
+ "planHash": "2f78ad6e25fd96f024dfc749c3c9d1b8dbf52d8a23e097bd5046605a9975787c",
47067
+ "builtAt": "2026-11-21T03:40:52.140Z",
47068
47068
  "records": [
47069
47069
  {
47070
47070
  "id": "attachment_info.count",
@@ -92749,8 +92749,8 @@ const CAPABILITY_DATA = {
92749
92749
  ]
92750
92750
  },
92751
92751
  "operations": {
92752
- "planHash": "911f1470a0ebbe66c39579e8d26d97253914f4fecfe3b8d69ee61bd1710be132",
92753
- "builtAt": "2026-11-20T22:03:19.289Z",
92752
+ "planHash": "2f78ad6e25fd96f024dfc749c3c9d1b8dbf52d8a23e097bd5046605a9975787c",
92753
+ "builtAt": "2026-11-21T03:40:52.140Z",
92754
92754
  "records": [
92755
92755
  {
92756
92756
  "id": "operations.aggregate",
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkSHJ7EOBW_cjs = require('./chunk-SHJ7EOBW.cjs');
3
+ var chunkZLMYYO7R_cjs = require('./chunk-ZLMYYO7R.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "CAPABILITY_PLAN_HASHES", {
8
8
  enumerable: true,
9
- get: function () { return chunkSHJ7EOBW_cjs.CAPABILITY_PLAN_HASHES; }
9
+ get: function () { return chunkZLMYYO7R_cjs.CAPABILITY_PLAN_HASHES; }
10
10
  });
11
11
  Object.defineProperty(exports, "loadCapabilities", {
12
12
  enumerable: true,
13
- get: function () { return chunkSHJ7EOBW_cjs.loadCapabilities; }
13
+ get: function () { return chunkZLMYYO7R_cjs.loadCapabilities; }
14
14
  });
15
15
  Object.defineProperty(exports, "loadCapabilityRecords", {
16
16
  enumerable: true,
17
- get: function () { return chunkSHJ7EOBW_cjs.loadCapabilityRecords; }
17
+ get: function () { return chunkZLMYYO7R_cjs.loadCapabilityRecords; }
18
18
  });
@@ -1 +1 @@
1
- export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-ZADTVF6M.js';
1
+ export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-K5X4BPQC.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkJHDT4O7N_cjs = require('./chunk-JHDT4O7N.cjs');
4
- var chunkYTOBU3Z6_cjs = require('./chunk-YTOBU3Z6.cjs');
3
+ var chunkD7MJC7HA_cjs = require('./chunk-D7MJC7HA.cjs');
4
+ var chunkOI6E5XQA_cjs = require('./chunk-OI6E5XQA.cjs');
5
5
 
6
6
  // src/client.ts
7
7
  var AutotaskClient = class {
@@ -175,34 +175,34 @@ var AutotaskClient = class {
175
175
  * anything is wired. Construction issues NO request.
176
176
  */
177
177
  constructor(options) {
178
- this.config = chunkYTOBU3Z6_cjs.resolveConfig(options);
179
- this.http = new chunkYTOBU3Z6_cjs.HttpClient(this.config);
178
+ this.config = chunkOI6E5XQA_cjs.resolveConfig(options);
179
+ this.http = new chunkOI6E5XQA_cjs.HttpClient(this.config);
180
180
  this.http.client = this;
181
- for (const entry of chunkYTOBU3Z6_cjs.SIMPLE_RESOURCES) {
182
- this[entry.accessor] = new chunkYTOBU3Z6_cjs.GenericResource(this.http, entry, this.config.pageSize);
181
+ for (const entry of chunkOI6E5XQA_cjs.SIMPLE_RESOURCES) {
182
+ this[entry.accessor] = new chunkOI6E5XQA_cjs.GenericResource(this.http, entry, this.config.pageSize);
183
183
  }
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);
184
+ this.companies = new chunkOI6E5XQA_cjs.CompaniesResource(this.http, this.config.pageSize);
185
+ this.configurationItems = new chunkD7MJC7HA_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
186
+ this.contacts = new chunkD7MJC7HA_cjs.ContactsResource(this.http, this.config.pageSize);
187
+ this.contracts = new chunkOI6E5XQA_cjs.ContractsResource(this.http, this.config.pageSize);
188
+ this.inventoryProducts = new chunkD7MJC7HA_cjs.InventoryProductsResource(this.http, this.config.pageSize);
189
+ this.invoices = new chunkOI6E5XQA_cjs.InvoicesResource(this.http, this.config.pageSize);
190
+ this.quotes = new chunkD7MJC7HA_cjs.QuotesResource(this.http, this.config.pageSize);
191
+ this.resourceTimeOffAdditional = new chunkD7MJC7HA_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
192
+ this.resourceTimeOffBalances = new chunkD7MJC7HA_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
193
+ this.resources = new chunkD7MJC7HA_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
194
+ this.serviceCalls = new chunkD7MJC7HA_cjs.ServiceCallsResource(this.http, this.config.pageSize);
195
+ this.ticketCharges = new chunkD7MJC7HA_cjs.TicketChargesResource(this.http, this.config.pageSize);
196
+ this.tickets = new chunkD7MJC7HA_cjs.TicketsResource(this.http, this.config.pageSize);
197
+ this.timeEntries = new chunkOI6E5XQA_cjs.TimeEntriesResource(this.http, this.config.pageSize);
198
+ this.timeOffRequests = new chunkD7MJC7HA_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
199
+ this.authenticateResource = new chunkD7MJC7HA_cjs.AuthenticateResource(this.http);
200
+ this.entityInformation = new chunkD7MJC7HA_cjs.EntityInformationResource(this.http);
201
+ this.modules = new chunkD7MJC7HA_cjs.ModulesResource(this.http);
202
+ this.thresholdInformation = new chunkD7MJC7HA_cjs.ThresholdInformationResource(this.http);
203
+ this.version = new chunkD7MJC7HA_cjs.VersionResource(this.http);
204
+ this.versionInformation = new chunkD7MJC7HA_cjs.VersionInformationResource(this.http);
205
+ this.zoneInformation = new chunkD7MJC7HA_cjs.ZoneInformationResource(this.http);
206
206
  }
207
207
  /**
208
208
  * `GET /V1.0/Authenticate` → `AuthTokenResultModel` (as-is). The SDK does
@@ -236,10 +236,10 @@ var AutotaskClient = class {
236
236
  * parameter on each: `await client.withSignal(signal, () => invoke(client, ...))`.
237
237
  */
238
238
  withSignal(signal, fn) {
239
- return chunkYTOBU3Z6_cjs.runWithSignal(signal, fn);
239
+ return chunkOI6E5XQA_cjs.runWithSignal(signal, fn);
240
240
  }
241
241
  async batch(fn, items, opts = {}) {
242
- return chunkYTOBU3Z6_cjs.runBounded(fn, items, { ...opts, concurrency: opts.concurrency ?? this.config.maxConcurrent });
242
+ return chunkOI6E5XQA_cjs.runBounded(fn, items, { ...opts, concurrency: opts.concurrency ?? this.config.maxConcurrent });
243
243
  }
244
244
  };
245
245
 
@@ -1,4 +1,4 @@
1
- import { loadCapabilityRecords } from './chunk-ZADTVF6M.js';
1
+ import { loadCapabilityRecords } from './chunk-K5X4BPQC.js';
2
2
  import { NoopLogger, REDACTED, deepMarkUntrusted, wrapUntrusted } from './chunk-X6VWD6WW.js';
3
3
  import { randomUUID, createHash } from 'crypto';
4
4
  import { AsyncLocalStorage } from 'async_hooks';
@@ -400,7 +400,7 @@ function suggestedActionForStatus(status) {
400
400
  return status >= 500 ? "The SDK already retried per its policy. A repeated 500 on one entity while others work usually means the API user lacks permission on that entity \u2014 ask the Autotask admin to grant it; otherwise retry once more at most." : void 0;
401
401
  }
402
402
  }
403
- function errorFromStatus(status, body, url, operation, redactPersonalData = true, credential, includeVendorDetails = true) {
403
+ function errorFromStatus(status, body, url, operation, redactPersonalData = false, credential, includeVendorDetails = true) {
404
404
  const safeBody = redactResponseBody(body, { redactPersonalData });
405
405
  const exposedBody = includeVendorDetails ? safeBody : void 0;
406
406
  let detail = formatVendorDetail(exposedBody);
@@ -1395,7 +1395,7 @@ function resolveConfig(config) {
1395
1395
  const rateLimit = resolveRateLimit(config, agent);
1396
1396
  const cooldown = resolveCooldown(config);
1397
1397
  const resolution = resolveResolution(config, agent);
1398
- const redactPersonalData = config.redactPersonalData ?? true;
1398
+ const redactPersonalData = config.redactPersonalData ?? false;
1399
1399
  const caches = resolveCaches(config);
1400
1400
  const update = { putFallback: config.update?.putFallback === true };
1401
1401
  const reResolveZoneOn401 = config.reResolveZoneOn401 === true;
@@ -1985,9 +1985,8 @@ function isJsonMediaType(header) {
1985
1985
  const mediaType = header.split(";")[0]?.trim().toLowerCase() ?? "";
1986
1986
  return mediaType.startsWith("application/json") || mediaType.endsWith("+json");
1987
1987
  }
1988
- function bodySnippet(text, redactPersonalData) {
1989
- const bytes = Buffer.from(text, "utf8").subarray(0, 256).toString("utf8");
1990
- return redactResponseBody(bytes, { redactPersonalData });
1988
+ function bodySnippet(text) {
1989
+ return Buffer.from(text, "utf8").subarray(0, 256).toString("utf8");
1991
1990
  }
1992
1991
 
1993
1992
  // src/http/limits.ts
@@ -9351,6 +9350,19 @@ var RELATIONSHIP_MAP = {
9351
9350
  "blindSurfaces": null,
9352
9351
  "zoneFacts": {
9353
9352
  "quirks": [
9353
+ {
9354
+ "kind": "vendor-managed-side-effect",
9355
+ "ops": [
9356
+ "query"
9357
+ ],
9358
+ "fields": [
9359
+ "billingApprovalDateTime",
9360
+ "billingApprovalResourceID",
9361
+ "billingApprovalLevelMostRecent"
9362
+ ],
9363
+ "statement": "Approval fields cannot establish posted status. A billing item referencing the entry through timeEntryID indicates it is posted.",
9364
+ "evidence": "Autotask REST BillingItemApprovalLevels entity help (https://ww6.autotask.net/help/developerhelp/content/apis/rest/Entities/BillingItemApprovalLevelsEntity.htm): creating an approval-level record updates the most recent level, while the date and resource on the time entry are editable separately. See docs/VENDOR-QUIRKS.md sections 11.4 and 11.13 for observed field population and the billing-item join."
9365
+ },
9354
9366
  {
9355
9367
  "kind": "wire-type",
9356
9368
  "ops": [
@@ -17475,7 +17487,7 @@ var HttpClient = class {
17475
17487
  since,
17476
17488
  retryAfterMs: s.maintenancePollMs,
17477
17489
  httpStatus: status,
17478
- ...s.getQuery ? {} : { contentType, bodySnippet: bodySnippet(text, this.redactPersonalData) },
17490
+ ...s.getQuery ? {} : { contentType, bodySnippet: bodySnippet(text) },
17479
17491
  maintenanceDetected: true
17480
17492
  },
17481
17493
  suggestedAction: unknownWrite ? `A maintenance-shaped page answered ${method} ${opts.path} (HTTP ${status}); it was NOT waited out or re-sent \u2014 a non-2xx edge page can arrive after the request was forwarded, so verify the record before re-issuing (only a GET or an explicitly idempotent-flagged call waits this window out).` : `The Autotask zone is in its maintenance window (since ${since}); retry after the window (windows usually last 30-90 min).`
@@ -17653,7 +17665,7 @@ var HttpClient = class {
17653
17665
  httpStatus: status,
17654
17666
  details: {
17655
17667
  httpStatus: status,
17656
- ...s.getQuery ? {} : { contentType, bodySnippet: bodySnippet(text, this.redactPersonalData) }
17668
+ ...s.getQuery ? {} : { contentType, bodySnippet: bodySnippet(text) }
17657
17669
  },
17658
17670
  // The content-type is host-sourced (a host-supplied
17659
17671
  // baseUrl can serve arbitrary HTML) — capped, never prose;
@@ -17704,7 +17716,7 @@ var HttpClient = class {
17704
17716
  nonJsonBody = text;
17705
17717
  }
17706
17718
  }
17707
- const nonJsonSnippet = nonJsonBody === void 0 || s.getQuery ? void 0 : bodySnippet(nonJsonBody, this.redactPersonalData);
17719
+ const nonJsonSnippet = nonJsonBody === void 0 || s.getQuery ? void 0 : bodySnippet(nonJsonBody);
17708
17720
  const nonJsonIsMaintenance = s.maintenancePage;
17709
17721
  const nonJsonIsHtmlCandidate = nonJsonBody !== void 0 && isHtmlLike(res.headers.get("Content-Type"), nonJsonBody);
17710
17722
  if (nonJsonIsMaintenance) {
@@ -18947,7 +18959,7 @@ function attachUpdateTargetMissReason(err, key) {
18947
18959
  if (pinned === void 0) return;
18948
18960
  err.details = { ...err.details ?? {}, emptyReason: pinned };
18949
18961
  }
18950
- function buildDryRunResult(spec, policy = { redactPersonalData: true }) {
18962
+ function buildDryRunResult(spec, policy) {
18951
18963
  if (spec.operation === "") {
18952
18964
  throw new AutotaskConfigError("dry-run: the operation name is required");
18953
18965
  }