iit-mcp-autotask 0.54.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +123 -0
- package/LICENSE +21 -0
- package/README.md +788 -0
- package/capabilities.json +487 -0
- package/dist/access/gate.d.ts +34 -0
- package/dist/access/gate.js +76 -0
- package/dist/access/grants.d.ts +20 -0
- package/dist/access/grants.js +35 -0
- package/dist/access/write-env.d.ts +41 -0
- package/dist/access/write-env.js +166 -0
- package/dist/auth.d.ts +74 -0
- package/dist/auth.js +129 -0
- package/dist/base-hosts.d.ts +38 -0
- package/dist/base-hosts.js +70 -0
- package/dist/config/load.d.ts +28 -0
- package/dist/config/load.js +105 -0
- package/dist/config/schema.d.ts +166 -0
- package/dist/config/schema.js +311 -0
- package/dist/credential.d.ts +28 -0
- package/dist/credential.js +32 -0
- package/dist/doctor.d.ts +112 -0
- package/dist/doctor.js +154 -0
- package/dist/http-guard.d.ts +57 -0
- package/dist/http-guard.js +134 -0
- package/dist/http.d.ts +50 -0
- package/dist/http.js +290 -0
- package/dist/lifecycle.d.ts +29 -0
- package/dist/lifecycle.js +52 -0
- package/dist/logger.d.ts +26 -0
- package/dist/logger.js +28 -0
- package/dist/main.d.ts +12 -0
- package/dist/main.js +283 -0
- package/dist/policy.d.ts +54 -0
- package/dist/policy.js +80 -0
- package/dist/tools/aggregate.d.ts +16 -0
- package/dist/tools/aggregate.js +64 -0
- package/dist/tools/capabilities-manifest.d.ts +4 -0
- package/dist/tools/capabilities-manifest.js +94 -0
- package/dist/tools/catalog-data.d.ts +116 -0
- package/dist/tools/catalog-data.js +207 -0
- package/dist/tools/clock.d.ts +17 -0
- package/dist/tools/clock.js +43 -0
- package/dist/tools/composites.d.ts +36 -0
- package/dist/tools/composites.js +305 -0
- package/dist/tools/context/client.d.ts +41 -0
- package/dist/tools/context/client.js +139 -0
- package/dist/tools/context/derive.d.ts +9 -0
- package/dist/tools/context/derive.js +32 -0
- package/dist/tools/context/scope.d.ts +24 -0
- package/dist/tools/context/scope.js +180 -0
- package/dist/tools/context/types.d.ts +141 -0
- package/dist/tools/context/types.js +2 -0
- package/dist/tools/dispatch.d.ts +78 -0
- package/dist/tools/dispatch.js +272 -0
- package/dist/tools/field-pointer.d.ts +25 -0
- package/dist/tools/field-pointer.js +45 -0
- package/dist/tools/guide.d.ts +30 -0
- package/dist/tools/guide.js +97 -0
- package/dist/tools/lists.d.ts +9 -0
- package/dist/tools/lists.js +205 -0
- package/dist/tools/meta.d.ts +22 -0
- package/dist/tools/meta.js +709 -0
- package/dist/tools/output-file.d.ts +26 -0
- package/dist/tools/output-file.js +140 -0
- package/dist/tools/rank.d.ts +21 -0
- package/dist/tools/rank.js +57 -0
- package/dist/tools/reasons.d.ts +33 -0
- package/dist/tools/reasons.js +121 -0
- package/dist/tools/register.d.ts +23 -0
- package/dist/tools/register.js +50 -0
- package/dist/tools/resolves.d.ts +28 -0
- package/dist/tools/resolves.js +399 -0
- package/dist/tools/results/envelope.d.ts +55 -0
- package/dist/tools/results/envelope.js +63 -0
- package/dist/tools/results/errors.d.ts +147 -0
- package/dist/tools/results/errors.js +384 -0
- package/dist/tools/results/untrusted.d.ts +129 -0
- package/dist/tools/results/untrusted.js +218 -0
- package/dist/tools/revenue-rollup.d.ts +8 -0
- package/dist/tools/revenue-rollup.js +112 -0
- package/dist/tools/schemas.d.ts +467 -0
- package/dist/tools/schemas.js +444 -0
- package/dist/tools/scope-guard.d.ts +2 -0
- package/dist/tools/scope-guard.js +11 -0
- package/dist/tools/server-version.d.ts +3 -0
- package/dist/tools/server-version.js +14 -0
- package/dist/tools/server.d.ts +92 -0
- package/dist/tools/server.js +170 -0
- package/dist/tools/surface.d.ts +37 -0
- package/dist/tools/surface.js +94 -0
- package/dist/tools/tsv.d.ts +52 -0
- package/dist/tools/tsv.js +95 -0
- package/dist/tools/write/apply.d.ts +40 -0
- package/dist/tools/write/apply.js +500 -0
- package/dist/tools/write/checks.d.ts +39 -0
- package/dist/tools/write/checks.js +137 -0
- package/dist/tools/write/common.d.ts +23 -0
- package/dist/tools/write/common.js +33 -0
- package/dist/tools/write/facts.d.ts +52 -0
- package/dist/tools/write/facts.js +151 -0
- package/dist/tools/write/outcome.d.ts +23 -0
- package/dist/tools/write/outcome.js +67 -0
- package/dist/tools/write/parse.d.ts +37 -0
- package/dist/tools/write/parse.js +166 -0
- package/dist/tools/write/payload.d.ts +44 -0
- package/dist/tools/write/payload.js +119 -0
- package/dist/tools/write/preview.d.ts +3 -0
- package/dist/tools/write/preview.js +317 -0
- package/dist/tools/write/snapshot.d.ts +68 -0
- package/dist/tools/write/snapshot.js +360 -0
- package/dist/tools/write-guidance.d.ts +174 -0
- package/dist/tools/write-guidance.js +317 -0
- package/dist/tools/write.d.ts +9 -0
- package/dist/tools/write.js +10 -0
- package/dist/write/canonical.d.ts +12 -0
- package/dist/write/canonical.js +31 -0
- package/dist/write/evaluate.d.ts +77 -0
- package/dist/write/evaluate.js +91 -0
- package/dist/write/hard-rules.d.ts +49 -0
- package/dist/write/hard-rules.js +48 -0
- package/dist/write/runtime.d.ts +37 -0
- package/dist/write/runtime.js +72 -0
- package/dist/write/store/audit-log.d.ts +13 -0
- package/dist/write/store/audit-log.js +25 -0
- package/dist/write/store/constants.d.ts +34 -0
- package/dist/write/store/constants.js +35 -0
- package/dist/write/store/files.d.ts +44 -0
- package/dist/write/store/files.js +157 -0
- package/dist/write/store/heartbeat.d.ts +9 -0
- package/dist/write/store/heartbeat.js +65 -0
- package/dist/write/store/ledger.d.ts +15 -0
- package/dist/write/store/ledger.js +86 -0
- package/dist/write/store/lifecycle.d.ts +35 -0
- package/dist/write/store/lifecycle.js +114 -0
- package/dist/write/store/lock.d.ts +97 -0
- package/dist/write/store/lock.js +464 -0
- package/dist/write/store/op-lock.d.ts +13 -0
- package/dist/write/store/op-lock.js +175 -0
- package/dist/write/store/plan-store.d.ts +7 -0
- package/dist/write/store/plan-store.js +48 -0
- package/dist/write/store/plans.d.ts +5 -0
- package/dist/write/store/plans.js +19 -0
- package/dist/write/store/types.d.ts +195 -0
- package/dist/write/store/types.js +2 -0
- package/dist/write/store.d.ts +6 -0
- package/dist/write/store.js +182 -0
- package/examples/agentgateway.write-gate.yaml +29 -0
- package/package.json +71 -0
- package/server.json +69 -0
- package/skills/ar-aging.md +65 -0
- package/skills/company-360.md +69 -0
- package/skills/contract-profitability.md +65 -0
- package/skills/crm-management.md +87 -0
- package/skills/filter-semantics.md +75 -0
- package/skills/invoice-export.md +61 -0
- package/skills/log-time-entry.md +77 -0
- package/skills/non-chargeable-work.md +67 -0
- package/skills/portfolio-margin.md +66 -0
- package/skills/recurring-revenue.md +65 -0
- package/skills/revenue-rollup.md +65 -0
- package/skills/slim-reads.md +67 -0
- package/skills/ticket-triage.md +64 -0
- package/skills/unbilled-work-review.md +66 -0
- package/skills/wip-hours.md +68 -0
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tools/schemas.ts — the single Zod v4 schema source for every tool input, and the
|
|
3
|
+
* runtime result envelope.
|
|
4
|
+
*
|
|
5
|
+
* Inputs: every tool is registered through {@link closedInput}, a StandardSchema whose ADVERTISED
|
|
6
|
+
* wire schema is the zod object converted to JSON Schema (with `additionalProperties: false`), and
|
|
7
|
+
* whose `validate` passes the raw arguments through untouched. The SDK therefore never rejects an
|
|
8
|
+
* input itself (its rejection is a plain-text error, not an envelope): the call frame (`runTool`)
|
|
9
|
+
* refuses unknown keys with the typed did-you-mean contract and then parses the zod object, and a
|
|
10
|
+
* failure answers the `INPUT_INVALID` envelope.
|
|
11
|
+
*
|
|
12
|
+
* The `filter` / params-bag values are deliberately PASS-THROUGH (`z.unknown()`): the closed BAG keys
|
|
13
|
+
* are enforced by the SDK's `validateParamsBag` pre-request (zero wire), which this server must not
|
|
14
|
+
* pre-empt by stripping. The filter grammar is documented once, in the server instructions.
|
|
15
|
+
*/
|
|
16
|
+
import * as z from 'zod/v4';
|
|
17
|
+
import type { StandardSchemaWithJSON } from '@modelcontextprotocol/server';
|
|
18
|
+
/** A bare vendor numeric id. */
|
|
19
|
+
export declare const ID: z.ZodNumber;
|
|
20
|
+
/** An exact registry operation key (`resource.method`); registry membership and effect are checked server-side. */
|
|
21
|
+
export declare const OP_KEY: z.ZodString;
|
|
22
|
+
/** The five workflow resources the resolve tool targets. */
|
|
23
|
+
export declare const WORKFLOW_RESOURCES: readonly ["companies", "tickets", "contacts", "configuration_items", "projects"];
|
|
24
|
+
/** Query-family total-record cap (NOT a page size: default 50, max 2500). */
|
|
25
|
+
export declare const QUERY_MAX_ROWS = 2500;
|
|
26
|
+
export declare const QUERY_LIMIT: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
/**
|
|
28
|
+
* The default row cap of each list part of `autotask_company_full_profile` (issue #99): 50 rows per
|
|
29
|
+
* part cost ~345 KB for one mid-size company; 10 keeps the overview useful at about a fifth of that.
|
|
30
|
+
* A part with `capped: true` has more rows — raise its limit explicitly. Other composites keep PART_LIMIT.
|
|
31
|
+
*/
|
|
32
|
+
export declare const COMPANY_PROFILE_PART_LIMIT_DEFAULT = 10;
|
|
33
|
+
/**
|
|
34
|
+
* The JSON filter (pass-through for WELL-FORMED shapes: the condition grammar — 13 operators +
|
|
35
|
+
* and/or — is validated by the SDK pre-request; unsupported TOP-LEVEL shapes are refused by this
|
|
36
|
+
* server pre-request, see {@link assertFilterShape}).
|
|
37
|
+
*
|
|
38
|
+
* #173: the ADVERTISED schema types a condition's `value` as a string, so a client that builds one
|
|
39
|
+
* column type per array (Copilot Studio's Table) gets a uniform string column instead of inferring
|
|
40
|
+
* one from mixed values; the runtime stays pass-through (numbers, booleans, in/notIn arrays and
|
|
41
|
+
* and/or groups are accepted unchanged). Only field/op/value are advertised: a form-filling client
|
|
42
|
+
* fills every property it is shown, and a filled `udf` or `items` would change the query.
|
|
43
|
+
* #231: the advertised condition is explicit for strict form-fillers (one prepared a required Table
|
|
44
|
+
* with no rows and sent nothing): `op` the 13-operator enum and an `examples` entry (a relation
|
|
45
|
+
* filter plus a UTC date bound). exist/notExist take value "", which the SDK accepts.
|
|
46
|
+
* #241: `filter` and a condition's `value` are not required (Copilot Studio left the
|
|
47
|
+
* required Table unfilled and asked the user); the query handler refuses a missing or empty filter.
|
|
48
|
+
*/
|
|
49
|
+
export declare const FILTER_OPS: readonly ["eq", "noteq", "gt", "gte", "lt", "lte", "beginsWith", "endsWith", "contains", "exist", "notExist", "in", "notIn"];
|
|
50
|
+
/**
|
|
51
|
+
* The pre-dispatch filter-shape gate (#18): accepts the two top-level shapes the pinned SDK
|
|
52
|
+
* understands — a conditions array, or a params bag whose `filter` field is a conditions array
|
|
53
|
+
* — and refuses everything else (a bare condition/group object, a string, a number, ...) with
|
|
54
|
+
* the typed CONFIG_ERROR BEFORE any request is built (zero wire). node-autotask before 0.9.0
|
|
55
|
+
* silently DROPPED a bare object's conditions, so an unrefused bare object queried UNFILTERED;
|
|
56
|
+
* 0.9.0 refuses it too (#83), and this server's refusal stays the zero-wire pre-request
|
|
57
|
+
* guarantee. The `filter` key is optional in `QUERY_INPUT` (#241): the query handler refuses a
|
|
58
|
+
* missing or empty one (INPUT_INVALID) before this validator runs; the `undefined` early return
|
|
59
|
+
* serves autotask_read, whose `<resource>.query` params bag may omit it.
|
|
60
|
+
*/
|
|
61
|
+
export declare function assertFilterShape(filter: unknown, operation: string): void;
|
|
62
|
+
/** A registered input: the StandardSchema the SDK sees, the zod object the frame parses, the key set. */
|
|
63
|
+
export interface ClosedInput {
|
|
64
|
+
input: StandardSchemaWithJSON<Record<string, unknown>, Record<string, unknown>>;
|
|
65
|
+
schema: z.ZodType;
|
|
66
|
+
validKeys: readonly string[];
|
|
67
|
+
/** The raw top-level keys to drop before the closed-key check (none for most tools). */
|
|
68
|
+
ignored: (raw: Record<string, unknown>) => readonly string[];
|
|
69
|
+
/** Server prose appended to a refusal of the parse (a fixed pointer, never vendor text), or undefined. */
|
|
70
|
+
hint?: (raw: Record<string, unknown>) => string | undefined;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Wrap a zod object schema so its top level is CLOSED and the SDK never rejects it:
|
|
74
|
+
* - the ADVERTISED wire schema is the object's JSON Schema with `additionalProperties: false`;
|
|
75
|
+
* - `validate` returns the raw arguments unchanged — the call frame runs the closed-key check and
|
|
76
|
+
* the zod parse, so every refusal is an envelope (M1), never the SDK's plain-text error.
|
|
77
|
+
* `ignored(raw)` names raw keys dropped before the closed-key check (never advertised, never named
|
|
78
|
+
* as valid keys).
|
|
79
|
+
*/
|
|
80
|
+
export declare function closedInput(schema: z.ZodType, ignored?: ClosedInput['ignored'], hint?: ClosedInput['hint']): ClosedInput;
|
|
81
|
+
/** The envelope's runtime contract (code and tests, never advertised per tool). */
|
|
82
|
+
export declare const ENVELOPE: z.ZodObject<{
|
|
83
|
+
status: z.ZodEnum<{
|
|
84
|
+
error: "error";
|
|
85
|
+
ok: "ok";
|
|
86
|
+
needs_input: "needs_input";
|
|
87
|
+
ambiguous: "ambiguous";
|
|
88
|
+
denied: "denied";
|
|
89
|
+
}>;
|
|
90
|
+
data: z.ZodUnknown;
|
|
91
|
+
next: z.ZodOptional<z.ZodEnum<{
|
|
92
|
+
proceed: "proceed";
|
|
93
|
+
supply_input: "supply_input";
|
|
94
|
+
choose_candidate: "choose_candidate";
|
|
95
|
+
repreview: "repreview";
|
|
96
|
+
manual_action: "manual_action";
|
|
97
|
+
poll_task: "poll_task";
|
|
98
|
+
verify_then_repreview: "verify_then_repreview";
|
|
99
|
+
retry: "retry";
|
|
100
|
+
stop: "stop";
|
|
101
|
+
}>>;
|
|
102
|
+
reasons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
103
|
+
code: z.ZodEnum<{
|
|
104
|
+
INPUT_INVALID: "INPUT_INVALID";
|
|
105
|
+
TARGET_NOT_FOUND: "TARGET_NOT_FOUND";
|
|
106
|
+
AMBIGUOUS_MATCH: "AMBIGUOUS_MATCH";
|
|
107
|
+
RESULT_TRUNCATED: "RESULT_TRUNCATED";
|
|
108
|
+
POLICY_DENIED: "POLICY_DENIED";
|
|
109
|
+
HOST_POLICY_DENIED: "HOST_POLICY_DENIED";
|
|
110
|
+
CREDENTIAL_MISSING: "CREDENTIAL_MISSING";
|
|
111
|
+
CREDENTIAL_MALFORMED: "CREDENTIAL_MALFORMED";
|
|
112
|
+
UNAUTHORIZED: "UNAUTHORIZED";
|
|
113
|
+
RATE_LIMITED: "RATE_LIMITED";
|
|
114
|
+
MAINTENANCE_ACTIVE: "MAINTENANCE_ACTIVE";
|
|
115
|
+
ABORTED: "ABORTED";
|
|
116
|
+
UPSTREAM_ERROR: "UPSTREAM_ERROR";
|
|
117
|
+
INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
118
|
+
BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
|
|
119
|
+
INPUT_MISSING: "INPUT_MISSING";
|
|
120
|
+
SCOPE_REQUIRED: "SCOPE_REQUIRED";
|
|
121
|
+
OP_NOT_ALLOWED: "OP_NOT_ALLOWED";
|
|
122
|
+
TARGET_NOT_IN_SCOPE: "TARGET_NOT_IN_SCOPE";
|
|
123
|
+
MOVE_REFUSED: "MOVE_REFUSED";
|
|
124
|
+
LIMIT_RATE: "LIMIT_RATE";
|
|
125
|
+
DUPLICATE_EXISTS: "DUPLICATE_EXISTS";
|
|
126
|
+
COOLDOWN_ACTIVE: "COOLDOWN_ACTIVE";
|
|
127
|
+
KILL_SWITCH: "KILL_SWITCH";
|
|
128
|
+
STATE_UNAVAILABLE: "STATE_UNAVAILABLE";
|
|
129
|
+
GATE_UNSUPPORTED: "GATE_UNSUPPORTED";
|
|
130
|
+
GATE_DECLINED: "GATE_DECLINED";
|
|
131
|
+
PLAN_NOT_FOUND: "PLAN_NOT_FOUND";
|
|
132
|
+
PLAN_EXPIRED: "PLAN_EXPIRED";
|
|
133
|
+
PLAN_MISMATCH: "PLAN_MISMATCH";
|
|
134
|
+
PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
|
|
135
|
+
STATE_DRIFT: "STATE_DRIFT";
|
|
136
|
+
WRITE_FAILED: "WRITE_FAILED";
|
|
137
|
+
FIELD_NOT_PERSISTED: "FIELD_NOT_PERSISTED";
|
|
138
|
+
WRITE_OUTCOME_UNKNOWN: "WRITE_OUTCOME_UNKNOWN";
|
|
139
|
+
}>;
|
|
140
|
+
field: z.ZodOptional<z.ZodString>;
|
|
141
|
+
detail: z.ZodString;
|
|
142
|
+
}, z.core.$strip>>>;
|
|
143
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
144
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
145
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
146
|
+
textCapped: z.ZodOptional<z.ZodLiteral<true>>;
|
|
147
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
148
|
+
planHash: z.ZodOptional<z.ZodString>;
|
|
149
|
+
replayed: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
+
missing: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
151
|
+
candidates: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
152
|
+
}, z.core.$loose>;
|
|
153
|
+
export declare const GUIDE_INPUT: z.ZodObject<{
|
|
154
|
+
skill: z.ZodOptional<z.ZodString>;
|
|
155
|
+
section: z.ZodOptional<z.ZodString>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export declare const CATALOG_INPUT: z.ZodObject<{
|
|
158
|
+
q: z.ZodOptional<z.ZodString>;
|
|
159
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
160
|
+
effect: z.ZodOptional<z.ZodEnum<{
|
|
161
|
+
read: "read";
|
|
162
|
+
write: "write";
|
|
163
|
+
destructive: "destructive";
|
|
164
|
+
}>>;
|
|
165
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
166
|
+
core: "core";
|
|
167
|
+
extended: "extended";
|
|
168
|
+
advanced: "advanced";
|
|
169
|
+
}>>;
|
|
170
|
+
compact: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
show_refused: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
include_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
174
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
export declare const DESCRIBE_INPUT: z.ZodObject<{
|
|
177
|
+
operation: z.ZodOptional<z.ZodString>;
|
|
178
|
+
summary: z.ZodOptional<z.ZodBoolean>;
|
|
179
|
+
full: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
export declare const READ_MAX_ITEMS = 10;
|
|
183
|
+
/**
|
|
184
|
+
* 0.15.0: autotask_read carries no operation-specific inputs. The six flat window inputs of 0.14.x
|
|
185
|
+
* are gone from the served schema (a form-filling client fills every optional it is shown, e.g. a
|
|
186
|
+
* stray limit: 5 on a resources.query), but a client still holding the 0.14.x tool list may send
|
|
187
|
+
* them. On any other read they are dropped (they never meant anything there). Beside a window key
|
|
188
|
+
* (top level or in items) a set one is NOT dropped, so the closed-key check refuses it naming the
|
|
189
|
+
* key: dropping a resourceID or ticketID there would silently widen the window. null or '' is unset.
|
|
190
|
+
* ponytail: drop this list once no 0.14.x tool list can be cached (a later minor).
|
|
191
|
+
*/
|
|
192
|
+
export declare const READ_RETIRED_KEYS: readonly ["from", "to", "posted", "limit", "ticketID", "resourceID"];
|
|
193
|
+
export declare function readIgnoredKeys(raw: Record<string, unknown>): readonly string[];
|
|
194
|
+
export declare const READ_INPUT: z.ZodPipe<z.ZodObject<{
|
|
195
|
+
operation: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
|
|
196
|
+
args: z.ZodPreprocess<z.ZodDefault<z.ZodArray<z.ZodUnknown>>, unknown>;
|
|
197
|
+
items: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
198
|
+
operation: z.ZodString;
|
|
199
|
+
args: z.ZodDefault<z.ZodArray<z.ZodUnknown>>;
|
|
200
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
201
|
+
operation: string;
|
|
202
|
+
args: unknown[];
|
|
203
|
+
}, {
|
|
204
|
+
operation: string;
|
|
205
|
+
args: unknown[];
|
|
206
|
+
}>>>>, unknown>;
|
|
207
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
208
|
+
args: unknown[];
|
|
209
|
+
operation?: string | undefined;
|
|
210
|
+
items?: {
|
|
211
|
+
operation: string;
|
|
212
|
+
args: unknown[];
|
|
213
|
+
}[] | undefined;
|
|
214
|
+
}, {
|
|
215
|
+
args: unknown[];
|
|
216
|
+
operation?: string | undefined;
|
|
217
|
+
items?: {
|
|
218
|
+
operation: string;
|
|
219
|
+
args: unknown[];
|
|
220
|
+
}[] | undefined;
|
|
221
|
+
}>>;
|
|
222
|
+
export declare const RESOLVE_INPUT: z.ZodObject<{
|
|
223
|
+
identifier: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
224
|
+
resource: z.ZodOptional<z.ZodEnum<{
|
|
225
|
+
companies: "companies";
|
|
226
|
+
tickets: "tickets";
|
|
227
|
+
contacts: "contacts";
|
|
228
|
+
configuration_items: "configuration_items";
|
|
229
|
+
projects: "projects";
|
|
230
|
+
resources: "resources";
|
|
231
|
+
}>>;
|
|
232
|
+
resources: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
233
|
+
companies: "companies";
|
|
234
|
+
tickets: "tickets";
|
|
235
|
+
contacts: "contacts";
|
|
236
|
+
configuration_items: "configuration_items";
|
|
237
|
+
projects: "projects";
|
|
238
|
+
}>>>;
|
|
239
|
+
by: z.ZodDefault<z.ZodEnum<{
|
|
240
|
+
email: "email";
|
|
241
|
+
id_or_name: "id_or_name";
|
|
242
|
+
ticket_number: "ticket_number";
|
|
243
|
+
serial: "serial";
|
|
244
|
+
}>>;
|
|
245
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
246
|
+
exact: "exact";
|
|
247
|
+
auto: "auto";
|
|
248
|
+
contains: "contains";
|
|
249
|
+
}>>;
|
|
250
|
+
company_id: z.ZodOptional<z.ZodNumber>;
|
|
251
|
+
expand: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"full">]>>;
|
|
252
|
+
include_family: z.ZodDefault<z.ZodBoolean>;
|
|
253
|
+
include_api_users: z.ZodDefault<z.ZodBoolean>;
|
|
254
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
export declare const QUERY_INPUT: z.ZodObject<{
|
|
257
|
+
resource: z.ZodString;
|
|
258
|
+
filter: z.ZodOptional<z.ZodUnknown>;
|
|
259
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
group_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
261
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
262
|
+
count: z.ZodOptional<z.ZodBoolean>;
|
|
263
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
264
|
+
include_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
265
|
+
latest: z.ZodOptional<z.ZodNumber>;
|
|
266
|
+
note_chars: z.ZodOptional<z.ZodNumber>;
|
|
267
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
268
|
+
json: "json";
|
|
269
|
+
tsv: "tsv";
|
|
270
|
+
}>>;
|
|
271
|
+
acknowledge_unscoped: z.ZodOptional<z.ZodBoolean>;
|
|
272
|
+
output_path: z.ZodOptional<z.ZodString>;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
export declare const TENANT_STATUS_PARTS: readonly ["identity", "version", "thresholds", "server", "time"];
|
|
275
|
+
export declare const TENANT_STATUS_INPUT: z.ZodObject<{
|
|
276
|
+
parts: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
277
|
+
time: "time";
|
|
278
|
+
server: "server";
|
|
279
|
+
identity: "identity";
|
|
280
|
+
version: "version";
|
|
281
|
+
thresholds: "thresholds";
|
|
282
|
+
}>>>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
export declare const TICKET_FULL_CONTEXT_INPUT: z.ZodObject<{
|
|
285
|
+
names: z.ZodDefault<z.ZodBoolean>;
|
|
286
|
+
max_name_reads: z.ZodOptional<z.ZodNumber>;
|
|
287
|
+
id: z.ZodNumber;
|
|
288
|
+
note_limit: z.ZodOptional<z.ZodNumber>;
|
|
289
|
+
time_entry_limit: z.ZodOptional<z.ZodNumber>;
|
|
290
|
+
include_attachments: z.ZodOptional<z.ZodBoolean>;
|
|
291
|
+
include_histories: z.ZodDefault<z.ZodBoolean>;
|
|
292
|
+
text_limit: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
export declare const COMPANY_FULL_PROFILE_INPUT: z.ZodObject<{
|
|
295
|
+
names: z.ZodDefault<z.ZodBoolean>;
|
|
296
|
+
max_name_reads: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
id: z.ZodNumber;
|
|
298
|
+
fields: z.ZodOptional<z.ZodObject<{
|
|
299
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
300
|
+
contacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
301
|
+
notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
302
|
+
projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
303
|
+
openTickets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
304
|
+
}, z.core.$strict>>;
|
|
305
|
+
location_limit: z.ZodOptional<z.ZodNumber>;
|
|
306
|
+
contact_limit: z.ZodOptional<z.ZodNumber>;
|
|
307
|
+
note_limit: z.ZodOptional<z.ZodNumber>;
|
|
308
|
+
ticket_limit: z.ZodOptional<z.ZodNumber>;
|
|
309
|
+
project_limit: z.ZodOptional<z.ZodNumber>;
|
|
310
|
+
}, z.core.$strip>;
|
|
311
|
+
export declare const REVENUE_ROLLUP_INPUT: z.ZodObject<{
|
|
312
|
+
companyIDs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
313
|
+
ownerResourceID: z.ZodOptional<z.ZodNumber>;
|
|
314
|
+
contractIDs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
315
|
+
tenantWide: z.ZodOptional<z.ZodLiteral<true>>;
|
|
316
|
+
dateFrom: z.ZodOptional<z.ZodString>;
|
|
317
|
+
dateTo: z.ZodOptional<z.ZodString>;
|
|
318
|
+
lastFullMonths: z.ZodOptional<z.ZodNumber>;
|
|
319
|
+
contractTypes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
320
|
+
contractCategories: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
321
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
322
|
+
month: "month";
|
|
323
|
+
vertical: "vertical";
|
|
324
|
+
contractType: "contractType";
|
|
325
|
+
company: "company";
|
|
326
|
+
contract: "contract";
|
|
327
|
+
lineOfBusiness: "lineOfBusiness";
|
|
328
|
+
}>>>;
|
|
329
|
+
includeNonChargeable: z.ZodOptional<z.ZodBoolean>;
|
|
330
|
+
maxVendorCalls: z.ZodOptional<z.ZodNumber>;
|
|
331
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
}, z.core.$strip>;
|
|
333
|
+
export declare const PORTFOLIO_MARGIN_INPUT: z.ZodObject<{
|
|
334
|
+
contractIDs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
335
|
+
companyIDs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
336
|
+
tenantWide: z.ZodOptional<z.ZodLiteral<true>>;
|
|
337
|
+
dateFrom: z.ZodOptional<z.ZodString>;
|
|
338
|
+
dateTo: z.ZodOptional<z.ZodString>;
|
|
339
|
+
lastFullMonths: z.ZodOptional<z.ZodNumber>;
|
|
340
|
+
contractTypes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
341
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
342
|
+
month: "month";
|
|
343
|
+
vertical: "vertical";
|
|
344
|
+
contractType: "contractType";
|
|
345
|
+
company: "company";
|
|
346
|
+
contract: "contract";
|
|
347
|
+
}>>>;
|
|
348
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
labourCostMethod: z.ZodOptional<z.ZodEnum<{
|
|
350
|
+
billing_item_our_cost: "billing_item_our_cost";
|
|
351
|
+
contract_role_cost: "contract_role_cost";
|
|
352
|
+
resource_internal_cost: "resource_internal_cost";
|
|
353
|
+
provided: "provided";
|
|
354
|
+
}>>;
|
|
355
|
+
labourRatePerHour: z.ZodOptional<z.ZodNumber>;
|
|
356
|
+
maxVendorCalls: z.ZodOptional<z.ZodNumber>;
|
|
357
|
+
}, z.core.$strip>;
|
|
358
|
+
export declare const RECURRING_REVENUE_INPUT: z.ZodObject<{
|
|
359
|
+
companyIDs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
360
|
+
tenantWide: z.ZodOptional<z.ZodLiteral<true>>;
|
|
361
|
+
asOf: z.ZodOptional<z.ZodString>;
|
|
362
|
+
expiringWithinDays: z.ZodOptional<z.ZodNumber>;
|
|
363
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
364
|
+
maxVendorCalls: z.ZodOptional<z.ZodNumber>;
|
|
365
|
+
}, z.core.$strip>;
|
|
366
|
+
export declare const AR_AGING_INPUT: z.ZodObject<{
|
|
367
|
+
companyIDs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
368
|
+
tenantWide: z.ZodOptional<z.ZodLiteral<true>>;
|
|
369
|
+
asOf: z.ZodOptional<z.ZodString>;
|
|
370
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
371
|
+
maxVendorCalls: z.ZodOptional<z.ZodNumber>;
|
|
372
|
+
}, z.core.$strip>;
|
|
373
|
+
export declare const WIP_HOURS_INPUT: z.ZodObject<{
|
|
374
|
+
companyIDs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
375
|
+
tenantWide: z.ZodOptional<z.ZodLiteral<true>>;
|
|
376
|
+
dateFrom: z.ZodOptional<z.ZodString>;
|
|
377
|
+
dateTo: z.ZodOptional<z.ZodString>;
|
|
378
|
+
groupBy: z.ZodOptional<z.ZodEnum<{
|
|
379
|
+
resource: "resource";
|
|
380
|
+
contractType: "contractType";
|
|
381
|
+
company: "company";
|
|
382
|
+
}>>;
|
|
383
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
384
|
+
maxVendorCalls: z.ZodOptional<z.ZodNumber>;
|
|
385
|
+
}, z.core.$strip>;
|
|
386
|
+
export declare const NON_CHARGEABLE_WORK_INPUT: z.ZodObject<{
|
|
387
|
+
companyIDs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
388
|
+
tenantWide: z.ZodOptional<z.ZodLiteral<true>>;
|
|
389
|
+
dateFrom: z.ZodOptional<z.ZodString>;
|
|
390
|
+
dateTo: z.ZodOptional<z.ZodString>;
|
|
391
|
+
groupBy: z.ZodOptional<z.ZodEnum<{
|
|
392
|
+
contractType: "contractType";
|
|
393
|
+
company: "company";
|
|
394
|
+
contract: "contract";
|
|
395
|
+
}>>;
|
|
396
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
397
|
+
maxVendorCalls: z.ZodOptional<z.ZodNumber>;
|
|
398
|
+
}, z.core.$strip>;
|
|
399
|
+
export declare const PROJECT_GET_CONTEXT_INPUT: z.ZodObject<{
|
|
400
|
+
names: z.ZodDefault<z.ZodBoolean>;
|
|
401
|
+
max_name_reads: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
id: z.ZodNumber;
|
|
403
|
+
}, z.core.$strip>;
|
|
404
|
+
export declare const SERVICE_CALL_FULL_PROFILE_INPUT: z.ZodObject<{
|
|
405
|
+
id: z.ZodNumber;
|
|
406
|
+
ticket_limit: z.ZodDefault<z.ZodNumber>;
|
|
407
|
+
task_limit: z.ZodDefault<z.ZodNumber>;
|
|
408
|
+
}, z.core.$strip>;
|
|
409
|
+
export declare const RESOURCE_WORKLOAD_INPUT: z.ZodObject<{
|
|
410
|
+
id: z.ZodNumber;
|
|
411
|
+
ticket_limit: z.ZodDefault<z.ZodNumber>;
|
|
412
|
+
task_limit: z.ZodDefault<z.ZodNumber>;
|
|
413
|
+
time_off_limit: z.ZodDefault<z.ZodNumber>;
|
|
414
|
+
}, z.core.$strip>;
|
|
415
|
+
export declare const CONTACT_FULL_PROFILE_INPUT: z.ZodObject<{
|
|
416
|
+
id: z.ZodNumber;
|
|
417
|
+
ticket_limit: z.ZodDefault<z.ZodNumber>;
|
|
418
|
+
}, z.core.$strip>;
|
|
419
|
+
export declare const CONFIGURATION_ITEM_PROFILE_INPUT: z.ZodObject<{
|
|
420
|
+
names: z.ZodDefault<z.ZodBoolean>;
|
|
421
|
+
max_name_reads: z.ZodOptional<z.ZodNumber>;
|
|
422
|
+
id: z.ZodNumber;
|
|
423
|
+
note_limit: z.ZodOptional<z.ZodNumber>;
|
|
424
|
+
related_limit: z.ZodOptional<z.ZodNumber>;
|
|
425
|
+
}, z.core.$strip>;
|
|
426
|
+
export declare const CONTRACT_FULL_PROFILE_INPUT: z.ZodObject<{
|
|
427
|
+
id: z.ZodNumber;
|
|
428
|
+
service_limit: z.ZodDefault<z.ZodNumber>;
|
|
429
|
+
billing_rule_limit: z.ZodDefault<z.ZodNumber>;
|
|
430
|
+
}, z.core.$strip>;
|
|
431
|
+
export declare const QUOTE_GET_INPUT: z.ZodObject<{
|
|
432
|
+
id: z.ZodNumber;
|
|
433
|
+
item_limit: z.ZodDefault<z.ZodNumber>;
|
|
434
|
+
}, z.core.$strip>;
|
|
435
|
+
export declare const INVOICE_GET_INPUT: z.ZodObject<{
|
|
436
|
+
id: z.ZodNumber;
|
|
437
|
+
format: z.ZodDefault<z.ZodEnum<{
|
|
438
|
+
record: "record";
|
|
439
|
+
html: "html";
|
|
440
|
+
xml: "xml";
|
|
441
|
+
pdf: "pdf";
|
|
442
|
+
}>>;
|
|
443
|
+
output_path: z.ZodOptional<z.ZodString>;
|
|
444
|
+
}, z.core.$strip>;
|
|
445
|
+
export declare const WRITE_INPUT: z.ZodObject<{
|
|
446
|
+
operation: z.ZodString;
|
|
447
|
+
args: z.ZodDefault<z.ZodArray<z.ZodUnknown>>;
|
|
448
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
449
|
+
}, z.core.$strip>;
|
|
450
|
+
export declare const PLAN_HANDLE: RegExp;
|
|
451
|
+
export declare const APPLY_INPUT: z.ZodObject<{
|
|
452
|
+
plan: z.ZodString;
|
|
453
|
+
operation: z.ZodString;
|
|
454
|
+
targets: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
455
|
+
summary: z.ZodString;
|
|
456
|
+
}, z.core.$strip>;
|
|
457
|
+
/**
|
|
458
|
+
* What the apply frame parses: the plan handle as advertised, the three echoes as any value. A missing or
|
|
459
|
+
* wrong-typed echo is a mismatch with the stored plan, so `autotask_apply` refuses it PLAN_MISMATCH (audited)
|
|
460
|
+
* instead of the boundary's unaudited INPUT_INVALID; the advertised schema still requires all three.
|
|
461
|
+
*/
|
|
462
|
+
export declare const APPLY_PARSE: z.ZodObject<{
|
|
463
|
+
plan: z.ZodString;
|
|
464
|
+
operation: z.ZodOptional<z.ZodUnknown>;
|
|
465
|
+
targets: z.ZodOptional<z.ZodUnknown>;
|
|
466
|
+
summary: z.ZodOptional<z.ZodUnknown>;
|
|
467
|
+
}, z.core.$strip>;
|