node-autotask 0.77.0 → 0.78.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 (39) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/MCP_TOOL_CATALOG.json +137 -9
  3. package/README.md +1 -1
  4. package/capabilities.json +483 -7
  5. package/dist/capabilities-data.js +482 -6
  6. package/dist/capabilities.cjs +4 -4
  7. package/dist/capabilities.js +1 -1
  8. package/dist/{chunk-RLXUY4VM.js → chunk-3SYNF5QD.js} +2 -2
  9. package/dist/{chunk-3FZJJX5B.cjs → chunk-MVKI2AZX.cjs} +3 -3
  10. package/dist/{chunk-QTFK2HAO.js → chunk-S7BJNQ2X.js} +3 -2
  11. package/dist/{chunk-6VBOBCWA.cjs → chunk-S7JH6K2Z.cjs} +157 -13
  12. package/dist/{chunk-NAI7XIX4.cjs → chunk-U7LVWEO4.cjs} +199 -199
  13. package/dist/{chunk-F5Y7WBWY.js → chunk-XBT332X7.js} +152 -8
  14. package/dist/{chunk-G2U6NHPO.js → chunk-YH5UCY2X.js} +3 -3
  15. package/dist/{chunk-5MH3MPLB.cjs → chunk-YONRIG6F.cjs} +31 -30
  16. package/dist/{index-B-vNyiD_.d.cts → index-BHqdOo_5.d.cts} +45 -1
  17. package/dist/{index-B-vNyiD_.d.ts → index-BHqdOo_5.d.ts} +45 -1
  18. package/dist/{index-PLdAoAFJ.d.cts → index-DfcdtQO0.d.cts} +3 -2
  19. package/dist/{index-ecr6unv3.d.ts → index-ci3TSJrT.d.ts} +3 -2
  20. package/dist/index.cjs +84 -84
  21. package/dist/index.d.cts +3 -3
  22. package/dist/index.d.ts +3 -3
  23. package/dist/index.js +5 -5
  24. package/dist/operations/index.cjs +51 -51
  25. package/dist/operations/index.d.cts +4 -4
  26. package/dist/operations/index.d.ts +4 -4
  27. package/dist/operations/index.js +2 -2
  28. package/dist/pool.cjs +12 -12
  29. package/dist/pool.d.cts +1 -1
  30. package/dist/pool.d.ts +1 -1
  31. package/dist/pool.js +4 -4
  32. package/dist/resources/index.cjs +27 -27
  33. package/dist/resources/index.d.cts +2 -2
  34. package/dist/resources/index.d.ts +2 -2
  35. package/dist/resources/index.js +3 -3
  36. package/dist/types/index.d.cts +1 -1
  37. package/dist/types/index.d.ts +1 -1
  38. package/docs/API.md +3 -2
  39. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk3FZJJX5B_cjs = require('./chunk-3FZJJX5B.cjs');
3
+ var chunkMVKI2AZX_cjs = require('./chunk-MVKI2AZX.cjs');
4
4
  var chunkBD4AUGCJ_cjs = require('./chunk-BD4AUGCJ.cjs');
5
5
  var crypto = require('crypto');
6
6
  var async_hooks = require('async_hooks');
@@ -3025,7 +3025,24 @@ var RELATIONSHIP_MAP = {
3025
3025
  "segment": "Notes",
3026
3026
  "field": "configurationItemID"
3027
3027
  },
3028
- "children": [],
3028
+ "children": [
3029
+ {
3030
+ "resource": "configuration_item_note_attachments",
3031
+ "apiEntity": "ConfigurationItemNoteAttachment",
3032
+ "parentField": "configurationItemNoteID",
3033
+ "parentSegment": "Attachments",
3034
+ "tier": "extended",
3035
+ "workflowResource": false,
3036
+ "specialOps": [],
3037
+ "searchCovers": null,
3038
+ "scopedOps": {
3039
+ "create": true,
3040
+ "query": true,
3041
+ "update": false,
3042
+ "delete": true
3043
+ }
3044
+ }
3045
+ ],
3029
3046
  "naturalKeys": {
3030
3047
  "hasSearch": false,
3031
3048
  "searchCovers": null,
@@ -10074,6 +10091,70 @@ var RELATIONSHIP_MAP = {
10074
10091
  },
10075
10092
  "deleteBoundary": null,
10076
10093
  "markerField": null
10094
+ },
10095
+ "configuration_item_note_attachments": {
10096
+ "resource": "configuration_item_note_attachments",
10097
+ "apiEntity": "ConfigurationItemNoteAttachment",
10098
+ "kind": "entity",
10099
+ "path": "ConfigurationItemNoteAttachments",
10100
+ "parentScoped": true,
10101
+ "tier": "extended",
10102
+ "workflowResource": false,
10103
+ "group": "A",
10104
+ "parent": {
10105
+ "resource": "configuration_item_notes",
10106
+ "segment": "Attachments",
10107
+ "field": "configurationItemNoteID"
10108
+ },
10109
+ "children": [],
10110
+ "naturalKeys": {
10111
+ "hasSearch": false,
10112
+ "searchCovers": null,
10113
+ "findBy": []
10114
+ },
10115
+ "blindSurfaces": null,
10116
+ "zoneFacts": {
10117
+ "createGuidance": {
10118
+ "createOp": "configuration_item_note_attachments.create",
10119
+ "parentScoped": true,
10120
+ "liveProvenPrefix": [],
10121
+ "unproven": true,
10122
+ "blocker": {
10123
+ "kind": "unknown",
10124
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
10125
+ "remedy": "Read current field and picklist metadata, supply the configuration-item note id, and preview the attachment before applying.",
10126
+ "requires": {
10127
+ "allOf": [
10128
+ "attachmentType",
10129
+ "fullPath",
10130
+ "title",
10131
+ "publish",
10132
+ "data"
10133
+ ]
10134
+ }
10135
+ },
10136
+ "requiresByValue": [
10137
+ {
10138
+ "field": "attachmentType",
10139
+ "value": "FILE_ATTACHMENT",
10140
+ "requires": {
10141
+ "allOf": [
10142
+ "data"
10143
+ ]
10144
+ }
10145
+ }
10146
+ ],
10147
+ "vendorEvidence": [
10148
+ "Official ConfigurationItemNoteAttachmentsEntity.htm and REST_Attachments.htm: ConfigurationItemNotes is the parent, configurationItemID identifies the asset, and file creation requires title, fullPath, attachmentType, publish and base64 data. Static contract, with live create unproven."
10149
+ ],
10150
+ "deleteBoundary": {
10151
+ "available": true,
10152
+ "note": null
10153
+ }
10154
+ }
10155
+ },
10156
+ "deleteBoundary": null,
10157
+ "markerField": null
10077
10158
  }
10078
10159
  };
10079
10160
  var BLIND_SURFACE_STAMPS = {
@@ -12024,6 +12105,45 @@ var CREATE_GUIDANCE = {
12024
12105
  "note": null
12025
12106
  }
12026
12107
  },
12108
+ {
12109
+ "resource": "configuration_item_note_attachments",
12110
+ "createOp": "configuration_item_note_attachments.create",
12111
+ "parentScoped": true,
12112
+ "liveProvenPrefix": [],
12113
+ "unproven": true,
12114
+ "blocker": {
12115
+ "kind": "unknown",
12116
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
12117
+ "remedy": "Read current field and picklist metadata, supply the configuration-item note id, and preview the attachment before applying.",
12118
+ "requires": {
12119
+ "allOf": [
12120
+ "attachmentType",
12121
+ "fullPath",
12122
+ "title",
12123
+ "publish",
12124
+ "data"
12125
+ ]
12126
+ }
12127
+ },
12128
+ "vendorEvidence": [
12129
+ "Official ConfigurationItemNoteAttachmentsEntity.htm and REST_Attachments.htm: ConfigurationItemNotes is the parent, configurationItemID identifies the asset, and file creation requires title, fullPath, attachmentType, publish and base64 data. Static contract, with live create unproven."
12130
+ ],
12131
+ "deleteBoundary": {
12132
+ "available": true,
12133
+ "note": null
12134
+ },
12135
+ "requiresByValue": [
12136
+ {
12137
+ "field": "attachmentType",
12138
+ "value": "FILE_ATTACHMENT",
12139
+ "requires": {
12140
+ "allOf": [
12141
+ "data"
12142
+ ]
12143
+ }
12144
+ }
12145
+ ]
12146
+ },
12027
12147
  {
12028
12148
  "resource": "configuration_item_notes",
12029
12149
  "createOp": "configuration_item_notes.create",
@@ -14339,7 +14459,7 @@ var CREATE_GUIDANCE = {
14339
14459
  }
14340
14460
  ],
14341
14461
  "counts": {
14342
- "total": 107,
14462
+ "total": 108,
14343
14463
  "byKind": {
14344
14464
  "ok": 41,
14345
14465
  "blind-reference": 16,
@@ -14349,7 +14469,7 @@ var CREATE_GUIDANCE = {
14349
14469
  "resource-role-pair": 2,
14350
14470
  "delete-absent": 0,
14351
14471
  "non-mutable": 0,
14352
- "unknown": 31
14472
+ "unknown": 32
14353
14473
  }
14354
14474
  }
14355
14475
  };
@@ -15088,6 +15208,9 @@ var UNTRUSTED_FIELDS_BY_RESOURCE = {
15088
15208
  ],
15089
15209
  "configuration_item_attachments": [
15090
15210
  "title"
15211
+ ],
15212
+ "configuration_item_note_attachments": [
15213
+ "title"
15091
15214
  ]
15092
15215
  };
15093
15216
 
@@ -16962,7 +17085,7 @@ async function capabilitySets() {
16962
17085
  const fieldOps = /* @__PURE__ */ new Map();
16963
17086
  const udfCapable = /* @__PURE__ */ new Set();
16964
17087
  const resources = /* @__PURE__ */ new Set();
16965
- for (const rec of await chunk3FZJJX5B_cjs.loadCapabilityRecords()) {
17088
+ for (const rec of await chunkMVKI2AZX_cjs.loadCapabilityRecords()) {
16966
17089
  if (rec.resource === "operations") continue;
16967
17090
  resources.add(rec.resource);
16968
17091
  if (rec.operation === "getFieldInfo") fieldOps.set(rec.resource, rec);
@@ -16973,7 +17096,7 @@ async function capabilitySets() {
16973
17096
  var derivedIndexPromise = null;
16974
17097
  function derivedIndexLoad() {
16975
17098
  if (derivedIndexPromise === null) {
16976
- derivedIndexPromise = chunk3FZJJX5B_cjs.loadCapabilityRecords().then((records) => {
17099
+ derivedIndexPromise = chunkMVKI2AZX_cjs.loadCapabilityRecords().then((records) => {
16977
17100
  const index = /* @__PURE__ */ new Map();
16978
17101
  for (const rec of records) {
16979
17102
  const declared = rec.metadata?.derivedFields;
@@ -18097,6 +18220,7 @@ var MODEL_FIELD_SETS = {
18097
18220
  "configuration_item_categories": ["id", "displayColorRGB", "isActive", "isClientPortalDefault", "isGlobalDefault", "name", "nickname"],
18098
18221
  "configuration_item_category_udf_associations": ["id", "configurationItemCategoryID", "isRequired", "userDefinedFieldDefinitionID", "soapParentPropertyId"],
18099
18222
  "configuration_item_dns_records": ["id", "createDateTime", "data", "installedProductID", "timeToLiveSeconds", "dnsType", "soapParentPropertyId"],
18223
+ "configuration_item_note_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "configurationItemID", "configurationItemNoteID", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
18100
18224
  "configuration_item_notes": ["id", "configurationItemID", "createDateTime", "creatorResourceID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "lastActivityDate", "noteType", "title", "soapParentPropertyId"],
18101
18225
  "configuration_item_related_items": ["id", "configurationItemID", "relatedConfigurationItemID", "relationship", "soapParentPropertyId"],
18102
18226
  "configuration_item_ssl_subject_alternative_names": ["id", "configurationItemID", "name", "soapParentPropertyId"],
@@ -18223,6 +18347,7 @@ var MODEL_DATE_FIELDS = {
18223
18347
  "configuration_item_attachments": ["attachDate"],
18224
18348
  "configuration_item_billing_product_associations": ["effectiveDate", "expirationDate"],
18225
18349
  "configuration_item_dns_records": ["createDateTime"],
18350
+ "configuration_item_note_attachments": ["attachDate"],
18226
18351
  "configuration_item_notes": ["createDateTime", "lastActivityDate"],
18227
18352
  "configuration_items": ["createDate", "dattoLastCheckInDateTime", "domainRegistrationDateTime", "domainLastUpdatedDateTime", "domainExpirationDateTime", "installDate", "lastModifiedTime", "sslValidFromDateTime", "sslValidUntilDateTime", "warrantyExpirationDate"],
18228
18353
  "contacts": ["bulkEmailOptOutTime", "createDate", "lastActivityDate", "lastModifiedDate", "solicitationOptOutTime"],
@@ -20626,7 +20751,8 @@ var NON_QUERYABLE = /* @__PURE__ */ new Set(["creatortype", "data", "filesize"])
20626
20751
  var SCOPED_ATTACHMENT_PARENTS = {
20627
20752
  task_attachments: { field: "taskID", name: "task" },
20628
20753
  task_note_attachments: { field: "taskNoteID", name: "task note" },
20629
- configuration_item_attachments: { field: "configurationItemID", name: "configuration item" }
20754
+ configuration_item_attachments: { field: "configurationItemID", name: "configuration item" },
20755
+ configuration_item_note_attachments: { field: "configurationItemNoteID", name: "configuration item note" }
20630
20756
  };
20631
20757
  function isScopedAttachmentResource(resource) {
20632
20758
  return Object.hasOwn(SCOPED_ATTACHMENT_PARENTS, resource);
@@ -20669,7 +20795,11 @@ function admitFileAttachment(resource, data, parentId) {
20669
20795
  };
20670
20796
  if (data === null || typeof data !== "object" || ![Object.prototype, null].includes(Object.getPrototypeOf(data))) fail2("data must be a plain record");
20671
20797
  const body = data;
20672
- const reference = resource === "task_note_attachments" ? "attachedByContactID" : "parentAttachmentID";
20798
+ const reference = {
20799
+ task_note_attachments: "attachedByContactID",
20800
+ configuration_item_attachments: "parentAttachmentID",
20801
+ configuration_item_note_attachments: void 0
20802
+ }[resource];
20673
20803
  for (const field of Object.keys(body)) if (!FILE_WRITABLE.has(field) && field !== reference) fail2(`${field} is not a supported create field`);
20674
20804
  if (body.attachmentType !== "FILE_ATTACHMENT") fail2("attachmentType must explicitly be FILE_ATTACHMENT; other attachment types are unsupported");
20675
20805
  for (const field of ["fullPath", "title"]) {
@@ -20677,7 +20807,7 @@ function admitFileAttachment(resource, data, parentId) {
20677
20807
  }
20678
20808
  if (typeof body.publish !== "number" || !Number.isSafeInteger(body.publish)) fail2("publish must be an integer from current field metadata");
20679
20809
  if (typeof body.data !== "string" || !isBase64(body.data)) fail2("FILE_ATTACHMENT requires nonempty base64 data");
20680
- if (body[reference] !== void 0) {
20810
+ if (reference !== void 0 && body[reference] !== void 0) {
20681
20811
  if (typeof body[reference] !== "number") fail2(`${reference} must be a numeric identifier`);
20682
20812
  if (parseIdentifier(body[reference], reference) === 0) fail2(`${reference} must be positive`);
20683
20813
  }
@@ -20970,6 +21100,20 @@ var SIMPLE_RESOURCES = [
20970
21100
  helpers: { search: false, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
20971
21101
  opForms: { get: "scoped", delete: "scoped" }
20972
21102
  },
21103
+ {
21104
+ key: "configuration_item_note_attachments",
21105
+ accessor: "configurationItemNoteAttachments",
21106
+ resourcePath: "/V1.0/ConfigurationItemNoteAttachments",
21107
+ parentScopedPath: "/V1.0/ConfigurationItemNotes/{parentId}/Attachments",
21108
+ parentPath: "/V1.0/ConfigurationItemNotes",
21109
+ parentField: "configurationItemNoteID",
21110
+ deletable: true,
21111
+ udfCapable: false,
21112
+ attachmentGet: true,
21113
+ ops: { query: true, queryAll: false, count: true, get: true, create: true, update: false, delete: true, getEntityInfo: true, getFieldInfo: true, getUdfInfo: false, download: false },
21114
+ helpers: { search: false, resolve: false, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
21115
+ opForms: { get: "scoped", create: "scoped", delete: "scoped" }
21116
+ },
20973
21117
  {
20974
21118
  key: "configuration_item_notes",
20975
21119
  accessor: "configurationItemNotes",
@@ -22267,7 +22411,7 @@ var SIMPLE_RESOURCES = [
22267
22411
  var GenericResource = class extends BaseResource {
22268
22412
  constructor(http, config, pageSize) {
22269
22413
  super(http, config, pageSize);
22270
- if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
22414
+ if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
22271
22415
  throw new OperationNotSupportedError(config.key, "getUdfInfo");
22272
22416
  };
22273
22417
  if (config.ops?.create === false || isScopedAttachmentResource(config.key) || ["company_attachments", "task_predecessors"].includes(config.key)) this.createIfNotExists = async () => {
@@ -24150,7 +24294,7 @@ function dateBucketLabel(value, bucket) {
24150
24294
  var queryResourceKeysPromise = null;
24151
24295
  function queryResourceKeys() {
24152
24296
  if (queryResourceKeysPromise === null) {
24153
- queryResourceKeysPromise = chunk3FZJJX5B_cjs.loadCapabilityRecords().then((records) => {
24297
+ queryResourceKeysPromise = chunkMVKI2AZX_cjs.loadCapabilityRecords().then((records) => {
24154
24298
  const s = /* @__PURE__ */ new Set();
24155
24299
  for (const rec of records) if (rec.operation === "query") s.add(rec.resource);
24156
24300
  return s;
@@ -24272,7 +24416,7 @@ function parseTopAndLimit(opts, problems) {
24272
24416
  return { top, limit };
24273
24417
  }
24274
24418
  async function checkFieldNames(resourceKey, conditions, opts, problems) {
24275
- const records = resourceKey === void 0 ? [] : await chunk3FZJJX5B_cjs.loadCapabilityRecords();
24419
+ const records = resourceKey === void 0 ? [] : await chunkMVKI2AZX_cjs.loadCapabilityRecords();
24276
24420
  const record = resourceKey === void 0 ? void 0 : records.find((r) => r.resource === resourceKey && r.operation === "query");
24277
24421
  if (record === void 0) return void 0;
24278
24422
  const strings = (v) => Array.isArray(v) ? v.filter((f) => typeof f === "string" && f.trim() !== "") : [];
@@ -24917,7 +25061,7 @@ async function uiLink(client, input) {
24917
25061
  var indexPromise = null;
24918
25062
  function operationIndex() {
24919
25063
  if (indexPromise === null) {
24920
- indexPromise = chunk3FZJJX5B_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
25064
+ indexPromise = chunkMVKI2AZX_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
24921
25065
  }
24922
25066
  return indexPromise;
24923
25067
  }