node-autotask 0.39.0 → 0.39.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 +10 -0
- package/MCP_TOOL_MANIFEST.md +4 -4
- package/N8N_MCP_MANIFEST.json +2 -2
- package/N8N_MCP_MANIFEST.md +3 -3
- package/capabilities.json +144 -144
- package/dist/capabilities.cjs +2 -2
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-KSNK6UEW.cjs → chunk-73QNAEAF.cjs} +143 -143
- package/dist/{chunk-OKFTECIE.js → chunk-CQXB7KAO.js} +2 -2
- package/dist/{chunk-2KQS3RHQ.js → chunk-GDSCYY2G.js} +143 -143
- package/dist/{chunk-6ROB5KXB.cjs → chunk-GIVYTQ6R.cjs} +285 -285
- package/dist/{chunk-45PLS73K.cjs → chunk-LB34VFQY.cjs} +132 -99
- package/dist/{chunk-LD5UPSDB.js → chunk-LDTJNLX7.js} +2 -2
- package/dist/{chunk-FV5PJLIZ.js → chunk-LN3HQQBR.js} +48 -15
- package/dist/{chunk-RAZEXOLC.cjs → chunk-VR6RYXTD.cjs} +143 -143
- package/dist/{index-Bmoiwhx2.d.ts → index-C-Oqef4y.d.cts} +7169 -51
- package/dist/{index-BVOOHPvr.d.cts → index-C-Oqef4y.d.ts} +7169 -51
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +4 -4
- package/dist/operations/index.cjs +179 -177
- package/dist/operations/index.d.cts +3 -221
- package/dist/operations/index.d.ts +3 -221
- package/dist/operations/index.js +4 -2
- package/dist/pool.cjs +9 -9
- package/dist/pool.d.cts +1 -2
- package/dist/pool.d.ts +1 -2
- package/dist/pool.js +4 -4
- package/dist/resources/index.cjs +4 -4
- package/dist/resources/index.d.cts +1 -2
- package/dist/resources/index.d.ts +1 -2
- package/dist/resources/index.js +3 -3
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/docs/API.md +37 -7
- package/package.json +1 -1
- package/dist/index-BQVStxwi.d.cts +0 -6893
- package/dist/index-BQVStxwi.d.ts +0 -6893
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { a as AutotaskClient,
|
|
2
|
-
export {
|
|
3
|
-
import { I as Identifier, hV as RowNamesSummary, cX as EmptyReasonInfo, e9 as PickListValue, a as FilterCondition } from '../index-BQVStxwi.cjs';
|
|
4
|
-
export { hW as PICKLIST_VALUE_NOT_SERVED_NOTE } from '../index-BQVStxwi.cjs';
|
|
1
|
+
import { I as Identifier, np as RowNamesSummary, a as AutotaskClient, nq as BlindSurfaceInfo, f6 as EmptyReasonInfo, nr as RelationshipResource, ns as BlindSurfaceInventory, nt as BlindSurfaceRow, nu as CreateGuidanceValueRequirement, nv as CreateGuidanceRow, nw as CreateBlockerKind, nx as CreateGuidanceReport, Z as ZoneName, f as FilterCondition, L as AutotaskConfigError } from '../index-C-Oqef4y.cjs';
|
|
2
|
+
export { ny as DerivationRule, nz as FIELD_CACHE_KINDS, nA as FIELD_CATALOG_HONESTY_NOTE, nB as FieldCacheKind, nC as FieldCatalogCompactFieldRow, nD as FieldCatalogFieldRow, nE as FieldCatalogOptions, nF as FieldCatalogResult, nG as FieldCatalogRow, nH as FieldCatalogRowError, nI as FieldCatalogTrimKind, nJ as FieldCatalogTruncation, nK as FieldDerivation, nL as MAX_FIELD_CATALOG_WIRE, nM as MIN_FIELD_CATALOG_MAX_BYTES, nN as PICKLIST_CATALOG_UNAVAILABLE_NOTE, nO as PICKLIST_VALUE_NOT_SERVED_NOTE, nP as fieldCatalog } from '../index-C-Oqef4y.cjs';
|
|
5
3
|
import { CapabilityRecord } from '../capabilities.cjs';
|
|
6
4
|
|
|
7
5
|
/**
|
|
@@ -783,222 +781,6 @@ declare function resourceForEntityType(entityType: string | null | undefined): s
|
|
|
783
781
|
*/
|
|
784
782
|
declare function isEnumerableResource(resource: string | null | undefined): boolean;
|
|
785
783
|
|
|
786
|
-
/** The pinned wire cap: `resources × include` above it is refused
|
|
787
|
-
* pre-request (CONFIG_ERROR naming the computed cost and the cap) —
|
|
788
|
-
* refused, never truncated. */
|
|
789
|
-
declare const MAX_FIELD_CATALOG_WIRE = 60;
|
|
790
|
-
/** The stable honesty sentence served in the result (the live catalog
|
|
791
|
-
* reports field SHAPE as FLAGS and NAMES; with the opt-in `labels: true`
|
|
792
|
-
* the projected picklist rows carry the vendor's exposed picklist
|
|
793
|
-
* VALUES; it cannot resolve a picklist VALUE the vendor does not expose
|
|
794
|
-
* to this API user — the W-A4 wall). */
|
|
795
|
-
declare const FIELD_CATALOG_HONESTY_NOTE: string;
|
|
796
|
-
/** One projected field row (the stable, small served shape — not the raw
|
|
797
|
-
* vendor blob; the raw one stays available through the resource's own
|
|
798
|
-
* `getFieldInfo` / `getUdfInfo` op). */
|
|
799
|
-
interface FieldCatalogFieldRow {
|
|
800
|
-
/** The vendor field name. */
|
|
801
|
-
name: string;
|
|
802
|
-
/** The display label (UDF catalog rows only; vendor standard fields carry none). */
|
|
803
|
-
label?: string;
|
|
804
|
-
/** The vendor field type (`dataType` on standard fields, `type` on UDFs). */
|
|
805
|
-
type: string;
|
|
806
|
-
isRequired: boolean;
|
|
807
|
-
isReadOnly: boolean;
|
|
808
|
-
/** The vendor `isQueryable` flag — ABSENT on a UDF row: the vendor reports UDFs as queryable, but a filter on a UDF name is accepted only with the `udf: true` marker, so the row states the mechanism in `filterable` instead of a boolean the vendor contradicts (issue #219 N7). */
|
|
809
|
-
isQueryable?: boolean;
|
|
810
|
-
isPickList: boolean;
|
|
811
|
-
/** Present exactly on a UDF row: the filter mechanism a consumer must send to filter on this name (`udf: true` in the filter condition) — never infer plain filterability from the vendor's `isQueryable` (issue #219 N7). */
|
|
812
|
-
filterable?: 'udf-marker';
|
|
813
|
-
/** The write shape for an object/array field: `merge` (a sent subset is merged — `userDefinedFields` is the proven case) or `replace-all` (the vendor's full-model PUT replaces the collection). Absent on scalar fields (issue #219 N7). */
|
|
814
|
-
writeShape?: 'merge' | 'replace-all';
|
|
815
|
-
/** The vendor `length` bound (null when the catalog names none). */
|
|
816
|
-
maxLength: number | null;
|
|
817
|
-
/** The referenced entity type for reference fields ('' when none). */
|
|
818
|
-
referenceEntityType: string;
|
|
819
|
-
/** The plan resource key the referenced entity names (`resourceForEntityType`), or `null` when the plan carries no such resource — the key a caller enumerates valid ids with (issue #219 N1). Never a remedy or an enumeration hint. */
|
|
820
|
-
targetResource: string | null;
|
|
821
|
-
/** True exactly when `targetResource` is a plan resource with a `query`/`get` read path (issue #219 N1) — always served, so a reference the vendor names but the plan cannot enumerate reads `false`, never `undefined`. */
|
|
822
|
-
targetEnumerable: boolean;
|
|
823
|
-
/** Present exactly when the plan declares this field DERIVED for the resource (issue #219 N8): the vendor overwrites or inherits the value, so a submitted one is not authoritative. Distinct from `isReadOnly` (never write at all) — a derived field can be absent from that list and still be recomputed. */
|
|
824
|
-
derived?: DerivationRule;
|
|
825
|
-
/** The vendor's exposed picklist VALUES, verbatim (present exactly when the `labels` opt is `true` and the vendor exposed values for this picklist field — the vendor-walled and non-picklist rows carry none). */
|
|
826
|
-
picklistValues?: PickListValue[];
|
|
827
|
-
}
|
|
828
|
-
/** One compact field row (`compact: true`, issue #282): the five columns a
|
|
829
|
-
* caller needs to pick a field name — the full row's flags, lengths and
|
|
830
|
-
* reference targets are dropped. `picklistValues` rides only when `labels`
|
|
831
|
-
* AND a `fields` filter are both given (a targeted value lookup). */
|
|
832
|
-
interface FieldCatalogCompactFieldRow {
|
|
833
|
-
name: string;
|
|
834
|
-
type: string;
|
|
835
|
-
isPickList: boolean;
|
|
836
|
-
/** True when the vendor names a referenced entity (`referenceEntityType` non-empty). */
|
|
837
|
-
isReference: boolean;
|
|
838
|
-
/** True on a `udf`-kind row, false on a standard field. */
|
|
839
|
-
udf: boolean;
|
|
840
|
-
picklistValues?: PickListValue[];
|
|
841
|
-
}
|
|
842
|
-
/** The derivation rule of one field (issue #219 N8) — a closed plan token, served without the field name it decorates. */
|
|
843
|
-
interface DerivationRule {
|
|
844
|
-
/** elapsed(<start>,<end>) (recomputed from those timestamps) | parent (inherited from the parent record) | mirror(<field>) (the vendor copies that field) | external (written by another entity's op — writableRoute names it). */
|
|
845
|
-
rule: string;
|
|
846
|
-
/** The op that actually writes the value (the external rule names it — billing_item_approval_levels.create for a time entry's approval level). */
|
|
847
|
-
writableRoute?: string;
|
|
848
|
-
}
|
|
849
|
-
/** One declared derived field of a resource (issue #219 N8) — the declaration the plan pins. */
|
|
850
|
-
interface FieldDerivation extends DerivationRule {
|
|
851
|
-
/** The vendor field name. */
|
|
852
|
-
field: string;
|
|
853
|
-
}
|
|
854
|
-
/** One per-resource fault (partial failures are typed PER ROW — never all-or-nothing). */
|
|
855
|
-
interface FieldCatalogRowError {
|
|
856
|
-
code: string;
|
|
857
|
-
message: string;
|
|
858
|
-
}
|
|
859
|
-
/** One resource's catalog row (`F` = the field-row shape: the full row by default, FieldCatalogCompactFieldRow under `compact: true`). */
|
|
860
|
-
interface FieldCatalogRow<F = FieldCatalogFieldRow> {
|
|
861
|
-
/** The plan resource key. */
|
|
862
|
-
resource: string;
|
|
863
|
-
/** The vendor entity name (the path segment; plan-derived). */
|
|
864
|
-
apiEntity: string;
|
|
865
|
-
/** The plan resource's `udfCapable` flag, read from the registry record (`CapabilityRecord.udfCapable`, issue #254): true for the resources whose records carry `userDefinedFields`. Every vendor entity has a `getUdfInfo` catalog endpoint, so the `udf` include works on any row; that endpoint's presence does not make a resource UDF-capable. */
|
|
866
|
-
udfCapable: boolean;
|
|
867
|
-
/** The filter mechanism for a UDF name — present exactly when `udfCapable`: a filter on a UDF name is accepted only with the vendor's `udf: true` marker (a plain filter is refused), so the row states the marker rather than leaving a consumer to read the UDF rows' `isQueryable` (issue #219 N7). */
|
|
868
|
-
udfFilter?: 'udf-marker';
|
|
869
|
-
/** The write shape of a record's `userDefinedFields` collection — present exactly when `udfCapable`: the vendor MERGES a sent list, so a subset is correct (issue #219 N7). */
|
|
870
|
-
udfWriteShape?: 'merge';
|
|
871
|
-
/** The entity information model (present exactly when `info` was included and fetched). */
|
|
872
|
-
info?: Record<string, unknown> | null;
|
|
873
|
-
/** The plan's derived-field declaration for this resource (issue #219 N8) — present exactly when the plan declares any, in plan order; the same list the create guidance row and the describe channel serve. Read it before treating a submitted field value as authoritative. */
|
|
874
|
-
derivedFields?: FieldDerivation[];
|
|
875
|
-
/** The projected standard-field catalog (present exactly when `fields` was included and fetched; when the `fields` opt is given, only the matching rows — the requested names absent here land in `unmatchedFields`). */
|
|
876
|
-
fields?: F[];
|
|
877
|
-
/** The requested `fields`-filter names absent from this resource's fields catalog (in request order); `[]` when no filter is given, when the row carries no fields catalog (an `info`/`udf`-only include or a row error), or when nothing was missing. Reported, never an error. */
|
|
878
|
-
unmatchedFields: string[];
|
|
879
|
-
/** The projected UDF catalog (present exactly when `udf` was included and fetched). */
|
|
880
|
-
udf?: F[] | null;
|
|
881
|
-
/** Present exactly when a `fields` projection was applied (the `fields` opt was given): the four derived lists below then describe the PROJECTED set only. A full row omits the key (it never carries `false`). */
|
|
882
|
-
projected?: true;
|
|
883
|
-
/** `isRequired === true` names, in catalog order (the `fields` catalog). */
|
|
884
|
-
required: string[];
|
|
885
|
-
/** `isReadOnly === true` names, in catalog order. */
|
|
886
|
-
readOnly: string[];
|
|
887
|
-
/** `isQueryable === true` names, in catalog order. */
|
|
888
|
-
queryable: string[];
|
|
889
|
-
/** `isPickList === true` names, in catalog order — NAMES only (see `honesty`: the VALUES may be vendor-walled). */
|
|
890
|
-
picklistFields: string[];
|
|
891
|
-
/** The FieldCache state for this row: `hit` = every included kind was served from the cache (no wire for the row); `age` = the oldest entry's age in ms (null when `hit` is false). */
|
|
892
|
-
cache: {
|
|
893
|
-
hit: boolean;
|
|
894
|
-
age: number | null;
|
|
895
|
-
};
|
|
896
|
-
/** The metadata reads this row issued (0 = fully cached; one per included kind otherwise — in-flight de-dup may make the actual wire smaller than this). */
|
|
897
|
-
wire: number;
|
|
898
|
-
/** The first per-kind failure (code + message); the sweep keeps going. */
|
|
899
|
-
error: FieldCatalogRowError | null;
|
|
900
|
-
}
|
|
901
|
-
/** The sweep result. */
|
|
902
|
-
interface FieldCatalogResult<F = FieldCatalogFieldRow> {
|
|
903
|
-
/** The resolved client zone ('unknown' for a bare explicit baseUrl). */
|
|
904
|
-
zone: string;
|
|
905
|
-
/** The zone label (a live op has no plan-pinned tenant label — it mirrors `zone`). */
|
|
906
|
-
label: string;
|
|
907
|
-
/** Whether a FieldCache was configured at all. */
|
|
908
|
-
cached: boolean;
|
|
909
|
-
/** The resolved `labels` opt (the served payload names what it carries: `true` = the picklist rows may carry `picklistValues`). */
|
|
910
|
-
labels: boolean;
|
|
911
|
-
/** The configured TTL (null when no cache). */
|
|
912
|
-
ttlMs: number | null;
|
|
913
|
-
/** The call instant (ISO). */
|
|
914
|
-
fetchedAt: string;
|
|
915
|
-
/** One row per requested resource, in request order. */
|
|
916
|
-
rows: FieldCatalogRow<F>[];
|
|
917
|
-
/** The metadata reads actually issued across the call (≤ `cap` by construction). */
|
|
918
|
-
wireUsed: number;
|
|
919
|
-
/** The wire cap the call ran under. */
|
|
920
|
-
cap: number;
|
|
921
|
-
/** The resolved `compact` opt (true = the field rows are FieldCatalogCompactFieldRow). */
|
|
922
|
-
compact: boolean;
|
|
923
|
-
/** True only when the `maxBytes` size cap dropped field rows (see `truncation`). Over the WIRE cap the call is still refused (CONFIG_ERROR), never truncated. */
|
|
924
|
-
truncated: boolean;
|
|
925
|
-
/** Present exactly when `truncated`: the typed note naming what the `maxBytes` cap dropped (issue #282) — the payload stays valid JSON, never cut mid-document. */
|
|
926
|
-
truncation?: FieldCatalogTruncation;
|
|
927
|
-
counts: {
|
|
928
|
-
/** The requested (deduplicated) resource count. */
|
|
929
|
-
resources: number;
|
|
930
|
-
/** The plan's `getFieldInfo`-bearing resource count (the field-capable set). */
|
|
931
|
-
fieldCapableResources: number;
|
|
932
|
-
/** The plan's `udfCapable` resource count (issue #254: the resources whose records carry `userDefinedFields` — not the wider set with a `getUdfInfo` catalog endpoint). */
|
|
933
|
-
udfCapableResources: number;
|
|
934
|
-
/** The rows served fully from the cache. */
|
|
935
|
-
cached: number;
|
|
936
|
-
};
|
|
937
|
-
/** The honest scope: what the live catalog can and cannot report. */
|
|
938
|
-
honesty: {
|
|
939
|
-
/** The vendor's WIRE exposure of picklist values, informational only (orthogonal to the `labels` opt — it reports what the vendor exposed on the wire, not what the caller opted into): 'partial' when any row's raw vendor response carried picklist VALUES on the wire — computed over the full raw list, not the filtered subset; 'unexposed' otherwise. */
|
|
940
|
-
picklistValues: 'unexposed' | 'partial';
|
|
941
|
-
note: string;
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
|
-
/** The typed size-cap note (issue #282). */
|
|
945
|
-
interface FieldCatalogTruncation {
|
|
946
|
-
reason: 'maxBytes';
|
|
947
|
-
/** The cap the call ran under (UTF-8 bytes of the JSON result). */
|
|
948
|
-
maxBytes: number;
|
|
949
|
-
/** The UTF-8 byte size of the untruncated JSON result. */
|
|
950
|
-
fullBytes: number;
|
|
951
|
-
/** The entries dropped, per resource and list (taken from the end: the udf rows, then the fields rows, last resource first; the name lists only when the field rows alone could not fit). */
|
|
952
|
-
omitted: Array<{
|
|
953
|
-
resource: string;
|
|
954
|
-
kind: FieldCatalogTrimKind;
|
|
955
|
-
count: number;
|
|
956
|
-
}>;
|
|
957
|
-
note: string;
|
|
958
|
-
}
|
|
959
|
-
/** The smallest accepted `maxBytes` (a cap below it could not hold a one-resource result envelope; a larger envelope that still cannot fit is refused at result-build). */
|
|
960
|
-
declare const MIN_FIELD_CATALOG_MAX_BYTES = 4096;
|
|
961
|
-
/** The optional call bag for `operations.fieldCatalog` (closed: unknown keys refuse). */
|
|
962
|
-
interface FieldCatalogOptions {
|
|
963
|
-
/** The plan resource keys to read. Omitted → the five workflow resources (never the full set — an on-demand op must not fan out 121 wire calls by default). */
|
|
964
|
-
resources?: string[];
|
|
965
|
-
/** What to fetch per resource (closed set `info` | `fields` | `udf`; default `['fields']`). */
|
|
966
|
-
include?: FieldCacheKind[];
|
|
967
|
-
/** Bypass the fieldCache for this call (fetch live, refresh the entries). Default false. */
|
|
968
|
-
fresh?: boolean;
|
|
969
|
-
/** The optional post-projection filter on the `fields`-kind rows only: keep the named fields (vendor names, trimmed, de-duplicated). Report-not-error: names absent from a resource's fields catalog land on that row's `unmatchedFields`, never an error; the `info` and `udf` rows are unaffected (the filter is a no-op on them). Applied after projection, on cache hits and wire reads alike — the cache entries stay the full raw list (zero extra wire, no invalidation). */
|
|
970
|
-
fields?: string[];
|
|
971
|
-
/** Opt-in: when `true`, the projected `fields`-kind and `udf`-kind picklist rows carry the vendor's exposed `picklistValues` (the raw vendor shape as-is — `{ value, label, parentValue?, isActive?, ... }`, `value` a string, zero transform) for the picklist fields. The W-A4 wall still applies (a value the vendor does not expose to this API user is not resolvable — retrying will not surface it). Default `false`: the rows carry no VALUES (today's exact output). Zero extra wire: the values ride the same cached raw rows. */
|
|
972
|
-
labels?: boolean;
|
|
973
|
-
/** Issue #282: when `true`, every field row is a FieldCatalogCompactFieldRow `{ name, type, isPickList, isReference, udf }` (a live tickets result: ~11 KB compact against ~20 KB full and ~137 KB full with `labels: true`). `picklistValues` ride a compact row only with `labels: true` AND a `fields` filter. Default `false` (the full rows). */
|
|
974
|
-
compact?: boolean;
|
|
975
|
-
/** Issue #282: a UTF-8 byte cap on the JSON result (integer ≥ MIN_FIELD_CATALOG_MAX_BYTES). Over it, field rows are dropped from the end until the result fits, `truncated` is `true` and `truncation` names what was dropped — never an invalid, cut-off document. The row-level name lists (required, readOnly, queryable, picklistFields) keep every name unless the field rows alone cannot fit (then they are trimmed too). A served result never exceeds the cap: when the envelope alone (it grows with the resource count) cannot fit, the call is refused with CONFIG_ERROR. The cost is linear in the result size. Default: no cap. */
|
|
976
|
-
maxBytes?: number;
|
|
977
|
-
}
|
|
978
|
-
/** The lists the size cap trims, in drop order within a row: the field rows
|
|
979
|
-
* first, then the name lists (only when the field rows alone cannot fit). */
|
|
980
|
-
declare const TRIM_KINDS: readonly ["udf", "fields", "picklistFields", "queryable", "readOnly", "required"];
|
|
981
|
-
type FieldCatalogTrimKind = (typeof TRIM_KINDS)[number];
|
|
982
|
-
/**
|
|
983
|
-
* Run the bounded live field-metadata sweep.
|
|
984
|
-
*
|
|
985
|
-
* ```ts
|
|
986
|
-
* import { fieldCatalog } from 'node-autotask/operations';
|
|
987
|
-
* const res = await fieldCatalog(client); // the 5 workflow resources, fields only
|
|
988
|
-
* const fresh = await fieldCatalog(client, { resources: ['tickets'], include: ['fields', 'udf'], fresh: true });
|
|
989
|
-
* ```
|
|
990
|
-
*
|
|
991
|
-
* @param client The wired client (the reads issue entityInformation GETs).
|
|
992
|
-
* @param opts The call bag ({ resources?, include?, fresh?, fields?, labels?, compact?, maxBytes? }).
|
|
993
|
-
*/
|
|
994
|
-
declare function fieldCatalog(client: AutotaskClient, opts: FieldCatalogOptions & {
|
|
995
|
-
compact: true;
|
|
996
|
-
}): Promise<FieldCatalogResult<FieldCatalogCompactFieldRow>>;
|
|
997
|
-
declare function fieldCatalog(client: AutotaskClient, opts?: FieldCatalogOptions & {
|
|
998
|
-
compact?: false;
|
|
999
|
-
}): Promise<FieldCatalogResult>;
|
|
1000
|
-
declare function fieldCatalog(client: AutotaskClient, opts?: FieldCatalogOptions): Promise<FieldCatalogResult<FieldCatalogFieldRow | FieldCatalogCompactFieldRow>>;
|
|
1001
|
-
|
|
1002
784
|
/** The pinned per-call id cap (mirrors `FETCH_BY_IDS_MAX_ITEMS` — the house bulk cap; over → pre-request refusal, zero wire). */
|
|
1003
785
|
declare const EXPAND_RESOURCE_NAMES_MAX_IDS = 500;
|
|
1004
786
|
interface ExpandResourceNamesOptions {
|
|
@@ -1282,4 +1064,4 @@ declare function invokeWrite(client: AutotaskClient, operation: string, args?: r
|
|
|
1282
1064
|
*/
|
|
1283
1065
|
declare function invokeDelete(client: AutotaskClient, operation: string, args?: readonly unknown[] | Record<string, unknown>, opts?: InvokeOptions): Promise<unknown>;
|
|
1284
1066
|
|
|
1285
|
-
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX, type AggregateGroup, type AggregateOptions, type AggregateResult, BLIND_SURFACE_KINDS, type BlindSurfaceKind, type BlindSurfaceOptions, BlindSurfaceRow, CREATE_BLOCKER_KINDS, type CreateGuidanceOptions, type DateBucket,
|
|
1067
|
+
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX, type AggregateGroup, type AggregateOptions, type AggregateResult, BLIND_SURFACE_KINDS, type BlindSurfaceKind, type BlindSurfaceOptions, BlindSurfaceRow, CREATE_BLOCKER_KINDS, type CreateGuidanceOptions, type DateBucket, ENTITY_TYPE_TO_RESOURCE, EXPAND_RESOURCE_NAMES_MAX_IDS, type EffectiveRequiredFields, type ExpandResourceNameRow, type ExpandResourceNamesOptions, type ExpandResourceNamesResult, FETCH_BY_IDS_CHUNK_SIZE, FETCH_BY_IDS_MAX_ITEMS, FETCH_MANY_MAX_ITEMS, type FetchByIdsOptions, type FetchManyItem, type FetchManyItemError, type FetchManyItemResult, type FetchManyOptions, type FetchManyResult, INVOKE_OPTION_KEYS, type InvokeMode, type InvokeOptions, PARAMS_BAG_KEYS, type ProbeReachabilityOptions, type ProbeReachabilityResult, type ProbeSurfaceRow, RECOVERY_CONFIRM, RECOVERY_DEFAULT_LIMIT, RECOVERY_MAX_LIMIT, type RecoveryDeleteBoundary, type RecoveryInput, type RecoveryMatch, type RecoveryOptions, type RecoveryResult, type RequiredFieldsRecord, type RequiredFieldsSource, type RequiredFieldsZoneFacts, type ResolveAnyOptions, type ResolveAnyResourceOutcome, type ResolveAnyResult, type RevenueRollupAmount, type RevenueRollupDimension, type RevenueRollupKey, type RevenueRollupNonChargeable, type RevenueRollupNonChargeableAmount, type RevenueRollupOptions, type RevenueRollupResult, type RevenueRollupRow, RowNamesSummary, type SearchAcrossResourcesOptions, type SearchAcrossResourcesResult, type SearchAcrossResourcesRow, type ServedCreateGuidanceReport, type ServedCreateGuidanceRow, UI_LINK_ENTITIES, type UiLinkEntity, type UiLinkInput, type UiLinkResult, WORKFLOW_RESOURCES, aggregate, blindSurfaces, buildUiLink, createGuidance, dateBucketLabel, effectiveRequiredFields, expandResourceNames, fetchByIds, fetchMany, foldFlattenedOpts, invoke, invokeDelete, invokeRead, invokeWrite, isEnumerableResource, needsConfirmation, probeReachability, recovery, relationshipMap, resolveAny, resourceForEntityType, revenueRollup, searchAcrossResources, uiLink, unknownKeysRefusal, validateDispatchArgs, validateFetchManyItems, validateInvokeOptions, validateParamsBag };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { a as AutotaskClient,
|
|
2
|
-
export {
|
|
3
|
-
import { I as Identifier, hV as RowNamesSummary, cX as EmptyReasonInfo, e9 as PickListValue, a as FilterCondition } from '../index-BQVStxwi.js';
|
|
4
|
-
export { hW as PICKLIST_VALUE_NOT_SERVED_NOTE } from '../index-BQVStxwi.js';
|
|
1
|
+
import { I as Identifier, np as RowNamesSummary, a as AutotaskClient, nq as BlindSurfaceInfo, f6 as EmptyReasonInfo, nr as RelationshipResource, ns as BlindSurfaceInventory, nt as BlindSurfaceRow, nu as CreateGuidanceValueRequirement, nv as CreateGuidanceRow, nw as CreateBlockerKind, nx as CreateGuidanceReport, Z as ZoneName, f as FilterCondition, L as AutotaskConfigError } from '../index-C-Oqef4y.js';
|
|
2
|
+
export { ny as DerivationRule, nz as FIELD_CACHE_KINDS, nA as FIELD_CATALOG_HONESTY_NOTE, nB as FieldCacheKind, nC as FieldCatalogCompactFieldRow, nD as FieldCatalogFieldRow, nE as FieldCatalogOptions, nF as FieldCatalogResult, nG as FieldCatalogRow, nH as FieldCatalogRowError, nI as FieldCatalogTrimKind, nJ as FieldCatalogTruncation, nK as FieldDerivation, nL as MAX_FIELD_CATALOG_WIRE, nM as MIN_FIELD_CATALOG_MAX_BYTES, nN as PICKLIST_CATALOG_UNAVAILABLE_NOTE, nO as PICKLIST_VALUE_NOT_SERVED_NOTE, nP as fieldCatalog } from '../index-C-Oqef4y.js';
|
|
5
3
|
import { CapabilityRecord } from '../capabilities.js';
|
|
6
4
|
|
|
7
5
|
/**
|
|
@@ -783,222 +781,6 @@ declare function resourceForEntityType(entityType: string | null | undefined): s
|
|
|
783
781
|
*/
|
|
784
782
|
declare function isEnumerableResource(resource: string | null | undefined): boolean;
|
|
785
783
|
|
|
786
|
-
/** The pinned wire cap: `resources × include` above it is refused
|
|
787
|
-
* pre-request (CONFIG_ERROR naming the computed cost and the cap) —
|
|
788
|
-
* refused, never truncated. */
|
|
789
|
-
declare const MAX_FIELD_CATALOG_WIRE = 60;
|
|
790
|
-
/** The stable honesty sentence served in the result (the live catalog
|
|
791
|
-
* reports field SHAPE as FLAGS and NAMES; with the opt-in `labels: true`
|
|
792
|
-
* the projected picklist rows carry the vendor's exposed picklist
|
|
793
|
-
* VALUES; it cannot resolve a picklist VALUE the vendor does not expose
|
|
794
|
-
* to this API user — the W-A4 wall). */
|
|
795
|
-
declare const FIELD_CATALOG_HONESTY_NOTE: string;
|
|
796
|
-
/** One projected field row (the stable, small served shape — not the raw
|
|
797
|
-
* vendor blob; the raw one stays available through the resource's own
|
|
798
|
-
* `getFieldInfo` / `getUdfInfo` op). */
|
|
799
|
-
interface FieldCatalogFieldRow {
|
|
800
|
-
/** The vendor field name. */
|
|
801
|
-
name: string;
|
|
802
|
-
/** The display label (UDF catalog rows only; vendor standard fields carry none). */
|
|
803
|
-
label?: string;
|
|
804
|
-
/** The vendor field type (`dataType` on standard fields, `type` on UDFs). */
|
|
805
|
-
type: string;
|
|
806
|
-
isRequired: boolean;
|
|
807
|
-
isReadOnly: boolean;
|
|
808
|
-
/** The vendor `isQueryable` flag — ABSENT on a UDF row: the vendor reports UDFs as queryable, but a filter on a UDF name is accepted only with the `udf: true` marker, so the row states the mechanism in `filterable` instead of a boolean the vendor contradicts (issue #219 N7). */
|
|
809
|
-
isQueryable?: boolean;
|
|
810
|
-
isPickList: boolean;
|
|
811
|
-
/** Present exactly on a UDF row: the filter mechanism a consumer must send to filter on this name (`udf: true` in the filter condition) — never infer plain filterability from the vendor's `isQueryable` (issue #219 N7). */
|
|
812
|
-
filterable?: 'udf-marker';
|
|
813
|
-
/** The write shape for an object/array field: `merge` (a sent subset is merged — `userDefinedFields` is the proven case) or `replace-all` (the vendor's full-model PUT replaces the collection). Absent on scalar fields (issue #219 N7). */
|
|
814
|
-
writeShape?: 'merge' | 'replace-all';
|
|
815
|
-
/** The vendor `length` bound (null when the catalog names none). */
|
|
816
|
-
maxLength: number | null;
|
|
817
|
-
/** The referenced entity type for reference fields ('' when none). */
|
|
818
|
-
referenceEntityType: string;
|
|
819
|
-
/** The plan resource key the referenced entity names (`resourceForEntityType`), or `null` when the plan carries no such resource — the key a caller enumerates valid ids with (issue #219 N1). Never a remedy or an enumeration hint. */
|
|
820
|
-
targetResource: string | null;
|
|
821
|
-
/** True exactly when `targetResource` is a plan resource with a `query`/`get` read path (issue #219 N1) — always served, so a reference the vendor names but the plan cannot enumerate reads `false`, never `undefined`. */
|
|
822
|
-
targetEnumerable: boolean;
|
|
823
|
-
/** Present exactly when the plan declares this field DERIVED for the resource (issue #219 N8): the vendor overwrites or inherits the value, so a submitted one is not authoritative. Distinct from `isReadOnly` (never write at all) — a derived field can be absent from that list and still be recomputed. */
|
|
824
|
-
derived?: DerivationRule;
|
|
825
|
-
/** The vendor's exposed picklist VALUES, verbatim (present exactly when the `labels` opt is `true` and the vendor exposed values for this picklist field — the vendor-walled and non-picklist rows carry none). */
|
|
826
|
-
picklistValues?: PickListValue[];
|
|
827
|
-
}
|
|
828
|
-
/** One compact field row (`compact: true`, issue #282): the five columns a
|
|
829
|
-
* caller needs to pick a field name — the full row's flags, lengths and
|
|
830
|
-
* reference targets are dropped. `picklistValues` rides only when `labels`
|
|
831
|
-
* AND a `fields` filter are both given (a targeted value lookup). */
|
|
832
|
-
interface FieldCatalogCompactFieldRow {
|
|
833
|
-
name: string;
|
|
834
|
-
type: string;
|
|
835
|
-
isPickList: boolean;
|
|
836
|
-
/** True when the vendor names a referenced entity (`referenceEntityType` non-empty). */
|
|
837
|
-
isReference: boolean;
|
|
838
|
-
/** True on a `udf`-kind row, false on a standard field. */
|
|
839
|
-
udf: boolean;
|
|
840
|
-
picklistValues?: PickListValue[];
|
|
841
|
-
}
|
|
842
|
-
/** The derivation rule of one field (issue #219 N8) — a closed plan token, served without the field name it decorates. */
|
|
843
|
-
interface DerivationRule {
|
|
844
|
-
/** elapsed(<start>,<end>) (recomputed from those timestamps) | parent (inherited from the parent record) | mirror(<field>) (the vendor copies that field) | external (written by another entity's op — writableRoute names it). */
|
|
845
|
-
rule: string;
|
|
846
|
-
/** The op that actually writes the value (the external rule names it — billing_item_approval_levels.create for a time entry's approval level). */
|
|
847
|
-
writableRoute?: string;
|
|
848
|
-
}
|
|
849
|
-
/** One declared derived field of a resource (issue #219 N8) — the declaration the plan pins. */
|
|
850
|
-
interface FieldDerivation extends DerivationRule {
|
|
851
|
-
/** The vendor field name. */
|
|
852
|
-
field: string;
|
|
853
|
-
}
|
|
854
|
-
/** One per-resource fault (partial failures are typed PER ROW — never all-or-nothing). */
|
|
855
|
-
interface FieldCatalogRowError {
|
|
856
|
-
code: string;
|
|
857
|
-
message: string;
|
|
858
|
-
}
|
|
859
|
-
/** One resource's catalog row (`F` = the field-row shape: the full row by default, FieldCatalogCompactFieldRow under `compact: true`). */
|
|
860
|
-
interface FieldCatalogRow<F = FieldCatalogFieldRow> {
|
|
861
|
-
/** The plan resource key. */
|
|
862
|
-
resource: string;
|
|
863
|
-
/** The vendor entity name (the path segment; plan-derived). */
|
|
864
|
-
apiEntity: string;
|
|
865
|
-
/** The plan resource's `udfCapable` flag, read from the registry record (`CapabilityRecord.udfCapable`, issue #254): true for the resources whose records carry `userDefinedFields`. Every vendor entity has a `getUdfInfo` catalog endpoint, so the `udf` include works on any row; that endpoint's presence does not make a resource UDF-capable. */
|
|
866
|
-
udfCapable: boolean;
|
|
867
|
-
/** The filter mechanism for a UDF name — present exactly when `udfCapable`: a filter on a UDF name is accepted only with the vendor's `udf: true` marker (a plain filter is refused), so the row states the marker rather than leaving a consumer to read the UDF rows' `isQueryable` (issue #219 N7). */
|
|
868
|
-
udfFilter?: 'udf-marker';
|
|
869
|
-
/** The write shape of a record's `userDefinedFields` collection — present exactly when `udfCapable`: the vendor MERGES a sent list, so a subset is correct (issue #219 N7). */
|
|
870
|
-
udfWriteShape?: 'merge';
|
|
871
|
-
/** The entity information model (present exactly when `info` was included and fetched). */
|
|
872
|
-
info?: Record<string, unknown> | null;
|
|
873
|
-
/** The plan's derived-field declaration for this resource (issue #219 N8) — present exactly when the plan declares any, in plan order; the same list the create guidance row and the describe channel serve. Read it before treating a submitted field value as authoritative. */
|
|
874
|
-
derivedFields?: FieldDerivation[];
|
|
875
|
-
/** The projected standard-field catalog (present exactly when `fields` was included and fetched; when the `fields` opt is given, only the matching rows — the requested names absent here land in `unmatchedFields`). */
|
|
876
|
-
fields?: F[];
|
|
877
|
-
/** The requested `fields`-filter names absent from this resource's fields catalog (in request order); `[]` when no filter is given, when the row carries no fields catalog (an `info`/`udf`-only include or a row error), or when nothing was missing. Reported, never an error. */
|
|
878
|
-
unmatchedFields: string[];
|
|
879
|
-
/** The projected UDF catalog (present exactly when `udf` was included and fetched). */
|
|
880
|
-
udf?: F[] | null;
|
|
881
|
-
/** Present exactly when a `fields` projection was applied (the `fields` opt was given): the four derived lists below then describe the PROJECTED set only. A full row omits the key (it never carries `false`). */
|
|
882
|
-
projected?: true;
|
|
883
|
-
/** `isRequired === true` names, in catalog order (the `fields` catalog). */
|
|
884
|
-
required: string[];
|
|
885
|
-
/** `isReadOnly === true` names, in catalog order. */
|
|
886
|
-
readOnly: string[];
|
|
887
|
-
/** `isQueryable === true` names, in catalog order. */
|
|
888
|
-
queryable: string[];
|
|
889
|
-
/** `isPickList === true` names, in catalog order — NAMES only (see `honesty`: the VALUES may be vendor-walled). */
|
|
890
|
-
picklistFields: string[];
|
|
891
|
-
/** The FieldCache state for this row: `hit` = every included kind was served from the cache (no wire for the row); `age` = the oldest entry's age in ms (null when `hit` is false). */
|
|
892
|
-
cache: {
|
|
893
|
-
hit: boolean;
|
|
894
|
-
age: number | null;
|
|
895
|
-
};
|
|
896
|
-
/** The metadata reads this row issued (0 = fully cached; one per included kind otherwise — in-flight de-dup may make the actual wire smaller than this). */
|
|
897
|
-
wire: number;
|
|
898
|
-
/** The first per-kind failure (code + message); the sweep keeps going. */
|
|
899
|
-
error: FieldCatalogRowError | null;
|
|
900
|
-
}
|
|
901
|
-
/** The sweep result. */
|
|
902
|
-
interface FieldCatalogResult<F = FieldCatalogFieldRow> {
|
|
903
|
-
/** The resolved client zone ('unknown' for a bare explicit baseUrl). */
|
|
904
|
-
zone: string;
|
|
905
|
-
/** The zone label (a live op has no plan-pinned tenant label — it mirrors `zone`). */
|
|
906
|
-
label: string;
|
|
907
|
-
/** Whether a FieldCache was configured at all. */
|
|
908
|
-
cached: boolean;
|
|
909
|
-
/** The resolved `labels` opt (the served payload names what it carries: `true` = the picklist rows may carry `picklistValues`). */
|
|
910
|
-
labels: boolean;
|
|
911
|
-
/** The configured TTL (null when no cache). */
|
|
912
|
-
ttlMs: number | null;
|
|
913
|
-
/** The call instant (ISO). */
|
|
914
|
-
fetchedAt: string;
|
|
915
|
-
/** One row per requested resource, in request order. */
|
|
916
|
-
rows: FieldCatalogRow<F>[];
|
|
917
|
-
/** The metadata reads actually issued across the call (≤ `cap` by construction). */
|
|
918
|
-
wireUsed: number;
|
|
919
|
-
/** The wire cap the call ran under. */
|
|
920
|
-
cap: number;
|
|
921
|
-
/** The resolved `compact` opt (true = the field rows are FieldCatalogCompactFieldRow). */
|
|
922
|
-
compact: boolean;
|
|
923
|
-
/** True only when the `maxBytes` size cap dropped field rows (see `truncation`). Over the WIRE cap the call is still refused (CONFIG_ERROR), never truncated. */
|
|
924
|
-
truncated: boolean;
|
|
925
|
-
/** Present exactly when `truncated`: the typed note naming what the `maxBytes` cap dropped (issue #282) — the payload stays valid JSON, never cut mid-document. */
|
|
926
|
-
truncation?: FieldCatalogTruncation;
|
|
927
|
-
counts: {
|
|
928
|
-
/** The requested (deduplicated) resource count. */
|
|
929
|
-
resources: number;
|
|
930
|
-
/** The plan's `getFieldInfo`-bearing resource count (the field-capable set). */
|
|
931
|
-
fieldCapableResources: number;
|
|
932
|
-
/** The plan's `udfCapable` resource count (issue #254: the resources whose records carry `userDefinedFields` — not the wider set with a `getUdfInfo` catalog endpoint). */
|
|
933
|
-
udfCapableResources: number;
|
|
934
|
-
/** The rows served fully from the cache. */
|
|
935
|
-
cached: number;
|
|
936
|
-
};
|
|
937
|
-
/** The honest scope: what the live catalog can and cannot report. */
|
|
938
|
-
honesty: {
|
|
939
|
-
/** The vendor's WIRE exposure of picklist values, informational only (orthogonal to the `labels` opt — it reports what the vendor exposed on the wire, not what the caller opted into): 'partial' when any row's raw vendor response carried picklist VALUES on the wire — computed over the full raw list, not the filtered subset; 'unexposed' otherwise. */
|
|
940
|
-
picklistValues: 'unexposed' | 'partial';
|
|
941
|
-
note: string;
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
|
-
/** The typed size-cap note (issue #282). */
|
|
945
|
-
interface FieldCatalogTruncation {
|
|
946
|
-
reason: 'maxBytes';
|
|
947
|
-
/** The cap the call ran under (UTF-8 bytes of the JSON result). */
|
|
948
|
-
maxBytes: number;
|
|
949
|
-
/** The UTF-8 byte size of the untruncated JSON result. */
|
|
950
|
-
fullBytes: number;
|
|
951
|
-
/** The entries dropped, per resource and list (taken from the end: the udf rows, then the fields rows, last resource first; the name lists only when the field rows alone could not fit). */
|
|
952
|
-
omitted: Array<{
|
|
953
|
-
resource: string;
|
|
954
|
-
kind: FieldCatalogTrimKind;
|
|
955
|
-
count: number;
|
|
956
|
-
}>;
|
|
957
|
-
note: string;
|
|
958
|
-
}
|
|
959
|
-
/** The smallest accepted `maxBytes` (a cap below it could not hold a one-resource result envelope; a larger envelope that still cannot fit is refused at result-build). */
|
|
960
|
-
declare const MIN_FIELD_CATALOG_MAX_BYTES = 4096;
|
|
961
|
-
/** The optional call bag for `operations.fieldCatalog` (closed: unknown keys refuse). */
|
|
962
|
-
interface FieldCatalogOptions {
|
|
963
|
-
/** The plan resource keys to read. Omitted → the five workflow resources (never the full set — an on-demand op must not fan out 121 wire calls by default). */
|
|
964
|
-
resources?: string[];
|
|
965
|
-
/** What to fetch per resource (closed set `info` | `fields` | `udf`; default `['fields']`). */
|
|
966
|
-
include?: FieldCacheKind[];
|
|
967
|
-
/** Bypass the fieldCache for this call (fetch live, refresh the entries). Default false. */
|
|
968
|
-
fresh?: boolean;
|
|
969
|
-
/** The optional post-projection filter on the `fields`-kind rows only: keep the named fields (vendor names, trimmed, de-duplicated). Report-not-error: names absent from a resource's fields catalog land on that row's `unmatchedFields`, never an error; the `info` and `udf` rows are unaffected (the filter is a no-op on them). Applied after projection, on cache hits and wire reads alike — the cache entries stay the full raw list (zero extra wire, no invalidation). */
|
|
970
|
-
fields?: string[];
|
|
971
|
-
/** Opt-in: when `true`, the projected `fields`-kind and `udf`-kind picklist rows carry the vendor's exposed `picklistValues` (the raw vendor shape as-is — `{ value, label, parentValue?, isActive?, ... }`, `value` a string, zero transform) for the picklist fields. The W-A4 wall still applies (a value the vendor does not expose to this API user is not resolvable — retrying will not surface it). Default `false`: the rows carry no VALUES (today's exact output). Zero extra wire: the values ride the same cached raw rows. */
|
|
972
|
-
labels?: boolean;
|
|
973
|
-
/** Issue #282: when `true`, every field row is a FieldCatalogCompactFieldRow `{ name, type, isPickList, isReference, udf }` (a live tickets result: ~11 KB compact against ~20 KB full and ~137 KB full with `labels: true`). `picklistValues` ride a compact row only with `labels: true` AND a `fields` filter. Default `false` (the full rows). */
|
|
974
|
-
compact?: boolean;
|
|
975
|
-
/** Issue #282: a UTF-8 byte cap on the JSON result (integer ≥ MIN_FIELD_CATALOG_MAX_BYTES). Over it, field rows are dropped from the end until the result fits, `truncated` is `true` and `truncation` names what was dropped — never an invalid, cut-off document. The row-level name lists (required, readOnly, queryable, picklistFields) keep every name unless the field rows alone cannot fit (then they are trimmed too). A served result never exceeds the cap: when the envelope alone (it grows with the resource count) cannot fit, the call is refused with CONFIG_ERROR. The cost is linear in the result size. Default: no cap. */
|
|
976
|
-
maxBytes?: number;
|
|
977
|
-
}
|
|
978
|
-
/** The lists the size cap trims, in drop order within a row: the field rows
|
|
979
|
-
* first, then the name lists (only when the field rows alone cannot fit). */
|
|
980
|
-
declare const TRIM_KINDS: readonly ["udf", "fields", "picklistFields", "queryable", "readOnly", "required"];
|
|
981
|
-
type FieldCatalogTrimKind = (typeof TRIM_KINDS)[number];
|
|
982
|
-
/**
|
|
983
|
-
* Run the bounded live field-metadata sweep.
|
|
984
|
-
*
|
|
985
|
-
* ```ts
|
|
986
|
-
* import { fieldCatalog } from 'node-autotask/operations';
|
|
987
|
-
* const res = await fieldCatalog(client); // the 5 workflow resources, fields only
|
|
988
|
-
* const fresh = await fieldCatalog(client, { resources: ['tickets'], include: ['fields', 'udf'], fresh: true });
|
|
989
|
-
* ```
|
|
990
|
-
*
|
|
991
|
-
* @param client The wired client (the reads issue entityInformation GETs).
|
|
992
|
-
* @param opts The call bag ({ resources?, include?, fresh?, fields?, labels?, compact?, maxBytes? }).
|
|
993
|
-
*/
|
|
994
|
-
declare function fieldCatalog(client: AutotaskClient, opts: FieldCatalogOptions & {
|
|
995
|
-
compact: true;
|
|
996
|
-
}): Promise<FieldCatalogResult<FieldCatalogCompactFieldRow>>;
|
|
997
|
-
declare function fieldCatalog(client: AutotaskClient, opts?: FieldCatalogOptions & {
|
|
998
|
-
compact?: false;
|
|
999
|
-
}): Promise<FieldCatalogResult>;
|
|
1000
|
-
declare function fieldCatalog(client: AutotaskClient, opts?: FieldCatalogOptions): Promise<FieldCatalogResult<FieldCatalogFieldRow | FieldCatalogCompactFieldRow>>;
|
|
1001
|
-
|
|
1002
784
|
/** The pinned per-call id cap (mirrors `FETCH_BY_IDS_MAX_ITEMS` — the house bulk cap; over → pre-request refusal, zero wire). */
|
|
1003
785
|
declare const EXPAND_RESOURCE_NAMES_MAX_IDS = 500;
|
|
1004
786
|
interface ExpandResourceNamesOptions {
|
|
@@ -1282,4 +1064,4 @@ declare function invokeWrite(client: AutotaskClient, operation: string, args?: r
|
|
|
1282
1064
|
*/
|
|
1283
1065
|
declare function invokeDelete(client: AutotaskClient, operation: string, args?: readonly unknown[] | Record<string, unknown>, opts?: InvokeOptions): Promise<unknown>;
|
|
1284
1066
|
|
|
1285
|
-
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX, type AggregateGroup, type AggregateOptions, type AggregateResult, BLIND_SURFACE_KINDS, type BlindSurfaceKind, type BlindSurfaceOptions, BlindSurfaceRow, CREATE_BLOCKER_KINDS, type CreateGuidanceOptions, type DateBucket,
|
|
1067
|
+
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX, type AggregateGroup, type AggregateOptions, type AggregateResult, BLIND_SURFACE_KINDS, type BlindSurfaceKind, type BlindSurfaceOptions, BlindSurfaceRow, CREATE_BLOCKER_KINDS, type CreateGuidanceOptions, type DateBucket, ENTITY_TYPE_TO_RESOURCE, EXPAND_RESOURCE_NAMES_MAX_IDS, type EffectiveRequiredFields, type ExpandResourceNameRow, type ExpandResourceNamesOptions, type ExpandResourceNamesResult, FETCH_BY_IDS_CHUNK_SIZE, FETCH_BY_IDS_MAX_ITEMS, FETCH_MANY_MAX_ITEMS, type FetchByIdsOptions, type FetchManyItem, type FetchManyItemError, type FetchManyItemResult, type FetchManyOptions, type FetchManyResult, INVOKE_OPTION_KEYS, type InvokeMode, type InvokeOptions, PARAMS_BAG_KEYS, type ProbeReachabilityOptions, type ProbeReachabilityResult, type ProbeSurfaceRow, RECOVERY_CONFIRM, RECOVERY_DEFAULT_LIMIT, RECOVERY_MAX_LIMIT, type RecoveryDeleteBoundary, type RecoveryInput, type RecoveryMatch, type RecoveryOptions, type RecoveryResult, type RequiredFieldsRecord, type RequiredFieldsSource, type RequiredFieldsZoneFacts, type ResolveAnyOptions, type ResolveAnyResourceOutcome, type ResolveAnyResult, type RevenueRollupAmount, type RevenueRollupDimension, type RevenueRollupKey, type RevenueRollupNonChargeable, type RevenueRollupNonChargeableAmount, type RevenueRollupOptions, type RevenueRollupResult, type RevenueRollupRow, RowNamesSummary, type SearchAcrossResourcesOptions, type SearchAcrossResourcesResult, type SearchAcrossResourcesRow, type ServedCreateGuidanceReport, type ServedCreateGuidanceRow, UI_LINK_ENTITIES, type UiLinkEntity, type UiLinkInput, type UiLinkResult, WORKFLOW_RESOURCES, aggregate, blindSurfaces, buildUiLink, createGuidance, dateBucketLabel, effectiveRequiredFields, expandResourceNames, fetchByIds, fetchMany, foldFlattenedOpts, invoke, invokeDelete, invokeRead, invokeWrite, isEnumerableResource, needsConfirmation, probeReachability, recovery, relationshipMap, resolveAny, resourceForEntityType, revenueRollup, searchAcrossResources, uiLink, unknownKeysRefusal, validateDispatchArgs, validateFetchManyItems, validateInvokeOptions, validateParamsBag };
|
package/dist/operations/index.js
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
OrganizationalLevel1sResource,
|
|
30
30
|
OrganizationalLevel2sResource,
|
|
31
31
|
OrganizationalLevelAssociationsResource,
|
|
32
|
+
PICKLIST_CATALOG_UNAVAILABLE_NOTE,
|
|
32
33
|
PICKLIST_VALUE_NOT_SERVED_NOTE,
|
|
33
34
|
PROFITABILITY_MAX_WINDOW_MONTHS,
|
|
34
35
|
REACHABILITY_PROBE_DEFAULTS,
|
|
@@ -68,10 +69,10 @@ import {
|
|
|
68
69
|
uiLink,
|
|
69
70
|
validateFetchManyItems,
|
|
70
71
|
validateQueryFieldNames
|
|
71
|
-
} from "../chunk-
|
|
72
|
+
} from "../chunk-LN3HQQBR.js";
|
|
72
73
|
import {
|
|
73
74
|
CAPABILITIES
|
|
74
|
-
} from "../chunk-
|
|
75
|
+
} from "../chunk-GDSCYY2G.js";
|
|
75
76
|
import "../chunk-5VHSLJMR.js";
|
|
76
77
|
|
|
77
78
|
// src/operations/searchAcrossResources.ts
|
|
@@ -2157,6 +2158,7 @@ export {
|
|
|
2157
2158
|
MAX_FIELD_CATALOG_WIRE,
|
|
2158
2159
|
MIN_FIELD_CATALOG_MAX_BYTES,
|
|
2159
2160
|
PARAMS_BAG_KEYS,
|
|
2161
|
+
PICKLIST_CATALOG_UNAVAILABLE_NOTE,
|
|
2160
2162
|
PICKLIST_VALUE_NOT_SERVED_NOTE,
|
|
2161
2163
|
RECOVERY_CONFIRM,
|
|
2162
2164
|
RECOVERY_DEFAULT_LIMIT,
|
package/dist/pool.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk73QNAEAFcjs = require('./chunk-73QNAEAF.cjs');
|
|
4
|
+
require('./chunk-GIVYTQ6R.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
require('./chunk-
|
|
9
|
+
var _chunkLB34VFQYcjs = require('./chunk-LB34VFQY.cjs');
|
|
10
|
+
require('./chunk-VR6RYXTD.cjs');
|
|
11
11
|
require('./chunk-MJTKK3QG.cjs');
|
|
12
12
|
|
|
13
13
|
// src/pool.ts
|
|
@@ -33,17 +33,17 @@ function cacheSignature(config) {
|
|
|
33
33
|
function createClientPool(options = {}) {
|
|
34
34
|
const maxSize = _nullishCoalesce(options.maxSize, () => ( 128));
|
|
35
35
|
if (!Number.isInteger(maxSize) || maxSize < 1) {
|
|
36
|
-
throw new (0,
|
|
36
|
+
throw new (0, _chunkLB34VFQYcjs.AutotaskConfigError)(
|
|
37
37
|
`ClientPool maxSize must be a positive integer (got ${String(options.maxSize)})`
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
const idleTtlMs = options.idleTtlMs;
|
|
41
41
|
if (idleTtlMs !== void 0 && (!Number.isInteger(idleTtlMs) || idleTtlMs < 1)) {
|
|
42
|
-
throw new (0,
|
|
42
|
+
throw new (0, _chunkLB34VFQYcjs.AutotaskConfigError)(
|
|
43
43
|
`ClientPool idleTtlMs must be a positive integer (got ${String(idleTtlMs)})`
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
-
const factory = _nullishCoalesce(options.factory, () => ( ((config) => new (0,
|
|
46
|
+
const factory = _nullishCoalesce(options.factory, () => ( ((config) => new (0, _chunk73QNAEAFcjs.AutotaskClient)(config))));
|
|
47
47
|
const sharedReadCache = options.sharedReadCache !== false;
|
|
48
48
|
const entries = /* @__PURE__ */ new Map();
|
|
49
49
|
const readCaches = /* @__PURE__ */ new Map();
|
|
@@ -55,7 +55,7 @@ function createClientPool(options = {}) {
|
|
|
55
55
|
readCaches.set(key, existing);
|
|
56
56
|
return existing;
|
|
57
57
|
}
|
|
58
|
-
const created =
|
|
58
|
+
const created = _chunkLB34VFQYcjs.buildReadCache.call(void 0, config);
|
|
59
59
|
if (created === void 0) return void 0;
|
|
60
60
|
readCaches.set(key, created);
|
|
61
61
|
while (readCaches.size > maxSize) {
|
|
@@ -70,7 +70,7 @@ function createClientPool(options = {}) {
|
|
|
70
70
|
return { ...config, cache: { ..._nullishCoalesce(config.cache, () => ( {})), store } };
|
|
71
71
|
}
|
|
72
72
|
function keyFor(config) {
|
|
73
|
-
const resolved =
|
|
73
|
+
const resolved = _chunkLB34VFQYcjs.resolveCredentials.call(void 0, config);
|
|
74
74
|
const tuple = [
|
|
75
75
|
resolved.userName,
|
|
76
76
|
resolved.apiIntegrationCode,
|
package/dist/pool.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { A as AutotaskConfig, a as AutotaskClient } from './index-
|
|
2
|
-
import './index-BQVStxwi.cjs';
|
|
1
|
+
import { A as AutotaskConfig, a as AutotaskClient } from './index-C-Oqef4y.cjs';
|
|
3
2
|
|
|
4
3
|
interface ClientPoolOptions {
|
|
5
4
|
/** Bounded LRU capacity (positive integer). Default 128. */
|
package/dist/pool.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { A as AutotaskConfig, a as AutotaskClient } from './index-
|
|
2
|
-
import './index-BQVStxwi.js';
|
|
1
|
+
import { A as AutotaskConfig, a as AutotaskClient } from './index-C-Oqef4y.js';
|
|
3
2
|
|
|
4
3
|
interface ClientPoolOptions {
|
|
5
4
|
/** Bounded LRU capacity (positive integer). Default 128. */
|
package/dist/pool.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AutotaskClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-CQXB7KAO.js";
|
|
4
|
+
import "./chunk-LDTJNLX7.js";
|
|
5
5
|
import {
|
|
6
6
|
AutotaskConfigError,
|
|
7
7
|
buildReadCache,
|
|
8
8
|
resolveCredentials
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-LN3HQQBR.js";
|
|
10
|
+
import "./chunk-GDSCYY2G.js";
|
|
11
11
|
import "./chunk-5VHSLJMR.js";
|
|
12
12
|
|
|
13
13
|
// src/pool.ts
|