node-autotask 0.18.0 → 0.19.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 (38) hide show
  1. package/ARCHITECTURE.md +15 -8
  2. package/CHANGELOG.md +574 -0
  3. package/MCP_TOOL_CATALOG.json +2 -2
  4. package/MCP_TOOL_MANIFEST.md +5 -5
  5. package/N8N_MCP_MANIFEST.json +2 -2
  6. package/N8N_MCP_MANIFEST.md +3 -3
  7. package/README.md +8 -4
  8. package/capabilities.json +1223 -1223
  9. package/dist/capabilities.cjs +2 -2
  10. package/dist/capabilities.js +1 -1
  11. package/dist/{chunk-W2WSZOZA.js → chunk-4YKV7ORF.js} +2 -2
  12. package/dist/{chunk-7I3F3AJJ.cjs → chunk-7RDR5DSI.cjs} +393 -393
  13. package/dist/{chunk-HXOWEYV3.js → chunk-D5RAQ4DE.js} +2 -2
  14. package/dist/{chunk-5O5EPYBO.cjs → chunk-JM52ZU7T.cjs} +1222 -1222
  15. package/dist/{chunk-VYUZZIEE.js → chunk-LB2X4X4B.js} +86 -8
  16. package/dist/{chunk-VV2UUW2J.js → chunk-NDK7WYWA.js} +1222 -1222
  17. package/dist/{chunk-WRWX6WIK.cjs → chunk-QDYSHAU6.cjs} +147 -69
  18. package/dist/{chunk-G564CHXM.cjs → chunk-TIM75K3G.cjs} +135 -135
  19. package/dist/{index-BqPY04ZG.d.ts → index-DLugNSr7.d.ts} +27 -13
  20. package/dist/{index-D7x3MkLK.d.cts → index-aZ3tCh1h.d.cts} +27 -13
  21. package/dist/index.cjs +24 -22
  22. package/dist/index.d.cts +2 -2
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.js +6 -4
  25. package/dist/operations/index.cjs +109 -109
  26. package/dist/operations/index.d.cts +2 -2
  27. package/dist/operations/index.d.ts +2 -2
  28. package/dist/operations/index.js +2 -2
  29. package/dist/pool.cjs +8 -8
  30. package/dist/pool.d.cts +1 -1
  31. package/dist/pool.d.ts +1 -1
  32. package/dist/pool.js +4 -4
  33. package/dist/resources/index.cjs +4 -4
  34. package/dist/resources/index.d.cts +1 -1
  35. package/dist/resources/index.d.ts +1 -1
  36. package/dist/resources/index.js +3 -3
  37. package/docs/API.md +48 -18
  38. package/package.json +2 -1
@@ -36,26 +36,26 @@
36
36
 
37
37
 
38
38
 
39
- var _chunkWRWX6WIKcjs = require('../chunk-WRWX6WIK.cjs');
39
+ var _chunkQDYSHAU6cjs = require('../chunk-QDYSHAU6.cjs');
40
40
 
41
41
 
42
- var _chunk5O5EPYBOcjs = require('../chunk-5O5EPYBO.cjs');
42
+ var _chunkJM52ZU7Tcjs = require('../chunk-JM52ZU7T.cjs');
43
43
 
44
44
  // src/operations/searchAcrossResources.ts
45
45
  var DEFAULT_LIMIT = 25;
46
46
  function resourceFor(client, key) {
47
- return client[_chunkWRWX6WIKcjs.camelKey.call(void 0, key)];
47
+ return client[_chunkQDYSHAU6cjs.camelKey.call(void 0, key)];
48
48
  }
49
49
  async function searchAcrossResources(client, query, opts = {}) {
50
50
  const text = query.trim();
51
51
  if (text === "") {
52
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)("searchAcrossResources: query must be a non-empty string");
52
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)("searchAcrossResources: query must be a non-empty string");
53
53
  }
54
- const keys = _nullishCoalesce(opts.resources, () => ( _chunkWRWX6WIKcjs.WORKFLOW_RESOURCES));
54
+ const keys = _nullishCoalesce(opts.resources, () => ( _chunkQDYSHAU6cjs.WORKFLOW_RESOURCES));
55
55
  if (keys.length === 0) {
56
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)("searchAcrossResources: no resources requested");
56
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)("searchAcrossResources: no resources requested");
57
57
  }
58
- const limit = _chunkWRWX6WIKcjs.clampPageSize.call(void 0, _nullishCoalesce(opts.limit, () => ( DEFAULT_LIMIT)));
58
+ const limit = _chunkQDYSHAU6cjs.clampPageSize.call(void 0, _nullishCoalesce(opts.limit, () => ( DEFAULT_LIMIT)));
59
59
  const results = [];
60
60
  const skipped = [];
61
61
  for (const key of keys) {
@@ -73,7 +73,7 @@ async function searchAcrossResources(client, query, opts = {}) {
73
73
 
74
74
  // src/operations/resolveAny.ts
75
75
  function resourceFor2(client, key) {
76
- return client[_chunkWRWX6WIKcjs.camelKey.call(void 0, key)];
76
+ return client[_chunkQDYSHAU6cjs.camelKey.call(void 0, key)];
77
77
  }
78
78
  var FAULT_CATEGORIES = /* @__PURE__ */ new Set(["auth", "rate_limit", "server", "network", "timeout", "policy"]);
79
79
  function missCost(identifier) {
@@ -82,13 +82,13 @@ function missCost(identifier) {
82
82
  }
83
83
  async function resolveAny(client, identifier, opts = {}) {
84
84
  if (typeof identifier === "number") {
85
- _chunkWRWX6WIKcjs.parseIdentifier.call(void 0, identifier, "identifier");
85
+ _chunkQDYSHAU6cjs.parseIdentifier.call(void 0, identifier, "identifier");
86
86
  } else if (identifier.trim() === "") {
87
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)("resolveAny: identifier must be non-empty");
87
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)("resolveAny: identifier must be non-empty");
88
88
  }
89
- const keys = _nullishCoalesce(opts.resources, () => ( _chunkWRWX6WIKcjs.WORKFLOW_RESOURCES));
89
+ const keys = _nullishCoalesce(opts.resources, () => ( _chunkQDYSHAU6cjs.WORKFLOW_RESOURCES));
90
90
  if (keys.length === 0) {
91
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)("resolveAny: no resources requested");
91
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)("resolveAny: no resources requested");
92
92
  }
93
93
  const results = [];
94
94
  for (const key of keys) {
@@ -118,9 +118,9 @@ async function resolveAny(client, identifier, opts = {}) {
118
118
  } catch (err) {
119
119
  let code;
120
120
  let candidates = [];
121
- if (err instanceof _chunkWRWX6WIKcjs.AutotaskConfigError) {
121
+ if (err instanceof _chunkQDYSHAU6cjs.AutotaskConfigError) {
122
122
  code = "CONFIG_ERROR";
123
- } else if (_chunkWRWX6WIKcjs.isAutotaskError.call(void 0, err)) {
123
+ } else if (_chunkQDYSHAU6cjs.isAutotaskError.call(void 0, err)) {
124
124
  if (FAULT_CATEGORIES.has(err.category)) throw err;
125
125
  code = err.code;
126
126
  if (code === "RESOLUTION_AMBIGUOUS" && err.resourceIds !== void 0) {
@@ -147,7 +147,7 @@ async function resolveAny(client, identifier, opts = {}) {
147
147
  // src/operations/aggregate.ts
148
148
  var AGGREGATE_TOP_MAX = 100;
149
149
  var AGGREGATE_DEFAULT_TOP = 25;
150
- var AGGREGATE_DEFAULT_LIMIT = _chunkWRWX6WIKcjs.BOUNDED_QUERY_MAX_LIMIT;
150
+ var AGGREGATE_DEFAULT_LIMIT = _chunkQDYSHAU6cjs.BOUNDED_QUERY_MAX_LIMIT;
151
151
  var AGGREGATE_DATE_BUCKETS = ["month", "week", "year"];
152
152
  var DATE_ONLY_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
153
153
  var DATETIME_RE = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d{1,9})?(Z|[+-]\d{2}:?\d{2})?$/;
@@ -204,7 +204,7 @@ function dateBucketLabel(value, bucket) {
204
204
  }
205
205
  var QUERY_RESOURCE_KEYS = (() => {
206
206
  const s = /* @__PURE__ */ new Set();
207
- for (const rec of _chunk5O5EPYBOcjs.CAPABILITIES) if (rec.operation === "query") s.add(rec.resource);
207
+ for (const rec of _chunkJM52ZU7Tcjs.CAPABILITIES) if (rec.operation === "query") s.add(rec.resource);
208
208
  return s;
209
209
  })();
210
210
  var AGGREGATE_OPT_KEYS = ["groupBy", "sum", "top", "limit"];
@@ -239,14 +239,14 @@ function validateAggregate(operation, filter, opts) {
239
239
  conditions = [];
240
240
  } else {
241
241
  try {
242
- conditions = _chunkWRWX6WIKcjs.buildFilter.call(void 0, conds).filter;
242
+ conditions = _chunkQDYSHAU6cjs.buildFilter.call(void 0, conds).filter;
243
243
  } catch (err) {
244
- problems.push(err instanceof _chunkWRWX6WIKcjs.AutotaskConfigError ? err.message : `filter must be the query-bag filter (13 operators; caps 500 OR-conditions / 1 UDF / 8000 chars); ${String(err)}`);
244
+ problems.push(err instanceof _chunkQDYSHAU6cjs.AutotaskConfigError ? err.message : `filter must be the query-bag filter (13 operators; caps 500 OR-conditions / 1 UDF / 8000 chars); ${String(err)}`);
245
245
  }
246
246
  }
247
247
  }
248
248
  if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
249
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
249
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
250
250
  `aggregate: opts must be the options object (got ${Array.isArray(opts) ? "an array" : typeof opts})`,
251
251
  { operation: "operations.aggregate" }
252
252
  );
@@ -256,8 +256,8 @@ function validateAggregate(operation, filter, opts) {
256
256
  problems.push(`unknown opts key "${key}" \u2014 the bag is closed: ${AGGREGATE_OPT_KEYS.join(", ")}`);
257
257
  }
258
258
  }
259
- const fieldSets = resourceKey !== void 0 ? _chunkWRWX6WIKcjs.MODEL_FIELD_SETS[resourceKey] : void 0;
260
- const dateSets = resourceKey !== void 0 ? _chunkWRWX6WIKcjs.MODEL_DATE_FIELDS[resourceKey] : void 0;
259
+ const fieldSets = resourceKey !== void 0 ? _chunkQDYSHAU6cjs.MODEL_FIELD_SETS[resourceKey] : void 0;
260
+ const dateSets = resourceKey !== void 0 ? _chunkQDYSHAU6cjs.MODEL_DATE_FIELDS[resourceKey] : void 0;
261
261
  const checkFields = (name, fields) => {
262
262
  if (fields === void 0) return [];
263
263
  if (!Array.isArray(fields) || fields.length === 0 || fields.some((f) => typeof f !== "string" || f.trim() === "")) {
@@ -321,11 +321,11 @@ function validateAggregate(operation, filter, opts) {
321
321
  if (!Number.isInteger(opts.limit)) {
322
322
  problems.push(`limit must be an integer (got ${String(opts.limit)})`);
323
323
  } else {
324
- limit = Math.min(Math.max(opts.limit, 1), _chunkWRWX6WIKcjs.BOUNDED_QUERY_MAX_LIMIT);
324
+ limit = Math.min(Math.max(opts.limit, 1), _chunkQDYSHAU6cjs.BOUNDED_QUERY_MAX_LIMIT);
325
325
  }
326
326
  }
327
327
  if (problems.length > 0) {
328
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
328
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
329
329
  `aggregate: ${problems.length} problem(s) found pre-request (zero wire was issued)
330
330
  - ` + problems.join("\n- "),
331
331
  { operation: "operations.aggregate" }
@@ -335,9 +335,9 @@ function validateAggregate(operation, filter, opts) {
335
335
  }
336
336
  async function aggregate(client, operation, filter, opts = {}) {
337
337
  const v = validateAggregate(operation, filter, opts);
338
- const holder = client[_chunkWRWX6WIKcjs.camelKey.call(void 0, v.resourceKey)];
338
+ const holder = client[_chunkQDYSHAU6cjs.camelKey.call(void 0, v.resourceKey)];
339
339
  if (holder === void 0) {
340
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(`aggregate: the client exposes no accessor for resource "${v.resourceKey}"`, {
340
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(`aggregate: the client exposes no accessor for resource "${v.resourceKey}"`, {
341
341
  operation: "operations.aggregate",
342
342
  suggestedAction: "Rebuild the client from the SDK build that ships this registry (the resource set is pinned by the plan)."
343
343
  });
@@ -392,20 +392,20 @@ async function aggregate(client, operation, filter, opts = {}) {
392
392
  async function relationshipMap(client, resourceKey) {
393
393
  void client;
394
394
  if (typeof resourceKey !== "string" || resourceKey.trim() === "") {
395
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
395
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
396
396
  `relationshipMap: resourceKey must be a non-empty plan resource key string (e.g. 'tickets'; got ${typeof resourceKey === "string" ? "a blank string" : typeof resourceKey})`,
397
397
  { suggestedAction: "Pass the exact plan resource key (snake_case) from autotask_catalog \u2014 e.g. tickets, companies, configuration_items, ticket_notes." }
398
398
  );
399
399
  }
400
400
  const key = resourceKey.trim();
401
- const entry = _chunkWRWX6WIKcjs.RELATIONSHIP_MAP[key];
401
+ const entry = _chunkQDYSHAU6cjs.RELATIONSHIP_MAP[key];
402
402
  if (entry === void 0) {
403
- throw new (0, _chunkWRWX6WIKcjs.AutotaskError)(
404
- `relationshipMap: unknown resource "${key}" \u2014 the plan has ${Object.keys(_chunkWRWX6WIKcjs.RELATIONSHIP_MAP).length} resources`,
403
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskError)(
404
+ `relationshipMap: unknown resource "${key}" \u2014 the plan has ${Object.keys(_chunkQDYSHAU6cjs.RELATIONSHIP_MAP).length} resources`,
405
405
  {
406
406
  code: "RESOURCE_UNKNOWN",
407
407
  category: "validation",
408
- suggestedAction: `Pass the exact plan resource key (snake_case) from autotask_catalog (e.g. tickets, companies, configuration_items). Zone facts served are ${_chunkWRWX6WIKcjs.RELATIONSHIP_ZONE.label} (${_chunkWRWX6WIKcjs.RELATIONSHIP_ZONE.zone})-verified.`
408
+ suggestedAction: `Pass the exact plan resource key (snake_case) from autotask_catalog (e.g. tickets, companies, configuration_items). Zone facts served are ${_chunkQDYSHAU6cjs.RELATIONSHIP_ZONE.label} (${_chunkQDYSHAU6cjs.RELATIONSHIP_ZONE.zone})-verified.`
409
409
  }
410
410
  );
411
411
  }
@@ -422,24 +422,24 @@ var BLIND_SURFACE_KINDS = [
422
422
  async function blindSurfaces(client, opts) {
423
423
  void client;
424
424
  if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
425
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)("blindSurfaces: opts must be an object { resource?: string, kind?: BlindSurfaceKind }");
425
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)("blindSurfaces: opts must be an object { resource?: string, kind?: BlindSurfaceKind }");
426
426
  }
427
- const inv = _chunkWRWX6WIKcjs.BLIND_SURFACE_INVENTORY;
427
+ const inv = _chunkQDYSHAU6cjs.BLIND_SURFACE_INVENTORY;
428
428
  if (inv === null) {
429
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)("blindSurfaces: the reachability inventory is absent from the generated artifact \u2014 re-run the build");
429
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)("blindSurfaces: the reachability inventory is absent from the generated artifact \u2014 re-run the build");
430
430
  }
431
431
  let surfaces = inv.surfaces;
432
432
  if (_optionalChain([opts, 'optionalAccess', _ => _.resource]) !== void 0) {
433
433
  const key = typeof opts.resource === "string" ? opts.resource.trim() : "";
434
434
  if (key === "") {
435
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
435
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
436
436
  "blindSurfaces: opts.resource must be a non-empty plan resource key string (e.g. 'tickets')",
437
437
  { suggestedAction: "Pass the exact plan resource key (snake_case) from autotask_catalog \u2014 e.g. tickets, companies, configuration_items." }
438
438
  );
439
439
  }
440
440
  if (!inv.surfaces.some((row) => row.resource === key)) {
441
- throw new (0, _chunkWRWX6WIKcjs.AutotaskError)(
442
- `blindSurfaces: unknown resource "${key}" \u2014 the plan has ${Object.keys(_chunkWRWX6WIKcjs.RELATIONSHIP_MAP).length} resources`,
441
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskError)(
442
+ `blindSurfaces: unknown resource "${key}" \u2014 the plan has ${Object.keys(_chunkQDYSHAU6cjs.RELATIONSHIP_MAP).length} resources`,
443
443
  {
444
444
  code: "RESOURCE_UNKNOWN",
445
445
  category: "validation",
@@ -451,7 +451,7 @@ async function blindSurfaces(client, opts) {
451
451
  }
452
452
  if (_optionalChain([opts, 'optionalAccess', _2 => _2.kind]) !== void 0) {
453
453
  if (!BLIND_SURFACE_KINDS.includes(opts.kind)) {
454
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
454
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
455
455
  `blindSurfaces: unknown kind "${String(opts.kind)}" \u2014 the valid classes are: ${BLIND_SURFACE_KINDS.join(", ")}`,
456
456
  { suggestedAction: `Filter with one of: ${BLIND_SURFACE_KINDS.join(", ")} (or omit kind for the full 116-surface inventory).` }
457
457
  );
@@ -464,51 +464,51 @@ async function blindSurfaces(client, opts) {
464
464
  // src/operations/probeReachability.ts
465
465
  async function probeReachability(client, opts) {
466
466
  if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
467
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)("probeReachability: opts must be an object { resources?: string[], limit?: 1|2, maxWireCalls?: number, confirmProbe?: true }");
467
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)("probeReachability: opts must be an object { resources?: string[], limit?: 1|2, maxWireCalls?: number, confirmProbe?: true }");
468
468
  }
469
- const defs = _chunkWRWX6WIKcjs.REACHABILITY_PROBE_DEFAULTS;
469
+ const defs = _chunkQDYSHAU6cjs.REACHABILITY_PROBE_DEFAULTS;
470
470
  if (_optionalChain([opts, 'optionalAccess', _3 => _3.confirmProbe]) !== true) {
471
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
471
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
472
472
  "probeReachability: confirmProbe: true is required \u2014 the op deliberately fans out read wire across the tenant (one bounded query per surface); pass confirmProbe: true to run it",
473
473
  { suggestedAction: `Re-call with { confirmProbe: true } (plus resources/limit/maxWireCalls as needed). For the ZERO-wire pinned inventory use operations.blindSurfaces.` }
474
474
  );
475
475
  }
476
476
  const limit = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _4 => _4.limit]), () => ( defs.limitDefault));
477
477
  if (!Number.isInteger(limit) || limit < 1 || limit > defs.limitMax) {
478
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
478
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
479
479
  `probeReachability: limit must be an integer 1..${defs.limitMax} (got ${String(limit)}) \u2014 the rows-per-surface bound for the discovery read`
480
480
  );
481
481
  }
482
482
  const cap = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _5 => _5.maxWireCalls]), () => ( defs.defaultCap));
483
483
  if (!Number.isInteger(cap) || cap < 1) {
484
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(`probeReachability: maxWireCalls must be a positive integer (got ${String(cap)})`);
484
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(`probeReachability: maxWireCalls must be a positive integer (got ${String(cap)})`);
485
485
  }
486
486
  if (cap > defs.hardCap) {
487
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
487
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
488
488
  `probeReachability: maxWireCalls ${cap} exceeds the hard wire cap of ${defs.hardCap} \u2014 the sweep is refused above it (never capped silently)`,
489
489
  { suggestedAction: `Pass maxWireCalls \u2264 ${defs.hardCap} and a resources set no larger than the cap (the refused set is never truncated).` }
490
490
  );
491
491
  }
492
- const inv = _chunkWRWX6WIKcjs.BLIND_SURFACE_INVENTORY;
492
+ const inv = _chunkQDYSHAU6cjs.BLIND_SURFACE_INVENTORY;
493
493
  if (inv === null) {
494
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)("probeReachability: the reachability inventory is absent from the generated artifact \u2014 re-run the build");
494
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)("probeReachability: the reachability inventory is absent from the generated artifact \u2014 re-run the build");
495
495
  }
496
496
  let targets;
497
497
  if (_optionalChain([opts, 'optionalAccess', _6 => _6.resources]) === void 0) {
498
498
  targets = [...defs.defaultTargets];
499
499
  } else {
500
500
  if (!Array.isArray(opts.resources) || opts.resources.length === 0) {
501
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)("probeReachability: opts.resources must be a non-empty string[] of plan resource keys (or omit it for the default non-data-full set)");
501
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)("probeReachability: opts.resources must be a non-empty string[] of plan resource keys (or omit it for the default non-data-full set)");
502
502
  }
503
503
  const seen = /* @__PURE__ */ new Set();
504
504
  for (const r of opts.resources) {
505
505
  if (typeof r !== "string" || r.trim() === "") {
506
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(`probeReachability: opts.resources must contain non-empty plan resource key strings (got ${typeof r === "string" && r.trim() === "" ? "a blank string" : typeof r})`);
506
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(`probeReachability: opts.resources must contain non-empty plan resource key strings (got ${typeof r === "string" && r.trim() === "" ? "a blank string" : typeof r})`);
507
507
  }
508
508
  const key = r.trim();
509
509
  if (!inv.surfaces.some((row) => row.resource === key)) {
510
510
  const surfaceCount = new Set(inv.surfaces.map((s) => s.resource)).size;
511
- throw new (0, _chunkWRWX6WIKcjs.AutotaskError)(
511
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskError)(
512
512
  `probeReachability: unknown resource "${key}" \u2014 the inventory has ${surfaceCount} surfaces`,
513
513
  {
514
514
  code: "RESOURCE_UNKNOWN",
@@ -522,7 +522,7 @@ async function probeReachability(client, opts) {
522
522
  targets = [...seen];
523
523
  }
524
524
  if (targets.length > cap) {
525
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
525
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
526
526
  `probeReachability: ${targets.length} requested surface(s) exceed the wire cap of ${cap} \u2014 the sweep is refused above its cap (never truncated)`,
527
527
  { suggestedAction: `Raise maxWireCalls (\u2264 ${defs.hardCap}) to cover the set, or pass a smaller resources list.` }
528
528
  );
@@ -532,7 +532,7 @@ async function probeReachability(client, opts) {
532
532
  for (const resource of targets.sort()) {
533
533
  const row = byResource.get(resource);
534
534
  if (row === void 0) continue;
535
- const holder = client[_chunkWRWX6WIKcjs.camelKey.call(void 0, resource)];
535
+ const holder = client[_chunkQDYSHAU6cjs.camelKey.call(void 0, resource)];
536
536
  const probeFn = _optionalChain([holder, 'optionalAccess', _7 => _7.queryBounded]);
537
537
  if (typeof probeFn !== "function") {
538
538
  results.push({
@@ -551,7 +551,7 @@ async function probeReachability(client, opts) {
551
551
  probe: { ok: true, wire: 1, error: null }
552
552
  });
553
553
  } catch (err) {
554
- const code = _chunkWRWX6WIKcjs.isAutotaskError.call(void 0, err) ? err.code : "NETWORK_ERROR";
554
+ const code = _chunkQDYSHAU6cjs.isAutotaskError.call(void 0, err) ? err.code : "NETWORK_ERROR";
555
555
  const message = err instanceof Error ? err.message : String(err);
556
556
  results.push({
557
557
  ...row,
@@ -579,24 +579,24 @@ var CREATE_BLOCKER_KINDS = [
579
579
  async function createGuidance(client, opts) {
580
580
  void client;
581
581
  if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
582
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
582
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
583
583
  "createGuidance: opts must be an object { resources?: string[], kind?: CreateBlockerKind }"
584
584
  );
585
585
  }
586
- let rows = _chunkWRWX6WIKcjs.CREATE_GUIDANCE.rows;
586
+ let rows = _chunkQDYSHAU6cjs.CREATE_GUIDANCE.rows;
587
587
  if (_optionalChain([opts, 'optionalAccess', _9 => _9.resources]) !== void 0) {
588
588
  if (!Array.isArray(opts.resources) || opts.resources.length === 0) {
589
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)("createGuidance: opts.resources must be a non-empty string[] of plan resource keys");
589
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)("createGuidance: opts.resources must be a non-empty string[] of plan resource keys");
590
590
  }
591
591
  const wanted = /* @__PURE__ */ new Set();
592
592
  for (const r of opts.resources) {
593
593
  if (typeof r !== "string" || r.trim() === "") {
594
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)("createGuidance: opts.resources must contain non-empty plan resource key strings");
594
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)("createGuidance: opts.resources must contain non-empty plan resource key strings");
595
595
  }
596
596
  const key = r.trim();
597
- if (!_chunkWRWX6WIKcjs.CREATE_GUIDANCE.rows.some((row) => row.resource === key)) {
598
- throw new (0, _chunkWRWX6WIKcjs.AutotaskError)(
599
- `createGuidance: unknown resource "${key}" \u2014 the catalog has ${_chunkWRWX6WIKcjs.CREATE_GUIDANCE.rows.length} create entities`,
597
+ if (!_chunkQDYSHAU6cjs.CREATE_GUIDANCE.rows.some((row) => row.resource === key)) {
598
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskError)(
599
+ `createGuidance: unknown resource "${key}" \u2014 the catalog has ${_chunkQDYSHAU6cjs.CREATE_GUIDANCE.rows.length} create entities`,
600
600
  {
601
601
  code: "RESOURCE_UNKNOWN",
602
602
  category: "validation",
@@ -610,18 +610,18 @@ async function createGuidance(client, opts) {
610
610
  }
611
611
  if (_optionalChain([opts, 'optionalAccess', _10 => _10.kind]) !== void 0) {
612
612
  if (!CREATE_BLOCKER_KINDS.includes(opts.kind)) {
613
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
613
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
614
614
  `createGuidance: unknown kind "${String(opts.kind)}" \u2014 the valid kinds are: ${CREATE_BLOCKER_KINDS.join(", ")}`
615
615
  );
616
616
  }
617
617
  rows = rows.filter((row) => _optionalChain([row, 'access', _11 => _11.blocker, 'optionalAccess', _12 => _12.kind]) === opts.kind);
618
618
  }
619
619
  return {
620
- zone: _chunkWRWX6WIKcjs.CREATE_GUIDANCE.zone,
621
- label: _chunkWRWX6WIKcjs.CREATE_GUIDANCE.label,
622
- verifiedAt: _chunkWRWX6WIKcjs.CREATE_GUIDANCE.verifiedAt,
620
+ zone: _chunkQDYSHAU6cjs.CREATE_GUIDANCE.zone,
621
+ label: _chunkQDYSHAU6cjs.CREATE_GUIDANCE.label,
622
+ verifiedAt: _chunkQDYSHAU6cjs.CREATE_GUIDANCE.verifiedAt,
623
623
  rows,
624
- counts: _chunkWRWX6WIKcjs.CREATE_GUIDANCE.counts
624
+ counts: _chunkQDYSHAU6cjs.CREATE_GUIDANCE.counts
625
625
  };
626
626
  }
627
627
 
@@ -630,7 +630,7 @@ var RECOVERY_CONFIRM = "operations.recovery";
630
630
  var RECOVERY_DEFAULT_LIMIT = 25;
631
631
  var RECOVERY_MAX_LIMIT = 100;
632
632
  function configError(message, operation, suggestedAction) {
633
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(message, { operation, suggestedAction });
633
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(message, { operation, suggestedAction });
634
634
  }
635
635
  function parseMatchId(record) {
636
636
  const raw = record.id;
@@ -647,7 +647,7 @@ function parseMatchId(record) {
647
647
  }
648
648
  async function recovery(client, input, opts = {}) {
649
649
  const operation = RECOVERY_CONFIRM;
650
- if (!_chunkWRWX6WIKcjs.isRecord.call(void 0, input)) {
650
+ if (!_chunkQDYSHAU6cjs.isRecord.call(void 0, input)) {
651
651
  configError(
652
652
  `recovery: input must be an object { resource, marker, ... } (got ${typeof input})`,
653
653
  operation,
@@ -678,10 +678,10 @@ async function recovery(client, input, opts = {}) {
678
678
  "Pass action: 'delete' for the destructive path (dry-run-first; the apply requires the confirm string)."
679
679
  );
680
680
  }
681
- const entry = _chunkWRWX6WIKcjs.RELATIONSHIP_MAP[resource];
681
+ const entry = _chunkQDYSHAU6cjs.RELATIONSHIP_MAP[resource];
682
682
  if (entry === void 0) {
683
- throw new (0, _chunkWRWX6WIKcjs.AutotaskError)(
684
- `recovery: unknown resource "${resource}" \u2014 the plan has ${Object.keys(_chunkWRWX6WIKcjs.RELATIONSHIP_MAP).length} resources`,
683
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskError)(
684
+ `recovery: unknown resource "${resource}" \u2014 the plan has ${Object.keys(_chunkQDYSHAU6cjs.RELATIONSHIP_MAP).length} resources`,
685
685
  {
686
686
  code: "RESOURCE_UNKNOWN",
687
687
  category: "validation",
@@ -690,7 +690,7 @@ async function recovery(client, input, opts = {}) {
690
690
  }
691
691
  );
692
692
  }
693
- const holder = client[_chunkWRWX6WIKcjs.camelKey.call(void 0, resource)];
693
+ const holder = client[_chunkQDYSHAU6cjs.camelKey.call(void 0, resource)];
694
694
  if (!holder || typeof holder.queryBounded !== "function") {
695
695
  configError(
696
696
  `recovery: ${resource} exposes no bounded query surface \u2014 the marker search cannot run`,
@@ -698,7 +698,7 @@ async function recovery(client, input, opts = {}) {
698
698
  "Use a resource with a query surface, or address the record by id directly (get/fetchMany)."
699
699
  );
700
700
  }
701
- const field = input.field !== void 0 ? String(input.field) : _chunkWRWX6WIKcjs.MARKER_FIELDS[resource];
701
+ const field = input.field !== void 0 ? String(input.field) : _chunkQDYSHAU6cjs.MARKER_FIELDS[resource];
702
702
  if (typeof field !== "string" || field.trim() === "") {
703
703
  configError(
704
704
  `recovery: ${resource} has no plan markerField and no input.field was passed \u2014 the marker search needs a name-like field to filter on`,
@@ -734,7 +734,7 @@ async function recovery(client, input, opts = {}) {
734
734
  );
735
735
  }
736
736
  for (const c of input.filter) {
737
- if (!_chunkWRWX6WIKcjs.isRecord.call(void 0, c) || typeof c.op !== "string" || c.op === "and" || c.op === "or") {
737
+ if (!_chunkQDYSHAU6cjs.isRecord.call(void 0, c) || typeof c.op !== "string" || c.op === "and" || c.op === "or") {
738
738
  configError(
739
739
  "recovery: input.filter accepts only plain leaf conditions ({ field, op, value }) \u2014 no grouping",
740
740
  operation,
@@ -755,7 +755,7 @@ async function recovery(client, input, opts = {}) {
755
755
  }
756
756
  limit = input.limit;
757
757
  }
758
- const boundaryNote = _chunkWRWX6WIKcjs.DELETE_BOUNDARY_NOTES[resource];
758
+ const boundaryNote = _chunkQDYSHAU6cjs.DELETE_BOUNDARY_NOTES[resource];
759
759
  const boundary = {
760
760
  available: boundaryNote === void 0,
761
761
  reason: _nullishCoalesce(boundaryNote, () => ( null)),
@@ -767,7 +767,7 @@ async function recovery(client, input, opts = {}) {
767
767
  };
768
768
  const isDelete = action === "delete";
769
769
  if (isDelete && boundaryNote !== void 0) {
770
- throw new (0, _chunkWRWX6WIKcjs.DeleteBoundaryError)(
770
+ throw new (0, _chunkQDYSHAU6cjs.DeleteBoundaryError)(
771
771
  `recovery: the vendor defines no DELETE for ${resource} \u2014 the delete cannot be issued through the API (zero wire was issued)`,
772
772
  {
773
773
  operation,
@@ -779,7 +779,7 @@ async function recovery(client, input, opts = {}) {
779
779
  const dryRun = _optionalChain([opts, 'optionalAccess', _13 => _13.dryRun]) !== false;
780
780
  const confirm = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _14 => _14.confirm]), () => ( input.confirm));
781
781
  if (isDelete && !dryRun && confirm !== RECOVERY_CONFIRM) {
782
- throw new (0, _chunkWRWX6WIKcjs.ConfirmationRequiredError)(
782
+ throw new (0, _chunkQDYSHAU6cjs.ConfirmationRequiredError)(
783
783
  `recovery: action 'delete' apply is destructive and requires its confirmation flag: pass confirm: "${RECOVERY_CONFIRM}"`,
784
784
  {
785
785
  operation: RECOVERY_CONFIRM,
@@ -795,7 +795,7 @@ async function recovery(client, input, opts = {}) {
795
795
  const query = await holder.queryBounded({ filter: conditions, limit });
796
796
  if (query.hasMore) {
797
797
  const wire = isDelete ? "DELETE wire" : "mutating wire";
798
- throw new (0, _chunkWRWX6WIKcjs.RecoveryTruncatedError)(
798
+ throw new (0, _chunkQDYSHAU6cjs.RecoveryTruncatedError)(
799
799
  `recovery: the marker search on ${resource} TRIPPED its match cap (${limit}) \u2014 more matches exist than were returned (zero ${wire} was issued)`,
800
800
  {
801
801
  operation,
@@ -834,7 +834,7 @@ async function recovery(client, input, opts = {}) {
834
834
  return { ...base, simulated: true, dryRun: true };
835
835
  }
836
836
  if (unsafeId) {
837
- throw new (0, _chunkWRWX6WIKcjs.MarkerUnsafeIdError)(
837
+ throw new (0, _chunkQDYSHAU6cjs.MarkerUnsafeIdError)(
838
838
  `recovery: ${unsafeIds.length} of ${matches.length} match(es) on ${resource} have ids beyond Number.MAX_SAFE_INTEGER \u2014 they CANNOT be addressed through the SDK's typed delete surface (zero DELETE wire was issued)`,
839
839
  {
840
840
  operation,
@@ -845,7 +845,7 @@ async function recovery(client, input, opts = {}) {
845
845
  }
846
846
  const deleteMethod = holder.delete;
847
847
  if (deleteMethod === void 0) {
848
- throw new (0, _chunkWRWX6WIKcjs.DeleteBoundaryError)(
848
+ throw new (0, _chunkQDYSHAU6cjs.DeleteBoundaryError)(
849
849
  `recovery: ${resource} has no delete method on the client \u2014 the boundary is marked available in the plan but the typed delete surface is missing`,
850
850
  {
851
851
  operation,
@@ -874,14 +874,14 @@ async function recovery(client, input, opts = {}) {
874
874
  verify = "still-present";
875
875
  }
876
876
  } catch (err) {
877
- if (err instanceof _chunkWRWX6WIKcjs.NotFoundError) verify = "not-found";
877
+ if (err instanceof _chunkQDYSHAU6cjs.NotFoundError) verify = "not-found";
878
878
  else {
879
879
  verify = "error";
880
- code = _chunkWRWX6WIKcjs.isAutotaskError.call(void 0, err) ? err.code : "SERVER_ERROR";
880
+ code = _chunkQDYSHAU6cjs.isAutotaskError.call(void 0, err) ? err.code : "SERVER_ERROR";
881
881
  }
882
882
  }
883
883
  } catch (err) {
884
- code = _chunkWRWX6WIKcjs.isAutotaskError.call(void 0, err) ? err.code : "SERVER_ERROR";
884
+ code = _chunkQDYSHAU6cjs.isAutotaskError.call(void 0, err) ? err.code : "SERVER_ERROR";
885
885
  }
886
886
  deleted.push({ id, verified: verify === "not-found", code });
887
887
  }
@@ -889,13 +889,13 @@ async function recovery(client, input, opts = {}) {
889
889
  }
890
890
 
891
891
  // src/operations/invoke.ts
892
- var RECORDS = _chunk5O5EPYBOcjs.CAPABILITIES;
892
+ var RECORDS = _chunkJM52ZU7Tcjs.CAPABILITIES;
893
893
  var byId = new Map(RECORDS.map((r) => [r.id, r]));
894
894
  function needsConfirmation(record) {
895
895
  return record.effect === "destructive" || (_nullishCoalesce(record.flags, () => ( []))).includes("requiresApproval");
896
896
  }
897
897
  function refuse(message, operation, suggestedAction) {
898
- throw new (0, _chunkWRWX6WIKcjs.ConfirmationRequiredError)(message, { operation, suggestedAction });
898
+ throw new (0, _chunkQDYSHAU6cjs.ConfirmationRequiredError)(message, { operation, suggestedAction });
899
899
  }
900
900
  var MODE_BY_EFFECT = {
901
901
  read: "read",
@@ -939,7 +939,7 @@ function looseTypeOk(type, value) {
939
939
  case "string[]":
940
940
  return Array.isArray(value) && value.every((v) => typeof v === "string");
941
941
  case "object":
942
- return _chunkWRWX6WIKcjs.isRecord.call(void 0, value);
942
+ return _chunkQDYSHAU6cjs.isRecord.call(void 0, value);
943
943
  default:
944
944
  return true;
945
945
  }
@@ -956,7 +956,7 @@ function validateDispatchArgs(record, argsIn) {
956
956
  const schema = _nullishCoalesce(record.inputSchema, () => ( {}));
957
957
  const names = Object.keys(schema);
958
958
  if (args.length > names.length) {
959
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
959
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
960
960
  `invoke: "${operation}" declares ${names.length} positional arg(s) (${declaredArgList(record)}) but ${args.length} were passed \u2014 extra args are refused, not dropped (v0.2.0 silently dropped them)`,
961
961
  {
962
962
  operation,
@@ -966,7 +966,7 @@ function validateDispatchArgs(record, argsIn) {
966
966
  }
967
967
  const required = names.filter((n) => schema[n].required);
968
968
  if (args.length < required.length) {
969
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
969
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
970
970
  `invoke: "${operation}" requires ${required.length} positional arg(s) (${required.map((n) => `${n}: ${schema[n].type}`).join(", ")}) but only ${args.length} were passed \u2014 declared args: ${declaredArgList(record)}`,
971
971
  { operation }
972
972
  );
@@ -977,7 +977,7 @@ function validateDispatchArgs(record, argsIn) {
977
977
  const name = names[i];
978
978
  const spec = schema[name];
979
979
  if (!looseTypeOk(spec.type, value)) {
980
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
980
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
981
981
  `invoke: "${operation}" arg ${i + 1} is declared ${name}: ${spec.type} \u2014 the value has the wrong type (pass a ${spec.type} value)`,
982
982
  { operation }
983
983
  );
@@ -1034,11 +1034,11 @@ function validateParamsBag(record, args) {
1034
1034
  const valid = PARAMS_BAG_KEYS[record.operation];
1035
1035
  if (valid === void 0) return;
1036
1036
  const bag = _optionalChain([args, 'optionalAccess', _15 => _15[0]]);
1037
- if (bag === void 0 || bag === null || !_chunkWRWX6WIKcjs.isRecord.call(void 0, bag)) return;
1037
+ if (bag === void 0 || bag === null || !_chunkQDYSHAU6cjs.isRecord.call(void 0, bag)) return;
1038
1038
  const unknown = Object.keys(bag).filter((k) => !valid.includes(k));
1039
1039
  if (unknown.length === 0) return;
1040
1040
  const suggestions = unknown.map((k) => [k, suggestForKey(k, valid)]).filter((pair) => pair[1] !== null).map(([k, s]) => `"${k}" \u2192 "${s}"`);
1041
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
1041
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
1042
1042
  `invoke: "${record.id}" params bag has unknown key(s) ${unknown.map((k) => `"${k}"`).join(", ")} \u2014 the bag is closed (valid keys: ${valid.join(", ")})`,
1043
1043
  {
1044
1044
  operation: record.id,
@@ -1057,7 +1057,7 @@ async function liveFieldNames(holder) {
1057
1057
  }
1058
1058
  return names.length > 0 ? names : null;
1059
1059
  } catch (err) {
1060
- if (!_chunkWRWX6WIKcjs.isAutotaskError.call(void 0, err) || err.code === "ABORTED") throw err;
1060
+ if (!_chunkQDYSHAU6cjs.isAutotaskError.call(void 0, err) || err.code === "ABORTED") throw err;
1061
1061
  return null;
1062
1062
  }
1063
1063
  }
@@ -1065,10 +1065,10 @@ var UNKNOWN_NAME_LIST_CAP = 20;
1065
1065
  var UNKNOWN_NAME_DISPLAY_CHARS = 80;
1066
1066
  async function validateQueryIncludeFields(record, holder, args) {
1067
1067
  const bag = args[0];
1068
- if (!_chunkWRWX6WIKcjs.isRecord.call(void 0, bag)) return;
1068
+ if (!_chunkQDYSHAU6cjs.isRecord.call(void 0, bag)) return;
1069
1069
  const fieldCheck = bag["fieldCheck"];
1070
1070
  if (fieldCheck !== void 0 && typeof fieldCheck !== "boolean") {
1071
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
1071
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
1072
1072
  `invoke: "${record.id}" params bag fieldCheck must be a boolean (got ${typeof fieldCheck}) \u2014 the request was not issued`,
1073
1073
  { operation: record.id, suggestedAction: "Pass fieldCheck: true (default) or fieldCheck: false (disable the includeFields name check)." }
1074
1074
  );
@@ -1087,7 +1087,7 @@ async function validateQueryIncludeFields(record, holder, args) {
1087
1087
  }
1088
1088
  }
1089
1089
  if (!shapeOk) {
1090
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
1090
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
1091
1091
  `invoke: "${record.id}" params bag includeFields must be an array of non-empty field-name strings \u2014 the request was not issued`,
1092
1092
  {
1093
1093
  operation: record.id,
@@ -1098,14 +1098,14 @@ async function validateQueryIncludeFields(record, holder, args) {
1098
1098
  if (names.length === 0) return;
1099
1099
  if (fieldCheck === false) return;
1100
1100
  const live = await liveFieldNames(holder);
1101
- const known = _nullishCoalesce(live, () => ( _chunkWRWX6WIKcjs.MODEL_FIELD_SETS[record.resource]));
1101
+ const known = _nullishCoalesce(live, () => ( _chunkQDYSHAU6cjs.MODEL_FIELD_SETS[record.resource]));
1102
1102
  if (known === void 0) return;
1103
1103
  const unknown = names.filter((name) => !known.includes(name));
1104
1104
  if (unknown.length === 0) return;
1105
1105
  const authority = live !== null ? "the tenant's live entity field metadata" : "the vendored spec (src/field-sets.ts)";
1106
1106
  const listed = unknown.slice(0, UNKNOWN_NAME_LIST_CAP).map((n) => `"${n.length > UNKNOWN_NAME_DISPLAY_CHARS ? `${n.slice(0, UNKNOWN_NAME_DISPLAY_CHARS)}\u2026` : n}"`).join(", ");
1107
1107
  const more = unknown.length > UNKNOWN_NAME_LIST_CAP ? ` (and ${unknown.length - UNKNOWN_NAME_LIST_CAP} more)` : "";
1108
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
1108
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
1109
1109
  `invoke: "${record.id}" includeFields has unknown field name(s) ${listed}${more} against ${authority} \u2014 the query POST was not issued`,
1110
1110
  {
1111
1111
  operation: record.id,
@@ -1119,7 +1119,7 @@ function validateInvokeOptions(opts, operation) {
1119
1119
  const unknown = Object.keys(opts).filter((k) => !INVOKE_OPTION_KEYS.includes(k));
1120
1120
  if (unknown.length === 0) return;
1121
1121
  const suggestions = unknown.map((k) => [k, suggestForKey(k, ["dryRun", "confirm", "lastModifiedDate", "maxRetries"])]).filter((pair) => pair[1] !== null).map(([k, s]) => `"${k}" \u2192 "${s}"`);
1122
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
1122
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
1123
1123
  `invoke: "${operation}" has unknown option key(s) ${unknown.map((k) => `"${k}"`).join(", ")} \u2014 the options set is closed (valid: dryRun, confirm, lastModifiedDate, maxRetries; "mode" is internal to the mode wrappers)`,
1124
1124
  {
1125
1125
  operation,
@@ -1132,7 +1132,7 @@ function unknownKeysRefusal(raw, validKeys, subject, operation) {
1132
1132
  const unknown = Object.keys(raw).filter((k) => !validKeys.includes(k));
1133
1133
  if (unknown.length === 0) return null;
1134
1134
  const suggestions = unknown.map((k) => [k, suggestForKey(k, [...validKeys])]).filter((pair) => pair[1] !== null).map(([k, s]) => `"${k}" \u2192 "${s}"`);
1135
- return new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
1135
+ return new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
1136
1136
  `unknown ${subject} ${unknown.map((k) => `"${k}"`).join(", ")} \u2014 the ${subject} set is closed (valid keys: ${validKeys.join(", ")})`,
1137
1137
  {
1138
1138
  ...operation !== void 0 ? { operation } : {},
@@ -1144,7 +1144,7 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
1144
1144
  const args = _nullishCoalesce(argsIn, () => ( []));
1145
1145
  const record = byId.get(operation);
1146
1146
  if (record === void 0) {
1147
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
1147
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
1148
1148
  `invoke: unknown operation "${operation}" \u2014 it is not in the capability registry`,
1149
1149
  { operation, suggestedAction: "List the registry (the ./capabilities subpath) for the exact operation key." }
1150
1150
  );
@@ -1152,17 +1152,17 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
1152
1152
  validateInvokeOptions(opts, operation);
1153
1153
  const mode = opts.mode;
1154
1154
  if (mode !== void 0 && MODE_BY_EFFECT[record.effect] !== mode) {
1155
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(crossModeRefusal(operation, record.effect, mode), { operation });
1155
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(crossModeRefusal(operation, record.effect, mode), { operation });
1156
1156
  }
1157
1157
  if (opts.dryRun !== void 0 && typeof opts.dryRun !== "boolean") {
1158
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
1158
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
1159
1159
  `invoke: dryRun must be a boolean (got ${typeof opts.dryRun}) \u2014 "${operation}" was not issued`,
1160
1160
  { operation, suggestedAction: "Pass dryRun: true (simulate) or dryRun: false (apply) as a real boolean." }
1161
1161
  );
1162
1162
  }
1163
1163
  const isWrite = record.effect !== "read";
1164
1164
  if (!isWrite && opts.dryRun === true) {
1165
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
1165
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
1166
1166
  `invoke: "${operation}" is a read \u2014 dryRun is not applicable (reads issue their request as-is)`,
1167
1167
  { operation }
1168
1168
  );
@@ -1177,15 +1177,15 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
1177
1177
  validateDispatchArgs(record, args);
1178
1178
  validateParamsBag(record, args);
1179
1179
  const boundedQuery = record.kind === "primitive" && record.operation === "query";
1180
- let holder = client[_chunkWRWX6WIKcjs.camelKey.call(void 0, record.resource)];
1180
+ let holder = client[_chunkQDYSHAU6cjs.camelKey.call(void 0, record.resource)];
1181
1181
  if (typeof holder === "function") {
1182
- holder = _nullishCoalesce(client[`${_chunkWRWX6WIKcjs.camelKey.call(void 0, record.resource)}Resource`], () => ( holder));
1182
+ holder = _nullishCoalesce(client[`${_chunkQDYSHAU6cjs.camelKey.call(void 0, record.resource)}Resource`], () => ( holder));
1183
1183
  }
1184
1184
  if (holder === void 0 && record.resource === "operations") {
1185
1185
  holder = {
1186
1186
  resolveAny: (identifier, opts2) => resolveAny(client, identifier, opts2),
1187
1187
  searchAcrossResources: (query, opts2) => searchAcrossResources(client, query, opts2),
1188
- fetchMany: (items, opts2) => _chunkWRWX6WIKcjs.fetchMany.call(void 0, client, items, opts2),
1188
+ fetchMany: (items, opts2) => _chunkQDYSHAU6cjs.fetchMany.call(void 0, client, items, opts2),
1189
1189
  // Issue #62: the generic aggregate + the cheap count — the
1190
1190
  // groupBy/sum-absent mode is ONE vendor /query/count (the S12-C blind
1191
1191
  // sentinel rides through); the group/sum modes walk the named
@@ -1195,12 +1195,12 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
1195
1195
  // Issue #59 PR-B: the bulk fetch by ids — query-first chunked `id in`
1196
1196
  // reads + the per-id `get` fallback (blind-surface-safe; per-item
1197
1197
  // typed outcomes reuse the fetchMany shapes).
1198
- fetchByIds: (items, opts2) => _chunkWRWX6WIKcjs.fetchByIds.call(void 0, client, items, opts2),
1198
+ fetchByIds: (items, opts2) => _chunkQDYSHAU6cjs.fetchByIds.call(void 0, client, items, opts2),
1199
1199
  // Issue #65: opt-in resource name expansion — per-id resources.get
1200
1200
  // reads ONLY (never an id-in query — the resources table can be blind
1201
1201
  // to count/query while per-id reads work); blind-marked rows for ids
1202
1202
  // the API user cannot resolve; the name cache (default-on).
1203
- expandResourceNames: (ids, opts2) => _chunkWRWX6WIKcjs.expandResourceNames.call(void 0, client, ids, opts2),
1203
+ expandResourceNames: (ids, opts2) => _chunkQDYSHAU6cjs.expandResourceNames.call(void 0, client, ids, opts2),
1204
1204
  relationshipMap: (resourceKey) => relationshipMap(client, resourceKey),
1205
1205
  // Issue #11: the served blind-surface inventory (zero wire) + the
1206
1206
  // bounded caller-opted reachability sweep (read-only, confirmProbe-
@@ -1213,7 +1213,7 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
1213
1213
  // entityInformation GETs (the op's own cap refuses over-cap fan-outs
1214
1214
  // pre-request; per-resource failures are recorded on the row and
1215
1215
  // never abort the call).
1216
- fieldCatalog: (opts2) => _chunkWRWX6WIKcjs.fieldCatalog.call(void 0, client, opts2),
1216
+ fieldCatalog: (opts2) => _chunkQDYSHAU6cjs.fieldCatalog.call(void 0, client, opts2),
1217
1217
  // Issue #9: the one-call recovery/cleanup op — effect write in the
1218
1218
  // registry (the governor's dry-run-first applies to it); the op's own
1219
1219
  // confirm gate makes the destructive action deliberate (the governor
@@ -1222,7 +1222,7 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
1222
1222
  };
1223
1223
  }
1224
1224
  if (holder === void 0) {
1225
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
1225
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
1226
1226
  `invoke: the client exposes no accessor for resource "${record.resource}"`,
1227
1227
  { operation }
1228
1228
  );
@@ -1231,7 +1231,7 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
1231
1231
  const methodName = boundedQuery ? "queryBounded" : record.operation;
1232
1232
  const method = holder[methodName];
1233
1233
  if (typeof method !== "function") {
1234
- throw new (0, _chunkWRWX6WIKcjs.AutotaskConfigError)(
1234
+ throw new (0, _chunkQDYSHAU6cjs.AutotaskConfigError)(
1235
1235
  `invoke: "${record.resource}.${methodName}" is not a callable method on the client`,
1236
1236
  { operation }
1237
1237
  );
@@ -1338,4 +1338,4 @@ async function invokeDelete(client, operation, args = [], opts = {}) {
1338
1338
 
1339
1339
 
1340
1340
 
1341
- exports.AGGREGATE_DATE_BUCKETS = AGGREGATE_DATE_BUCKETS; exports.AGGREGATE_DEFAULT_LIMIT = AGGREGATE_DEFAULT_LIMIT; exports.AGGREGATE_DEFAULT_TOP = AGGREGATE_DEFAULT_TOP; exports.AGGREGATE_TOP_MAX = AGGREGATE_TOP_MAX; exports.BLIND_SURFACE_KINDS = BLIND_SURFACE_KINDS; exports.CREATE_BLOCKER_KINDS = CREATE_BLOCKER_KINDS; exports.EXPAND_RESOURCE_NAMES_MAX_IDS = _chunkWRWX6WIKcjs.EXPAND_RESOURCE_NAMES_MAX_IDS; exports.FETCH_BY_IDS_CHUNK_SIZE = _chunkWRWX6WIKcjs.FETCH_BY_IDS_CHUNK_SIZE; exports.FETCH_BY_IDS_MAX_ITEMS = _chunkWRWX6WIKcjs.FETCH_BY_IDS_MAX_ITEMS; exports.FETCH_MANY_MAX_ITEMS = _chunkWRWX6WIKcjs.FETCH_MANY_MAX_ITEMS; exports.FIELD_CACHE_KINDS = _chunkWRWX6WIKcjs.FIELD_CACHE_KINDS; exports.FIELD_CATALOG_HONESTY_NOTE = _chunkWRWX6WIKcjs.FIELD_CATALOG_HONESTY_NOTE; exports.INVOKE_OPTION_KEYS = INVOKE_OPTION_KEYS; exports.MAX_FIELD_CATALOG_WIRE = _chunkWRWX6WIKcjs.MAX_FIELD_CATALOG_WIRE; exports.PARAMS_BAG_KEYS = PARAMS_BAG_KEYS; exports.PICKLIST_VALUE_NOT_SERVED_NOTE = _chunkWRWX6WIKcjs.PICKLIST_VALUE_NOT_SERVED_NOTE; exports.RECOVERY_CONFIRM = RECOVERY_CONFIRM; exports.RECOVERY_DEFAULT_LIMIT = RECOVERY_DEFAULT_LIMIT; exports.RECOVERY_MAX_LIMIT = RECOVERY_MAX_LIMIT; exports.WORKFLOW_RESOURCES = _chunkWRWX6WIKcjs.WORKFLOW_RESOURCES; exports.aggregate = aggregate; exports.blindSurfaces = blindSurfaces; exports.createGuidance = createGuidance; exports.dateBucketLabel = dateBucketLabel; exports.expandResourceNames = _chunkWRWX6WIKcjs.expandResourceNames; exports.fetchByIds = _chunkWRWX6WIKcjs.fetchByIds; exports.fetchMany = _chunkWRWX6WIKcjs.fetchMany; exports.fieldCatalog = _chunkWRWX6WIKcjs.fieldCatalog; exports.invoke = invoke; exports.invokeDelete = invokeDelete; exports.invokeRead = invokeRead; exports.invokeWrite = invokeWrite; exports.needsConfirmation = needsConfirmation; exports.probeReachability = probeReachability; exports.recovery = recovery; exports.relationshipMap = relationshipMap; exports.resolveAny = resolveAny; exports.searchAcrossResources = searchAcrossResources; exports.unknownKeysRefusal = unknownKeysRefusal; exports.validateDispatchArgs = validateDispatchArgs; exports.validateFetchManyItems = _chunkWRWX6WIKcjs.validateFetchManyItems; exports.validateInvokeOptions = validateInvokeOptions; exports.validateParamsBag = validateParamsBag;
1341
+ exports.AGGREGATE_DATE_BUCKETS = AGGREGATE_DATE_BUCKETS; exports.AGGREGATE_DEFAULT_LIMIT = AGGREGATE_DEFAULT_LIMIT; exports.AGGREGATE_DEFAULT_TOP = AGGREGATE_DEFAULT_TOP; exports.AGGREGATE_TOP_MAX = AGGREGATE_TOP_MAX; exports.BLIND_SURFACE_KINDS = BLIND_SURFACE_KINDS; exports.CREATE_BLOCKER_KINDS = CREATE_BLOCKER_KINDS; exports.EXPAND_RESOURCE_NAMES_MAX_IDS = _chunkQDYSHAU6cjs.EXPAND_RESOURCE_NAMES_MAX_IDS; exports.FETCH_BY_IDS_CHUNK_SIZE = _chunkQDYSHAU6cjs.FETCH_BY_IDS_CHUNK_SIZE; exports.FETCH_BY_IDS_MAX_ITEMS = _chunkQDYSHAU6cjs.FETCH_BY_IDS_MAX_ITEMS; exports.FETCH_MANY_MAX_ITEMS = _chunkQDYSHAU6cjs.FETCH_MANY_MAX_ITEMS; exports.FIELD_CACHE_KINDS = _chunkQDYSHAU6cjs.FIELD_CACHE_KINDS; exports.FIELD_CATALOG_HONESTY_NOTE = _chunkQDYSHAU6cjs.FIELD_CATALOG_HONESTY_NOTE; exports.INVOKE_OPTION_KEYS = INVOKE_OPTION_KEYS; exports.MAX_FIELD_CATALOG_WIRE = _chunkQDYSHAU6cjs.MAX_FIELD_CATALOG_WIRE; exports.PARAMS_BAG_KEYS = PARAMS_BAG_KEYS; exports.PICKLIST_VALUE_NOT_SERVED_NOTE = _chunkQDYSHAU6cjs.PICKLIST_VALUE_NOT_SERVED_NOTE; exports.RECOVERY_CONFIRM = RECOVERY_CONFIRM; exports.RECOVERY_DEFAULT_LIMIT = RECOVERY_DEFAULT_LIMIT; exports.RECOVERY_MAX_LIMIT = RECOVERY_MAX_LIMIT; exports.WORKFLOW_RESOURCES = _chunkQDYSHAU6cjs.WORKFLOW_RESOURCES; exports.aggregate = aggregate; exports.blindSurfaces = blindSurfaces; exports.createGuidance = createGuidance; exports.dateBucketLabel = dateBucketLabel; exports.expandResourceNames = _chunkQDYSHAU6cjs.expandResourceNames; exports.fetchByIds = _chunkQDYSHAU6cjs.fetchByIds; exports.fetchMany = _chunkQDYSHAU6cjs.fetchMany; exports.fieldCatalog = _chunkQDYSHAU6cjs.fieldCatalog; exports.invoke = invoke; exports.invokeDelete = invokeDelete; exports.invokeRead = invokeRead; exports.invokeWrite = invokeWrite; exports.needsConfirmation = needsConfirmation; exports.probeReachability = probeReachability; exports.recovery = recovery; exports.relationshipMap = relationshipMap; exports.resolveAny = resolveAny; exports.searchAcrossResources = searchAcrossResources; exports.unknownKeysRefusal = unknownKeysRefusal; exports.validateDispatchArgs = validateDispatchArgs; exports.validateFetchManyItems = _chunkQDYSHAU6cjs.validateFetchManyItems; exports.validateInvokeOptions = validateInvokeOptions; exports.validateParamsBag = validateParamsBag;