node-autotask 0.62.0 → 0.63.1
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 +23 -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-S4YR3RLJ.js → chunk-BXTAL6LB.js} +2 -2
- package/dist/{chunk-ODPM4YVG.cjs → chunk-CY6T5SPE.cjs} +3 -3
- package/dist/{chunk-TGCFJCWN.js → chunk-EUD4CCRR.js} +12 -4
- package/dist/{chunk-QHM6ROAE.cjs → chunk-GH6WHIHE.cjs} +174 -174
- package/dist/{chunk-VDYUG6RK.cjs → chunk-J5O3FBYV.cjs} +17 -9
- package/dist/{chunk-LFEMZVOV.cjs → chunk-ONN546JT.cjs} +31 -31
- package/dist/{chunk-O6SYTORL.js → chunk-URM33IGW.js} +2 -2
- package/dist/{chunk-XJNNCMBS.js → chunk-X46S4BDG.js} +3 -3
- 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/API.md +6 -1
- package/docs/N8N-ADAPTER.md +4 -4
- package/docs/VENDOR-QUIRKS.md +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -16794,7 +16794,9 @@ var QueryBase = class {
|
|
|
16794
16794
|
* reached with a live next cursor, or the 1000-page guard) →
|
|
16795
16795
|
* LATEST_WINDOW_INCOMPLETE — a truncated enumeration's top-N-by-id is
|
|
16796
16796
|
* unprovable, so the op refuses instead of returning a possibly-wrong
|
|
16797
|
-
* answer.
|
|
16797
|
+
* answer. Exception (issue #435): a COUNT-only `unfiltered-blind` pin
|
|
16798
|
+
* (no query pin) re-probes with the filtered `count(id gt 0)`, which is
|
|
16799
|
+
* not blind, and takes branch 2 with that total.
|
|
16798
16800
|
* `includeFields` always carries `id` (the P1 id-append,
|
|
16799
16801
|
* `buildQueryRequest`), which `latest` sorts on. Pure read; no mutation
|
|
16800
16802
|
* paths involved; every count probe goes to the wire (counts are never
|
|
@@ -16803,7 +16805,14 @@ var QueryBase = class {
|
|
|
16803
16805
|
*/
|
|
16804
16806
|
async latestWalk(params, limit, latest) {
|
|
16805
16807
|
const baseConds = normalizedConditions(params.filter) ?? [];
|
|
16806
|
-
|
|
16808
|
+
let total = await this.countGlobal({ filter: params.filter });
|
|
16809
|
+
let probes = 1;
|
|
16810
|
+
const stamps = BLIND_SURFACE_STAMPS[this.config.key];
|
|
16811
|
+
if (typeof total === "object" && total !== null && total.blindSurface !== void 0 && stamps?.count?.kind === "unfiltered-blind" && stamps.query === void 0) {
|
|
16812
|
+
total = await this.countAboveId(baseConds, 0n);
|
|
16813
|
+
probes = 2;
|
|
16814
|
+
if (total === 0) return this.latestBlindWalk(params, limit, latest);
|
|
16815
|
+
}
|
|
16807
16816
|
if (typeof total === "object" && total !== null) {
|
|
16808
16817
|
const rec = total;
|
|
16809
16818
|
if (rec.blindSurface !== void 0) {
|
|
@@ -16825,7 +16834,6 @@ var QueryBase = class {
|
|
|
16825
16834
|
}
|
|
16826
16835
|
return this.finishLatest(items2, latest, pages3);
|
|
16827
16836
|
}
|
|
16828
|
-
let probes = 1;
|
|
16829
16837
|
const spend = () => {
|
|
16830
16838
|
probes += 1;
|
|
16831
16839
|
if (probes > LATEST_MAX_COUNT_PROBES) throw this.latestThresholdUnresolvedError();
|
|
@@ -21582,7 +21590,7 @@ function dateBucketLabel(value, bucket) {
|
|
|
21582
21590
|
var queryResourceKeysPromise = null;
|
|
21583
21591
|
function queryResourceKeys() {
|
|
21584
21592
|
if (queryResourceKeysPromise === null) {
|
|
21585
|
-
queryResourceKeysPromise =
|
|
21593
|
+
queryResourceKeysPromise = chunkCY6T5SPE_cjs.loadCapabilityRecords().then((records) => {
|
|
21586
21594
|
const s = /* @__PURE__ */ new Set();
|
|
21587
21595
|
for (const rec of records) if (rec.operation === "query") s.add(rec.resource);
|
|
21588
21596
|
return s;
|
|
@@ -21704,7 +21712,7 @@ function parseTopAndLimit(opts, problems) {
|
|
|
21704
21712
|
return { top, limit };
|
|
21705
21713
|
}
|
|
21706
21714
|
async function checkFieldNames(resourceKey, conditions, opts, problems) {
|
|
21707
|
-
const records = resourceKey === void 0 ? [] : await
|
|
21715
|
+
const records = resourceKey === void 0 ? [] : await chunkCY6T5SPE_cjs.loadCapabilityRecords();
|
|
21708
21716
|
const record = resourceKey === void 0 ? void 0 : records.find((r) => r.resource === resourceKey && r.operation === "query");
|
|
21709
21717
|
if (record === void 0) return void 0;
|
|
21710
21718
|
const strings = (v) => Array.isArray(v) ? v.filter((f) => typeof f === "string" && f.trim() !== "") : [];
|
|
@@ -22344,7 +22352,7 @@ async function uiLink(client, input) {
|
|
|
22344
22352
|
var indexPromise = null;
|
|
22345
22353
|
function operationIndex() {
|
|
22346
22354
|
if (indexPromise === null) {
|
|
22347
|
-
indexPromise =
|
|
22355
|
+
indexPromise = chunkCY6T5SPE_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
|
|
22348
22356
|
}
|
|
22349
22357
|
return indexPromise;
|
|
22350
22358
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkGH6WHIHE_cjs = require('./chunk-GH6WHIHE.cjs');
|
|
4
|
+
var chunkJ5O3FBYV_cjs = require('./chunk-J5O3FBYV.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 = chunkJ5O3FBYV_cjs.resolveConfig(options);
|
|
158
|
+
this.http = new chunkJ5O3FBYV_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 chunkJ5O3FBYV_cjs.SIMPLE_RESOURCES) {
|
|
161
|
+
this[entry.accessor] = new chunkJ5O3FBYV_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 chunkJ5O3FBYV_cjs.CompaniesResource(this.http, this.config.pageSize);
|
|
164
|
+
this.configurationItems = new chunkGH6WHIHE_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
|
|
165
|
+
this.contacts = new chunkGH6WHIHE_cjs.ContactsResource(this.http, this.config.pageSize);
|
|
166
|
+
this.contracts = new chunkJ5O3FBYV_cjs.ContractsResource(this.http, this.config.pageSize);
|
|
167
|
+
this.inventoryProducts = new chunkGH6WHIHE_cjs.InventoryProductsResource(this.http, this.config.pageSize);
|
|
168
|
+
this.invoices = new chunkJ5O3FBYV_cjs.InvoicesResource(this.http, this.config.pageSize);
|
|
169
|
+
this.quotes = new chunkGH6WHIHE_cjs.QuotesResource(this.http, this.config.pageSize);
|
|
170
|
+
this.resourceTimeOffAdditional = new chunkGH6WHIHE_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
|
|
171
|
+
this.resourceTimeOffBalances = new chunkGH6WHIHE_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
|
|
172
|
+
this.resources = new chunkGH6WHIHE_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
|
|
173
|
+
this.serviceCalls = new chunkGH6WHIHE_cjs.ServiceCallsResource(this.http, this.config.pageSize);
|
|
174
|
+
this.ticketCharges = new chunkGH6WHIHE_cjs.TicketChargesResource(this.http, this.config.pageSize);
|
|
175
|
+
this.tickets = new chunkGH6WHIHE_cjs.TicketsResource(this.http, this.config.pageSize);
|
|
176
|
+
this.timeEntries = new chunkJ5O3FBYV_cjs.TimeEntriesResource(this.http, this.config.pageSize);
|
|
177
|
+
this.timeOffRequests = new chunkGH6WHIHE_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
|
|
178
|
+
this.authenticateResource = new chunkGH6WHIHE_cjs.AuthenticateResource(this.http);
|
|
179
|
+
this.entityInformation = new chunkGH6WHIHE_cjs.EntityInformationResource(this.http);
|
|
180
|
+
this.modules = new chunkGH6WHIHE_cjs.ModulesResource(this.http);
|
|
181
|
+
this.thresholdInformation = new chunkGH6WHIHE_cjs.ThresholdInformationResource(this.http);
|
|
182
|
+
this.version = new chunkGH6WHIHE_cjs.VersionResource(this.http);
|
|
183
|
+
this.versionInformation = new chunkGH6WHIHE_cjs.VersionInformationResource(this.http);
|
|
184
|
+
this.zoneInformation = new chunkGH6WHIHE_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 chunkJ5O3FBYV_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 chunkJ5O3FBYV_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) : chunkJ5O3FBYV_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 };
|
|
@@ -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-BXTAL6LB.js';
|
|
2
|
+
import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, AutotaskConfigError } from './chunk-EUD4CCRR.js';
|
|
3
3
|
|
|
4
4
|
// src/client.ts
|
|
5
5
|
var AutotaskClient = class {
|
|
@@ -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() {
|
|
@@ -32,7 +32,7 @@ import { L as Logger } from './logger-B1gYmFre.js';
|
|
|
32
32
|
* queryBounded noteChars free-text cap (issue #61 — response-side only);
|
|
33
33
|
* - docs/VENDOR-QUIRKS.md §11.7/§11.8/§11.9/§11.10/§11.11/§11.12 render the same facts.
|
|
34
34
|
*
|
|
35
|
-
* planHash:
|
|
35
|
+
* planHash: e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
/** One pinned blind-surface stamp (the result-time sentinel object). */
|
|
@@ -32,7 +32,7 @@ import { L as Logger } from './logger-B1gYmFre.cjs';
|
|
|
32
32
|
* queryBounded noteChars free-text cap (issue #61 — response-side only);
|
|
33
33
|
* - docs/VENDOR-QUIRKS.md §11.7/§11.8/§11.9/§11.10/§11.11/§11.12 render the same facts.
|
|
34
34
|
*
|
|
35
|
-
* planHash:
|
|
35
|
+
* planHash: e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
/** One pinned blind-surface stamp (the result-time sentinel object). */
|