node-autotask 0.80.0 → 0.81.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-R4MKUN4N.js → chunk-5MJZ554M.js} +3 -3
  9. package/dist/{chunk-Z5QCH7JA.cjs → chunk-6HMGV3MY.cjs} +31 -30
  10. package/dist/{chunk-JITS5NKE.js → chunk-ACF32I5D.js} +150 -5
  11. package/dist/{chunk-OVP7IH6K.cjs → chunk-KKUBJRO3.cjs} +199 -199
  12. package/dist/{chunk-GRJE3IUU.js → chunk-LCUUFTYD.js} +2 -2
  13. package/dist/{chunk-3VW75XKV.cjs → chunk-MR5TGVHR.cjs} +155 -10
  14. package/dist/{chunk-TMJX6NTZ.cjs → chunk-PLERXELA.cjs} +3 -3
  15. package/dist/{chunk-R6N7S6LC.js → chunk-X7G4W5DF.js} +3 -2
  16. package/dist/{index-CZaFISYn.d.cts → index-BxPqypDD.d.cts} +3 -2
  17. package/dist/{index-mFUX-x9D.d.ts → index-DswDMDNH.d.ts} +3 -2
  18. package/dist/{index-BBc96jwe.d.cts → index-lj8ocwxy.d.cts} +45 -1
  19. package/dist/{index-BBc96jwe.d.ts → index-lj8ocwxy.d.ts} +45 -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,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkOVP7IH6K_cjs = require('./chunk-OVP7IH6K.cjs');
4
- var chunk3VW75XKV_cjs = require('./chunk-3VW75XKV.cjs');
3
+ var chunkKKUBJRO3_cjs = require('./chunk-KKUBJRO3.cjs');
4
+ var chunkMR5TGVHR_cjs = require('./chunk-MR5TGVHR.cjs');
5
5
 
6
6
  // src/client.ts
7
7
  var AutotaskClient = class {
@@ -54,6 +54,7 @@ var AutotaskClient = class {
54
54
  contractExclusionSetExcludedWorkTypes;
55
55
  contractExclusionSets;
56
56
  contractMilestones;
57
+ contractNoteAttachments;
57
58
  contractNotes;
58
59
  contractRates;
59
60
  contractRetainers;
@@ -165,34 +166,34 @@ var AutotaskClient = class {
165
166
  * anything is wired. Construction issues NO request.
166
167
  */
167
168
  constructor(options) {
168
- this.config = chunk3VW75XKV_cjs.resolveConfig(options);
169
- this.http = new chunk3VW75XKV_cjs.HttpClient(this.config);
169
+ this.config = chunkMR5TGVHR_cjs.resolveConfig(options);
170
+ this.http = new chunkMR5TGVHR_cjs.HttpClient(this.config);
170
171
  this.http.client = this;
171
- for (const entry of chunk3VW75XKV_cjs.SIMPLE_RESOURCES) {
172
- this[entry.accessor] = new chunk3VW75XKV_cjs.GenericResource(this.http, entry, this.config.pageSize);
172
+ for (const entry of chunkMR5TGVHR_cjs.SIMPLE_RESOURCES) {
173
+ this[entry.accessor] = new chunkMR5TGVHR_cjs.GenericResource(this.http, entry, this.config.pageSize);
173
174
  }
174
- this.companies = new chunk3VW75XKV_cjs.CompaniesResource(this.http, this.config.pageSize);
175
- this.configurationItems = new chunkOVP7IH6K_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
176
- this.contacts = new chunkOVP7IH6K_cjs.ContactsResource(this.http, this.config.pageSize);
177
- this.contracts = new chunk3VW75XKV_cjs.ContractsResource(this.http, this.config.pageSize);
178
- this.inventoryProducts = new chunkOVP7IH6K_cjs.InventoryProductsResource(this.http, this.config.pageSize);
179
- this.invoices = new chunk3VW75XKV_cjs.InvoicesResource(this.http, this.config.pageSize);
180
- this.quotes = new chunkOVP7IH6K_cjs.QuotesResource(this.http, this.config.pageSize);
181
- this.resourceTimeOffAdditional = new chunkOVP7IH6K_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
182
- this.resourceTimeOffBalances = new chunkOVP7IH6K_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
183
- this.resources = new chunkOVP7IH6K_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
184
- this.serviceCalls = new chunkOVP7IH6K_cjs.ServiceCallsResource(this.http, this.config.pageSize);
185
- this.ticketCharges = new chunkOVP7IH6K_cjs.TicketChargesResource(this.http, this.config.pageSize);
186
- this.tickets = new chunkOVP7IH6K_cjs.TicketsResource(this.http, this.config.pageSize);
187
- this.timeEntries = new chunk3VW75XKV_cjs.TimeEntriesResource(this.http, this.config.pageSize);
188
- this.timeOffRequests = new chunkOVP7IH6K_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
189
- this.authenticateResource = new chunkOVP7IH6K_cjs.AuthenticateResource(this.http);
190
- this.entityInformation = new chunkOVP7IH6K_cjs.EntityInformationResource(this.http);
191
- this.modules = new chunkOVP7IH6K_cjs.ModulesResource(this.http);
192
- this.thresholdInformation = new chunkOVP7IH6K_cjs.ThresholdInformationResource(this.http);
193
- this.version = new chunkOVP7IH6K_cjs.VersionResource(this.http);
194
- this.versionInformation = new chunkOVP7IH6K_cjs.VersionInformationResource(this.http);
195
- this.zoneInformation = new chunkOVP7IH6K_cjs.ZoneInformationResource(this.http);
175
+ this.companies = new chunkMR5TGVHR_cjs.CompaniesResource(this.http, this.config.pageSize);
176
+ this.configurationItems = new chunkKKUBJRO3_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
177
+ this.contacts = new chunkKKUBJRO3_cjs.ContactsResource(this.http, this.config.pageSize);
178
+ this.contracts = new chunkMR5TGVHR_cjs.ContractsResource(this.http, this.config.pageSize);
179
+ this.inventoryProducts = new chunkKKUBJRO3_cjs.InventoryProductsResource(this.http, this.config.pageSize);
180
+ this.invoices = new chunkMR5TGVHR_cjs.InvoicesResource(this.http, this.config.pageSize);
181
+ this.quotes = new chunkKKUBJRO3_cjs.QuotesResource(this.http, this.config.pageSize);
182
+ this.resourceTimeOffAdditional = new chunkKKUBJRO3_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
183
+ this.resourceTimeOffBalances = new chunkKKUBJRO3_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
184
+ this.resources = new chunkKKUBJRO3_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
185
+ this.serviceCalls = new chunkKKUBJRO3_cjs.ServiceCallsResource(this.http, this.config.pageSize);
186
+ this.ticketCharges = new chunkKKUBJRO3_cjs.TicketChargesResource(this.http, this.config.pageSize);
187
+ this.tickets = new chunkKKUBJRO3_cjs.TicketsResource(this.http, this.config.pageSize);
188
+ this.timeEntries = new chunkMR5TGVHR_cjs.TimeEntriesResource(this.http, this.config.pageSize);
189
+ this.timeOffRequests = new chunkKKUBJRO3_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
190
+ this.authenticateResource = new chunkKKUBJRO3_cjs.AuthenticateResource(this.http);
191
+ this.entityInformation = new chunkKKUBJRO3_cjs.EntityInformationResource(this.http);
192
+ this.modules = new chunkKKUBJRO3_cjs.ModulesResource(this.http);
193
+ this.thresholdInformation = new chunkKKUBJRO3_cjs.ThresholdInformationResource(this.http);
194
+ this.version = new chunkKKUBJRO3_cjs.VersionResource(this.http);
195
+ this.versionInformation = new chunkKKUBJRO3_cjs.VersionInformationResource(this.http);
196
+ this.zoneInformation = new chunkKKUBJRO3_cjs.ZoneInformationResource(this.http);
196
197
  }
197
198
  /**
198
199
  * `GET /V1.0/Authenticate` → `AuthTokenResultModel` (as-is). The SDK does
@@ -226,10 +227,10 @@ var AutotaskClient = class {
226
227
  * parameter on each: `await client.withSignal(signal, () => invoke(client, ...))`.
227
228
  */
228
229
  withSignal(signal, fn) {
229
- return chunk3VW75XKV_cjs.runWithSignal(signal, fn);
230
+ return chunkMR5TGVHR_cjs.runWithSignal(signal, fn);
230
231
  }
231
232
  async batch(fn, items, opts = {}) {
232
- return chunk3VW75XKV_cjs.runBounded(fn, items, { ...opts, concurrency: opts.concurrency ?? this.config.maxConcurrent });
233
+ return chunkMR5TGVHR_cjs.runBounded(fn, items, { ...opts, concurrency: opts.concurrency ?? this.config.maxConcurrent });
233
234
  }
234
235
  };
235
236
 
@@ -1,4 +1,4 @@
1
- import { loadCapabilityRecords } from './chunk-R4MKUN4N.js';
1
+ import { loadCapabilityRecords } from './chunk-5MJZ554M.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';
@@ -4232,7 +4232,24 @@ var RELATIONSHIP_MAP = {
4232
4232
  "segment": "Notes",
4233
4233
  "field": "contractID"
4234
4234
  },
4235
- "children": [],
4235
+ "children": [
4236
+ {
4237
+ "resource": "contract_note_attachments",
4238
+ "apiEntity": "ContractNoteAttachment",
4239
+ "parentField": "contractNoteID",
4240
+ "parentSegment": "Attachments",
4241
+ "tier": "extended",
4242
+ "workflowResource": false,
4243
+ "specialOps": [],
4244
+ "searchCovers": null,
4245
+ "scopedOps": {
4246
+ "create": true,
4247
+ "query": true,
4248
+ "update": false,
4249
+ "delete": true
4250
+ }
4251
+ }
4252
+ ],
4236
4253
  "naturalKeys": {
4237
4254
  "hasSearch": false,
4238
4255
  "searchCovers": null,
@@ -10321,6 +10338,72 @@ var RELATIONSHIP_MAP = {
10321
10338
  },
10322
10339
  "deleteBoundary": null,
10323
10340
  "markerField": null
10341
+ },
10342
+ "contract_note_attachments": {
10343
+ "resource": "contract_note_attachments",
10344
+ "apiEntity": "ContractNoteAttachment",
10345
+ "kind": "entity",
10346
+ "path": "ContractNoteAttachments",
10347
+ "parentScoped": true,
10348
+ "tier": "extended",
10349
+ "workflowResource": false,
10350
+ "group": "A",
10351
+ "parent": {
10352
+ "resource": "contract_notes",
10353
+ "segment": "Attachments",
10354
+ "field": "contractNoteID"
10355
+ },
10356
+ "children": [],
10357
+ "naturalKeys": {
10358
+ "hasSearch": false,
10359
+ "searchCovers": null,
10360
+ "findBy": []
10361
+ },
10362
+ "blindSurfaces": null,
10363
+ "zoneFacts": {
10364
+ "createGuidance": {
10365
+ "createOp": "contract_note_attachments.create",
10366
+ "parentScoped": true,
10367
+ "liveProvenPrefix": [],
10368
+ "unproven": true,
10369
+ "blocker": {
10370
+ "kind": "unknown",
10371
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
10372
+ "remedy": "Read the current field and picklist metadata, supply the named parent id, and preview the attachment before applying.",
10373
+ "requires": {
10374
+ "allOf": [
10375
+ "attachmentType",
10376
+ "fullPath",
10377
+ "title",
10378
+ "publish",
10379
+ "data"
10380
+ ]
10381
+ }
10382
+ },
10383
+ "requiresByValue": [
10384
+ {
10385
+ "field": "attachmentType",
10386
+ "value": "FILE_ATTACHMENT",
10387
+ "requires": {
10388
+ "allOf": [
10389
+ "data"
10390
+ ]
10391
+ }
10392
+ }
10393
+ ],
10394
+ "vendorEvidence": [
10395
+ "https://www.autotask.net/help/developerhelp/Content/APIs/REST/Entities/ContractNoteAttachmentsEntity.htm",
10396
+ "https://www.autotask.net/help/developerhelp/content/apis/REST/API_Calls/REST_Attachments.htm",
10397
+ "Official ContractNoteAttachments entity documentation and vendored controllers define scoped ContractNotes attachment routes. Contract notes cannot have nested attachments, and the documented contact-author exception does not include contract notes. No update, UDF metadata or data-download endpoint is implemented. Static contract only; no live create."
10398
+ ],
10399
+ "deleteBoundary": {
10400
+ "available": true,
10401
+ "note": null
10402
+ }
10403
+ }
10404
+ },
10405
+ "deleteBoundary": null,
10406
+ "markerField": null
10324
10407
  }
10325
10408
  };
10326
10409
  var BLIND_SURFACE_STAMPS = {
@@ -12783,6 +12866,47 @@ var CREATE_GUIDANCE = {
12783
12866
  "field": "companyID"
12784
12867
  }
12785
12868
  },
12869
+ {
12870
+ "resource": "contract_note_attachments",
12871
+ "createOp": "contract_note_attachments.create",
12872
+ "parentScoped": true,
12873
+ "liveProvenPrefix": [],
12874
+ "unproven": true,
12875
+ "blocker": {
12876
+ "kind": "unknown",
12877
+ "message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
12878
+ "remedy": "Read the current field and picklist metadata, supply the named parent id, and preview the attachment before applying.",
12879
+ "requires": {
12880
+ "allOf": [
12881
+ "attachmentType",
12882
+ "fullPath",
12883
+ "title",
12884
+ "publish",
12885
+ "data"
12886
+ ]
12887
+ }
12888
+ },
12889
+ "vendorEvidence": [
12890
+ "https://www.autotask.net/help/developerhelp/Content/APIs/REST/Entities/ContractNoteAttachmentsEntity.htm",
12891
+ "https://www.autotask.net/help/developerhelp/content/apis/REST/API_Calls/REST_Attachments.htm",
12892
+ "Official ContractNoteAttachments entity documentation and vendored controllers define scoped ContractNotes attachment routes. Contract notes cannot have nested attachments, and the documented contact-author exception does not include contract notes. No update, UDF metadata or data-download endpoint is implemented. Static contract only; no live create."
12893
+ ],
12894
+ "deleteBoundary": {
12895
+ "available": true,
12896
+ "note": null
12897
+ },
12898
+ "requiresByValue": [
12899
+ {
12900
+ "field": "attachmentType",
12901
+ "value": "FILE_ATTACHMENT",
12902
+ "requires": {
12903
+ "allOf": [
12904
+ "data"
12905
+ ]
12906
+ }
12907
+ }
12908
+ ]
12909
+ },
12786
12910
  {
12787
12911
  "resource": "contract_notes",
12788
12912
  "createOp": "contract_notes.create",
@@ -14710,7 +14834,7 @@ var CREATE_GUIDANCE = {
14710
14834
  }
14711
14835
  ],
14712
14836
  "counts": {
14713
- "total": 110,
14837
+ "total": 111,
14714
14838
  "byKind": {
14715
14839
  "ok": 41,
14716
14840
  "blind-reference": 16,
@@ -14720,7 +14844,7 @@ var CREATE_GUIDANCE = {
14720
14844
  "resource-role-pair": 2,
14721
14845
  "delete-absent": 0,
14722
14846
  "non-mutable": 0,
14723
- "unknown": 34
14847
+ "unknown": 35
14724
14848
  }
14725
14849
  }
14726
14850
  };
@@ -15468,6 +15592,9 @@ var UNTRUSTED_FIELDS_BY_RESOURCE = {
15468
15592
  ],
15469
15593
  "project_note_attachments": [
15470
15594
  "title"
15595
+ ],
15596
+ "contract_note_attachments": [
15597
+ "title"
15471
15598
  ]
15472
15599
  };
15473
15600
 
@@ -18498,6 +18625,7 @@ var MODEL_FIELD_SETS = {
18498
18625
  "contract_exclusion_set_excluded_work_types": ["id", "contractExclusionSetID", "excludedWorkTypeID", "soapParentPropertyId"],
18499
18626
  "contract_exclusion_sets": ["id", "description", "isActive", "name"],
18500
18627
  "contract_milestones": ["id", "amount", "billingCodeID", "contractID", "createDate", "creatorResourceID", "dateDue", "description", "internalCurrencyAmount", "isInitialPayment", "organizationalLevelAssociationID", "status", "title", "soapParentPropertyId"],
18628
+ "contract_note_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "contractID", "contractNoteID", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
18501
18629
  "contract_notes": ["id", "contractID", "createDateTime", "creatorResourceID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "lastActivityDate", "title", "soapParentPropertyId"],
18502
18630
  "contract_rates": ["id", "contractHourlyRate", "contractID", "internalCurrencyContractHourlyRate", "roleID", "soapParentPropertyId"],
18503
18631
  "contract_retainers": ["id", "amount", "amountApproved", "contractID", "datePurchased", "endDate", "internalCurrencyAmount", "internalCurrencyAmountApproved", "invoiceNumber", "isPaid", "paymentID", "paymentNumber", "startDate", "status", "soapParentPropertyId"],
@@ -18614,6 +18742,7 @@ var MODEL_DATE_FIELDS = {
18614
18742
  "contract_blocks": ["datePurchased", "endDate", "startDate"],
18615
18743
  "contract_charges": ["createDate", "datePurchased", "statusLastModifiedDate"],
18616
18744
  "contract_milestones": ["createDate", "dateDue"],
18745
+ "contract_note_attachments": ["attachDate"],
18617
18746
  "contract_notes": ["createDateTime", "lastActivityDate"],
18618
18747
  "contract_retainers": ["datePurchased", "endDate", "startDate"],
18619
18748
  "contract_service_bundle_units": ["approveAndPostDate", "endDate", "startDate"],
@@ -21012,6 +21141,7 @@ var NON_QUERYABLE = /* @__PURE__ */ new Set(["creatortype", "data", "filesize"])
21012
21141
  var SCOPED_ATTACHMENT_PARENTS = {
21013
21142
  project_attachments: { field: "projectID", name: "project" },
21014
21143
  project_note_attachments: { field: "projectNoteID", name: "project note" },
21144
+ contract_note_attachments: { field: "contractNoteID", name: "contract note" },
21015
21145
  task_attachments: { field: "taskID", name: "task" },
21016
21146
  task_note_attachments: { field: "taskNoteID", name: "task note" },
21017
21147
  configuration_item_attachments: { field: "configurationItemID", name: "configuration item" },
@@ -21060,6 +21190,7 @@ function admitFileAttachment(resource, data, parentId) {
21060
21190
  const body = data;
21061
21191
  const reference = {
21062
21192
  project_attachments: void 0,
21193
+ contract_note_attachments: void 0,
21063
21194
  task_note_attachments: "attachedByContactID",
21064
21195
  project_note_attachments: "attachedByContactID",
21065
21196
  configuration_item_attachments: "parentAttachmentID",
@@ -21615,6 +21746,20 @@ var SIMPLE_RESOURCES = [
21615
21746
  helpers: { search: false, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
21616
21747
  opForms: { get: "scoped", create: "scoped", update: "scoped" }
21617
21748
  },
21749
+ {
21750
+ key: "contract_note_attachments",
21751
+ accessor: "contractNoteAttachments",
21752
+ resourcePath: "/V1.0/ContractNoteAttachments",
21753
+ parentScopedPath: "/V1.0/ContractNotes/{parentId}/Attachments",
21754
+ parentPath: "/V1.0/ContractNotes",
21755
+ parentField: "contractNoteID",
21756
+ deletable: true,
21757
+ udfCapable: false,
21758
+ attachmentGet: true,
21759
+ ops: { query: true, queryAll: false, count: true, get: true, create: true, update: false, delete: true, getEntityInfo: true, getFieldInfo: true, getUdfInfo: false, download: false },
21760
+ helpers: { search: false, resolve: false, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
21761
+ opForms: { get: "scoped", create: "scoped", delete: "scoped" }
21762
+ },
21618
21763
  {
21619
21764
  key: "contract_notes",
21620
21765
  accessor: "contractNotes",
@@ -22708,7 +22853,7 @@ var SIMPLE_RESOURCES = [
22708
22853
  var GenericResource = class extends BaseResource {
22709
22854
  constructor(http, config, pageSize) {
22710
22855
  super(http, config, pageSize);
22711
- if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "project_attachments", "project_note_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
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 () => {
22712
22857
  throw new OperationNotSupportedError(config.key, "getUdfInfo");
22713
22858
  };
22714
22859
  if (config.ops?.create === false || isScopedAttachmentResource(config.key) || ["company_attachments", "task_predecessors"].includes(config.key)) this.createIfNotExists = async () => {