node-autotask 0.37.0 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/{chunk-7WR5WUQT.cjs → chunk-25VGFT5M.cjs} +143 -143
- package/dist/{chunk-CH2WXTYD.js → chunk-7IADHNBZ.js} +50 -13
- package/dist/{chunk-2PJCQGXZ.js → chunk-7WI7FBPB.js} +2 -2
- package/dist/{chunk-4GHBN2AW.cjs → chunk-PFFW4DIK.cjs} +283 -283
- package/dist/{chunk-75WJS26D.js → chunk-PFJAMFUL.js} +1 -1
- package/dist/{chunk-FYF46OT3.cjs → chunk-TBFXRNNE.cjs} +50 -13
- package/dist/{index-DAFg_68I.d.ts → index-BDqw377y.d.ts} +29 -3
- package/dist/{index-g8J6Qiu1.d.cts → index-CqepIQfp.d.cts} +29 -3
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/operations/index.cjs +169 -169
- package/dist/operations/index.d.cts +2 -2
- package/dist/operations/index.d.ts +2 -2
- package/dist/operations/index.js +1 -1
- package/dist/pool.cjs +8 -8
- package/dist/pool.d.cts +1 -1
- package/dist/pool.d.ts +1 -1
- package/dist/pool.js +3 -3
- package/dist/resources/index.cjs +3 -3
- package/dist/resources/index.d.cts +1 -1
- package/dist/resources/index.d.ts +1 -1
- package/dist/resources/index.js +2 -2
- package/docs/API.md +10 -2
- package/package.json +1 -1
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var _chunkTBFXRNNEcjs = require('../chunk-TBFXRNNE.cjs');
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
var _chunkHBYKTXN3cjs = require('../chunk-HBYKTXN3.cjs');
|
|
@@ -72,21 +72,21 @@ var _chunkHBYKTXN3cjs = require('../chunk-HBYKTXN3.cjs');
|
|
|
72
72
|
// src/operations/searchAcrossResources.ts
|
|
73
73
|
var DEFAULT_LIMIT = 25;
|
|
74
74
|
function resourceFor(client, key) {
|
|
75
|
-
return client[
|
|
75
|
+
return client[_chunkTBFXRNNEcjs.camelKey.call(void 0, key)];
|
|
76
76
|
}
|
|
77
77
|
async function searchAcrossResources(client, query, opts = {}) {
|
|
78
78
|
const text = query.trim();
|
|
79
79
|
if (text === "") {
|
|
80
|
-
throw new (0,
|
|
80
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("searchAcrossResources: query must be a non-empty string");
|
|
81
81
|
}
|
|
82
|
-
const keys = _nullishCoalesce(opts.resources, () => (
|
|
82
|
+
const keys = _nullishCoalesce(opts.resources, () => ( _chunkTBFXRNNEcjs.WORKFLOW_RESOURCES));
|
|
83
83
|
if (keys.length === 0) {
|
|
84
|
-
throw new (0,
|
|
84
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("searchAcrossResources: no resources requested");
|
|
85
85
|
}
|
|
86
|
-
const limit =
|
|
86
|
+
const limit = _chunkTBFXRNNEcjs.clampPageSize.call(void 0, _nullishCoalesce(opts.limit, () => ( DEFAULT_LIMIT)));
|
|
87
87
|
const totalLimit = opts.totalLimit;
|
|
88
88
|
if (totalLimit !== void 0 && !(Number.isInteger(totalLimit) && totalLimit >= 1)) {
|
|
89
|
-
throw new (0,
|
|
89
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("searchAcrossResources: totalLimit must be a positive integer");
|
|
90
90
|
}
|
|
91
91
|
const results = [];
|
|
92
92
|
const skipped = [];
|
|
@@ -117,7 +117,7 @@ async function searchAcrossResources(client, query, opts = {}) {
|
|
|
117
117
|
|
|
118
118
|
// src/operations/resolveAny.ts
|
|
119
119
|
function resourceFor2(client, key) {
|
|
120
|
-
return client[
|
|
120
|
+
return client[_chunkTBFXRNNEcjs.camelKey.call(void 0, key)];
|
|
121
121
|
}
|
|
122
122
|
var FAULT_CATEGORIES = /* @__PURE__ */ new Set(["auth", "rate_limit", "server", "network", "timeout", "policy"]);
|
|
123
123
|
function missCost(identifier) {
|
|
@@ -126,13 +126,13 @@ function missCost(identifier) {
|
|
|
126
126
|
}
|
|
127
127
|
async function resolveAny(client, identifier, opts = {}) {
|
|
128
128
|
if (typeof identifier === "number") {
|
|
129
|
-
|
|
129
|
+
_chunkTBFXRNNEcjs.parseIdentifier.call(void 0, identifier, "identifier");
|
|
130
130
|
} else if (identifier.trim() === "") {
|
|
131
|
-
throw new (0,
|
|
131
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("resolveAny: identifier must be non-empty");
|
|
132
132
|
}
|
|
133
|
-
const keys = _nullishCoalesce(opts.resources, () => (
|
|
133
|
+
const keys = _nullishCoalesce(opts.resources, () => ( _chunkTBFXRNNEcjs.WORKFLOW_RESOURCES));
|
|
134
134
|
if (keys.length === 0) {
|
|
135
|
-
throw new (0,
|
|
135
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("resolveAny: no resources requested");
|
|
136
136
|
}
|
|
137
137
|
const results = [];
|
|
138
138
|
for (const key of keys) {
|
|
@@ -162,9 +162,9 @@ async function resolveAny(client, identifier, opts = {}) {
|
|
|
162
162
|
} catch (err) {
|
|
163
163
|
let code;
|
|
164
164
|
let candidates = [];
|
|
165
|
-
if (err instanceof
|
|
165
|
+
if (err instanceof _chunkTBFXRNNEcjs.AutotaskConfigError) {
|
|
166
166
|
code = "CONFIG_ERROR";
|
|
167
|
-
} else if (
|
|
167
|
+
} else if (_chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err)) {
|
|
168
168
|
if (FAULT_CATEGORIES.has(err.category)) throw err;
|
|
169
169
|
code = err.code;
|
|
170
170
|
if (code === "RESOLUTION_AMBIGUOUS" && err.resourceIds !== void 0) {
|
|
@@ -191,7 +191,7 @@ async function resolveAny(client, identifier, opts = {}) {
|
|
|
191
191
|
// src/operations/aggregate.ts
|
|
192
192
|
var AGGREGATE_TOP_MAX = 100;
|
|
193
193
|
var AGGREGATE_DEFAULT_TOP = 25;
|
|
194
|
-
var AGGREGATE_DEFAULT_LIMIT =
|
|
194
|
+
var AGGREGATE_DEFAULT_LIMIT = _chunkTBFXRNNEcjs.BOUNDED_QUERY_MAX_LIMIT;
|
|
195
195
|
var AGGREGATE_DATE_BUCKETS = ["month", "week", "year"];
|
|
196
196
|
var DATE_ONLY_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
197
197
|
var DATETIME_RE = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d{1,9})?(Z|[+-]\d{2}:?\d{2})?$/;
|
|
@@ -284,15 +284,15 @@ function parseFilterConditions(filter, problems) {
|
|
|
284
284
|
return [];
|
|
285
285
|
}
|
|
286
286
|
try {
|
|
287
|
-
return
|
|
287
|
+
return _chunkTBFXRNNEcjs.buildFilter.call(void 0, conds).filter;
|
|
288
288
|
} catch (err) {
|
|
289
|
-
problems.push(err instanceof
|
|
289
|
+
problems.push(err instanceof _chunkTBFXRNNEcjs.AutotaskConfigError ? err.message : `filter must be the query-bag filter (13 operators; caps 500 OR-conditions / 1 UDF / 8000 chars); ${String(err)}`);
|
|
290
290
|
return [];
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
function checkOptsBag(opts, problems) {
|
|
294
294
|
if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
|
|
295
|
-
throw new (0,
|
|
295
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
296
296
|
`aggregate: opts must be the options object (got ${Array.isArray(opts) ? "an array" : typeof opts})`,
|
|
297
297
|
{ operation: "operations.aggregate" }
|
|
298
298
|
);
|
|
@@ -372,7 +372,7 @@ function parseTopAndLimit(opts, problems) {
|
|
|
372
372
|
if (!Number.isInteger(opts.limit)) {
|
|
373
373
|
problems.push(`limit must be an integer (got ${String(opts.limit)})`);
|
|
374
374
|
} else {
|
|
375
|
-
limit = Math.min(Math.max(opts.limit, 1),
|
|
375
|
+
limit = Math.min(Math.max(opts.limit, 1), _chunkTBFXRNNEcjs.BOUNDED_QUERY_MAX_LIMIT);
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
return { top, limit };
|
|
@@ -384,14 +384,14 @@ function validateAggregate(operation, filter, opts) {
|
|
|
384
384
|
checkOptsBag(opts, problems);
|
|
385
385
|
const oracles = {
|
|
386
386
|
resourceKey,
|
|
387
|
-
fieldSets: resourceKey !== void 0 ?
|
|
388
|
-
dateSets: resourceKey !== void 0 ?
|
|
387
|
+
fieldSets: resourceKey !== void 0 ? _chunkTBFXRNNEcjs.MODEL_FIELD_SETS[resourceKey] : void 0,
|
|
388
|
+
dateSets: resourceKey !== void 0 ? _chunkTBFXRNNEcjs.MODEL_DATE_FIELDS[resourceKey] : void 0
|
|
389
389
|
};
|
|
390
390
|
const groupBy = parseGroupBy(opts, oracles, problems);
|
|
391
391
|
const sum = checkSumFields("sum", opts.sum, oracles, problems);
|
|
392
392
|
const { top, limit } = parseTopAndLimit(opts, problems);
|
|
393
393
|
if (problems.length > 0) {
|
|
394
|
-
throw new (0,
|
|
394
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
395
395
|
`aggregate: ${problems.length} problem(s) found pre-request (zero wire was issued)
|
|
396
396
|
- ` + problems.join("\n- "),
|
|
397
397
|
{ operation: "operations.aggregate" }
|
|
@@ -425,9 +425,9 @@ function foldGroups(items, v) {
|
|
|
425
425
|
}
|
|
426
426
|
async function aggregate(client, operation, filter, opts = {}) {
|
|
427
427
|
const v = validateAggregate(operation, filter, opts);
|
|
428
|
-
const holder = client[
|
|
428
|
+
const holder = client[_chunkTBFXRNNEcjs.camelKey.call(void 0, v.resourceKey)];
|
|
429
429
|
if (holder === void 0) {
|
|
430
|
-
throw new (0,
|
|
430
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`aggregate: the client exposes no accessor for resource "${v.resourceKey}"`, {
|
|
431
431
|
operation: "operations.aggregate",
|
|
432
432
|
suggestedAction: "Rebuild the client from the SDK build that ships this registry (the resource set is pinned by the plan)."
|
|
433
433
|
});
|
|
@@ -472,10 +472,10 @@ var DEFAULT_CONTRACT_TYPE_RE = /^\s*(recurring|fixed)\b/i;
|
|
|
472
472
|
var CONTRACTS_PATH = "/V1.0/Contracts";
|
|
473
473
|
var COMPANIES_PATH = "/V1.0/Companies";
|
|
474
474
|
var BILLING_ITEMS_PATH = "/V1.0/BillingItems";
|
|
475
|
-
var LINE_TYPE_FIELDS = ["billingItemType", "timeEntryID", "expenseItemID", ...
|
|
476
|
-
var isLabour = (line) =>
|
|
475
|
+
var LINE_TYPE_FIELDS = ["billingItemType", "timeEntryID", "expenseItemID", ..._chunkTBFXRNNEcjs.CHARGE_LINE_FKS, ..._chunkTBFXRNNEcjs.SERVICE_LINE_FKS];
|
|
476
|
+
var isLabour = (line) => _chunkTBFXRNNEcjs.billingLineType.call(void 0, line) === "labour";
|
|
477
477
|
function picklistKey(c, dim, path, field, raw, missing) {
|
|
478
|
-
const id =
|
|
478
|
+
const id = _chunkTBFXRNNEcjs.num.call(void 0, raw);
|
|
479
479
|
if (id === 0) return { id: null, label: missing };
|
|
480
480
|
const label = _optionalChain([c, 'access', _2 => _2.labels, 'access', _3 => _3[path], 'optionalAccess', _4 => _4.get, 'call', _5 => _5(field), 'optionalAccess', _6 => _6.get, 'call', _7 => _7(id)]);
|
|
481
481
|
if (label === void 0) {
|
|
@@ -498,7 +498,7 @@ var DIMENSIONS = {
|
|
|
498
498
|
},
|
|
499
499
|
company: {
|
|
500
500
|
joins: { companies: ["companyName"] },
|
|
501
|
-
key: (c) => ({ id:
|
|
501
|
+
key: (c) => ({ id: _chunkTBFXRNNEcjs.num.call(void 0, c.line["companyID"]), name: String(_nullishCoalesce(_optionalChain([c, 'access', _10 => _10.company, 'optionalAccess', _11 => _11["companyName"]]), () => ( ""))) })
|
|
502
502
|
},
|
|
503
503
|
month: {
|
|
504
504
|
key: (c) => ({ id: c.invoice.month })
|
|
@@ -506,11 +506,11 @@ var DIMENSIONS = {
|
|
|
506
506
|
billingItemKind: {
|
|
507
507
|
lineFields: LINE_TYPE_FIELDS,
|
|
508
508
|
picklist: BILLING_ITEMS_PATH,
|
|
509
|
-
key: (c) =>
|
|
509
|
+
key: (c) => _chunkTBFXRNNEcjs.num.call(void 0, c.line["billingItemType"]) === 0 ? { id: _chunkTBFXRNNEcjs.billingLineType.call(void 0, c.line), label: _chunkTBFXRNNEcjs.billingLineType.call(void 0, c.line) } : picklistKey(c, "billingItemKind", BILLING_ITEMS_PATH, "billingItemType", c.line["billingItemType"], "other")
|
|
510
510
|
},
|
|
511
511
|
contract: {
|
|
512
512
|
joins: { contracts: ["contractName"] },
|
|
513
|
-
key: (c) => ({ id:
|
|
513
|
+
key: (c) => ({ id: _chunkTBFXRNNEcjs.num.call(void 0, c.line["contractID"]), name: String(_nullishCoalesce(c.contract["contractName"], () => ( ""))) })
|
|
514
514
|
},
|
|
515
515
|
// Per line (no contract-pointer fallback): association → level2 (the Line of Business, `name`) + level1 (the division).
|
|
516
516
|
lineOfBusiness: {
|
|
@@ -518,11 +518,11 @@ var DIMENSIONS = {
|
|
|
518
518
|
joins: { organizationalLevelAssociations: [], organizationalLevel1s: [], organizationalLevel2s: [] },
|
|
519
519
|
unresolved: "unresolvedAssociations",
|
|
520
520
|
key: (c) => {
|
|
521
|
-
const id =
|
|
521
|
+
const id = _chunkTBFXRNNEcjs.num.call(void 0, c.line["organizationalLevelAssociationID"]);
|
|
522
522
|
if (id === 0) return { id: null, label: "no LOB assigned" };
|
|
523
523
|
const a = c.joined.organizationalLevelAssociations.get(id);
|
|
524
|
-
const l1 = c.joined.organizationalLevel1s.get(
|
|
525
|
-
const l2 = c.joined.organizationalLevel2s.get(
|
|
524
|
+
const l1 = c.joined.organizationalLevel1s.get(_chunkTBFXRNNEcjs.num.call(void 0, _optionalChain([a, 'optionalAccess', _12 => _12["organizationalLevel1ID"]])));
|
|
525
|
+
const l2 = c.joined.organizationalLevel2s.get(_chunkTBFXRNNEcjs.num.call(void 0, _optionalChain([a, 'optionalAccess', _13 => _13["organizationalLevel2ID"]])));
|
|
526
526
|
if (l1 === void 0 || l2 === void 0) return "unresolvedAssociations";
|
|
527
527
|
return { id, name: String(_nullishCoalesce(l2["name"], () => ( ""))), division: String(_nullishCoalesce(l1["name"], () => ( ""))) };
|
|
528
528
|
}
|
|
@@ -533,9 +533,9 @@ var DIMENSIONS = {
|
|
|
533
533
|
joins: { timeEntries: [], resources: [] },
|
|
534
534
|
unresolved: "unresolvedTimeEntries",
|
|
535
535
|
key: (c) => {
|
|
536
|
-
const te =
|
|
536
|
+
const te = _chunkTBFXRNNEcjs.num.call(void 0, c.line["timeEntryID"]);
|
|
537
537
|
if (!isLabour(c.line) || te === 0) return { id: null, label: "n/a" };
|
|
538
|
-
const id =
|
|
538
|
+
const id = _chunkTBFXRNNEcjs.num.call(void 0, _optionalChain([c, 'access', _14 => _14.joined, 'access', _15 => _15.timeEntries, 'access', _16 => _16.get, 'call', _17 => _17(te), 'optionalAccess', _18 => _18["resourceID"]]));
|
|
539
539
|
const r = c.joined.resources.get(id);
|
|
540
540
|
if (r === void 0) return "unresolvedTimeEntries";
|
|
541
541
|
return { id, name: `${String(_nullishCoalesce(r["firstName"], () => ( "")))} ${String(_nullishCoalesce(r["lastName"], () => ( "")))}`.trim() };
|
|
@@ -546,58 +546,58 @@ var DIMENSIONS = {
|
|
|
546
546
|
joins: { billingCodes: [] },
|
|
547
547
|
unresolved: "unresolvedBillingCodes",
|
|
548
548
|
key: (c) => {
|
|
549
|
-
const id =
|
|
549
|
+
const id = _chunkTBFXRNNEcjs.num.call(void 0, c.line["billingCodeID"]);
|
|
550
550
|
if (id === 0) return { id: null, label: "none" };
|
|
551
551
|
const b = c.joined.billingCodes.get(id);
|
|
552
552
|
return b === void 0 ? "unresolvedBillingCodes" : { id, name: String(_nullishCoalesce(b["name"], () => ( ""))) };
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
};
|
|
556
|
-
var fk = (rows, field) => [...rows].map((r) =>
|
|
556
|
+
var fk = (rows, field) => [...rows].map((r) => _chunkTBFXRNNEcjs.num.call(void 0, r[field]));
|
|
557
557
|
var ONE_CHUNK = (idChunks) => Math.min(1, idChunks);
|
|
558
558
|
var JOINS = {
|
|
559
559
|
contracts: {
|
|
560
|
-
make: (http) => new (0,
|
|
560
|
+
make: (http) => new (0, _chunkTBFXRNNEcjs.ContractsResource)(http, PAGE),
|
|
561
561
|
fields: ["id", "contractType", "contractCategory"],
|
|
562
562
|
ids: (lines) => fk(lines, "contractID")
|
|
563
563
|
},
|
|
564
564
|
companies: {
|
|
565
|
-
make: (http) => new (0,
|
|
565
|
+
make: (http) => new (0, _chunkTBFXRNNEcjs.CompaniesResource)(http, PAGE),
|
|
566
566
|
fields: ["id"],
|
|
567
567
|
ids: (lines) => fk(lines, "companyID")
|
|
568
568
|
},
|
|
569
569
|
organizationalLevelAssociations: {
|
|
570
|
-
make: (http) => new (0,
|
|
570
|
+
make: (http) => new (0, _chunkTBFXRNNEcjs.OrganizationalLevelAssociationsResource)(http, PAGE),
|
|
571
571
|
fields: ["id", "organizationalLevel1ID", "organizationalLevel2ID"],
|
|
572
572
|
ids: (lines) => fk(lines, "organizationalLevelAssociationID")
|
|
573
573
|
},
|
|
574
574
|
organizationalLevel1s: {
|
|
575
|
-
make: (http) => new (0,
|
|
575
|
+
make: (http) => new (0, _chunkTBFXRNNEcjs.OrganizationalLevel1sResource)(http, PAGE),
|
|
576
576
|
fields: ["id", "name"],
|
|
577
577
|
ids: (_, j) => fk(j["organizationalLevelAssociations"].values(), "organizationalLevel1ID"),
|
|
578
578
|
chunks: ONE_CHUNK
|
|
579
579
|
},
|
|
580
580
|
organizationalLevel2s: {
|
|
581
|
-
make: (http) => new (0,
|
|
581
|
+
make: (http) => new (0, _chunkTBFXRNNEcjs.OrganizationalLevel2sResource)(http, PAGE),
|
|
582
582
|
fields: ["id", "name"],
|
|
583
583
|
ids: (_, j) => fk(j["organizationalLevelAssociations"].values(), "organizationalLevel2ID"),
|
|
584
584
|
chunks: ONE_CHUNK
|
|
585
585
|
},
|
|
586
586
|
timeEntries: {
|
|
587
|
-
make: (http) => new (0,
|
|
587
|
+
make: (http) => new (0, _chunkTBFXRNNEcjs.TimeEntriesResource)(http, PAGE),
|
|
588
588
|
fields: ["id", "resourceID"],
|
|
589
589
|
ids: (lines) => fk(lines.filter(isLabour), "timeEntryID"),
|
|
590
590
|
// One time entry per labour line: the line count is the upper bound (labour share unknown pre-walk).
|
|
591
591
|
chunks: (_, lines) => pages(lines)
|
|
592
592
|
},
|
|
593
593
|
resources: {
|
|
594
|
-
make: (http, client) => new (0,
|
|
594
|
+
make: (http, client) => new (0, _chunkTBFXRNNEcjs.ResourcesResource)(http, client.config, PAGE),
|
|
595
595
|
fields: ["id", "firstName", "lastName"],
|
|
596
596
|
ids: (_, j) => fk(j["timeEntries"].values(), "resourceID"),
|
|
597
597
|
chunks: ONE_CHUNK
|
|
598
598
|
},
|
|
599
599
|
billingCodes: {
|
|
600
|
-
make: (http) => new (0,
|
|
600
|
+
make: (http) => new (0, _chunkTBFXRNNEcjs.BillingCodesResource)(http, PAGE),
|
|
601
601
|
fields: ["id", "name"],
|
|
602
602
|
ids: (lines) => fk(lines, "billingCodeID")
|
|
603
603
|
}
|
|
@@ -632,7 +632,7 @@ function checkInt(name, v, def, max, problems) {
|
|
|
632
632
|
}
|
|
633
633
|
function validate(opts) {
|
|
634
634
|
if (typeof opts !== "object" || opts === null || Array.isArray(opts)) {
|
|
635
|
-
throw new (0,
|
|
635
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("revenueRollup: opts must be the options object { <scope>, dateFrom, dateTo, ... } (zero wire was issued)", { operation: OP });
|
|
636
636
|
}
|
|
637
637
|
const o = opts;
|
|
638
638
|
const problems = [];
|
|
@@ -649,12 +649,12 @@ function validate(opts) {
|
|
|
649
649
|
if (scopeKind === "tenantWide" && o.tenantWide !== true) problems.push("tenantWide must be exactly true");
|
|
650
650
|
}
|
|
651
651
|
const { dateFrom, dateTo } = o;
|
|
652
|
-
if (!
|
|
652
|
+
if (!_chunkTBFXRNNEcjs.isDateYMD.call(void 0, dateFrom) || !_chunkTBFXRNNEcjs.isDateYMD.call(void 0, dateTo)) {
|
|
653
653
|
problems.push("dateFrom and dateTo are both required as YYYY-MM-DD (the window is inclusive, whole UTC days)");
|
|
654
654
|
} else if (dateFrom > dateTo) {
|
|
655
655
|
problems.push(`dateFrom ${dateFrom} is after dateTo ${dateTo}`);
|
|
656
|
-
} else if (
|
|
657
|
-
problems.push(`the window spans ${
|
|
656
|
+
} else if (_chunkTBFXRNNEcjs.monthsInWindow.call(void 0, dateFrom, dateTo) > _chunkTBFXRNNEcjs.PROFITABILITY_MAX_WINDOW_MONTHS) {
|
|
657
|
+
problems.push(`the window spans ${_chunkTBFXRNNEcjs.monthsInWindow.call(void 0, dateFrom, dateTo)} months; the cap is ${_chunkTBFXRNNEcjs.PROFITABILITY_MAX_WINDOW_MONTHS}`);
|
|
658
658
|
}
|
|
659
659
|
let groupBy = [...DEFAULT_GROUP_BY];
|
|
660
660
|
if (o.groupBy !== void 0) {
|
|
@@ -681,7 +681,7 @@ function validate(opts) {
|
|
|
681
681
|
};
|
|
682
682
|
if (o.includeNonChargeable !== void 0 && typeof o.includeNonChargeable !== "boolean") problems.push("includeNonChargeable must be a boolean");
|
|
683
683
|
if (problems.length > 0) {
|
|
684
|
-
throw new (0,
|
|
684
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`revenueRollup: ${problems.length} problem(s) found pre-request (zero wire was issued)
|
|
685
685
|
- ${problems.join("\n- ")}`, { operation: OP });
|
|
686
686
|
}
|
|
687
687
|
return v;
|
|
@@ -699,7 +699,7 @@ function resolveSelector(name, sel, values) {
|
|
|
699
699
|
}
|
|
700
700
|
function unmatched(name, what, values) {
|
|
701
701
|
const live = [...values].map(([id, l]) => `${id} ${l}`).join("; ") || "(the picklist serves no values)";
|
|
702
|
-
return new (0,
|
|
702
|
+
return new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`revenueRollup: ${name}: ${what}. Live values (id label): ${live}`, {
|
|
703
703
|
operation: OP,
|
|
704
704
|
suggestedAction: `Pass ${name} as ids or exact labels from the live list.`
|
|
705
705
|
});
|
|
@@ -710,10 +710,10 @@ var chunk = (a) => {
|
|
|
710
710
|
for (let i = 0; i < a.length; i += PAGE) out.push(a.slice(i, i + PAGE));
|
|
711
711
|
return out;
|
|
712
712
|
};
|
|
713
|
-
var byId = (rows) => [...new Map(rows.map((r) => [
|
|
714
|
-
var cents = (v) => Math.round(
|
|
715
|
-
var revC = (line) => cents(
|
|
716
|
-
var extC = (line) => cents(
|
|
713
|
+
var byId = (rows) => [...new Map(rows.map((r) => [_chunkTBFXRNNEcjs.num.call(void 0, r["id"]), r])).values()];
|
|
714
|
+
var cents = (v) => Math.round(_chunkTBFXRNNEcjs.num.call(void 0, v) * 100);
|
|
715
|
+
var revC = (line) => cents(_chunkTBFXRNNEcjs.internalAmount.call(void 0, line, "internalCurrencyTotalAmount", "totalAmount"));
|
|
716
|
+
var extC = (line) => cents(_chunkTBFXRNNEcjs.internalAmount.call(void 0, line, "internalCurrencyExtendedPrice", "extendedPrice"));
|
|
717
717
|
var INTERNAL_FIELDS = ["internalCurrencyTotalAmount", "internalCurrencyExtendedPrice"];
|
|
718
718
|
var lacksInternal = (line) => INTERNAL_FIELDS.some((k) => !Number.isFinite(line[k]));
|
|
719
719
|
var money = (c) => c / 100;
|
|
@@ -724,7 +724,7 @@ async function collect(res, filter, includeFields) {
|
|
|
724
724
|
return out;
|
|
725
725
|
}
|
|
726
726
|
function blindCount() {
|
|
727
|
-
return new (0,
|
|
727
|
+
return new (0, _chunkTBFXRNNEcjs.AutotaskError)("revenueRollup: a gate count came back blind (unknown, not zero); the roll-up cannot be sized", {
|
|
728
728
|
code: "INVALID_RESPONSE",
|
|
729
729
|
category: "server",
|
|
730
730
|
operation: OP,
|
|
@@ -734,7 +734,7 @@ function blindCount() {
|
|
|
734
734
|
}
|
|
735
735
|
function countMismatch(what, streamed, counted, rows) {
|
|
736
736
|
const rowNote = rows !== void 0 && rows !== streamed ? ` (${rows} rows)` : "";
|
|
737
|
-
return new (0,
|
|
737
|
+
return new (0, _chunkTBFXRNNEcjs.AutotaskError)(`revenueRollup: the ${what} stream returned ${streamed} distinct ids${rowNote} but the gate count was ${counted} (the data changed mid-walk or a page dropped rows); the fold was discarded`, {
|
|
738
738
|
code: "INVALID_RESPONSE",
|
|
739
739
|
category: "server",
|
|
740
740
|
operation: OP,
|
|
@@ -743,7 +743,7 @@ function countMismatch(what, streamed, counted, rows) {
|
|
|
743
743
|
});
|
|
744
744
|
}
|
|
745
745
|
function budgetError(message, details, suggestedAction) {
|
|
746
|
-
return new (0,
|
|
746
|
+
return new (0, _chunkTBFXRNNEcjs.AutotaskError)(message, { code: "BUDGET_EXCEEDED", category: "policy", operation: OP, details, suggestedAction });
|
|
747
747
|
}
|
|
748
748
|
function lastMonthsFrom(dateTo, months) {
|
|
749
749
|
return new Date(Date.UTC(Number(dateTo.slice(0, 4)), Number(dateTo.slice(5, 7)) - months, 1)).toISOString().slice(0, 10);
|
|
@@ -776,7 +776,7 @@ async function revenueRollup(client, opts) {
|
|
|
776
776
|
const groupDims = v.groupBy.map((d) => DIMENSIONS[d]);
|
|
777
777
|
const paths = [.../* @__PURE__ */ new Set([CONTRACTS_PATH, ...groupDims.flatMap((d) => d.picklist ? [d.picklist] : [])])];
|
|
778
778
|
const labels = {};
|
|
779
|
-
for (const p of paths) labels[p] = await
|
|
779
|
+
for (const p of paths) labels[p] = await _chunkTBFXRNNEcjs.readPicklists.call(void 0, http, p, OP);
|
|
780
780
|
const contractLabels = labels[CONTRACTS_PATH];
|
|
781
781
|
const typeValues = _nullishCoalesce(contractLabels.get("contractType"), () => ( /* @__PURE__ */ new Map()));
|
|
782
782
|
const inTypes = v.contractTypes ? resolveSelector("contractTypes", v.contractTypes, typeValues) : new Map([...typeValues].filter(([, l]) => DEFAULT_CONTRACT_TYPE_RE.test(l)));
|
|
@@ -785,23 +785,23 @@ async function revenueRollup(client, opts) {
|
|
|
785
785
|
let scopeIds = v.scopeIds;
|
|
786
786
|
if (v.scopeKind === "ownerResourceID") {
|
|
787
787
|
const owned = /* @__PURE__ */ new Set();
|
|
788
|
-
for await (const c of new (0,
|
|
789
|
-
const id =
|
|
788
|
+
for await (const c of new (0, _chunkTBFXRNNEcjs.CompaniesResource)(http, PAGE).query({ filter: [{ field: "ownerResourceID", op: "eq", value: v.ownerResourceID }], includeFields: ["id"], maxRecords: PAGE })) {
|
|
789
|
+
const id = _chunkTBFXRNNEcjs.num.call(void 0, c.id);
|
|
790
790
|
if (id > 0) owned.add(id);
|
|
791
791
|
if (owned.size > SCOPE_IDS_MAX) break;
|
|
792
792
|
}
|
|
793
793
|
scopeIds = [...owned].sort((a, b) => a - b);
|
|
794
794
|
if (scopeIds.length === 0 || scopeIds.length > SCOPE_IDS_MAX) {
|
|
795
|
-
throw new (0,
|
|
795
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
796
796
|
`revenueRollup: ownerResourceID ${v.ownerResourceID} resolves to ${scopeIds.length > SCOPE_IDS_MAX ? `more than ${SCOPE_IDS_MAX}` : 0} companies (companies.query; 1..${SCOPE_IDS_MAX} supported)`,
|
|
797
797
|
{ operation: OP, suggestedAction: "Pass companyIDs explicitly, or tenantWide: true." }
|
|
798
798
|
);
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
801
|
const scopeCond = scopeIds === void 0 ? [] : [{ field: v.scopeKind === "contractIDs" ? "contractID" : "companyID", op: "in", value: scopeIds }];
|
|
802
|
-
const invoices = new (0,
|
|
803
|
-
const billingItems = new (0,
|
|
804
|
-
const windowOn = (field) => [{ field, op: "gte", value: v.dateFrom }, { field, op: "lt", value:
|
|
802
|
+
const invoices = new (0, _chunkTBFXRNNEcjs.InvoicesResource)(http, PAGE);
|
|
803
|
+
const billingItems = new (0, _chunkTBFXRNNEcjs.BillingItemsResource)(http, PAGE);
|
|
804
|
+
const windowOn = (field) => [{ field, op: "gte", value: v.dateFrom }, { field, op: "lt", value: _chunkTBFXRNNEcjs.dayAfter.call(void 0, v.dateTo) }];
|
|
805
805
|
const invoiceFilter = (voided2) => [...windowOn("invoiceDateTime"), { field: "isVoided", op: "eq", value: voided2 }];
|
|
806
806
|
const withVoided = v.scopeKind !== "contractIDs";
|
|
807
807
|
const voidedFilter = [...invoiceFilter(true), ...scopeIds !== void 0 && withVoided ? [{ field: "companyID", op: "in", value: scopeIds }] : []];
|
|
@@ -825,7 +825,7 @@ async function revenueRollup(client, opts) {
|
|
|
825
825
|
const invoiceRows = await collect(invoices, invoiceFilter(false), ["id", "invoiceTotal", "invoiceDateTime", "companyID"]);
|
|
826
826
|
const invoiceById = /* @__PURE__ */ new Map();
|
|
827
827
|
for (const r of invoiceRows) {
|
|
828
|
-
invoiceById.set(
|
|
828
|
+
invoiceById.set(_chunkTBFXRNNEcjs.num.call(void 0, r["id"]), { total: cents(r["invoiceTotal"]), month: String(_nullishCoalesce(r["invoiceDateTime"], () => ( ""))).slice(0, 7), companyID: _chunkTBFXRNNEcjs.num.call(void 0, r["companyID"]) });
|
|
829
829
|
}
|
|
830
830
|
if (invoiceById.size !== nInvoices) throw countMismatch("invoice", invoiceById.size, nInvoices, invoiceRows.length);
|
|
831
831
|
const voided = withVoided ? byId(await collect(invoices, voidedFilter, ["id", "invoiceTotal"])) : void 0;
|
|
@@ -839,13 +839,13 @@ async function revenueRollup(client, opts) {
|
|
|
839
839
|
if (rows.length !== n) throw countMismatch("line", rows.length, n);
|
|
840
840
|
return rows;
|
|
841
841
|
}, chunk(ids), { concurrency: CONCURRENCY })).flat();
|
|
842
|
-
const orphan = lines.find((l) => !invoiceById.has(
|
|
842
|
+
const orphan = lines.find((l) => !invoiceById.has(_chunkTBFXRNNEcjs.num.call(void 0, l["invoiceID"])));
|
|
843
843
|
if (orphan !== void 0) {
|
|
844
|
-
throw new (0,
|
|
844
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskError)(`revenueRollup: billing line ${_chunkTBFXRNNEcjs.num.call(void 0, orphan["id"])} belongs to invoice ${_chunkTBFXRNNEcjs.num.call(void 0, orphan["invoiceID"])}, which is not among the ${invoiceById.size} streamed invoices; the fold was discarded`, {
|
|
845
845
|
code: "INVALID_RESPONSE",
|
|
846
846
|
category: "server",
|
|
847
847
|
operation: OP,
|
|
848
|
-
details: { reason: "orphan_line", lineID:
|
|
848
|
+
details: { reason: "orphan_line", lineID: _chunkTBFXRNNEcjs.num.call(void 0, orphan["id"]), invoiceID: _chunkTBFXRNNEcjs.num.call(void 0, orphan["invoiceID"]) },
|
|
849
849
|
suggestedAction: "Retry the call."
|
|
850
850
|
});
|
|
851
851
|
}
|
|
@@ -859,12 +859,12 @@ async function revenueRollup(client, opts) {
|
|
|
859
859
|
const fields = [.../* @__PURE__ */ new Set([...spec.fields, ...groupDims.flatMap((d) => _nullishCoalesce(_optionalChain([d, 'access', _21 => _21.joins, 'optionalAccess', _22 => _22[j]]), () => ( [])))])];
|
|
860
860
|
const want = [...new Set(spec.ids(all, joined))].filter((id) => id > 0).sort((a, b) => a - b);
|
|
861
861
|
const rows = await client.batch((c) => collect(res, [{ field: "id", op: "in", value: c }], fields), chunk(want), { concurrency: CONCURRENCY });
|
|
862
|
-
for (const r of rows.flat()) joined[j].set(
|
|
862
|
+
for (const r of rows.flat()) joined[j].set(_chunkTBFXRNNEcjs.num.call(void 0, r["id"]), r);
|
|
863
863
|
}
|
|
864
864
|
return fold(v, { invoiceById, voided, lines, uninvoiced, joined, labels, inTypes, inCategories, scopeIds, calls, estimate });
|
|
865
865
|
}
|
|
866
866
|
function refusal(v, estimate, fixed, scopeIds, joinCount) {
|
|
867
|
-
const months =
|
|
867
|
+
const months = _chunkTBFXRNNEcjs.monthsInWindow.call(void 0, v.dateFrom, v.dateTo);
|
|
868
868
|
const variable = estimate - fixed;
|
|
869
869
|
const fitMonths = Math.floor((v.budget - fixed) * months / variable);
|
|
870
870
|
const suggestions = [];
|
|
@@ -960,15 +960,15 @@ function fold(v, f) {
|
|
|
960
960
|
const zeroTotal = amt();
|
|
961
961
|
const zeroIds = /* @__PURE__ */ new Set();
|
|
962
962
|
const locate = (line, invoice) => {
|
|
963
|
-
const contractID =
|
|
963
|
+
const contractID = _chunkTBFXRNNEcjs.num.call(void 0, line["contractID"]);
|
|
964
964
|
if (contractID === 0) return { bucket: uncontracted, unresolved: false };
|
|
965
965
|
const contract = f.joined.contracts.get(contractID);
|
|
966
966
|
if (contract === void 0) return { bucket: unresolvedContracts, unresolved: true };
|
|
967
|
-
const type =
|
|
967
|
+
const type = _chunkTBFXRNNEcjs.num.call(void 0, contract["contractType"]);
|
|
968
968
|
if (!f.inTypes.has(type)) return { bucket: slot(otherTypes, typeLabel(type)), unresolved: false };
|
|
969
|
-
const cat =
|
|
969
|
+
const cat = _chunkTBFXRNNEcjs.num.call(void 0, contract["contractCategory"]);
|
|
970
970
|
if (f.inCategories !== void 0 && !f.inCategories.has(cat)) return { bucket: slot(otherCats, cat === 0 ? "uncategorised" : catLabel(cat)), unresolved: false };
|
|
971
|
-
const company = f.joined.companies.get(
|
|
971
|
+
const company = f.joined.companies.get(_chunkTBFXRNNEcjs.num.call(void 0, line["companyID"]));
|
|
972
972
|
if (needCompany && company === void 0) return { bucket: unresolvedCompanies, unresolved: true };
|
|
973
973
|
const ctx = { line, invoice, contract, company, joined: f.joined, labels: f.labels, unlabelled };
|
|
974
974
|
const keys = {};
|
|
@@ -988,7 +988,7 @@ function fold(v, f) {
|
|
|
988
988
|
return { cell };
|
|
989
989
|
};
|
|
990
990
|
for (const line of f.lines) {
|
|
991
|
-
const invoiceID =
|
|
991
|
+
const invoiceID = _chunkTBFXRNNEcjs.num.call(void 0, line["invoiceID"]);
|
|
992
992
|
const invoice = f.invoiceById.get(invoiceID);
|
|
993
993
|
lineTotals.set(invoiceID, (_nullishCoalesce(lineTotals.get(invoiceID), () => ( 0))) + cents(line["totalAmount"]));
|
|
994
994
|
const c = revC(line);
|
|
@@ -1009,9 +1009,9 @@ function fold(v, f) {
|
|
|
1009
1009
|
cell.creditLines += 1;
|
|
1010
1010
|
}
|
|
1011
1011
|
cell.included += extC(line) - c;
|
|
1012
|
-
cell.contracts.add(
|
|
1012
|
+
cell.contracts.add(_chunkTBFXRNNEcjs.num.call(void 0, line["contractID"]));
|
|
1013
1013
|
cell.items += 1;
|
|
1014
|
-
allContracts.add(
|
|
1014
|
+
allContracts.add(_chunkTBFXRNNEcjs.num.call(void 0, line["contractID"]));
|
|
1015
1015
|
if (byLob && cell.keys.lineOfBusiness.id === null) add(noPointer, c);
|
|
1016
1016
|
const k = v.nonChargeable ? ncClass(line) : void 0;
|
|
1017
1017
|
if (k) ncAdd(cell.nc, k, line);
|
|
@@ -1019,7 +1019,7 @@ function fold(v, f) {
|
|
|
1019
1019
|
for (const line of f.uninvoiced) {
|
|
1020
1020
|
const k = ncClass(line);
|
|
1021
1021
|
if (!k) continue;
|
|
1022
|
-
const at = locate(line, { total: 0, month: String(_nullishCoalesce(line["itemDate"], () => ( ""))).slice(0, 7), companyID:
|
|
1022
|
+
const at = locate(line, { total: 0, month: String(_nullishCoalesce(line["itemDate"], () => ( ""))).slice(0, 7), companyID: _chunkTBFXRNNEcjs.num.call(void 0, line["companyID"]) });
|
|
1023
1023
|
if ("cell" in at) ncAdd(at.cell.nc, k, line);
|
|
1024
1024
|
else if (at.unresolved) add(unresolvedNc, extC(line));
|
|
1025
1025
|
}
|
|
@@ -1129,20 +1129,20 @@ function slot(m, k) {
|
|
|
1129
1129
|
async function relationshipMap(client, resourceKey) {
|
|
1130
1130
|
void client;
|
|
1131
1131
|
if (typeof resourceKey !== "string" || resourceKey.trim() === "") {
|
|
1132
|
-
throw new (0,
|
|
1132
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1133
1133
|
`relationshipMap: resourceKey must be a non-empty plan resource key string (e.g. 'tickets'; got ${typeof resourceKey === "string" ? "a blank string" : typeof resourceKey})`,
|
|
1134
1134
|
{ suggestedAction: "Pass the exact plan resource key (snake_case) from autotask_catalog \u2014 e.g. tickets, companies, configuration_items, ticket_notes." }
|
|
1135
1135
|
);
|
|
1136
1136
|
}
|
|
1137
1137
|
const key = resourceKey.trim();
|
|
1138
|
-
const entry =
|
|
1138
|
+
const entry = _chunkTBFXRNNEcjs.RELATIONSHIP_MAP[key];
|
|
1139
1139
|
if (entry === void 0) {
|
|
1140
|
-
throw new (0,
|
|
1141
|
-
`relationshipMap: unknown resource "${key}" \u2014 the plan has ${Object.keys(
|
|
1140
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskError)(
|
|
1141
|
+
`relationshipMap: unknown resource "${key}" \u2014 the plan has ${Object.keys(_chunkTBFXRNNEcjs.RELATIONSHIP_MAP).length} resources`,
|
|
1142
1142
|
{
|
|
1143
1143
|
code: "RESOURCE_UNKNOWN",
|
|
1144
1144
|
category: "validation",
|
|
1145
|
-
suggestedAction: `Pass the exact plan resource key (snake_case) from autotask_catalog (e.g. tickets, companies, configuration_items). Zone facts served are ${
|
|
1145
|
+
suggestedAction: `Pass the exact plan resource key (snake_case) from autotask_catalog (e.g. tickets, companies, configuration_items). Zone facts served are ${_chunkTBFXRNNEcjs.RELATIONSHIP_ZONE.label} (${_chunkTBFXRNNEcjs.RELATIONSHIP_ZONE.zone})-verified.`
|
|
1146
1146
|
}
|
|
1147
1147
|
);
|
|
1148
1148
|
}
|
|
@@ -1159,24 +1159,24 @@ var BLIND_SURFACE_KINDS = [
|
|
|
1159
1159
|
async function blindSurfaces(client, opts) {
|
|
1160
1160
|
void client;
|
|
1161
1161
|
if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
|
|
1162
|
-
throw new (0,
|
|
1162
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("blindSurfaces: opts must be an object { resource?: string, kind?: BlindSurfaceKind }");
|
|
1163
1163
|
}
|
|
1164
|
-
const inv =
|
|
1164
|
+
const inv = _chunkTBFXRNNEcjs.BLIND_SURFACE_INVENTORY;
|
|
1165
1165
|
if (inv === null) {
|
|
1166
|
-
throw new (0,
|
|
1166
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("blindSurfaces: the reachability inventory is absent from the generated artifact \u2014 re-run the build");
|
|
1167
1167
|
}
|
|
1168
1168
|
let surfaces = inv.surfaces;
|
|
1169
1169
|
if (_optionalChain([opts, 'optionalAccess', _28 => _28.resource]) !== void 0) {
|
|
1170
1170
|
const key = typeof opts.resource === "string" ? opts.resource.trim() : "";
|
|
1171
1171
|
if (key === "") {
|
|
1172
|
-
throw new (0,
|
|
1172
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1173
1173
|
"blindSurfaces: opts.resource must be a non-empty plan resource key string (e.g. 'tickets')",
|
|
1174
1174
|
{ suggestedAction: "Pass the exact plan resource key (snake_case) from autotask_catalog \u2014 e.g. tickets, companies, configuration_items." }
|
|
1175
1175
|
);
|
|
1176
1176
|
}
|
|
1177
1177
|
if (!inv.surfaces.some((row) => row.resource === key)) {
|
|
1178
|
-
throw new (0,
|
|
1179
|
-
`blindSurfaces: unknown resource "${key}" \u2014 the plan has ${Object.keys(
|
|
1178
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskError)(
|
|
1179
|
+
`blindSurfaces: unknown resource "${key}" \u2014 the plan has ${Object.keys(_chunkTBFXRNNEcjs.RELATIONSHIP_MAP).length} resources`,
|
|
1180
1180
|
{
|
|
1181
1181
|
code: "RESOURCE_UNKNOWN",
|
|
1182
1182
|
category: "validation",
|
|
@@ -1188,7 +1188,7 @@ async function blindSurfaces(client, opts) {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
if (_optionalChain([opts, 'optionalAccess', _29 => _29.kind]) !== void 0) {
|
|
1190
1190
|
if (!BLIND_SURFACE_KINDS.includes(opts.kind)) {
|
|
1191
|
-
throw new (0,
|
|
1191
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1192
1192
|
`blindSurfaces: unknown kind "${String(opts.kind)}" \u2014 the valid classes are: ${BLIND_SURFACE_KINDS.join(", ")}`,
|
|
1193
1193
|
{ suggestedAction: `Filter with one of: ${BLIND_SURFACE_KINDS.join(", ")} (or omit kind for the full 116-surface inventory).` }
|
|
1194
1194
|
);
|
|
@@ -1201,51 +1201,51 @@ async function blindSurfaces(client, opts) {
|
|
|
1201
1201
|
// src/operations/probeReachability.ts
|
|
1202
1202
|
async function probeReachability(client, opts) {
|
|
1203
1203
|
if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
|
|
1204
|
-
throw new (0,
|
|
1204
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("probeReachability: opts must be an object { resources?: string[], limit?: 1|2, maxWireCalls?: number, confirmProbe?: true }");
|
|
1205
1205
|
}
|
|
1206
|
-
const defs =
|
|
1206
|
+
const defs = _chunkTBFXRNNEcjs.REACHABILITY_PROBE_DEFAULTS;
|
|
1207
1207
|
if (_optionalChain([opts, 'optionalAccess', _30 => _30.confirmProbe]) !== true) {
|
|
1208
|
-
throw new (0,
|
|
1208
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1209
1209
|
"probeReachability: confirmProbe: true is required \u2014 the op deliberately fans out read wire across the tenant (one bounded query per surface); pass confirmProbe: true to run it",
|
|
1210
1210
|
{ suggestedAction: `Re-call with { confirmProbe: true } (plus resources/limit/maxWireCalls as needed). For the ZERO-wire pinned inventory use operations.blindSurfaces.` }
|
|
1211
1211
|
);
|
|
1212
1212
|
}
|
|
1213
1213
|
const limit = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _31 => _31.limit]), () => ( defs.limitDefault));
|
|
1214
1214
|
if (!Number.isInteger(limit) || limit < 1 || limit > defs.limitMax) {
|
|
1215
|
-
throw new (0,
|
|
1215
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1216
1216
|
`probeReachability: limit must be an integer 1..${defs.limitMax} (got ${String(limit)}) \u2014 the rows-per-surface bound for the discovery read`
|
|
1217
1217
|
);
|
|
1218
1218
|
}
|
|
1219
1219
|
const cap = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _32 => _32.maxWireCalls]), () => ( defs.defaultCap));
|
|
1220
1220
|
if (!Number.isInteger(cap) || cap < 1) {
|
|
1221
|
-
throw new (0,
|
|
1221
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`probeReachability: maxWireCalls must be a positive integer (got ${String(cap)})`);
|
|
1222
1222
|
}
|
|
1223
1223
|
if (cap > defs.hardCap) {
|
|
1224
|
-
throw new (0,
|
|
1224
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1225
1225
|
`probeReachability: maxWireCalls ${cap} exceeds the hard wire cap of ${defs.hardCap} \u2014 the sweep is refused above it (never capped silently)`,
|
|
1226
1226
|
{ suggestedAction: `Pass maxWireCalls \u2264 ${defs.hardCap} and a resources set no larger than the cap (the refused set is never truncated).` }
|
|
1227
1227
|
);
|
|
1228
1228
|
}
|
|
1229
|
-
const inv =
|
|
1229
|
+
const inv = _chunkTBFXRNNEcjs.BLIND_SURFACE_INVENTORY;
|
|
1230
1230
|
if (inv === null) {
|
|
1231
|
-
throw new (0,
|
|
1231
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("probeReachability: the reachability inventory is absent from the generated artifact \u2014 re-run the build");
|
|
1232
1232
|
}
|
|
1233
1233
|
let targets;
|
|
1234
1234
|
if (_optionalChain([opts, 'optionalAccess', _33 => _33.resources]) === void 0) {
|
|
1235
1235
|
targets = [...defs.defaultTargets];
|
|
1236
1236
|
} else {
|
|
1237
1237
|
if (!Array.isArray(opts.resources) || opts.resources.length === 0) {
|
|
1238
|
-
throw new (0,
|
|
1238
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("probeReachability: opts.resources must be a non-empty string[] of plan resource keys (or omit it for the default non-data-full set)");
|
|
1239
1239
|
}
|
|
1240
1240
|
const seen = /* @__PURE__ */ new Set();
|
|
1241
1241
|
for (const r of opts.resources) {
|
|
1242
1242
|
if (typeof r !== "string" || r.trim() === "") {
|
|
1243
|
-
throw new (0,
|
|
1243
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`probeReachability: opts.resources must contain non-empty plan resource key strings (got ${typeof r === "string" && r.trim() === "" ? "a blank string" : typeof r})`);
|
|
1244
1244
|
}
|
|
1245
1245
|
const key = r.trim();
|
|
1246
1246
|
if (!inv.surfaces.some((row) => row.resource === key)) {
|
|
1247
1247
|
const surfaceCount = new Set(inv.surfaces.map((s) => s.resource)).size;
|
|
1248
|
-
throw new (0,
|
|
1248
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskError)(
|
|
1249
1249
|
`probeReachability: unknown resource "${key}" \u2014 the inventory has ${surfaceCount} surfaces`,
|
|
1250
1250
|
{
|
|
1251
1251
|
code: "RESOURCE_UNKNOWN",
|
|
@@ -1259,7 +1259,7 @@ async function probeReachability(client, opts) {
|
|
|
1259
1259
|
targets = [...seen];
|
|
1260
1260
|
}
|
|
1261
1261
|
if (targets.length > cap) {
|
|
1262
|
-
throw new (0,
|
|
1262
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1263
1263
|
`probeReachability: ${targets.length} requested surface(s) exceed the wire cap of ${cap} \u2014 the sweep is refused above its cap (never truncated)`,
|
|
1264
1264
|
{ suggestedAction: `Raise maxWireCalls (\u2264 ${defs.hardCap}) to cover the set, or pass a smaller resources list.` }
|
|
1265
1265
|
);
|
|
@@ -1269,7 +1269,7 @@ async function probeReachability(client, opts) {
|
|
|
1269
1269
|
for (const resource of targets.sort()) {
|
|
1270
1270
|
const row = byResource.get(resource);
|
|
1271
1271
|
if (row === void 0) continue;
|
|
1272
|
-
const holder = client[
|
|
1272
|
+
const holder = client[_chunkTBFXRNNEcjs.camelKey.call(void 0, resource)];
|
|
1273
1273
|
const probeFn = _optionalChain([holder, 'optionalAccess', _34 => _34.queryBounded]);
|
|
1274
1274
|
if (typeof probeFn !== "function") {
|
|
1275
1275
|
results.push({
|
|
@@ -1288,7 +1288,7 @@ async function probeReachability(client, opts) {
|
|
|
1288
1288
|
probe: { ok: true, wire: 1, error: null }
|
|
1289
1289
|
});
|
|
1290
1290
|
} catch (err) {
|
|
1291
|
-
const code =
|
|
1291
|
+
const code = _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) ? err.code : "NETWORK_ERROR";
|
|
1292
1292
|
const message = err instanceof Error ? err.message : String(err);
|
|
1293
1293
|
results.push({
|
|
1294
1294
|
...row,
|
|
@@ -1316,30 +1316,30 @@ var CREATE_BLOCKER_KINDS = [
|
|
|
1316
1316
|
async function createGuidance(client, opts) {
|
|
1317
1317
|
void client;
|
|
1318
1318
|
if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
|
|
1319
|
-
throw new (0,
|
|
1319
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1320
1320
|
"createGuidance: opts must be an object { resources?: string[], kind?: CreateBlockerKind }"
|
|
1321
1321
|
);
|
|
1322
1322
|
}
|
|
1323
|
-
let servedRows =
|
|
1323
|
+
let servedRows = _chunkTBFXRNNEcjs.CREATE_GUIDANCE.rows.map((row) => ({
|
|
1324
1324
|
...row,
|
|
1325
1325
|
// Issue #219 N4: one precedence rule, stated on every row (live-proven >
|
|
1326
1326
|
// zone > spec). The spec set is not available here (it is a LIVE read) —
|
|
1327
1327
|
// the helper is handed the plan's two shapes and names the source.
|
|
1328
|
-
requiredFields:
|
|
1328
|
+
requiredFields: _chunkTBFXRNNEcjs.effectiveRequiredFields.call(void 0, void 0, _nullishCoalesce(_optionalChain([_chunkTBFXRNNEcjs.RELATIONSHIP_MAP, 'access', _36 => _36[row.resource], 'optionalAccess', _37 => _37.zoneFacts]), () => ( null)))
|
|
1329
1329
|
}));
|
|
1330
1330
|
if (_optionalChain([opts, 'optionalAccess', _38 => _38.resources]) !== void 0) {
|
|
1331
1331
|
if (!Array.isArray(opts.resources) || opts.resources.length === 0) {
|
|
1332
|
-
throw new (0,
|
|
1332
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("createGuidance: opts.resources must be a non-empty string[] of plan resource keys");
|
|
1333
1333
|
}
|
|
1334
1334
|
const wanted = /* @__PURE__ */ new Set();
|
|
1335
1335
|
for (const r of opts.resources) {
|
|
1336
1336
|
if (typeof r !== "string" || r.trim() === "") {
|
|
1337
|
-
throw new (0,
|
|
1337
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("createGuidance: opts.resources must contain non-empty plan resource key strings");
|
|
1338
1338
|
}
|
|
1339
1339
|
const key = r.trim();
|
|
1340
|
-
if (!
|
|
1341
|
-
throw new (0,
|
|
1342
|
-
`createGuidance: unknown resource "${key}" \u2014 the catalog has ${
|
|
1340
|
+
if (!_chunkTBFXRNNEcjs.CREATE_GUIDANCE.rows.some((row) => row.resource === key)) {
|
|
1341
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskError)(
|
|
1342
|
+
`createGuidance: unknown resource "${key}" \u2014 the catalog has ${_chunkTBFXRNNEcjs.CREATE_GUIDANCE.rows.length} create entities`,
|
|
1343
1343
|
{
|
|
1344
1344
|
code: "RESOURCE_UNKNOWN",
|
|
1345
1345
|
category: "validation",
|
|
@@ -1353,18 +1353,18 @@ async function createGuidance(client, opts) {
|
|
|
1353
1353
|
}
|
|
1354
1354
|
if (_optionalChain([opts, 'optionalAccess', _39 => _39.kind]) !== void 0) {
|
|
1355
1355
|
if (!CREATE_BLOCKER_KINDS.includes(opts.kind)) {
|
|
1356
|
-
throw new (0,
|
|
1356
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1357
1357
|
`createGuidance: unknown kind "${String(opts.kind)}" \u2014 the valid kinds are: ${CREATE_BLOCKER_KINDS.join(", ")}`
|
|
1358
1358
|
);
|
|
1359
1359
|
}
|
|
1360
1360
|
servedRows = servedRows.filter((row) => _optionalChain([row, 'access', _40 => _40.blocker, 'optionalAccess', _41 => _41.kind]) === opts.kind);
|
|
1361
1361
|
}
|
|
1362
1362
|
return {
|
|
1363
|
-
zone:
|
|
1364
|
-
label:
|
|
1365
|
-
verifiedAt:
|
|
1363
|
+
zone: _chunkTBFXRNNEcjs.CREATE_GUIDANCE.zone,
|
|
1364
|
+
label: _chunkTBFXRNNEcjs.CREATE_GUIDANCE.label,
|
|
1365
|
+
verifiedAt: _chunkTBFXRNNEcjs.CREATE_GUIDANCE.verifiedAt,
|
|
1366
1366
|
rows: servedRows,
|
|
1367
|
-
counts:
|
|
1367
|
+
counts: _chunkTBFXRNNEcjs.CREATE_GUIDANCE.counts
|
|
1368
1368
|
};
|
|
1369
1369
|
}
|
|
1370
1370
|
|
|
@@ -1373,7 +1373,7 @@ var RECOVERY_CONFIRM = "operations.recovery";
|
|
|
1373
1373
|
var RECOVERY_DEFAULT_LIMIT = 25;
|
|
1374
1374
|
var RECOVERY_MAX_LIMIT = 100;
|
|
1375
1375
|
function configError(message, operation, suggestedAction) {
|
|
1376
|
-
throw new (0,
|
|
1376
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(message, { operation, suggestedAction });
|
|
1377
1377
|
}
|
|
1378
1378
|
function parseMatchId(record) {
|
|
1379
1379
|
const raw = record.id;
|
|
@@ -1389,7 +1389,7 @@ function parseMatchId(record) {
|
|
|
1389
1389
|
return { id: null, unsafe: true };
|
|
1390
1390
|
}
|
|
1391
1391
|
function validateRecoveryInput(input, operation) {
|
|
1392
|
-
if (!
|
|
1392
|
+
if (!_chunkTBFXRNNEcjs.isRecord.call(void 0, input)) {
|
|
1393
1393
|
configError(
|
|
1394
1394
|
`recovery: input must be an object { resource, marker, ... } (got ${typeof input})`,
|
|
1395
1395
|
operation,
|
|
@@ -1423,10 +1423,10 @@ function validateRecoveryInput(input, operation) {
|
|
|
1423
1423
|
return { resource, marker, action };
|
|
1424
1424
|
}
|
|
1425
1425
|
function resolveRecoveryTarget(client, resource, operation) {
|
|
1426
|
-
const entry =
|
|
1426
|
+
const entry = _chunkTBFXRNNEcjs.RELATIONSHIP_MAP[resource];
|
|
1427
1427
|
if (entry === void 0) {
|
|
1428
|
-
throw new (0,
|
|
1429
|
-
`recovery: unknown resource "${resource}" \u2014 the plan has ${Object.keys(
|
|
1428
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskError)(
|
|
1429
|
+
`recovery: unknown resource "${resource}" \u2014 the plan has ${Object.keys(_chunkTBFXRNNEcjs.RELATIONSHIP_MAP).length} resources`,
|
|
1430
1430
|
{
|
|
1431
1431
|
code: "RESOURCE_UNKNOWN",
|
|
1432
1432
|
category: "validation",
|
|
@@ -1435,7 +1435,7 @@ function resolveRecoveryTarget(client, resource, operation) {
|
|
|
1435
1435
|
}
|
|
1436
1436
|
);
|
|
1437
1437
|
}
|
|
1438
|
-
const holder = client[
|
|
1438
|
+
const holder = client[_chunkTBFXRNNEcjs.camelKey.call(void 0, resource)];
|
|
1439
1439
|
if (!holder || typeof holder.queryBounded !== "function") {
|
|
1440
1440
|
configError(
|
|
1441
1441
|
`recovery: ${resource} exposes no bounded query surface \u2014 the marker search cannot run`,
|
|
@@ -1446,7 +1446,7 @@ function resolveRecoveryTarget(client, resource, operation) {
|
|
|
1446
1446
|
return { entry, holder };
|
|
1447
1447
|
}
|
|
1448
1448
|
function resolveMarkerField(input, resource, operation) {
|
|
1449
|
-
const field = input.field !== void 0 ? String(input.field) :
|
|
1449
|
+
const field = input.field !== void 0 ? String(input.field) : _chunkTBFXRNNEcjs.MARKER_FIELDS[resource];
|
|
1450
1450
|
if (typeof field !== "string" || field.trim() === "") {
|
|
1451
1451
|
configError(
|
|
1452
1452
|
`recovery: ${resource} has no plan markerField and no input.field was passed \u2014 the marker search needs a name-like field to filter on`,
|
|
@@ -1485,7 +1485,7 @@ function resolveExtraFilter(input, operation) {
|
|
|
1485
1485
|
);
|
|
1486
1486
|
}
|
|
1487
1487
|
for (const c of input.filter) {
|
|
1488
|
-
if (!
|
|
1488
|
+
if (!_chunkTBFXRNNEcjs.isRecord.call(void 0, c) || typeof c.op !== "string" || c.op === "and" || c.op === "or") {
|
|
1489
1489
|
configError(
|
|
1490
1490
|
"recovery: input.filter accepts only plain leaf conditions ({ field, op, value }) \u2014 no grouping",
|
|
1491
1491
|
operation,
|
|
@@ -1510,7 +1510,7 @@ function resolveLimit(input, operation) {
|
|
|
1510
1510
|
async function applyRecoveryDeletes(holder, matches, parentId, resource, operation) {
|
|
1511
1511
|
const deleteMethod = holder.delete;
|
|
1512
1512
|
if (deleteMethod === void 0) {
|
|
1513
|
-
throw new (0,
|
|
1513
|
+
throw new (0, _chunkTBFXRNNEcjs.DeleteBoundaryError)(
|
|
1514
1514
|
`recovery: ${resource} has no delete method on the client \u2014 the boundary is marked available in the plan but the typed delete surface is missing`,
|
|
1515
1515
|
{
|
|
1516
1516
|
operation,
|
|
@@ -1539,14 +1539,14 @@ async function applyRecoveryDeletes(holder, matches, parentId, resource, operati
|
|
|
1539
1539
|
verify = "still-present";
|
|
1540
1540
|
}
|
|
1541
1541
|
} catch (err) {
|
|
1542
|
-
if (err instanceof
|
|
1542
|
+
if (err instanceof _chunkTBFXRNNEcjs.NotFoundError) verify = "not-found";
|
|
1543
1543
|
else {
|
|
1544
1544
|
verify = "error";
|
|
1545
|
-
code =
|
|
1545
|
+
code = _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) ? err.code : "SERVER_ERROR";
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
1548
1548
|
} catch (err) {
|
|
1549
|
-
code =
|
|
1549
|
+
code = _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) ? err.code : "SERVER_ERROR";
|
|
1550
1550
|
}
|
|
1551
1551
|
deleted.push({ id, verified: verify === "not-found", code });
|
|
1552
1552
|
}
|
|
@@ -1574,7 +1574,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1574
1574
|
const parentId = resolveParentId(input, entry, resource, operation);
|
|
1575
1575
|
const extra = resolveExtraFilter(input, operation);
|
|
1576
1576
|
const limit = resolveLimit(input, operation);
|
|
1577
|
-
const boundaryNote =
|
|
1577
|
+
const boundaryNote = _chunkTBFXRNNEcjs.DELETE_BOUNDARY_NOTES[resource];
|
|
1578
1578
|
const boundary = {
|
|
1579
1579
|
available: boundaryNote === void 0,
|
|
1580
1580
|
reason: _nullishCoalesce(boundaryNote, () => ( null)),
|
|
@@ -1586,7 +1586,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1586
1586
|
};
|
|
1587
1587
|
const isDelete = action === "delete";
|
|
1588
1588
|
if (isDelete && boundaryNote !== void 0) {
|
|
1589
|
-
throw new (0,
|
|
1589
|
+
throw new (0, _chunkTBFXRNNEcjs.DeleteBoundaryError)(
|
|
1590
1590
|
`recovery: the vendor defines no DELETE for ${resource} \u2014 the delete cannot be issued through the API (zero wire was issued)`,
|
|
1591
1591
|
{
|
|
1592
1592
|
operation,
|
|
@@ -1598,7 +1598,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1598
1598
|
const dryRun = _optionalChain([opts, 'optionalAccess', _42 => _42.dryRun]) !== false;
|
|
1599
1599
|
const confirm = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _43 => _43.confirm]), () => ( input.confirm));
|
|
1600
1600
|
if (isDelete && !dryRun && confirm !== RECOVERY_CONFIRM) {
|
|
1601
|
-
throw new (0,
|
|
1601
|
+
throw new (0, _chunkTBFXRNNEcjs.ConfirmationRequiredError)(
|
|
1602
1602
|
`recovery: action 'delete' apply is destructive and requires its confirmation flag: pass confirm: "${RECOVERY_CONFIRM}"`,
|
|
1603
1603
|
{
|
|
1604
1604
|
operation: RECOVERY_CONFIRM,
|
|
@@ -1614,7 +1614,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1614
1614
|
const query = await holder.queryBounded({ filter: conditions, limit });
|
|
1615
1615
|
if (query.hasMore) {
|
|
1616
1616
|
const wire = isDelete ? "DELETE wire" : "mutating wire";
|
|
1617
|
-
throw new (0,
|
|
1617
|
+
throw new (0, _chunkTBFXRNNEcjs.RecoveryTruncatedError)(
|
|
1618
1618
|
`recovery: the marker search on ${resource} TRIPPED its match cap (${limit}) \u2014 more matches exist than were returned (zero ${wire} was issued)`,
|
|
1619
1619
|
{
|
|
1620
1620
|
operation,
|
|
@@ -1643,7 +1643,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1643
1643
|
return { ...base, simulated: true, dryRun: true };
|
|
1644
1644
|
}
|
|
1645
1645
|
if (unsafeId) {
|
|
1646
|
-
throw new (0,
|
|
1646
|
+
throw new (0, _chunkTBFXRNNEcjs.MarkerUnsafeIdError)(
|
|
1647
1647
|
`recovery: ${unsafeIds.length} of ${matches.length} match(es) on ${resource} have ids beyond Number.MAX_SAFE_INTEGER \u2014 they CANNOT be addressed through the SDK's typed delete surface (zero DELETE wire was issued)`,
|
|
1648
1648
|
{
|
|
1649
1649
|
operation,
|
|
@@ -1661,7 +1661,7 @@ function needsConfirmation(record) {
|
|
|
1661
1661
|
return record.effect === "destructive" || (_nullishCoalesce(record.flags, () => ( []))).includes("requiresApproval");
|
|
1662
1662
|
}
|
|
1663
1663
|
function refuse(message, operation, suggestedAction) {
|
|
1664
|
-
throw new (0,
|
|
1664
|
+
throw new (0, _chunkTBFXRNNEcjs.ConfirmationRequiredError)(message, { operation, suggestedAction });
|
|
1665
1665
|
}
|
|
1666
1666
|
var MODE_BY_EFFECT = {
|
|
1667
1667
|
read: "read",
|
|
@@ -1707,7 +1707,7 @@ function looseTypeOk(type, value) {
|
|
|
1707
1707
|
case "string[]":
|
|
1708
1708
|
return Array.isArray(value) && value.every((v) => typeof v === "string");
|
|
1709
1709
|
case "object":
|
|
1710
|
-
return
|
|
1710
|
+
return _chunkTBFXRNNEcjs.isRecord.call(void 0, value);
|
|
1711
1711
|
default:
|
|
1712
1712
|
return true;
|
|
1713
1713
|
}
|
|
@@ -1721,12 +1721,12 @@ function declaredArgList(record) {
|
|
|
1721
1721
|
function resolveDispatchArgs(record, argsIn) {
|
|
1722
1722
|
const operation = record.id;
|
|
1723
1723
|
const bad = (message) => {
|
|
1724
|
-
throw new (0,
|
|
1724
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`invoke: "${operation}" ${message}`, { operation });
|
|
1725
1725
|
};
|
|
1726
1726
|
if (argsIn === void 0 || argsIn === null) return [];
|
|
1727
1727
|
if (Array.isArray(argsIn)) return argsIn;
|
|
1728
1728
|
const byName = argsIn;
|
|
1729
|
-
if (!
|
|
1729
|
+
if (!_chunkTBFXRNNEcjs.isRecord.call(void 0, byName) || ![Object.prototype, null].includes(Object.getPrototypeOf(byName))) {
|
|
1730
1730
|
return bad(`args must be a positional array or a plain object of named inputs (declared: ${declaredArgList(record)})`);
|
|
1731
1731
|
}
|
|
1732
1732
|
const schema = _nullishCoalesce(record.inputSchema, () => ( {}));
|
|
@@ -1747,7 +1747,7 @@ function validateDispatchArgs(record, argsIn) {
|
|
|
1747
1747
|
const bagName = names.find((n) => schema[n].properties);
|
|
1748
1748
|
const surplus = args[names.length];
|
|
1749
1749
|
const bagHint = bagName && surplus !== null && typeof surplus === "object" && !Array.isArray(surplus) ? ` \u2014 options go inside the single ${bagName} object` : "";
|
|
1750
|
-
throw new (0,
|
|
1750
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1751
1751
|
`invoke: "${operation}" declares ${names.length} positional arg(s) (${declaredArgList(record)}) but ${args.length} were passed \u2014 extra args are refused${bagHint}`,
|
|
1752
1752
|
{
|
|
1753
1753
|
operation,
|
|
@@ -1757,7 +1757,7 @@ function validateDispatchArgs(record, argsIn) {
|
|
|
1757
1757
|
}
|
|
1758
1758
|
const required = names.filter((n) => schema[n].required);
|
|
1759
1759
|
if (args.length < required.length) {
|
|
1760
|
-
throw new (0,
|
|
1760
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1761
1761
|
`invoke: "${operation}" requires ${required.length} positional arg(s) (${required.map((n) => `${n}: ${schema[n].type}`).join(", ")}) but only ${args.length} were passed \u2014 declared args: ${declaredArgList(record)}`,
|
|
1762
1762
|
{ operation }
|
|
1763
1763
|
);
|
|
@@ -1768,7 +1768,7 @@ function validateDispatchArgs(record, argsIn) {
|
|
|
1768
1768
|
const name = names[i];
|
|
1769
1769
|
const spec = schema[name];
|
|
1770
1770
|
if (!looseTypeOk(spec.type, value)) {
|
|
1771
|
-
throw new (0,
|
|
1771
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1772
1772
|
`invoke: "${operation}" arg ${i + 1} is declared ${name}: ${spec.type} \u2014 the value has the wrong type (pass a ${spec.type} value)`,
|
|
1773
1773
|
{ operation }
|
|
1774
1774
|
);
|
|
@@ -1776,8 +1776,8 @@ function validateDispatchArgs(record, argsIn) {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
}
|
|
1778
1778
|
function foldFlattenedOpts(record, toolArgs) {
|
|
1779
|
-
if (!
|
|
1780
|
-
throw new (0,
|
|
1779
|
+
if (!_chunkTBFXRNNEcjs.isRecord.call(void 0, toolArgs)) {
|
|
1780
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`invoke: "${record.id}" tool args must be a plain object of named inputs`, { operation: record.id });
|
|
1781
1781
|
}
|
|
1782
1782
|
const bagKeys = (_nullishCoalesce(_optionalChain([record, 'access', _44 => _44.inputSchema, 'optionalAccess', _45 => _45.opts, 'optionalAccess', _46 => _46.properties]), () => ( []))).map((p) => p.name);
|
|
1783
1783
|
const flat = Object.keys(toolArgs).filter((k) => bagKeys.includes(k) && toolArgs[k] !== void 0 && toolArgs[k] !== null);
|
|
@@ -1786,7 +1786,7 @@ function foldFlattenedOpts(record, toolArgs) {
|
|
|
1786
1786
|
if (folded.opts === null) delete folded.opts;
|
|
1787
1787
|
if (flat.length === 0) return folded;
|
|
1788
1788
|
if (folded.opts !== void 0) {
|
|
1789
|
-
throw new (0,
|
|
1789
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1790
1790
|
`invoke: "${record.id}" was given both opts and flattened option(s) ${flat.map((k) => `"${k}"`).join(", ")} \u2014 pass one form`,
|
|
1791
1791
|
{ operation: record.id }
|
|
1792
1792
|
);
|
|
@@ -1848,11 +1848,11 @@ function validateParamsBag(record, args) {
|
|
|
1848
1848
|
const valid = PARAMS_BAG_KEYS[record.operation];
|
|
1849
1849
|
if (valid === void 0) return;
|
|
1850
1850
|
const bag = _optionalChain([args, 'optionalAccess', _47 => _47[0]]);
|
|
1851
|
-
if (bag === void 0 || bag === null || !
|
|
1851
|
+
if (bag === void 0 || bag === null || !_chunkTBFXRNNEcjs.isRecord.call(void 0, bag)) return;
|
|
1852
1852
|
const unknown = Object.keys(bag).filter((k) => !valid.includes(k));
|
|
1853
1853
|
if (unknown.length === 0) return;
|
|
1854
1854
|
const suggestions = unknown.map((k) => [k, suggestForKey(k, valid)]).filter((pair) => pair[1] !== null).map(([k, s]) => `"${k}" \u2192 "${s}"`);
|
|
1855
|
-
throw new (0,
|
|
1855
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1856
1856
|
`invoke: "${record.id}" params bag has unknown key(s) ${unknown.map((k) => `"${k}"`).join(", ")} \u2014 the bag is closed (valid keys: ${valid.join(", ")})`,
|
|
1857
1857
|
{
|
|
1858
1858
|
operation: record.id,
|
|
@@ -1864,16 +1864,16 @@ function validateGetBag(record, args) {
|
|
|
1864
1864
|
if (record.kind !== "primitive" || record.operation !== "get") return;
|
|
1865
1865
|
const at = Object.keys(_nullishCoalesce(record.inputSchema, () => ( {}))).indexOf("opts");
|
|
1866
1866
|
const bag = at < 0 ? void 0 : _optionalChain([args, 'optionalAccess', _48 => _48[at]]);
|
|
1867
|
-
if (bag === void 0 || bag === null || !
|
|
1867
|
+
if (bag === void 0 || bag === null || !_chunkTBFXRNNEcjs.isRecord.call(void 0, bag)) return;
|
|
1868
1868
|
const unknown = Object.keys(bag).filter((k) => k !== "fresh");
|
|
1869
1869
|
if (unknown.length > 0) {
|
|
1870
|
-
throw new (0,
|
|
1870
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1871
1871
|
`invoke: "${record.id}" opts bag has unknown key(s) ${unknown.map((k) => `"${k}"`).join(", ")} \u2014 the bag is closed (valid keys: fresh)`,
|
|
1872
1872
|
{ operation: record.id, suggestedAction: "Pass only { fresh?: boolean }." }
|
|
1873
1873
|
);
|
|
1874
1874
|
}
|
|
1875
1875
|
if (bag.fresh !== void 0 && typeof bag.fresh !== "boolean") {
|
|
1876
|
-
throw new (0,
|
|
1876
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1877
1877
|
`invoke: fresh must be a boolean (got ${typeof bag.fresh}) \u2014 "${record.id}" was not issued`,
|
|
1878
1878
|
{ operation: record.id, suggestedAction: "Pass fresh: true (bypass the read cache) or omit it." }
|
|
1879
1879
|
);
|
|
@@ -1885,7 +1885,7 @@ function validateInvokeOptions(opts, operation) {
|
|
|
1885
1885
|
const unknown = Object.keys(opts).filter((k) => !INVOKE_OPTION_KEYS.includes(k));
|
|
1886
1886
|
if (unknown.length === 0) return;
|
|
1887
1887
|
const suggestions = unknown.map((k) => [k, suggestForKey(k, ["dryRun", "confirm", "lastModifiedDate", "maxRetries", "fresh"])]).filter((pair) => pair[1] !== null).map(([k, s]) => `"${k}" \u2192 "${s}"`);
|
|
1888
|
-
throw new (0,
|
|
1888
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1889
1889
|
`invoke: "${operation}" has unknown option key(s) ${unknown.map((k) => `"${k}"`).join(", ")} \u2014 the options set is closed (valid: dryRun, confirm, lastModifiedDate, maxRetries, fresh; "mode" is internal to the mode wrappers)`,
|
|
1890
1890
|
{
|
|
1891
1891
|
operation,
|
|
@@ -1898,7 +1898,7 @@ function unknownKeysRefusal(raw, validKeys, subject, operation) {
|
|
|
1898
1898
|
const unknown = Object.keys(raw).filter((k) => !validKeys.includes(k));
|
|
1899
1899
|
if (unknown.length === 0) return null;
|
|
1900
1900
|
const suggestions = unknown.map((k) => [k, suggestForKey(k, [...validKeys])]).filter((pair) => pair[1] !== null).map(([k, s]) => `"${k}" \u2192 "${s}"`);
|
|
1901
|
-
return new (0,
|
|
1901
|
+
return new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1902
1902
|
`unknown ${subject} ${unknown.map((k) => `"${k}"`).join(", ")} \u2014 the ${subject} set is closed (valid keys: ${validKeys.join(", ")})`,
|
|
1903
1903
|
{
|
|
1904
1904
|
...operation !== void 0 ? { operation } : {},
|
|
@@ -1927,7 +1927,7 @@ function bufferResult(buf) {
|
|
|
1927
1927
|
function resolveRecord(operation) {
|
|
1928
1928
|
const record = byId2.get(operation);
|
|
1929
1929
|
if (record === void 0) {
|
|
1930
|
-
throw new (0,
|
|
1930
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1931
1931
|
`invoke: unknown operation "${operation}" \u2014 it is not in the capability registry`,
|
|
1932
1932
|
{ operation, suggestedAction: "List the registry (the ./capabilities subpath) for the exact operation key." }
|
|
1933
1933
|
);
|
|
@@ -1938,30 +1938,30 @@ function governPreRequest(record, operation, opts) {
|
|
|
1938
1938
|
validateInvokeOptions(opts, operation);
|
|
1939
1939
|
const mode = opts.mode;
|
|
1940
1940
|
if (mode !== void 0 && MODE_BY_EFFECT[record.effect] !== mode) {
|
|
1941
|
-
throw new (0,
|
|
1941
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(crossModeRefusal(operation, record.effect, mode), { operation });
|
|
1942
1942
|
}
|
|
1943
1943
|
if (opts.dryRun !== void 0 && typeof opts.dryRun !== "boolean") {
|
|
1944
|
-
throw new (0,
|
|
1944
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1945
1945
|
`invoke: dryRun must be a boolean (got ${typeof opts.dryRun}) \u2014 "${operation}" was not issued`,
|
|
1946
1946
|
{ operation, suggestedAction: "Pass dryRun: true (simulate) or dryRun: false (apply) as a real boolean." }
|
|
1947
1947
|
);
|
|
1948
1948
|
}
|
|
1949
1949
|
if (opts.fresh !== void 0) {
|
|
1950
1950
|
if (typeof opts.fresh !== "boolean") {
|
|
1951
|
-
throw new (0,
|
|
1951
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1952
1952
|
`invoke: fresh must be a boolean (got ${typeof opts.fresh}) \u2014 "${operation}" was not issued`,
|
|
1953
1953
|
{ operation, suggestedAction: "Pass fresh: true (bypass the read cache) or omit it." }
|
|
1954
1954
|
);
|
|
1955
1955
|
}
|
|
1956
1956
|
if (record.effect !== "read" || record.kind !== "primitive" || record.operation !== "get" || !("opts" in (_nullishCoalesce(record.inputSchema, () => ( {}))))) {
|
|
1957
|
-
throw new (0,
|
|
1957
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1958
1958
|
`invoke: fresh applies only to a single-record "<resource>.get" read \u2014 "${operation}" was not issued`,
|
|
1959
1959
|
{ operation, suggestedAction: "Drop the fresh option (only <resource>.get consults the read cache per call)." }
|
|
1960
1960
|
);
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
1963
1963
|
if (record.effect === "read" && opts.dryRun === true) {
|
|
1964
|
-
throw new (0,
|
|
1964
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
1965
1965
|
`invoke: "${operation}" is a read \u2014 dryRun is not applicable (reads issue their request as-is)`,
|
|
1966
1966
|
{ operation }
|
|
1967
1967
|
);
|
|
@@ -1978,7 +1978,7 @@ function operationsHolder(client) {
|
|
|
1978
1978
|
return {
|
|
1979
1979
|
resolveAny: (identifier, opts) => resolveAny(client, identifier, opts),
|
|
1980
1980
|
searchAcrossResources: (query, opts) => searchAcrossResources(client, query, opts),
|
|
1981
|
-
fetchMany: (items, opts) =>
|
|
1981
|
+
fetchMany: (items, opts) => _chunkTBFXRNNEcjs.fetchMany.call(void 0, client, items, opts),
|
|
1982
1982
|
// Issue #62: the generic aggregate + the cheap count — the
|
|
1983
1983
|
// groupBy/sum-absent mode is ONE vendor /query/count (the S12-C blind
|
|
1984
1984
|
// sentinel rides through); the group/sum modes walk the named
|
|
@@ -1990,12 +1990,12 @@ function operationsHolder(client) {
|
|
|
1990
1990
|
// Issue #59 PR-B: the bulk fetch by ids — query-first chunked `id in`
|
|
1991
1991
|
// reads + the per-id `get` fallback (blind-surface-safe; per-item
|
|
1992
1992
|
// typed outcomes reuse the fetchMany shapes).
|
|
1993
|
-
fetchByIds: (items, opts) =>
|
|
1993
|
+
fetchByIds: (items, opts) => _chunkTBFXRNNEcjs.fetchByIds.call(void 0, client, items, opts),
|
|
1994
1994
|
// Issue #65: opt-in resource name expansion — per-id resources.get
|
|
1995
1995
|
// reads ONLY (never an id-in query — the resources table can be blind
|
|
1996
1996
|
// to count/query while per-id reads work); blind-marked rows for ids
|
|
1997
1997
|
// the API user cannot resolve; the name cache (default-on).
|
|
1998
|
-
expandResourceNames: (ids, opts) =>
|
|
1998
|
+
expandResourceNames: (ids, opts) => _chunkTBFXRNNEcjs.expandResourceNames.call(void 0, client, ids, opts),
|
|
1999
1999
|
relationshipMap: (resourceKey) => relationshipMap(client, resourceKey),
|
|
2000
2000
|
// Issue #11: the served blind-surface inventory (zero wire) + the
|
|
2001
2001
|
// bounded caller-opted reachability sweep (read-only, confirmProbe-
|
|
@@ -2005,12 +2005,12 @@ function operationsHolder(client) {
|
|
|
2005
2005
|
// Issue #12: the served zone-fact create-guidance catalog (zero wire).
|
|
2006
2006
|
createGuidance: (opts) => createGuidance(client, opts),
|
|
2007
2007
|
// Issue #202: ExecuteCommand deep links — pure, zero wire.
|
|
2008
|
-
uiLink: (input) =>
|
|
2008
|
+
uiLink: (input) => _chunkTBFXRNNEcjs.uiLink.call(void 0, client, input),
|
|
2009
2009
|
// Issue #31: the opt-in live field-metadata channel — N bounded
|
|
2010
2010
|
// entityInformation GETs (the op's own cap refuses over-cap fan-outs
|
|
2011
2011
|
// pre-request; per-resource failures are recorded on the row and
|
|
2012
2012
|
// never abort the call).
|
|
2013
|
-
fieldCatalog: (opts) =>
|
|
2013
|
+
fieldCatalog: (opts) => _chunkTBFXRNNEcjs.fieldCatalog.call(void 0, client, opts),
|
|
2014
2014
|
// Issue #9: the one-call recovery/cleanup op — effect write in the
|
|
2015
2015
|
// registry (the governor's dry-run-first applies to it); the op's own
|
|
2016
2016
|
// confirm gate makes the destructive action deliberate (the governor
|
|
@@ -2020,15 +2020,15 @@ function operationsHolder(client) {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
function resolveHolder(client, record, operation) {
|
|
2022
2022
|
const clientBag = client;
|
|
2023
|
-
let holder = clientBag[
|
|
2023
|
+
let holder = clientBag[_chunkTBFXRNNEcjs.camelKey.call(void 0, record.resource)];
|
|
2024
2024
|
if (typeof holder === "function") {
|
|
2025
|
-
holder = _nullishCoalesce(clientBag[`${
|
|
2025
|
+
holder = _nullishCoalesce(clientBag[`${_chunkTBFXRNNEcjs.camelKey.call(void 0, record.resource)}Resource`], () => ( holder));
|
|
2026
2026
|
}
|
|
2027
2027
|
if (holder === void 0 && record.resource === "operations") {
|
|
2028
2028
|
holder = operationsHolder(client);
|
|
2029
2029
|
}
|
|
2030
2030
|
if (holder === void 0) {
|
|
2031
|
-
throw new (0,
|
|
2031
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
2032
2032
|
`invoke: the client exposes no accessor for resource "${record.resource}"`,
|
|
2033
2033
|
{ operation }
|
|
2034
2034
|
);
|
|
@@ -2088,11 +2088,11 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
|
|
|
2088
2088
|
const boundedQuery = record.kind === "primitive" && record.operation === "query";
|
|
2089
2089
|
const countedQuery = record.kind === "primitive" && record.operation === "count";
|
|
2090
2090
|
const holder = resolveHolder(client, record, operation);
|
|
2091
|
-
if (boundedQuery || countedQuery) await
|
|
2091
|
+
if (boundedQuery || countedQuery) await _chunkTBFXRNNEcjs.validateQueryFieldNames.call(void 0, record, holder, args);
|
|
2092
2092
|
const methodName = boundedQuery ? "queryBounded" : record.operation;
|
|
2093
2093
|
const method = holder[methodName];
|
|
2094
2094
|
if (typeof method !== "function") {
|
|
2095
|
-
throw new (0,
|
|
2095
|
+
throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
|
|
2096
2096
|
`invoke: "${record.resource}.${methodName}" is not a callable method on the client`,
|
|
2097
2097
|
{ operation }
|
|
2098
2098
|
);
|
|
@@ -2171,4 +2171,4 @@ async function invokeDelete(client, operation, args = [], opts = {}) {
|
|
|
2171
2171
|
|
|
2172
2172
|
|
|
2173
2173
|
|
|
2174
|
-
exports.AGGREGATE_DATE_BUCKETS = AGGREGATE_DATE_BUCKETS; exports.AGGREGATE_DEFAULT_LIMIT = AGGREGATE_DEFAULT_LIMIT; exports.AGGREGATE_DEFAULT_TOP = AGGREGATE_DEFAULT_TOP; exports.AGGREGATE_TOP_MAX = AGGREGATE_TOP_MAX; exports.BLIND_SURFACE_KINDS = BLIND_SURFACE_KINDS; exports.CREATE_BLOCKER_KINDS = CREATE_BLOCKER_KINDS; exports.ENTITY_TYPE_TO_RESOURCE =
|
|
2174
|
+
exports.AGGREGATE_DATE_BUCKETS = AGGREGATE_DATE_BUCKETS; exports.AGGREGATE_DEFAULT_LIMIT = AGGREGATE_DEFAULT_LIMIT; exports.AGGREGATE_DEFAULT_TOP = AGGREGATE_DEFAULT_TOP; exports.AGGREGATE_TOP_MAX = AGGREGATE_TOP_MAX; exports.BLIND_SURFACE_KINDS = BLIND_SURFACE_KINDS; exports.CREATE_BLOCKER_KINDS = CREATE_BLOCKER_KINDS; exports.ENTITY_TYPE_TO_RESOURCE = _chunkTBFXRNNEcjs.ENTITY_TYPE_TO_RESOURCE; exports.EXPAND_RESOURCE_NAMES_MAX_IDS = _chunkTBFXRNNEcjs.EXPAND_RESOURCE_NAMES_MAX_IDS; exports.FETCH_BY_IDS_CHUNK_SIZE = _chunkTBFXRNNEcjs.FETCH_BY_IDS_CHUNK_SIZE; exports.FETCH_BY_IDS_MAX_ITEMS = _chunkTBFXRNNEcjs.FETCH_BY_IDS_MAX_ITEMS; exports.FETCH_MANY_MAX_ITEMS = _chunkTBFXRNNEcjs.FETCH_MANY_MAX_ITEMS; exports.FIELD_CACHE_KINDS = _chunkTBFXRNNEcjs.FIELD_CACHE_KINDS; exports.FIELD_CATALOG_HONESTY_NOTE = _chunkTBFXRNNEcjs.FIELD_CATALOG_HONESTY_NOTE; exports.INVOKE_OPTION_KEYS = INVOKE_OPTION_KEYS; exports.MAX_FIELD_CATALOG_WIRE = _chunkTBFXRNNEcjs.MAX_FIELD_CATALOG_WIRE; exports.PARAMS_BAG_KEYS = PARAMS_BAG_KEYS; exports.PICKLIST_VALUE_NOT_SERVED_NOTE = _chunkTBFXRNNEcjs.PICKLIST_VALUE_NOT_SERVED_NOTE; exports.RECOVERY_CONFIRM = RECOVERY_CONFIRM; exports.RECOVERY_DEFAULT_LIMIT = RECOVERY_DEFAULT_LIMIT; exports.RECOVERY_MAX_LIMIT = RECOVERY_MAX_LIMIT; exports.UI_LINK_ENTITIES = _chunkTBFXRNNEcjs.UI_LINK_ENTITIES; exports.WORKFLOW_RESOURCES = _chunkTBFXRNNEcjs.WORKFLOW_RESOURCES; exports.aggregate = aggregate; exports.blindSurfaces = blindSurfaces; exports.buildUiLink = _chunkTBFXRNNEcjs.buildUiLink; exports.createGuidance = createGuidance; exports.dateBucketLabel = dateBucketLabel; exports.effectiveRequiredFields = _chunkTBFXRNNEcjs.effectiveRequiredFields; exports.expandResourceNames = _chunkTBFXRNNEcjs.expandResourceNames; exports.fetchByIds = _chunkTBFXRNNEcjs.fetchByIds; exports.fetchMany = _chunkTBFXRNNEcjs.fetchMany; exports.fieldCatalog = _chunkTBFXRNNEcjs.fieldCatalog; exports.foldFlattenedOpts = foldFlattenedOpts; exports.invoke = invoke; exports.invokeDelete = invokeDelete; exports.invokeRead = invokeRead; exports.invokeWrite = invokeWrite; exports.isEnumerableResource = _chunkTBFXRNNEcjs.isEnumerableResource; exports.needsConfirmation = needsConfirmation; exports.probeReachability = probeReachability; exports.recovery = recovery; exports.relationshipMap = relationshipMap; exports.resolveAny = resolveAny; exports.resourceForEntityType = _chunkTBFXRNNEcjs.resourceForEntityType; exports.revenueRollup = revenueRollup; exports.searchAcrossResources = searchAcrossResources; exports.uiLink = _chunkTBFXRNNEcjs.uiLink; exports.unknownKeysRefusal = unknownKeysRefusal; exports.validateDispatchArgs = validateDispatchArgs; exports.validateFetchManyItems = _chunkTBFXRNNEcjs.validateFetchManyItems; exports.validateInvokeOptions = validateInvokeOptions; exports.validateParamsBag = validateParamsBag;
|