node-autotask 0.8.3 → 0.10.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 (84) hide show
  1. package/ARCHITECTURE.md +13 -10
  2. package/MCP_TOOL_CATALOG.json +733 -251
  3. package/MCP_TOOL_MANIFEST.md +162 -133
  4. package/MCP_TOOL_OVERRIDES.json +2 -2
  5. package/N8N_MCP_MANIFEST.json +88 -25
  6. package/N8N_MCP_MANIFEST.md +26 -24
  7. package/README.md +12 -4
  8. package/capabilities.json +12503 -9316
  9. package/dist/capabilities.cjs +2 -3
  10. package/dist/capabilities.js +1 -2
  11. package/dist/{chunk-4WJCXIY2.js → chunk-3VB6N44U.js} +1141 -2977
  12. package/dist/{chunk-32AKZMY4.js → chunk-6KFP5HV3.js} +12502 -9316
  13. package/dist/chunk-DMMMWO6A.js +0 -0
  14. package/dist/chunk-FLB2X6O5.cjs +1 -0
  15. package/dist/{chunk-GYI4ZQID.js → chunk-HWC2WPX2.js} +4781 -89
  16. package/dist/chunk-IDPB4N2Q.cjs +1 -0
  17. package/dist/{chunk-F6YSQRZV.js → chunk-NVJ2PTN3.js} +7 -7
  18. package/dist/{chunk-5UGSQLLO.cjs → chunk-QUM74WLQ.cjs} +136 -136
  19. package/dist/{chunk-LAKEIYET.cjs → chunk-S7VMY5KN.cjs} +1468 -3304
  20. package/dist/chunk-UPQIUWOS.js +0 -0
  21. package/dist/{chunk-KNTUX3RR.cjs → chunk-WTVD2JZN.cjs} +12502 -9316
  22. package/dist/{chunk-V3XPLTIR.cjs → chunk-WTVLHMZA.cjs} +4784 -92
  23. package/dist/{index-B6JeThrY.d.ts → index-BOyh7S65.d.cts} +870 -79
  24. package/dist/{index-B0I2bGtx.d.cts → index-DGgMD8aq.d.ts} +870 -79
  25. package/dist/{index-DOCRp_83.d.cts → index-cQ6CRexR.d.cts} +158 -90
  26. package/dist/{index-DOCRp_83.d.ts → index-cQ6CRexR.d.ts} +158 -90
  27. package/dist/index.cjs +37 -22
  28. package/dist/index.d.cts +46 -5
  29. package/dist/index.d.ts +46 -5
  30. package/dist/index.js +48 -33
  31. package/dist/operations/index.cjs +480 -359
  32. package/dist/operations/index.d.cts +195 -16
  33. package/dist/operations/index.d.ts +195 -16
  34. package/dist/operations/index.js +370 -249
  35. package/dist/pool.cjs +36 -12
  36. package/dist/pool.d.cts +2 -3
  37. package/dist/pool.d.ts +2 -3
  38. package/dist/pool.js +33 -9
  39. package/dist/resources/index.cjs +5 -6
  40. package/dist/resources/index.d.cts +2 -2
  41. package/dist/resources/index.d.ts +2 -2
  42. package/dist/resources/index.js +4 -5
  43. package/dist/types/index.cjs +1 -2
  44. package/dist/types/index.d.cts +1 -1
  45. package/dist/types/index.d.ts +1 -1
  46. package/dist/types/index.js +1 -2
  47. package/dist/untrusted.cjs +0 -1
  48. package/dist/untrusted.js +0 -1
  49. package/docs/API.md +693 -48
  50. package/docs/N8N-ADAPTER.md +4 -4
  51. package/examples/basic.ts +1 -1
  52. package/package.json +5 -3
  53. package/dist/capabilities.cjs.map +0 -1
  54. package/dist/capabilities.js.map +0 -1
  55. package/dist/chunk-32AKZMY4.js.map +0 -1
  56. package/dist/chunk-4WJCXIY2.js.map +0 -1
  57. package/dist/chunk-5UGSQLLO.cjs.map +0 -1
  58. package/dist/chunk-CXM35TEC.cjs +0 -1
  59. package/dist/chunk-CXM35TEC.cjs.map +0 -1
  60. package/dist/chunk-F6YSQRZV.js.map +0 -1
  61. package/dist/chunk-GIVD2CQ3.js +0 -1
  62. package/dist/chunk-GIVD2CQ3.js.map +0 -1
  63. package/dist/chunk-GYI4ZQID.js.map +0 -1
  64. package/dist/chunk-KNTUX3RR.cjs.map +0 -1
  65. package/dist/chunk-LAKEIYET.cjs.map +0 -1
  66. package/dist/chunk-MHBMSBTA.js +0 -1
  67. package/dist/chunk-MHBMSBTA.js.map +0 -1
  68. package/dist/chunk-NZUFSSIZ.cjs +0 -1
  69. package/dist/chunk-NZUFSSIZ.cjs.map +0 -1
  70. package/dist/chunk-V3XPLTIR.cjs.map +0 -1
  71. package/dist/client-DHmr0Oyx.d.ts +0 -203
  72. package/dist/client-Q6NoqinP.d.cts +0 -203
  73. package/dist/index.cjs.map +0 -1
  74. package/dist/index.js.map +0 -1
  75. package/dist/operations/index.cjs.map +0 -1
  76. package/dist/operations/index.js.map +0 -1
  77. package/dist/pool.cjs.map +0 -1
  78. package/dist/pool.js.map +0 -1
  79. package/dist/resources/index.cjs.map +0 -1
  80. package/dist/resources/index.js.map +0 -1
  81. package/dist/types/index.cjs.map +0 -1
  82. package/dist/types/index.js.map +0 -1
  83. package/dist/untrusted.cjs.map +0 -1
  84. package/dist/untrusted.js.map +0 -1
package/ARCHITECTURE.md CHANGED
@@ -383,11 +383,13 @@ Autotask list reads are `GET|POST /V1.0/<E>/query` returning the pinned envelope
383
383
 
384
384
  ```json
385
385
  { "items": [ "<Model>", ... ],
386
- "pageDetails": { "count": 10, "requestCount": 1234,
387
- "prevPageUrl": null, "nextPageUrl": null } }
386
+ "pageDetails": { "count": 10, "requestCount": 10,
387
+ "prevPageUrl": null, "nextPageUrl": "<cursor>" } }
388
388
  ```
389
- (`QueryActionResult[<Model>,<Entity>]`; `requestCount` = total matching records, `count` =
390
- records on this page.) Single-record reads (`GET /V1.0/<E>/{id}`) and count/entityInfo reads
389
+ (`QueryActionResult[<Model>,<Entity>]`; `count` = records on this page; `requestCount` is the
390
+ vendor's echo of the requested `MaxRecords` (500 when omitted) — NOT a match count, live-verified
391
+ 2026-10-11: `MaxRecords: 5` over 13,220 matches → 5, a zero-match page → the MaxRecords asked.
392
+ The only total is `count()` (`/query/count`); "more rows exist" is `nextPageUrl !== null`.) Single-record reads (`GET /V1.0/<E>/{id}`) and count/entityInfo reads
391
393
  **never** carry paging parameters.
392
394
 
393
395
  ### Page walk — cursor-follow on `pageDetails.nextPageUrl`
@@ -407,9 +409,9 @@ export interface Page<T> {
407
409
  items: T[];
408
410
  page: number; // 1-based
409
411
  pageSize: number; // default 10, max 500
410
- requestCount: number; // pageDetails.requestCount (total matches)
412
+ requestCount: number; // pageDetails.requestCount verbatim (MaxRecords echo, not a total)
411
413
  hasMore: boolean; // nextPageUrl !== null
412
- totalPages: number; // ceil(requestCount / pageSize)
414
+ totalPages: number; // pages known so far: hasMore ? page + 1 : page (page - 1 when an empty page follows a full one; 0 when empty)
413
415
  }
414
416
 
415
417
  type PageFetcher<T> = (page: number, pageSize: number) => Promise<Page<T>>;
@@ -733,7 +735,7 @@ Concrete resources extend `BaseResource` and expose **narrowly-typed** public me
733
735
  | 2 | Version segment: swagger `/V1.0/` vs node runtime `/v1.0/` | SDK pins `/V1.0`; vendor tolerates both |
734
736
  | 3 | Page keys: public docs `Limit`/`Offset` vs wire `maxRecords`/`includeFields`/`filter` | Wire format is the POST `QueryModel` body; the doc names are aliases only |
735
737
  | 4 | GET query vs POST: vendor caps GET at 2048 chars; the node POSTs everything | SDK defaults to **POST-always**; GET opt-in with 2048 measurement (never silent) |
736
- | 5 | No total-pages in `PagingModel`; node derives `ceil(requestCount / pageSize)` | SDK derives it too; **1000-page guard** |
738
+ | 5 | No total in `PagingModel`; node derives `ceil(requestCount / pageSize)`, but `requestCount` echoes `MaxRecords` (live-verified), so that is always 1 | SDK reports pages known so far (`totalPages` exact on the last page); a real total is `count()`; **1000-page guard** |
737
739
  | 6 | Thread limit: API 10 concurrent; node self-limits to 3/endpoint | SDK default guard = 10 (the API limit), configurable |
738
740
  | 7 | Count envelope is an OBJECT `{ queryCount }`, not a number | `count()` unwraps to a plain number |
739
741
  | 8 | Approve is **GET**, Reject is **POST** (method asymmetry) | Pinned as-is; no uniform-verb assumption anywhere |
@@ -1092,9 +1094,10 @@ Floor (plan rows pre-declare it; G6 implements):
1092
1094
  non-match returns `null`; ambiguity throws `RESOLUTION_AMBIGUOUS` (candidates in
1093
1095
  `resourceIds`); a cap-tripped scan throws `RESOLUTION_TRUNCATED` (never a silent `null`).
1094
1096
  Autotask filters every model field server-side, so `resolve` is **server-filter first**
1095
- — a client scan is only the fallback for fields the vendor does not index, bounded by the
1096
- client caps (`resolution: { maxScanRecords: 500, maxScanPages: 4 }`, configurable per
1097
- client).
1097
+ and a zero-item filter answer is a complete non-match (`null`). The vendor gives no
1098
+ "incomplete" signal (`pageDetails.requestCount` echoes `MaxRecords`), so the client scan
1099
+ is opt-in (`resolution.scanOnMiss: true`): it re-checks a miss, bounded by the client caps
1100
+ (`resolution: { maxScanRecords: 500, maxScanPages: 4 }`, configurable per client).
1098
1101
  - `findBy<Field>()` where the vendor filters it and callers actually look up by it
1099
1102
  (pre-declared in the MVP plan: `tickets.findByTicketNumber`,
1100
1103
  `configuration_items.findBySerial`, `contacts.findByEmail`); batch implementers may add