node-autotask 0.39.0 → 0.39.2
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_MANIFEST.md +4 -4
- package/N8N_MCP_MANIFEST.json +2 -2
- package/N8N_MCP_MANIFEST.md +3 -3
- package/capabilities.json +144 -144
- package/dist/capabilities.cjs +2 -2
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-45PLS73K.cjs → chunk-5QS3VT34.cjs} +160 -110
- package/dist/{chunk-2KQS3RHQ.js → chunk-GDSCYY2G.js} +143 -143
- package/dist/{chunk-LD5UPSDB.js → chunk-GSGP2B4I.js} +2 -2
- package/dist/{chunk-6ROB5KXB.cjs → chunk-HSBIVZGJ.cjs} +285 -285
- package/dist/{chunk-OKFTECIE.js → chunk-I7IM342A.js} +2 -2
- package/dist/{chunk-KSNK6UEW.cjs → chunk-N2JOGUGI.cjs} +143 -143
- package/dist/{chunk-FV5PJLIZ.js → chunk-UNOQESFU.js} +73 -23
- package/dist/{chunk-RAZEXOLC.cjs → chunk-VR6RYXTD.cjs} +143 -143
- package/dist/{index-Bmoiwhx2.d.ts → index-BsyWsYWi.d.cts} +7180 -51
- package/dist/{index-BVOOHPvr.d.cts → index-BsyWsYWi.d.ts} +7180 -51
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +4 -4
- package/dist/operations/index.cjs +179 -177
- package/dist/operations/index.d.cts +3 -221
- package/dist/operations/index.d.ts +3 -221
- package/dist/operations/index.js +4 -2
- package/dist/pool.cjs +9 -9
- package/dist/pool.d.cts +1 -2
- package/dist/pool.d.ts +1 -2
- package/dist/pool.js +4 -4
- package/dist/resources/index.cjs +4 -4
- package/dist/resources/index.d.cts +1 -2
- package/dist/resources/index.d.ts +1 -2
- package/dist/resources/index.js +3 -3
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/docs/API.md +49 -10
- package/package.json +1 -1
- package/dist/index-BQVStxwi.d.cts +0 -6893
- package/dist/index-BQVStxwi.d.ts +0 -6893
|
@@ -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(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await 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; } async function _asyncOptionalChain(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 = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkVR6RYXTDcjs = require('./chunk-VR6RYXTD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkMJTKK3QGcjs = require('./chunk-MJTKK3QG.cjs');
|
|
@@ -17853,7 +17853,7 @@ function buildEntityTypeMap() {
|
|
|
17853
17853
|
}
|
|
17854
17854
|
var ENTITY_TYPE_TO_RESOURCE = buildEntityTypeMap();
|
|
17855
17855
|
var ENUMERABLE_RESOURCES = new Set(
|
|
17856
|
-
|
|
17856
|
+
_chunkVR6RYXTDcjs.CAPABILITIES.filter((rec) => rec.resource !== "operations" && (rec.operation === "query" || rec.operation === "get")).map(
|
|
17857
17857
|
(rec) => rec.resource
|
|
17858
17858
|
)
|
|
17859
17859
|
);
|
|
@@ -17941,7 +17941,7 @@ function capabilitySets() {
|
|
|
17941
17941
|
const fieldOps = /* @__PURE__ */ new Map();
|
|
17942
17942
|
const udfCapable = /* @__PURE__ */ new Set();
|
|
17943
17943
|
const resources = /* @__PURE__ */ new Set();
|
|
17944
|
-
for (const rec of
|
|
17944
|
+
for (const rec of _chunkVR6RYXTDcjs.CAPABILITIES) {
|
|
17945
17945
|
if (rec.resource === "operations") continue;
|
|
17946
17946
|
resources.add(rec.resource);
|
|
17947
17947
|
if (rec.operation === "getFieldInfo") fieldOps.set(rec.resource, rec);
|
|
@@ -17953,7 +17953,7 @@ var derivedIndex = null;
|
|
|
17953
17953
|
function derivedFieldsFor(resource) {
|
|
17954
17954
|
if (derivedIndex === null) {
|
|
17955
17955
|
derivedIndex = /* @__PURE__ */ new Map();
|
|
17956
|
-
for (const rec of
|
|
17956
|
+
for (const rec of _chunkVR6RYXTDcjs.CAPABILITIES) {
|
|
17957
17957
|
const declared = _optionalChain([rec, 'access', _136 => _136.metadata, 'optionalAccess', _137 => _137.derivedFields]);
|
|
17958
17958
|
if (!Array.isArray(declared) || derivedIndex.has(rec.resource)) continue;
|
|
17959
17959
|
const rows = [];
|
|
@@ -20530,6 +20530,7 @@ var BaseResource = class extends MutationBase {
|
|
|
20530
20530
|
|
|
20531
20531
|
// src/operations/compositeNames.ts
|
|
20532
20532
|
var PICKLIST_VALUE_NOT_SERVED_NOTE = "The picklist is served to this API user, but this record's value is not in it (an inactive or unexposed value) \u2014 the label cannot be resolved and is null; refreshing the field catalog will not surface it. (A picklist the vendor does not expose at all is reported with the field-catalog honesty note instead.)";
|
|
20533
|
+
var PICKLIST_CATALOG_UNAVAILABLE_NOTE = "The field-catalog read that serves picklist labels failed for this call, so this label is unavailable (null), not absent: the value may well have one. Retry the call once the catalog read succeeds (see names.catalogError).";
|
|
20533
20534
|
var DEFAULT_MAX_NAME_READS = 20;
|
|
20534
20535
|
var TICKET_LABEL_FIELDS = ["status", "priority", "ticketType", "issueType", "subIssueType", "source", "queueID"];
|
|
20535
20536
|
function isVendorId(value) {
|
|
@@ -20556,7 +20557,7 @@ function createNamePlan(labelFields = [], labelResource) {
|
|
|
20556
20557
|
...lineOfBusinessContractId !== void 0 ? { lineOfBusinessContractId } : {}
|
|
20557
20558
|
}),
|
|
20558
20559
|
addResource: (value) => {
|
|
20559
|
-
if (!isVendorId(value)) return;
|
|
20560
|
+
if (!isVendorId(value) || Number(value) === 0) return;
|
|
20560
20561
|
const k = String(value);
|
|
20561
20562
|
if (!resSeen.has(k)) {
|
|
20562
20563
|
resSeen.add(k);
|
|
@@ -20564,7 +20565,7 @@ function createNamePlan(labelFields = [], labelResource) {
|
|
|
20564
20565
|
}
|
|
20565
20566
|
},
|
|
20566
20567
|
addFk: (table, value) => {
|
|
20567
|
-
if (!isVendorId(value)) return;
|
|
20568
|
+
if (!isVendorId(value) || Number(value) === 0) return;
|
|
20568
20569
|
const k = `${table}:${String(value)}`;
|
|
20569
20570
|
if (!fkSeen.has(k)) {
|
|
20570
20571
|
fkSeen.add(k);
|
|
@@ -20786,23 +20787,30 @@ async function resolveCompositeNames(http, plan, opts = {}) {
|
|
|
20786
20787
|
const picklists = {};
|
|
20787
20788
|
if (plan.labelFields.length > 0) {
|
|
20788
20789
|
let usable = true;
|
|
20790
|
+
let failure;
|
|
20789
20791
|
try {
|
|
20790
20792
|
const labelResource = _nullishCoalesce(plan.labelResource, () => ( "tickets"));
|
|
20791
20793
|
const catalog = await fieldCatalog(client, { resources: [labelResource], labels: true, fields: [...plan.labelFields] });
|
|
20792
20794
|
const row = catalog.rows.find((r) => r.resource === labelResource);
|
|
20793
20795
|
if (row === void 0 || row.error !== null || row.fields === void 0) {
|
|
20794
20796
|
usable = false;
|
|
20797
|
+
failure = _nullishCoalesce(_optionalChain([row, 'optionalAccess', _197 => _197.error]), () => ( { code: "INVALID_RESPONSE", message: `fieldCatalog: no ${labelResource} row` }));
|
|
20795
20798
|
} else {
|
|
20796
20799
|
for (const f of plan.labelFields) {
|
|
20797
20800
|
const frow = row.fields.find((x) => x.name === f);
|
|
20798
|
-
picklists[f] = _optionalChain([frow, 'optionalAccess',
|
|
20801
|
+
picklists[f] = _optionalChain([frow, 'optionalAccess', _198 => _198.picklistValues]);
|
|
20799
20802
|
}
|
|
20800
20803
|
}
|
|
20801
20804
|
} catch (err) {
|
|
20802
|
-
if (isAutotaskError(err) && err.code !== "ABORTED")
|
|
20803
|
-
|
|
20805
|
+
if (isAutotaskError(err) && err.code !== "ABORTED") {
|
|
20806
|
+
usable = false;
|
|
20807
|
+
failure = { code: err.code, message: err.message };
|
|
20808
|
+
} else throw err;
|
|
20809
|
+
}
|
|
20810
|
+
if (!usable) {
|
|
20811
|
+
section.catalogError = failure;
|
|
20812
|
+
for (const f of plan.labelFields) section.reasons[f] = PICKLIST_CATALOG_UNAVAILABLE_NOTE;
|
|
20804
20813
|
}
|
|
20805
|
-
if (!usable) for (const f of plan.labelFields) section.reasons[f] = FIELD_CATALOG_HONESTY_NOTE;
|
|
20806
20814
|
}
|
|
20807
20815
|
let lineOfBusiness2 = null;
|
|
20808
20816
|
const lobId = _nullishCoalesce(plan.lineOfBusinessId, () => ( contractLobPointer));
|
|
@@ -20829,18 +20837,18 @@ async function resolveCompositeNames(http, plan, opts = {}) {
|
|
|
20829
20837
|
return {
|
|
20830
20838
|
section,
|
|
20831
20839
|
lineOfBusiness: lineOfBusiness2,
|
|
20832
|
-
resourceName: (id) => _nullishCoalesce(_optionalChain([section, 'access',
|
|
20833
|
-
recordName: (table, id) => _nullishCoalesce(_optionalChain([section, 'access',
|
|
20840
|
+
resourceName: (id) => _nullishCoalesce(_optionalChain([section, 'access', _199 => _199.rows, 'access', _200 => _200[`resource:${id}`], 'optionalAccess', _201 => _201.name]), () => ( null)),
|
|
20841
|
+
recordName: (table, id) => _nullishCoalesce(_optionalChain([section, 'access', _202 => _202.rows, 'access', _203 => _203[`${table}:${id}`], 'optionalAccess', _204 => _204.name]), () => ( null)),
|
|
20834
20842
|
labelFor: (field, value) => {
|
|
20835
20843
|
if (value === null || value === void 0) return null;
|
|
20836
20844
|
const values = picklists[field];
|
|
20837
20845
|
if (values === void 0) {
|
|
20838
|
-
section.reasons[field] = FIELD_CATALOG_HONESTY_NOTE;
|
|
20846
|
+
section.reasons[field] = section.catalogError !== void 0 ? PICKLIST_CATALOG_UNAVAILABLE_NOTE : FIELD_CATALOG_HONESTY_NOTE;
|
|
20839
20847
|
return null;
|
|
20840
20848
|
}
|
|
20841
20849
|
const hit = values.find((v) => String(v.value) === String(value));
|
|
20842
20850
|
if (hit === void 0) {
|
|
20843
|
-
section.reasons[field] = PICKLIST_VALUE_NOT_SERVED_NOTE;
|
|
20851
|
+
if (String(value) !== "0") section.reasons[field] = PICKLIST_VALUE_NOT_SERVED_NOTE;
|
|
20844
20852
|
return null;
|
|
20845
20853
|
}
|
|
20846
20854
|
return typeof hit.label === "string" ? hit.label : null;
|
|
@@ -20861,6 +20869,7 @@ function untrustedName(name) {
|
|
|
20861
20869
|
const [[capped]] = truncateNoteChars([{ v: name }], LABEL_NAME_MAX_CHARS, ["v"]);
|
|
20862
20870
|
return _nullishCoalesce(_chunkMJTKK3QGcjs.wrapUntrusted.call(void 0, capped.v), () => ( capped.v));
|
|
20863
20871
|
}
|
|
20872
|
+
var lastPicklists = /* @__PURE__ */ new WeakMap();
|
|
20864
20873
|
function readNamesOpt(value, where) {
|
|
20865
20874
|
if (value === void 0) return true;
|
|
20866
20875
|
if (typeof value !== "boolean") {
|
|
@@ -20873,17 +20882,31 @@ async function labelRows(client, resourceKey, rows) {
|
|
|
20873
20882
|
for (const row of rows) for (const k of Object.keys(row)) keys.add(k);
|
|
20874
20883
|
if (keys.size === 0) return { rows: [...rows] };
|
|
20875
20884
|
let picklistFields = [];
|
|
20885
|
+
let unavailable = [];
|
|
20886
|
+
let catalogError;
|
|
20876
20887
|
const modelFields = _nullishCoalesce(MODEL_FIELD_SETS[resourceKey], () => ( []));
|
|
20877
20888
|
const candidates = [...keys].filter((f) => f !== "id" && modelFields.includes(f) && ROW_FK_TABLES[f] === void 0 && !isResourceFkField(f));
|
|
20878
20889
|
if (candidates.length > 0) try {
|
|
20879
20890
|
const catalog = await fieldCatalog(client, { resources: [resourceKey], labels: true });
|
|
20880
|
-
const
|
|
20881
|
-
|
|
20891
|
+
const row = catalog.rows.find((r) => r.resource === resourceKey);
|
|
20892
|
+
const known = _nullishCoalesce(lastPicklists.get(client), () => ( /* @__PURE__ */ new Map()));
|
|
20893
|
+
lastPicklists.set(client, known);
|
|
20894
|
+
if (_optionalChain([row, 'optionalAccess', _205 => _205.fields]) === void 0) {
|
|
20895
|
+
const last = known.get(resourceKey);
|
|
20896
|
+
unavailable = (_nullishCoalesce(last, () => ( []))).filter((f) => candidates.includes(f));
|
|
20897
|
+
if (last === void 0 || unavailable.length > 0) {
|
|
20898
|
+
catalogError = _nullishCoalesce(_optionalChain([row, 'optionalAccess', _206 => _206.error]), () => ( { code: "INVALID_RESPONSE", message: `fieldCatalog: no ${resourceKey} row` }));
|
|
20899
|
+
}
|
|
20900
|
+
} else {
|
|
20901
|
+
const all = row.fields.filter((f) => f.isPickList).map((f) => f.name);
|
|
20902
|
+
known.set(resourceKey, all);
|
|
20903
|
+
picklistFields = all.filter((f) => candidates.includes(f));
|
|
20904
|
+
}
|
|
20882
20905
|
} catch (err) {
|
|
20883
20906
|
if (!isAutotaskError(err) || err.code === "ABORTED") throw err;
|
|
20884
20907
|
}
|
|
20885
|
-
const labelled = (field) => picklistFields.includes(field) || ROW_FK_TABLES[field] !== void 0 || isResourceFkField(field);
|
|
20886
|
-
if (![...keys].some(labelled)) return { rows: [...rows] };
|
|
20908
|
+
const labelled = (field) => picklistFields.includes(field) || unavailable.includes(field) || ROW_FK_TABLES[field] !== void 0 || isResourceFkField(field);
|
|
20909
|
+
if (catalogError === void 0 && ![...keys].some(labelled)) return { rows: [...rows] };
|
|
20887
20910
|
const builder = createNamePlan(picklistFields, resourceKey);
|
|
20888
20911
|
for (const row of rows) {
|
|
20889
20912
|
for (const [field, value] of Object.entries(row)) {
|
|
@@ -20895,11 +20918,18 @@ async function labelRows(client, resourceKey, rows) {
|
|
|
20895
20918
|
}
|
|
20896
20919
|
const plan = builder.plan();
|
|
20897
20920
|
const names = plan.resourceIds.length === 0 && plan.recordFks.length === 0 && picklistFields.length === 0 ? void 0 : await resolveCompositeNames(client.http, plan);
|
|
20921
|
+
const secondReadFailed = _optionalChain([names, 'optionalAccess', _207 => _207.section, 'access', _208 => _208.catalogError]);
|
|
20922
|
+
if (secondReadFailed !== void 0) {
|
|
20923
|
+
catalogError ??= secondReadFailed;
|
|
20924
|
+
unavailable = [.../* @__PURE__ */ new Set([...unavailable, ...picklistFields])];
|
|
20925
|
+
}
|
|
20898
20926
|
const out = rows.map((row) => {
|
|
20899
20927
|
const r = { ...row };
|
|
20900
20928
|
for (const [field, value] of Object.entries(row)) {
|
|
20901
|
-
const
|
|
20902
|
-
if (picklistFields.includes(field)) r[`${field}Label`] =
|
|
20929
|
+
const has2 = value !== null && value !== void 0 && names !== void 0;
|
|
20930
|
+
if (picklistFields.includes(field)) r[`${field}Label`] = has2 ? names.labelFor(field, value) : null;
|
|
20931
|
+
else if (unavailable.includes(field)) r[`${field}Label`] = null;
|
|
20932
|
+
const set = has2 && value !== 0 && value !== "0";
|
|
20903
20933
|
const table = ROW_FK_TABLES[field];
|
|
20904
20934
|
if (table !== void 0) r[`${field}Name`] = set && isVendorId(value) ? untrustedName(names.recordName(table, value)) : null;
|
|
20905
20935
|
else if (isResourceFkField(field)) r[`${field}Name`] = set && isVendorId(value) ? untrustedName(names.resourceName(value)) : null;
|
|
@@ -20907,16 +20937,28 @@ async function labelRows(client, resourceKey, rows) {
|
|
|
20907
20937
|
if (r["assignedResourceIDName"] !== void 0) r["assignedResourceName"] = r["assignedResourceIDName"];
|
|
20908
20938
|
return r;
|
|
20909
20939
|
});
|
|
20910
|
-
|
|
20911
|
-
const
|
|
20912
|
-
const reasons = names.section.reasons;
|
|
20913
|
-
|
|
20940
|
+
const capped = names === void 0 ? 0 : Object.values(names.section.rows).filter((row) => row.capped).length;
|
|
20941
|
+
const unresolved = Object.keys(_nullishCoalesce(_optionalChain([names, 'optionalAccess', _209 => _209.section, 'access', _210 => _210.reasons]), () => ( {})));
|
|
20942
|
+
const reasons = { ..._optionalChain([names, 'optionalAccess', _211 => _211.section, 'access', _212 => _212.reasons]) };
|
|
20943
|
+
for (const f of unavailable) reasons[f] = PICKLIST_CATALOG_UNAVAILABLE_NOTE;
|
|
20944
|
+
if (capped === 0 && unresolved.length === 0 && catalogError === void 0) return { rows: out };
|
|
20914
20945
|
const parts = [];
|
|
20915
20946
|
if (capped > 0) parts.push(`${capped} id(s) left unlabelled (their *Name is null): the per-call cap of ${DEFAULT_MAX_NAME_READS} uncached name reads was hit \u2014 names already read are cached, so repeating or narrowing the call labels more`);
|
|
20916
|
-
if (
|
|
20947
|
+
if (unresolved.length > 0) parts.push(`picklist label(s) unavailable for ${unresolved.join(", ")} (see reasons)`);
|
|
20948
|
+
if (catalogError !== void 0) {
|
|
20949
|
+
parts.push(
|
|
20950
|
+
`the ${resourceKey} field catalog read failed (${catalogError.code}), so picklist labels are unavailable for this call, not absent: ` + (unavailable.length > 0 ? `the *Label is null for ${unavailable.join(", ")}` : "no *Label sibling was added (the picklist fields are unknown until a catalog read succeeds)") + " \u2014 retry the call to label them"
|
|
20951
|
+
);
|
|
20952
|
+
}
|
|
20917
20953
|
return {
|
|
20918
20954
|
rows: out,
|
|
20919
|
-
names: {
|
|
20955
|
+
names: {
|
|
20956
|
+
truncated: capped > 0,
|
|
20957
|
+
capped,
|
|
20958
|
+
note: parts.join("; "),
|
|
20959
|
+
...Object.keys(reasons).length > 0 ? { reasons } : {},
|
|
20960
|
+
...catalogError !== void 0 ? { catalogError } : {}
|
|
20961
|
+
}
|
|
20920
20962
|
};
|
|
20921
20963
|
}
|
|
20922
20964
|
async function labelFetchResults(client, result) {
|
|
@@ -20926,20 +20968,27 @@ async function labelFetchResults(client, result) {
|
|
|
20926
20968
|
});
|
|
20927
20969
|
const results = [...result.results];
|
|
20928
20970
|
const summaries = [];
|
|
20971
|
+
const reasons = {};
|
|
20972
|
+
const catalogErrors = {};
|
|
20929
20973
|
for (const [resource, indices] of byResource) {
|
|
20930
20974
|
const labelled = await labelRows(client, resource, indices.map((i) => results[i].value));
|
|
20931
20975
|
indices.forEach((idx, j) => {
|
|
20932
20976
|
results[idx] = { ...results[idx], value: labelled.rows[j] };
|
|
20933
20977
|
});
|
|
20934
|
-
if (labelled.names !== void 0)
|
|
20978
|
+
if (labelled.names !== void 0) {
|
|
20979
|
+
summaries.push(labelled.names);
|
|
20980
|
+
for (const [field, why] of Object.entries(_nullishCoalesce(labelled.names.reasons, () => ( {})))) reasons[`${resource}.${field}`] = why;
|
|
20981
|
+
if (labelled.names.catalogError !== void 0) catalogErrors[resource] = labelled.names.catalogError;
|
|
20982
|
+
}
|
|
20935
20983
|
}
|
|
20936
20984
|
if (summaries.length === 0) return { ...result, results };
|
|
20937
|
-
const
|
|
20985
|
+
const catalogError = Object.values(catalogErrors)[0];
|
|
20938
20986
|
const names = {
|
|
20939
20987
|
truncated: summaries.some((s) => s.truncated),
|
|
20940
20988
|
capped: summaries.reduce((n, s) => n + s.capped, 0),
|
|
20941
20989
|
note: summaries.map((s) => s.note).join("; "),
|
|
20942
|
-
...Object.keys(reasons).length > 0 ? { reasons } : {}
|
|
20990
|
+
...Object.keys(reasons).length > 0 ? { reasons } : {},
|
|
20991
|
+
...catalogError !== void 0 ? { catalogError, catalogErrors } : {}
|
|
20943
20992
|
};
|
|
20944
20993
|
return { ...result, results, names };
|
|
20945
20994
|
}
|
|
@@ -20969,7 +21018,7 @@ var BillingCodesResource = class extends BaseResource {
|
|
|
20969
21018
|
}
|
|
20970
21019
|
/** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
|
|
20971
21020
|
async get(id, opts = {}) {
|
|
20972
|
-
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess',
|
|
21021
|
+
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess', _213 => _213.fresh]) === true);
|
|
20973
21022
|
}
|
|
20974
21023
|
/** Resolve a BillingCode from a numeric id (or, where the vendor indexes a primary text field,
|
|
20975
21024
|
* from an exact match on name). A numeric id miss throws NOT_FOUND; a complete
|
|
@@ -20984,7 +21033,7 @@ var BillingCodesResource = class extends BaseResource {
|
|
|
20984
21033
|
/** Search BillingCode records: bounded contains on name (no vendor free-text search exists);
|
|
20985
21034
|
* limit defaults to 25, max 500. */
|
|
20986
21035
|
async search(query, opts) {
|
|
20987
|
-
return this.searchBase(query, { limit: _optionalChain([opts, 'optionalAccess',
|
|
21036
|
+
return this.searchBase(query, { limit: _optionalChain([opts, 'optionalAccess', _214 => _214.limit]) });
|
|
20988
21037
|
}
|
|
20989
21038
|
};
|
|
20990
21039
|
|
|
@@ -21288,28 +21337,28 @@ async function customRangeQuery(http, path, field, from, to, limit, operation, z
|
|
|
21288
21337
|
|
|
21289
21338
|
// src/resources/special/billing_items.ts
|
|
21290
21339
|
async function windowQuery(_resource, kind, http, opts) {
|
|
21291
|
-
const now = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
21292
|
-
const tz = _optionalChain([opts, 'optionalAccess',
|
|
21340
|
+
const now = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _215 => _215.now]), () => ( /* @__PURE__ */ new Date()));
|
|
21341
|
+
const tz = _optionalChain([opts, 'optionalAccess', _216 => _216.tz]) === void 0 ? void 0 : validateZone(opts.tz, `billing_items.${kind}`);
|
|
21293
21342
|
return dateWindowQuery(
|
|
21294
21343
|
http,
|
|
21295
21344
|
"/V1.0/BillingItems/query",
|
|
21296
21345
|
"itemDate",
|
|
21297
21346
|
kind,
|
|
21298
|
-
clampWindowLimit(_optionalChain([opts, 'optionalAccess',
|
|
21347
|
+
clampWindowLimit(_optionalChain([opts, 'optionalAccess', _217 => _217.limit])),
|
|
21299
21348
|
`billing_items.${kind}`,
|
|
21300
21349
|
now,
|
|
21301
21350
|
tz
|
|
21302
21351
|
);
|
|
21303
21352
|
}
|
|
21304
21353
|
async function customRange(_resource, from, to, http, opts) {
|
|
21305
|
-
const zone = _optionalChain([opts, 'optionalAccess',
|
|
21354
|
+
const zone = _optionalChain([opts, 'optionalAccess', _218 => _218.tz]) === void 0 ? void 0 : validateZone(opts.tz, "billing_items.customRange");
|
|
21306
21355
|
return customRangeQuery(
|
|
21307
21356
|
http,
|
|
21308
21357
|
"/V1.0/BillingItems/query",
|
|
21309
21358
|
"itemDate",
|
|
21310
21359
|
from,
|
|
21311
21360
|
to,
|
|
21312
|
-
clampWindowLimit(_optionalChain([opts, 'optionalAccess',
|
|
21361
|
+
clampWindowLimit(_optionalChain([opts, 'optionalAccess', _219 => _219.limit])),
|
|
21313
21362
|
"billing_items.customRange",
|
|
21314
21363
|
zone
|
|
21315
21364
|
);
|
|
@@ -21341,7 +21390,7 @@ var BillingItemsResource = class extends BaseResource {
|
|
|
21341
21390
|
}
|
|
21342
21391
|
/** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
|
|
21343
21392
|
async get(id, opts = {}) {
|
|
21344
|
-
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess',
|
|
21393
|
+
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess', _220 => _220.fresh]) === true);
|
|
21345
21394
|
}
|
|
21346
21395
|
/** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
|
|
21347
21396
|
* keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
|
|
@@ -21533,9 +21582,9 @@ async function searchByDomain(_resource, domain, opts = {}, http) {
|
|
|
21533
21582
|
return fetchCompanies(http, ids2, limit);
|
|
21534
21583
|
}
|
|
21535
21584
|
async function searchByIdentity(_resource, identity, opts = {}, http) {
|
|
21536
|
-
const name = _nullishCoalesce(_optionalChain([identity, 'access',
|
|
21537
|
-
const email = _nullishCoalesce(_optionalChain([identity, 'access',
|
|
21538
|
-
const website = _nullishCoalesce(_optionalChain([identity, 'access',
|
|
21585
|
+
const name = _nullishCoalesce(_optionalChain([identity, 'access', _221 => _221.companyName, 'optionalAccess', _222 => _222.trim, 'call', _223 => _223()]), () => ( ""));
|
|
21586
|
+
const email = _nullishCoalesce(_optionalChain([identity, 'access', _224 => _224.email, 'optionalAccess', _225 => _225.trim, 'call', _226 => _226()]), () => ( ""));
|
|
21587
|
+
const website = _nullishCoalesce(_optionalChain([identity, 'access', _227 => _227.website, 'optionalAccess', _228 => _228.trim, 'call', _229 => _229()]), () => ( ""));
|
|
21539
21588
|
if (name === "" && email === "" && website === "") {
|
|
21540
21589
|
throw new AutotaskConfigError("searchByIdentity: at least one of companyName / email / website is required");
|
|
21541
21590
|
}
|
|
@@ -21674,7 +21723,7 @@ function validateUpsertInput(companyName, params) {
|
|
|
21674
21723
|
if (typeof companyName !== "string" || companyName.trim() === "") {
|
|
21675
21724
|
throw new AutotaskConfigError("upsertByName: companyName is required (a non-empty string)", { operation: OP_UPSERT_NAME });
|
|
21676
21725
|
}
|
|
21677
|
-
if (typeof _optionalChain([params, 'optionalAccess',
|
|
21726
|
+
if (typeof _optionalChain([params, 'optionalAccess', _230 => _230.phone]) !== "string" || params.phone.trim() === "") {
|
|
21678
21727
|
throw new AutotaskConfigError("upsertByName: params.phone is required (a non-empty string \u2014 the ww29 live-required set is { companyName, companyType, phone, ownerResourceID })", { operation: OP_UPSERT_NAME });
|
|
21679
21728
|
}
|
|
21680
21729
|
const companyType = _nullishCoalesce(params.companyType, () => ( DEFAULT_COMPANY_TYPE));
|
|
@@ -21899,7 +21948,7 @@ function readIncludeNames(record, includeFields) {
|
|
|
21899
21948
|
function resolveAuthority(record, live) {
|
|
21900
21949
|
if (live !== null) return { known: live, authority: "the tenant's live entity field metadata" };
|
|
21901
21950
|
const vendored = MODEL_FIELD_SETS[record.resource];
|
|
21902
|
-
const liveOnlyExempt = Array.isArray(_optionalChain([record, 'access',
|
|
21951
|
+
const liveOnlyExempt = Array.isArray(_optionalChain([record, 'access', _231 => _231.metadata, 'optionalAccess', _232 => _232.liveOnlyFields])) ? record.metadata.liveOnlyFields : [];
|
|
21903
21952
|
if (vendored === void 0) return void 0;
|
|
21904
21953
|
return {
|
|
21905
21954
|
known: [...vendored, ...liveOnlyExempt],
|
|
@@ -21955,11 +22004,11 @@ var CLOSED_STATUS_LABELS = ["complete", "completed", "closed", "cancelled", "can
|
|
|
21955
22004
|
var OP = "tickets.statusSemantics";
|
|
21956
22005
|
function picklistOf(fields) {
|
|
21957
22006
|
if (!Array.isArray(fields)) return [];
|
|
21958
|
-
const status = fields.find((f) => typeof _optionalChain([f, 'optionalAccess',
|
|
22007
|
+
const status = fields.find((f) => typeof _optionalChain([f, 'optionalAccess', _233 => _233.name]) === "string" && f.name.toLowerCase() === "status");
|
|
21959
22008
|
if (status === void 0 || status.isPickList !== true || !Array.isArray(status.picklistValues)) return [];
|
|
21960
22009
|
const out = [];
|
|
21961
22010
|
for (const v of status.picklistValues) {
|
|
21962
|
-
const id = Number(_optionalChain([v, 'optionalAccess',
|
|
22011
|
+
const id = Number(_optionalChain([v, 'optionalAccess', _234 => _234.value]));
|
|
21963
22012
|
if (!Number.isSafeInteger(id)) continue;
|
|
21964
22013
|
out.push({ id, label: typeof v.label === "string" ? v.label : "" });
|
|
21965
22014
|
}
|
|
@@ -21975,11 +22024,11 @@ async function readFields(http, fresh) {
|
|
|
21975
22024
|
if (hit !== void 0) return hit;
|
|
21976
22025
|
}
|
|
21977
22026
|
const res = await http.request({ method: "GET", path: "/V1.0/Tickets/entityInformation/fields", operation: OP, maxRetries: 0 });
|
|
21978
|
-
const fields = _optionalChain([res, 'optionalAccess',
|
|
22027
|
+
const fields = _optionalChain([res, 'optionalAccess', _235 => _235.fields]);
|
|
21979
22028
|
if (!Array.isArray(fields)) {
|
|
21980
22029
|
throw new AutotaskError("Expected the FieldInformationResultModel envelope { fields: [] }; got a different shape", { code: "INVALID_RESPONSE", category: "server" });
|
|
21981
22030
|
}
|
|
21982
|
-
_optionalChain([cache, 'optionalAccess',
|
|
22031
|
+
_optionalChain([cache, 'optionalAccess', _236 => _236.set, 'call', _237 => _237(key, "fields", fields)]);
|
|
21983
22032
|
return fields;
|
|
21984
22033
|
}
|
|
21985
22034
|
function assumed(allowAssumed, operation) {
|
|
@@ -22131,7 +22180,7 @@ async function readOpenTickets(http, companyID, ticketLimit, includeFields, stat
|
|
|
22131
22180
|
closedStatus
|
|
22132
22181
|
};
|
|
22133
22182
|
if (openRows.length === 0) {
|
|
22134
|
-
const stamp = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access',
|
|
22183
|
+
const stamp = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access', _238 => _238["tickets"], 'optionalAccess', _239 => _239.query]), [{ field: "companyID", op: "eq", value: companyID }, openLeaf]);
|
|
22135
22184
|
if (stamp !== void 0) {
|
|
22136
22185
|
openTickets = {
|
|
22137
22186
|
items: openRows,
|
|
@@ -22301,7 +22350,7 @@ async function prepareCrmWrite(resource, input, http) {
|
|
|
22301
22350
|
const rows = await readRows(http, "/V1.0/CompanyLocations/query", [{ field: "companyID", op: "eq", value: companyID }]);
|
|
22302
22351
|
const items = rows.map((r) => ({ id: r.id, name: str(r.name), isPrimary: bool(r.isPrimary), isActive: bool(r.isActive), city: str(r.city), state: str(r.state), postalCode: str(r.postalCode) }));
|
|
22303
22352
|
const active = items.filter((l) => l.isActive !== false);
|
|
22304
|
-
const m = active.filter((l) => has(ct.city) && _optionalChain([l, 'access',
|
|
22353
|
+
const m = active.filter((l) => has(ct.city) && _optionalChain([l, 'access', _240 => _240.city, 'optionalAccess', _241 => _241.toLowerCase, 'call', _242 => _242()]) === String(ct.city).toLowerCase() || has(ct.postalCode) && l.postalCode === String(ct.postalCode));
|
|
22305
22354
|
const pick = has(ct.companyLocationID) ? { rule: "matched", locationID: ct.companyLocationID } : active.length === 1 ? { rule: "single", locationID: active[0].id } : active.length > 1 && m.length === 1 ? { rule: "matched", locationID: m[0].id } : active.length > 1 ? { rule: "ask", locationID: null } : { rule: "none", locationID: null };
|
|
22306
22355
|
locations = { items, pick };
|
|
22307
22356
|
if (input.intent === "add_contact" && pick.locationID === null) {
|
|
@@ -22336,7 +22385,7 @@ async function prepareCrmWrite(resource, input, http) {
|
|
|
22336
22385
|
}
|
|
22337
22386
|
}
|
|
22338
22387
|
if (input.intent === "create_company" && status !== "matched") {
|
|
22339
|
-
const eff = effectiveRequiredFields(null, _optionalChain([RELATIONSHIP_MAP, 'access',
|
|
22388
|
+
const eff = effectiveRequiredFields(null, _optionalChain([RELATIONSHIP_MAP, 'access', _243 => _243.companies, 'optionalAccess', _244 => _244.zoneFacts]));
|
|
22340
22389
|
const research = (f) => ["companyType", "ownerResourceID", "countryID"].includes(f) ? "lookup" : "web_if_available_else_ask";
|
|
22341
22390
|
const lookups = {
|
|
22342
22391
|
companyType: { via: "operations.fieldCatalog", resource: "companies", field: "companyType", labels: true, note: "map the user wording to one returned label; never hardcode ids" },
|
|
@@ -22358,16 +22407,16 @@ async function prepareCrmWrite(resource, input, http) {
|
|
|
22358
22407
|
}
|
|
22359
22408
|
let next = null;
|
|
22360
22409
|
const isInactive = (d) => d.isActive === false || d.isActive === 0;
|
|
22361
|
-
const dups = _nullishCoalesce(_optionalChain([contacts, 'optionalAccess',
|
|
22410
|
+
const dups = _nullishCoalesce(_optionalChain([contacts, 'optionalAccess', _245 => _245.duplicates]), () => ( []));
|
|
22362
22411
|
const sameCompany = companyID === null ? dups : dups.filter((d) => d.companyID === companyID);
|
|
22363
22412
|
const elsewhere = companyID === null ? [] : dups.filter((d) => d.companyID !== companyID && !isInactive(d));
|
|
22364
22413
|
if (input.intent === "add_contact" && sameCompany.length === 0 && elsewhere.length > 0) {
|
|
22365
|
-
needsInput.push({ field: "contact", why: `a contact with this ${_nullishCoalesce(_optionalChain([contacts, 'optionalAccess',
|
|
22414
|
+
needsInput.push({ field: "contact", why: `a contact with this ${_nullishCoalesce(_optionalChain([contacts, 'optionalAccess', _246 => _246.matchedBy]), () => ( "identity"))} is active at another company: update it, move it with contacts.moveToCompany, or confirm a second record`, source: "policy", lookup: { duplicates: elsewhere }, research: "ask" });
|
|
22366
22415
|
}
|
|
22367
22416
|
if (needsInput.length === 0) {
|
|
22368
22417
|
const dup = sameCompany[0];
|
|
22369
22418
|
if (input.intent === "create_company") next = status === "matched" ? { operation: "companies.update", note: "the company already exists: update it instead of creating" } : { operation: "companies.create", note: 'then re-run with intent add_contact: the vendor auto-creates a "Primary Address" location (rename it with company_locations.update; locations cannot be deleted via the API)' };
|
|
22370
|
-
else if (input.intent === "add_contact") next = dup ? { operation: "contacts.update", note: `a contact already matches by ${_nullishCoalesce(_optionalChain([contacts, 'optionalAccess',
|
|
22419
|
+
else if (input.intent === "add_contact") next = dup ? { operation: "contacts.update", note: `a contact already matches by ${_nullishCoalesce(_optionalChain([contacts, 'optionalAccess', _247 => _247.matchedBy]), () => ( "id"))} (id ${String(dup.id)}): update it, or move it with contacts.moveToCompany if it belongs to another company` } : { operation: "contacts.create", note: `set companyID ${String(companyID)} and companyLocationID ${String(_optionalChain([locations, 'optionalAccess', _248 => _248.pick, 'access', _249 => _249.locationID]))}` };
|
|
22371
22420
|
else if (input.intent === "update_contact") next = { operation: "contacts.update", note: "send only the changed fields" };
|
|
22372
22421
|
else next = { operation: "companies.update", note: "send only the changed fields" };
|
|
22373
22422
|
}
|
|
@@ -22487,7 +22536,7 @@ function validateUnbilledWorkOptions(companyId, opts) {
|
|
|
22487
22536
|
var OP3 = "companies.unbilledWork";
|
|
22488
22537
|
function unbilledWorkPartStatus(key, conditions, items) {
|
|
22489
22538
|
if (items.length !== 0) return { status: "ok" };
|
|
22490
|
-
const stamp = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access',
|
|
22539
|
+
const stamp = blindStampFor(_optionalChain([BLIND_SURFACE_STAMPS, 'access', _250 => _250[key], 'optionalAccess', _251 => _251.query]), conditions);
|
|
22491
22540
|
if (stamp !== void 0) return { status: "blind", blindSurface: stamp, note: stamp.note };
|
|
22492
22541
|
return {
|
|
22493
22542
|
status: "ok",
|
|
@@ -22737,7 +22786,7 @@ var CompaniesResource = class extends BaseResource {
|
|
|
22737
22786
|
}
|
|
22738
22787
|
/** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
|
|
22739
22788
|
async get(id, opts = {}) {
|
|
22740
|
-
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess',
|
|
22789
|
+
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess', _252 => _252.fresh]) === true);
|
|
22741
22790
|
}
|
|
22742
22791
|
/** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
|
|
22743
22792
|
* pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
|
|
@@ -22894,8 +22943,8 @@ function validateFetchManyItems(items, cap, opName = "fetchMany", capRef = `FETC
|
|
|
22894
22943
|
problems.push(`${at}.fields: must be an array of exact vendor field names (discover them via operations.fieldCatalog)`);
|
|
22895
22944
|
continue;
|
|
22896
22945
|
}
|
|
22897
|
-
if (_optionalChain([validation, 'optionalAccess',
|
|
22898
|
-
const authoritative = _nullishCoalesce(_optionalChain([validation, 'optionalAccess',
|
|
22946
|
+
if (_optionalChain([validation, 'optionalAccess', _253 => _253.fieldCheck]) !== false) {
|
|
22947
|
+
const authoritative = _nullishCoalesce(_optionalChain([validation, 'optionalAccess', _254 => _254.fieldSetsByResource, 'optionalAccess', _255 => _255.get, 'call', _256 => _256(resourceKey)]), () => ( fields));
|
|
22899
22948
|
for (const f of item.fields) {
|
|
22900
22949
|
if (!authoritative.includes(f)) {
|
|
22901
22950
|
problems.push(
|
|
@@ -23001,7 +23050,7 @@ function project3(value, fields) {
|
|
|
23001
23050
|
return out;
|
|
23002
23051
|
}
|
|
23003
23052
|
function resourcePathOf(key, holder) {
|
|
23004
|
-
const path = _optionalChain([holder, 'optionalAccess',
|
|
23053
|
+
const path = _optionalChain([holder, 'optionalAccess', _257 => _257.resourcePath]);
|
|
23005
23054
|
if (typeof path !== "string" || path === "") {
|
|
23006
23055
|
throw new AutotaskConfigError(`fetchByIds: the client exposes no ${key} resource path (registry drift)`, {
|
|
23007
23056
|
suggestedAction: "Rebuild the client from the SDK build that ships this registry (the resource set is pinned by the plan)."
|
|
@@ -23614,7 +23663,7 @@ var stampPart = (key, raw, conditions, extraNotes) => {
|
|
|
23614
23663
|
status: st.status,
|
|
23615
23664
|
blindSurface: st.blindSurface,
|
|
23616
23665
|
note: [st.note, ..._nullishCoalesce(extraNotes, () => ( []))].filter(Boolean).join(" | ") || void 0,
|
|
23617
|
-
emptyReason: raw.items.length === 0 && st.status === "ok" ? _optionalChain([EMPTY_REASON_STAMPS, 'access',
|
|
23666
|
+
emptyReason: raw.items.length === 0 && st.status === "ok" ? _optionalChain([EMPTY_REASON_STAMPS, 'access', _258 => _258[key], 'optionalAccess', _259 => _259.query]) : void 0
|
|
23618
23667
|
};
|
|
23619
23668
|
};
|
|
23620
23669
|
function appendWiresNote(wires, note) {
|
|
@@ -23679,7 +23728,7 @@ async function resolveContractType(ctx, contractType) {
|
|
|
23679
23728
|
if (contractType > 0) {
|
|
23680
23729
|
ctx.wires.issued += 1;
|
|
23681
23730
|
try {
|
|
23682
|
-
contractTypeLabel = await _asyncNullishCoalesce(await _asyncOptionalChain([(await readPicklists(ctx.http, "/V1.0/Contracts", ctx.OP)), 'access', async
|
|
23731
|
+
contractTypeLabel = await _asyncNullishCoalesce(await _asyncOptionalChain([(await readPicklists(ctx.http, "/V1.0/Contracts", ctx.OP)), 'access', async _260 => _260.get, 'call', async _261 => _261("contractType"), 'optionalAccess', async _262 => _262.get, 'call', async _263 => _263(contractType)]), async () => ( null));
|
|
23683
23732
|
} catch (err) {
|
|
23684
23733
|
if (!(err instanceof AutotaskError)) throw err;
|
|
23685
23734
|
}
|
|
@@ -23690,7 +23739,7 @@ async function resolveContractType(ctx, contractType) {
|
|
|
23690
23739
|
return { contractTypeLabel, contractTypeKnown, isBlockHours, isTimeAndMaterials };
|
|
23691
23740
|
}
|
|
23692
23741
|
async function fetchRoot(ctx, resource) {
|
|
23693
|
-
const contractCached = _optionalChain([ctx, 'access',
|
|
23742
|
+
const contractCached = _optionalChain([ctx, 'access', _264 => _264.rawHttp, 'access', _265 => _265.readCache, 'optionalAccess', _266 => _266.get, 'call', _267 => _267(`/V1.0/Contracts/${ctx.id}`)]) !== void 0;
|
|
23694
23743
|
const contract = await resource.get(ctx.id);
|
|
23695
23744
|
ctx.wires.issued += 1;
|
|
23696
23745
|
if (!contractCached) ctx.wires.requests += 1;
|
|
@@ -23905,10 +23954,10 @@ async function fetchSubscriptions(ctx, cis) {
|
|
|
23905
23954
|
const labels = await readSubscriptionLabels(ctx, subscriptions);
|
|
23906
23955
|
for (const x of subscriptions) {
|
|
23907
23956
|
const sid = num(x["id"]);
|
|
23908
|
-
const periodLabel = _optionalChain([labels, 'optionalAccess',
|
|
23957
|
+
const periodLabel = _optionalChain([labels, 'optionalAccess', _268 => _268.get, 'call', _269 => _269("periodType"), 'optionalAccess', _270 => _270.get, 'call', _271 => _271(num(x["periodType"]))]);
|
|
23909
23958
|
subFactor.set(sid, periodMonthlyFactor(x["periodType"], periodLabel));
|
|
23910
23959
|
if (isOneTimePeriod(x["periodType"], periodLabel)) oneTimeSubs.add(sid);
|
|
23911
|
-
const statusLabel = _optionalChain([labels, 'optionalAccess',
|
|
23960
|
+
const statusLabel = _optionalChain([labels, 'optionalAccess', _272 => _272.get, 'call', _273 => _273("status"), 'optionalAccess', _274 => _274.get, 'call', _275 => _275(num(x["status"]))]);
|
|
23912
23961
|
const notActive = statusLabel !== void 0 ? NOT_ACTIVE_LABEL_RE.test(statusLabel) : labels === null && SUBSCRIPTION_NOT_ACTIVE_STATUS_IDS.has(num(x["status"]));
|
|
23913
23962
|
if (notActive) cancelledSubs.add(sid);
|
|
23914
23963
|
}
|
|
@@ -24609,7 +24658,7 @@ var ContractsResource = class extends BaseResource {
|
|
|
24609
24658
|
}
|
|
24610
24659
|
/** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
|
|
24611
24660
|
async get(id, opts = {}) {
|
|
24612
|
-
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess',
|
|
24661
|
+
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess', _276 => _276.fresh]) === true);
|
|
24613
24662
|
}
|
|
24614
24663
|
/** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
|
|
24615
24664
|
* pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
|
|
@@ -24645,7 +24694,7 @@ var ContractsResource = class extends BaseResource {
|
|
|
24645
24694
|
/** Search Contract records: bounded contains on contractName (no vendor free-text search exists);
|
|
24646
24695
|
* limit defaults to 25, max 500. */
|
|
24647
24696
|
async search(query, opts) {
|
|
24648
|
-
return this.searchBase(query, { limit: _optionalChain([opts, 'optionalAccess',
|
|
24697
|
+
return this.searchBase(query, { limit: _optionalChain([opts, 'optionalAccess', _277 => _277.limit]) });
|
|
24649
24698
|
}
|
|
24650
24699
|
/** Node-parity special op (hand-written in src/resources/special/contracts.ts). */
|
|
24651
24700
|
profitability(id, opts) {
|
|
@@ -24685,28 +24734,28 @@ async function pdf(_resource, id, http) {
|
|
|
24685
24734
|
return decodeFileData(res);
|
|
24686
24735
|
}
|
|
24687
24736
|
async function windowQuery2(_resource, kind, http, opts) {
|
|
24688
|
-
const now = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
24689
|
-
const tz = _optionalChain([opts, 'optionalAccess',
|
|
24737
|
+
const now = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _278 => _278.now]), () => ( /* @__PURE__ */ new Date()));
|
|
24738
|
+
const tz = _optionalChain([opts, 'optionalAccess', _279 => _279.tz]) === void 0 ? void 0 : validateZone(opts.tz, `invoices.${kind}`);
|
|
24690
24739
|
return dateWindowQuery(
|
|
24691
24740
|
http,
|
|
24692
24741
|
"/V1.0/Invoices/query",
|
|
24693
24742
|
"invoiceDateTime",
|
|
24694
24743
|
kind,
|
|
24695
|
-
clampWindowLimit(_optionalChain([opts, 'optionalAccess',
|
|
24744
|
+
clampWindowLimit(_optionalChain([opts, 'optionalAccess', _280 => _280.limit])),
|
|
24696
24745
|
`invoices.${kind}`,
|
|
24697
24746
|
now,
|
|
24698
24747
|
tz
|
|
24699
24748
|
);
|
|
24700
24749
|
}
|
|
24701
24750
|
async function customRange2(_resource, from, to, http, opts) {
|
|
24702
|
-
const zone = _optionalChain([opts, 'optionalAccess',
|
|
24751
|
+
const zone = _optionalChain([opts, 'optionalAccess', _281 => _281.tz]) === void 0 ? void 0 : validateZone(opts.tz, "invoices.customRange");
|
|
24703
24752
|
return customRangeQuery(
|
|
24704
24753
|
http,
|
|
24705
24754
|
"/V1.0/Invoices/query",
|
|
24706
24755
|
"invoiceDateTime",
|
|
24707
24756
|
from,
|
|
24708
24757
|
to,
|
|
24709
|
-
clampWindowLimit(_optionalChain([opts, 'optionalAccess',
|
|
24758
|
+
clampWindowLimit(_optionalChain([opts, 'optionalAccess', _282 => _282.limit])),
|
|
24710
24759
|
"invoices.customRange",
|
|
24711
24760
|
zone
|
|
24712
24761
|
);
|
|
@@ -24738,7 +24787,7 @@ var InvoicesResource = class extends BaseResource {
|
|
|
24738
24787
|
}
|
|
24739
24788
|
/** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
|
|
24740
24789
|
async get(id, opts = {}) {
|
|
24741
|
-
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess',
|
|
24790
|
+
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess', _283 => _283.fresh]) === true);
|
|
24742
24791
|
}
|
|
24743
24792
|
/** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
|
|
24744
24793
|
* keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
|
|
@@ -24852,7 +24901,7 @@ var OrganizationalLevel1sResource = class extends BaseResource {
|
|
|
24852
24901
|
}
|
|
24853
24902
|
/** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
|
|
24854
24903
|
async get(id, opts = {}) {
|
|
24855
|
-
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess',
|
|
24904
|
+
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess', _284 => _284.fresh]) === true);
|
|
24856
24905
|
}
|
|
24857
24906
|
/** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
|
|
24858
24907
|
* pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
|
|
@@ -24903,7 +24952,7 @@ var OrganizationalLevel2sResource = class extends BaseResource {
|
|
|
24903
24952
|
}
|
|
24904
24953
|
/** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
|
|
24905
24954
|
async get(id, opts = {}) {
|
|
24906
|
-
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess',
|
|
24955
|
+
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess', _285 => _285.fresh]) === true);
|
|
24907
24956
|
}
|
|
24908
24957
|
/** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
|
|
24909
24958
|
* pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
|
|
@@ -24954,7 +25003,7 @@ var OrganizationalLevelAssociationsResource = class extends BaseResource {
|
|
|
24954
25003
|
}
|
|
24955
25004
|
/** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
|
|
24956
25005
|
async get(id, opts = {}) {
|
|
24957
|
-
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess',
|
|
25006
|
+
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess', _286 => _286.fresh]) === true);
|
|
24958
25007
|
}
|
|
24959
25008
|
/** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
|
|
24960
25009
|
* pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
|
|
@@ -25026,7 +25075,7 @@ async function transferOwnership(_resource, companyIds, destinationResourceId, h
|
|
|
25026
25075
|
if (typeof destination === "number" && destination < 1) {
|
|
25027
25076
|
throw new AutotaskConfigError("transferOwnership: destinationResourceId must be a positive integer");
|
|
25028
25077
|
}
|
|
25029
|
-
const dryRun = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
25078
|
+
const dryRun = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _287 => _287.dryRun]), () => ( true));
|
|
25030
25079
|
const changes = [];
|
|
25031
25080
|
const applied = [];
|
|
25032
25081
|
for (const id of ids2) {
|
|
@@ -25035,7 +25084,7 @@ async function transferOwnership(_resource, companyIds, destinationResourceId, h
|
|
|
25035
25084
|
method: "GET",
|
|
25036
25085
|
path: `/V1.0/Companies/${id}`,
|
|
25037
25086
|
operation: "resources.transferOwnership",
|
|
25038
|
-
maxRetries: _optionalChain([opts, 'optionalAccess',
|
|
25087
|
+
maxRetries: _optionalChain([opts, 'optionalAccess', _288 => _288.maxRetries])
|
|
25039
25088
|
});
|
|
25040
25089
|
const company = unwrapItem(res, id, void 0, "company");
|
|
25041
25090
|
const current = typeof company.ownerResourceID === "number" ? company.ownerResourceID : null;
|
|
@@ -25046,7 +25095,7 @@ async function transferOwnership(_resource, companyIds, destinationResourceId, h
|
|
|
25046
25095
|
path: "/V1.0/Companies",
|
|
25047
25096
|
body: { id, ownerResourceID: destination },
|
|
25048
25097
|
operation: "resources.transferOwnership",
|
|
25049
|
-
maxRetries: _optionalChain([opts, 'optionalAccess',
|
|
25098
|
+
maxRetries: _optionalChain([opts, 'optionalAccess', _289 => _289.maxRetries])
|
|
25050
25099
|
});
|
|
25051
25100
|
unwrapOperation(update);
|
|
25052
25101
|
applied.push(id);
|
|
@@ -25115,7 +25164,7 @@ var ResourcesResource = class extends BaseResource {
|
|
|
25115
25164
|
}
|
|
25116
25165
|
/** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
|
|
25117
25166
|
async get(id, opts = {}) {
|
|
25118
|
-
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess',
|
|
25167
|
+
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess', _290 => _290.fresh]) === true);
|
|
25119
25168
|
}
|
|
25120
25169
|
/** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
|
|
25121
25170
|
* keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
|
|
@@ -25143,7 +25192,7 @@ var ResourcesResource = class extends BaseResource {
|
|
|
25143
25192
|
/** Search Resource records: bounded contains on firstName + lastName (no vendor free-text search exists);
|
|
25144
25193
|
* limit defaults to 25, max 500. */
|
|
25145
25194
|
async search(query, opts) {
|
|
25146
|
-
return this.searchBase(query, { limit: _optionalChain([opts, 'optionalAccess',
|
|
25195
|
+
return this.searchBase(query, { limit: _optionalChain([opts, 'optionalAccess', _291 => _291.limit]) });
|
|
25147
25196
|
}
|
|
25148
25197
|
/** Node-parity special op (hand-written in src/resources/special/resources.ts). */
|
|
25149
25198
|
transferOwnership(sourceResourceIds, destinationResourceId, opts = {}) {
|
|
@@ -25178,7 +25227,7 @@ function uiHostFromBase(baseUrl) {
|
|
|
25178
25227
|
} catch (e20) {
|
|
25179
25228
|
return void 0;
|
|
25180
25229
|
}
|
|
25181
|
-
const n = _optionalChain([REST_HOST, 'access',
|
|
25230
|
+
const n = _optionalChain([REST_HOST, 'access', _292 => _292.exec, 'call', _293 => _293(hostname), 'optionalAccess', _294 => _294[1]]);
|
|
25182
25231
|
return n === void 0 ? void 0 : `ww${n}.autotask.net`;
|
|
25183
25232
|
}
|
|
25184
25233
|
function buildUiLink(input) {
|
|
@@ -25231,7 +25280,7 @@ async function postedStateOf(http, entries, op, beforeRequest) {
|
|
|
25231
25280
|
let incomplete = false;
|
|
25232
25281
|
for (let c = 0; c < ids2.length; c += FETCH_BY_IDS_CHUNK_SIZE) {
|
|
25233
25282
|
const chunk = ids2.slice(c, c + FETCH_BY_IDS_CHUNK_SIZE);
|
|
25234
|
-
_optionalChain([beforeRequest, 'optionalCall',
|
|
25283
|
+
_optionalChain([beforeRequest, 'optionalCall', _295 => _295()]);
|
|
25235
25284
|
const res = await http.request({
|
|
25236
25285
|
method: "POST",
|
|
25237
25286
|
idempotent: true,
|
|
@@ -25278,11 +25327,11 @@ async function queryTimeEntries(_resource, filter, limit, operation, http, curso
|
|
|
25278
25327
|
return { items, hasMore: pageDetails.nextPageUrl != null, nextCursor: _nullishCoalesce(pageDetails.nextPageUrl, () => ( null)) };
|
|
25279
25328
|
}
|
|
25280
25329
|
function pagingOpts(opts, OP9) {
|
|
25281
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
25330
|
+
if (_optionalChain([opts, 'optionalAccess', _296 => _296.countOnly]) !== void 0 && typeof opts.countOnly !== "boolean") {
|
|
25282
25331
|
throw new AutotaskConfigError(`${OP9}: countOnly must be a boolean`, { operation: OP9 });
|
|
25283
25332
|
}
|
|
25284
|
-
const countOnly = _optionalChain([opts, 'optionalAccess',
|
|
25285
|
-
const cursor = _optionalChain([opts, 'optionalAccess',
|
|
25333
|
+
const countOnly = _optionalChain([opts, 'optionalAccess', _297 => _297.countOnly]) === true;
|
|
25334
|
+
const cursor = _optionalChain([opts, 'optionalAccess', _298 => _298.cursor]);
|
|
25286
25335
|
if (cursor !== void 0 && (typeof cursor !== "string" || cursor.trim() === "")) {
|
|
25287
25336
|
throw new AutotaskConfigError(`${OP9}: cursor must be the non-empty nextCursor of a previous call`, { operation: OP9 });
|
|
25288
25337
|
}
|
|
@@ -25292,9 +25341,9 @@ function pagingOpts(opts, OP9) {
|
|
|
25292
25341
|
if (cursor !== void 0 && countOnly) {
|
|
25293
25342
|
throw new AutotaskConfigError(`${OP9}: cursor does not apply with countOnly (countOnly reads every page itself)`, { operation: OP9 });
|
|
25294
25343
|
}
|
|
25295
|
-
const budget = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
25344
|
+
const budget = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _299 => _299.maxVendorCalls]), () => ( COUNT_BUDGET_DEFAULT));
|
|
25296
25345
|
if (!Number.isInteger(budget) || budget < 1 || budget > COUNT_BUDGET_MAX) {
|
|
25297
|
-
throw new AutotaskConfigError(`${OP9}: maxVendorCalls must be an integer 1-${COUNT_BUDGET_MAX} (got ${String(_optionalChain([opts, 'optionalAccess',
|
|
25346
|
+
throw new AutotaskConfigError(`${OP9}: maxVendorCalls must be an integer 1-${COUNT_BUDGET_MAX} (got ${String(_optionalChain([opts, 'optionalAccess', _300 => _300.maxVendorCalls]))})`, { operation: OP9 });
|
|
25298
25347
|
}
|
|
25299
25348
|
return { ...cursor === void 0 ? {} : { cursor }, countOnly, budget };
|
|
25300
25349
|
}
|
|
@@ -25365,18 +25414,18 @@ async function countPostedState(http, filter, OP9, budget, window) {
|
|
|
25365
25414
|
return { window, total: states.size, postedCount, unpostedCount: states.size - postedCount, vendorCalls: issued, estimate, budget };
|
|
25366
25415
|
}
|
|
25367
25416
|
async function windowQuery3(_resource, kind, http, opts) {
|
|
25368
|
-
const now = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
25369
|
-
const tz = _optionalChain([opts, 'optionalAccess',
|
|
25417
|
+
const now = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _301 => _301.now]), () => ( /* @__PURE__ */ new Date()));
|
|
25418
|
+
const tz = _optionalChain([opts, 'optionalAccess', _302 => _302.tz]) === void 0 ? void 0 : validateZone(opts.tz, `time_entries.${kind}`);
|
|
25370
25419
|
const { from, to } = dateOnlyWindowBounds(kind, now, tz);
|
|
25371
25420
|
const filter = [
|
|
25372
25421
|
{ field: "dateWorked", op: "gte", value: from },
|
|
25373
25422
|
{ field: "dateWorked", op: "lte", value: to }
|
|
25374
25423
|
];
|
|
25375
|
-
const { items } = await queryTimeEntries(_resource, filter, clampWindowLimit(_optionalChain([opts, 'optionalAccess',
|
|
25424
|
+
const { items } = await queryTimeEntries(_resource, filter, clampWindowLimit(_optionalChain([opts, 'optionalAccess', _303 => _303.limit])), `time_entries.${kind}`, http);
|
|
25376
25425
|
return items;
|
|
25377
25426
|
}
|
|
25378
25427
|
async function customRange3(_resource, from, to, http, opts) {
|
|
25379
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
25428
|
+
if (_optionalChain([opts, 'optionalAccess', _304 => _304.tz]) !== void 0) validateZone(opts.tz, "time_entries.customRange");
|
|
25380
25429
|
const fromB = customRangeDay(from, "from", void 0, "customRange");
|
|
25381
25430
|
const toB = customRangeDay(to, "to", void 0, "customRange");
|
|
25382
25431
|
if (fromB.ms > toB.ms) {
|
|
@@ -25387,7 +25436,7 @@ async function customRange3(_resource, from, to, http, opts) {
|
|
|
25387
25436
|
{ field: "dateWorked", op: "gte", value: iso2(fromB.ms) },
|
|
25388
25437
|
{ field: "dateWorked", op: "lte", value: iso2(toEndMs) }
|
|
25389
25438
|
];
|
|
25390
|
-
const { items } = await queryTimeEntries(_resource, filter, clampWindowLimit(_optionalChain([opts, 'optionalAccess',
|
|
25439
|
+
const { items } = await queryTimeEntries(_resource, filter, clampWindowLimit(_optionalChain([opts, 'optionalAccess', _305 => _305.limit])), "time_entries.customRange", http);
|
|
25391
25440
|
return items;
|
|
25392
25441
|
}
|
|
25393
25442
|
async function postedStateQuery(_resource, mode, http, opts) {
|
|
@@ -25395,16 +25444,16 @@ async function postedStateQuery(_resource, mode, http, opts) {
|
|
|
25395
25444
|
const paging = pagingOpts(opts, operation);
|
|
25396
25445
|
const window = { from: null, to: null };
|
|
25397
25446
|
const filter = [];
|
|
25398
|
-
const fromB = _optionalChain([opts, 'optionalAccess',
|
|
25399
|
-
const toB = _optionalChain([opts, 'optionalAccess',
|
|
25447
|
+
const fromB = _optionalChain([opts, 'optionalAccess', _306 => _306.dateFrom]) === void 0 ? void 0 : customRangeDay(opts.dateFrom, "from", void 0, operation);
|
|
25448
|
+
const toB = _optionalChain([opts, 'optionalAccess', _307 => _307.dateTo]) === void 0 ? void 0 : customRangeDay(opts.dateTo, "to", void 0, operation);
|
|
25400
25449
|
if (fromB && toB && fromB.ms > toB.ms) {
|
|
25401
25450
|
throw new AutotaskConfigError(`${operation}: dateFrom (${iso2(fromB.ms)}) must not be after dateTo (${iso2(toB.ms)})`, { operation });
|
|
25402
25451
|
}
|
|
25403
25452
|
if (fromB) filter.push({ field: "dateWorked", op: "gte", value: window.from = iso2(fromB.ms) });
|
|
25404
25453
|
if (toB) filter.push({ field: "dateWorked", op: "lte", value: window.to = iso2(toB.ms + DAY_MS2 - 1) });
|
|
25405
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
25454
|
+
if (_optionalChain([opts, 'optionalAccess', _308 => _308.ticketID]) !== void 0) filter.push({ field: "ticketID", op: "eq", value: opts.ticketID });
|
|
25406
25455
|
if (paging.countOnly) return countPostedState(http, filter, operation, paging.budget, window);
|
|
25407
|
-
const read = await queryTimeEntries(_resource, filter, clampWindowLimit(_optionalChain([opts, 'optionalAccess',
|
|
25456
|
+
const read = await queryTimeEntries(_resource, filter, clampWindowLimit(_optionalChain([opts, 'optionalAccess', _309 => _309.limit])), operation, http, paging.cursor);
|
|
25408
25457
|
const { states, incomplete } = await postedStateOf(http, read.items, operation);
|
|
25409
25458
|
const items = read.items.filter((e) => states.get(e.id) === mode);
|
|
25410
25459
|
const approvedCount = items.filter(isApproved).length;
|
|
@@ -25414,7 +25463,7 @@ async function postedStateQuery(_resource, mode, http, opts) {
|
|
|
25414
25463
|
async function postedWithin(_resource, from, to, http, opts, opLabel = "time_entries.postedWithin") {
|
|
25415
25464
|
const OP9 = opLabel;
|
|
25416
25465
|
const paging = pagingOpts(opts, OP9);
|
|
25417
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
25466
|
+
if (_optionalChain([opts, 'optionalAccess', _310 => _310.tz]) !== void 0) validateZone(opts.tz, OP9);
|
|
25418
25467
|
const fromB = customRangeDay(from, "from", void 0, OP9);
|
|
25419
25468
|
const toB = customRangeDay(to, "to", void 0, OP9);
|
|
25420
25469
|
if (fromB.ms > toB.ms) {
|
|
@@ -25425,11 +25474,11 @@ async function postedWithin(_resource, from, to, http, opts, opLabel = "time_ent
|
|
|
25425
25474
|
{ field: "dateWorked", op: "gte", value: iso2(fromB.ms) },
|
|
25426
25475
|
{ field: "dateWorked", op: "lte", value: iso2(windowToMs) }
|
|
25427
25476
|
];
|
|
25428
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
25429
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
25477
|
+
if (_optionalChain([opts, 'optionalAccess', _311 => _311.ticketID]) !== void 0) filter.push({ field: "ticketID", op: "eq", value: opts.ticketID });
|
|
25478
|
+
if (_optionalChain([opts, 'optionalAccess', _312 => _312.resourceID]) !== void 0) filter.push({ field: "resourceID", op: "eq", value: opts.resourceID });
|
|
25430
25479
|
const window = { from: iso2(fromB.ms), to: iso2(windowToMs) };
|
|
25431
25480
|
if (paging.countOnly) return countPostedState(http, filter, OP9, paging.budget, window);
|
|
25432
|
-
const { items, hasMore, nextCursor } = await queryTimeEntries(_resource, filter, clampWindowLimit(_optionalChain([opts, 'optionalAccess',
|
|
25481
|
+
const { items, hasMore, nextCursor } = await queryTimeEntries(_resource, filter, clampWindowLimit(_optionalChain([opts, 'optionalAccess', _313 => _313.limit])), OP9, http, paging.cursor);
|
|
25433
25482
|
const { states, incomplete } = await postedStateOf(http, items, OP9);
|
|
25434
25483
|
let postedCount = 0;
|
|
25435
25484
|
let unpostedCount = 0;
|
|
@@ -25437,7 +25486,7 @@ async function postedWithin(_resource, from, to, http, opts, opLabel = "time_ent
|
|
|
25437
25486
|
if (state === "posted") postedCount += 1;
|
|
25438
25487
|
else unpostedCount += 1;
|
|
25439
25488
|
}
|
|
25440
|
-
const keep = _optionalChain([opts, 'optionalAccess',
|
|
25489
|
+
const keep = _optionalChain([opts, 'optionalAccess', _314 => _314.posted]) === void 0 ? void 0 : opts.posted ? "posted" : "unposted";
|
|
25441
25490
|
return {
|
|
25442
25491
|
items: keep === void 0 ? items : items.filter((e) => states.get(e.id) === keep),
|
|
25443
25492
|
postedCount,
|
|
@@ -25887,7 +25936,7 @@ function sameValue(a, b) {
|
|
|
25887
25936
|
async function readTicket(http, id, retries, operation) {
|
|
25888
25937
|
try {
|
|
25889
25938
|
const res = await http.request({ method: "GET", path: `/V1.0/Tickets/${id}`, operation, maxRetries: retries });
|
|
25890
|
-
const item = _optionalChain([res, 'optionalAccess',
|
|
25939
|
+
const item = _optionalChain([res, 'optionalAccess', _315 => _315.item]);
|
|
25891
25940
|
return _nullishCoalesce(item, () => ( null));
|
|
25892
25941
|
} catch (e) {
|
|
25893
25942
|
if (isAutotaskError(e) && (e.httpStatus === 404 || e.code === "NOT_FOUND")) return null;
|
|
@@ -25932,7 +25981,7 @@ async function preview(http, spec, sourceId, toTicketId, opts) {
|
|
|
25932
25981
|
const facts = {
|
|
25933
25982
|
closedStatus: { closedIds: closedStatus.closedIds, source: closedStatus.source, note: closedStatus.note },
|
|
25934
25983
|
sourceTicketId,
|
|
25935
|
-
sourceCompanyID: _nullishCoalesce(_optionalChain([origin, 'optionalAccess',
|
|
25984
|
+
sourceCompanyID: _nullishCoalesce(_optionalChain([origin, 'optionalAccess', _316 => _316.companyID]), () => ( null)),
|
|
25936
25985
|
targetCompanyID: _nullishCoalesce(target.companyID, () => ( null)),
|
|
25937
25986
|
companyChanged: origin === null ? null : origin.companyID !== target.companyID,
|
|
25938
25987
|
contractChanged: origin === null ? null : (_nullishCoalesce(origin.contractID, () => ( null))) !== (_nullishCoalesce(target.contractID, () => ( null)))
|
|
@@ -26050,7 +26099,7 @@ var CONTRACT_SCOPED = ["contractID", "contractServiceID", "contractServiceBundle
|
|
|
26050
26099
|
async function readTimeEntry(http, id, retries) {
|
|
26051
26100
|
try {
|
|
26052
26101
|
const res = await http.request({ method: "GET", path: `/V1.0/TimeEntries/${id}`, operation: OP6, maxRetries: retries });
|
|
26053
|
-
return _nullishCoalesce(_optionalChain([res, 'optionalAccess',
|
|
26102
|
+
return _nullishCoalesce(_optionalChain([res, 'optionalAccess', _317 => _317.item]), () => ( null));
|
|
26054
26103
|
} catch (e) {
|
|
26055
26104
|
if (isAutotaskError(e) && (e.httpStatus === 404 || e.code === "NOT_FOUND")) return null;
|
|
26056
26105
|
throw e;
|
|
@@ -26269,17 +26318,17 @@ async function recentTickets(_resource, from, to, http, opts) {
|
|
|
26269
26318
|
for (const [ticketID, g] of groups) {
|
|
26270
26319
|
const t = tickets.get(ticketID);
|
|
26271
26320
|
if (t === void 0) unresolvedTicketIDs.push(ticketID);
|
|
26272
|
-
if (companyID !== void 0 && _optionalChain([t, 'optionalAccess',
|
|
26321
|
+
if (companyID !== void 0 && _optionalChain([t, 'optionalAccess', _318 => _318.companyID]) !== companyID) {
|
|
26273
26322
|
if (t !== void 0) excludedTickets += 1;
|
|
26274
26323
|
continue;
|
|
26275
26324
|
}
|
|
26276
26325
|
items.push({
|
|
26277
26326
|
ticketID,
|
|
26278
|
-
..._optionalChain([t, 'optionalAccess',
|
|
26279
|
-
..._optionalChain([t, 'optionalAccess',
|
|
26280
|
-
..._optionalChain([t, 'optionalAccess',
|
|
26281
|
-
..._optionalChain([t, 'optionalAccess',
|
|
26282
|
-
..._optionalChain([t, 'optionalAccess',
|
|
26327
|
+
..._optionalChain([t, 'optionalAccess', _319 => _319.ticketNumber]) !== void 0 ? { ticketNumber: t.ticketNumber } : {},
|
|
26328
|
+
..._optionalChain([t, 'optionalAccess', _320 => _320.title]) !== void 0 ? { title: t.title } : {},
|
|
26329
|
+
..._optionalChain([t, 'optionalAccess', _321 => _321.status]) !== void 0 ? { status: t.status } : {},
|
|
26330
|
+
..._optionalChain([t, 'optionalAccess', _322 => _322.assignedResourceID]) !== void 0 ? { assignedResourceID: t.assignedResourceID } : {},
|
|
26331
|
+
..._optionalChain([t, 'optionalAccess', _323 => _323.companyID]) !== void 0 ? { companyID: t.companyID } : {},
|
|
26283
26332
|
entryCount: g.entryCount,
|
|
26284
26333
|
totalHours: Math.round(g.totalHours * 100) / 100,
|
|
26285
26334
|
lastWorked: g.lastWorked
|
|
@@ -26323,7 +26372,7 @@ var TimeEntriesResource = class extends BaseResource {
|
|
|
26323
26372
|
}
|
|
26324
26373
|
/** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
|
|
26325
26374
|
async get(id, opts = {}) {
|
|
26326
|
-
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess',
|
|
26375
|
+
return this.getGlobal(id, _optionalChain([opts, 'optionalAccess', _324 => _324.fresh]) === true);
|
|
26327
26376
|
}
|
|
26328
26377
|
/** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
|
|
26329
26378
|
* pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
|
|
@@ -26657,4 +26706,5 @@ var TimeEntriesResource = class extends BaseResource {
|
|
|
26657
26706
|
|
|
26658
26707
|
|
|
26659
26708
|
|
|
26660
|
-
exports.AUTH_HEADERS = AUTH_HEADERS; exports.buildAuthHeaders = buildAuthHeaders; exports.withAuthHeaders = withAuthHeaders; exports.AutotaskError = AutotaskError; exports.AutotaskConfigError = AutotaskConfigError; exports.isAutotaskError = isAutotaskError; 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.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.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.MoveRefusedError = MoveRefusedError; exports.READ_CACHE_MAX_ENTRIES = READ_CACHE_MAX_ENTRIES; exports.ReadCache = ReadCache; exports.ZONE_CATALOG = ZONE_CATALOG; exports.ZONES = ZONES; exports.DEFAULT_ZONE = DEFAULT_ZONE; exports.zoneUrl = zoneUrl; exports.resolveBaseUrl = resolveBaseUrl; 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.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.resolveCredentials = resolveCredentials; exports.buildReadCache = buildReadCache; exports.resolveConfig = resolveConfig; exports.IDEMPOTENT_METHODS = IDEMPOTENT_METHODS; 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.normalizeInValues = normalizeInValues; exports.assertNoRelationLeaf = assertNoRelationLeaf; exports.buildUrl = buildUrl; exports.cursorToPath = cursorToPath; exports.buildQueryBody = buildQueryBody; exports.buildQueryRequest = buildQueryRequest; exports.runWithSignal = runWithSignal; exports.RELATIONSHIP_ZONE = RELATIONSHIP_ZONE; exports.RELATIONSHIP_MAP = RELATIONSHIP_MAP; exports.DELETE_BOUNDARY_NOTES = DELETE_BOUNDARY_NOTES; exports.MARKER_FIELDS = MARKER_FIELDS; exports.BLIND_SURFACE_INVENTORY = BLIND_SURFACE_INVENTORY; exports.REACHABILITY_PROBE_DEFAULTS = REACHABILITY_PROBE_DEFAULTS; exports.CREATE_GUIDANCE = CREATE_GUIDANCE; exports.unwrapItems = unwrapItems; exports.unwrapItem = unwrapItem; exports.unwrapQueryCount = unwrapQueryCount; exports.unwrapOperation = unwrapOperation; exports.passthrough = passthrough; exports.HttpClient = HttpClient; exports.BOUNDED_QUERY_MAX_LIMIT = BOUNDED_QUERY_MAX_LIMIT; exports.buildDryRunResult = buildDryRunResult; exports.mergePartialBody = mergePartialBody; exports.effectiveRequiredFields = effectiveRequiredFields; 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.MODEL_DATE_FIELDS = MODEL_DATE_FIELDS; exports.EXPAND_RESOURCE_NAMES_MAX_IDS = EXPAND_RESOURCE_NAMES_MAX_IDS; exports.expandResourceNames = expandResourceNames; exports.ENTITY_TYPE_TO_RESOURCE = ENTITY_TYPE_TO_RESOURCE; exports.resourceForEntityType = resourceForEntityType; exports.isEnumerableResource = isEnumerableResource; exports.WORKFLOW_RESOURCES = WORKFLOW_RESOURCES; exports.MAX_FIELD_CATALOG_WIRE = MAX_FIELD_CATALOG_WIRE; exports.FIELD_CATALOG_HONESTY_NOTE = FIELD_CATALOG_HONESTY_NOTE; exports.MIN_FIELD_CATALOG_MAX_BYTES = MIN_FIELD_CATALOG_MAX_BYTES; 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.vendorId = vendorId; exports.resolveLineOfBusinessChain = resolveLineOfBusinessChain; exports.resolveCompositeNames = resolveCompositeNames; exports.readNamesOpt = readNamesOpt; exports.labelRows = labelRows; exports.BaseResource = BaseResource; exports.BillingCodesResource = BillingCodesResource; exports.BillingItemsResource = BillingItemsResource; exports.isDateYMD = isDateYMD; exports.monthsInWindow = monthsInWindow; exports.dayAfter = dayAfter; exports.num = num; exports.collectFilterFieldNames = collectFilterFieldNames; exports.validateQueryFieldNames = validateQueryFieldNames; exports.findUnknownFieldNames = findUnknownFieldNames; exports.resolveTicketStatusSemantics = resolveTicketStatusSemantics; exports.openStatusFilter = openStatusFilter; exports.isClosedStatus = isClosedStatus; exports.CompaniesResource = CompaniesResource; exports.PROFITABILITY_MAX_WINDOW_MONTHS = PROFITABILITY_MAX_WINDOW_MONTHS; exports.SERVICE_LINE_FKS = SERVICE_LINE_FKS; exports.CHARGE_LINE_FKS = CHARGE_LINE_FKS; exports.billingLineType = billingLineType; exports.internalAmount = internalAmount; 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; exports.readPicklists = readPicklists; exports.ContractsResource = ContractsResource; exports.InvoicesResource = InvoicesResource; exports.OrganizationalLevel1sResource = OrganizationalLevel1sResource; exports.OrganizationalLevel2sResource = OrganizationalLevel2sResource; exports.OrganizationalLevelAssociationsResource = OrganizationalLevelAssociationsResource; exports.ResourcesResource = ResourcesResource; exports.UI_LINK_ENTITIES = UI_LINK_ENTITIES; exports.buildUiLink = buildUiLink; exports.uiLink = uiLink; exports.refuse = refuse; exports.queryRows = queryRows; exports.runMove = runMove; exports.uiLinkFor = uiLinkFor; exports.TimeEntriesResource = TimeEntriesResource;
|
|
26709
|
+
|
|
26710
|
+
exports.AUTH_HEADERS = AUTH_HEADERS; exports.buildAuthHeaders = buildAuthHeaders; exports.withAuthHeaders = withAuthHeaders; exports.AutotaskError = AutotaskError; exports.AutotaskConfigError = AutotaskConfigError; exports.isAutotaskError = isAutotaskError; 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.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.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.MoveRefusedError = MoveRefusedError; exports.READ_CACHE_MAX_ENTRIES = READ_CACHE_MAX_ENTRIES; exports.ReadCache = ReadCache; exports.ZONE_CATALOG = ZONE_CATALOG; exports.ZONES = ZONES; exports.DEFAULT_ZONE = DEFAULT_ZONE; exports.zoneUrl = zoneUrl; exports.resolveBaseUrl = resolveBaseUrl; 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.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.resolveCredentials = resolveCredentials; exports.buildReadCache = buildReadCache; exports.resolveConfig = resolveConfig; exports.IDEMPOTENT_METHODS = IDEMPOTENT_METHODS; 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.normalizeInValues = normalizeInValues; exports.assertNoRelationLeaf = assertNoRelationLeaf; exports.buildUrl = buildUrl; exports.cursorToPath = cursorToPath; exports.buildQueryBody = buildQueryBody; exports.buildQueryRequest = buildQueryRequest; exports.runWithSignal = runWithSignal; exports.RELATIONSHIP_ZONE = RELATIONSHIP_ZONE; exports.RELATIONSHIP_MAP = RELATIONSHIP_MAP; exports.DELETE_BOUNDARY_NOTES = DELETE_BOUNDARY_NOTES; exports.MARKER_FIELDS = MARKER_FIELDS; exports.BLIND_SURFACE_INVENTORY = BLIND_SURFACE_INVENTORY; exports.REACHABILITY_PROBE_DEFAULTS = REACHABILITY_PROBE_DEFAULTS; exports.CREATE_GUIDANCE = CREATE_GUIDANCE; exports.unwrapItems = unwrapItems; exports.unwrapItem = unwrapItem; exports.unwrapQueryCount = unwrapQueryCount; exports.unwrapOperation = unwrapOperation; exports.passthrough = passthrough; exports.HttpClient = HttpClient; exports.BOUNDED_QUERY_MAX_LIMIT = BOUNDED_QUERY_MAX_LIMIT; exports.buildDryRunResult = buildDryRunResult; exports.mergePartialBody = mergePartialBody; exports.effectiveRequiredFields = effectiveRequiredFields; 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.MODEL_DATE_FIELDS = MODEL_DATE_FIELDS; exports.EXPAND_RESOURCE_NAMES_MAX_IDS = EXPAND_RESOURCE_NAMES_MAX_IDS; exports.expandResourceNames = expandResourceNames; exports.ENTITY_TYPE_TO_RESOURCE = ENTITY_TYPE_TO_RESOURCE; exports.resourceForEntityType = resourceForEntityType; exports.isEnumerableResource = isEnumerableResource; exports.WORKFLOW_RESOURCES = WORKFLOW_RESOURCES; exports.MAX_FIELD_CATALOG_WIRE = MAX_FIELD_CATALOG_WIRE; exports.FIELD_CATALOG_HONESTY_NOTE = FIELD_CATALOG_HONESTY_NOTE; exports.MIN_FIELD_CATALOG_MAX_BYTES = MIN_FIELD_CATALOG_MAX_BYTES; exports.fieldCatalog = fieldCatalog; exports.PICKLIST_VALUE_NOT_SERVED_NOTE = PICKLIST_VALUE_NOT_SERVED_NOTE; exports.PICKLIST_CATALOG_UNAVAILABLE_NOTE = PICKLIST_CATALOG_UNAVAILABLE_NOTE; exports.TICKET_LABEL_FIELDS = TICKET_LABEL_FIELDS; exports.createNamePlan = createNamePlan; exports.addNameSibling = addNameSibling; exports.addLabelSibling = addLabelSibling; exports.vendorId = vendorId; exports.resolveLineOfBusinessChain = resolveLineOfBusinessChain; exports.resolveCompositeNames = resolveCompositeNames; exports.readNamesOpt = readNamesOpt; exports.labelRows = labelRows; exports.BaseResource = BaseResource; exports.BillingCodesResource = BillingCodesResource; exports.BillingItemsResource = BillingItemsResource; exports.isDateYMD = isDateYMD; exports.monthsInWindow = monthsInWindow; exports.dayAfter = dayAfter; exports.num = num; exports.collectFilterFieldNames = collectFilterFieldNames; exports.validateQueryFieldNames = validateQueryFieldNames; exports.findUnknownFieldNames = findUnknownFieldNames; exports.resolveTicketStatusSemantics = resolveTicketStatusSemantics; exports.openStatusFilter = openStatusFilter; exports.isClosedStatus = isClosedStatus; exports.CompaniesResource = CompaniesResource; exports.PROFITABILITY_MAX_WINDOW_MONTHS = PROFITABILITY_MAX_WINDOW_MONTHS; exports.SERVICE_LINE_FKS = SERVICE_LINE_FKS; exports.CHARGE_LINE_FKS = CHARGE_LINE_FKS; exports.billingLineType = billingLineType; exports.internalAmount = internalAmount; 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; exports.readPicklists = readPicklists; exports.ContractsResource = ContractsResource; exports.InvoicesResource = InvoicesResource; exports.OrganizationalLevel1sResource = OrganizationalLevel1sResource; exports.OrganizationalLevel2sResource = OrganizationalLevel2sResource; exports.OrganizationalLevelAssociationsResource = OrganizationalLevelAssociationsResource; exports.ResourcesResource = ResourcesResource; exports.UI_LINK_ENTITIES = UI_LINK_ENTITIES; exports.buildUiLink = buildUiLink; exports.uiLink = uiLink; exports.refuse = refuse; exports.queryRows = queryRows; exports.runMove = runMove; exports.uiLinkFor = uiLinkFor; exports.TimeEntriesResource = TimeEntriesResource;
|