node-autotask 0.78.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 +12 -0
- package/MCP_TOOL_CATALOG.json +265 -9
- package/README.md +1 -1
- package/capabilities.json +959 -7
- package/dist/capabilities-data.js +958 -6
- package/dist/capabilities.cjs +4 -4
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-S7JH6K2Z.cjs → chunk-3VW75XKV.cjs} +310 -11
- package/dist/{chunk-3SYNF5QD.js → chunk-GRJE3IUU.js} +2 -2
- package/dist/{chunk-XBT332X7.js → chunk-JITS5NKE.js} +305 -6
- package/dist/{chunk-U7LVWEO4.cjs → chunk-OVP7IH6K.cjs} +199 -199
- package/dist/{chunk-YH5UCY2X.js → chunk-R4MKUN4N.js} +3 -3
- package/dist/{chunk-S7BJNQ2X.js → chunk-R6N7S6LC.js} +4 -2
- package/dist/{chunk-MVKI2AZX.cjs → chunk-TMJX6NTZ.cjs} +3 -3
- package/dist/{chunk-YONRIG6F.cjs → chunk-Z5QCH7JA.cjs} +32 -30
- package/dist/{index-BHqdOo_5.d.cts → index-BBc96jwe.d.cts} +91 -1
- package/dist/{index-BHqdOo_5.d.ts → index-BBc96jwe.d.ts} +91 -1
- package/dist/{index-DfcdtQO0.d.cts → index-CZaFISYn.d.cts} +4 -2
- package/dist/{index-ci3TSJrT.d.ts → index-mFUX-x9D.d.ts} +4 -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 +4 -2
- package/package.json +1 -1
package/dist/capabilities.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkTMJX6NTZ_cjs = require('./chunk-TMJX6NTZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "CAPABILITY_PLAN_HASHES", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkTMJX6NTZ_cjs.CAPABILITY_PLAN_HASHES; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "loadCapabilities", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkTMJX6NTZ_cjs.loadCapabilities; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "loadCapabilityRecords", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkTMJX6NTZ_cjs.loadCapabilityRecords; }
|
|
18
18
|
});
|
package/dist/capabilities.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-
|
|
1
|
+
export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-R4MKUN4N.js';
|
|
@@ -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,
|
|
@@ -6402,6 +6419,22 @@ var RELATIONSHIP_MAP = {
|
|
|
6402
6419
|
"delete": false
|
|
6403
6420
|
}
|
|
6404
6421
|
},
|
|
6422
|
+
{
|
|
6423
|
+
"resource": "project_attachments",
|
|
6424
|
+
"apiEntity": "ProjectAttachment",
|
|
6425
|
+
"parentField": "projectID",
|
|
6426
|
+
"parentSegment": "Attachments",
|
|
6427
|
+
"tier": "extended",
|
|
6428
|
+
"workflowResource": false,
|
|
6429
|
+
"specialOps": [],
|
|
6430
|
+
"searchCovers": null,
|
|
6431
|
+
"scopedOps": {
|
|
6432
|
+
"create": true,
|
|
6433
|
+
"query": true,
|
|
6434
|
+
"update": false,
|
|
6435
|
+
"delete": true
|
|
6436
|
+
}
|
|
6437
|
+
},
|
|
6405
6438
|
{
|
|
6406
6439
|
"resource": "project_charges",
|
|
6407
6440
|
"apiEntity": "ProjectCharge",
|
|
@@ -10155,6 +10188,141 @@ var RELATIONSHIP_MAP = {
|
|
|
10155
10188
|
},
|
|
10156
10189
|
"deleteBoundary": null,
|
|
10157
10190
|
"markerField": null
|
|
10191
|
+
},
|
|
10192
|
+
"project_attachments": {
|
|
10193
|
+
"resource": "project_attachments",
|
|
10194
|
+
"apiEntity": "ProjectAttachment",
|
|
10195
|
+
"kind": "entity",
|
|
10196
|
+
"path": "ProjectAttachments",
|
|
10197
|
+
"parentScoped": true,
|
|
10198
|
+
"tier": "extended",
|
|
10199
|
+
"workflowResource": false,
|
|
10200
|
+
"group": "A",
|
|
10201
|
+
"parent": {
|
|
10202
|
+
"resource": "projects",
|
|
10203
|
+
"segment": "Attachments",
|
|
10204
|
+
"field": "projectID"
|
|
10205
|
+
},
|
|
10206
|
+
"children": [],
|
|
10207
|
+
"naturalKeys": {
|
|
10208
|
+
"hasSearch": false,
|
|
10209
|
+
"searchCovers": null,
|
|
10210
|
+
"findBy": []
|
|
10211
|
+
},
|
|
10212
|
+
"blindSurfaces": null,
|
|
10213
|
+
"zoneFacts": {
|
|
10214
|
+
"createGuidance": {
|
|
10215
|
+
"createOp": "project_attachments.create",
|
|
10216
|
+
"parentScoped": true,
|
|
10217
|
+
"liveProvenPrefix": [],
|
|
10218
|
+
"unproven": true,
|
|
10219
|
+
"blocker": {
|
|
10220
|
+
"kind": "unknown",
|
|
10221
|
+
"message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
|
|
10222
|
+
"remedy": "Read current field and picklist metadata, supply the project id, and preview the attachment before applying.",
|
|
10223
|
+
"requires": {
|
|
10224
|
+
"allOf": [
|
|
10225
|
+
"attachmentType",
|
|
10226
|
+
"fullPath",
|
|
10227
|
+
"title",
|
|
10228
|
+
"publish",
|
|
10229
|
+
"data"
|
|
10230
|
+
]
|
|
10231
|
+
}
|
|
10232
|
+
},
|
|
10233
|
+
"requiresByValue": [
|
|
10234
|
+
{
|
|
10235
|
+
"field": "attachmentType",
|
|
10236
|
+
"value": "FILE_ATTACHMENT",
|
|
10237
|
+
"requires": {
|
|
10238
|
+
"allOf": [
|
|
10239
|
+
"data"
|
|
10240
|
+
]
|
|
10241
|
+
}
|
|
10242
|
+
}
|
|
10243
|
+
],
|
|
10244
|
+
"vendorEvidence": [
|
|
10245
|
+
"Official ProjectAttachmentsEntity.htm and REST_Attachments.htm: Projects is the parent; file creation requires attachmentType, title, fullPath, publish and base64 data. Project queries include child project-note attachments; no nesting. Static contract, with live create unproven."
|
|
10246
|
+
],
|
|
10247
|
+
"deleteBoundary": {
|
|
10248
|
+
"available": true,
|
|
10249
|
+
"note": null
|
|
10250
|
+
},
|
|
10251
|
+
"parentCompany": {
|
|
10252
|
+
"via": "projectID",
|
|
10253
|
+
"resource": "projects",
|
|
10254
|
+
"field": "companyID"
|
|
10255
|
+
}
|
|
10256
|
+
}
|
|
10257
|
+
},
|
|
10258
|
+
"deleteBoundary": null,
|
|
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
|
|
10158
10326
|
}
|
|
10159
10327
|
};
|
|
10160
10328
|
var BLIND_SURFACE_STAMPS = {
|
|
@@ -13315,6 +13483,50 @@ var CREATE_GUIDANCE = {
|
|
|
13315
13483
|
"note": "the vendor defines no DELETE for products (spec-derived: the vendored api-docs.json defines no DELETE on the entity's paths) \u2014 a create cannot be undone through the API; cleanup is UI-only."
|
|
13316
13484
|
}
|
|
13317
13485
|
},
|
|
13486
|
+
{
|
|
13487
|
+
"resource": "project_attachments",
|
|
13488
|
+
"createOp": "project_attachments.create",
|
|
13489
|
+
"parentScoped": true,
|
|
13490
|
+
"liveProvenPrefix": [],
|
|
13491
|
+
"unproven": true,
|
|
13492
|
+
"blocker": {
|
|
13493
|
+
"kind": "unknown",
|
|
13494
|
+
"message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
|
|
13495
|
+
"remedy": "Read current field and picklist metadata, supply the project id, and preview the attachment before applying.",
|
|
13496
|
+
"requires": {
|
|
13497
|
+
"allOf": [
|
|
13498
|
+
"attachmentType",
|
|
13499
|
+
"fullPath",
|
|
13500
|
+
"title",
|
|
13501
|
+
"publish",
|
|
13502
|
+
"data"
|
|
13503
|
+
]
|
|
13504
|
+
}
|
|
13505
|
+
},
|
|
13506
|
+
"vendorEvidence": [
|
|
13507
|
+
"Official ProjectAttachmentsEntity.htm and REST_Attachments.htm: Projects is the parent; file creation requires attachmentType, title, fullPath, publish and base64 data. Project queries include child project-note attachments; no nesting. Static contract, with live create unproven."
|
|
13508
|
+
],
|
|
13509
|
+
"deleteBoundary": {
|
|
13510
|
+
"available": true,
|
|
13511
|
+
"note": null
|
|
13512
|
+
},
|
|
13513
|
+
"requiresByValue": [
|
|
13514
|
+
{
|
|
13515
|
+
"field": "attachmentType",
|
|
13516
|
+
"value": "FILE_ATTACHMENT",
|
|
13517
|
+
"requires": {
|
|
13518
|
+
"allOf": [
|
|
13519
|
+
"data"
|
|
13520
|
+
]
|
|
13521
|
+
}
|
|
13522
|
+
}
|
|
13523
|
+
],
|
|
13524
|
+
"parentCompany": {
|
|
13525
|
+
"via": "projectID",
|
|
13526
|
+
"resource": "projects",
|
|
13527
|
+
"field": "companyID"
|
|
13528
|
+
}
|
|
13529
|
+
},
|
|
13318
13530
|
{
|
|
13319
13531
|
"resource": "project_charges",
|
|
13320
13532
|
"createOp": "project_charges.create",
|
|
@@ -13349,6 +13561,47 @@ var CREATE_GUIDANCE = {
|
|
|
13349
13561
|
"field": "companyID"
|
|
13350
13562
|
}
|
|
13351
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
|
+
},
|
|
13352
13605
|
{
|
|
13353
13606
|
"resource": "project_notes",
|
|
13354
13607
|
"createOp": "project_notes.create",
|
|
@@ -14459,7 +14712,7 @@ var CREATE_GUIDANCE = {
|
|
|
14459
14712
|
}
|
|
14460
14713
|
],
|
|
14461
14714
|
"counts": {
|
|
14462
|
-
"total":
|
|
14715
|
+
"total": 110,
|
|
14463
14716
|
"byKind": {
|
|
14464
14717
|
"ok": 41,
|
|
14465
14718
|
"blind-reference": 16,
|
|
@@ -14469,7 +14722,7 @@ var CREATE_GUIDANCE = {
|
|
|
14469
14722
|
"resource-role-pair": 2,
|
|
14470
14723
|
"delete-absent": 0,
|
|
14471
14724
|
"non-mutable": 0,
|
|
14472
|
-
"unknown":
|
|
14725
|
+
"unknown": 34
|
|
14473
14726
|
}
|
|
14474
14727
|
}
|
|
14475
14728
|
};
|
|
@@ -15211,6 +15464,12 @@ var UNTRUSTED_FIELDS_BY_RESOURCE = {
|
|
|
15211
15464
|
],
|
|
15212
15465
|
"configuration_item_note_attachments": [
|
|
15213
15466
|
"title"
|
|
15467
|
+
],
|
|
15468
|
+
"project_attachments": [
|
|
15469
|
+
"title"
|
|
15470
|
+
],
|
|
15471
|
+
"project_note_attachments": [
|
|
15472
|
+
"title"
|
|
15214
15473
|
]
|
|
15215
15474
|
};
|
|
15216
15475
|
|
|
@@ -17085,7 +17344,7 @@ async function capabilitySets() {
|
|
|
17085
17344
|
const fieldOps = /* @__PURE__ */ new Map();
|
|
17086
17345
|
const udfCapable = /* @__PURE__ */ new Set();
|
|
17087
17346
|
const resources = /* @__PURE__ */ new Set();
|
|
17088
|
-
for (const rec of await
|
|
17347
|
+
for (const rec of await chunkTMJX6NTZ_cjs.loadCapabilityRecords()) {
|
|
17089
17348
|
if (rec.resource === "operations") continue;
|
|
17090
17349
|
resources.add(rec.resource);
|
|
17091
17350
|
if (rec.operation === "getFieldInfo") fieldOps.set(rec.resource, rec);
|
|
@@ -17096,7 +17355,7 @@ async function capabilitySets() {
|
|
|
17096
17355
|
var derivedIndexPromise = null;
|
|
17097
17356
|
function derivedIndexLoad() {
|
|
17098
17357
|
if (derivedIndexPromise === null) {
|
|
17099
|
-
derivedIndexPromise =
|
|
17358
|
+
derivedIndexPromise = chunkTMJX6NTZ_cjs.loadCapabilityRecords().then((records) => {
|
|
17100
17359
|
const index = /* @__PURE__ */ new Map();
|
|
17101
17360
|
for (const rec of records) {
|
|
17102
17361
|
const declared = rec.metadata?.derivedFields;
|
|
@@ -18273,7 +18532,9 @@ var MODEL_FIELD_SETS = {
|
|
|
18273
18532
|
"phases": ["id", "createDate", "creatorResourceID", "description", "dueDate", "estimatedHours", "externalID", "isScheduled", "lastActivityDateTime", "parentPhaseID", "phaseNumber", "projectID", "startDate", "title", "soapParentPropertyId"],
|
|
18274
18533
|
"product_vendors": ["id", "isActive", "isDefault", "productID", "vendorCost", "vendorID", "vendorPartNumber", "soapParentPropertyId"],
|
|
18275
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"],
|
|
18535
|
+
"project_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "projectID", "projectNoteID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
|
|
18276
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"],
|
|
18277
18538
|
"project_notes": ["id", "createDateTime", "createdByContactID", "creatorResourceID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "isAnnouncement", "lastActivityDate", "noteType", "projectID", "publish", "title", "soapParentPropertyId"],
|
|
18278
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"],
|
|
18279
18540
|
"purchase_approvals": ["id", "costType", "isApproved", "rejectNote"],
|
|
@@ -18373,7 +18634,9 @@ var MODEL_DATE_FIELDS = {
|
|
|
18373
18634
|
"opportunity_attachments": ["attachDate"],
|
|
18374
18635
|
"phases": ["createDate", "dueDate", "lastActivityDateTime", "startDate"],
|
|
18375
18636
|
"products": ["createdTime"],
|
|
18637
|
+
"project_attachments": ["attachDate"],
|
|
18376
18638
|
"project_charges": ["createDate", "datePurchased", "statusLastModifiedDate"],
|
|
18639
|
+
"project_note_attachments": ["attachDate"],
|
|
18377
18640
|
"project_notes": ["createDateTime", "lastActivityDate"],
|
|
18378
18641
|
"projects": ["completedDateTime", "createDateTime", "endDateTime", "lastActivityDateTime", "startDateTime", "statusDateTime"],
|
|
18379
18642
|
"purchase_order_item_receiving": ["receiveDate"],
|
|
@@ -20749,6 +21012,8 @@ var WRITABLE2 = /* @__PURE__ */ new Set(["attachmentType", "contentType", "data"
|
|
|
20749
21012
|
var FILE_WRITABLE = /* @__PURE__ */ new Set(["attachmentType", "data", "fullPath", "publish", "title"]);
|
|
20750
21013
|
var NON_QUERYABLE = /* @__PURE__ */ new Set(["creatortype", "data", "filesize"]);
|
|
20751
21014
|
var SCOPED_ATTACHMENT_PARENTS = {
|
|
21015
|
+
project_attachments: { field: "projectID", name: "project" },
|
|
21016
|
+
project_note_attachments: { field: "projectNoteID", name: "project note" },
|
|
20752
21017
|
task_attachments: { field: "taskID", name: "task" },
|
|
20753
21018
|
task_note_attachments: { field: "taskNoteID", name: "task note" },
|
|
20754
21019
|
configuration_item_attachments: { field: "configurationItemID", name: "configuration item" },
|
|
@@ -20796,14 +21061,20 @@ function admitFileAttachment(resource, data, parentId) {
|
|
|
20796
21061
|
if (data === null || typeof data !== "object" || ![Object.prototype, null].includes(Object.getPrototypeOf(data))) fail2("data must be a plain record");
|
|
20797
21062
|
const body = data;
|
|
20798
21063
|
const reference = {
|
|
21064
|
+
project_attachments: void 0,
|
|
20799
21065
|
task_note_attachments: "attachedByContactID",
|
|
21066
|
+
project_note_attachments: "attachedByContactID",
|
|
20800
21067
|
configuration_item_attachments: "parentAttachmentID",
|
|
20801
21068
|
configuration_item_note_attachments: void 0
|
|
20802
21069
|
}[resource];
|
|
20803
21070
|
for (const field of Object.keys(body)) if (!FILE_WRITABLE.has(field) && field !== reference) fail2(`${field} is not a supported create field`);
|
|
20804
21071
|
if (body.attachmentType !== "FILE_ATTACHMENT") fail2("attachmentType must explicitly be FILE_ATTACHMENT; other attachment types are unsupported");
|
|
21072
|
+
const maxLength = resource === "project_attachments" ? void 0 : 255;
|
|
20805
21073
|
for (const field of ["fullPath", "title"]) {
|
|
20806
|
-
|
|
21074
|
+
const value = body[field];
|
|
21075
|
+
const requirement = `${field} is required and must be a nonblank string${maxLength === void 0 ? "" : ` of at most ${maxLength} characters`}`;
|
|
21076
|
+
if (typeof value !== "string" || value.trim() === "") return fail2(requirement);
|
|
21077
|
+
if (maxLength !== void 0 && value.length > maxLength) fail2(requirement);
|
|
20807
21078
|
}
|
|
20808
21079
|
if (typeof body.publish !== "number" || !Number.isSafeInteger(body.publish)) fail2("publish must be an integer from current field metadata");
|
|
20809
21080
|
if (typeof body.data !== "string" || !isBase64(body.data)) fail2("FILE_ATTACHMENT requires nonempty base64 data");
|
|
@@ -21728,6 +21999,20 @@ var SIMPLE_RESOURCES = [
|
|
|
21728
21999
|
helpers: { search: true, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
|
|
21729
22000
|
opForms: { get: "global", create: "global", update: "global" }
|
|
21730
22001
|
},
|
|
22002
|
+
{
|
|
22003
|
+
key: "project_attachments",
|
|
22004
|
+
accessor: "projectAttachments",
|
|
22005
|
+
resourcePath: "/V1.0/ProjectAttachments",
|
|
22006
|
+
parentScopedPath: "/V1.0/Projects/{parentId}/Attachments",
|
|
22007
|
+
parentPath: "/V1.0/Projects",
|
|
22008
|
+
parentField: "projectID",
|
|
22009
|
+
deletable: true,
|
|
22010
|
+
udfCapable: false,
|
|
22011
|
+
attachmentGet: true,
|
|
22012
|
+
ops: { query: true, queryAll: false, count: true, get: true, create: true, update: false, delete: true, getEntityInfo: true, getFieldInfo: true, getUdfInfo: false, download: false },
|
|
22013
|
+
helpers: { search: false, resolve: false, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
|
|
22014
|
+
opForms: { get: "scoped", create: "scoped", delete: "scoped" }
|
|
22015
|
+
},
|
|
21731
22016
|
{
|
|
21732
22017
|
key: "project_charges",
|
|
21733
22018
|
accessor: "projectCharges",
|
|
@@ -21742,6 +22027,20 @@ var SIMPLE_RESOURCES = [
|
|
|
21742
22027
|
helpers: { search: true, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
|
|
21743
22028
|
opForms: { get: "scoped", create: "scoped", update: "scoped", delete: "scoped" }
|
|
21744
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
|
+
},
|
|
21745
22044
|
{
|
|
21746
22045
|
key: "project_notes",
|
|
21747
22046
|
accessor: "projectNotes",
|
|
@@ -22411,7 +22710,7 @@ var SIMPLE_RESOURCES = [
|
|
|
22411
22710
|
var GenericResource = class extends BaseResource {
|
|
22412
22711
|
constructor(http, config, pageSize) {
|
|
22413
22712
|
super(http, config, pageSize);
|
|
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 () => {
|
|
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 () => {
|
|
22415
22714
|
throw new OperationNotSupportedError(config.key, "getUdfInfo");
|
|
22416
22715
|
};
|
|
22417
22716
|
if (config.ops?.create === false || isScopedAttachmentResource(config.key) || ["company_attachments", "task_predecessors"].includes(config.key)) this.createIfNotExists = async () => {
|
|
@@ -24294,7 +24593,7 @@ function dateBucketLabel(value, bucket) {
|
|
|
24294
24593
|
var queryResourceKeysPromise = null;
|
|
24295
24594
|
function queryResourceKeys() {
|
|
24296
24595
|
if (queryResourceKeysPromise === null) {
|
|
24297
|
-
queryResourceKeysPromise =
|
|
24596
|
+
queryResourceKeysPromise = chunkTMJX6NTZ_cjs.loadCapabilityRecords().then((records) => {
|
|
24298
24597
|
const s = /* @__PURE__ */ new Set();
|
|
24299
24598
|
for (const rec of records) if (rec.operation === "query") s.add(rec.resource);
|
|
24300
24599
|
return s;
|
|
@@ -24416,7 +24715,7 @@ function parseTopAndLimit(opts, problems) {
|
|
|
24416
24715
|
return { top, limit };
|
|
24417
24716
|
}
|
|
24418
24717
|
async function checkFieldNames(resourceKey, conditions, opts, problems) {
|
|
24419
|
-
const records = resourceKey === void 0 ? [] : await
|
|
24718
|
+
const records = resourceKey === void 0 ? [] : await chunkTMJX6NTZ_cjs.loadCapabilityRecords();
|
|
24420
24719
|
const record = resourceKey === void 0 ? void 0 : records.find((r) => r.resource === resourceKey && r.operation === "query");
|
|
24421
24720
|
if (record === void 0) return void 0;
|
|
24422
24721
|
const strings = (v) => Array.isArray(v) ? v.filter((f) => typeof f === "string" && f.trim() !== "") : [];
|
|
@@ -25061,7 +25360,7 @@ async function uiLink(client, input) {
|
|
|
25061
25360
|
var indexPromise = null;
|
|
25062
25361
|
function operationIndex() {
|
|
25063
25362
|
if (indexPromise === null) {
|
|
25064
|
-
indexPromise =
|
|
25363
|
+
indexPromise = chunkTMJX6NTZ_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
|
|
25065
25364
|
}
|
|
25066
25365
|
return indexPromise;
|
|
25067
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) {
|