node-autotask 0.79.0 → 0.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/MCP_TOOL_CATALOG.json +137 -9
- package/README.md +1 -1
- package/capabilities.json +483 -7
- package/dist/capabilities-data.js +482 -6
- package/dist/capabilities.cjs +4 -4
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-2YFX77XI.cjs → chunk-3VW75XKV.cjs} +155 -10
- package/dist/{chunk-MQ2DXOZW.js → chunk-GRJE3IUU.js} +2 -2
- package/dist/{chunk-YK32RN77.js → chunk-JITS5NKE.js} +150 -5
- package/dist/{chunk-EEGAMP4D.cjs → chunk-OVP7IH6K.cjs} +199 -199
- package/dist/{chunk-GJU4DJ6H.js → chunk-R4MKUN4N.js} +3 -3
- package/dist/{chunk-XIPZDDZS.js → chunk-R6N7S6LC.js} +3 -2
- package/dist/{chunk-XJQS3FBA.cjs → chunk-TMJX6NTZ.cjs} +3 -3
- package/dist/{chunk-75TQWC3M.cjs → chunk-Z5QCH7JA.cjs} +31 -30
- package/dist/{index-BGFWqM2_.d.cts → index-BBc96jwe.d.cts} +47 -1
- package/dist/{index-BGFWqM2_.d.ts → index-BBc96jwe.d.ts} +47 -1
- package/dist/{index-DBz-dqAY.d.cts → index-CZaFISYn.d.cts} +3 -2
- package/dist/{index-DS3jnPiq.d.ts → index-mFUX-x9D.d.ts} +3 -2
- package/dist/index.cjs +84 -84
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/operations/index.cjs +51 -51
- package/dist/operations/index.d.cts +4 -4
- package/dist/operations/index.d.ts +4 -4
- package/dist/operations/index.js +2 -2
- package/dist/pool.cjs +12 -12
- package/dist/pool.d.cts +1 -1
- package/dist/pool.d.ts +1 -1
- package/dist/pool.js +4 -4
- package/dist/resources/index.cjs +27 -27
- package/dist/resources/index.d.cts +2 -2
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +3 -3
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/docs/API.md +3 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkTMJX6NTZ_cjs = require('./chunk-TMJX6NTZ.cjs');
|
|
4
4
|
var chunkBD4AUGCJ_cjs = require('./chunk-BD4AUGCJ.cjs');
|
|
5
5
|
var crypto = require('crypto');
|
|
6
6
|
var async_hooks = require('async_hooks');
|
|
@@ -6125,7 +6125,24 @@ var RELATIONSHIP_MAP = {
|
|
|
6125
6125
|
"segment": "Notes",
|
|
6126
6126
|
"field": "projectID"
|
|
6127
6127
|
},
|
|
6128
|
-
"children": [
|
|
6128
|
+
"children": [
|
|
6129
|
+
{
|
|
6130
|
+
"resource": "project_note_attachments",
|
|
6131
|
+
"apiEntity": "ProjectNoteAttachment",
|
|
6132
|
+
"parentField": "projectNoteID",
|
|
6133
|
+
"parentSegment": "Attachments",
|
|
6134
|
+
"tier": "extended",
|
|
6135
|
+
"workflowResource": false,
|
|
6136
|
+
"specialOps": [],
|
|
6137
|
+
"searchCovers": null,
|
|
6138
|
+
"scopedOps": {
|
|
6139
|
+
"create": true,
|
|
6140
|
+
"query": true,
|
|
6141
|
+
"update": false,
|
|
6142
|
+
"delete": true
|
|
6143
|
+
}
|
|
6144
|
+
}
|
|
6145
|
+
],
|
|
6129
6146
|
"naturalKeys": {
|
|
6130
6147
|
"hasSearch": false,
|
|
6131
6148
|
"searchCovers": null,
|
|
@@ -10240,6 +10257,72 @@ var RELATIONSHIP_MAP = {
|
|
|
10240
10257
|
},
|
|
10241
10258
|
"deleteBoundary": null,
|
|
10242
10259
|
"markerField": null
|
|
10260
|
+
},
|
|
10261
|
+
"project_note_attachments": {
|
|
10262
|
+
"resource": "project_note_attachments",
|
|
10263
|
+
"apiEntity": "ProjectNoteAttachment",
|
|
10264
|
+
"kind": "entity",
|
|
10265
|
+
"path": "ProjectNoteAttachments",
|
|
10266
|
+
"parentScoped": true,
|
|
10267
|
+
"tier": "extended",
|
|
10268
|
+
"workflowResource": false,
|
|
10269
|
+
"group": "A",
|
|
10270
|
+
"parent": {
|
|
10271
|
+
"resource": "project_notes",
|
|
10272
|
+
"segment": "Attachments",
|
|
10273
|
+
"field": "projectNoteID"
|
|
10274
|
+
},
|
|
10275
|
+
"children": [],
|
|
10276
|
+
"naturalKeys": {
|
|
10277
|
+
"hasSearch": false,
|
|
10278
|
+
"searchCovers": null,
|
|
10279
|
+
"findBy": []
|
|
10280
|
+
},
|
|
10281
|
+
"blindSurfaces": null,
|
|
10282
|
+
"zoneFacts": {
|
|
10283
|
+
"createGuidance": {
|
|
10284
|
+
"createOp": "project_note_attachments.create",
|
|
10285
|
+
"parentScoped": true,
|
|
10286
|
+
"liveProvenPrefix": [],
|
|
10287
|
+
"unproven": true,
|
|
10288
|
+
"blocker": {
|
|
10289
|
+
"kind": "unknown",
|
|
10290
|
+
"message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
|
|
10291
|
+
"remedy": "Read the current field and picklist metadata, supply the named parent id, and preview the attachment before applying.",
|
|
10292
|
+
"requires": {
|
|
10293
|
+
"allOf": [
|
|
10294
|
+
"attachmentType",
|
|
10295
|
+
"fullPath",
|
|
10296
|
+
"title",
|
|
10297
|
+
"publish",
|
|
10298
|
+
"data"
|
|
10299
|
+
]
|
|
10300
|
+
}
|
|
10301
|
+
},
|
|
10302
|
+
"requiresByValue": [
|
|
10303
|
+
{
|
|
10304
|
+
"field": "attachmentType",
|
|
10305
|
+
"value": "FILE_ATTACHMENT",
|
|
10306
|
+
"requires": {
|
|
10307
|
+
"allOf": [
|
|
10308
|
+
"data"
|
|
10309
|
+
]
|
|
10310
|
+
}
|
|
10311
|
+
}
|
|
10312
|
+
],
|
|
10313
|
+
"vendorEvidence": [
|
|
10314
|
+
"https://www.autotask.net/help/developerhelp/Content/APIs/REST/Entities/ProjectNoteAttachmentsEntity.htm",
|
|
10315
|
+
"https://www.autotask.net/help/developerhelp/content/apis/REST/API_Calls/REST_Attachments.htm",
|
|
10316
|
+
"Official ProjectNoteAttachments entity documentation and vendored ProjectNoteAttachments controllers define scoped ProjectNotes attachment routes. parentAttachmentID is read-only; project notes cannot have nested attachments. No update, UDF metadata or data-download endpoint is implemented. Static contract only; no live create."
|
|
10317
|
+
],
|
|
10318
|
+
"deleteBoundary": {
|
|
10319
|
+
"available": true,
|
|
10320
|
+
"note": null
|
|
10321
|
+
}
|
|
10322
|
+
}
|
|
10323
|
+
},
|
|
10324
|
+
"deleteBoundary": null,
|
|
10325
|
+
"markerField": null
|
|
10243
10326
|
}
|
|
10244
10327
|
};
|
|
10245
10328
|
var BLIND_SURFACE_STAMPS = {
|
|
@@ -13478,6 +13561,47 @@ var CREATE_GUIDANCE = {
|
|
|
13478
13561
|
"field": "companyID"
|
|
13479
13562
|
}
|
|
13480
13563
|
},
|
|
13564
|
+
{
|
|
13565
|
+
"resource": "project_note_attachments",
|
|
13566
|
+
"createOp": "project_note_attachments.create",
|
|
13567
|
+
"parentScoped": true,
|
|
13568
|
+
"liveProvenPrefix": [],
|
|
13569
|
+
"unproven": true,
|
|
13570
|
+
"blocker": {
|
|
13571
|
+
"kind": "unknown",
|
|
13572
|
+
"message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
|
|
13573
|
+
"remedy": "Read the current field and picklist metadata, supply the named parent id, and preview the attachment before applying.",
|
|
13574
|
+
"requires": {
|
|
13575
|
+
"allOf": [
|
|
13576
|
+
"attachmentType",
|
|
13577
|
+
"fullPath",
|
|
13578
|
+
"title",
|
|
13579
|
+
"publish",
|
|
13580
|
+
"data"
|
|
13581
|
+
]
|
|
13582
|
+
}
|
|
13583
|
+
},
|
|
13584
|
+
"vendorEvidence": [
|
|
13585
|
+
"https://www.autotask.net/help/developerhelp/Content/APIs/REST/Entities/ProjectNoteAttachmentsEntity.htm",
|
|
13586
|
+
"https://www.autotask.net/help/developerhelp/content/apis/REST/API_Calls/REST_Attachments.htm",
|
|
13587
|
+
"Official ProjectNoteAttachments entity documentation and vendored ProjectNoteAttachments controllers define scoped ProjectNotes attachment routes. parentAttachmentID is read-only; project notes cannot have nested attachments. No update, UDF metadata or data-download endpoint is implemented. Static contract only; no live create."
|
|
13588
|
+
],
|
|
13589
|
+
"deleteBoundary": {
|
|
13590
|
+
"available": true,
|
|
13591
|
+
"note": null
|
|
13592
|
+
},
|
|
13593
|
+
"requiresByValue": [
|
|
13594
|
+
{
|
|
13595
|
+
"field": "attachmentType",
|
|
13596
|
+
"value": "FILE_ATTACHMENT",
|
|
13597
|
+
"requires": {
|
|
13598
|
+
"allOf": [
|
|
13599
|
+
"data"
|
|
13600
|
+
]
|
|
13601
|
+
}
|
|
13602
|
+
}
|
|
13603
|
+
]
|
|
13604
|
+
},
|
|
13481
13605
|
{
|
|
13482
13606
|
"resource": "project_notes",
|
|
13483
13607
|
"createOp": "project_notes.create",
|
|
@@ -14588,7 +14712,7 @@ var CREATE_GUIDANCE = {
|
|
|
14588
14712
|
}
|
|
14589
14713
|
],
|
|
14590
14714
|
"counts": {
|
|
14591
|
-
"total":
|
|
14715
|
+
"total": 110,
|
|
14592
14716
|
"byKind": {
|
|
14593
14717
|
"ok": 41,
|
|
14594
14718
|
"blind-reference": 16,
|
|
@@ -14598,7 +14722,7 @@ var CREATE_GUIDANCE = {
|
|
|
14598
14722
|
"resource-role-pair": 2,
|
|
14599
14723
|
"delete-absent": 0,
|
|
14600
14724
|
"non-mutable": 0,
|
|
14601
|
-
"unknown":
|
|
14725
|
+
"unknown": 34
|
|
14602
14726
|
}
|
|
14603
14727
|
}
|
|
14604
14728
|
};
|
|
@@ -15343,6 +15467,9 @@ var UNTRUSTED_FIELDS_BY_RESOURCE = {
|
|
|
15343
15467
|
],
|
|
15344
15468
|
"project_attachments": [
|
|
15345
15469
|
"title"
|
|
15470
|
+
],
|
|
15471
|
+
"project_note_attachments": [
|
|
15472
|
+
"title"
|
|
15346
15473
|
]
|
|
15347
15474
|
};
|
|
15348
15475
|
|
|
@@ -17217,7 +17344,7 @@ async function capabilitySets() {
|
|
|
17217
17344
|
const fieldOps = /* @__PURE__ */ new Map();
|
|
17218
17345
|
const udfCapable = /* @__PURE__ */ new Set();
|
|
17219
17346
|
const resources = /* @__PURE__ */ new Set();
|
|
17220
|
-
for (const rec of await
|
|
17347
|
+
for (const rec of await chunkTMJX6NTZ_cjs.loadCapabilityRecords()) {
|
|
17221
17348
|
if (rec.resource === "operations") continue;
|
|
17222
17349
|
resources.add(rec.resource);
|
|
17223
17350
|
if (rec.operation === "getFieldInfo") fieldOps.set(rec.resource, rec);
|
|
@@ -17228,7 +17355,7 @@ async function capabilitySets() {
|
|
|
17228
17355
|
var derivedIndexPromise = null;
|
|
17229
17356
|
function derivedIndexLoad() {
|
|
17230
17357
|
if (derivedIndexPromise === null) {
|
|
17231
|
-
derivedIndexPromise =
|
|
17358
|
+
derivedIndexPromise = chunkTMJX6NTZ_cjs.loadCapabilityRecords().then((records) => {
|
|
17232
17359
|
const index = /* @__PURE__ */ new Map();
|
|
17233
17360
|
for (const rec of records) {
|
|
17234
17361
|
const declared = rec.metadata?.derivedFields;
|
|
@@ -18407,6 +18534,7 @@ var MODEL_FIELD_SETS = {
|
|
|
18407
18534
|
"products": ["id", "billingType", "chargeBillingCodeID", "createdByResourceID", "createdTime", "defaultVendorID", "description", "doesNotRequireProcurement", "externalProductID", "impersonatorCreatorResourceID", "internalProductID", "isActive", "isEligibleForRma", "isSerialized", "link", "manufacturerName", "manufacturerProductName", "markupRate", "msrp", "name", "periodType", "priceCostMethod", "productBillingCodeID", "productCategory", "sku", "unitCost", "unitPrice", "vendorProductNumber", "defaultInstalledProductCategoryID", "userDefinedFields"],
|
|
18408
18535
|
"project_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "projectID", "projectNoteID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
|
|
18409
18536
|
"project_charges": ["id", "billableAmount", "billingCodeID", "chargeType", "contractServiceBundleID", "contractServiceID", "createDate", "creatorResourceID", "datePurchased", "description", "estimatedCost", "extendedCost", "internalCurrencyBillableAmount", "internalCurrencyUnitPrice", "internalPurchaseOrderNumber", "isBillableToCompany", "isBilled", "name", "notes", "organizationalLevelAssociationID", "productID", "projectID", "purchaseOrderNumber", "status", "statusLastModifiedBy", "statusLastModifiedDate", "unitCost", "unitPrice", "unitQuantity", "soapParentPropertyId"],
|
|
18537
|
+
"project_note_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentAttachmentID", "parentID", "projectID", "projectNoteID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
|
|
18410
18538
|
"project_notes": ["id", "createDateTime", "createdByContactID", "creatorResourceID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "isAnnouncement", "lastActivityDate", "noteType", "projectID", "publish", "title", "soapParentPropertyId"],
|
|
18411
18539
|
"projects": ["id", "actualBilledHours", "actualHours", "changeOrdersBudget", "changeOrdersRevenue", "companyID", "companyOwnerResourceID", "completedDateTime", "completedPercentage", "contractID", "createDateTime", "creatorResourceID", "department", "description", "duration", "endDateTime", "estimatedSalesCost", "estimatedTime", "extProjectNumber", "extProjectType", "impersonatorCreatorResourceID", "laborEstimatedCosts", "laborEstimatedMarginPercentage", "laborEstimatedRevenue", "lastActivityDateTime", "lastActivityPersonType", "lastActivityResourceID", "opportunityID", "organizationalLevelAssociationID", "originalEstimatedRevenue", "projectCostEstimatedMarginPercentage", "projectCostsBudget", "projectCostsRevenue", "projectLeadResourceID", "projectName", "projectNumber", "projectType", "purchaseOrderNumber", "sgda", "startDateTime", "status", "statusDateTime", "statusDetail", "userDefinedFields"],
|
|
18412
18540
|
"purchase_approvals": ["id", "costType", "isApproved", "rejectNote"],
|
|
@@ -18508,6 +18636,7 @@ var MODEL_DATE_FIELDS = {
|
|
|
18508
18636
|
"products": ["createdTime"],
|
|
18509
18637
|
"project_attachments": ["attachDate"],
|
|
18510
18638
|
"project_charges": ["createDate", "datePurchased", "statusLastModifiedDate"],
|
|
18639
|
+
"project_note_attachments": ["attachDate"],
|
|
18511
18640
|
"project_notes": ["createDateTime", "lastActivityDate"],
|
|
18512
18641
|
"projects": ["completedDateTime", "createDateTime", "endDateTime", "lastActivityDateTime", "startDateTime", "statusDateTime"],
|
|
18513
18642
|
"purchase_order_item_receiving": ["receiveDate"],
|
|
@@ -20884,6 +21013,7 @@ var FILE_WRITABLE = /* @__PURE__ */ new Set(["attachmentType", "data", "fullPath
|
|
|
20884
21013
|
var NON_QUERYABLE = /* @__PURE__ */ new Set(["creatortype", "data", "filesize"]);
|
|
20885
21014
|
var SCOPED_ATTACHMENT_PARENTS = {
|
|
20886
21015
|
project_attachments: { field: "projectID", name: "project" },
|
|
21016
|
+
project_note_attachments: { field: "projectNoteID", name: "project note" },
|
|
20887
21017
|
task_attachments: { field: "taskID", name: "task" },
|
|
20888
21018
|
task_note_attachments: { field: "taskNoteID", name: "task note" },
|
|
20889
21019
|
configuration_item_attachments: { field: "configurationItemID", name: "configuration item" },
|
|
@@ -20933,6 +21063,7 @@ function admitFileAttachment(resource, data, parentId) {
|
|
|
20933
21063
|
const reference = {
|
|
20934
21064
|
project_attachments: void 0,
|
|
20935
21065
|
task_note_attachments: "attachedByContactID",
|
|
21066
|
+
project_note_attachments: "attachedByContactID",
|
|
20936
21067
|
configuration_item_attachments: "parentAttachmentID",
|
|
20937
21068
|
configuration_item_note_attachments: void 0
|
|
20938
21069
|
}[resource];
|
|
@@ -21896,6 +22027,20 @@ var SIMPLE_RESOURCES = [
|
|
|
21896
22027
|
helpers: { search: true, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
|
|
21897
22028
|
opForms: { get: "scoped", create: "scoped", update: "scoped", delete: "scoped" }
|
|
21898
22029
|
},
|
|
22030
|
+
{
|
|
22031
|
+
key: "project_note_attachments",
|
|
22032
|
+
accessor: "projectNoteAttachments",
|
|
22033
|
+
resourcePath: "/V1.0/ProjectNoteAttachments",
|
|
22034
|
+
parentScopedPath: "/V1.0/ProjectNotes/{parentId}/Attachments",
|
|
22035
|
+
parentPath: "/V1.0/ProjectNotes",
|
|
22036
|
+
parentField: "projectNoteID",
|
|
22037
|
+
deletable: true,
|
|
22038
|
+
udfCapable: false,
|
|
22039
|
+
attachmentGet: true,
|
|
22040
|
+
ops: { query: true, queryAll: false, count: true, get: true, create: true, update: false, delete: true, getEntityInfo: true, getFieldInfo: true, getUdfInfo: false, download: false },
|
|
22041
|
+
helpers: { search: false, resolve: false, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
|
|
22042
|
+
opForms: { get: "scoped", create: "scoped", delete: "scoped" }
|
|
22043
|
+
},
|
|
21899
22044
|
{
|
|
21900
22045
|
key: "project_notes",
|
|
21901
22046
|
accessor: "projectNotes",
|
|
@@ -22565,7 +22710,7 @@ var SIMPLE_RESOURCES = [
|
|
|
22565
22710
|
var GenericResource = class extends BaseResource {
|
|
22566
22711
|
constructor(http, config, pageSize) {
|
|
22567
22712
|
super(http, config, pageSize);
|
|
22568
|
-
if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "project_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
|
|
22713
|
+
if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "project_attachments", "project_note_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
|
|
22569
22714
|
throw new OperationNotSupportedError(config.key, "getUdfInfo");
|
|
22570
22715
|
};
|
|
22571
22716
|
if (config.ops?.create === false || isScopedAttachmentResource(config.key) || ["company_attachments", "task_predecessors"].includes(config.key)) this.createIfNotExists = async () => {
|
|
@@ -24448,7 +24593,7 @@ function dateBucketLabel(value, bucket) {
|
|
|
24448
24593
|
var queryResourceKeysPromise = null;
|
|
24449
24594
|
function queryResourceKeys() {
|
|
24450
24595
|
if (queryResourceKeysPromise === null) {
|
|
24451
|
-
queryResourceKeysPromise =
|
|
24596
|
+
queryResourceKeysPromise = chunkTMJX6NTZ_cjs.loadCapabilityRecords().then((records) => {
|
|
24452
24597
|
const s = /* @__PURE__ */ new Set();
|
|
24453
24598
|
for (const rec of records) if (rec.operation === "query") s.add(rec.resource);
|
|
24454
24599
|
return s;
|
|
@@ -24570,7 +24715,7 @@ function parseTopAndLimit(opts, problems) {
|
|
|
24570
24715
|
return { top, limit };
|
|
24571
24716
|
}
|
|
24572
24717
|
async function checkFieldNames(resourceKey, conditions, opts, problems) {
|
|
24573
|
-
const records = resourceKey === void 0 ? [] : await
|
|
24718
|
+
const records = resourceKey === void 0 ? [] : await chunkTMJX6NTZ_cjs.loadCapabilityRecords();
|
|
24574
24719
|
const record = resourceKey === void 0 ? void 0 : records.find((r) => r.resource === resourceKey && r.operation === "query");
|
|
24575
24720
|
if (record === void 0) return void 0;
|
|
24576
24721
|
const strings = (v) => Array.isArray(v) ? v.filter((f) => typeof f === "string" && f.trim() !== "") : [];
|
|
@@ -25215,7 +25360,7 @@ async function uiLink(client, input) {
|
|
|
25215
25360
|
var indexPromise = null;
|
|
25216
25361
|
function operationIndex() {
|
|
25217
25362
|
if (indexPromise === null) {
|
|
25218
|
-
indexPromise =
|
|
25363
|
+
indexPromise = chunkTMJX6NTZ_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
|
|
25219
25364
|
}
|
|
25220
25365
|
return indexPromise;
|
|
25221
25366
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GenericResource, readTasks, OperationNotSupportedError, parseIdentifier, AutotaskConfigError, isRecord, isDateYMD, isAutotaskError, RateLimitError, MaintenanceError, AutotaskError, StaleObjectError, buildDryRunResult, createNamePlan, resolveCompositeNames, addNameSibling, NotFoundError, unwrapItems, ConflictError, clientOf, compositePartLimit, invokeRead, compositePart, openTicketsOfPart, unwrapOperation, unwrapItem, ResolutionError, joinedCompositePart, runMove, resolveTicketStatusSemantics, openStatusFilter, isClosedStatus, vendorId, resolveLineOfBusinessChain, cachedRecordGet, uiLinkFor, refuse, queryRows, mergePartialBody, TICKET_LABEL_FIELDS, addLabelSibling, parseVendorErrors, RELATIONSHIP_MAP, cursorToPath } from './chunk-
|
|
2
|
-
import { loadCapabilityRecords } from './chunk-
|
|
1
|
+
import { GenericResource, readTasks, OperationNotSupportedError, parseIdentifier, AutotaskConfigError, isRecord, isDateYMD, isAutotaskError, RateLimitError, MaintenanceError, AutotaskError, StaleObjectError, buildDryRunResult, createNamePlan, resolveCompositeNames, addNameSibling, NotFoundError, unwrapItems, ConflictError, clientOf, compositePartLimit, invokeRead, compositePart, openTicketsOfPart, unwrapOperation, unwrapItem, ResolutionError, joinedCompositePart, runMove, resolveTicketStatusSemantics, openStatusFilter, isClosedStatus, vendorId, resolveLineOfBusinessChain, cachedRecordGet, uiLinkFor, refuse, queryRows, mergePartialBody, TICKET_LABEL_FIELDS, addLabelSibling, parseVendorErrors, RELATIONSHIP_MAP, cursorToPath } from './chunk-JITS5NKE.js';
|
|
2
|
+
import { loadCapabilityRecords } from './chunk-R4MKUN4N.js';
|
|
3
3
|
|
|
4
4
|
// src/resources/special/configuration_items.ts
|
|
5
5
|
async function fetchRecord(http, path, label, readOpts) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadCapabilityRecords } from './chunk-
|
|
1
|
+
import { loadCapabilityRecords } from './chunk-R4MKUN4N.js';
|
|
2
2
|
import { NoopLogger, REDACTED, deepMarkUntrusted, wrapUntrusted } from './chunk-7NKB4UXV.js';
|
|
3
3
|
import { randomUUID, createHash } from 'crypto';
|
|
4
4
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
@@ -6123,7 +6123,24 @@ var RELATIONSHIP_MAP = {
|
|
|
6123
6123
|
"segment": "Notes",
|
|
6124
6124
|
"field": "projectID"
|
|
6125
6125
|
},
|
|
6126
|
-
"children": [
|
|
6126
|
+
"children": [
|
|
6127
|
+
{
|
|
6128
|
+
"resource": "project_note_attachments",
|
|
6129
|
+
"apiEntity": "ProjectNoteAttachment",
|
|
6130
|
+
"parentField": "projectNoteID",
|
|
6131
|
+
"parentSegment": "Attachments",
|
|
6132
|
+
"tier": "extended",
|
|
6133
|
+
"workflowResource": false,
|
|
6134
|
+
"specialOps": [],
|
|
6135
|
+
"searchCovers": null,
|
|
6136
|
+
"scopedOps": {
|
|
6137
|
+
"create": true,
|
|
6138
|
+
"query": true,
|
|
6139
|
+
"update": false,
|
|
6140
|
+
"delete": true
|
|
6141
|
+
}
|
|
6142
|
+
}
|
|
6143
|
+
],
|
|
6127
6144
|
"naturalKeys": {
|
|
6128
6145
|
"hasSearch": false,
|
|
6129
6146
|
"searchCovers": null,
|
|
@@ -10238,6 +10255,72 @@ var RELATIONSHIP_MAP = {
|
|
|
10238
10255
|
},
|
|
10239
10256
|
"deleteBoundary": null,
|
|
10240
10257
|
"markerField": null
|
|
10258
|
+
},
|
|
10259
|
+
"project_note_attachments": {
|
|
10260
|
+
"resource": "project_note_attachments",
|
|
10261
|
+
"apiEntity": "ProjectNoteAttachment",
|
|
10262
|
+
"kind": "entity",
|
|
10263
|
+
"path": "ProjectNoteAttachments",
|
|
10264
|
+
"parentScoped": true,
|
|
10265
|
+
"tier": "extended",
|
|
10266
|
+
"workflowResource": false,
|
|
10267
|
+
"group": "A",
|
|
10268
|
+
"parent": {
|
|
10269
|
+
"resource": "project_notes",
|
|
10270
|
+
"segment": "Attachments",
|
|
10271
|
+
"field": "projectNoteID"
|
|
10272
|
+
},
|
|
10273
|
+
"children": [],
|
|
10274
|
+
"naturalKeys": {
|
|
10275
|
+
"hasSearch": false,
|
|
10276
|
+
"searchCovers": null,
|
|
10277
|
+
"findBy": []
|
|
10278
|
+
},
|
|
10279
|
+
"blindSurfaces": null,
|
|
10280
|
+
"zoneFacts": {
|
|
10281
|
+
"createGuidance": {
|
|
10282
|
+
"createOp": "project_note_attachments.create",
|
|
10283
|
+
"parentScoped": true,
|
|
10284
|
+
"liveProvenPrefix": [],
|
|
10285
|
+
"unproven": true,
|
|
10286
|
+
"blocker": {
|
|
10287
|
+
"kind": "unknown",
|
|
10288
|
+
"message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
|
|
10289
|
+
"remedy": "Read the current field and picklist metadata, supply the named parent id, and preview the attachment before applying.",
|
|
10290
|
+
"requires": {
|
|
10291
|
+
"allOf": [
|
|
10292
|
+
"attachmentType",
|
|
10293
|
+
"fullPath",
|
|
10294
|
+
"title",
|
|
10295
|
+
"publish",
|
|
10296
|
+
"data"
|
|
10297
|
+
]
|
|
10298
|
+
}
|
|
10299
|
+
},
|
|
10300
|
+
"requiresByValue": [
|
|
10301
|
+
{
|
|
10302
|
+
"field": "attachmentType",
|
|
10303
|
+
"value": "FILE_ATTACHMENT",
|
|
10304
|
+
"requires": {
|
|
10305
|
+
"allOf": [
|
|
10306
|
+
"data"
|
|
10307
|
+
]
|
|
10308
|
+
}
|
|
10309
|
+
}
|
|
10310
|
+
],
|
|
10311
|
+
"vendorEvidence": [
|
|
10312
|
+
"https://www.autotask.net/help/developerhelp/Content/APIs/REST/Entities/ProjectNoteAttachmentsEntity.htm",
|
|
10313
|
+
"https://www.autotask.net/help/developerhelp/content/apis/REST/API_Calls/REST_Attachments.htm",
|
|
10314
|
+
"Official ProjectNoteAttachments entity documentation and vendored ProjectNoteAttachments controllers define scoped ProjectNotes attachment routes. parentAttachmentID is read-only; project notes cannot have nested attachments. No update, UDF metadata or data-download endpoint is implemented. Static contract only; no live create."
|
|
10315
|
+
],
|
|
10316
|
+
"deleteBoundary": {
|
|
10317
|
+
"available": true,
|
|
10318
|
+
"note": null
|
|
10319
|
+
}
|
|
10320
|
+
}
|
|
10321
|
+
},
|
|
10322
|
+
"deleteBoundary": null,
|
|
10323
|
+
"markerField": null
|
|
10241
10324
|
}
|
|
10242
10325
|
};
|
|
10243
10326
|
var BLIND_SURFACE_STAMPS = {
|
|
@@ -13476,6 +13559,47 @@ var CREATE_GUIDANCE = {
|
|
|
13476
13559
|
"field": "companyID"
|
|
13477
13560
|
}
|
|
13478
13561
|
},
|
|
13562
|
+
{
|
|
13563
|
+
"resource": "project_note_attachments",
|
|
13564
|
+
"createOp": "project_note_attachments.create",
|
|
13565
|
+
"parentScoped": true,
|
|
13566
|
+
"liveProvenPrefix": [],
|
|
13567
|
+
"unproven": true,
|
|
13568
|
+
"blocker": {
|
|
13569
|
+
"kind": "unknown",
|
|
13570
|
+
"message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
|
|
13571
|
+
"remedy": "Read the current field and picklist metadata, supply the named parent id, and preview the attachment before applying.",
|
|
13572
|
+
"requires": {
|
|
13573
|
+
"allOf": [
|
|
13574
|
+
"attachmentType",
|
|
13575
|
+
"fullPath",
|
|
13576
|
+
"title",
|
|
13577
|
+
"publish",
|
|
13578
|
+
"data"
|
|
13579
|
+
]
|
|
13580
|
+
}
|
|
13581
|
+
},
|
|
13582
|
+
"vendorEvidence": [
|
|
13583
|
+
"https://www.autotask.net/help/developerhelp/Content/APIs/REST/Entities/ProjectNoteAttachmentsEntity.htm",
|
|
13584
|
+
"https://www.autotask.net/help/developerhelp/content/apis/REST/API_Calls/REST_Attachments.htm",
|
|
13585
|
+
"Official ProjectNoteAttachments entity documentation and vendored ProjectNoteAttachments controllers define scoped ProjectNotes attachment routes. parentAttachmentID is read-only; project notes cannot have nested attachments. No update, UDF metadata or data-download endpoint is implemented. Static contract only; no live create."
|
|
13586
|
+
],
|
|
13587
|
+
"deleteBoundary": {
|
|
13588
|
+
"available": true,
|
|
13589
|
+
"note": null
|
|
13590
|
+
},
|
|
13591
|
+
"requiresByValue": [
|
|
13592
|
+
{
|
|
13593
|
+
"field": "attachmentType",
|
|
13594
|
+
"value": "FILE_ATTACHMENT",
|
|
13595
|
+
"requires": {
|
|
13596
|
+
"allOf": [
|
|
13597
|
+
"data"
|
|
13598
|
+
]
|
|
13599
|
+
}
|
|
13600
|
+
}
|
|
13601
|
+
]
|
|
13602
|
+
},
|
|
13479
13603
|
{
|
|
13480
13604
|
"resource": "project_notes",
|
|
13481
13605
|
"createOp": "project_notes.create",
|
|
@@ -14586,7 +14710,7 @@ var CREATE_GUIDANCE = {
|
|
|
14586
14710
|
}
|
|
14587
14711
|
],
|
|
14588
14712
|
"counts": {
|
|
14589
|
-
"total":
|
|
14713
|
+
"total": 110,
|
|
14590
14714
|
"byKind": {
|
|
14591
14715
|
"ok": 41,
|
|
14592
14716
|
"blind-reference": 16,
|
|
@@ -14596,7 +14720,7 @@ var CREATE_GUIDANCE = {
|
|
|
14596
14720
|
"resource-role-pair": 2,
|
|
14597
14721
|
"delete-absent": 0,
|
|
14598
14722
|
"non-mutable": 0,
|
|
14599
|
-
"unknown":
|
|
14723
|
+
"unknown": 34
|
|
14600
14724
|
}
|
|
14601
14725
|
}
|
|
14602
14726
|
};
|
|
@@ -15341,6 +15465,9 @@ var UNTRUSTED_FIELDS_BY_RESOURCE = {
|
|
|
15341
15465
|
],
|
|
15342
15466
|
"project_attachments": [
|
|
15343
15467
|
"title"
|
|
15468
|
+
],
|
|
15469
|
+
"project_note_attachments": [
|
|
15470
|
+
"title"
|
|
15344
15471
|
]
|
|
15345
15472
|
};
|
|
15346
15473
|
|
|
@@ -18405,6 +18532,7 @@ var MODEL_FIELD_SETS = {
|
|
|
18405
18532
|
"products": ["id", "billingType", "chargeBillingCodeID", "createdByResourceID", "createdTime", "defaultVendorID", "description", "doesNotRequireProcurement", "externalProductID", "impersonatorCreatorResourceID", "internalProductID", "isActive", "isEligibleForRma", "isSerialized", "link", "manufacturerName", "manufacturerProductName", "markupRate", "msrp", "name", "periodType", "priceCostMethod", "productBillingCodeID", "productCategory", "sku", "unitCost", "unitPrice", "vendorProductNumber", "defaultInstalledProductCategoryID", "userDefinedFields"],
|
|
18406
18533
|
"project_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "projectID", "projectNoteID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
|
|
18407
18534
|
"project_charges": ["id", "billableAmount", "billingCodeID", "chargeType", "contractServiceBundleID", "contractServiceID", "createDate", "creatorResourceID", "datePurchased", "description", "estimatedCost", "extendedCost", "internalCurrencyBillableAmount", "internalCurrencyUnitPrice", "internalPurchaseOrderNumber", "isBillableToCompany", "isBilled", "name", "notes", "organizationalLevelAssociationID", "productID", "projectID", "purchaseOrderNumber", "status", "statusLastModifiedBy", "statusLastModifiedDate", "unitCost", "unitPrice", "unitQuantity", "soapParentPropertyId"],
|
|
18535
|
+
"project_note_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentAttachmentID", "parentID", "projectID", "projectNoteID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
|
|
18408
18536
|
"project_notes": ["id", "createDateTime", "createdByContactID", "creatorResourceID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "isAnnouncement", "lastActivityDate", "noteType", "projectID", "publish", "title", "soapParentPropertyId"],
|
|
18409
18537
|
"projects": ["id", "actualBilledHours", "actualHours", "changeOrdersBudget", "changeOrdersRevenue", "companyID", "companyOwnerResourceID", "completedDateTime", "completedPercentage", "contractID", "createDateTime", "creatorResourceID", "department", "description", "duration", "endDateTime", "estimatedSalesCost", "estimatedTime", "extProjectNumber", "extProjectType", "impersonatorCreatorResourceID", "laborEstimatedCosts", "laborEstimatedMarginPercentage", "laborEstimatedRevenue", "lastActivityDateTime", "lastActivityPersonType", "lastActivityResourceID", "opportunityID", "organizationalLevelAssociationID", "originalEstimatedRevenue", "projectCostEstimatedMarginPercentage", "projectCostsBudget", "projectCostsRevenue", "projectLeadResourceID", "projectName", "projectNumber", "projectType", "purchaseOrderNumber", "sgda", "startDateTime", "status", "statusDateTime", "statusDetail", "userDefinedFields"],
|
|
18410
18538
|
"purchase_approvals": ["id", "costType", "isApproved", "rejectNote"],
|
|
@@ -18506,6 +18634,7 @@ var MODEL_DATE_FIELDS = {
|
|
|
18506
18634
|
"products": ["createdTime"],
|
|
18507
18635
|
"project_attachments": ["attachDate"],
|
|
18508
18636
|
"project_charges": ["createDate", "datePurchased", "statusLastModifiedDate"],
|
|
18637
|
+
"project_note_attachments": ["attachDate"],
|
|
18509
18638
|
"project_notes": ["createDateTime", "lastActivityDate"],
|
|
18510
18639
|
"projects": ["completedDateTime", "createDateTime", "endDateTime", "lastActivityDateTime", "startDateTime", "statusDateTime"],
|
|
18511
18640
|
"purchase_order_item_receiving": ["receiveDate"],
|
|
@@ -20882,6 +21011,7 @@ var FILE_WRITABLE = /* @__PURE__ */ new Set(["attachmentType", "data", "fullPath
|
|
|
20882
21011
|
var NON_QUERYABLE = /* @__PURE__ */ new Set(["creatortype", "data", "filesize"]);
|
|
20883
21012
|
var SCOPED_ATTACHMENT_PARENTS = {
|
|
20884
21013
|
project_attachments: { field: "projectID", name: "project" },
|
|
21014
|
+
project_note_attachments: { field: "projectNoteID", name: "project note" },
|
|
20885
21015
|
task_attachments: { field: "taskID", name: "task" },
|
|
20886
21016
|
task_note_attachments: { field: "taskNoteID", name: "task note" },
|
|
20887
21017
|
configuration_item_attachments: { field: "configurationItemID", name: "configuration item" },
|
|
@@ -20931,6 +21061,7 @@ function admitFileAttachment(resource, data, parentId) {
|
|
|
20931
21061
|
const reference = {
|
|
20932
21062
|
project_attachments: void 0,
|
|
20933
21063
|
task_note_attachments: "attachedByContactID",
|
|
21064
|
+
project_note_attachments: "attachedByContactID",
|
|
20934
21065
|
configuration_item_attachments: "parentAttachmentID",
|
|
20935
21066
|
configuration_item_note_attachments: void 0
|
|
20936
21067
|
}[resource];
|
|
@@ -21894,6 +22025,20 @@ var SIMPLE_RESOURCES = [
|
|
|
21894
22025
|
helpers: { search: true, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
|
|
21895
22026
|
opForms: { get: "scoped", create: "scoped", update: "scoped", delete: "scoped" }
|
|
21896
22027
|
},
|
|
22028
|
+
{
|
|
22029
|
+
key: "project_note_attachments",
|
|
22030
|
+
accessor: "projectNoteAttachments",
|
|
22031
|
+
resourcePath: "/V1.0/ProjectNoteAttachments",
|
|
22032
|
+
parentScopedPath: "/V1.0/ProjectNotes/{parentId}/Attachments",
|
|
22033
|
+
parentPath: "/V1.0/ProjectNotes",
|
|
22034
|
+
parentField: "projectNoteID",
|
|
22035
|
+
deletable: true,
|
|
22036
|
+
udfCapable: false,
|
|
22037
|
+
attachmentGet: true,
|
|
22038
|
+
ops: { query: true, queryAll: false, count: true, get: true, create: true, update: false, delete: true, getEntityInfo: true, getFieldInfo: true, getUdfInfo: false, download: false },
|
|
22039
|
+
helpers: { search: false, resolve: false, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
|
|
22040
|
+
opForms: { get: "scoped", create: "scoped", delete: "scoped" }
|
|
22041
|
+
},
|
|
21897
22042
|
{
|
|
21898
22043
|
key: "project_notes",
|
|
21899
22044
|
accessor: "projectNotes",
|
|
@@ -22563,7 +22708,7 @@ var SIMPLE_RESOURCES = [
|
|
|
22563
22708
|
var GenericResource = class extends BaseResource {
|
|
22564
22709
|
constructor(http, config, pageSize) {
|
|
22565
22710
|
super(http, config, pageSize);
|
|
22566
|
-
if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "project_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
|
|
22711
|
+
if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "project_attachments", "project_note_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
|
|
22567
22712
|
throw new OperationNotSupportedError(config.key, "getUdfInfo");
|
|
22568
22713
|
};
|
|
22569
22714
|
if (config.ops?.create === false || isScopedAttachmentResource(config.key) || ["company_attachments", "task_predecessors"].includes(config.key)) this.createIfNotExists = async () => {
|