node-autotask 0.77.0 → 0.79.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 +12 -0
  2. package/MCP_TOOL_CATALOG.json +265 -9
  3. package/README.md +1 -1
  4. package/capabilities.json +959 -7
  5. package/dist/capabilities-data.js +958 -6
  6. package/dist/capabilities.cjs +4 -4
  7. package/dist/capabilities.js +1 -1
  8. package/dist/{chunk-6VBOBCWA.cjs → chunk-2YFX77XI.cjs} +312 -14
  9. package/dist/{chunk-5MH3MPLB.cjs → chunk-75TQWC3M.cjs} +32 -30
  10. package/dist/{chunk-NAI7XIX4.cjs → chunk-EEGAMP4D.cjs} +199 -199
  11. package/dist/{chunk-G2U6NHPO.js → chunk-GJU4DJ6H.js} +3 -3
  12. package/dist/{chunk-RLXUY4VM.js → chunk-MQ2DXOZW.js} +2 -2
  13. package/dist/{chunk-QTFK2HAO.js → chunk-XIPZDDZS.js} +4 -2
  14. package/dist/{chunk-3FZJJX5B.cjs → chunk-XJQS3FBA.cjs} +3 -3
  15. package/dist/{chunk-F5Y7WBWY.js → chunk-YK32RN77.js} +307 -9
  16. package/dist/{index-B-vNyiD_.d.cts → index-BGFWqM2_.d.cts} +89 -1
  17. package/dist/{index-B-vNyiD_.d.ts → index-BGFWqM2_.d.ts} +89 -1
  18. package/dist/{index-PLdAoAFJ.d.cts → index-DBz-dqAY.d.cts} +4 -2
  19. package/dist/{index-ecr6unv3.d.ts → index-DS3jnPiq.d.ts} +4 -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 +4 -2
  39. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  // src/capabilities.ts
2
2
  var CAPABILITY_PLAN_HASHES = {
3
- "B": "3b14a93bbda886bce89c87d61ba40092f9acf6a829a959f042be1c3a0744ed42",
4
- "A": "3b14a93bbda886bce89c87d61ba40092f9acf6a829a959f042be1c3a0744ed42",
5
- "operations": "3b14a93bbda886bce89c87d61ba40092f9acf6a829a959f042be1c3a0744ed42"
3
+ "B": "8adb69f6f40586db84dac8a8f2a3fe134183f3d47a804ee8d7fa50f88b973e83",
4
+ "A": "8adb69f6f40586db84dac8a8f2a3fe134183f3d47a804ee8d7fa50f88b973e83",
5
+ "operations": "8adb69f6f40586db84dac8a8f2a3fe134183f3d47a804ee8d7fa50f88b973e83"
6
6
  };
7
7
  var cached = null;
8
8
  function loadCapabilities() {
@@ -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-F5Y7WBWY.js';
2
- import { loadCapabilityRecords } from './chunk-G2U6NHPO.js';
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-YK32RN77.js';
2
+ import { loadCapabilityRecords } from './chunk-GJU4DJ6H.js';
3
3
 
4
4
  // src/resources/special/configuration_items.ts
5
5
  async function fetchRecord(http, path, label, readOpts) {
@@ -1,5 +1,5 @@
1
- import { ConfigurationItemsResource, ContactsResource, InventoryProductsResource, QuotesResource, ResourceTimeOffAdditionalResource, ResourceTimeOffBalancesResource, ResourcesResource, ServiceCallsResource, TicketChargesResource, TicketsResource, TimeOffRequestsResource, AuthenticateResource, EntityInformationResource, ModulesResource, ThresholdInformationResource, VersionResource, VersionInformationResource, ZoneInformationResource } from './chunk-RLXUY4VM.js';
2
- import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, runBounded } from './chunk-F5Y7WBWY.js';
1
+ import { ConfigurationItemsResource, ContactsResource, InventoryProductsResource, QuotesResource, ResourceTimeOffAdditionalResource, ResourceTimeOffBalancesResource, ResourcesResource, ServiceCallsResource, TicketChargesResource, TicketsResource, TimeOffRequestsResource, AuthenticateResource, EntityInformationResource, ModulesResource, ThresholdInformationResource, VersionResource, VersionInformationResource, ZoneInformationResource } from './chunk-MQ2DXOZW.js';
2
+ import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, runBounded } from './chunk-YK32RN77.js';
3
3
 
4
4
  // src/client.ts
5
5
  var AutotaskClient = class {
@@ -31,6 +31,7 @@ var AutotaskClient = class {
31
31
  configurationItemCategories;
32
32
  configurationItemCategoryUdfAssociations;
33
33
  configurationItemDnsRecords;
34
+ configurationItemNoteAttachments;
34
35
  configurationItemNotes;
35
36
  configurationItemRelatedItems;
36
37
  configurationItems;
@@ -87,6 +88,7 @@ var AutotaskClient = class {
87
88
  phases;
88
89
  products;
89
90
  productVendors;
91
+ projectAttachments;
90
92
  projectCharges;
91
93
  projectNotes;
92
94
  projects;
@@ -2,9 +2,9 @@
2
2
 
3
3
  // src/capabilities.ts
4
4
  var CAPABILITY_PLAN_HASHES = {
5
- "B": "3b14a93bbda886bce89c87d61ba40092f9acf6a829a959f042be1c3a0744ed42",
6
- "A": "3b14a93bbda886bce89c87d61ba40092f9acf6a829a959f042be1c3a0744ed42",
7
- "operations": "3b14a93bbda886bce89c87d61ba40092f9acf6a829a959f042be1c3a0744ed42"
5
+ "B": "8adb69f6f40586db84dac8a8f2a3fe134183f3d47a804ee8d7fa50f88b973e83",
6
+ "A": "8adb69f6f40586db84dac8a8f2a3fe134183f3d47a804ee8d7fa50f88b973e83",
7
+ "operations": "8adb69f6f40586db84dac8a8f2a3fe134183f3d47a804ee8d7fa50f88b973e83"
8
8
  };
9
9
  var cached = null;
10
10
  function loadCapabilities() {
@@ -1,4 +1,4 @@
1
- import { loadCapabilityRecords } from './chunk-G2U6NHPO.js';
1
+ import { loadCapabilityRecords } from './chunk-GJU4DJ6H.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';
@@ -3023,7 +3023,24 @@ var RELATIONSHIP_MAP = {
3023
3023
  "segment": "Notes",
3024
3024
  "field": "configurationItemID"
3025
3025
  },
3026
- "children": [],
3026
+ "children": [
3027
+ {
3028
+ "resource": "configuration_item_note_attachments",
3029
+ "apiEntity": "ConfigurationItemNoteAttachment",
3030
+ "parentField": "configurationItemNoteID",
3031
+ "parentSegment": "Attachments",
3032
+ "tier": "extended",
3033
+ "workflowResource": false,
3034
+ "specialOps": [],
3035
+ "searchCovers": null,
3036
+ "scopedOps": {
3037
+ "create": true,
3038
+ "query": true,
3039
+ "update": false,
3040
+ "delete": true
3041
+ }
3042
+ }
3043
+ ],
3027
3044
  "naturalKeys": {
3028
3045
  "hasSearch": false,
3029
3046
  "searchCovers": null,
@@ -6383,6 +6400,22 @@ var RELATIONSHIP_MAP = {
6383
6400
  "delete": false
6384
6401
  }
6385
6402
  },
6403
+ {
6404
+ "resource": "project_attachments",
6405
+ "apiEntity": "ProjectAttachment",
6406
+ "parentField": "projectID",
6407
+ "parentSegment": "Attachments",
6408
+ "tier": "extended",
6409
+ "workflowResource": false,
6410
+ "specialOps": [],
6411
+ "searchCovers": null,
6412
+ "scopedOps": {
6413
+ "create": true,
6414
+ "query": true,
6415
+ "update": false,
6416
+ "delete": true
6417
+ }
6418
+ },
6386
6419
  {
6387
6420
  "resource": "project_charges",
6388
6421
  "apiEntity": "ProjectCharge",
@@ -10072,6 +10105,139 @@ var RELATIONSHIP_MAP = {
10072
10105
  },
10073
10106
  "deleteBoundary": null,
10074
10107
  "markerField": null
10108
+ },
10109
+ "configuration_item_note_attachments": {
10110
+ "resource": "configuration_item_note_attachments",
10111
+ "apiEntity": "ConfigurationItemNoteAttachment",
10112
+ "kind": "entity",
10113
+ "path": "ConfigurationItemNoteAttachments",
10114
+ "parentScoped": true,
10115
+ "tier": "extended",
10116
+ "workflowResource": false,
10117
+ "group": "A",
10118
+ "parent": {
10119
+ "resource": "configuration_item_notes",
10120
+ "segment": "Attachments",
10121
+ "field": "configurationItemNoteID"
10122
+ },
10123
+ "children": [],
10124
+ "naturalKeys": {
10125
+ "hasSearch": false,
10126
+ "searchCovers": null,
10127
+ "findBy": []
10128
+ },
10129
+ "blindSurfaces": null,
10130
+ "zoneFacts": {
10131
+ "createGuidance": {
10132
+ "createOp": "configuration_item_note_attachments.create",
10133
+ "parentScoped": true,
10134
+ "liveProvenPrefix": [],
10135
+ "unproven": true,
10136
+ "blocker": {
10137
+ "kind": "unknown",
10138
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
10139
+ "remedy": "Read current field and picklist metadata, supply the configuration-item note id, and preview the attachment before applying.",
10140
+ "requires": {
10141
+ "allOf": [
10142
+ "attachmentType",
10143
+ "fullPath",
10144
+ "title",
10145
+ "publish",
10146
+ "data"
10147
+ ]
10148
+ }
10149
+ },
10150
+ "requiresByValue": [
10151
+ {
10152
+ "field": "attachmentType",
10153
+ "value": "FILE_ATTACHMENT",
10154
+ "requires": {
10155
+ "allOf": [
10156
+ "data"
10157
+ ]
10158
+ }
10159
+ }
10160
+ ],
10161
+ "vendorEvidence": [
10162
+ "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."
10163
+ ],
10164
+ "deleteBoundary": {
10165
+ "available": true,
10166
+ "note": null
10167
+ }
10168
+ }
10169
+ },
10170
+ "deleteBoundary": null,
10171
+ "markerField": null
10172
+ },
10173
+ "project_attachments": {
10174
+ "resource": "project_attachments",
10175
+ "apiEntity": "ProjectAttachment",
10176
+ "kind": "entity",
10177
+ "path": "ProjectAttachments",
10178
+ "parentScoped": true,
10179
+ "tier": "extended",
10180
+ "workflowResource": false,
10181
+ "group": "A",
10182
+ "parent": {
10183
+ "resource": "projects",
10184
+ "segment": "Attachments",
10185
+ "field": "projectID"
10186
+ },
10187
+ "children": [],
10188
+ "naturalKeys": {
10189
+ "hasSearch": false,
10190
+ "searchCovers": null,
10191
+ "findBy": []
10192
+ },
10193
+ "blindSurfaces": null,
10194
+ "zoneFacts": {
10195
+ "createGuidance": {
10196
+ "createOp": "project_attachments.create",
10197
+ "parentScoped": true,
10198
+ "liveProvenPrefix": [],
10199
+ "unproven": true,
10200
+ "blocker": {
10201
+ "kind": "unknown",
10202
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
10203
+ "remedy": "Read current field and picklist metadata, supply the project id, and preview the attachment before applying.",
10204
+ "requires": {
10205
+ "allOf": [
10206
+ "attachmentType",
10207
+ "fullPath",
10208
+ "title",
10209
+ "publish",
10210
+ "data"
10211
+ ]
10212
+ }
10213
+ },
10214
+ "requiresByValue": [
10215
+ {
10216
+ "field": "attachmentType",
10217
+ "value": "FILE_ATTACHMENT",
10218
+ "requires": {
10219
+ "allOf": [
10220
+ "data"
10221
+ ]
10222
+ }
10223
+ }
10224
+ ],
10225
+ "vendorEvidence": [
10226
+ "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."
10227
+ ],
10228
+ "deleteBoundary": {
10229
+ "available": true,
10230
+ "note": null
10231
+ },
10232
+ "parentCompany": {
10233
+ "via": "projectID",
10234
+ "resource": "projects",
10235
+ "field": "companyID"
10236
+ }
10237
+ }
10238
+ },
10239
+ "deleteBoundary": null,
10240
+ "markerField": null
10075
10241
  }
10076
10242
  };
10077
10243
  var BLIND_SURFACE_STAMPS = {
@@ -12022,6 +12188,45 @@ var CREATE_GUIDANCE = {
12022
12188
  "note": null
12023
12189
  }
12024
12190
  },
12191
+ {
12192
+ "resource": "configuration_item_note_attachments",
12193
+ "createOp": "configuration_item_note_attachments.create",
12194
+ "parentScoped": true,
12195
+ "liveProvenPrefix": [],
12196
+ "unproven": true,
12197
+ "blocker": {
12198
+ "kind": "unknown",
12199
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
12200
+ "remedy": "Read current field and picklist metadata, supply the configuration-item note id, and preview the attachment before applying.",
12201
+ "requires": {
12202
+ "allOf": [
12203
+ "attachmentType",
12204
+ "fullPath",
12205
+ "title",
12206
+ "publish",
12207
+ "data"
12208
+ ]
12209
+ }
12210
+ },
12211
+ "vendorEvidence": [
12212
+ "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."
12213
+ ],
12214
+ "deleteBoundary": {
12215
+ "available": true,
12216
+ "note": null
12217
+ },
12218
+ "requiresByValue": [
12219
+ {
12220
+ "field": "attachmentType",
12221
+ "value": "FILE_ATTACHMENT",
12222
+ "requires": {
12223
+ "allOf": [
12224
+ "data"
12225
+ ]
12226
+ }
12227
+ }
12228
+ ]
12229
+ },
12025
12230
  {
12026
12231
  "resource": "configuration_item_notes",
12027
12232
  "createOp": "configuration_item_notes.create",
@@ -13193,6 +13398,50 @@ var CREATE_GUIDANCE = {
13193
13398
  "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."
13194
13399
  }
13195
13400
  },
13401
+ {
13402
+ "resource": "project_attachments",
13403
+ "createOp": "project_attachments.create",
13404
+ "parentScoped": true,
13405
+ "liveProvenPrefix": [],
13406
+ "unproven": true,
13407
+ "blocker": {
13408
+ "kind": "unknown",
13409
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
13410
+ "remedy": "Read current field and picklist metadata, supply the project id, and preview the attachment before applying.",
13411
+ "requires": {
13412
+ "allOf": [
13413
+ "attachmentType",
13414
+ "fullPath",
13415
+ "title",
13416
+ "publish",
13417
+ "data"
13418
+ ]
13419
+ }
13420
+ },
13421
+ "vendorEvidence": [
13422
+ "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."
13423
+ ],
13424
+ "deleteBoundary": {
13425
+ "available": true,
13426
+ "note": null
13427
+ },
13428
+ "requiresByValue": [
13429
+ {
13430
+ "field": "attachmentType",
13431
+ "value": "FILE_ATTACHMENT",
13432
+ "requires": {
13433
+ "allOf": [
13434
+ "data"
13435
+ ]
13436
+ }
13437
+ }
13438
+ ],
13439
+ "parentCompany": {
13440
+ "via": "projectID",
13441
+ "resource": "projects",
13442
+ "field": "companyID"
13443
+ }
13444
+ },
13196
13445
  {
13197
13446
  "resource": "project_charges",
13198
13447
  "createOp": "project_charges.create",
@@ -14337,7 +14586,7 @@ var CREATE_GUIDANCE = {
14337
14586
  }
14338
14587
  ],
14339
14588
  "counts": {
14340
- "total": 107,
14589
+ "total": 109,
14341
14590
  "byKind": {
14342
14591
  "ok": 41,
14343
14592
  "blind-reference": 16,
@@ -14347,7 +14596,7 @@ var CREATE_GUIDANCE = {
14347
14596
  "resource-role-pair": 2,
14348
14597
  "delete-absent": 0,
14349
14598
  "non-mutable": 0,
14350
- "unknown": 31
14599
+ "unknown": 33
14351
14600
  }
14352
14601
  }
14353
14602
  };
@@ -15086,6 +15335,12 @@ var UNTRUSTED_FIELDS_BY_RESOURCE = {
15086
15335
  ],
15087
15336
  "configuration_item_attachments": [
15088
15337
  "title"
15338
+ ],
15339
+ "configuration_item_note_attachments": [
15340
+ "title"
15341
+ ],
15342
+ "project_attachments": [
15343
+ "title"
15089
15344
  ]
15090
15345
  };
15091
15346
 
@@ -18095,6 +18350,7 @@ var MODEL_FIELD_SETS = {
18095
18350
  "configuration_item_categories": ["id", "displayColorRGB", "isActive", "isClientPortalDefault", "isGlobalDefault", "name", "nickname"],
18096
18351
  "configuration_item_category_udf_associations": ["id", "configurationItemCategoryID", "isRequired", "userDefinedFieldDefinitionID", "soapParentPropertyId"],
18097
18352
  "configuration_item_dns_records": ["id", "createDateTime", "data", "installedProductID", "timeToLiveSeconds", "dnsType", "soapParentPropertyId"],
18353
+ "configuration_item_note_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "configurationItemID", "configurationItemNoteID", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
18098
18354
  "configuration_item_notes": ["id", "configurationItemID", "createDateTime", "creatorResourceID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "lastActivityDate", "noteType", "title", "soapParentPropertyId"],
18099
18355
  "configuration_item_related_items": ["id", "configurationItemID", "relatedConfigurationItemID", "relationship", "soapParentPropertyId"],
18100
18356
  "configuration_item_ssl_subject_alternative_names": ["id", "configurationItemID", "name", "soapParentPropertyId"],
@@ -18147,6 +18403,7 @@ var MODEL_FIELD_SETS = {
18147
18403
  "phases": ["id", "createDate", "creatorResourceID", "description", "dueDate", "estimatedHours", "externalID", "isScheduled", "lastActivityDateTime", "parentPhaseID", "phaseNumber", "projectID", "startDate", "title", "soapParentPropertyId"],
18148
18404
  "product_vendors": ["id", "isActive", "isDefault", "productID", "vendorCost", "vendorID", "vendorPartNumber", "soapParentPropertyId"],
18149
18405
  "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
+ "project_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "projectID", "projectNoteID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
18150
18407
  "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"],
18151
18408
  "project_notes": ["id", "createDateTime", "createdByContactID", "creatorResourceID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "isAnnouncement", "lastActivityDate", "noteType", "projectID", "publish", "title", "soapParentPropertyId"],
18152
18409
  "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"],
@@ -18221,6 +18478,7 @@ var MODEL_DATE_FIELDS = {
18221
18478
  "configuration_item_attachments": ["attachDate"],
18222
18479
  "configuration_item_billing_product_associations": ["effectiveDate", "expirationDate"],
18223
18480
  "configuration_item_dns_records": ["createDateTime"],
18481
+ "configuration_item_note_attachments": ["attachDate"],
18224
18482
  "configuration_item_notes": ["createDateTime", "lastActivityDate"],
18225
18483
  "configuration_items": ["createDate", "dattoLastCheckInDateTime", "domainRegistrationDateTime", "domainLastUpdatedDateTime", "domainExpirationDateTime", "installDate", "lastModifiedTime", "sslValidFromDateTime", "sslValidUntilDateTime", "warrantyExpirationDate"],
18226
18484
  "contacts": ["bulkEmailOptOutTime", "createDate", "lastActivityDate", "lastModifiedDate", "solicitationOptOutTime"],
@@ -18246,6 +18504,7 @@ var MODEL_DATE_FIELDS = {
18246
18504
  "opportunity_attachments": ["attachDate"],
18247
18505
  "phases": ["createDate", "dueDate", "lastActivityDateTime", "startDate"],
18248
18506
  "products": ["createdTime"],
18507
+ "project_attachments": ["attachDate"],
18249
18508
  "project_charges": ["createDate", "datePurchased", "statusLastModifiedDate"],
18250
18509
  "project_notes": ["createDateTime", "lastActivityDate"],
18251
18510
  "projects": ["completedDateTime", "createDateTime", "endDateTime", "lastActivityDateTime", "startDateTime", "statusDateTime"],
@@ -20622,9 +20881,11 @@ var WRITABLE2 = /* @__PURE__ */ new Set(["attachmentType", "contentType", "data"
20622
20881
  var FILE_WRITABLE = /* @__PURE__ */ new Set(["attachmentType", "data", "fullPath", "publish", "title"]);
20623
20882
  var NON_QUERYABLE = /* @__PURE__ */ new Set(["creatortype", "data", "filesize"]);
20624
20883
  var SCOPED_ATTACHMENT_PARENTS = {
20884
+ project_attachments: { field: "projectID", name: "project" },
20625
20885
  task_attachments: { field: "taskID", name: "task" },
20626
20886
  task_note_attachments: { field: "taskNoteID", name: "task note" },
20627
- configuration_item_attachments: { field: "configurationItemID", name: "configuration item" }
20887
+ configuration_item_attachments: { field: "configurationItemID", name: "configuration item" },
20888
+ configuration_item_note_attachments: { field: "configurationItemNoteID", name: "configuration item note" }
20628
20889
  };
20629
20890
  function isScopedAttachmentResource(resource) {
20630
20891
  return Object.hasOwn(SCOPED_ATTACHMENT_PARENTS, resource);
@@ -20667,15 +20928,24 @@ function admitFileAttachment(resource, data, parentId) {
20667
20928
  };
20668
20929
  if (data === null || typeof data !== "object" || ![Object.prototype, null].includes(Object.getPrototypeOf(data))) fail2("data must be a plain record");
20669
20930
  const body = data;
20670
- const reference = resource === "task_note_attachments" ? "attachedByContactID" : "parentAttachmentID";
20931
+ const reference = {
20932
+ project_attachments: void 0,
20933
+ task_note_attachments: "attachedByContactID",
20934
+ configuration_item_attachments: "parentAttachmentID",
20935
+ configuration_item_note_attachments: void 0
20936
+ }[resource];
20671
20937
  for (const field of Object.keys(body)) if (!FILE_WRITABLE.has(field) && field !== reference) fail2(`${field} is not a supported create field`);
20672
20938
  if (body.attachmentType !== "FILE_ATTACHMENT") fail2("attachmentType must explicitly be FILE_ATTACHMENT; other attachment types are unsupported");
20939
+ const maxLength = resource === "project_attachments" ? void 0 : 255;
20673
20940
  for (const field of ["fullPath", "title"]) {
20674
- if (typeof body[field] !== "string" || body[field].trim() === "" || body[field].length > 255) fail2(`${field} is required and must be a nonblank string of at most 255 characters`);
20941
+ const value = body[field];
20942
+ const requirement = `${field} is required and must be a nonblank string${maxLength === void 0 ? "" : ` of at most ${maxLength} characters`}`;
20943
+ if (typeof value !== "string" || value.trim() === "") return fail2(requirement);
20944
+ if (maxLength !== void 0 && value.length > maxLength) fail2(requirement);
20675
20945
  }
20676
20946
  if (typeof body.publish !== "number" || !Number.isSafeInteger(body.publish)) fail2("publish must be an integer from current field metadata");
20677
20947
  if (typeof body.data !== "string" || !isBase64(body.data)) fail2("FILE_ATTACHMENT requires nonempty base64 data");
20678
- if (body[reference] !== void 0) {
20948
+ if (reference !== void 0 && body[reference] !== void 0) {
20679
20949
  if (typeof body[reference] !== "number") fail2(`${reference} must be a numeric identifier`);
20680
20950
  if (parseIdentifier(body[reference], reference) === 0) fail2(`${reference} must be positive`);
20681
20951
  }
@@ -20968,6 +21238,20 @@ var SIMPLE_RESOURCES = [
20968
21238
  helpers: { search: false, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
20969
21239
  opForms: { get: "scoped", delete: "scoped" }
20970
21240
  },
21241
+ {
21242
+ key: "configuration_item_note_attachments",
21243
+ accessor: "configurationItemNoteAttachments",
21244
+ resourcePath: "/V1.0/ConfigurationItemNoteAttachments",
21245
+ parentScopedPath: "/V1.0/ConfigurationItemNotes/{parentId}/Attachments",
21246
+ parentPath: "/V1.0/ConfigurationItemNotes",
21247
+ parentField: "configurationItemNoteID",
21248
+ deletable: true,
21249
+ udfCapable: false,
21250
+ attachmentGet: true,
21251
+ ops: { query: true, queryAll: false, count: true, get: true, create: true, update: false, delete: true, getEntityInfo: true, getFieldInfo: true, getUdfInfo: false, download: false },
21252
+ helpers: { search: false, resolve: false, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
21253
+ opForms: { get: "scoped", create: "scoped", delete: "scoped" }
21254
+ },
20971
21255
  {
20972
21256
  key: "configuration_item_notes",
20973
21257
  accessor: "configurationItemNotes",
@@ -21582,6 +21866,20 @@ var SIMPLE_RESOURCES = [
21582
21866
  helpers: { search: true, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
21583
21867
  opForms: { get: "global", create: "global", update: "global" }
21584
21868
  },
21869
+ {
21870
+ key: "project_attachments",
21871
+ accessor: "projectAttachments",
21872
+ resourcePath: "/V1.0/ProjectAttachments",
21873
+ parentScopedPath: "/V1.0/Projects/{parentId}/Attachments",
21874
+ parentPath: "/V1.0/Projects",
21875
+ parentField: "projectID",
21876
+ deletable: true,
21877
+ udfCapable: false,
21878
+ attachmentGet: true,
21879
+ ops: { query: true, queryAll: false, count: true, get: true, create: true, update: false, delete: true, getEntityInfo: true, getFieldInfo: true, getUdfInfo: false, download: false },
21880
+ helpers: { search: false, resolve: false, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
21881
+ opForms: { get: "scoped", create: "scoped", delete: "scoped" }
21882
+ },
21585
21883
  {
21586
21884
  key: "project_charges",
21587
21885
  accessor: "projectCharges",
@@ -22265,7 +22563,7 @@ var SIMPLE_RESOURCES = [
22265
22563
  var GenericResource = class extends BaseResource {
22266
22564
  constructor(http, config, pageSize) {
22267
22565
  super(http, config, pageSize);
22268
- if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
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 () => {
22269
22567
  throw new OperationNotSupportedError(config.key, "getUdfInfo");
22270
22568
  };
22271
22569
  if (config.ops?.create === false || isScopedAttachmentResource(config.key) || ["company_attachments", "task_predecessors"].includes(config.key)) this.createIfNotExists = async () => {