node-autotask 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/MCP_TOOL_CATALOG.json +153 -1269
- package/MCP_TOOL_MANIFEST.md +28 -95
- package/MCP_TOOL_OVERRIDES.json +8 -62
- package/N8N_MCP_MANIFEST.json +118 -695
- package/N8N_MCP_MANIFEST.md +32 -52
- package/README.md +5 -10
- package/capabilities.json +23788 -31075
- package/dist/{base-CftidiyZ.d.cts → base-BVoYDlVA.d.cts} +2 -2
- package/dist/{base-CftidiyZ.d.ts → base-BVoYDlVA.d.ts} +2 -2
- package/dist/capabilities.cjs +2 -2
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-N6IWPGHB.js → chunk-ASMCTZO2.js} +23787 -31074
- package/dist/{chunk-6WLGHKIU.cjs → chunk-DC3PY4EF.cjs} +1839 -1407
- package/dist/{chunk-BKTOMNT2.js → chunk-DXKXQHCX.js} +5 -5
- package/dist/{chunk-KWQSGWY5.cjs → chunk-JO6WI763.cjs} +143 -143
- package/dist/{chunk-LYI5FRPX.js → chunk-NSW7JPVS.js} +11544 -13365
- package/dist/{chunk-7MCKJTSA.js → chunk-O4PIPUS4.js} +1583 -1151
- package/dist/{chunk-PH3ESYAF.cjs → chunk-VXVYFJH3.cjs} +23787 -31074
- package/dist/{chunk-EMYDC5SG.cjs → chunk-YMBVKVK4.cjs} +6123 -7944
- package/dist/{index-YbEk0awP.d.cts → index-C5g1H_hF.d.ts} +1194 -1415
- package/dist/{index-D8FtzUGP.d.ts → index-Db0SNnQn.d.cts} +1194 -1415
- package/dist/{index-DgBA1JMH.d.cts → index-c549LvOb.d.cts} +188 -188
- package/dist/{index-DgBA1JMH.d.ts → index-c549LvOb.d.ts} +188 -188
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +15 -42
- package/dist/index.d.ts +15 -42
- package/dist/index.js +7 -7
- package/dist/operations/index.cjs +5 -2327
- package/dist/operations/index.d.cts +7 -287
- package/dist/operations/index.d.ts +7 -287
- package/dist/operations/index.js +29 -2351
- package/dist/pool.cjs +8 -8
- package/dist/pool.d.cts +1 -1
- package/dist/pool.d.ts +1 -1
- package/dist/pool.js +4 -4
- package/dist/resources/index.cjs +4 -4
- package/dist/resources/index.d.cts +2 -2
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +7 -7
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/docs/API.md +201 -303
- package/docs/LIVE-TESTING.md +4 -6
- package/docs/N8N-ADAPTER.md +26 -26
- package/n8n-mcp.curation.json +3 -3
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { R as RowNamesSummary, B as BlindSurfaceInfo, b as RelationshipResource, C as CreateGuidanceValueRequirement, c as CreateGuidanceRow, d as CreateBlockerKind, e as CreateGuidanceReport, F as FieldCacheKind } from '../index-C5g1H_hF.js';
|
|
2
2
|
import { AutotaskClient, ZoneName } from '../index.js';
|
|
3
|
-
export {
|
|
4
|
-
import { Identifier, EmptyReasonInfo, PickListValue
|
|
5
|
-
export {
|
|
3
|
+
export { f as FIELD_CACHE_KINDS } from '../index-C5g1H_hF.js';
|
|
4
|
+
import { Identifier, EmptyReasonInfo, PickListValue } from '../index.js';
|
|
5
|
+
export { a as PICKLIST_VALUE_NOT_SERVED_NOTE } from '../index-c549LvOb.js';
|
|
6
6
|
import { CapabilityRecord } from '../capabilities.js';
|
|
7
7
|
import { AutotaskConfigError } from '../index.js';
|
|
8
8
|
|
|
@@ -196,66 +196,6 @@ interface ResolveStaffResult {
|
|
|
196
196
|
/** Active email/userName/name lookup; numeric ids fetch directly regardless of active/licence status. */
|
|
197
197
|
declare function resolveStaff(client: AutotaskClient, identifier: Identifier, opts?: ResolveStaffOptions): Promise<ResolveStaffResult>;
|
|
198
198
|
|
|
199
|
-
/** The pinned per-call item cap (over → CONFIG_ERROR pre-request, zero wire). */
|
|
200
|
-
declare const FETCH_MANY_MAX_ITEMS = 20;
|
|
201
|
-
interface FetchManyOptions {
|
|
202
|
-
/** May LOWER the {@link FETCH_MANY_MAX_ITEMS} cap (integer >= 1) — never raise it. */
|
|
203
|
-
maxItems?: number;
|
|
204
|
-
/**
|
|
205
|
-
* Opt-in live field validation (issue #66): when `true`, each item's
|
|
206
|
-
* requested `fields` are validated against the tenant's LIVE entity field
|
|
207
|
-
* metadata (the cached metadata channel — a warm fieldCache costs zero
|
|
208
|
-
* wire; a cold run is one `entityInformation/fields` GET per distinct
|
|
209
|
-
* resource in the batch) instead of the vendored-spec field set alone.
|
|
210
|
-
* When a resource's metadata is unavailable the validation falls back to
|
|
211
|
-
* the vendored-spec field set for THAT resource (unavailability never
|
|
212
|
-
* throws and never blocks the batch); when available the live set is
|
|
213
|
-
* authoritative — a field it lacks is refused even if the spec lists it,
|
|
214
|
-
* and a live field the spec lacks (e.g. `time_entries` `postedDate`) is
|
|
215
|
-
* accepted. Default `false` = today's vendored-spec-only validation,
|
|
216
|
-
* bit-for-bit (zero metadata wire).
|
|
217
|
-
*/
|
|
218
|
-
liveFields?: boolean;
|
|
219
|
-
/** Issue #276: label siblings on the found records (`statusLabel`, `contractIDName`, …). Default true; false = raw records. */
|
|
220
|
-
names?: boolean;
|
|
221
|
-
}
|
|
222
|
-
interface ValidateFetchManyValidation {
|
|
223
|
-
/**
|
|
224
|
-
* The resolved authoritative per-resource field sets (the `liveFields`
|
|
225
|
-
* mode, issue #66): the live entity field set when available, `null` when
|
|
226
|
-
* that resource's metadata read rejected (the vendored-spec fallback was
|
|
227
|
-
* applied at resolution). Absent / no entry = the vendored-spec set.
|
|
228
|
-
*/
|
|
229
|
-
fieldSetsByResource?: ReadonlyMap<string, readonly string[] | null>;
|
|
230
|
-
/** Run the field-NAME membership check (the live mode's shape-only pass passes `false`). */
|
|
231
|
-
fieldCheck?: boolean;
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* The pre-request validation (zero wire): one `CONFIG_ERROR` carries the
|
|
235
|
-
* COMPLETE problem list for ALL items (shape, limits, unknown resource,
|
|
236
|
-
* string id, unknown field key) — the caller fixes everything in one round.
|
|
237
|
-
*
|
|
238
|
-
* `validation` (the `liveFields` mode, issue #66): the resolved
|
|
239
|
-
* authoritative per-resource field sets to validate `fields` against; absent
|
|
240
|
-
* = the vendored-spec sets, bit-for-bit the default.
|
|
241
|
-
*/
|
|
242
|
-
declare function validateFetchManyItems(items: unknown, cap: number, opName?: string, capRef?: string, validation?: ValidateFetchManyValidation): void;
|
|
243
|
-
/**
|
|
244
|
-
* Fetch up to 20 single records across mixed resources in ONE call
|
|
245
|
-
* (sequential GETs; per-item typed partial failure; the op throws only
|
|
246
|
-
* pre-request).
|
|
247
|
-
*
|
|
248
|
-
* ```ts
|
|
249
|
-
* import { fetchMany } from 'node-autotask/operations';
|
|
250
|
-
* const { results, ok, failed } = await fetchMany(client, [
|
|
251
|
-
* { resource: 'tickets', id: 527119 },
|
|
252
|
-
* { resource: 'tickets', id: 527118, fields: ['id', 'title', 'status'] },
|
|
253
|
-
* { resource: 'projects', id: 693 },
|
|
254
|
-
* ]);
|
|
255
|
-
* ```
|
|
256
|
-
*/
|
|
257
|
-
declare function fetchMany(client: AutotaskClient, items: readonly FetchManyItem[], opts?: FetchManyOptions): Promise<FetchManyResult>;
|
|
258
|
-
|
|
259
199
|
/** The group-row cap (top may lower it, never raise it). */
|
|
260
200
|
declare const AGGREGATE_TOP_MAX = 100;
|
|
261
201
|
/** The default group-row count. */
|
|
@@ -354,7 +294,7 @@ interface AggregateResult {
|
|
|
354
294
|
*/
|
|
355
295
|
declare function aggregate(client: AutotaskClient, operation: string, filter: unknown, opts?: AggregateOptions): Promise<AggregateResult>;
|
|
356
296
|
|
|
357
|
-
type RevenueRollupDimension = 'vertical' | 'contractType' | '
|
|
297
|
+
type RevenueRollupDimension = 'vertical' | 'contractType' | 'company' | 'month' | 'contract' | 'lineOfBusiness';
|
|
358
298
|
/** The closed opts bag. Exactly one scope key is required. */
|
|
359
299
|
interface RevenueRollupOptions {
|
|
360
300
|
companyIDs?: number[];
|
|
@@ -468,10 +408,6 @@ interface RevenueRollupResult {
|
|
|
468
408
|
unresolvedCompanies: RevenueRollupAmount;
|
|
469
409
|
/** Only when lineOfBusiness is grouped: a line association (or its level1/level2) the id-in fetch did not return. */
|
|
470
410
|
unresolvedAssociations?: RevenueRollupAmount;
|
|
471
|
-
/** Only when resource is grouped: a labour line's time entry (or its resource) the id-in fetch did not return. */
|
|
472
|
-
unresolvedTimeEntries?: RevenueRollupAmount;
|
|
473
|
-
/** Only when billingCode is grouped: a line billing code the id-in fetch did not return. */
|
|
474
|
-
unresolvedBillingCodes?: RevenueRollupAmount;
|
|
475
411
|
/** Only with includeNonChargeable: invoiced and uninvoiced non-chargeable lines whose row could not be resolved (a contract, company or join miss; amount = Σ value). */
|
|
476
412
|
unresolvedNonChargeable?: RevenueRollupAmount;
|
|
477
413
|
};
|
|
@@ -540,105 +476,6 @@ declare function fetchByIds(client: AutotaskClient, items: readonly FetchManyIte
|
|
|
540
476
|
*/
|
|
541
477
|
declare function relationshipMap(client: AutotaskClient, resourceKey: string): Promise<RelationshipResource>;
|
|
542
478
|
|
|
543
|
-
/** The closed blind-class set (the gate clause 14 validates against this). */
|
|
544
|
-
type BlindSurfaceKind = 'unowned-blind' | 'fully-blind' | 'unfiltered-blind' | 'unknown';
|
|
545
|
-
/** The valid blind classes (served in the typed refusals — deterministic text). */
|
|
546
|
-
declare const BLIND_SURFACE_KINDS: readonly BlindSurfaceKind[];
|
|
547
|
-
/** The optional filter bag for `operations.blindSurfaces`. */
|
|
548
|
-
interface BlindSurfaceOptions {
|
|
549
|
-
/** The plan resource key (e.g. `tickets`) — narrows the row set to that resource. Unknown keys throw the typed `RESOURCE_UNKNOWN`. */
|
|
550
|
-
resource?: string;
|
|
551
|
-
/** The blind class — narrows the row set to one class. Unknown kinds throw the typed `CONFIG_ERROR`. */
|
|
552
|
-
kind?: BlindSurfaceKind;
|
|
553
|
-
}
|
|
554
|
-
/**
|
|
555
|
-
* Serve the plan-pinned blind-surface inventory (ZERO wire).
|
|
556
|
-
*
|
|
557
|
-
* ```ts
|
|
558
|
-
* import { blindSurfaces } from 'node-autotask/operations';
|
|
559
|
-
* const inv = await blindSurfaces(client); // all 116 surfaces
|
|
560
|
-
* const t = await blindSurfaces(client, { resource: 'tickets' }); // one resource
|
|
561
|
-
* const b = await blindSurfaces(client, { kind: 'unfiltered-blind' }); // one class
|
|
562
|
-
* // inv.counts — { total: 116, dataFull: 46, blind: 69, pinned: 6 } (always artifact-wide)
|
|
563
|
-
* // inv.dataFull — the resources whose unfiltered reads are safe
|
|
564
|
-
* // inv.remedies — the generic + per-resource (pinned trio) remedy text
|
|
565
|
-
* ```
|
|
566
|
-
*
|
|
567
|
-
* The counts describe the WHOLE pinned artifact regardless of the filter —
|
|
568
|
-
* only `surfaces` narrows (the counts are the drift-pinned discovery fact).
|
|
569
|
-
*
|
|
570
|
-
* @param client The wired client (unused — zero wire by construction).
|
|
571
|
-
* @param opts The optional filter ({ resource?, kind? }).
|
|
572
|
-
*/
|
|
573
|
-
declare function blindSurfaces(client: AutotaskClient, opts?: BlindSurfaceOptions): Promise<BlindSurfaceInventory>;
|
|
574
|
-
|
|
575
|
-
/** The optional sweep bag for `operations.probeReachability`. */
|
|
576
|
-
interface ProbeReachabilityOptions {
|
|
577
|
-
/** The plan resource keys to probe. Omitted → the 70 non-data-full pinned surfaces (the 69 blind + ticket_history); that set exceeds the default cap, so probing it requires an explicit `maxWireCalls` (≤ 80). */
|
|
578
|
-
resources?: string[];
|
|
579
|
-
/** Rows per surface (1-2; default 2). Out of range → CONFIG_ERROR. */
|
|
580
|
-
limit?: number;
|
|
581
|
-
/** The hard cap for this call (default 40) — it bounds the number of probed surfaces (one bounded read each); transport retries on a probe are not counted against it. Refused above 80; a requested set larger than the cap is refused pre-request (refused, never truncated). */
|
|
582
|
-
maxWireCalls?: number;
|
|
583
|
-
/** REQUIRED. Without it the op refuses with CONFIG_ERROR before any request (the deliberate act is the caller's). */
|
|
584
|
-
confirmProbe?: true;
|
|
585
|
-
}
|
|
586
|
-
/**
|
|
587
|
-
* One probe outcome (the pinned row + the live probe result). The pinned
|
|
588
|
-
* fields reuse the GENERATED `BlindSurfaceRow` (the plan's ops/kind/proof
|
|
589
|
-
* unions — a plan change re-derives them here; no hand-duplicated unions
|
|
590
|
-
* that could drift, post-verification F4).
|
|
591
|
-
*/
|
|
592
|
-
type ProbeSurfaceRow = Omit<BlindSurfaceRow, 'unfilteredRows'> & {
|
|
593
|
-
/** The LIVE observed unfiltered row count (null when the probe failed). */
|
|
594
|
-
unfilteredRows: number | null;
|
|
595
|
-
/** The probe outcome for this surface. */
|
|
596
|
-
probe: {
|
|
597
|
-
ok: boolean;
|
|
598
|
-
/** The bounded reads this probe issued (0 = refused pre-probe, 1 = one bounded read). */
|
|
599
|
-
wire: number;
|
|
600
|
-
/** The recorded failure (never thrown; the sweep keeps going). */
|
|
601
|
-
error: {
|
|
602
|
-
code: string;
|
|
603
|
-
message: string;
|
|
604
|
-
} | null;
|
|
605
|
-
};
|
|
606
|
-
};
|
|
607
|
-
/** The sweep result. */
|
|
608
|
-
interface ProbeReachabilityResult {
|
|
609
|
-
results: ProbeSurfaceRow[];
|
|
610
|
-
/**
|
|
611
|
-
* The bounded probe reads actually issued — one per probed surface, so it
|
|
612
|
-
* can never exceed `cap` (the cap bounds the SURFACE SET; transport
|
|
613
|
-
* retries inside a probe are additional wire and are not counted — the
|
|
614
|
-
* raw wire total can therefore exceed `cap` slightly).
|
|
615
|
-
*/
|
|
616
|
-
wireUsed: number;
|
|
617
|
-
/** The wire cap the call ran under. */
|
|
618
|
-
cap: number;
|
|
619
|
-
/** Always false: over-cap requests REFUSE (CONFIG_ERROR) — they are never silently truncated. */
|
|
620
|
-
truncated: boolean;
|
|
621
|
-
}
|
|
622
|
-
/**
|
|
623
|
-
* Run the bounded reachability sweep (caller-opted, read-only).
|
|
624
|
-
*
|
|
625
|
-
* ```ts
|
|
626
|
-
* import { probeReachability } from 'node-autotask/operations';
|
|
627
|
-
* const res = await probeReachability(client, {
|
|
628
|
-
* resources: ['contacts', 'resources', 'companies'],
|
|
629
|
-
* limit: 2, // 1-2, default 2
|
|
630
|
-
* maxWireCalls: 40, // default 40, refused above 80
|
|
631
|
-
* confirmProbe: true, // REQUIRED
|
|
632
|
-
* });
|
|
633
|
-
* // res.wireUsed — the probes issued (≤ cap); res.results — one row per
|
|
634
|
-
* // requested surface (probe.ok false + probe.error where one failed)
|
|
635
|
-
* ```
|
|
636
|
-
*
|
|
637
|
-
* @param client The wired client (the probes issue bounded queryBounded reads).
|
|
638
|
-
* @param opts The sweep bag ({ resources?, limit?, maxWireCalls?, confirmProbe? }).
|
|
639
|
-
*/
|
|
640
|
-
declare function probeReachability(client: AutotaskClient, opts?: ProbeReachabilityOptions): Promise<ProbeReachabilityResult>;
|
|
641
|
-
|
|
642
479
|
/**
|
|
643
480
|
* `effectiveRequiredFields` — the ONE precedence rule for "what does a create
|
|
644
481
|
* really require" (issue #219 N4).
|
|
@@ -1103,123 +940,6 @@ interface ExpandResourceNamesResult {
|
|
|
1103
940
|
*/
|
|
1104
941
|
declare function expandResourceNames(client: AutotaskClient, ids: readonly Identifier[], opts?: ExpandResourceNamesOptions): Promise<ExpandResourceNamesResult>;
|
|
1105
942
|
|
|
1106
|
-
/** The exact confirmation string the destructive apply requires (R4 style: the op key). */
|
|
1107
|
-
declare const RECOVERY_CONFIRM = "operations.recovery";
|
|
1108
|
-
/** The default TOTAL match cap of the marker search. */
|
|
1109
|
-
declare const RECOVERY_DEFAULT_LIMIT = 25;
|
|
1110
|
-
/** The hard TOTAL match cap (a CONFIG_ERROR above it — pre-request, zero wire). */
|
|
1111
|
-
declare const RECOVERY_MAX_LIMIT = 100;
|
|
1112
|
-
/** The one-call recovery/cleanup input (all validation is pre-request, zero wire). */
|
|
1113
|
-
interface RecoveryInput {
|
|
1114
|
-
/** The plan resource key (e.g. 'companies'). Unknown → typed RESOURCE_UNKNOWN. */
|
|
1115
|
-
resource: string;
|
|
1116
|
-
/** The marker the write stamped into a name-like field (searched with `contains`). */
|
|
1117
|
-
marker: string;
|
|
1118
|
-
/**
|
|
1119
|
-
* The name-like vendor field to filter on (API casing). Default: the
|
|
1120
|
-
* plan's markerField for the resource; REQUIRED when the resource has no
|
|
1121
|
-
* markerField (a CONFIG_ERROR names the model's fields as the candidates).
|
|
1122
|
-
*/
|
|
1123
|
-
field?: string;
|
|
1124
|
-
/** Parent scope (parent-scoped child resources only — narrows the search on the parent FK). */
|
|
1125
|
-
parentId?: number;
|
|
1126
|
-
/** Extra leaf filter conditions narrowing the search (e.g. `{ field: 'status', op: 'eq', value: 'open' }`). */
|
|
1127
|
-
filter?: FilterCondition[];
|
|
1128
|
-
/** The TOTAL match cap (default 25, max 100). */
|
|
1129
|
-
limit?: number;
|
|
1130
|
-
/** 'find' (default — a read) | 'delete' (destructive — dry-run-first, confirm-gated apply). */
|
|
1131
|
-
action?: 'find' | 'delete';
|
|
1132
|
-
/**
|
|
1133
|
-
* The apply confirmation for `action: 'delete'` (the exact op key —
|
|
1134
|
-
* `operations.recovery`). Accepted on the INPUT as well as in
|
|
1135
|
-
* {@link RecoveryOptions.confirm} so the MCP tool path can apply a delete:
|
|
1136
|
-
* the tool bag has no confirm slot, so the input object rides it (the SDK
|
|
1137
|
-
* options path stays the canonical form; the two are equivalent).
|
|
1138
|
-
*/
|
|
1139
|
-
confirm?: string;
|
|
1140
|
-
}
|
|
1141
|
-
/** One matched record (the id is null when unrepresentable — see unsafeId). */
|
|
1142
|
-
interface RecoveryMatch {
|
|
1143
|
-
/** The record's id (null when beyond Number.MAX_SAFE_INTEGER — never a silent skip). */
|
|
1144
|
-
id: number | null;
|
|
1145
|
-
/** The marker field's value in the matched record. */
|
|
1146
|
-
value: string | number | boolean | null;
|
|
1147
|
-
}
|
|
1148
|
-
/** The delete-boundary fact carried in every recovery result. */
|
|
1149
|
-
interface RecoveryDeleteBoundary {
|
|
1150
|
-
/** False when the vendor defines no DELETE for the resource (cleanup is UI-only). */
|
|
1151
|
-
available: boolean;
|
|
1152
|
-
/** The spec-derived boundary note (available=false) — null when the boundary is available. */
|
|
1153
|
-
reason: string | null;
|
|
1154
|
-
/** The authority op that answers for the record (null — the boundary is spec-derived). */
|
|
1155
|
-
authority: string | null;
|
|
1156
|
-
}
|
|
1157
|
-
/** The one-call recovery/cleanup result (issue #9). */
|
|
1158
|
-
interface RecoveryResult {
|
|
1159
|
-
/** The resource key the op ran against. */
|
|
1160
|
-
resource: string;
|
|
1161
|
-
/** The marker searched. */
|
|
1162
|
-
marker: string;
|
|
1163
|
-
/** The field the marker was searched on. */
|
|
1164
|
-
field: string;
|
|
1165
|
-
/** The action that ran ('find' | 'delete'). */
|
|
1166
|
-
action: 'find' | 'delete';
|
|
1167
|
-
/** The matched records (empty = the marker matched nothing in the bounded scan). */
|
|
1168
|
-
matches: RecoveryMatch[];
|
|
1169
|
-
/** Records returned by the single bounded query. */
|
|
1170
|
-
scanned: number;
|
|
1171
|
-
/**
|
|
1172
|
-
* Always false in a returned result: a cap-tripped search REFUSES with
|
|
1173
|
-
* RECOVERY_TRUNCATED before any result exists (never a silent truncation).
|
|
1174
|
-
*/
|
|
1175
|
-
truncated: boolean;
|
|
1176
|
-
/** The spec-derived delete boundary (zero wire — the plan audit). */
|
|
1177
|
-
delete: RecoveryDeleteBoundary;
|
|
1178
|
-
/** True when ANY match's id is unrepresentable (beyond Number.MAX_SAFE_INTEGER — P1). */
|
|
1179
|
-
unsafeId: boolean;
|
|
1180
|
-
/** The manual cleanup note (delete-less resources) — null when the boundary is available. */
|
|
1181
|
-
cleanup: {
|
|
1182
|
-
manual: boolean;
|
|
1183
|
-
note: string;
|
|
1184
|
-
} | null;
|
|
1185
|
-
/** Delete apply only: the per-id outcome (code = the typed code of a failed per-id DELETE). */
|
|
1186
|
-
deleted?: Array<{
|
|
1187
|
-
id: number;
|
|
1188
|
-
verified: boolean;
|
|
1189
|
-
code?: string;
|
|
1190
|
-
}>;
|
|
1191
|
-
/** Delete dry run only: the envelope marker (the apply path omits it). */
|
|
1192
|
-
simulated?: boolean;
|
|
1193
|
-
/** The dry-run flag the op ran under (the governor appends dry-run-first). */
|
|
1194
|
-
dryRun?: boolean;
|
|
1195
|
-
}
|
|
1196
|
-
/** The op options (the governor's trailing bag lands here). */
|
|
1197
|
-
interface RecoveryOptions {
|
|
1198
|
-
/** Simulate (default true — dry-run-first; the governor appends the governed flag). */
|
|
1199
|
-
dryRun?: boolean;
|
|
1200
|
-
/** The exact confirmation string for the delete apply (RECOVERY_CONFIRM). */
|
|
1201
|
-
confirm?: string;
|
|
1202
|
-
}
|
|
1203
|
-
/**
|
|
1204
|
-
* Run the one-call recovery/cleanup op.
|
|
1205
|
-
*
|
|
1206
|
-
* ```ts
|
|
1207
|
-
* import { recovery } from 'node-autotask/operations';
|
|
1208
|
-
* // Find the scratch record the write just created (one bounded query, zero mutating wire):
|
|
1209
|
-
* const r = await recovery(client, { resource: 'companies', marker: 'FULL100W-1791110339' });
|
|
1210
|
-
* // r.delete.available === false + r.cleanup.note — the spec says the vendor has no DELETE.
|
|
1211
|
-
*
|
|
1212
|
-
* // Where the vendor DOES allow it (delete available):
|
|
1213
|
-
* const dry = await recovery(client, { resource: 'configuration_item_dns_records', marker: 'm', parentId: 42 }, { dryRun: true });
|
|
1214
|
-
* const applied = await recovery(client, { resource: 'configuration_item_dns_records', marker: 'm', parentId: 42, action: 'delete' }, { dryRun: false, confirm: 'operations.recovery' });
|
|
1215
|
-
* ```
|
|
1216
|
-
*
|
|
1217
|
-
* @param client The wired client (the op runs against the resource's own bounded-query surface).
|
|
1218
|
-
* @param input The recovery input (see {@link RecoveryInput}).
|
|
1219
|
-
* @param opts The op options (dryRun / confirm — the governor appends the governed bag).
|
|
1220
|
-
*/
|
|
1221
|
-
declare function recovery(client: AutotaskClient, input: RecoveryInput, opts?: RecoveryOptions): Promise<RecoveryResult>;
|
|
1222
|
-
|
|
1223
943
|
/** True for an operation that needs a deliberate act before it runs (R4). */
|
|
1224
944
|
declare function needsConfirmation(record: CapabilityRecord): boolean;
|
|
1225
945
|
/**
|
|
@@ -1328,5 +1048,5 @@ declare function invokeWrite(client: AutotaskClient, operation: string, args?: r
|
|
|
1328
1048
|
*/
|
|
1329
1049
|
declare function invokeDelete(client: AutotaskClient, operation: string, args?: readonly unknown[] | Record<string, unknown>, opts?: InvokeOptions): Promise<unknown>;
|
|
1330
1050
|
|
|
1331
|
-
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX,
|
|
1332
|
-
export type { AggregateGroup, AggregateOptions, AggregateResult,
|
|
1051
|
+
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX, CREATE_BLOCKER_KINDS, EXPAND_RESOURCE_NAMES_MAX_IDS, FETCH_BY_IDS_CHUNK_SIZE, FETCH_BY_IDS_MAX_ITEMS, FIELD_CATALOG_HONESTY_NOTE, FieldCacheKind, INVOKE_OPTION_KEYS, MAX_FIELD_CATALOG_WIRE, MIN_FIELD_CATALOG_MAX_BYTES, PARAMS_BAG_KEYS, RowNamesSummary, UI_LINK_ENTITIES, WORKFLOW_RESOURCES, aggregate, buildUiLink, createGuidance, dateBucketLabel, effectiveRequiredFields, expandResourceNames, fetchByIds, fieldCatalog, foldFlattenedOpts, invoke, invokeDelete, invokeRead, invokeWrite, needsConfirmation, relationshipMap, resolveAny, resolveStaff, revenueRollup, sanitiseResult, searchAcrossResources, uiLink, unknownKeysRefusal, validateDispatchArgs, validateInvokeOptions, validateParamsBag };
|
|
1052
|
+
export type { AggregateGroup, AggregateOptions, AggregateResult, CreateGuidanceOptions, DateBucket, DerivationRule, EffectiveRequiredFields, ExpandResourceNameRow, ExpandResourceNamesOptions, ExpandResourceNamesResult, FetchByIdsOptions, FetchManyItem, FetchManyItemError, FetchManyItemResult, FetchManyResult, FieldCatalogCompactFieldRow, FieldCatalogFieldRow, FieldCatalogOptions, FieldCatalogResult, FieldCatalogRow, FieldCatalogRowError, FieldCatalogTrimKind, FieldCatalogTruncation, FieldDerivation, InvokeMode, InvokeOptions, RequiredFieldsRecord, RequiredFieldsSource, RequiredFieldsZoneFacts, ResolveAnyOptions, ResolveAnyResourceOutcome, ResolveAnyResult, ResolveStaffMatch, ResolveStaffOptions, ResolveStaffResult, RevenueRollupAmount, RevenueRollupDimension, RevenueRollupKey, RevenueRollupNonChargeable, RevenueRollupNonChargeableAmount, RevenueRollupOptions, RevenueRollupResult, RevenueRollupRow, SanitiseResult, SearchAcrossResourcesOptions, SearchAcrossResourcesResult, SearchAcrossResourcesRow, ServedCreateGuidanceReport, ServedCreateGuidanceRow, UiLinkEntity, UiLinkInput, UiLinkResult };
|