node-autotask 0.81.0 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/MCP_TOOL_CATALOG.json +137 -9
  3. package/README.md +1 -1
  4. package/capabilities.json +483 -7
  5. package/dist/capabilities-data.js +482 -6
  6. package/dist/capabilities.cjs +4 -4
  7. package/dist/capabilities.js +1 -1
  8. package/dist/{chunk-PLERXELA.cjs → chunk-5UR4L7SB.cjs} +3 -3
  9. package/dist/{chunk-LCUUFTYD.js → chunk-7PQKFGTI.js} +2 -2
  10. package/dist/{chunk-MR5TGVHR.cjs → chunk-EFINBMXE.cjs} +165 -10
  11. package/dist/{chunk-5MJZ554M.js → chunk-EQ6LOII6.js} +3 -3
  12. package/dist/{chunk-X7G4W5DF.js → chunk-FYDLVUSN.js} +3 -2
  13. package/dist/{chunk-ACF32I5D.js → chunk-HZGCJ2CQ.js} +160 -5
  14. package/dist/{chunk-KKUBJRO3.cjs → chunk-TZL45TYE.cjs} +199 -199
  15. package/dist/{chunk-6HMGV3MY.cjs → chunk-XJQYDJKB.cjs} +31 -30
  16. package/dist/{index-DswDMDNH.d.ts → index-CW3PJPqH.d.ts} +3 -2
  17. package/dist/{index-BxPqypDD.d.cts → index-Dt1KqDEQ.d.cts} +3 -2
  18. package/dist/{index-lj8ocwxy.d.cts → index-inEhFJaU.d.cts} +44 -1
  19. package/dist/{index-lj8ocwxy.d.ts → index-inEhFJaU.d.ts} +44 -1
  20. package/dist/index.cjs +84 -84
  21. package/dist/index.d.cts +3 -3
  22. package/dist/index.d.ts +3 -3
  23. package/dist/index.js +5 -5
  24. package/dist/operations/index.cjs +51 -51
  25. package/dist/operations/index.d.cts +4 -4
  26. package/dist/operations/index.d.ts +4 -4
  27. package/dist/operations/index.js +2 -2
  28. package/dist/pool.cjs +12 -12
  29. package/dist/pool.d.cts +1 -1
  30. package/dist/pool.d.ts +1 -1
  31. package/dist/pool.js +4 -4
  32. package/dist/resources/index.cjs +27 -27
  33. package/dist/resources/index.d.cts +2 -2
  34. package/dist/resources/index.d.ts +2 -2
  35. package/dist/resources/index.js +3 -3
  36. package/dist/types/index.d.cts +1 -1
  37. package/dist/types/index.d.ts +1 -1
  38. package/docs/API.md +3 -2
  39. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkPLERXELA_cjs = require('./chunk-PLERXELA.cjs');
3
+ var chunk5UR4L7SB_cjs = require('./chunk-5UR4L7SB.cjs');
4
4
  var chunkBD4AUGCJ_cjs = require('./chunk-BD4AUGCJ.cjs');
5
5
  var crypto = require('crypto');
6
6
  var async_hooks = require('async_hooks');
@@ -7356,7 +7356,24 @@ var RELATIONSHIP_MAP = {
7356
7356
  "workflowResource": false,
7357
7357
  "group": "B",
7358
7358
  "parent": null,
7359
- "children": [],
7359
+ "children": [
7360
+ {
7361
+ "resource": "sales_order_attachments",
7362
+ "apiEntity": "SalesOrderAttachment",
7363
+ "parentField": "salesOrderID",
7364
+ "parentSegment": "Attachments",
7365
+ "tier": "extended",
7366
+ "workflowResource": false,
7367
+ "specialOps": [],
7368
+ "searchCovers": null,
7369
+ "scopedOps": {
7370
+ "create": true,
7371
+ "query": true,
7372
+ "update": false,
7373
+ "delete": true
7374
+ }
7375
+ }
7376
+ ],
7360
7377
  "naturalKeys": {
7361
7378
  "hasSearch": false,
7362
7379
  "searchCovers": null,
@@ -10406,6 +10423,77 @@ var RELATIONSHIP_MAP = {
10406
10423
  },
10407
10424
  "deleteBoundary": null,
10408
10425
  "markerField": null
10426
+ },
10427
+ "sales_order_attachments": {
10428
+ "resource": "sales_order_attachments",
10429
+ "apiEntity": "SalesOrderAttachment",
10430
+ "kind": "entity",
10431
+ "path": "SalesOrderAttachments",
10432
+ "parentScoped": true,
10433
+ "tier": "extended",
10434
+ "workflowResource": false,
10435
+ "group": "B",
10436
+ "parent": {
10437
+ "resource": "sales_orders",
10438
+ "segment": "Attachments",
10439
+ "field": "salesOrderID"
10440
+ },
10441
+ "children": [],
10442
+ "naturalKeys": {
10443
+ "hasSearch": false,
10444
+ "searchCovers": null,
10445
+ "findBy": []
10446
+ },
10447
+ "blindSurfaces": null,
10448
+ "zoneFacts": {
10449
+ "createGuidance": {
10450
+ "createOp": "sales_order_attachments.create",
10451
+ "parentScoped": true,
10452
+ "liveProvenPrefix": [],
10453
+ "unproven": true,
10454
+ "blocker": {
10455
+ "kind": "unknown",
10456
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
10457
+ "remedy": "Read the current field and picklist metadata, supply the named parent id, and preview the attachment before applying.",
10458
+ "requires": {
10459
+ "allOf": [
10460
+ "attachmentType",
10461
+ "fullPath",
10462
+ "title",
10463
+ "publish",
10464
+ "data"
10465
+ ]
10466
+ }
10467
+ },
10468
+ "requiresByValue": [
10469
+ {
10470
+ "field": "attachmentType",
10471
+ "value": "FILE_ATTACHMENT",
10472
+ "requires": {
10473
+ "allOf": [
10474
+ "data"
10475
+ ]
10476
+ }
10477
+ }
10478
+ ],
10479
+ "vendorEvidence": [
10480
+ "https://www.autotask.net/help/developerhelp/Content/APIs/REST/Entities/SalesOrderAttachmentsEntity.htm",
10481
+ "https://www.autotask.net/help/developerhelp/content/apis/REST/API_Calls/REST_Attachments.htm",
10482
+ "Official SalesOrderAttachments entity documentation and vendored controllers define scoped SalesOrders attachment routes. Sales orders cannot have nested attachments, and the documented contact-author exception does not include sales orders. The help URL table repeats parent SalesOrders actions; attachment routing follows the vendored attachment controllers. No update, UDF metadata or data-download endpoint is implemented. Static contract only; no live create."
10483
+ ],
10484
+ "deleteBoundary": {
10485
+ "available": true,
10486
+ "note": null
10487
+ },
10488
+ "parentCompany": {
10489
+ "via": "salesOrderID",
10490
+ "resource": "sales_orders",
10491
+ "field": "companyID"
10492
+ }
10493
+ }
10494
+ },
10495
+ "deleteBoundary": null,
10496
+ "markerField": null
10409
10497
  }
10410
10498
  };
10411
10499
  var BLIND_SURFACE_STAMPS = {
@@ -13959,6 +14047,52 @@ var CREATE_GUIDANCE = {
13959
14047
  "note": "the vendor defines no DELETE for roles (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."
13960
14048
  }
13961
14049
  },
14050
+ {
14051
+ "resource": "sales_order_attachments",
14052
+ "createOp": "sales_order_attachments.create",
14053
+ "parentScoped": true,
14054
+ "liveProvenPrefix": [],
14055
+ "unproven": true,
14056
+ "blocker": {
14057
+ "kind": "unknown",
14058
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
14059
+ "remedy": "Read the current field and picklist metadata, supply the named parent id, and preview the attachment before applying.",
14060
+ "requires": {
14061
+ "allOf": [
14062
+ "attachmentType",
14063
+ "fullPath",
14064
+ "title",
14065
+ "publish",
14066
+ "data"
14067
+ ]
14068
+ }
14069
+ },
14070
+ "vendorEvidence": [
14071
+ "https://www.autotask.net/help/developerhelp/Content/APIs/REST/Entities/SalesOrderAttachmentsEntity.htm",
14072
+ "https://www.autotask.net/help/developerhelp/content/apis/REST/API_Calls/REST_Attachments.htm",
14073
+ "Official SalesOrderAttachments entity documentation and vendored controllers define scoped SalesOrders attachment routes. Sales orders cannot have nested attachments, and the documented contact-author exception does not include sales orders. The help URL table repeats parent SalesOrders actions; attachment routing follows the vendored attachment controllers. No update, UDF metadata or data-download endpoint is implemented. Static contract only; no live create."
14074
+ ],
14075
+ "deleteBoundary": {
14076
+ "available": true,
14077
+ "note": null
14078
+ },
14079
+ "requiresByValue": [
14080
+ {
14081
+ "field": "attachmentType",
14082
+ "value": "FILE_ATTACHMENT",
14083
+ "requires": {
14084
+ "allOf": [
14085
+ "data"
14086
+ ]
14087
+ }
14088
+ }
14089
+ ],
14090
+ "parentCompany": {
14091
+ "via": "salesOrderID",
14092
+ "resource": "sales_orders",
14093
+ "field": "companyID"
14094
+ }
14095
+ },
13962
14096
  {
13963
14097
  "resource": "service_call_task_resources",
13964
14098
  "createOp": "service_call_task_resources.create",
@@ -14836,7 +14970,7 @@ var CREATE_GUIDANCE = {
14836
14970
  }
14837
14971
  ],
14838
14972
  "counts": {
14839
- "total": 111,
14973
+ "total": 112,
14840
14974
  "byKind": {
14841
14975
  "ok": 41,
14842
14976
  "blind-reference": 16,
@@ -14846,7 +14980,7 @@ var CREATE_GUIDANCE = {
14846
14980
  "resource-role-pair": 2,
14847
14981
  "delete-absent": 0,
14848
14982
  "non-mutable": 0,
14849
- "unknown": 35
14983
+ "unknown": 36
14850
14984
  }
14851
14985
  }
14852
14986
  };
@@ -15597,6 +15731,9 @@ var UNTRUSTED_FIELDS_BY_RESOURCE = {
15597
15731
  ],
15598
15732
  "contract_note_attachments": [
15599
15733
  "title"
15734
+ ],
15735
+ "sales_order_attachments": [
15736
+ "title"
15600
15737
  ]
15601
15738
  };
15602
15739
 
@@ -17471,7 +17608,7 @@ async function capabilitySets() {
17471
17608
  const fieldOps = /* @__PURE__ */ new Map();
17472
17609
  const udfCapable = /* @__PURE__ */ new Set();
17473
17610
  const resources = /* @__PURE__ */ new Set();
17474
- for (const rec of await chunkPLERXELA_cjs.loadCapabilityRecords()) {
17611
+ for (const rec of await chunk5UR4L7SB_cjs.loadCapabilityRecords()) {
17475
17612
  if (rec.resource === "operations") continue;
17476
17613
  resources.add(rec.resource);
17477
17614
  if (rec.operation === "getFieldInfo") fieldOps.set(rec.resource, rec);
@@ -17482,7 +17619,7 @@ async function capabilitySets() {
17482
17619
  var derivedIndexPromise = null;
17483
17620
  function derivedIndexLoad() {
17484
17621
  if (derivedIndexPromise === null) {
17485
- derivedIndexPromise = chunkPLERXELA_cjs.loadCapabilityRecords().then((records) => {
17622
+ derivedIndexPromise = chunk5UR4L7SB_cjs.loadCapabilityRecords().then((records) => {
17486
17623
  const index = /* @__PURE__ */ new Map();
17487
17624
  for (const rec of records) {
17488
17625
  const declared = rec.metadata?.derivedFields;
@@ -18680,6 +18817,7 @@ var MODEL_FIELD_SETS = {
18680
18817
  "resource_time_off_balances": ["id", "resourceID", "floatingHolidayAnnualAllowance", "floatingHolidayBalance", "floatingHolidayPlanned", "floatingHolidayUsed", "floatingHolidayWaitingApproval", "personalTimeAnnualAllowance", "personalTimeBalance", "personalTimePlanned", "personalTimeUsed", "personalTimeWaitingApproval", "sickTimeAnnualAllowance", "sickTimeBalance", "sickTimePlanned", "sickTimeUsed", "sickTimeWaitingApproval", "vacationTimeAnnualAllowance", "vacationTimeBalance", "vacationTimePlanned", "vacationTimeUsed", "vacationTimeWaitingApproval", "year", "soapParentPropertyId"],
18681
18818
  "resources": ["id", "accountingReferenceID", "dateFormat", "defaultServiceDeskRoleID", "email", "email2", "email3", "emailTypeCode", "emailTypeCode2", "emailTypeCode3", "firstName", "gender", "greeting", "hireDate", "homePhone", "initials", "internalCost", "isActive", "lastName", "licenseType", "locationID", "middleName", "mobilePhone", "numberFormat", "officeExtension", "officePhone", "payrollIdentifier", "payrollType", "resourceType", "suffix", "surveyResourceRating", "timeFormat", "title", "travelAvailabilityPct", "userName", "userType"],
18682
18819
  "roles": ["id", "description", "hourlyFactor", "hourlyRate", "isActive", "isExcludedFromNewContracts", "isSystemRole", "name", "quoteItemDefaultTaxCategoryId", "roleType"],
18820
+ "sales_order_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "publish", "salesOrderID", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
18683
18821
  "sales_orders": ["id", "additionalBillToAddressInformation", "additionalShipToAddressInformation", "billingAddress1", "billingAddress2", "billToCity", "billToCountryID", "billToPostalCode", "billToState", "companyID", "contactID", "impersonatorCreatorResourceID", "opportunityID", "organizationalLevelAssociationID", "ownerResourceID", "promisedFulfillmentDate", "salesOrderDate", "shipToAddress1", "shipToAddress2", "shipToCity", "shipToCountryID", "shipToPostalCode", "shipToState", "status", "title", "soapParentPropertyId", "userDefinedFields"],
18684
18822
  "service_call_task_resources": ["id", "resourceID", "serviceCallTaskID", "soapParentPropertyId"],
18685
18823
  "service_call_tasks": ["id", "serviceCallID", "taskID", "soapParentPropertyId"],
@@ -18774,6 +18912,7 @@ var MODEL_DATE_FIELDS = {
18774
18912
  "quote_templates": ["createDate", "lastActivityDate"],
18775
18913
  "quotes": ["approvalStatusChangedDate", "createDate", "effectiveDate", "expirationDate", "extApprovalResponseDate", "lastActivityDate", "lastPublishedDateTime"],
18776
18914
  "resources": ["hireDate"],
18915
+ "sales_order_attachments": ["attachDate"],
18777
18916
  "sales_orders": ["promisedFulfillmentDate", "salesOrderDate"],
18778
18917
  "service_calls": ["canceledDateTime", "createDateTime", "endDateTime", "lastModifiedDateTime", "startDateTime"],
18779
18918
  "services": ["createDate", "lastModifiedDate"],
@@ -21144,6 +21283,7 @@ var SCOPED_ATTACHMENT_PARENTS = {
21144
21283
  project_attachments: { field: "projectID", name: "project" },
21145
21284
  project_note_attachments: { field: "projectNoteID", name: "project note" },
21146
21285
  contract_note_attachments: { field: "contractNoteID", name: "contract note" },
21286
+ sales_order_attachments: { field: "salesOrderID", name: "sales order" },
21147
21287
  task_attachments: { field: "taskID", name: "task" },
21148
21288
  task_note_attachments: { field: "taskNoteID", name: "task note" },
21149
21289
  configuration_item_attachments: { field: "configurationItemID", name: "configuration item" },
@@ -21193,6 +21333,7 @@ function admitFileAttachment(resource, data, parentId) {
21193
21333
  const reference = {
21194
21334
  project_attachments: void 0,
21195
21335
  contract_note_attachments: void 0,
21336
+ sales_order_attachments: void 0,
21196
21337
  task_note_attachments: "attachedByContactID",
21197
21338
  project_note_attachments: "attachedByContactID",
21198
21339
  configuration_item_attachments: "parentAttachmentID",
@@ -22365,6 +22506,20 @@ var SIMPLE_RESOURCES = [
22365
22506
  helpers: { search: true, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
22366
22507
  opForms: { get: "global", create: "global", update: "global" }
22367
22508
  },
22509
+ {
22510
+ key: "sales_order_attachments",
22511
+ accessor: "salesOrderAttachments",
22512
+ resourcePath: "/V1.0/SalesOrderAttachments",
22513
+ parentScopedPath: "/V1.0/SalesOrders/{parentId}/Attachments",
22514
+ parentPath: "/V1.0/SalesOrders",
22515
+ parentField: "salesOrderID",
22516
+ deletable: true,
22517
+ udfCapable: false,
22518
+ attachmentGet: true,
22519
+ ops: { query: true, queryAll: false, count: true, get: true, create: true, update: false, delete: true, getEntityInfo: true, getFieldInfo: true, getUdfInfo: false, download: false },
22520
+ helpers: { search: false, resolve: false, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
22521
+ opForms: { get: "scoped", create: "scoped", delete: "scoped" }
22522
+ },
22368
22523
  {
22369
22524
  key: "sales_orders",
22370
22525
  accessor: "salesOrders",
@@ -22855,7 +23010,7 @@ var SIMPLE_RESOURCES = [
22855
23010
  var GenericResource = class extends BaseResource {
22856
23011
  constructor(http, config, pageSize) {
22857
23012
  super(http, config, pageSize);
22858
- if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "contract_note_attachments", "project_attachments", "project_note_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
23013
+ if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "contract_note_attachments", "project_attachments", "project_note_attachments", "sales_order_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
22859
23014
  throw new OperationNotSupportedError(config.key, "getUdfInfo");
22860
23015
  };
22861
23016
  if (config.ops?.create === false || isScopedAttachmentResource(config.key) || ["company_attachments", "task_predecessors"].includes(config.key)) this.createIfNotExists = async () => {
@@ -24738,7 +24893,7 @@ function dateBucketLabel(value, bucket) {
24738
24893
  var queryResourceKeysPromise = null;
24739
24894
  function queryResourceKeys() {
24740
24895
  if (queryResourceKeysPromise === null) {
24741
- queryResourceKeysPromise = chunkPLERXELA_cjs.loadCapabilityRecords().then((records) => {
24896
+ queryResourceKeysPromise = chunk5UR4L7SB_cjs.loadCapabilityRecords().then((records) => {
24742
24897
  const s = /* @__PURE__ */ new Set();
24743
24898
  for (const rec of records) if (rec.operation === "query") s.add(rec.resource);
24744
24899
  return s;
@@ -24860,7 +25015,7 @@ function parseTopAndLimit(opts, problems) {
24860
25015
  return { top, limit };
24861
25016
  }
24862
25017
  async function checkFieldNames(resourceKey, conditions, opts, problems) {
24863
- const records = resourceKey === void 0 ? [] : await chunkPLERXELA_cjs.loadCapabilityRecords();
25018
+ const records = resourceKey === void 0 ? [] : await chunk5UR4L7SB_cjs.loadCapabilityRecords();
24864
25019
  const record = resourceKey === void 0 ? void 0 : records.find((r) => r.resource === resourceKey && r.operation === "query");
24865
25020
  if (record === void 0) return void 0;
24866
25021
  const strings = (v) => Array.isArray(v) ? v.filter((f) => typeof f === "string" && f.trim() !== "") : [];
@@ -25505,7 +25660,7 @@ async function uiLink(client, input) {
25505
25660
  var indexPromise = null;
25506
25661
  function operationIndex() {
25507
25662
  if (indexPromise === null) {
25508
- indexPromise = chunkPLERXELA_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
25663
+ indexPromise = chunk5UR4L7SB_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
25509
25664
  }
25510
25665
  return indexPromise;
25511
25666
  }
@@ -1,8 +1,8 @@
1
1
  // src/capabilities.ts
2
2
  var CAPABILITY_PLAN_HASHES = {
3
- "B": "3ad65c80be0b2edbfb3ea25f2f82f34e41fb1e047a0d2da526a34c5d28de6bad",
4
- "A": "3ad65c80be0b2edbfb3ea25f2f82f34e41fb1e047a0d2da526a34c5d28de6bad",
5
- "operations": "3ad65c80be0b2edbfb3ea25f2f82f34e41fb1e047a0d2da526a34c5d28de6bad"
3
+ "B": "2de751fe81574eda1520f8db24e6f947cab79b1231aeeb39da8e379bf50d7308",
4
+ "A": "2de751fe81574eda1520f8db24e6f947cab79b1231aeeb39da8e379bf50d7308",
5
+ "operations": "2de751fe81574eda1520f8db24e6f947cab79b1231aeeb39da8e379bf50d7308"
6
6
  };
7
7
  var cached = null;
8
8
  function loadCapabilities() {
@@ -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-LCUUFTYD.js';
2
- import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, runBounded } from './chunk-ACF32I5D.js';
1
+ import { ConfigurationItemsResource, ContactsResource, InventoryProductsResource, QuotesResource, ResourceTimeOffAdditionalResource, ResourceTimeOffBalancesResource, ResourcesResource, ServiceCallsResource, TicketChargesResource, TicketsResource, TimeOffRequestsResource, AuthenticateResource, EntityInformationResource, ModulesResource, ThresholdInformationResource, VersionResource, VersionInformationResource, ZoneInformationResource } from './chunk-7PQKFGTI.js';
2
+ import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, runBounded } from './chunk-HZGCJ2CQ.js';
3
3
 
4
4
  // src/client.ts
5
5
  var AutotaskClient = class {
@@ -110,6 +110,7 @@ var AutotaskClient = class {
110
110
  resourceTimeOffApprovers;
111
111
  resourceTimeOffBalances;
112
112
  roles;
113
+ salesOrderAttachments;
113
114
  salesOrders;
114
115
  serviceCalls;
115
116
  serviceCallTaskResources;
@@ -1,4 +1,4 @@
1
- import { loadCapabilityRecords } from './chunk-5MJZ554M.js';
1
+ import { loadCapabilityRecords } from './chunk-EQ6LOII6.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';
@@ -7354,7 +7354,24 @@ var RELATIONSHIP_MAP = {
7354
7354
  "workflowResource": false,
7355
7355
  "group": "B",
7356
7356
  "parent": null,
7357
- "children": [],
7357
+ "children": [
7358
+ {
7359
+ "resource": "sales_order_attachments",
7360
+ "apiEntity": "SalesOrderAttachment",
7361
+ "parentField": "salesOrderID",
7362
+ "parentSegment": "Attachments",
7363
+ "tier": "extended",
7364
+ "workflowResource": false,
7365
+ "specialOps": [],
7366
+ "searchCovers": null,
7367
+ "scopedOps": {
7368
+ "create": true,
7369
+ "query": true,
7370
+ "update": false,
7371
+ "delete": true
7372
+ }
7373
+ }
7374
+ ],
7358
7375
  "naturalKeys": {
7359
7376
  "hasSearch": false,
7360
7377
  "searchCovers": null,
@@ -10404,6 +10421,77 @@ var RELATIONSHIP_MAP = {
10404
10421
  },
10405
10422
  "deleteBoundary": null,
10406
10423
  "markerField": null
10424
+ },
10425
+ "sales_order_attachments": {
10426
+ "resource": "sales_order_attachments",
10427
+ "apiEntity": "SalesOrderAttachment",
10428
+ "kind": "entity",
10429
+ "path": "SalesOrderAttachments",
10430
+ "parentScoped": true,
10431
+ "tier": "extended",
10432
+ "workflowResource": false,
10433
+ "group": "B",
10434
+ "parent": {
10435
+ "resource": "sales_orders",
10436
+ "segment": "Attachments",
10437
+ "field": "salesOrderID"
10438
+ },
10439
+ "children": [],
10440
+ "naturalKeys": {
10441
+ "hasSearch": false,
10442
+ "searchCovers": null,
10443
+ "findBy": []
10444
+ },
10445
+ "blindSurfaces": null,
10446
+ "zoneFacts": {
10447
+ "createGuidance": {
10448
+ "createOp": "sales_order_attachments.create",
10449
+ "parentScoped": true,
10450
+ "liveProvenPrefix": [],
10451
+ "unproven": true,
10452
+ "blocker": {
10453
+ "kind": "unknown",
10454
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
10455
+ "remedy": "Read the current field and picklist metadata, supply the named parent id, and preview the attachment before applying.",
10456
+ "requires": {
10457
+ "allOf": [
10458
+ "attachmentType",
10459
+ "fullPath",
10460
+ "title",
10461
+ "publish",
10462
+ "data"
10463
+ ]
10464
+ }
10465
+ },
10466
+ "requiresByValue": [
10467
+ {
10468
+ "field": "attachmentType",
10469
+ "value": "FILE_ATTACHMENT",
10470
+ "requires": {
10471
+ "allOf": [
10472
+ "data"
10473
+ ]
10474
+ }
10475
+ }
10476
+ ],
10477
+ "vendorEvidence": [
10478
+ "https://www.autotask.net/help/developerhelp/Content/APIs/REST/Entities/SalesOrderAttachmentsEntity.htm",
10479
+ "https://www.autotask.net/help/developerhelp/content/apis/REST/API_Calls/REST_Attachments.htm",
10480
+ "Official SalesOrderAttachments entity documentation and vendored controllers define scoped SalesOrders attachment routes. Sales orders cannot have nested attachments, and the documented contact-author exception does not include sales orders. The help URL table repeats parent SalesOrders actions; attachment routing follows the vendored attachment controllers. No update, UDF metadata or data-download endpoint is implemented. Static contract only; no live create."
10481
+ ],
10482
+ "deleteBoundary": {
10483
+ "available": true,
10484
+ "note": null
10485
+ },
10486
+ "parentCompany": {
10487
+ "via": "salesOrderID",
10488
+ "resource": "sales_orders",
10489
+ "field": "companyID"
10490
+ }
10491
+ }
10492
+ },
10493
+ "deleteBoundary": null,
10494
+ "markerField": null
10407
10495
  }
10408
10496
  };
10409
10497
  var BLIND_SURFACE_STAMPS = {
@@ -13957,6 +14045,52 @@ var CREATE_GUIDANCE = {
13957
14045
  "note": "the vendor defines no DELETE for roles (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."
13958
14046
  }
13959
14047
  },
14048
+ {
14049
+ "resource": "sales_order_attachments",
14050
+ "createOp": "sales_order_attachments.create",
14051
+ "parentScoped": true,
14052
+ "liveProvenPrefix": [],
14053
+ "unproven": true,
14054
+ "blocker": {
14055
+ "kind": "unknown",
14056
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
14057
+ "remedy": "Read the current field and picklist metadata, supply the named parent id, and preview the attachment before applying.",
14058
+ "requires": {
14059
+ "allOf": [
14060
+ "attachmentType",
14061
+ "fullPath",
14062
+ "title",
14063
+ "publish",
14064
+ "data"
14065
+ ]
14066
+ }
14067
+ },
14068
+ "vendorEvidence": [
14069
+ "https://www.autotask.net/help/developerhelp/Content/APIs/REST/Entities/SalesOrderAttachmentsEntity.htm",
14070
+ "https://www.autotask.net/help/developerhelp/content/apis/REST/API_Calls/REST_Attachments.htm",
14071
+ "Official SalesOrderAttachments entity documentation and vendored controllers define scoped SalesOrders attachment routes. Sales orders cannot have nested attachments, and the documented contact-author exception does not include sales orders. The help URL table repeats parent SalesOrders actions; attachment routing follows the vendored attachment controllers. No update, UDF metadata or data-download endpoint is implemented. Static contract only; no live create."
14072
+ ],
14073
+ "deleteBoundary": {
14074
+ "available": true,
14075
+ "note": null
14076
+ },
14077
+ "requiresByValue": [
14078
+ {
14079
+ "field": "attachmentType",
14080
+ "value": "FILE_ATTACHMENT",
14081
+ "requires": {
14082
+ "allOf": [
14083
+ "data"
14084
+ ]
14085
+ }
14086
+ }
14087
+ ],
14088
+ "parentCompany": {
14089
+ "via": "salesOrderID",
14090
+ "resource": "sales_orders",
14091
+ "field": "companyID"
14092
+ }
14093
+ },
13960
14094
  {
13961
14095
  "resource": "service_call_task_resources",
13962
14096
  "createOp": "service_call_task_resources.create",
@@ -14834,7 +14968,7 @@ var CREATE_GUIDANCE = {
14834
14968
  }
14835
14969
  ],
14836
14970
  "counts": {
14837
- "total": 111,
14971
+ "total": 112,
14838
14972
  "byKind": {
14839
14973
  "ok": 41,
14840
14974
  "blind-reference": 16,
@@ -14844,7 +14978,7 @@ var CREATE_GUIDANCE = {
14844
14978
  "resource-role-pair": 2,
14845
14979
  "delete-absent": 0,
14846
14980
  "non-mutable": 0,
14847
- "unknown": 35
14981
+ "unknown": 36
14848
14982
  }
14849
14983
  }
14850
14984
  };
@@ -15595,6 +15729,9 @@ var UNTRUSTED_FIELDS_BY_RESOURCE = {
15595
15729
  ],
15596
15730
  "contract_note_attachments": [
15597
15731
  "title"
15732
+ ],
15733
+ "sales_order_attachments": [
15734
+ "title"
15598
15735
  ]
15599
15736
  };
15600
15737
 
@@ -18678,6 +18815,7 @@ var MODEL_FIELD_SETS = {
18678
18815
  "resource_time_off_balances": ["id", "resourceID", "floatingHolidayAnnualAllowance", "floatingHolidayBalance", "floatingHolidayPlanned", "floatingHolidayUsed", "floatingHolidayWaitingApproval", "personalTimeAnnualAllowance", "personalTimeBalance", "personalTimePlanned", "personalTimeUsed", "personalTimeWaitingApproval", "sickTimeAnnualAllowance", "sickTimeBalance", "sickTimePlanned", "sickTimeUsed", "sickTimeWaitingApproval", "vacationTimeAnnualAllowance", "vacationTimeBalance", "vacationTimePlanned", "vacationTimeUsed", "vacationTimeWaitingApproval", "year", "soapParentPropertyId"],
18679
18816
  "resources": ["id", "accountingReferenceID", "dateFormat", "defaultServiceDeskRoleID", "email", "email2", "email3", "emailTypeCode", "emailTypeCode2", "emailTypeCode3", "firstName", "gender", "greeting", "hireDate", "homePhone", "initials", "internalCost", "isActive", "lastName", "licenseType", "locationID", "middleName", "mobilePhone", "numberFormat", "officeExtension", "officePhone", "payrollIdentifier", "payrollType", "resourceType", "suffix", "surveyResourceRating", "timeFormat", "title", "travelAvailabilityPct", "userName", "userType"],
18680
18817
  "roles": ["id", "description", "hourlyFactor", "hourlyRate", "isActive", "isExcludedFromNewContracts", "isSystemRole", "name", "quoteItemDefaultTaxCategoryId", "roleType"],
18818
+ "sales_order_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "publish", "salesOrderID", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
18681
18819
  "sales_orders": ["id", "additionalBillToAddressInformation", "additionalShipToAddressInformation", "billingAddress1", "billingAddress2", "billToCity", "billToCountryID", "billToPostalCode", "billToState", "companyID", "contactID", "impersonatorCreatorResourceID", "opportunityID", "organizationalLevelAssociationID", "ownerResourceID", "promisedFulfillmentDate", "salesOrderDate", "shipToAddress1", "shipToAddress2", "shipToCity", "shipToCountryID", "shipToPostalCode", "shipToState", "status", "title", "soapParentPropertyId", "userDefinedFields"],
18682
18820
  "service_call_task_resources": ["id", "resourceID", "serviceCallTaskID", "soapParentPropertyId"],
18683
18821
  "service_call_tasks": ["id", "serviceCallID", "taskID", "soapParentPropertyId"],
@@ -18772,6 +18910,7 @@ var MODEL_DATE_FIELDS = {
18772
18910
  "quote_templates": ["createDate", "lastActivityDate"],
18773
18911
  "quotes": ["approvalStatusChangedDate", "createDate", "effectiveDate", "expirationDate", "extApprovalResponseDate", "lastActivityDate", "lastPublishedDateTime"],
18774
18912
  "resources": ["hireDate"],
18913
+ "sales_order_attachments": ["attachDate"],
18775
18914
  "sales_orders": ["promisedFulfillmentDate", "salesOrderDate"],
18776
18915
  "service_calls": ["canceledDateTime", "createDateTime", "endDateTime", "lastModifiedDateTime", "startDateTime"],
18777
18916
  "services": ["createDate", "lastModifiedDate"],
@@ -21142,6 +21281,7 @@ var SCOPED_ATTACHMENT_PARENTS = {
21142
21281
  project_attachments: { field: "projectID", name: "project" },
21143
21282
  project_note_attachments: { field: "projectNoteID", name: "project note" },
21144
21283
  contract_note_attachments: { field: "contractNoteID", name: "contract note" },
21284
+ sales_order_attachments: { field: "salesOrderID", name: "sales order" },
21145
21285
  task_attachments: { field: "taskID", name: "task" },
21146
21286
  task_note_attachments: { field: "taskNoteID", name: "task note" },
21147
21287
  configuration_item_attachments: { field: "configurationItemID", name: "configuration item" },
@@ -21191,6 +21331,7 @@ function admitFileAttachment(resource, data, parentId) {
21191
21331
  const reference = {
21192
21332
  project_attachments: void 0,
21193
21333
  contract_note_attachments: void 0,
21334
+ sales_order_attachments: void 0,
21194
21335
  task_note_attachments: "attachedByContactID",
21195
21336
  project_note_attachments: "attachedByContactID",
21196
21337
  configuration_item_attachments: "parentAttachmentID",
@@ -22363,6 +22504,20 @@ var SIMPLE_RESOURCES = [
22363
22504
  helpers: { search: true, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
22364
22505
  opForms: { get: "global", create: "global", update: "global" }
22365
22506
  },
22507
+ {
22508
+ key: "sales_order_attachments",
22509
+ accessor: "salesOrderAttachments",
22510
+ resourcePath: "/V1.0/SalesOrderAttachments",
22511
+ parentScopedPath: "/V1.0/SalesOrders/{parentId}/Attachments",
22512
+ parentPath: "/V1.0/SalesOrders",
22513
+ parentField: "salesOrderID",
22514
+ deletable: true,
22515
+ udfCapable: false,
22516
+ attachmentGet: true,
22517
+ ops: { query: true, queryAll: false, count: true, get: true, create: true, update: false, delete: true, getEntityInfo: true, getFieldInfo: true, getUdfInfo: false, download: false },
22518
+ helpers: { search: false, resolve: false, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
22519
+ opForms: { get: "scoped", create: "scoped", delete: "scoped" }
22520
+ },
22366
22521
  {
22367
22522
  key: "sales_orders",
22368
22523
  accessor: "salesOrders",
@@ -22853,7 +23008,7 @@ var SIMPLE_RESOURCES = [
22853
23008
  var GenericResource = class extends BaseResource {
22854
23009
  constructor(http, config, pageSize) {
22855
23010
  super(http, config, pageSize);
22856
- if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "contract_note_attachments", "project_attachments", "project_note_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
23011
+ if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "contract_note_attachments", "project_attachments", "project_note_attachments", "sales_order_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
22857
23012
  throw new OperationNotSupportedError(config.key, "getUdfInfo");
22858
23013
  };
22859
23014
  if (config.ops?.create === false || isScopedAttachmentResource(config.key) || ["company_attachments", "task_predecessors"].includes(config.key)) this.createIfNotExists = async () => {