node-autotask 0.62.0 → 0.63.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 +9 -0
- package/MCP_TOOL_CATALOG.json +2 -2
- package/capabilities.json +199 -199
- package/dist/capabilities-data.js +198 -198
- package/dist/capabilities.cjs +4 -4
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-LFEMZVOV.cjs → chunk-6WR7JMNK.cjs} +31 -31
- package/dist/{chunk-ODPM4YVG.cjs → chunk-CY6T5SPE.cjs} +3 -3
- package/dist/{chunk-O6SYTORL.js → chunk-ISCT6TLA.js} +2 -2
- package/dist/{chunk-TGCFJCWN.js → chunk-LCZJ3STD.js} +1 -1
- package/dist/{chunk-VDYUG6RK.cjs → chunk-TRRB42W4.cjs} +6 -6
- package/dist/{chunk-S4YR3RLJ.js → chunk-WL7VSHPI.js} +2 -2
- package/dist/{chunk-XJNNCMBS.js → chunk-X46S4BDG.js} +3 -3
- package/dist/{chunk-QHM6ROAE.cjs → chunk-XCNB4D6C.cjs} +174 -174
- package/dist/{index-C4wZRw9N.d.ts → index-Bu5JV7l_.d.ts} +1 -1
- package/dist/{index-BXJOPL7w.d.cts → index-DlES80qS.d.cts} +1 -1
- package/dist/index.cjs +84 -84
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/operations/index.cjs +50 -50
- package/dist/operations/index.d.cts +2 -2
- package/dist/operations/index.d.ts +2 -2
- package/dist/operations/index.js +2 -2
- package/dist/pool.cjs +8 -8
- package/dist/pool.js +4 -4
- package/dist/resources/index.cjs +27 -27
- package/dist/resources/index.d.cts +1 -1
- package/dist/resources/index.d.ts +1 -1
- package/dist/resources/index.js +3 -3
- package/docs/N8N-ADAPTER.md +4 -4
- package/package.json +1 -1
package/dist/capabilities.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCY6T5SPE_cjs = require('./chunk-CY6T5SPE.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "CAPABILITY_PLAN_HASHES", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkCY6T5SPE_cjs.CAPABILITY_PLAN_HASHES; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "loadCapabilities", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkCY6T5SPE_cjs.loadCapabilities; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "loadCapabilityRecords", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkCY6T5SPE_cjs.loadCapabilityRecords; }
|
|
18
18
|
});
|
package/dist/capabilities.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-
|
|
1
|
+
export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-X46S4BDG.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkXCNB4D6C_cjs = require('./chunk-XCNB4D6C.cjs');
|
|
4
|
+
var chunkTRRB42W4_cjs = require('./chunk-TRRB42W4.cjs');
|
|
5
5
|
|
|
6
6
|
// src/client.ts
|
|
7
7
|
var AutotaskClient = class {
|
|
@@ -154,34 +154,34 @@ var AutotaskClient = class {
|
|
|
154
154
|
* anything is wired. Construction issues NO request.
|
|
155
155
|
*/
|
|
156
156
|
constructor(options) {
|
|
157
|
-
this.config =
|
|
158
|
-
this.http = new
|
|
157
|
+
this.config = chunkTRRB42W4_cjs.resolveConfig(options);
|
|
158
|
+
this.http = new chunkTRRB42W4_cjs.HttpClient(this.config);
|
|
159
159
|
this.http.client = this;
|
|
160
|
-
for (const entry of
|
|
161
|
-
this[entry.accessor] = new
|
|
160
|
+
for (const entry of chunkTRRB42W4_cjs.SIMPLE_RESOURCES) {
|
|
161
|
+
this[entry.accessor] = new chunkTRRB42W4_cjs.GenericResource(this.http, entry, this.config.pageSize);
|
|
162
162
|
}
|
|
163
|
-
this.companies = new
|
|
164
|
-
this.configurationItems = new
|
|
165
|
-
this.contacts = new
|
|
166
|
-
this.contracts = new
|
|
167
|
-
this.inventoryProducts = new
|
|
168
|
-
this.invoices = new
|
|
169
|
-
this.quotes = new
|
|
170
|
-
this.resourceTimeOffAdditional = new
|
|
171
|
-
this.resourceTimeOffBalances = new
|
|
172
|
-
this.resources = new
|
|
173
|
-
this.serviceCalls = new
|
|
174
|
-
this.ticketCharges = new
|
|
175
|
-
this.tickets = new
|
|
176
|
-
this.timeEntries = new
|
|
177
|
-
this.timeOffRequests = new
|
|
178
|
-
this.authenticateResource = new
|
|
179
|
-
this.entityInformation = new
|
|
180
|
-
this.modules = new
|
|
181
|
-
this.thresholdInformation = new
|
|
182
|
-
this.version = new
|
|
183
|
-
this.versionInformation = new
|
|
184
|
-
this.zoneInformation = new
|
|
163
|
+
this.companies = new chunkTRRB42W4_cjs.CompaniesResource(this.http, this.config.pageSize);
|
|
164
|
+
this.configurationItems = new chunkXCNB4D6C_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
|
|
165
|
+
this.contacts = new chunkXCNB4D6C_cjs.ContactsResource(this.http, this.config.pageSize);
|
|
166
|
+
this.contracts = new chunkTRRB42W4_cjs.ContractsResource(this.http, this.config.pageSize);
|
|
167
|
+
this.inventoryProducts = new chunkXCNB4D6C_cjs.InventoryProductsResource(this.http, this.config.pageSize);
|
|
168
|
+
this.invoices = new chunkTRRB42W4_cjs.InvoicesResource(this.http, this.config.pageSize);
|
|
169
|
+
this.quotes = new chunkXCNB4D6C_cjs.QuotesResource(this.http, this.config.pageSize);
|
|
170
|
+
this.resourceTimeOffAdditional = new chunkXCNB4D6C_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
|
|
171
|
+
this.resourceTimeOffBalances = new chunkXCNB4D6C_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
|
|
172
|
+
this.resources = new chunkXCNB4D6C_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
|
|
173
|
+
this.serviceCalls = new chunkXCNB4D6C_cjs.ServiceCallsResource(this.http, this.config.pageSize);
|
|
174
|
+
this.ticketCharges = new chunkXCNB4D6C_cjs.TicketChargesResource(this.http, this.config.pageSize);
|
|
175
|
+
this.tickets = new chunkXCNB4D6C_cjs.TicketsResource(this.http, this.config.pageSize);
|
|
176
|
+
this.timeEntries = new chunkTRRB42W4_cjs.TimeEntriesResource(this.http, this.config.pageSize);
|
|
177
|
+
this.timeOffRequests = new chunkXCNB4D6C_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
|
|
178
|
+
this.authenticateResource = new chunkXCNB4D6C_cjs.AuthenticateResource(this.http);
|
|
179
|
+
this.entityInformation = new chunkXCNB4D6C_cjs.EntityInformationResource(this.http);
|
|
180
|
+
this.modules = new chunkXCNB4D6C_cjs.ModulesResource(this.http);
|
|
181
|
+
this.thresholdInformation = new chunkXCNB4D6C_cjs.ThresholdInformationResource(this.http);
|
|
182
|
+
this.version = new chunkXCNB4D6C_cjs.VersionResource(this.http);
|
|
183
|
+
this.versionInformation = new chunkXCNB4D6C_cjs.VersionInformationResource(this.http);
|
|
184
|
+
this.zoneInformation = new chunkXCNB4D6C_cjs.ZoneInformationResource(this.http);
|
|
185
185
|
}
|
|
186
186
|
/**
|
|
187
187
|
* `GET /V1.0/Authenticate` → `AuthTokenResultModel` (as-is). The SDK does
|
|
@@ -215,12 +215,12 @@ var AutotaskClient = class {
|
|
|
215
215
|
* parameter on each: `await client.withSignal(signal, () => invoke(client, ...))`.
|
|
216
216
|
*/
|
|
217
217
|
withSignal(signal, fn) {
|
|
218
|
-
return
|
|
218
|
+
return chunkTRRB42W4_cjs.runWithSignal(signal, fn);
|
|
219
219
|
}
|
|
220
220
|
async batch(fn, items, opts = {}) {
|
|
221
221
|
const concurrency = opts.concurrency ?? this.config.maxConcurrent;
|
|
222
222
|
if (!Number.isInteger(concurrency) || concurrency <= 0) {
|
|
223
|
-
throw new
|
|
223
|
+
throw new chunkTRRB42W4_cjs.AutotaskConfigError("batch concurrency must be a positive integer");
|
|
224
224
|
}
|
|
225
225
|
const { signal, settle } = opts;
|
|
226
226
|
const results = new Array(items.length);
|
|
@@ -235,7 +235,7 @@ var AutotaskClient = class {
|
|
|
235
235
|
const i = next++;
|
|
236
236
|
try {
|
|
237
237
|
const item = items[i];
|
|
238
|
-
const value = await (signal === void 0 ? fn(item) :
|
|
238
|
+
const value = await (signal === void 0 ? fn(item) : chunkTRRB42W4_cjs.runWithSignal(signal, () => fn(item)));
|
|
239
239
|
results[i] = settle ? { status: "fulfilled", value } : value;
|
|
240
240
|
} catch (error) {
|
|
241
241
|
if (settle) results[i] = { status: "rejected", reason: error };
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
// src/capabilities.ts
|
|
4
4
|
var CAPABILITY_PLAN_HASHES = {
|
|
5
|
-
"B": "
|
|
6
|
-
"A": "
|
|
7
|
-
"operations": "
|
|
5
|
+
"B": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c",
|
|
6
|
+
"A": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c",
|
|
7
|
+
"operations": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c"
|
|
8
8
|
};
|
|
9
9
|
var cached = null;
|
|
10
10
|
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, AutotaskConfigError } from './chunk-
|
|
1
|
+
import { ConfigurationItemsResource, ContactsResource, InventoryProductsResource, QuotesResource, ResourceTimeOffAdditionalResource, ResourceTimeOffBalancesResource, ResourcesResource, ServiceCallsResource, TicketChargesResource, TicketsResource, TimeOffRequestsResource, AuthenticateResource, EntityInformationResource, ModulesResource, ThresholdInformationResource, VersionResource, VersionInformationResource, ZoneInformationResource } from './chunk-WL7VSHPI.js';
|
|
2
|
+
import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, AutotaskConfigError } from './chunk-LCZJ3STD.js';
|
|
3
3
|
|
|
4
4
|
// src/client.ts
|
|
5
5
|
var AutotaskClient = class {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadCapabilityRecords } from './chunk-
|
|
1
|
+
import { loadCapabilityRecords } from './chunk-X46S4BDG.js';
|
|
2
2
|
import { NoopLogger, REDACTED, deepMarkUntrusted, wrapUntrusted } from './chunk-7NKB4UXV.js';
|
|
3
3
|
import { randomUUID } from 'crypto';
|
|
4
4
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCY6T5SPE_cjs = require('./chunk-CY6T5SPE.cjs');
|
|
4
4
|
var chunkBD4AUGCJ_cjs = require('./chunk-BD4AUGCJ.cjs');
|
|
5
5
|
var crypto = require('crypto');
|
|
6
6
|
var async_hooks = require('async_hooks');
|
|
@@ -1422,7 +1422,7 @@ async function capabilitySets() {
|
|
|
1422
1422
|
const fieldOps = /* @__PURE__ */ new Map();
|
|
1423
1423
|
const udfCapable = /* @__PURE__ */ new Set();
|
|
1424
1424
|
const resources = /* @__PURE__ */ new Set();
|
|
1425
|
-
for (const rec of await
|
|
1425
|
+
for (const rec of await chunkCY6T5SPE_cjs.loadCapabilityRecords()) {
|
|
1426
1426
|
if (rec.resource === "operations") continue;
|
|
1427
1427
|
resources.add(rec.resource);
|
|
1428
1428
|
if (rec.operation === "getFieldInfo") fieldOps.set(rec.resource, rec);
|
|
@@ -1433,7 +1433,7 @@ async function capabilitySets() {
|
|
|
1433
1433
|
var derivedIndexPromise = null;
|
|
1434
1434
|
function derivedIndexLoad() {
|
|
1435
1435
|
if (derivedIndexPromise === null) {
|
|
1436
|
-
derivedIndexPromise =
|
|
1436
|
+
derivedIndexPromise = chunkCY6T5SPE_cjs.loadCapabilityRecords().then((records) => {
|
|
1437
1437
|
const index = /* @__PURE__ */ new Map();
|
|
1438
1438
|
for (const rec of records) {
|
|
1439
1439
|
const declared = rec.metadata?.derivedFields;
|
|
@@ -21582,7 +21582,7 @@ function dateBucketLabel(value, bucket) {
|
|
|
21582
21582
|
var queryResourceKeysPromise = null;
|
|
21583
21583
|
function queryResourceKeys() {
|
|
21584
21584
|
if (queryResourceKeysPromise === null) {
|
|
21585
|
-
queryResourceKeysPromise =
|
|
21585
|
+
queryResourceKeysPromise = chunkCY6T5SPE_cjs.loadCapabilityRecords().then((records) => {
|
|
21586
21586
|
const s = /* @__PURE__ */ new Set();
|
|
21587
21587
|
for (const rec of records) if (rec.operation === "query") s.add(rec.resource);
|
|
21588
21588
|
return s;
|
|
@@ -21704,7 +21704,7 @@ function parseTopAndLimit(opts, problems) {
|
|
|
21704
21704
|
return { top, limit };
|
|
21705
21705
|
}
|
|
21706
21706
|
async function checkFieldNames(resourceKey, conditions, opts, problems) {
|
|
21707
|
-
const records = resourceKey === void 0 ? [] : await
|
|
21707
|
+
const records = resourceKey === void 0 ? [] : await chunkCY6T5SPE_cjs.loadCapabilityRecords();
|
|
21708
21708
|
const record = resourceKey === void 0 ? void 0 : records.find((r) => r.resource === resourceKey && r.operation === "query");
|
|
21709
21709
|
if (record === void 0) return void 0;
|
|
21710
21710
|
const strings = (v) => Array.isArray(v) ? v.filter((f) => typeof f === "string" && f.trim() !== "") : [];
|
|
@@ -22344,7 +22344,7 @@ async function uiLink(client, input) {
|
|
|
22344
22344
|
var indexPromise = null;
|
|
22345
22345
|
function operationIndex() {
|
|
22346
22346
|
if (indexPromise === null) {
|
|
22347
|
-
indexPromise =
|
|
22347
|
+
indexPromise = chunkCY6T5SPE_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
|
|
22348
22348
|
}
|
|
22349
22349
|
return indexPromise;
|
|
22350
22350
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GenericResource, parseIdentifier, AutotaskConfigError, StaleObjectError, buildDryRunResult, RELATIONSHIP_MAP, createNamePlan, resolveCompositeNames, addNameSibling, NotFoundError, unwrapItems, ConflictError, clientOf, compositePartLimit, invokeRead, compositePart, openTicketsOfPart, unwrapOperation, unwrapItem, ResolutionError, numericIds, IN_FILTER_CAP, runMove, resolveTicketStatusSemantics, openStatusFilter, isClosedStatus, vendorId, isAutotaskError, resolveLineOfBusinessChain, uiLinkFor, refuse, queryRows, mergePartialBody, AutotaskError, TICKET_LABEL_FIELDS, addLabelSibling, parseVendorErrors, cursorToPath } from './chunk-
|
|
2
|
-
import { loadCapabilityRecords } from './chunk-
|
|
1
|
+
import { GenericResource, parseIdentifier, AutotaskConfigError, StaleObjectError, buildDryRunResult, RELATIONSHIP_MAP, createNamePlan, resolveCompositeNames, addNameSibling, NotFoundError, unwrapItems, ConflictError, clientOf, compositePartLimit, invokeRead, compositePart, openTicketsOfPart, unwrapOperation, unwrapItem, ResolutionError, numericIds, IN_FILTER_CAP, runMove, resolveTicketStatusSemantics, openStatusFilter, isClosedStatus, vendorId, isAutotaskError, resolveLineOfBusinessChain, uiLinkFor, refuse, queryRows, mergePartialBody, AutotaskError, TICKET_LABEL_FIELDS, addLabelSibling, parseVendorErrors, cursorToPath } from './chunk-LCZJ3STD.js';
|
|
2
|
+
import { loadCapabilityRecords } from './chunk-X46S4BDG.js';
|
|
3
3
|
|
|
4
4
|
// src/resources/special/configuration_items.ts
|
|
5
5
|
async function fetchRecord(http, path, label, readOpts) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/capabilities.ts
|
|
2
2
|
var CAPABILITY_PLAN_HASHES = {
|
|
3
|
-
"B": "
|
|
4
|
-
"A": "
|
|
5
|
-
"operations": "
|
|
3
|
+
"B": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c",
|
|
4
|
+
"A": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c",
|
|
5
|
+
"operations": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c"
|
|
6
6
|
};
|
|
7
7
|
var cached = null;
|
|
8
8
|
function loadCapabilities() {
|