node-autotask 0.17.0 → 0.19.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/ARCHITECTURE.md +25 -12
- package/CHANGELOG.md +574 -0
- package/MCP_TOOL_CATALOG.json +2 -2
- package/MCP_TOOL_MANIFEST.md +5 -5
- package/N8N_MCP_MANIFEST.json +2 -2
- package/N8N_MCP_MANIFEST.md +3 -3
- package/README.md +8 -4
- package/capabilities.json +1574 -1574
- package/dist/capabilities.cjs +2 -2
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-UV2PECAL.js → chunk-4YKV7ORF.js} +2 -2
- package/dist/{chunk-NQVD2XLH.cjs → chunk-7RDR5DSI.cjs} +393 -393
- package/dist/{chunk-EGR2ZLYM.js → chunk-D5RAQ4DE.js} +2 -2
- package/dist/{chunk-5ZGXWS4E.cjs → chunk-JM52ZU7T.cjs} +1573 -1573
- package/dist/{chunk-HC6YWPIY.js → chunk-LB2X4X4B.js} +116 -24
- package/dist/{chunk-6SP6GJJR.js → chunk-NDK7WYWA.js} +1573 -1573
- package/dist/{chunk-4RJG73GY.cjs → chunk-QDYSHAU6.cjs} +177 -85
- package/dist/{chunk-DQIZUZWP.cjs → chunk-TIM75K3G.cjs} +135 -135
- package/dist/{index-BAFdPxjG.d.ts → index-DLugNSr7.d.ts} +59 -21
- package/dist/{index-CjC0oWZX.d.cts → index-aZ3tCh1h.d.cts} +59 -21
- package/dist/index.cjs +26 -22
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -4
- package/dist/operations/index.cjs +178 -105
- package/dist/operations/index.d.cts +12 -3
- package/dist/operations/index.d.ts +12 -3
- package/dist/operations/index.js +77 -4
- package/dist/pool.cjs +8 -8
- 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 +4 -4
- 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 +92 -26
- package/package.json +4 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJM52ZU7Tcjs = require('./chunk-JM52ZU7T.cjs');
|
|
4
4
|
|
|
5
5
|
// src/auth.ts
|
|
6
6
|
var AUTH_HEADERS = {
|
|
@@ -377,7 +377,8 @@ function parseVendorErrors(body) {
|
|
|
377
377
|
var DETERMINISTIC_VENDOR_500_PHRASES = [
|
|
378
378
|
/exceeds maximum length/i,
|
|
379
379
|
/Missing Required Field/i,
|
|
380
|
-
/Value does not exist for the required field/i
|
|
380
|
+
/Value does not exist for the required field/i,
|
|
381
|
+
/Unable to find .+ in the .+ Entity\./i
|
|
381
382
|
];
|
|
382
383
|
function isDeterministicVendor500(entries) {
|
|
383
384
|
if (entries === void 0) return false;
|
|
@@ -1535,6 +1536,7 @@ var DEFAULT_TIMEOUT_MS = 3e4;
|
|
|
1535
1536
|
var DEFAULT_MAX_RETRIES = 3;
|
|
1536
1537
|
var DEFAULT_MAINTENANCE_MAX_WAIT_MS = 36e5;
|
|
1537
1538
|
var DEFAULT_MAINTENANCE_POLL_MS = 3e4;
|
|
1539
|
+
var MAINTENANCE_WINDOW_MAX_MS = 4 * 36e5;
|
|
1538
1540
|
var DEFAULT_MAX_CONCURRENT = 10;
|
|
1539
1541
|
var DEFAULT_MAX_RESPONSE_BYTES = 64 * 1024 * 1024;
|
|
1540
1542
|
var DEFAULT_MAX_SCAN_RECORDS = 500;
|
|
@@ -14689,12 +14691,26 @@ function normalizeZoneBase(raw) {
|
|
|
14689
14691
|
if (url.protocol !== "http:" && url.protocol !== "https:") return void 0;
|
|
14690
14692
|
return `${url.origin}${url.pathname.replace(/\/+$/, "")}`;
|
|
14691
14693
|
}
|
|
14692
|
-
function
|
|
14693
|
-
const queryPath = `${resourcePath}/query`;
|
|
14694
|
+
function buildQueryBody(params) {
|
|
14694
14695
|
const conditions = normalizedConditions(params.filter);
|
|
14695
14696
|
const filter = conditions === void 0 ? void 0 : buildFilter(conditions);
|
|
14696
|
-
const includeFields = params
|
|
14697
|
+
const includeFields = effectiveIncludeFields(params);
|
|
14698
|
+
const body = {};
|
|
14699
|
+
if (params.maxRecords !== void 0) body.MaxRecords = params.maxRecords;
|
|
14700
|
+
if (includeFields !== void 0) body.IncludeFields = includeFields;
|
|
14701
|
+
body.filter = filter === void 0 ? [] : filter.filter;
|
|
14702
|
+
return body;
|
|
14703
|
+
}
|
|
14704
|
+
function effectiveIncludeFields(params) {
|
|
14705
|
+
if (params.includeFields === void 0) return void 0;
|
|
14706
|
+
return params.includeFields.includes("id") ? params.includeFields : [...params.includeFields, "id"];
|
|
14707
|
+
}
|
|
14708
|
+
function buildQueryRequest(baseUrl, resourcePath, params) {
|
|
14709
|
+
const queryPath = `${resourcePath}/query`;
|
|
14697
14710
|
if (params.via === "get") {
|
|
14711
|
+
const conditions = normalizedConditions(params.filter);
|
|
14712
|
+
const filter = conditions === void 0 ? void 0 : buildFilter(conditions);
|
|
14713
|
+
const includeFields = effectiveIncludeFields(params);
|
|
14698
14714
|
const search = {};
|
|
14699
14715
|
if (filter !== void 0) search.filter = filter.filter;
|
|
14700
14716
|
if (params.maxRecords !== void 0) search.maxRecords = params.maxRecords;
|
|
@@ -14712,11 +14728,7 @@ function buildQueryRequest(baseUrl, resourcePath, params) {
|
|
|
14712
14728
|
}
|
|
14713
14729
|
return req;
|
|
14714
14730
|
}
|
|
14715
|
-
|
|
14716
|
-
if (params.maxRecords !== void 0) body.MaxRecords = params.maxRecords;
|
|
14717
|
-
if (includeFields !== void 0) body.IncludeFields = includeFields;
|
|
14718
|
-
body.filter = filter === void 0 ? [] : filter.filter;
|
|
14719
|
-
return { method: "POST", path: queryPath, body, idempotent: true };
|
|
14731
|
+
return { method: "POST", path: queryPath, body: buildQueryBody(params), idempotent: true };
|
|
14720
14732
|
}
|
|
14721
14733
|
var ambientSignal = new (0, _async_hooks.AsyncLocalStorage)();
|
|
14722
14734
|
function runWithSignal(signal, fn) {
|
|
@@ -14768,9 +14780,21 @@ function backoffDelay(attempt) {
|
|
|
14768
14780
|
const exp = Math.min(BACKOFF_CAP_MS, BACKOFF_BASE_MS * 2 ** attempt);
|
|
14769
14781
|
return Math.floor(exp / 2 + Math.random() * (exp / 2));
|
|
14770
14782
|
}
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
return
|
|
14783
|
+
var MAINTENANCE_PROBE_BYTES = 256;
|
|
14784
|
+
function maintenanceProbe(text) {
|
|
14785
|
+
return Buffer.from(text, "utf8").subarray(0, MAINTENANCE_PROBE_BYTES).toString("utf8");
|
|
14786
|
+
}
|
|
14787
|
+
function looksLikeMaintenanceText(text) {
|
|
14788
|
+
return /maintenance|temporarily unavailable|service unavailable|outage|downtime|down for/i.test(
|
|
14789
|
+
maintenanceProbe(text)
|
|
14790
|
+
);
|
|
14791
|
+
}
|
|
14792
|
+
function isHtmlLike(contentType, body) {
|
|
14793
|
+
if (contentType !== null && /text\/html|application\/xhtml/i.test(contentType)) return true;
|
|
14794
|
+
return body.trimStart().startsWith("<");
|
|
14795
|
+
}
|
|
14796
|
+
function maintenanceExhaustedAction(maxWaitMs, waits) {
|
|
14797
|
+
return `The zone stayed in a maintenance window for ${Math.round(maxWaitMs / 6e4)} min \u2014 the SDK waited and retried ${waits} time(s) and gave up. Re-run after the window (the observed median is about 2 h; the ceiling is 4 h \u2014 MAINTENANCE_WINDOW_MAX_MS), or raise maintenanceMaxWaitMs.`;
|
|
14774
14798
|
}
|
|
14775
14799
|
function parseRetryAfter(value) {
|
|
14776
14800
|
if (value === null || value.length === 0) return void 0;
|
|
@@ -14788,7 +14812,7 @@ function isAbortLike(err) {
|
|
|
14788
14812
|
return typeof err === "object" && err !== null && "name" in err && err.name === "AbortError";
|
|
14789
14813
|
}
|
|
14790
14814
|
function isJsonMediaType(header) {
|
|
14791
|
-
const mediaType = _nullishCoalesce(_optionalChain([header, 'access',
|
|
14815
|
+
const mediaType = _nullishCoalesce(_optionalChain([header, 'access', _57 => _57.split, 'call', _58 => _58(";"), 'access', _59 => _59[0], 'optionalAccess', _60 => _60.trim, 'call', _61 => _61(), 'access', _62 => _62.toLowerCase, 'call', _63 => _63()]), () => ( ""));
|
|
14792
14816
|
return mediaType.startsWith("application/json") || mediaType.endsWith("+json");
|
|
14793
14817
|
}
|
|
14794
14818
|
function bodySnippet(text, redactPersonalData) {
|
|
@@ -14944,7 +14968,7 @@ var HttpClient = (_class6 = class {
|
|
|
14944
14968
|
this.maintenanceMaxWaitMs = config.maintenanceMaxWaitMs;
|
|
14945
14969
|
this.maintenancePollMs = config.maintenancePollMs;
|
|
14946
14970
|
this.maxResponseBytes = config.maxResponseBytes;
|
|
14947
|
-
this.perHour = _optionalChain([config, 'access',
|
|
14971
|
+
this.perHour = _optionalChain([config, 'access', _64 => _64.rateLimit, 'optionalAccess', _65 => _65.perHour]);
|
|
14948
14972
|
this.tenantKey = buildTenantKey(config.userName, config.baseUrl);
|
|
14949
14973
|
this.cooldownStore = config.cooldown.enabled ? _nullishCoalesce(config.cooldown.store, () => ( defaultCooldownStore())) : void 0;
|
|
14950
14974
|
this.cooldownMaxMs = config.cooldown.maxMs;
|
|
@@ -15005,7 +15029,7 @@ var HttpClient = (_class6 = class {
|
|
|
15005
15029
|
};
|
|
15006
15030
|
if (next.successes >= breaker.successesToClose) {
|
|
15007
15031
|
breaker.store.delete(key);
|
|
15008
|
-
_optionalChain([this, 'access',
|
|
15032
|
+
_optionalChain([this, 'access', _66 => _66.logger, 'access', _67 => _67.warn, 'optionalCall', _68 => _68(
|
|
15009
15033
|
`[autotask] circuit breaker CLOSED for ${key} (${next.successes} probe successes)`,
|
|
15010
15034
|
void 0
|
|
15011
15035
|
)]);
|
|
@@ -15035,7 +15059,7 @@ var HttpClient = (_class6 = class {
|
|
|
15035
15059
|
const failures = [...st.failures.filter((t) => t > now - breaker.failureWindowMs), now];
|
|
15036
15060
|
if (failures.length >= breaker.failureThreshold) {
|
|
15037
15061
|
breaker.store.set(key, { failures, openedAt: now, successes: 0, probes: 0 });
|
|
15038
|
-
_optionalChain([this, 'access',
|
|
15062
|
+
_optionalChain([this, 'access', _69 => _69.logger, 'access', _70 => _70.warn, 'optionalCall', _71 => _71(
|
|
15039
15063
|
`[autotask] circuit breaker OPEN for ${key} (${failures.length} counted failures in ${Math.round(breaker.failureWindowMs / 1e3)}s) \u2014 refusing locally for ${Math.round(breaker.openTimeoutMs / 1e3)}s`,
|
|
15040
15064
|
correlationId
|
|
15041
15065
|
)]);
|
|
@@ -15150,7 +15174,7 @@ var HttpClient = (_class6 = class {
|
|
|
15150
15174
|
return void 0;
|
|
15151
15175
|
}
|
|
15152
15176
|
if (res.status < 200 || res.status >= 300) {
|
|
15153
|
-
await _optionalChain([res, 'access',
|
|
15177
|
+
await _optionalChain([res, 'access', _72 => _72.body, 'optionalAccess', _73 => _73.cancel, 'call', _74 => _74(), 'access', _75 => _75.catch, 'call', _76 => _76(() => void 0)]);
|
|
15154
15178
|
return void 0;
|
|
15155
15179
|
}
|
|
15156
15180
|
let text;
|
|
@@ -15186,7 +15210,7 @@ var HttpClient = (_class6 = class {
|
|
|
15186
15210
|
this.liveBaseUrl = to;
|
|
15187
15211
|
this.tenantKey = buildTenantKey(this.auth.userName, to);
|
|
15188
15212
|
this.breakerKey = buildBreakerKey(to);
|
|
15189
|
-
_optionalChain([this, 'access',
|
|
15213
|
+
_optionalChain([this, 'access', _77 => _77.logger, 'access', _78 => _78.warn, 'optionalCall', _79 => _79(
|
|
15190
15214
|
`[autotask] zone re-point ${from} -> ${to} (a 401 on the stale zone base; the vendor's unauthenticated zone discovery named the tenant's current zone) \u2014 retrying the request once against the new base`,
|
|
15191
15215
|
void 0
|
|
15192
15216
|
)]);
|
|
@@ -15206,6 +15230,7 @@ var HttpClient = (_class6 = class {
|
|
|
15206
15230
|
const maintenancePollMs = _nullishCoalesce(opts.maintenancePollMs, () => ( this.maintenancePollMs));
|
|
15207
15231
|
let firstMaintenanceAt;
|
|
15208
15232
|
let maintenanceWaits = 0;
|
|
15233
|
+
let maintenanceBudgetSpent = false;
|
|
15209
15234
|
const started = Date.now();
|
|
15210
15235
|
let deadlineAt = started + timeoutMs;
|
|
15211
15236
|
const callerSignal = _nullishCoalesce(opts.signal, () => ( ambientSignal.getStore()));
|
|
@@ -15224,7 +15249,7 @@ var HttpClient = (_class6 = class {
|
|
|
15224
15249
|
const expectBody = _nullishCoalesce(opts.expectBody, () => ( method !== "DELETE"));
|
|
15225
15250
|
const ctx = { operation: opts.operation, url, correlationId };
|
|
15226
15251
|
let lastStatus;
|
|
15227
|
-
const interrupted = () => _optionalChain([callerSignal, 'optionalAccess',
|
|
15252
|
+
const interrupted = () => _optionalChain([callerSignal, 'optionalAccess', _80 => _80.aborted]) ? new AutotaskAbortError(`Request aborted: ${method} ${opts.path}`, { ...ctx, suggestedAction: "The caller aborted; re-issue the call if still needed." }) : new AutotaskTimeoutError(`Request timed out after ${timeoutMs}ms: ${method} ${opts.path}`, ctx);
|
|
15228
15253
|
const canWait = (delay) => delay <= MAX_RETRY_DELAY_MS && delay < deadlineAt - Date.now();
|
|
15229
15254
|
const pause = async (delay) => {
|
|
15230
15255
|
try {
|
|
@@ -15238,7 +15263,7 @@ var HttpClient = (_class6 = class {
|
|
|
15238
15263
|
if (deadline2 !== void 0) {
|
|
15239
15264
|
const remainingMs = deadline2 - Date.now();
|
|
15240
15265
|
if (remainingMs > 0) {
|
|
15241
|
-
if (_optionalChain([callerSignal, 'optionalAccess',
|
|
15266
|
+
if (_optionalChain([callerSignal, 'optionalAccess', _81 => _81.aborted])) throw interrupted();
|
|
15242
15267
|
const seconds = Math.ceil(remainingMs / 1e3);
|
|
15243
15268
|
const err = new RateLimitError(
|
|
15244
15269
|
`Tenant is in a rate-limit cooldown; the call was NOT sent. ${seconds}s remain \u2014 do not retry before then, and narrow the query (filter/includeFields) before retrying.`,
|
|
@@ -15269,7 +15294,7 @@ var HttpClient = (_class6 = class {
|
|
|
15269
15294
|
let breakerProbe = false;
|
|
15270
15295
|
let breakerProbeKey;
|
|
15271
15296
|
if (this.breaker !== void 0 && !opts.bypassCircuitBreaker) {
|
|
15272
|
-
if (_optionalChain([callerSignal, 'optionalAccess',
|
|
15297
|
+
if (_optionalChain([callerSignal, 'optionalAccess', _82 => _82.aborted])) throw interrupted();
|
|
15273
15298
|
const now = Date.now();
|
|
15274
15299
|
const st = this.breaker.store.get(this.breakerKey);
|
|
15275
15300
|
if (st !== void 0 && st.openedAt !== null) {
|
|
@@ -15327,7 +15352,7 @@ var HttpClient = (_class6 = class {
|
|
|
15327
15352
|
breakerProbeKey = this.breakerKey;
|
|
15328
15353
|
}
|
|
15329
15354
|
}
|
|
15330
|
-
_optionalChain([this, 'access',
|
|
15355
|
+
_optionalChain([this, 'access', _83 => _83.logger, 'access', _84 => _84.debug, 'optionalCall', _85 => _85(`[autotask] ${method} ${opts.path}`, correlationId)]);
|
|
15331
15356
|
try {
|
|
15332
15357
|
let attempt = 0;
|
|
15333
15358
|
let outcome = null;
|
|
@@ -15347,7 +15372,7 @@ var HttpClient = (_class6 = class {
|
|
|
15347
15372
|
if (signal.aborted || isAbortLike(err2)) throw interrupted();
|
|
15348
15373
|
const delay = backoffDelay(attempt);
|
|
15349
15374
|
if (attempt < maxRetries && retriable5xx && canWait(delay)) {
|
|
15350
|
-
_optionalChain([this, 'access',
|
|
15375
|
+
_optionalChain([this, 'access', _86 => _86.logger, 'access', _87 => _87.warn, 'optionalCall', _88 => _88(
|
|
15351
15376
|
`[autotask] network error on ${method} ${opts.path}; retrying in ${delay}ms (attempt ${attempt + 1}/${maxRetries})`,
|
|
15352
15377
|
correlationId
|
|
15353
15378
|
)]);
|
|
@@ -15365,7 +15390,7 @@ var HttpClient = (_class6 = class {
|
|
|
15365
15390
|
try {
|
|
15366
15391
|
status = res.status;
|
|
15367
15392
|
if (status >= 300 && status < 400) {
|
|
15368
|
-
await _optionalChain([res, 'access',
|
|
15393
|
+
await _optionalChain([res, 'access', _89 => _89.body, 'optionalAccess', _90 => _90.cancel, 'call', _91 => _91(), 'access', _92 => _92.catch, 'call', _93 => _93(() => void 0)]);
|
|
15369
15394
|
throw new ResponseRejectedError(
|
|
15370
15395
|
`Refused to follow a ${status} redirect for ${method} ${opts.path}`,
|
|
15371
15396
|
{ ...ctx, code: "REDIRECT_BLOCKED", httpStatus: status, suggestedAction: "Check the configured zone/baseUrl; the API does not redirect." }
|
|
@@ -15426,14 +15451,15 @@ var HttpClient = (_class6 = class {
|
|
|
15426
15451
|
httpStatus: status,
|
|
15427
15452
|
suggestedAction: "The zone returned a non-JSON 2xx body; verify baseUrl points at the REST API."
|
|
15428
15453
|
});
|
|
15429
|
-
if (err2.code === "UNEXPECTED_CONTENT_TYPE" && maintenanceMaxWaitMs > 0 &&
|
|
15454
|
+
if (err2.code === "UNEXPECTED_CONTENT_TYPE" && maintenanceMaxWaitMs > 0 && looksLikeMaintenanceText(text)) {
|
|
15430
15455
|
const now = Date.now();
|
|
15431
15456
|
firstMaintenanceAt ??= now;
|
|
15432
15457
|
const remaining = maintenanceMaxWaitMs - (now - firstMaintenanceAt);
|
|
15433
15458
|
if (remaining > 0) {
|
|
15434
15459
|
const wait = Math.min(maintenancePollMs, remaining);
|
|
15460
|
+
if (wait >= remaining) maintenanceBudgetSpent = true;
|
|
15435
15461
|
maintenanceWaits += 1;
|
|
15436
|
-
_optionalChain([this, 'access',
|
|
15462
|
+
_optionalChain([this, 'access', _94 => _94.logger, 'access', _95 => _95.warn, 'optionalCall', _96 => _96(
|
|
15437
15463
|
`[autotask] maintenance window on ${method} ${opts.path}; waiting ${Math.round(wait / 1e3)}s (retry ${maintenanceWaits}, up to ${Math.round(maintenanceMaxWaitMs / 6e4)} min)`,
|
|
15438
15464
|
correlationId
|
|
15439
15465
|
)]);
|
|
@@ -15442,12 +15468,13 @@ var HttpClient = (_class6 = class {
|
|
|
15442
15468
|
await pause(wait);
|
|
15443
15469
|
continue;
|
|
15444
15470
|
}
|
|
15471
|
+
maintenanceBudgetSpent = true;
|
|
15445
15472
|
}
|
|
15446
15473
|
if (err2.code === "UNEXPECTED_CONTENT_TYPE" && retriable5xx && attempt < maxRetries) {
|
|
15447
15474
|
const retryAfter = parseRetryAfter(res.headers.get("Retry-After"));
|
|
15448
15475
|
const delay = retryAfter !== void 0 ? retryAfter * 1e3 : backoffDelay(attempt);
|
|
15449
15476
|
if (canWait(delay)) {
|
|
15450
|
-
_optionalChain([this, 'access',
|
|
15477
|
+
_optionalChain([this, 'access', _97 => _97.logger, 'access', _98 => _98.warn, 'optionalCall', _99 => _99(
|
|
15451
15478
|
`[autotask] non-JSON 2xx on ${method} ${opts.path}; retrying in ${delay}ms (attempt ${attempt + 1}/${maxRetries})`,
|
|
15452
15479
|
correlationId
|
|
15453
15480
|
)]);
|
|
@@ -15456,17 +15483,27 @@ var HttpClient = (_class6 = class {
|
|
|
15456
15483
|
continue;
|
|
15457
15484
|
}
|
|
15458
15485
|
}
|
|
15459
|
-
|
|
15486
|
+
const pageSnippet = typeof _optionalChain([err2, 'access', _100 => _100.details, 'optionalAccess', _101 => _101.bodySnippet]) === "string" ? err2.details.bodySnippet : "";
|
|
15487
|
+
if (maintenanceWaits > 0) {
|
|
15460
15488
|
err2.details = {
|
|
15461
15489
|
..._nullishCoalesce(err2.details, () => ( {})),
|
|
15462
15490
|
maintenance: {
|
|
15463
15491
|
waits: maintenanceWaits,
|
|
15464
15492
|
waitedMs: Date.now() - (_nullishCoalesce(firstMaintenanceAt, () => ( Date.now()))),
|
|
15465
15493
|
maxWaitMs: maintenanceMaxWaitMs,
|
|
15466
|
-
exhausted:
|
|
15494
|
+
exhausted: maintenanceBudgetSpent
|
|
15467
15495
|
}
|
|
15468
15496
|
};
|
|
15469
|
-
|
|
15497
|
+
if (maintenanceBudgetSpent) {
|
|
15498
|
+
err2.suggestedAction = maintenanceExhaustedAction(maintenanceMaxWaitMs, maintenanceWaits);
|
|
15499
|
+
}
|
|
15500
|
+
}
|
|
15501
|
+
if (err2.code === "UNEXPECTED_CONTENT_TYPE" && !looksLikeMaintenanceText(text) && isHtmlLike(res.headers.get("Content-Type"), text)) {
|
|
15502
|
+
err2.details = { ..._nullishCoalesce(err2.details, () => ( {})), maintenancePatternMiss: true };
|
|
15503
|
+
_optionalChain([this, 'access', _102 => _102.logger, 'access', _103 => _103.debug, 'optionalCall', _104 => _104(
|
|
15504
|
+
`[autotask] non-JSON body did not match the maintenance vocabulary on ${method} ${opts.path}: ${pageSnippet}`,
|
|
15505
|
+
correlationId
|
|
15506
|
+
)]);
|
|
15470
15507
|
}
|
|
15471
15508
|
attachEmptyReasonDetails(err2);
|
|
15472
15509
|
throw err2;
|
|
@@ -15478,20 +15515,45 @@ var HttpClient = (_class6 = class {
|
|
|
15478
15515
|
break;
|
|
15479
15516
|
}
|
|
15480
15517
|
let body;
|
|
15518
|
+
let nonJsonBody;
|
|
15481
15519
|
if (text.length > 0) {
|
|
15482
15520
|
try {
|
|
15483
15521
|
body = JSON.parse(text);
|
|
15484
15522
|
} catch (e13) {
|
|
15485
15523
|
body = text;
|
|
15524
|
+
nonJsonBody = text;
|
|
15486
15525
|
}
|
|
15487
15526
|
}
|
|
15527
|
+
const nonJsonSnippet = nonJsonBody === void 0 ? void 0 : bodySnippet(nonJsonBody, this.redactPersonalData);
|
|
15528
|
+
const nonJsonIsMaintenance = nonJsonBody !== void 0 && looksLikeMaintenanceText(nonJsonBody);
|
|
15529
|
+
const nonJsonIsHtmlCandidate = nonJsonBody !== void 0 && isHtmlLike(res.headers.get("Content-Type"), nonJsonBody);
|
|
15530
|
+
const nonJsonMaintenanceMayWait = nonJsonIsMaintenance && retriable5xx;
|
|
15531
|
+
if (nonJsonBody !== void 0 && maintenanceMaxWaitMs > 0 && nonJsonMaintenanceMayWait) {
|
|
15532
|
+
const now = Date.now();
|
|
15533
|
+
firstMaintenanceAt ??= now;
|
|
15534
|
+
const remaining = maintenanceMaxWaitMs - (now - firstMaintenanceAt);
|
|
15535
|
+
if (remaining > 0) {
|
|
15536
|
+
const wait = Math.min(maintenancePollMs, remaining);
|
|
15537
|
+
if (wait >= remaining) maintenanceBudgetSpent = true;
|
|
15538
|
+
maintenanceWaits += 1;
|
|
15539
|
+
_optionalChain([this, 'access', _105 => _105.logger, 'access', _106 => _106.warn, 'optionalCall', _107 => _107(
|
|
15540
|
+
`[autotask] maintenance window on ${method} ${opts.path} (HTTP ${status}); waiting ${Math.round(wait / 1e3)}s (retry ${maintenanceWaits}, up to ${Math.round(maintenanceMaxWaitMs / 6e4)} min)`,
|
|
15541
|
+
correlationId
|
|
15542
|
+
)]);
|
|
15543
|
+
deadlineAt = Date.now() + wait + timeoutMs;
|
|
15544
|
+
armDeadline(deadlineAt - Date.now());
|
|
15545
|
+
await pause(wait);
|
|
15546
|
+
continue;
|
|
15547
|
+
}
|
|
15548
|
+
maintenanceBudgetSpent = true;
|
|
15549
|
+
}
|
|
15488
15550
|
const deterministic500 = status >= 500 && isDeterministicVendor500(parseVendorErrors(body));
|
|
15489
15551
|
const retryableStatus = status === 429 || status >= 500;
|
|
15490
15552
|
if (retryableStatus && !deterministic500 && attempt < maxRetries && (status === 429 ? retriable : retriable5xx)) {
|
|
15491
15553
|
const retryAfter = parseRetryAfter(res.headers.get("Retry-After"));
|
|
15492
15554
|
const delay = retryAfter !== void 0 ? retryAfter * 1e3 : backoffDelay(attempt);
|
|
15493
15555
|
if (canWait(delay)) {
|
|
15494
|
-
_optionalChain([this, 'access',
|
|
15556
|
+
_optionalChain([this, 'access', _108 => _108.logger, 'access', _109 => _109.warn, 'optionalCall', _110 => _110(
|
|
15495
15557
|
`[autotask] ${status} on ${method} ${opts.path}; retrying in ${delay}ms (attempt ${attempt + 1}/${maxRetries})`,
|
|
15496
15558
|
correlationId
|
|
15497
15559
|
)]);
|
|
@@ -15504,7 +15566,7 @@ var HttpClient = (_class6 = class {
|
|
|
15504
15566
|
const target = await this.discoverZoneBase(signal, ctx);
|
|
15505
15567
|
const targetViolation = target === void 0 || this.hostPolicy === void 0 ? null : decideHostPolicy(target, this.hostPolicy);
|
|
15506
15568
|
if (targetViolation !== null) {
|
|
15507
|
-
_optionalChain([this, 'access',
|
|
15569
|
+
_optionalChain([this, 'access', _111 => _111.logger, 'access', _112 => _112.warn, 'optionalCall', _113 => _113(
|
|
15508
15570
|
`[autotask] zone re-point refused by hostPolicy (${targetViolation.bound}): ${targetViolation.origin} \u2014 the original 401 propagates, zero wire to the refused host`,
|
|
15509
15571
|
void 0
|
|
15510
15572
|
)]);
|
|
@@ -15526,6 +15588,32 @@ var HttpClient = (_class6 = class {
|
|
|
15526
15588
|
credentialShapeExpectation(headers, this.auth)
|
|
15527
15589
|
);
|
|
15528
15590
|
err.correlationId = correlationId;
|
|
15591
|
+
if (maintenanceWaits > 0) {
|
|
15592
|
+
err.details = {
|
|
15593
|
+
..._nullishCoalesce(err.details, () => ( {})),
|
|
15594
|
+
maintenance: {
|
|
15595
|
+
waits: maintenanceWaits,
|
|
15596
|
+
waitedMs: Date.now() - (_nullishCoalesce(firstMaintenanceAt, () => ( Date.now()))),
|
|
15597
|
+
maxWaitMs: maintenanceMaxWaitMs,
|
|
15598
|
+
exhausted: maintenanceBudgetSpent
|
|
15599
|
+
}
|
|
15600
|
+
};
|
|
15601
|
+
if (maintenanceBudgetSpent) {
|
|
15602
|
+
err.suggestedAction = maintenanceExhaustedAction(maintenanceMaxWaitMs, maintenanceWaits);
|
|
15603
|
+
}
|
|
15604
|
+
}
|
|
15605
|
+
if (nonJsonBody !== void 0) {
|
|
15606
|
+
if (nonJsonIsMaintenance && !retriable5xx) {
|
|
15607
|
+
err.details = { ..._nullishCoalesce(err.details, () => ( {})), maintenanceDetected: true };
|
|
15608
|
+
err.suggestedAction = `A maintenance-shaped page answered ${method} ${opts.path} (HTTP ${status}); it was NOT waited out or re-sent \u2014 a non-2xx edge page can arrive after the request was forwarded, so verify the record before re-issuing (only a GET or an explicitly idempotent-flagged call waits this window out).`;
|
|
15609
|
+
} else if (!nonJsonIsMaintenance && nonJsonIsHtmlCandidate) {
|
|
15610
|
+
err.details = { ..._nullishCoalesce(err.details, () => ( {})), maintenancePatternMiss: true };
|
|
15611
|
+
_optionalChain([this, 'access', _114 => _114.logger, 'access', _115 => _115.debug, 'optionalCall', _116 => _116(
|
|
15612
|
+
`[autotask] non-JSON body did not match the maintenance vocabulary on ${method} ${opts.path}: ${nonJsonSnippet}`,
|
|
15613
|
+
correlationId
|
|
15614
|
+
)]);
|
|
15615
|
+
}
|
|
15616
|
+
}
|
|
15529
15617
|
if (status === 401 && zoneRetry !== void 0) {
|
|
15530
15618
|
err.details = {
|
|
15531
15619
|
..._nullishCoalesce(err.details, () => ( {})),
|
|
@@ -15542,7 +15630,7 @@ var HttpClient = (_class6 = class {
|
|
|
15542
15630
|
threadThreshold
|
|
15543
15631
|
});
|
|
15544
15632
|
this.cooldownStore.set(this.tenantKey, Date.now() + durationMs);
|
|
15545
|
-
_optionalChain([this, 'access',
|
|
15633
|
+
_optionalChain([this, 'access', _117 => _117.logger, 'access', _118 => _118.warn, 'optionalCall', _119 => _119(
|
|
15546
15634
|
`[autotask] 429 on ${method} ${opts.path} surfaces after ${attempt + 1} attempt(s); tenant cooldown armed for ${Math.round(durationMs / 1e3)}s`,
|
|
15547
15635
|
correlationId
|
|
15548
15636
|
)]);
|
|
@@ -15587,7 +15675,7 @@ var HttpClient = (_class6 = class {
|
|
|
15587
15675
|
if (this.fieldCache !== void 0 && err instanceof AutotaskError) {
|
|
15588
15676
|
const op = typeof opts.operation === "string" ? opts.operation : void 0;
|
|
15589
15677
|
const verb = op !== void 0 ? op.slice(op.lastIndexOf(".") + 1) : "";
|
|
15590
|
-
const drift = _optionalChain([err, 'access',
|
|
15678
|
+
const drift = _optionalChain([err, 'access', _120 => _120.details, 'optionalAccess', _121 => _121.deterministic]) === true || err.code === "INVALID_RESPONSE" && META_TRIO_VERBS.has(verb);
|
|
15591
15679
|
if (drift && op !== void 0) {
|
|
15592
15680
|
const dot = op.indexOf(".");
|
|
15593
15681
|
if (dot > 0) this.fieldCache.invalidate(op.slice(0, dot));
|
|
@@ -15597,7 +15685,7 @@ var HttpClient = (_class6 = class {
|
|
|
15597
15685
|
} finally {
|
|
15598
15686
|
clearTimeout(deadlineTimer);
|
|
15599
15687
|
if (!(method === "GET" || opts.idempotent === true)) {
|
|
15600
|
-
_optionalChain([this, 'access',
|
|
15688
|
+
_optionalChain([this, 'access', _122 => _122.readCache, 'optionalAccess', _123 => _123.clear, 'call', _124 => _124()]);
|
|
15601
15689
|
const nameOp = typeof opts.operation === "string" ? opts.operation : void 0;
|
|
15602
15690
|
const nameDot = nameOp !== void 0 ? nameOp.indexOf(".") : -1;
|
|
15603
15691
|
if (this.resourceNameCache !== void 0 && nameOp !== void 0 && nameDot > 0 && nameOp.slice(0, nameDot) === "resources") {
|
|
@@ -15617,7 +15705,7 @@ function attachEmptyReasonDetails(err) {
|
|
|
15617
15705
|
const resource = err.operation.slice(0, dot);
|
|
15618
15706
|
const op = err.operation.slice(dot + 1);
|
|
15619
15707
|
const surface = err.operation;
|
|
15620
|
-
const stamp = _optionalChain([EMPTY_REASON_STAMPS, 'access',
|
|
15708
|
+
const stamp = _optionalChain([EMPTY_REASON_STAMPS, 'access', _125 => _125[resource], 'optionalAccess', _126 => _126[op]]);
|
|
15621
15709
|
const pointer = POINTER_NOTES[surface];
|
|
15622
15710
|
const isGetMiss = err instanceof NotFoundError && op === "get";
|
|
15623
15711
|
if (stamp === void 0 && pointer === void 0 && !isGetMiss) return;
|
|
@@ -15907,7 +15995,7 @@ async function expandResourceNames(client, ids, opts = {}) {
|
|
|
15907
15995
|
continue;
|
|
15908
15996
|
}
|
|
15909
15997
|
}
|
|
15910
|
-
const epoch = _nullishCoalesce(_optionalChain([cache, 'optionalAccess',
|
|
15998
|
+
const epoch = _nullishCoalesce(_optionalChain([cache, 'optionalAccess', _127 => _127.epoch]), () => ( 0));
|
|
15911
15999
|
const work = (async () => {
|
|
15912
16000
|
try {
|
|
15913
16001
|
const record = await holder.get(id, { fresh });
|
|
@@ -15982,6 +16070,7 @@ function applyFieldsFilter(projected, filter, row) {
|
|
|
15982
16070
|
if (filter !== void 0) {
|
|
15983
16071
|
const present = new Set(projected.map((f) => f.name));
|
|
15984
16072
|
row.unmatchedFields = filter.filter((n) => !present.has(n));
|
|
16073
|
+
row.projected = true;
|
|
15985
16074
|
}
|
|
15986
16075
|
row.fields = kept;
|
|
15987
16076
|
row.required = kept.filter((f) => f.isRequired).map((f) => f.name);
|
|
@@ -15993,7 +16082,7 @@ function capabilitySets() {
|
|
|
15993
16082
|
const fieldOps = /* @__PURE__ */ new Map();
|
|
15994
16083
|
const udfOps = /* @__PURE__ */ new Map();
|
|
15995
16084
|
const resources = /* @__PURE__ */ new Set();
|
|
15996
|
-
for (const rec of
|
|
16085
|
+
for (const rec of _chunkJM52ZU7Tcjs.CAPABILITIES) {
|
|
15997
16086
|
if (rec.resource === "operations") continue;
|
|
15998
16087
|
resources.add(rec.resource);
|
|
15999
16088
|
if (rec.operation === "getFieldInfo") fieldOps.set(rec.resource, rec);
|
|
@@ -16026,7 +16115,7 @@ async function fieldCatalog(client, opts) {
|
|
|
16026
16115
|
}
|
|
16027
16116
|
}
|
|
16028
16117
|
const { fieldOps, udfOps, resources: allResources } = capabilitySets();
|
|
16029
|
-
const includeRaw = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16118
|
+
const includeRaw = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _128 => _128.include]), () => ( ["fields"]));
|
|
16030
16119
|
if (!Array.isArray(includeRaw) || includeRaw.length === 0) {
|
|
16031
16120
|
throw new AutotaskConfigError("fieldCatalog: opts.include must be a non-empty array of (info|fields|udf)");
|
|
16032
16121
|
}
|
|
@@ -16040,7 +16129,7 @@ async function fieldCatalog(client, opts) {
|
|
|
16040
16129
|
}
|
|
16041
16130
|
if (!include.includes(kind)) include.push(kind);
|
|
16042
16131
|
}
|
|
16043
|
-
const resourcesRaw = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16132
|
+
const resourcesRaw = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _129 => _129.resources]), () => ( WORKFLOW_RESOURCES));
|
|
16044
16133
|
if (!Array.isArray(resourcesRaw) || resourcesRaw.length === 0) {
|
|
16045
16134
|
throw new AutotaskConfigError("fieldCatalog: opts.resources must be a non-empty array of plan resource keys");
|
|
16046
16135
|
}
|
|
@@ -16072,7 +16161,7 @@ async function fieldCatalog(client, opts) {
|
|
|
16072
16161
|
if (!targets.includes(key)) targets.push(key);
|
|
16073
16162
|
}
|
|
16074
16163
|
let fieldsFilter;
|
|
16075
|
-
const fieldsRaw = _optionalChain([opts, 'optionalAccess',
|
|
16164
|
+
const fieldsRaw = _optionalChain([opts, 'optionalAccess', _130 => _130.fields]);
|
|
16076
16165
|
if (fieldsRaw !== void 0) {
|
|
16077
16166
|
if (!Array.isArray(fieldsRaw) || fieldsRaw.length === 0) {
|
|
16078
16167
|
throw new AutotaskConfigError("fieldCatalog: opts.fields must be a non-empty array of vendor field name strings");
|
|
@@ -16094,7 +16183,7 @@ async function fieldCatalog(client, opts) {
|
|
|
16094
16183
|
`fieldCatalog: opts.labels must be a boolean (got ${typeof opts.labels})`
|
|
16095
16184
|
);
|
|
16096
16185
|
}
|
|
16097
|
-
const labels = _optionalChain([opts, 'optionalAccess',
|
|
16186
|
+
const labels = _optionalChain([opts, 'optionalAccess', _131 => _131.labels]) === true;
|
|
16098
16187
|
const cost = targets.length * include.length;
|
|
16099
16188
|
if (cost > MAX_FIELD_CATALOG_WIRE) {
|
|
16100
16189
|
throw new AutotaskConfigError(
|
|
@@ -16103,7 +16192,7 @@ async function fieldCatalog(client, opts) {
|
|
|
16103
16192
|
);
|
|
16104
16193
|
}
|
|
16105
16194
|
const cache = client.http.fieldCache;
|
|
16106
|
-
const fresh = _optionalChain([opts, 'optionalAccess',
|
|
16195
|
+
const fresh = _optionalChain([opts, 'optionalAccess', _132 => _132.fresh]) === true;
|
|
16107
16196
|
const zone = _nullishCoalesce(client.config.zone, () => ( "unknown"));
|
|
16108
16197
|
const rows = [];
|
|
16109
16198
|
let wireUsed = 0;
|
|
@@ -16127,11 +16216,11 @@ async function fieldCatalog(client, opts) {
|
|
|
16127
16216
|
error: null
|
|
16128
16217
|
};
|
|
16129
16218
|
const fetches = {
|
|
16130
|
-
info: () => _nullishCoalesce(_optionalChain([holder, 'optionalAccess',
|
|
16131
|
-
fields: () => _nullishCoalesce(_optionalChain([holder, 'optionalAccess',
|
|
16132
|
-
udf: () => _nullishCoalesce(_optionalChain([holder, 'optionalAccess',
|
|
16219
|
+
info: () => _nullishCoalesce(_optionalChain([holder, 'optionalAccess', _133 => _133.getEntityInfo, 'optionalCall', _134 => _134()]), () => ( Promise.reject(new AutotaskError(`fieldCatalog: the client exposes no getEntityInfo read for "${resource}"`, { code: "INVALID_RESPONSE", category: "server" })))),
|
|
16220
|
+
fields: () => _nullishCoalesce(_optionalChain([holder, 'optionalAccess', _135 => _135.getFieldInfo, 'optionalCall', _136 => _136()]), () => ( Promise.reject(new AutotaskError(`fieldCatalog: the client exposes no getFieldInfo read for "${resource}"`, { code: "INVALID_RESPONSE", category: "server" })))),
|
|
16221
|
+
udf: () => _nullishCoalesce(_optionalChain([holder, 'optionalAccess', _137 => _137.getUdfInfo, 'optionalCall', _138 => _138()]), () => ( Promise.reject(new AutotaskError(`fieldCatalog: the client exposes no getUdfInfo read for "${resource}"`, { code: "INVALID_RESPONSE", category: "server" }))))
|
|
16133
16222
|
};
|
|
16134
|
-
if (fresh) _optionalChain([cache, 'optionalAccess',
|
|
16223
|
+
if (fresh) _optionalChain([cache, 'optionalAccess', _139 => _139.invalidate, 'call', _140 => _140(resource)]);
|
|
16135
16224
|
let allCached = true;
|
|
16136
16225
|
const ages = [];
|
|
16137
16226
|
for (const kind of include) {
|
|
@@ -16184,7 +16273,7 @@ async function fieldCatalog(client, opts) {
|
|
|
16184
16273
|
label: zone,
|
|
16185
16274
|
cached: cache !== void 0,
|
|
16186
16275
|
labels,
|
|
16187
|
-
ttlMs: _nullishCoalesce(_optionalChain([cache, 'optionalAccess',
|
|
16276
|
+
ttlMs: _nullishCoalesce(_optionalChain([cache, 'optionalAccess', _141 => _141.ttlMs]), () => ( null)),
|
|
16188
16277
|
fetchedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
16189
16278
|
rows,
|
|
16190
16279
|
wireUsed,
|
|
@@ -16349,7 +16438,7 @@ async function resolveCompositeNames(http, plan, opts = {}) {
|
|
|
16349
16438
|
} else {
|
|
16350
16439
|
for (const f of plan.labelFields) {
|
|
16351
16440
|
const frow = row.fields.find((x) => x.name === f);
|
|
16352
|
-
picklists[f] = _optionalChain([frow, 'optionalAccess',
|
|
16441
|
+
picklists[f] = _optionalChain([frow, 'optionalAccess', _142 => _142.picklistValues]);
|
|
16353
16442
|
}
|
|
16354
16443
|
}
|
|
16355
16444
|
} catch (err) {
|
|
@@ -16360,8 +16449,8 @@ async function resolveCompositeNames(http, plan, opts = {}) {
|
|
|
16360
16449
|
}
|
|
16361
16450
|
return {
|
|
16362
16451
|
section,
|
|
16363
|
-
resourceName: (id) => _nullishCoalesce(_optionalChain([section, 'access',
|
|
16364
|
-
recordName: (table, id) => _nullishCoalesce(_optionalChain([section, 'access',
|
|
16452
|
+
resourceName: (id) => _nullishCoalesce(_optionalChain([section, 'access', _143 => _143.rows, 'access', _144 => _144[`resource:${id}`], 'optionalAccess', _145 => _145.name]), () => ( null)),
|
|
16453
|
+
recordName: (table, id) => _nullishCoalesce(_optionalChain([section, 'access', _146 => _146.rows, 'access', _147 => _147[`${table}:${id}`], 'optionalAccess', _148 => _148.name]), () => ( null)),
|
|
16365
16454
|
labelFor: (field, value) => {
|
|
16366
16455
|
if (value === null || value === void 0) return null;
|
|
16367
16456
|
const values = picklists[field];
|
|
@@ -16632,8 +16721,8 @@ function validateFetchManyItems(items, cap, opName = "fetchMany", capRef = `FETC
|
|
|
16632
16721
|
problems.push(`${at}.fields: must be an array of exact vendor field names (discover them via operations.fieldCatalog)`);
|
|
16633
16722
|
continue;
|
|
16634
16723
|
}
|
|
16635
|
-
if (_optionalChain([validation, 'optionalAccess',
|
|
16636
|
-
const authoritative = _nullishCoalesce(_optionalChain([validation, 'optionalAccess',
|
|
16724
|
+
if (_optionalChain([validation, 'optionalAccess', _149 => _149.fieldCheck]) !== false) {
|
|
16725
|
+
const authoritative = _nullishCoalesce(_optionalChain([validation, 'optionalAccess', _150 => _150.fieldSetsByResource, 'optionalAccess', _151 => _151.get, 'call', _152 => _152(resourceKey)]), () => ( fields));
|
|
16637
16726
|
for (const f of item.fields) {
|
|
16638
16727
|
if (!authoritative.includes(f)) {
|
|
16639
16728
|
problems.push(
|
|
@@ -16737,7 +16826,7 @@ function project2(value, fields) {
|
|
|
16737
16826
|
return out;
|
|
16738
16827
|
}
|
|
16739
16828
|
function resourcePathOf(key, holder) {
|
|
16740
|
-
const path = _optionalChain([holder, 'optionalAccess',
|
|
16829
|
+
const path = _optionalChain([holder, 'optionalAccess', _153 => _153.resourcePath]);
|
|
16741
16830
|
if (typeof path !== "string" || path === "") {
|
|
16742
16831
|
throw new AutotaskConfigError(`fetchByIds: the client exposes no ${key} resource path (registry drift)`, {
|
|
16743
16832
|
suggestedAction: "Rebuild the client from the SDK build that ships this registry (the resource set is pinned by the plan)."
|
|
@@ -16909,7 +16998,7 @@ function blindEmptyReason(stamp) {
|
|
|
16909
16998
|
};
|
|
16910
16999
|
}
|
|
16911
17000
|
function attachUpdateTargetMissReason(err, key) {
|
|
16912
|
-
const pinned = _optionalChain([EMPTY_REASON_STAMPS, 'access',
|
|
17001
|
+
const pinned = _optionalChain([EMPTY_REASON_STAMPS, 'access', _154 => _154[key], 'optionalAccess', _155 => _155.update]);
|
|
16913
17002
|
if (pinned === void 0) return;
|
|
16914
17003
|
err.details = { ..._nullishCoalesce(err.details, () => ( {})), emptyReason: pinned };
|
|
16915
17004
|
}
|
|
@@ -17042,7 +17131,7 @@ var BaseResource = class {
|
|
|
17042
17131
|
// ------------------------------------------------------------------
|
|
17043
17132
|
// Query walk (wired to the G3 walker; cursor-follow per the pinned wire)
|
|
17044
17133
|
// ------------------------------------------------------------------
|
|
17045
|
-
/** One page fetch: page 1 POSTs the QueryModel body; later pages POST the
|
|
17134
|
+
/** One page fetch: page 1 POSTs the QueryModel body; later pages POST the same body (`buildQueryBody`) to the absolute cursor (issue #118). */
|
|
17046
17135
|
async fetchPage(params, page, pageSize, state) {
|
|
17047
17136
|
const operation = `${this.config.key}.query`;
|
|
17048
17137
|
if (page === 1) {
|
|
@@ -17058,8 +17147,7 @@ var BaseResource = class {
|
|
|
17058
17147
|
operation
|
|
17059
17148
|
});
|
|
17060
17149
|
}
|
|
17061
|
-
const
|
|
17062
|
-
const body = { filter: conditions === void 0 ? [] : buildFilter(conditions).filter };
|
|
17150
|
+
const body = buildQueryBody({ ...params, maxRecords: pageSize });
|
|
17063
17151
|
const res = await this.http.request({
|
|
17064
17152
|
method: "POST",
|
|
17065
17153
|
path: cursorToPath(this.http.baseUrl, cursor),
|
|
@@ -17091,7 +17179,7 @@ var BaseResource = class {
|
|
|
17091
17179
|
return (page, pageSize) => this.fetchPage(p, page, pageSize, state);
|
|
17092
17180
|
}
|
|
17093
17181
|
walkPageSize(params) {
|
|
17094
|
-
return clampPageSize(_nullishCoalesce(_optionalChain([params, 'optionalAccess',
|
|
17182
|
+
return clampPageSize(_nullishCoalesce(_optionalChain([params, 'optionalAccess', _156 => _156.maxRecords]), () => ( this.defaultPageSize)));
|
|
17095
17183
|
}
|
|
17096
17184
|
/** Stream items across pages (the resource `query` surface). */
|
|
17097
17185
|
queryItems(params) {
|
|
@@ -17103,7 +17191,7 @@ var BaseResource = class {
|
|
|
17103
17191
|
}
|
|
17104
17192
|
/** Collect every item across all pages (the resource `queryAll` surface; 1000-page guarded). */
|
|
17105
17193
|
async queryAllItems(params) {
|
|
17106
|
-
return collectAll(this.pageFetcher(params), { pageSize: this.walkPageSize(params), maxRecords: _optionalChain([params, 'optionalAccess',
|
|
17194
|
+
return collectAll(this.pageFetcher(params), { pageSize: this.walkPageSize(params), maxRecords: _optionalChain([params, 'optionalAccess', _157 => _157.maxTotalRecords]) });
|
|
17107
17195
|
}
|
|
17108
17196
|
/**
|
|
17109
17197
|
* `queryBounded` — server-side pagination (the MCP query surface): ONE call
|
|
@@ -17112,10 +17200,12 @@ var BaseResource = class {
|
|
|
17112
17200
|
* complete-enough result. The client never owns the walk:
|
|
17113
17201
|
* - `limit` = total records (default 500, hard max 2500 — above it throws
|
|
17114
17202
|
* AutotaskConfigError; it is NOT a page size). The page-1 request uses
|
|
17115
|
-
* the internal page size min(500, limit)
|
|
17116
|
-
*
|
|
17117
|
-
*
|
|
17118
|
-
*
|
|
17203
|
+
* the internal page size min(500, limit) (the `latest` mechanism sizes
|
|
17204
|
+
* its walk from the matching count); every follow-up page POSTs the
|
|
17205
|
+
* SAME QueryModel body (`buildQueryBody`: MaxRecords, IncludeFields and
|
|
17206
|
+
* the preserved filter) to the absolute cursor (issue #118 — the vendor
|
|
17207
|
+
* honours IncludeFields there and ignores MaxRecords, serving its own
|
|
17208
|
+
* page size), so the walk reuses `fetchPage` (the shared cursor machinery)
|
|
17119
17209
|
* with a per-walk closure state (walks never share state).
|
|
17120
17210
|
* - The 1000-page guard still applies as a SOFT stop: a walk that would
|
|
17121
17211
|
* fetch a 1001st page stops with `hasMore: true` (never a throw — this
|
|
@@ -17138,19 +17228,19 @@ var BaseResource = class {
|
|
|
17138
17228
|
"queryBounded: params must be an object { filter?, limit?, latest?, includeFields? } \u2014 a bare conditions array is not accepted (wrap it: { filter: [...] })"
|
|
17139
17229
|
);
|
|
17140
17230
|
}
|
|
17141
|
-
const limit = _nullishCoalesce(_optionalChain([params, 'optionalAccess',
|
|
17231
|
+
const limit = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _158 => _158.limit]), () => ( BOUNDED_QUERY_DEFAULT_LIMIT));
|
|
17142
17232
|
if (!Number.isInteger(limit) || limit < 1 || limit > BOUNDED_QUERY_MAX_LIMIT) {
|
|
17143
17233
|
throw new AutotaskConfigError(
|
|
17144
17234
|
`queryBounded: limit must be an integer 1..${BOUNDED_QUERY_MAX_LIMIT} (got ${String(limit)}) \u2014 it is the TOTAL record cap, not a page size`
|
|
17145
17235
|
);
|
|
17146
17236
|
}
|
|
17147
|
-
const noteChars = _optionalChain([params, 'optionalAccess',
|
|
17237
|
+
const noteChars = _optionalChain([params, 'optionalAccess', _159 => _159.noteChars]);
|
|
17148
17238
|
if (noteChars !== void 0 && (!Number.isInteger(noteChars) || noteChars < 1)) {
|
|
17149
17239
|
throw new AutotaskConfigError(
|
|
17150
17240
|
`queryBounded: noteChars must be an integer >= 1 (got ${String(noteChars)}) \u2014 it is the per-field char cap on the untrusted-class free-text fields (absent = the raw, untruncated result)`
|
|
17151
17241
|
);
|
|
17152
17242
|
}
|
|
17153
|
-
const walkParams = _optionalChain([params, 'optionalAccess',
|
|
17243
|
+
const walkParams = _optionalChain([params, 'optionalAccess', _160 => _160.fieldsPreset]) !== void 0 ? { ...params, includeFields: resolveFieldsPreset(params.fieldsPreset, this.config.key, params.includeFields) } : _nullishCoalesce(params, () => ( {}));
|
|
17154
17244
|
const latest = walkParams.latest;
|
|
17155
17245
|
if (latest !== void 0) {
|
|
17156
17246
|
if (!Number.isInteger(latest) || latest < 1 || latest > BOUNDED_QUERY_MAX_LIMIT) {
|
|
@@ -17158,7 +17248,7 @@ var BaseResource = class {
|
|
|
17158
17248
|
`queryBounded: latest must be an integer 1..${BOUNDED_QUERY_MAX_LIMIT} (got ${String(latest)}) \u2014 it is the count of the highest-id rows to return`
|
|
17159
17249
|
);
|
|
17160
17250
|
}
|
|
17161
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
17251
|
+
if (_optionalChain([params, 'optionalAccess', _161 => _161.limit]) !== void 0 && limit < latest) {
|
|
17162
17252
|
throw new AutotaskConfigError(
|
|
17163
17253
|
`queryBounded: limit (${String(limit)}) must be >= latest (${String(latest)}) \u2014 latest governs the returned count and limit is the walk window`
|
|
17164
17254
|
);
|
|
@@ -17240,8 +17330,8 @@ var BaseResource = class {
|
|
|
17240
17330
|
* speculation). */
|
|
17241
17331
|
stampEmptyQueryResult(result, params) {
|
|
17242
17332
|
if (result.items.length !== 0) return;
|
|
17243
|
-
result.blindSurface = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access',
|
|
17244
|
-
const pinnedReason = normalizedConditions(_optionalChain([params, 'optionalAccess',
|
|
17333
|
+
result.blindSurface = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access', _162 => _162[this.config.key], 'optionalAccess', _163 => _163.query]), _optionalChain([params, 'optionalAccess', _164 => _164.filter]));
|
|
17334
|
+
const pinnedReason = normalizedConditions(_optionalChain([params, 'optionalAccess', _165 => _165.filter])) === void 0 ? _optionalChain([EMPTY_REASON_STAMPS, 'access', _166 => _166[this.config.key], 'optionalAccess', _167 => _167.query]) : void 0;
|
|
17245
17335
|
if (result.blindSurface !== void 0 || pinnedReason !== void 0) {
|
|
17246
17336
|
result.emptyReason = result.blindSurface !== void 0 ? blindEmptyReason(result.blindSurface) : pinnedReason;
|
|
17247
17337
|
}
|
|
@@ -17392,7 +17482,7 @@ var BaseResource = class {
|
|
|
17392
17482
|
if (result.items.length === 0) {
|
|
17393
17483
|
this.stampEmptyQueryResult(result, params);
|
|
17394
17484
|
} else {
|
|
17395
|
-
result.blindSurface = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access',
|
|
17485
|
+
result.blindSurface = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access', _168 => _168[this.config.key], 'optionalAccess', _169 => _169.query]), params.filter);
|
|
17396
17486
|
}
|
|
17397
17487
|
return result;
|
|
17398
17488
|
}
|
|
@@ -17431,7 +17521,7 @@ var BaseResource = class {
|
|
|
17431
17521
|
* or, on a plan-pinned blind surface, the `{ count: 0, blindSurface }`
|
|
17432
17522
|
* typed sentinel (S12-C T10; see `BlindCountResult`). */
|
|
17433
17523
|
async countGlobal(params) {
|
|
17434
|
-
const conditions = normalizedConditions(_optionalChain([params, 'optionalAccess',
|
|
17524
|
+
const conditions = normalizedConditions(_optionalChain([params, 'optionalAccess', _170 => _170.filter]));
|
|
17435
17525
|
const body = {};
|
|
17436
17526
|
body.filter = conditions === void 0 ? [] : buildFilter(conditions).filter;
|
|
17437
17527
|
const res = await this.http.request({
|
|
@@ -17442,9 +17532,9 @@ var BaseResource = class {
|
|
|
17442
17532
|
idempotent: true
|
|
17443
17533
|
});
|
|
17444
17534
|
const count = unwrapQueryCount(res, `${this.config.key}.count`);
|
|
17445
|
-
const stamp = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access',
|
|
17535
|
+
const stamp = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access', _171 => _171[this.config.key], 'optionalAccess', _172 => _172.count]), _optionalChain([params, 'optionalAccess', _173 => _173.filter]));
|
|
17446
17536
|
if (count === 0) {
|
|
17447
|
-
const pinnedReason = conditions === void 0 ? _optionalChain([EMPTY_REASON_STAMPS, 'access',
|
|
17537
|
+
const pinnedReason = conditions === void 0 ? _optionalChain([EMPTY_REASON_STAMPS, 'access', _174 => _174[this.config.key], 'optionalAccess', _175 => _175.count]) : void 0;
|
|
17448
17538
|
if (stamp !== void 0 || pinnedReason !== void 0) {
|
|
17449
17539
|
return {
|
|
17450
17540
|
count,
|
|
@@ -17475,9 +17565,9 @@ var BaseResource = class {
|
|
|
17475
17565
|
const hit = cache.get(path);
|
|
17476
17566
|
if (hit !== void 0) return hit;
|
|
17477
17567
|
}
|
|
17478
|
-
const epoch = _optionalChain([cache, 'optionalAccess',
|
|
17568
|
+
const epoch = _optionalChain([cache, 'optionalAccess', _176 => _176.epoch]);
|
|
17479
17569
|
const res = await this.http.request({ method: "GET", path, operation });
|
|
17480
|
-
_optionalChain([cache, 'optionalAccess',
|
|
17570
|
+
_optionalChain([cache, 'optionalAccess', _177 => _177.set, 'call', _178 => _178(path, res, resource, epoch)]);
|
|
17481
17571
|
return res;
|
|
17482
17572
|
}
|
|
17483
17573
|
/**
|
|
@@ -17516,7 +17606,7 @@ var BaseResource = class {
|
|
|
17516
17606
|
return value;
|
|
17517
17607
|
});
|
|
17518
17608
|
work.catch((err) => {
|
|
17519
|
-
if (err instanceof AutotaskError && (err.code === "INVALID_RESPONSE" || _optionalChain([err, 'access',
|
|
17609
|
+
if (err instanceof AutotaskError && (err.code === "INVALID_RESPONSE" || _optionalChain([err, 'access', _179 => _179.details, 'optionalAccess', _180 => _180.deterministic]) === true)) {
|
|
17520
17610
|
cache.invalidate(key);
|
|
17521
17611
|
}
|
|
17522
17612
|
});
|
|
@@ -17546,7 +17636,7 @@ var BaseResource = class {
|
|
|
17546
17636
|
path: `${this.resourcePath}/${numeric}`,
|
|
17547
17637
|
operation: `${this.config.key}.get`,
|
|
17548
17638
|
skipResponseRedaction: true,
|
|
17549
|
-
maxRetries: _optionalChain([readOpts, 'optionalAccess',
|
|
17639
|
+
maxRetries: _optionalChain([readOpts, 'optionalAccess', _181 => _181.maxRetries])
|
|
17550
17640
|
});
|
|
17551
17641
|
return unwrapItem(res, numeric, `${this.config.key}.get`, this.entityName);
|
|
17552
17642
|
}
|
|
@@ -17565,7 +17655,7 @@ var BaseResource = class {
|
|
|
17565
17655
|
path: this.scopedItemPath(parentId, numeric),
|
|
17566
17656
|
operation: `${this.config.key}.get`,
|
|
17567
17657
|
skipResponseRedaction: true,
|
|
17568
|
-
maxRetries: _optionalChain([readOpts, 'optionalAccess',
|
|
17658
|
+
maxRetries: _optionalChain([readOpts, 'optionalAccess', _182 => _182.maxRetries])
|
|
17569
17659
|
});
|
|
17570
17660
|
return unwrapItem(res, numeric, `${this.config.key}.get`, this.entityName);
|
|
17571
17661
|
}
|
|
@@ -18224,7 +18314,7 @@ var BaseResource = class {
|
|
|
18224
18314
|
current = parentId === void 0 ? await this.getGlobal(id, true) : this.config.attachmentGet ? await this.getScopedModel(parentId, id, true) : await this.getScopedRaw(parentId, id, true);
|
|
18225
18315
|
} catch (err) {
|
|
18226
18316
|
if (err instanceof NotFoundError) {
|
|
18227
|
-
const updateReason = _optionalChain([EMPTY_REASON_STAMPS, 'access',
|
|
18317
|
+
const updateReason = _optionalChain([EMPTY_REASON_STAMPS, 'access', _183 => _183[this.config.key], 'optionalAccess', _184 => _184.update]);
|
|
18228
18318
|
checks.push({
|
|
18229
18319
|
name: "current-record-exists",
|
|
18230
18320
|
ok: false,
|
|
@@ -18382,12 +18472,12 @@ var BaseResource = class {
|
|
|
18382
18472
|
return null;
|
|
18383
18473
|
}
|
|
18384
18474
|
}
|
|
18385
|
-
const epoch = _optionalChain([cache, 'optionalAccess',
|
|
18475
|
+
const epoch = _optionalChain([cache, 'optionalAccess', _185 => _185.epoch]);
|
|
18386
18476
|
try {
|
|
18387
18477
|
return await this.fetchRecordRaw(entityPath, referenceId);
|
|
18388
18478
|
} catch (err) {
|
|
18389
18479
|
if (err instanceof NotFoundError) {
|
|
18390
|
-
_optionalChain([cache, 'optionalAccess',
|
|
18480
|
+
_optionalChain([cache, 'optionalAccess', _186 => _186.set, 'call', _187 => _187(absentKey, CONTEXT_ABSENT_MARKER, RESOURCE_KEY_BY_PATH[entityPath], epoch)]);
|
|
18391
18481
|
return null;
|
|
18392
18482
|
}
|
|
18393
18483
|
throw err;
|
|
@@ -18504,7 +18594,7 @@ var BaseResource = class {
|
|
|
18504
18594
|
missDetail(operator, fields) {
|
|
18505
18595
|
const key = this.config.key;
|
|
18506
18596
|
const probe = fields.map((field) => ({ field, op: operator, value: "" }));
|
|
18507
|
-
const blind = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access',
|
|
18597
|
+
const blind = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access', _188 => _188[key], 'optionalAccess', _189 => _189.query]), probe);
|
|
18508
18598
|
const next = [];
|
|
18509
18599
|
if (blind !== void 0) {
|
|
18510
18600
|
next.push(`This surface is blind to records the API user does not own, so a miss is not proof of absence: ${blind.authority} returns the record when the id is known.`);
|
|
@@ -18779,4 +18869,6 @@ var BaseResource = class {
|
|
|
18779
18869
|
|
|
18780
18870
|
|
|
18781
18871
|
|
|
18782
|
-
|
|
18872
|
+
|
|
18873
|
+
|
|
18874
|
+
exports.AUTH_HEADERS = AUTH_HEADERS; exports.buildAuthHeaders = buildAuthHeaders; exports.withAuthHeaders = withAuthHeaders; exports.NoopLogger = NoopLogger; exports.REDACTED = REDACTED; exports.CREDENTIAL_HEADER_NAMES = CREDENTIAL_HEADER_NAMES; exports.isCredentialHeaderName = isCredentialHeaderName; exports.redactRecord = redactRecord; exports.SECRET_RESPONSE_FIELDS = SECRET_RESPONSE_FIELDS; exports.PERSONAL_RESPONSE_FIELDS = PERSONAL_RESPONSE_FIELDS; exports.CONFIDENTIAL_RESPONSE_FIELDS = CONFIDENTIAL_RESPONSE_FIELDS; exports.isRedactedFieldName = isRedactedFieldName; exports.redactResponseBody = redactResponseBody; exports.AutotaskError = AutotaskError; exports.AutotaskConfigError = AutotaskConfigError; exports.AutotaskNetworkError = AutotaskNetworkError; exports.AutotaskTimeoutError = AutotaskTimeoutError; exports.AutotaskAbortError = AutotaskAbortError; exports.ResponseRejectedError = ResponseRejectedError; exports.BadRequestError = BadRequestError; exports.UnauthorizedError = UnauthorizedError; exports.ForbiddenError = ForbiddenError; exports.NotFoundError = NotFoundError; exports.ConflictError = ConflictError; exports.UnprocessableEntityError = UnprocessableEntityError; exports.RateLimitError = RateLimitError; exports.ServerError = ServerError; exports.UnexpectedContentTypeError = UnexpectedContentTypeError; exports.EmptyResponseError = EmptyResponseError; exports.CircuitBreakerError = CircuitBreakerError; exports.HostPolicyDeniedError = HostPolicyDeniedError; exports.ResolutionError = ResolutionError; exports.PaginationLimitError = PaginationLimitError; exports.QueryTooLongError = QueryTooLongError; exports.parseVendorErrors = parseVendorErrors; exports.isDeterministicVendor500 = isDeterministicVendor500; exports.formatVendorDetail = formatVendorDetail; exports.CREDENTIAL_SHAPE_POINTER = CREDENTIAL_SHAPE_POINTER; exports.mergeDetails = mergeDetails; exports.errorFromStatus = errorFromStatus; exports.StaleObjectError = StaleObjectError; exports.ConfirmationRequiredError = ConfirmationRequiredError; exports.DeleteBoundaryError = DeleteBoundaryError; exports.MarkerUnsafeIdError = MarkerUnsafeIdError; exports.RecoveryTruncatedError = RecoveryTruncatedError; exports.isAutotaskError = isAutotaskError; exports.hasSurroundingQuotes = hasSurroundingQuotes; exports.credentialShapeProblem = credentialShapeProblem; exports.CREDENTIAL_ENV_LOAD_ACTION = CREDENTIAL_ENV_LOAD_ACTION; exports.MIN_PREFIX_SUMMARY_LENGTH = MIN_PREFIX_SUMMARY_LENGTH; exports.credentialValueSummary = credentialValueSummary; exports.FIELD_CACHE_KINDS = FIELD_CACHE_KINDS; exports.DEFAULT_CIRCUIT_BREAKER_WINDOW_MS = DEFAULT_CIRCUIT_BREAKER_WINDOW_MS; exports.DEFAULT_CIRCUIT_BREAKER_FAILURE_THRESHOLD = DEFAULT_CIRCUIT_BREAKER_FAILURE_THRESHOLD; exports.DEFAULT_CIRCUIT_BREAKER_OPEN_TIMEOUT_MS = DEFAULT_CIRCUIT_BREAKER_OPEN_TIMEOUT_MS; exports.DEFAULT_CIRCUIT_BREAKER_SUCCESSES_TO_CLOSE = DEFAULT_CIRCUIT_BREAKER_SUCCESSES_TO_CLOSE; exports.DEFAULT_CIRCUIT_BREAKER_MAX_ENTRIES = DEFAULT_CIRCUIT_BREAKER_MAX_ENTRIES; exports.InMemoryCircuitBreakerStore = InMemoryCircuitBreakerStore; exports.defaultCircuitBreakerStore = defaultCircuitBreakerStore; exports.resetDefaultCircuitBreakerStore = resetDefaultCircuitBreakerStore; exports.buildBreakerKey = buildBreakerKey; exports.isBreakerFailure = isBreakerFailure; exports.DEFAULT_COOLDOWN_MAX_MS = DEFAULT_COOLDOWN_MAX_MS; exports.DEFAULT_COOLDOWN_DEFAULT_MS = DEFAULT_COOLDOWN_DEFAULT_MS; exports.DEFAULT_COOLDOWN_MAX_ENTRIES = DEFAULT_COOLDOWN_MAX_ENTRIES; exports.InMemoryCooldownStore = InMemoryCooldownStore; exports.defaultCooldownStore = defaultCooldownStore; exports.resetDefaultCooldownStore = resetDefaultCooldownStore; exports.buildTenantKey = buildTenantKey; exports.cooldownDurationMs = cooldownDurationMs; exports.ZONE_CATALOG = ZONE_CATALOG; exports.ZONES = ZONES; exports.DEFAULT_ZONE = DEFAULT_ZONE; exports.AGENT_PROFILE = AGENT_PROFILE; exports.DEFAULT_PAGE_SIZE = DEFAULT_PAGE_SIZE; exports.MAX_PAGE_SIZE = MAX_PAGE_SIZE; exports.DEFAULT_TIMEOUT_MS = DEFAULT_TIMEOUT_MS; exports.DEFAULT_MAX_RETRIES = DEFAULT_MAX_RETRIES; exports.DEFAULT_MAINTENANCE_MAX_WAIT_MS = DEFAULT_MAINTENANCE_MAX_WAIT_MS; exports.DEFAULT_MAINTENANCE_POLL_MS = DEFAULT_MAINTENANCE_POLL_MS; exports.MAINTENANCE_WINDOW_MAX_MS = MAINTENANCE_WINDOW_MAX_MS; exports.DEFAULT_MAX_CONCURRENT = DEFAULT_MAX_CONCURRENT; exports.DEFAULT_MAX_RESPONSE_BYTES = DEFAULT_MAX_RESPONSE_BYTES; exports.DEFAULT_MAX_SCAN_RECORDS = DEFAULT_MAX_SCAN_RECORDS; exports.DEFAULT_MAX_SCAN_PAGES = DEFAULT_MAX_SCAN_PAGES; exports.DEFAULT_READ_CACHE_TTL_MS = DEFAULT_READ_CACHE_TTL_MS; exports.DEFAULT_FIELD_CACHE_TTL_MS = DEFAULT_FIELD_CACHE_TTL_MS; exports.DEFAULT_RESOURCE_NAME_CACHE_TTL_MS = DEFAULT_RESOURCE_NAME_CACHE_TTL_MS; exports.zoneUrl = zoneUrl; exports.resolveBaseUrl = resolveBaseUrl; exports.resolveCredentials = resolveCredentials; exports.resolveConfig = resolveConfig; exports.isRecord = isRecord2; exports.assertRecord = assertRecord; exports.deepMergeParams = deepMergeParams; exports.isIdentifierCandidate = isIdentifierCandidate; exports.parseIdentifier = parseIdentifier; exports.flattenUdfs = flattenUdfs; exports.newCorrelationId = newCorrelationId; exports.redactAuditBody = redactAuditBody; exports.camelKey = camelKey; exports.FILTER_OPERATORS = FILTER_OPERATORS; exports.GROUPING_OPERATORS = GROUPING_OPERATORS; exports.MAX_OR_CONDITIONS = MAX_OR_CONDITIONS; exports.MAX_UDF_PER_QUERY = MAX_UDF_PER_QUERY; exports.MAX_QUERY_LENGTH = MAX_QUERY_LENGTH; exports.MAX_GET_LENGTH = MAX_GET_LENGTH; exports.MAX_FIELD_LENGTH = MAX_FIELD_LENGTH; exports.isFilterOperator = isFilterOperator; exports.serializeFilter = serializeFilter; exports.validateFilter = validateFilter; exports.buildFilter = buildFilter; exports.normalizedConditions = normalizedConditions; exports.RELATIONSHIP_ZONE = RELATIONSHIP_ZONE; exports.RELATIONSHIP_MAP = RELATIONSHIP_MAP; exports.BLIND_SURFACE_STAMPS = BLIND_SURFACE_STAMPS; exports.DELETE_BOUNDARY_NOTES = DELETE_BOUNDARY_NOTES; exports.MARKER_FIELDS = MARKER_FIELDS; exports.EMPTY_REASON_STAMPS = EMPTY_REASON_STAMPS; exports.BLIND_SURFACE_INVENTORY = BLIND_SURFACE_INVENTORY; exports.REACHABILITY_PROBE_DEFAULTS = REACHABILITY_PROBE_DEFAULTS; exports.CREATE_GUIDANCE = CREATE_GUIDANCE; exports.UNTRUSTED_FIELDS_BY_RESOURCE = UNTRUSTED_FIELDS_BY_RESOURCE; exports.IDEMPOTENT_METHODS = IDEMPOTENT_METHODS; exports.buildUrl = buildUrl; exports.cursorToPath = cursorToPath; exports.buildQueryBody = buildQueryBody; exports.buildQueryRequest = buildQueryRequest; exports.runWithSignal = runWithSignal; exports.HttpClient = HttpClient; exports.unwrapItems = unwrapItems; exports.unwrapItem = unwrapItem; exports.unwrapQueryCount = unwrapQueryCount; exports.unwrapOperation = unwrapOperation; exports.passthrough = passthrough; exports.MAX_PAGES = MAX_PAGES; exports.clampPageSize = clampPageSize; exports.totalPagesFor = totalPagesFor; exports.paginate = paginate; exports.paginateItems = paginateItems; exports.collectAll = collectAll; exports.toArray = toArray; exports.FIELD_PRESETS = FIELD_PRESETS; exports.FIELD_PRESET_NAMES = FIELD_PRESET_NAMES; exports.resolveFieldsPreset = resolveFieldsPreset; exports.BOUNDED_QUERY_MAX_LIMIT = BOUNDED_QUERY_MAX_LIMIT; exports.truncateNoteChars = truncateNoteChars; exports.buildDryRunResult = buildDryRunResult; exports.mergePartialBody = mergePartialBody; exports.blindStampFor = blindStampFor; exports.decodeFileData = decodeFileData; exports.BaseResource = BaseResource; exports.EXPAND_RESOURCE_NAMES_MAX_IDS = EXPAND_RESOURCE_NAMES_MAX_IDS; exports.expandResourceNames = expandResourceNames; exports.WORKFLOW_RESOURCES = WORKFLOW_RESOURCES; exports.MAX_FIELD_CATALOG_WIRE = MAX_FIELD_CATALOG_WIRE; exports.FIELD_CATALOG_HONESTY_NOTE = FIELD_CATALOG_HONESTY_NOTE; exports.fieldCatalog = fieldCatalog; exports.PICKLIST_VALUE_NOT_SERVED_NOTE = PICKLIST_VALUE_NOT_SERVED_NOTE; exports.TICKET_LABEL_FIELDS = TICKET_LABEL_FIELDS; exports.createNamePlan = createNamePlan; exports.addNameSibling = addNameSibling; exports.addLabelSibling = addLabelSibling; exports.resolveCompositeNames = resolveCompositeNames; exports.MODEL_FIELD_SETS = MODEL_FIELD_SETS; exports.MODEL_DATE_FIELDS = MODEL_DATE_FIELDS; exports.FETCH_MANY_MAX_ITEMS = FETCH_MANY_MAX_ITEMS; exports.validateFetchManyItems = validateFetchManyItems; exports.fetchMany = fetchMany; exports.FETCH_BY_IDS_MAX_ITEMS = FETCH_BY_IDS_MAX_ITEMS; exports.FETCH_BY_IDS_CHUNK_SIZE = FETCH_BY_IDS_CHUNK_SIZE; exports.fetchByIds = fetchByIds;
|