node-autotask 0.68.0 → 0.69.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 (37) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/MCP_TOOL_CATALOG.json +2 -2
  3. package/README.md +51 -10
  4. package/capabilities.json +7 -7
  5. package/dist/capabilities-data.js +6 -6
  6. package/dist/capabilities.cjs +4 -4
  7. package/dist/capabilities.js +1 -1
  8. package/dist/{chunk-HFWOHUVF.cjs → chunk-24GRFW55.cjs} +236 -222
  9. package/dist/{chunk-BF22HBNT.js → chunk-2BB7OASJ.js} +3 -30
  10. package/dist/{chunk-OUVUQQXH.js → chunk-AH6WAGPS.js} +80 -66
  11. package/dist/{chunk-CG6OPTFG.cjs → chunk-DPRY3CUJ.cjs} +30 -57
  12. package/dist/{chunk-V2GE763R.cjs → chunk-JLBSUZ5B.cjs} +993 -395
  13. package/dist/{chunk-SGH7F2CH.cjs → chunk-KAZE4WC7.cjs} +3 -3
  14. package/dist/{chunk-DPJLN5BB.js → chunk-QDBJCGQD.js} +986 -390
  15. package/dist/{chunk-JCMXQUIC.js → chunk-SCFB5MF3.js} +3 -3
  16. package/dist/{index-DQ08uOH0.d.ts → index-CxBU31jT.d.ts} +16 -9
  17. package/dist/{index-mIsdpO5d.d.cts → index-WZ3A8nG6.d.cts} +16 -9
  18. package/dist/index.cjs +92 -85
  19. package/dist/index.d.cts +3 -3
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +14 -7
  22. package/dist/operations/index.cjs +50 -50
  23. package/dist/operations/index.d.cts +2 -2
  24. package/dist/operations/index.d.ts +2 -2
  25. package/dist/operations/index.js +2 -2
  26. package/dist/pool.cjs +12 -12
  27. package/dist/pool.js +4 -4
  28. package/dist/resources/index.cjs +27 -27
  29. package/dist/resources/index.d.cts +1 -1
  30. package/dist/resources/index.d.ts +1 -1
  31. package/dist/resources/index.js +3 -3
  32. package/docs/API.md +77 -16
  33. package/docs/LIVE-TESTING.md +16 -2
  34. package/docs/VENDOR-QUIRKS.md +54 -0
  35. package/docs/performance-finance.md +35 -0
  36. package/examples/mcp-env-config.ts +3 -4
  37. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  // src/capabilities.ts
2
2
  var CAPABILITY_PLAN_HASHES = {
3
- "B": "04fb614dcdd035a01636e51cf38d8178aeef7c9a1b45faf4af6187875800bd70",
4
- "A": "04fb614dcdd035a01636e51cf38d8178aeef7c9a1b45faf4af6187875800bd70",
5
- "operations": "04fb614dcdd035a01636e51cf38d8178aeef7c9a1b45faf4af6187875800bd70"
3
+ "B": "959981d335cfd184d8b4e58074d1ab6997b2db87a62683ed13e99c149f8cd4fa",
4
+ "A": "959981d335cfd184d8b4e58074d1ab6997b2db87a62683ed13e99c149f8cd4fa",
5
+ "operations": "959981d335cfd184d8b4e58074d1ab6997b2db87a62683ed13e99c149f8cd4fa"
6
6
  };
7
7
  var cached = null;
8
8
  function loadCapabilities() {
@@ -32,7 +32,7 @@ import { L as Logger } from './logger-B1gYmFre.js';
32
32
  * queryBounded noteChars free-text cap (issue #61 — response-side only);
33
33
  * - docs/VENDOR-QUIRKS.md §11.7/§11.8/§11.9/§11.10/§11.11/§11.12 render the same facts.
34
34
  *
35
- * planHash: 04fb614dcdd035a01636e51cf38d8178aeef7c9a1b45faf4af6187875800bd70
35
+ * planHash: 959981d335cfd184d8b4e58074d1ab6997b2db87a62683ed13e99c149f8cd4fa
36
36
  */
37
37
 
38
38
  /** One pinned blind-surface stamp (the result-time sentinel object). */
@@ -278,6 +278,7 @@ declare class TtlCache {
278
278
  private readonly ttlFor;
279
279
  private readonly store;
280
280
  private readonly inflightMap;
281
+ private readonly loads;
281
282
  private epochCounter;
282
283
  constructor(ttlMs: number, options?: TtlCacheOptions);
283
284
  /** The live value (a copy), or `undefined` when absent or expired. */
@@ -383,16 +384,19 @@ interface AutotaskConfig {
383
384
  maintenancePollMs?: number;
384
385
  /** Optional request log sink. Default: no-op. */
385
386
  logger?: Logger;
386
- /** Concurrency guard (API allows <=10 concurrent). Default 10. */
387
+ /** Per-client aggregate concurrency bound across objects. Default 10.
388
+ * The SDK separately enforces a shared ceiling of 3 per object/tracking
389
+ * identifier at one normalized origin; ZoneInformation is exempt. */
387
390
  maxConcurrent?: number;
388
391
  /** Largest response body the transport will read, in bytes. Default 64 MiB; larger responses throw `RESPONSE_TOO_LARGE`. */
389
392
  maxResponseBytes?: number;
390
393
  /**
391
- * Opt-in client-side hourly limiter (API allows 10,000 req/hour): waits
392
- * within the call deadline, else throws `RateLimitError`. Off by default
394
+ * Opt-in client-side hourly limiter (vendor database-wide threshold:
395
+ * 10,000 req/hour across all integrations): waits within the call deadline, else throws `RateLimitError`. Off by default
393
396
  * (the `agent` profile turns it on at AGENT_PROFILE.rateLimit.perHour).
394
- * `perHour: null` is the explicit "disabled" value — the only way to beat
395
- * a profile's value (an ABSENT perHour means "use the profile/default").
397
+ * `perHour: null` disables only this local quota, overriding the profile
398
+ * (an ABSENT perHour means "use the profile/default"). The shared origin
399
+ * ceiling of 10,000 actual sends/hour always remains enabled.
396
400
  */
397
401
  rateLimit?: {
398
402
  perHour?: number | null;
@@ -781,8 +785,9 @@ declare class HttpClient {
781
785
  /**
782
786
  * The LOCAL hourly-budget state (the sliding window this client counts):
783
787
  * `{ perHour, used, remaining }` — `undefined` when `rateLimit.perHour`
784
- * is off. The limiter is PER PROCESS (issue #4): it cannot see other
785
- * instances or integrations on the tenant — the tenant-wide count is
788
+ * is off. This optional quota is PER CLIENT (issue #4); the separate
789
+ * always-on origin ceiling is shared within the JavaScript realm. Neither
790
+ * measures external integrations — the vendor-wide count is
786
791
  * `thresholdInformation.get()`.
787
792
  */
788
793
  hourlyBudget(): {
@@ -1023,7 +1028,7 @@ interface CompanyFullProfileOptions {
1023
1028
  maxNameReads?: number;
1024
1029
  /** Explicit closed ticket-status ids for the openTickets part, overriding the resolved picklist (a caller decision, reported as source 'picklist'; same as tickets.forResource). */
1025
1030
  excludeStatusIds?: number[];
1026
- /** `false` (default true, unchanged): throw `STATUS_SEMANTICS_UNRESOLVED` instead of falling back to the assumed closed id 5 when the tenant picklist cannot be resolved (issue #244). The throw happens at the openTickets read, after the company and the four other part reads. */
1031
+ /** `false` (default true, unchanged): throw `STATUS_SEMANTICS_UNRESOLVED` instead of falling back to the assumed closed id 5 when the tenant picklist cannot be resolved (issue #244). The throw happens at the openTickets read; started sibling reads settle before it propagates. */
1027
1032
  allowAssumed?: boolean;
1028
1033
  }
1029
1034
  /** One capped list part (a full page sets `capped: true` — more may exist). */
@@ -2194,6 +2199,8 @@ declare class TicketsResource extends GenericResource<Ticket, TicketCreate, Tick
2194
2199
  /** Get the Ticket with its primary context records in one call (each part a single-record
2195
2200
  * fetch; no sub-lists; absent/dangling references come back null). */
2196
2201
  getContext(id: Identifier): Promise<TicketContext>;
2202
+ /** Root authority and reusable lazy FK tasks shared by both ticket composites. */
2203
+ private readTicketContext;
2197
2204
  /** Node-parity special op (hand-written in src/resources/special/tickets/changeStatus.ts). */
2198
2205
  changeStatus(id: Identifier, targetStatus: number, fields?: Record<string, unknown>, opts?: MutationOpts): Promise<TicketChangeStatusResult | TicketChangeStatusNoChange | DryRunResult<Record<string, unknown>>>;
2199
2206
  /** Node-parity special op (hand-written in src/resources/special/tickets/sla.ts). */
@@ -32,7 +32,7 @@ import { L as Logger } from './logger-B1gYmFre.cjs';
32
32
  * queryBounded noteChars free-text cap (issue #61 — response-side only);
33
33
  * - docs/VENDOR-QUIRKS.md §11.7/§11.8/§11.9/§11.10/§11.11/§11.12 render the same facts.
34
34
  *
35
- * planHash: 04fb614dcdd035a01636e51cf38d8178aeef7c9a1b45faf4af6187875800bd70
35
+ * planHash: 959981d335cfd184d8b4e58074d1ab6997b2db87a62683ed13e99c149f8cd4fa
36
36
  */
37
37
 
38
38
  /** One pinned blind-surface stamp (the result-time sentinel object). */
@@ -278,6 +278,7 @@ declare class TtlCache {
278
278
  private readonly ttlFor;
279
279
  private readonly store;
280
280
  private readonly inflightMap;
281
+ private readonly loads;
281
282
  private epochCounter;
282
283
  constructor(ttlMs: number, options?: TtlCacheOptions);
283
284
  /** The live value (a copy), or `undefined` when absent or expired. */
@@ -383,16 +384,19 @@ interface AutotaskConfig {
383
384
  maintenancePollMs?: number;
384
385
  /** Optional request log sink. Default: no-op. */
385
386
  logger?: Logger;
386
- /** Concurrency guard (API allows <=10 concurrent). Default 10. */
387
+ /** Per-client aggregate concurrency bound across objects. Default 10.
388
+ * The SDK separately enforces a shared ceiling of 3 per object/tracking
389
+ * identifier at one normalized origin; ZoneInformation is exempt. */
387
390
  maxConcurrent?: number;
388
391
  /** Largest response body the transport will read, in bytes. Default 64 MiB; larger responses throw `RESPONSE_TOO_LARGE`. */
389
392
  maxResponseBytes?: number;
390
393
  /**
391
- * Opt-in client-side hourly limiter (API allows 10,000 req/hour): waits
392
- * within the call deadline, else throws `RateLimitError`. Off by default
394
+ * Opt-in client-side hourly limiter (vendor database-wide threshold:
395
+ * 10,000 req/hour across all integrations): waits within the call deadline, else throws `RateLimitError`. Off by default
393
396
  * (the `agent` profile turns it on at AGENT_PROFILE.rateLimit.perHour).
394
- * `perHour: null` is the explicit "disabled" value — the only way to beat
395
- * a profile's value (an ABSENT perHour means "use the profile/default").
397
+ * `perHour: null` disables only this local quota, overriding the profile
398
+ * (an ABSENT perHour means "use the profile/default"). The shared origin
399
+ * ceiling of 10,000 actual sends/hour always remains enabled.
396
400
  */
397
401
  rateLimit?: {
398
402
  perHour?: number | null;
@@ -781,8 +785,9 @@ declare class HttpClient {
781
785
  /**
782
786
  * The LOCAL hourly-budget state (the sliding window this client counts):
783
787
  * `{ perHour, used, remaining }` — `undefined` when `rateLimit.perHour`
784
- * is off. The limiter is PER PROCESS (issue #4): it cannot see other
785
- * instances or integrations on the tenant — the tenant-wide count is
788
+ * is off. This optional quota is PER CLIENT (issue #4); the separate
789
+ * always-on origin ceiling is shared within the JavaScript realm. Neither
790
+ * measures external integrations — the vendor-wide count is
786
791
  * `thresholdInformation.get()`.
787
792
  */
788
793
  hourlyBudget(): {
@@ -1023,7 +1028,7 @@ interface CompanyFullProfileOptions {
1023
1028
  maxNameReads?: number;
1024
1029
  /** Explicit closed ticket-status ids for the openTickets part, overriding the resolved picklist (a caller decision, reported as source 'picklist'; same as tickets.forResource). */
1025
1030
  excludeStatusIds?: number[];
1026
- /** `false` (default true, unchanged): throw `STATUS_SEMANTICS_UNRESOLVED` instead of falling back to the assumed closed id 5 when the tenant picklist cannot be resolved (issue #244). The throw happens at the openTickets read, after the company and the four other part reads. */
1031
+ /** `false` (default true, unchanged): throw `STATUS_SEMANTICS_UNRESOLVED` instead of falling back to the assumed closed id 5 when the tenant picklist cannot be resolved (issue #244). The throw happens at the openTickets read; started sibling reads settle before it propagates. */
1027
1032
  allowAssumed?: boolean;
1028
1033
  }
1029
1034
  /** One capped list part (a full page sets `capped: true` — more may exist). */
@@ -2194,6 +2199,8 @@ declare class TicketsResource extends GenericResource<Ticket, TicketCreate, Tick
2194
2199
  /** Get the Ticket with its primary context records in one call (each part a single-record
2195
2200
  * fetch; no sub-lists; absent/dangling references come back null). */
2196
2201
  getContext(id: Identifier): Promise<TicketContext>;
2202
+ /** Root authority and reusable lazy FK tasks shared by both ticket composites. */
2203
+ private readTicketContext;
2197
2204
  /** Node-parity special op (hand-written in src/resources/special/tickets/changeStatus.ts). */
2198
2205
  changeStatus(id: Identifier, targetStatus: number, fields?: Record<string, unknown>, opts?: MutationOpts): Promise<TicketChangeStatusResult | TicketChangeStatusNoChange | DryRunResult<Record<string, unknown>>>;
2199
2206
  /** Node-parity special op (hand-written in src/resources/special/tickets/sla.ts). */
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkCG6OPTFG_cjs = require('./chunk-CG6OPTFG.cjs');
3
+ var chunkDPRY3CUJ_cjs = require('./chunk-DPRY3CUJ.cjs');
4
4
  require('./chunk-S5CH4H6H.cjs');
5
- var chunkHFWOHUVF_cjs = require('./chunk-HFWOHUVF.cjs');
6
- var chunkV2GE763R_cjs = require('./chunk-V2GE763R.cjs');
7
- require('./chunk-SGH7F2CH.cjs');
5
+ var chunk24GRFW55_cjs = require('./chunk-24GRFW55.cjs');
6
+ var chunkJLBSUZ5B_cjs = require('./chunk-JLBSUZ5B.cjs');
7
+ require('./chunk-KAZE4WC7.cjs');
8
8
  var chunkBD4AUGCJ_cjs = require('./chunk-BD4AUGCJ.cjs');
9
9
  var fs = require('fs');
10
10
 
@@ -19,7 +19,7 @@ var ALIASES = {
19
19
  AUTOTASK_USERNAME: ["AUTOTASK_USER"]
20
20
  };
21
21
  function presenceError(name, source) {
22
- return new chunkV2GE763R_cjs.AutotaskConfigError(
22
+ return new chunkJLBSUZ5B_cjs.AutotaskConfigError(
23
23
  `${source}: ${name} is not set (or is empty after shell-equivalent loading)`,
24
24
  {
25
25
  suggestedAction: `Set ${name} before running (see the "Credentials & env files" section of the README).`
@@ -27,8 +27,8 @@ function presenceError(name, source) {
27
27
  );
28
28
  }
29
29
  function shapeError(name, value, source) {
30
- return new chunkV2GE763R_cjs.AutotaskConfigError(
31
- `${source}: ${name} ${chunkV2GE763R_cjs.CREDENTIAL_ENV_LOAD_ACTION} [${chunkV2GE763R_cjs.credentialValueSummary(value)}]`,
30
+ return new chunkJLBSUZ5B_cjs.AutotaskConfigError(
31
+ `${source}: ${name} ${chunkJLBSUZ5B_cjs.CREDENTIAL_ENV_LOAD_ACTION} [${chunkJLBSUZ5B_cjs.credentialValueSummary(value)}]`,
32
32
  {
33
33
  code: "INVALID_CREDENTIAL_SHAPE",
34
34
  suggestedAction: "Load the credential file with the shell (`set -a; . ./.env; set +a`), use loadAutotaskCredentialEnvFile(path), or fix the quoted/contaminated value; no request was sent."
@@ -52,7 +52,7 @@ function parseCredentialEnvText(text) {
52
52
  }
53
53
  function readCredentialEnvFile(path) {
54
54
  if (!fs.existsSync(path)) {
55
- throw new chunkV2GE763R_cjs.AutotaskConfigError(`credential env file not found: ${path}`, {
55
+ throw new chunkJLBSUZ5B_cjs.AutotaskConfigError(`credential env file not found: ${path}`, {
56
56
  suggestedAction: "Check the path, or create the file with the credentials your host needs."
57
57
  });
58
58
  }
@@ -98,7 +98,7 @@ function pickCredentials(values, names, source, canonical) {
98
98
  if (entry === void 0) continue;
99
99
  const value = normalizeCredentialValue(entry.raw);
100
100
  if (value.length === 0) throw presenceError(name, source);
101
- if (chunkV2GE763R_cjs.credentialShapeProblem(value, { skipEdgeWhitespace: true }) !== void 0) {
101
+ if (chunkJLBSUZ5B_cjs.credentialShapeProblem(value, { skipEdgeWhitespace: true }) !== void 0) {
102
102
  throw shapeError(name, value, source);
103
103
  }
104
104
  out[name] = value;
@@ -122,7 +122,7 @@ var DOCTOR_ENTITIES = [
122
122
  { key: "resources", label: "Resources", path: "/V1.0/Resources" }
123
123
  ];
124
124
  var present = (v) => typeof v === "string" && v.trim().length > 0;
125
- var knownZone = (z) => typeof z === "string" && chunkV2GE763R_cjs.ZONES.includes(z);
125
+ var knownZone = (z) => typeof z === "string" && chunkJLBSUZ5B_cjs.ZONES.includes(z);
126
126
  function doctorConfigStep(source, origin = "config") {
127
127
  const fields = ["apiIntegrationCode", "userName", "secret", "zone", "baseUrl", "impersonationResourceId"];
128
128
  const sources = {};
@@ -150,7 +150,7 @@ function doctorConfigStep(source, origin = "config") {
150
150
  } else if (knownZone(zone)) {
151
151
  let url;
152
152
  try {
153
- url = chunkV2GE763R_cjs.zoneUrl(zone);
153
+ url = chunkJLBSUZ5B_cjs.zoneUrl(zone);
154
154
  zoneInfo = { provided: true, resolvable: true, zone, baseUrlHost: new URL(url).host };
155
155
  } catch {
156
156
  zoneInfo = { provided: true, resolvable: false, zone };
@@ -159,13 +159,13 @@ function doctorConfigStep(source, origin = "config") {
159
159
  zoneInfo = { provided: true, resolvable: false, zone };
160
160
  }
161
161
  } else {
162
- zoneInfo = { provided: false, resolvable: true, zone: chunkV2GE763R_cjs.DEFAULT_ZONE, baseUrlHost: new URL(chunkV2GE763R_cjs.zoneUrl(chunkV2GE763R_cjs.DEFAULT_ZONE)).host };
162
+ zoneInfo = { provided: false, resolvable: true, zone: chunkJLBSUZ5B_cjs.DEFAULT_ZONE, baseUrlHost: new URL(chunkJLBSUZ5B_cjs.zoneUrl(chunkJLBSUZ5B_cjs.DEFAULT_ZONE)).host };
163
163
  }
164
164
  const problems = [];
165
165
  if (missing.length > 0) problems.push(`missing credential(s): ${missing.join(", ")}`);
166
166
  if (zoneInfo.provided && !zoneInfo.resolvable) {
167
167
  problems.push(
168
- source.baseUrl !== void 0 && present(source.baseUrl) ? "baseUrl is not a valid http(s) URL" : source.zone === "other" ? 'zone "other" requires a baseUrl' : `zone "${zone}" is not a known zone (the catalog has ${chunkV2GE763R_cjs.ZONES.length} zones)`
168
+ source.baseUrl !== void 0 && present(source.baseUrl) ? "baseUrl is not a valid http(s) URL" : source.zone === "other" ? 'zone "other" requires a baseUrl' : `zone "${zone}" is not a known zone (the catalog has ${chunkJLBSUZ5B_cjs.ZONES.length} zones)`
169
169
  );
170
170
  }
171
171
  if (problems.length > 0) {
@@ -193,33 +193,40 @@ async function timeCheck(id, fn) {
193
193
  const out = await fn();
194
194
  return { check: { id, status: out.status, message: out.message, ...out.hint !== void 0 ? { hint: out.hint } : {}, durationMs: Date.now() - started }, value: out.value };
195
195
  } catch (err) {
196
- const code = chunkV2GE763R_cjs.isAutotaskError(err) ? err.code : "UNEXPECTED";
196
+ const code = chunkJLBSUZ5B_cjs.isAutotaskError(err) ? err.code : "UNEXPECTED";
197
197
  return {
198
198
  check: {
199
199
  id,
200
200
  status: "fail",
201
201
  message: `check failed unexpectedly (machine code ${code})`,
202
- hint: chunkV2GE763R_cjs.isAutotaskError(err) ? err.suggestedAction : void 0,
202
+ hint: chunkJLBSUZ5B_cjs.isAutotaskError(err) ? err.suggestedAction : void 0,
203
203
  durationMs: Date.now() - started
204
204
  }
205
205
  };
206
206
  }
207
207
  }
208
208
  function failFrom(err, what) {
209
- if (err instanceof chunkV2GE763R_cjs.RateLimitError && (err.code === "RATE_LIMITED_COOLDOWN" || err.notSent === true)) {
209
+ if (err instanceof chunkJLBSUZ5B_cjs.RateLimitError && err.code === "RATE_LIMITED_COOLDOWN") {
210
210
  return {
211
211
  status: "fail",
212
212
  message: `${what} \u2014 refused LOCALLY by the tenant 429 cooldown gate (the call was NOT sent)`,
213
213
  hint: err.suggestedAction
214
214
  };
215
215
  }
216
- if (err.code === "RATE_LIMITED") {
216
+ if (err.code === "RATE_LIMITED" && err.details?.budgetScope === "client") {
217
217
  return {
218
218
  status: "fail",
219
219
  message: `${what} \u2014 refused by the LOCAL client-side rate limiter (per-process budget; not a vendor 429)`,
220
220
  hint: err.suggestedAction
221
221
  };
222
222
  }
223
+ if (err.code === "RATE_LIMITED" && err.details?.budgetScope === "process_origin") {
224
+ return {
225
+ status: "fail",
226
+ message: `${what} \u2014 refused by the SHARED SDK origin hourly ceiling (not a vendor 429)`,
227
+ hint: err.suggestedAction
228
+ };
229
+ }
223
230
  const statusLabel = err.httpStatus !== void 0 ? ` (HTTP ${err.httpStatus})` : "";
224
231
  return { status: "fail", message: `${what} failed${statusLabel} \u2014 machine code ${err.code}`, hint: err.suggestedAction };
225
232
  }
@@ -245,7 +252,7 @@ function makeWire(run, timeoutMs) {
245
252
  });
246
253
  return { body };
247
254
  } catch (err) {
248
- if (chunkV2GE763R_cjs.isAutotaskError(err)) return { error: err };
255
+ if (chunkJLBSUZ5B_cjs.isAutotaskError(err)) return { error: err };
249
256
  throw err;
250
257
  }
251
258
  };
@@ -304,7 +311,7 @@ async function checkReads(run, zoneUnavailable) {
304
311
  const id = `read.${entity.key}`;
305
312
  const result = await timeCheck(id, async () => {
306
313
  if (zoneUnavailable) return skip(ZONE_UNAVAILABLE_SKIP);
307
- const req = chunkV2GE763R_cjs.buildQueryRequest(cfg.baseUrl, entity.path, { maxRecords: 1 });
314
+ const req = chunkJLBSUZ5B_cjs.buildQueryRequest(cfg.baseUrl, entity.path, { maxRecords: 1 });
308
315
  const out = await run.wire(req.method, req.path, `doctor.${id}`, { body: req.body, idempotent: req.idempotent });
309
316
  if (out.error) {
310
317
  const f = failFrom(out.error, `read access to ${entity.label}`);
@@ -388,11 +395,11 @@ function outcome(state, retryable, code, httpStatus) {
388
395
  return httpStatus === void 0 ? { state, retryable, code } : { state, retryable, code, httpStatus };
389
396
  }
390
397
  function vendorErrorsNonEmpty(vendorError) {
391
- const entries = chunkV2GE763R_cjs.parseVendorErrors(vendorError);
398
+ const entries = chunkJLBSUZ5B_cjs.parseVendorErrors(vendorError);
392
399
  return entries !== void 0 && entries.length > 0;
393
400
  }
394
401
  function classifyWriteOutcome(error) {
395
- if (chunkV2GE763R_cjs.isAutotaskError(error)) {
402
+ if (chunkJLBSUZ5B_cjs.isAutotaskError(error)) {
396
403
  const rawStatus = error.httpStatus;
397
404
  const httpStatus = typeof rawStatus === "number" ? rawStatus : void 0;
398
405
  const statusMalformed = rawStatus !== void 0 && httpStatus === void 0;
@@ -418,7 +425,7 @@ function classifyWriteOutcome(error) {
418
425
  return outcome("failed", error.retryable, error.code);
419
426
  }
420
427
  }
421
- const typed = chunkV2GE763R_cjs.isAutotaskError(error);
428
+ const typed = chunkJLBSUZ5B_cjs.isAutotaskError(error);
422
429
  const status = typed && typeof error.httpStatus === "number" ? error.httpStatus : void 0;
423
430
  const code = typed ? error.code : error instanceof Error ? error.name : "UNKNOWN";
424
431
  return outcome("unknown", false, code, status);
@@ -426,255 +433,255 @@ function classifyWriteOutcome(error) {
426
433
 
427
434
  Object.defineProperty(exports, "AutotaskClient", {
428
435
  enumerable: true,
429
- get: function () { return chunkCG6OPTFG_cjs.AutotaskClient; }
436
+ get: function () { return chunkDPRY3CUJ_cjs.AutotaskClient; }
430
437
  });
431
438
  Object.defineProperty(exports, "AuthenticateResource", {
432
439
  enumerable: true,
433
- get: function () { return chunkHFWOHUVF_cjs.AuthenticateResource; }
440
+ get: function () { return chunk24GRFW55_cjs.AuthenticateResource; }
434
441
  });
435
442
  Object.defineProperty(exports, "ConfigurationItemsResource", {
436
443
  enumerable: true,
437
- get: function () { return chunkHFWOHUVF_cjs.ConfigurationItemsResource; }
444
+ get: function () { return chunk24GRFW55_cjs.ConfigurationItemsResource; }
438
445
  });
439
446
  Object.defineProperty(exports, "ContactsResource", {
440
447
  enumerable: true,
441
- get: function () { return chunkHFWOHUVF_cjs.ContactsResource; }
448
+ get: function () { return chunk24GRFW55_cjs.ContactsResource; }
442
449
  });
443
450
  Object.defineProperty(exports, "EntityInformationResource", {
444
451
  enumerable: true,
445
- get: function () { return chunkHFWOHUVF_cjs.EntityInformationResource; }
452
+ get: function () { return chunk24GRFW55_cjs.EntityInformationResource; }
446
453
  });
447
454
  Object.defineProperty(exports, "InventoryProductsResource", {
448
455
  enumerable: true,
449
- get: function () { return chunkHFWOHUVF_cjs.InventoryProductsResource; }
456
+ get: function () { return chunk24GRFW55_cjs.InventoryProductsResource; }
450
457
  });
451
458
  Object.defineProperty(exports, "ModulesResource", {
452
459
  enumerable: true,
453
- get: function () { return chunkHFWOHUVF_cjs.ModulesResource; }
460
+ get: function () { return chunk24GRFW55_cjs.ModulesResource; }
454
461
  });
455
462
  Object.defineProperty(exports, "QuotesResource", {
456
463
  enumerable: true,
457
- get: function () { return chunkHFWOHUVF_cjs.QuotesResource; }
464
+ get: function () { return chunk24GRFW55_cjs.QuotesResource; }
458
465
  });
459
466
  Object.defineProperty(exports, "ResourceTimeOffAdditionalResource", {
460
467
  enumerable: true,
461
- get: function () { return chunkHFWOHUVF_cjs.ResourceTimeOffAdditionalResource; }
468
+ get: function () { return chunk24GRFW55_cjs.ResourceTimeOffAdditionalResource; }
462
469
  });
463
470
  Object.defineProperty(exports, "ResourceTimeOffBalancesResource", {
464
471
  enumerable: true,
465
- get: function () { return chunkHFWOHUVF_cjs.ResourceTimeOffBalancesResource; }
472
+ get: function () { return chunk24GRFW55_cjs.ResourceTimeOffBalancesResource; }
466
473
  });
467
474
  Object.defineProperty(exports, "ResourcesResource", {
468
475
  enumerable: true,
469
- get: function () { return chunkHFWOHUVF_cjs.ResourcesResource; }
476
+ get: function () { return chunk24GRFW55_cjs.ResourcesResource; }
470
477
  });
471
478
  Object.defineProperty(exports, "ServiceCallsResource", {
472
479
  enumerable: true,
473
- get: function () { return chunkHFWOHUVF_cjs.ServiceCallsResource; }
480
+ get: function () { return chunk24GRFW55_cjs.ServiceCallsResource; }
474
481
  });
475
482
  Object.defineProperty(exports, "ThresholdInformationResource", {
476
483
  enumerable: true,
477
- get: function () { return chunkHFWOHUVF_cjs.ThresholdInformationResource; }
484
+ get: function () { return chunk24GRFW55_cjs.ThresholdInformationResource; }
478
485
  });
479
486
  Object.defineProperty(exports, "TicketChargesResource", {
480
487
  enumerable: true,
481
- get: function () { return chunkHFWOHUVF_cjs.TicketChargesResource; }
488
+ get: function () { return chunk24GRFW55_cjs.TicketChargesResource; }
482
489
  });
483
490
  Object.defineProperty(exports, "TicketsResource", {
484
491
  enumerable: true,
485
- get: function () { return chunkHFWOHUVF_cjs.TicketsResource; }
492
+ get: function () { return chunk24GRFW55_cjs.TicketsResource; }
486
493
  });
487
494
  Object.defineProperty(exports, "TimeOffRequestsResource", {
488
495
  enumerable: true,
489
- get: function () { return chunkHFWOHUVF_cjs.TimeOffRequestsResource; }
496
+ get: function () { return chunk24GRFW55_cjs.TimeOffRequestsResource; }
490
497
  });
491
498
  Object.defineProperty(exports, "VersionInformationResource", {
492
499
  enumerable: true,
493
- get: function () { return chunkHFWOHUVF_cjs.VersionInformationResource; }
500
+ get: function () { return chunk24GRFW55_cjs.VersionInformationResource; }
494
501
  });
495
502
  Object.defineProperty(exports, "VersionResource", {
496
503
  enumerable: true,
497
- get: function () { return chunkHFWOHUVF_cjs.VersionResource; }
504
+ get: function () { return chunk24GRFW55_cjs.VersionResource; }
498
505
  });
499
506
  Object.defineProperty(exports, "ZoneInformationResource", {
500
507
  enumerable: true,
501
- get: function () { return chunkHFWOHUVF_cjs.ZoneInformationResource; }
508
+ get: function () { return chunk24GRFW55_cjs.ZoneInformationResource; }
502
509
  });
503
510
  Object.defineProperty(exports, "AutotaskAbortError", {
504
511
  enumerable: true,
505
- get: function () { return chunkV2GE763R_cjs.AutotaskAbortError; }
512
+ get: function () { return chunkJLBSUZ5B_cjs.AutotaskAbortError; }
506
513
  });
507
514
  Object.defineProperty(exports, "AutotaskConfigError", {
508
515
  enumerable: true,
509
- get: function () { return chunkV2GE763R_cjs.AutotaskConfigError; }
516
+ get: function () { return chunkJLBSUZ5B_cjs.AutotaskConfigError; }
510
517
  });
511
518
  Object.defineProperty(exports, "AutotaskError", {
512
519
  enumerable: true,
513
- get: function () { return chunkV2GE763R_cjs.AutotaskError; }
520
+ get: function () { return chunkJLBSUZ5B_cjs.AutotaskError; }
514
521
  });
515
522
  Object.defineProperty(exports, "AutotaskNetworkError", {
516
523
  enumerable: true,
517
- get: function () { return chunkV2GE763R_cjs.AutotaskNetworkError; }
524
+ get: function () { return chunkJLBSUZ5B_cjs.AutotaskNetworkError; }
518
525
  });
519
526
  Object.defineProperty(exports, "AutotaskTimeoutError", {
520
527
  enumerable: true,
521
- get: function () { return chunkV2GE763R_cjs.AutotaskTimeoutError; }
528
+ get: function () { return chunkJLBSUZ5B_cjs.AutotaskTimeoutError; }
522
529
  });
523
530
  Object.defineProperty(exports, "CREDENTIAL_SHAPE_POINTER", {
524
531
  enumerable: true,
525
- get: function () { return chunkV2GE763R_cjs.CREDENTIAL_SHAPE_POINTER; }
532
+ get: function () { return chunkJLBSUZ5B_cjs.CREDENTIAL_SHAPE_POINTER; }
526
533
  });
527
534
  Object.defineProperty(exports, "CompaniesResource", {
528
535
  enumerable: true,
529
- get: function () { return chunkV2GE763R_cjs.CompaniesResource; }
536
+ get: function () { return chunkJLBSUZ5B_cjs.CompaniesResource; }
530
537
  });
531
538
  Object.defineProperty(exports, "ConfirmationRequiredError", {
532
539
  enumerable: true,
533
- get: function () { return chunkV2GE763R_cjs.ConfirmationRequiredError; }
540
+ get: function () { return chunkJLBSUZ5B_cjs.ConfirmationRequiredError; }
534
541
  });
535
542
  Object.defineProperty(exports, "ConflictError", {
536
543
  enumerable: true,
537
- get: function () { return chunkV2GE763R_cjs.ConflictError; }
544
+ get: function () { return chunkJLBSUZ5B_cjs.ConflictError; }
538
545
  });
539
546
  Object.defineProperty(exports, "ContractsResource", {
540
547
  enumerable: true,
541
- get: function () { return chunkV2GE763R_cjs.ContractsResource; }
548
+ get: function () { return chunkJLBSUZ5B_cjs.ContractsResource; }
542
549
  });
543
550
  Object.defineProperty(exports, "DeleteBoundaryError", {
544
551
  enumerable: true,
545
- get: function () { return chunkV2GE763R_cjs.DeleteBoundaryError; }
552
+ get: function () { return chunkJLBSUZ5B_cjs.DeleteBoundaryError; }
546
553
  });
547
554
  Object.defineProperty(exports, "EmptyResponseError", {
548
555
  enumerable: true,
549
- get: function () { return chunkV2GE763R_cjs.EmptyResponseError; }
556
+ get: function () { return chunkJLBSUZ5B_cjs.EmptyResponseError; }
550
557
  });
551
558
  Object.defineProperty(exports, "GenericResource", {
552
559
  enumerable: true,
553
- get: function () { return chunkV2GE763R_cjs.GenericResource; }
560
+ get: function () { return chunkJLBSUZ5B_cjs.GenericResource; }
554
561
  });
555
562
  Object.defineProperty(exports, "HostPolicyDeniedError", {
556
563
  enumerable: true,
557
- get: function () { return chunkV2GE763R_cjs.HostPolicyDeniedError; }
564
+ get: function () { return chunkJLBSUZ5B_cjs.HostPolicyDeniedError; }
558
565
  });
559
566
  Object.defineProperty(exports, "InvoicesResource", {
560
567
  enumerable: true,
561
- get: function () { return chunkV2GE763R_cjs.InvoicesResource; }
568
+ get: function () { return chunkJLBSUZ5B_cjs.InvoicesResource; }
562
569
  });
563
570
  Object.defineProperty(exports, "MIN_PREFIX_SUMMARY_LENGTH", {
564
571
  enumerable: true,
565
- get: function () { return chunkV2GE763R_cjs.MIN_PREFIX_SUMMARY_LENGTH; }
572
+ get: function () { return chunkJLBSUZ5B_cjs.MIN_PREFIX_SUMMARY_LENGTH; }
566
573
  });
567
574
  Object.defineProperty(exports, "MaintenanceError", {
568
575
  enumerable: true,
569
- get: function () { return chunkV2GE763R_cjs.MaintenanceError; }
576
+ get: function () { return chunkJLBSUZ5B_cjs.MaintenanceError; }
570
577
  });
571
578
  Object.defineProperty(exports, "MarkerUnsafeIdError", {
572
579
  enumerable: true,
573
- get: function () { return chunkV2GE763R_cjs.MarkerUnsafeIdError; }
580
+ get: function () { return chunkJLBSUZ5B_cjs.MarkerUnsafeIdError; }
574
581
  });
575
582
  Object.defineProperty(exports, "MoveRefusedError", {
576
583
  enumerable: true,
577
- get: function () { return chunkV2GE763R_cjs.MoveRefusedError; }
584
+ get: function () { return chunkJLBSUZ5B_cjs.MoveRefusedError; }
578
585
  });
579
586
  Object.defineProperty(exports, "NotFoundError", {
580
587
  enumerable: true,
581
- get: function () { return chunkV2GE763R_cjs.NotFoundError; }
588
+ get: function () { return chunkJLBSUZ5B_cjs.NotFoundError; }
582
589
  });
583
590
  Object.defineProperty(exports, "OperationNotSupportedError", {
584
591
  enumerable: true,
585
- get: function () { return chunkV2GE763R_cjs.OperationNotSupportedError; }
592
+ get: function () { return chunkJLBSUZ5B_cjs.OperationNotSupportedError; }
586
593
  });
587
594
  Object.defineProperty(exports, "PaginationLimitError", {
588
595
  enumerable: true,
589
- get: function () { return chunkV2GE763R_cjs.PaginationLimitError; }
596
+ get: function () { return chunkJLBSUZ5B_cjs.PaginationLimitError; }
590
597
  });
591
598
  Object.defineProperty(exports, "QueryTooLongError", {
592
599
  enumerable: true,
593
- get: function () { return chunkV2GE763R_cjs.QueryTooLongError; }
600
+ get: function () { return chunkJLBSUZ5B_cjs.QueryTooLongError; }
594
601
  });
595
602
  Object.defineProperty(exports, "RateLimitError", {
596
603
  enumerable: true,
597
- get: function () { return chunkV2GE763R_cjs.RateLimitError; }
604
+ get: function () { return chunkJLBSUZ5B_cjs.RateLimitError; }
598
605
  });
599
606
  Object.defineProperty(exports, "RecoveryTruncatedError", {
600
607
  enumerable: true,
601
- get: function () { return chunkV2GE763R_cjs.RecoveryTruncatedError; }
608
+ get: function () { return chunkJLBSUZ5B_cjs.RecoveryTruncatedError; }
602
609
  });
603
610
  Object.defineProperty(exports, "ResolutionError", {
604
611
  enumerable: true,
605
- get: function () { return chunkV2GE763R_cjs.ResolutionError; }
612
+ get: function () { return chunkJLBSUZ5B_cjs.ResolutionError; }
606
613
  });
607
614
  Object.defineProperty(exports, "ResponseRejectedError", {
608
615
  enumerable: true,
609
- get: function () { return chunkV2GE763R_cjs.ResponseRejectedError; }
616
+ get: function () { return chunkJLBSUZ5B_cjs.ResponseRejectedError; }
610
617
  });
611
618
  Object.defineProperty(exports, "SIMPLE_RESOURCES", {
612
619
  enumerable: true,
613
- get: function () { return chunkV2GE763R_cjs.SIMPLE_RESOURCES; }
620
+ get: function () { return chunkJLBSUZ5B_cjs.SIMPLE_RESOURCES; }
614
621
  });
615
622
  Object.defineProperty(exports, "ScopeRequiredError", {
616
623
  enumerable: true,
617
- get: function () { return chunkV2GE763R_cjs.ScopeRequiredError; }
624
+ get: function () { return chunkJLBSUZ5B_cjs.ScopeRequiredError; }
618
625
  });
619
626
  Object.defineProperty(exports, "StaleObjectError", {
620
627
  enumerable: true,
621
- get: function () { return chunkV2GE763R_cjs.StaleObjectError; }
628
+ get: function () { return chunkJLBSUZ5B_cjs.StaleObjectError; }
622
629
  });
623
630
  Object.defineProperty(exports, "TimeEntriesResource", {
624
631
  enumerable: true,
625
- get: function () { return chunkV2GE763R_cjs.TimeEntriesResource; }
632
+ get: function () { return chunkJLBSUZ5B_cjs.TimeEntriesResource; }
626
633
  });
627
634
  Object.defineProperty(exports, "TtlCache", {
628
635
  enumerable: true,
629
- get: function () { return chunkV2GE763R_cjs.TtlCache; }
636
+ get: function () { return chunkJLBSUZ5B_cjs.TtlCache; }
630
637
  });
631
638
  Object.defineProperty(exports, "UNSCOPED_WALK_THRESHOLD", {
632
639
  enumerable: true,
633
- get: function () { return chunkV2GE763R_cjs.UNSCOPED_WALK_THRESHOLD; }
640
+ get: function () { return chunkJLBSUZ5B_cjs.UNSCOPED_WALK_THRESHOLD; }
634
641
  });
635
642
  Object.defineProperty(exports, "UnexpectedContentTypeError", {
636
643
  enumerable: true,
637
- get: function () { return chunkV2GE763R_cjs.UnexpectedContentTypeError; }
644
+ get: function () { return chunkJLBSUZ5B_cjs.UnexpectedContentTypeError; }
638
645
  });
639
646
  Object.defineProperty(exports, "ZONES", {
640
647
  enumerable: true,
641
- get: function () { return chunkV2GE763R_cjs.ZONES; }
648
+ get: function () { return chunkJLBSUZ5B_cjs.ZONES; }
642
649
  });
643
650
  Object.defineProperty(exports, "credentialShapeProblem", {
644
651
  enumerable: true,
645
- get: function () { return chunkV2GE763R_cjs.credentialShapeProblem; }
652
+ get: function () { return chunkJLBSUZ5B_cjs.credentialShapeProblem; }
646
653
  });
647
654
  Object.defineProperty(exports, "credentialValueSummary", {
648
655
  enumerable: true,
649
- get: function () { return chunkV2GE763R_cjs.credentialValueSummary; }
656
+ get: function () { return chunkJLBSUZ5B_cjs.credentialValueSummary; }
650
657
  });
651
658
  Object.defineProperty(exports, "errorFromStatus", {
652
659
  enumerable: true,
653
- get: function () { return chunkV2GE763R_cjs.errorFromStatus; }
660
+ get: function () { return chunkJLBSUZ5B_cjs.errorFromStatus; }
654
661
  });
655
662
  Object.defineProperty(exports, "formatVendorDetail", {
656
663
  enumerable: true,
657
- get: function () { return chunkV2GE763R_cjs.formatVendorDetail; }
664
+ get: function () { return chunkJLBSUZ5B_cjs.formatVendorDetail; }
658
665
  });
659
666
  Object.defineProperty(exports, "isAutotaskError", {
660
667
  enumerable: true,
661
- get: function () { return chunkV2GE763R_cjs.isAutotaskError; }
668
+ get: function () { return chunkJLBSUZ5B_cjs.isAutotaskError; }
662
669
  });
663
670
  Object.defineProperty(exports, "isDeterministicVendor500", {
664
671
  enumerable: true,
665
- get: function () { return chunkV2GE763R_cjs.isDeterministicVendor500; }
672
+ get: function () { return chunkJLBSUZ5B_cjs.isDeterministicVendor500; }
666
673
  });
667
674
  Object.defineProperty(exports, "mergeDetails", {
668
675
  enumerable: true,
669
- get: function () { return chunkV2GE763R_cjs.mergeDetails; }
676
+ get: function () { return chunkJLBSUZ5B_cjs.mergeDetails; }
670
677
  });
671
678
  Object.defineProperty(exports, "nextActionFor", {
672
679
  enumerable: true,
673
- get: function () { return chunkV2GE763R_cjs.nextActionFor; }
680
+ get: function () { return chunkJLBSUZ5B_cjs.nextActionFor; }
674
681
  });
675
682
  Object.defineProperty(exports, "parseVendorErrors", {
676
683
  enumerable: true,
677
- get: function () { return chunkV2GE763R_cjs.parseVendorErrors; }
684
+ get: function () { return chunkJLBSUZ5B_cjs.parseVendorErrors; }
678
685
  });
679
686
  Object.defineProperty(exports, "NoopLogger", {
680
687
  enumerable: true,