node-autotask 0.73.0 → 0.74.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 +10 -0
- package/MCP_TOOL_CATALOG.json +175 -9
- package/README.md +1 -1
- package/capabilities.json +532 -7
- package/dist/capabilities-data.js +531 -6
- package/dist/capabilities.cjs +4 -4
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-CWSXFVF2.cjs → chunk-AMB54GOO.cjs} +244 -86
- package/dist/{chunk-VHNWLON6.cjs → chunk-ASL3BIW2.cjs} +3 -3
- package/dist/{chunk-CKIKNZEB.cjs → chunk-DSQJTGXK.cjs} +31 -30
- package/dist/{chunk-VHN5B7OQ.js → chunk-HJKY7LUL.js} +239 -81
- package/dist/{chunk-RFH4VBMX.js → chunk-IFE5FWS7.js} +9 -7
- package/dist/{chunk-PNMEXWYR.js → chunk-IWTTCBCS.js} +3 -3
- package/dist/{chunk-L4J5EDCU.js → chunk-PGSDJS52.js} +3 -2
- package/dist/{chunk-STUQU7AX.cjs → chunk-QZY5LAOG.cjs} +206 -204
- package/dist/{index-CGp16Cdm.d.cts → index-CH65Ftmy.d.cts} +30 -1
- package/dist/{index-CGp16Cdm.d.ts → index-CH65Ftmy.d.ts} +30 -1
- package/dist/{index-MUM-uBX1.d.cts → index-CkBDlaSS.d.cts} +4 -2
- package/dist/{index-Dv8d9p_J.d.ts → index-ColCzIyw.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 +3 -2
- package/package.json +1 -1
|
@@ -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-HJKY7LUL.js';
|
|
2
|
+
import { loadCapabilityRecords } from './chunk-IWTTCBCS.js';
|
|
3
3
|
|
|
4
4
|
// src/resources/special/configuration_items.ts
|
|
5
5
|
async function fetchRecord(http, path, label, readOpts) {
|
|
@@ -1863,19 +1863,21 @@ var TimeOffRequestsResource = class extends GenericResource {
|
|
|
1863
1863
|
const parentId = parseIdentifier(a, "parentId");
|
|
1864
1864
|
if (typeof parentId !== "number") throw this.writeError("create", "parentId cannot be represented safely in the numeric resourceID create body; this is an SDK create-body limit, not a vendor record-id maximum");
|
|
1865
1865
|
const data = this.writePayload(b, "create");
|
|
1866
|
+
const opts = { ...c };
|
|
1866
1867
|
if (data.resourceID !== void 0 && data.resourceID !== parentId) throw this.writeError("create", "resourceID must equal parentId");
|
|
1867
1868
|
const fields = await this.guardWriteStatus(data.status, "Submitted", "create");
|
|
1868
1869
|
this.guardChoice(fields, "timeOffRequestType", data.timeOffRequestType, "create");
|
|
1869
|
-
return super.create(parentId, { ...data, resourceID: parentId },
|
|
1870
|
+
return super.create(parentId, { ...data, resourceID: parentId }, opts);
|
|
1870
1871
|
}
|
|
1871
1872
|
async update(a, b, c, d = {}) {
|
|
1872
1873
|
if (typeof b !== "number" && typeof b !== "string") throw new OperationNotSupportedError("time_off_requests", "update");
|
|
1873
1874
|
const parentId = parseIdentifier(a, "parentId");
|
|
1874
1875
|
const id = parseIdentifier(b, "id");
|
|
1875
1876
|
const data = this.writePayload(c, "update");
|
|
1877
|
+
const opts = { ...d };
|
|
1876
1878
|
await this.guardWriteStatus(data.status, "Canceled", "update");
|
|
1877
|
-
if (
|
|
1878
|
-
const preview = await this.runUpdateDryRun(id, data,
|
|
1879
|
+
if (opts.dryRun === true) {
|
|
1880
|
+
const preview = await this.runUpdateDryRun(id, data, opts, parentId);
|
|
1879
1881
|
if (!preview.wouldApply) return preview;
|
|
1880
1882
|
return {
|
|
1881
1883
|
...preview,
|
|
@@ -1884,8 +1886,8 @@ var TimeOffRequestsResource = class extends GenericResource {
|
|
|
1884
1886
|
};
|
|
1885
1887
|
}
|
|
1886
1888
|
const current = await this.getScopedRaw(parentId, id, true);
|
|
1887
|
-
this.staleObjectCheck(current,
|
|
1888
|
-
return this.updateScopedRaw(parentId, id, data,
|
|
1889
|
+
this.staleObjectCheck(current, opts, "time_off_requests.update");
|
|
1890
|
+
return this.updateScopedRaw(parentId, id, data, opts);
|
|
1889
1891
|
}
|
|
1890
1892
|
async getScopedRaw(parentId, id, fresh = false) {
|
|
1891
1893
|
const current = await super.getScopedRaw(parentId, id, fresh);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/capabilities.ts
|
|
2
2
|
var CAPABILITY_PLAN_HASHES = {
|
|
3
|
-
"B": "
|
|
4
|
-
"A": "
|
|
5
|
-
"operations": "
|
|
3
|
+
"B": "cff16b0b9d022a81a1926ffacb0d01cf5a1e924805447744b62865a3cf9d3779",
|
|
4
|
+
"A": "cff16b0b9d022a81a1926ffacb0d01cf5a1e924805447744b62865a3cf9d3779",
|
|
5
|
+
"operations": "cff16b0b9d022a81a1926ffacb0d01cf5a1e924805447744b62865a3cf9d3779"
|
|
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-
|
|
2
|
-
import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, runBounded } from './chunk-
|
|
1
|
+
import { ConfigurationItemsResource, ContactsResource, InventoryProductsResource, QuotesResource, ResourceTimeOffAdditionalResource, ResourceTimeOffBalancesResource, ResourcesResource, ServiceCallsResource, TicketChargesResource, TicketsResource, TimeOffRequestsResource, AuthenticateResource, EntityInformationResource, ModulesResource, ThresholdInformationResource, VersionResource, VersionInformationResource, ZoneInformationResource } from './chunk-IFE5FWS7.js';
|
|
2
|
+
import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, runBounded } from './chunk-HJKY7LUL.js';
|
|
3
3
|
|
|
4
4
|
// src/client.ts
|
|
5
5
|
var AutotaskClient = class {
|
|
@@ -122,6 +122,7 @@ var AutotaskClient = class {
|
|
|
122
122
|
tagGroups;
|
|
123
123
|
tags;
|
|
124
124
|
taskNotes;
|
|
125
|
+
taskPredecessors;
|
|
125
126
|
tasks;
|
|
126
127
|
taskSecondaryResources;
|
|
127
128
|
taxRegions;
|