node-autotask 0.23.0 → 0.25.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 +33 -0
- package/MCP_TOOL_CATALOG.json +29 -8
- package/MCP_TOOL_MANIFEST.md +15 -14
- package/N8N_MCP_MANIFEST.json +48 -9
- package/N8N_MCP_MANIFEST.md +8 -7
- package/README.md +2 -2
- package/capabilities.json +1901 -1715
- package/dist/capabilities.cjs +2 -2
- package/dist/capabilities.d.cts +4 -1
- package/dist/capabilities.d.ts +4 -1
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-D5TVBI4U.cjs → chunk-2H7YI54B.cjs} +28 -3
- package/dist/{chunk-PVUUOM5G.js → chunk-6PIJ6AZG.js} +167 -57
- package/dist/{chunk-OGNUI3UR.js → chunk-EFR2XWRX.js} +1900 -1714
- package/dist/{chunk-TTQB537V.cjs → chunk-FKJ77K6Z.cjs} +135 -135
- package/dist/{chunk-B5SNZ3TZ.js → chunk-VUGZKP33.js} +27 -2
- package/dist/{chunk-JUO3URUI.cjs → chunk-WBMRACCV.cjs} +1900 -1714
- package/dist/{chunk-VYFO2N5F.js → chunk-XUB3S6AM.js} +2 -2
- package/dist/{chunk-N27NUB4R.cjs → chunk-Z5L7Q33V.cjs} +627 -517
- package/dist/{index-NC-x-bYl.d.cts → index-C0OwQhon.d.cts} +55 -4
- package/dist/{index-DBoX-Dnk.d.ts → index-CZ94y401.d.ts} +55 -4
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/operations/index.cjs +147 -108
- package/dist/operations/index.d.cts +17 -7
- package/dist/operations/index.d.ts +17 -7
- package/dist/operations/index.js +42 -3
- 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 +1 -1
- package/dist/resources/index.d.ts +1 -1
- package/dist/resources/index.js +3 -3
- package/docs/API.md +49 -11
- package/package.json +1 -1
package/dist/capabilities.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkWBMRACCVcjs = require('./chunk-WBMRACCV.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.CAPABILITIES =
|
|
10
|
+
exports.CAPABILITIES = _chunkWBMRACCVcjs.CAPABILITIES; exports.CAPABILITY_GROUPS = _chunkWBMRACCVcjs.CAPABILITY_GROUPS; exports.CAPABILITY_PLAN_HASHES = _chunkWBMRACCVcjs.CAPABILITY_PLAN_HASHES;
|
package/dist/capabilities.d.cts
CHANGED
|
@@ -41,7 +41,10 @@ interface CapabilityRecord {
|
|
|
41
41
|
flags: string[];
|
|
42
42
|
dryRun: boolean;
|
|
43
43
|
envelope: string | null;
|
|
44
|
-
/** The per-arg positional shape (§4.1)
|
|
44
|
+
/** The per-arg positional shape (§4.1). KEY ORDER IS THE POSITIONAL ORDER:
|
|
45
|
+
* the Nth key is the Nth positional argument of the typed method (invoke
|
|
46
|
+
* maps a named-object call onto the array by it) — never reorder keys.
|
|
47
|
+
* Derived from the signature-audited
|
|
45
48
|
* classifier (scripts/lib/args-derive.mjs 'deriveArgSchemas'): the trailing
|
|
46
49
|
* governed write bag is excluded (invoke appends it); read helpers'
|
|
47
50
|
* optional bags are declared. The invoke dispatch validates against it. */
|
package/dist/capabilities.d.ts
CHANGED
|
@@ -41,7 +41,10 @@ interface CapabilityRecord {
|
|
|
41
41
|
flags: string[];
|
|
42
42
|
dryRun: boolean;
|
|
43
43
|
envelope: string | null;
|
|
44
|
-
/** The per-arg positional shape (§4.1)
|
|
44
|
+
/** The per-arg positional shape (§4.1). KEY ORDER IS THE POSITIONAL ORDER:
|
|
45
|
+
* the Nth key is the Nth positional argument of the typed method (invoke
|
|
46
|
+
* maps a named-object call onto the array by it) — never reorder keys.
|
|
47
|
+
* Derived from the signature-audited
|
|
45
48
|
* classifier (scripts/lib/args-derive.mjs 'deriveArgSchemas'): the trailing
|
|
46
49
|
* governed write bag is excluded (invoke appends it); read helpers'
|
|
47
50
|
* optional bags are declared. The invoke dispatch validates against it. */
|
package/dist/capabilities.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkWBMRACCVcjs = require('./chunk-WBMRACCV.cjs');
|
|
4
4
|
|
|
5
5
|
// src/auth.ts
|
|
6
6
|
var AUTH_HEADERS = {
|
|
@@ -16300,7 +16300,7 @@ function capabilitySets() {
|
|
|
16300
16300
|
const fieldOps = /* @__PURE__ */ new Map();
|
|
16301
16301
|
const udfOps = /* @__PURE__ */ new Map();
|
|
16302
16302
|
const resources = /* @__PURE__ */ new Set();
|
|
16303
|
-
for (const rec of
|
|
16303
|
+
for (const rec of _chunkWBMRACCVcjs.CAPABILITIES) {
|
|
16304
16304
|
if (rec.resource === "operations") continue;
|
|
16305
16305
|
resources.add(rec.resource);
|
|
16306
16306
|
if (rec.operation === "getFieldInfo") fieldOps.set(rec.resource, rec);
|
|
@@ -18490,7 +18490,32 @@ var MetaBase = class extends QueryBase {
|
|
|
18490
18490
|
const limit = opts.limit === void 0 ? 25 : clampPageSize(opts.limit);
|
|
18491
18491
|
const leaf = fields.map((field) => ({ field, op: "contains", value: text }));
|
|
18492
18492
|
const root = leaf.length === 1 ? leaf[0] : { op: "or", items: leaf };
|
|
18493
|
-
|
|
18493
|
+
for (const key of Object.keys(opts)) {
|
|
18494
|
+
if (key !== "limit" && key !== "companyID" && key !== "includeFields") {
|
|
18495
|
+
throw new AutotaskConfigError(`search: unknown opts key "${key}" \u2014 the bag is closed: limit, companyID, includeFields`);
|
|
18496
|
+
}
|
|
18497
|
+
}
|
|
18498
|
+
if (opts.companyID !== void 0 && !isIdentifierCandidate(opts.companyID)) {
|
|
18499
|
+
throw new AutotaskConfigError(`search: companyID must be a positive integer id (got ${String(opts.companyID)})`);
|
|
18500
|
+
}
|
|
18501
|
+
if (opts.includeFields !== void 0 && (!Array.isArray(opts.includeFields) || opts.includeFields.length === 0 || opts.includeFields.some((f) => typeof f !== "string" || f === ""))) {
|
|
18502
|
+
throw new AutotaskConfigError("search: includeFields must be a non-empty array of field names");
|
|
18503
|
+
}
|
|
18504
|
+
const companyID = opts.companyID === void 0 ? void 0 : Number(opts.companyID);
|
|
18505
|
+
const includeFields = opts.includeFields === void 0 ? void 0 : opts.includeFields.includes("id") ? opts.includeFields : ["id", ...opts.includeFields];
|
|
18506
|
+
const conditions = companyID === void 0 ? [root] : [{ field: "companyID", op: "eq", value: companyID }, root];
|
|
18507
|
+
const rows = await this.queryEntity(`${this.resourcePath}/query`, conditions, {
|
|
18508
|
+
maxRecords: limit,
|
|
18509
|
+
...includeFields !== void 0 ? { includeFields } : {}
|
|
18510
|
+
});
|
|
18511
|
+
if (includeFields === void 0 || includeFields.includes("userDefinedFields")) return rows;
|
|
18512
|
+
return rows.map((row) => {
|
|
18513
|
+
const r = row;
|
|
18514
|
+
if (!Array.isArray(r.userDefinedFields) || r.userDefinedFields.length > 0) return row;
|
|
18515
|
+
const rest = { ...r };
|
|
18516
|
+
delete rest.userDefinedFields;
|
|
18517
|
+
return rest;
|
|
18518
|
+
});
|
|
18494
18519
|
}
|
|
18495
18520
|
};
|
|
18496
18521
|
|
|
@@ -38,10 +38,10 @@ import {
|
|
|
38
38
|
unwrapItem,
|
|
39
39
|
unwrapItems,
|
|
40
40
|
unwrapOperation
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-VUGZKP33.js";
|
|
42
42
|
import {
|
|
43
43
|
CAPABILITIES
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-EFR2XWRX.js";
|
|
45
45
|
|
|
46
46
|
// src/resources/appointments.ts
|
|
47
47
|
var AppointmentsResource = class extends BaseResource {
|
|
@@ -168,7 +168,7 @@ var BillingCodesResource = class extends BaseResource {
|
|
|
168
168
|
/** Search BillingCode records: bounded contains on name (no vendor free-text search exists);
|
|
169
169
|
* limit defaults to 25, max 500. */
|
|
170
170
|
async search(query, opts) {
|
|
171
|
-
return this.searchBase(query, opts);
|
|
171
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
174
|
|
|
@@ -398,6 +398,14 @@ function dateWindowBounds(kind, now, tz) {
|
|
|
398
398
|
}
|
|
399
399
|
return { from: iso(from), to: iso(to) };
|
|
400
400
|
}
|
|
401
|
+
function dateOnlyWindowBounds(kind, now, tz) {
|
|
402
|
+
if (tz === void 0 || kind === "last24h") return dateWindowBounds(kind, now, tz);
|
|
403
|
+
const zone = validateZone(tz);
|
|
404
|
+
const { from, to } = dateWindowBounds(kind, now, zone);
|
|
405
|
+
const f = wallParts(zone, Date.parse(from));
|
|
406
|
+
const t = wallParts(zone, Date.parse(to));
|
|
407
|
+
return { from: iso(Date.UTC(f.y, f.m - 1, f.d)), to: iso(Date.UTC(t.y, t.m - 1, t.d) + DAY_MS - 1) };
|
|
408
|
+
}
|
|
401
409
|
async function dateWindowQuery(http, path, field, kind, limit, operation, now, tz) {
|
|
402
410
|
const zone = tz === void 0 ? void 0 : validateZone(tz, operation);
|
|
403
411
|
const { from, to } = dateWindowBounds(kind, now, zone);
|
|
@@ -716,7 +724,7 @@ var ChecklistLibrariesResource = class extends BaseResource {
|
|
|
716
724
|
/** Search ChecklistLibrary records: bounded contains on name (no vendor free-text search exists);
|
|
717
725
|
* limit defaults to 25, max 500. */
|
|
718
726
|
async search(query, opts) {
|
|
719
|
-
return this.searchBase(query, opts);
|
|
727
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
720
728
|
}
|
|
721
729
|
};
|
|
722
730
|
|
|
@@ -826,7 +834,7 @@ var ClassificationIconsResource = class extends BaseResource {
|
|
|
826
834
|
/** Search ClassificationIcon records: bounded contains on name (no vendor free-text search exists);
|
|
827
835
|
* limit defaults to 25, max 500. */
|
|
828
836
|
async search(query, opts) {
|
|
829
|
-
return this.searchBase(query, opts);
|
|
837
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
830
838
|
}
|
|
831
839
|
};
|
|
832
840
|
|
|
@@ -2016,7 +2024,7 @@ var CompanyLocationsResource = class extends BaseResource {
|
|
|
2016
2024
|
/** Search CompanyLocation records: bounded contains on name (no vendor free-text search exists);
|
|
2017
2025
|
* limit defaults to 25, max 500. */
|
|
2018
2026
|
async search(query, opts) {
|
|
2019
|
-
return this.searchBase(query, opts);
|
|
2027
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
2020
2028
|
}
|
|
2021
2029
|
};
|
|
2022
2030
|
|
|
@@ -2081,7 +2089,7 @@ var CompanyNotesResource = class extends BaseResource {
|
|
|
2081
2089
|
/** Search CompanyNote records: bounded contains on name (no vendor free-text search exists);
|
|
2082
2090
|
* limit defaults to 25, max 500. */
|
|
2083
2091
|
async search(query, opts) {
|
|
2084
|
-
return this.searchBase(query, opts);
|
|
2092
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
2085
2093
|
}
|
|
2086
2094
|
};
|
|
2087
2095
|
|
|
@@ -2208,7 +2216,7 @@ var CompanyWebhooksResource = class extends BaseResource {
|
|
|
2208
2216
|
/** Search CompanyWebhook records: bounded contains on name (no vendor free-text search exists);
|
|
2209
2217
|
* limit defaults to 25, max 500. */
|
|
2210
2218
|
async search(query, opts) {
|
|
2211
|
-
return this.searchBase(query, opts);
|
|
2219
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
2212
2220
|
}
|
|
2213
2221
|
};
|
|
2214
2222
|
|
|
@@ -2341,7 +2349,7 @@ var ConfigurationItemCategoriesResource = class extends BaseResource {
|
|
|
2341
2349
|
/** Search ConfigurationItemCategory records: bounded contains on name (no vendor free-text search exists);
|
|
2342
2350
|
* limit defaults to 25, max 500. */
|
|
2343
2351
|
async search(query, opts) {
|
|
2344
|
-
return this.searchBase(query, opts);
|
|
2352
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
2345
2353
|
}
|
|
2346
2354
|
};
|
|
2347
2355
|
|
|
@@ -2806,7 +2814,7 @@ var ConfigurationItemsResource = class extends BaseResource {
|
|
|
2806
2814
|
/** Search ConfigurationItem records: bounded contains on referenceTitle (no vendor free-text search exists);
|
|
2807
2815
|
* limit defaults to 25, max 500. */
|
|
2808
2816
|
async search(query, opts) {
|
|
2809
|
-
return this.searchBase(query, opts);
|
|
2817
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
2810
2818
|
}
|
|
2811
2819
|
/** Get the ConfigurationItem with its primary context records in one call (each part a single-record
|
|
2812
2820
|
* fetch; no sub-lists; absent/dangling references come back null). */
|
|
@@ -2887,7 +2895,7 @@ var ConfigurationItemSslSubjectAlternativeNamesResource = class extends BaseReso
|
|
|
2887
2895
|
/** Search ConfigurationItemSslSubjectAlternativeName records: bounded contains on name (no vendor free-text search exists);
|
|
2888
2896
|
* limit defaults to 25, max 500. */
|
|
2889
2897
|
async search(query, opts) {
|
|
2890
|
-
return this.searchBase(query, opts);
|
|
2898
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
2891
2899
|
}
|
|
2892
2900
|
};
|
|
2893
2901
|
|
|
@@ -2961,7 +2969,7 @@ var ConfigurationItemTypesResource = class extends BaseResource {
|
|
|
2961
2969
|
/** Search ConfigurationItemType records: bounded contains on name (no vendor free-text search exists);
|
|
2962
2970
|
* limit defaults to 25, max 500. */
|
|
2963
2971
|
async search(query, opts) {
|
|
2964
|
-
return this.searchBase(query, opts);
|
|
2972
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
2965
2973
|
}
|
|
2966
2974
|
};
|
|
2967
2975
|
|
|
@@ -3037,7 +3045,7 @@ var ConfigurationItemWebhooksResource = class extends BaseResource {
|
|
|
3037
3045
|
/** Search ConfigurationItemWebhook records: bounded contains on name (no vendor free-text search exists);
|
|
3038
3046
|
* limit defaults to 25, max 500. */
|
|
3039
3047
|
async search(query, opts) {
|
|
3040
|
-
return this.searchBase(query, opts);
|
|
3048
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
3041
3049
|
}
|
|
3042
3050
|
};
|
|
3043
3051
|
|
|
@@ -3165,7 +3173,7 @@ var ContactGroupsResource = class extends BaseResource {
|
|
|
3165
3173
|
/** Search ContactGroups records: bounded contains on name (no vendor free-text search exists);
|
|
3166
3174
|
* limit defaults to 25, max 500. */
|
|
3167
3175
|
async search(query, opts) {
|
|
3168
|
-
return this.searchBase(query, opts);
|
|
3176
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
3169
3177
|
}
|
|
3170
3178
|
};
|
|
3171
3179
|
|
|
@@ -3489,7 +3497,7 @@ var ContactsResource = class extends BaseResource {
|
|
|
3489
3497
|
/** Search Contact records: bounded contains on firstName + lastName (no vendor free-text search exists);
|
|
3490
3498
|
* limit defaults to 25, max 500. */
|
|
3491
3499
|
async search(query, opts) {
|
|
3492
|
-
return this.searchBase(query, opts);
|
|
3500
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
3493
3501
|
}
|
|
3494
3502
|
/** Get the Contact with its primary context records in one call (each part a single-record
|
|
3495
3503
|
* fetch; no sub-lists; absent/dangling references come back null). */
|
|
@@ -3581,7 +3589,7 @@ var ContactWebhooksResource = class extends BaseResource {
|
|
|
3581
3589
|
/** Search ContactWebhook records: bounded contains on name (no vendor free-text search exists);
|
|
3582
3590
|
* limit defaults to 25, max 500. */
|
|
3583
3591
|
async search(query, opts) {
|
|
3584
|
-
return this.searchBase(query, opts);
|
|
3592
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
3585
3593
|
}
|
|
3586
3594
|
};
|
|
3587
3595
|
|
|
@@ -3836,7 +3844,7 @@ var ContractChargesResource = class extends BaseResource {
|
|
|
3836
3844
|
/** Search ContractCharge records: bounded contains on name (no vendor free-text search exists);
|
|
3837
3845
|
* limit defaults to 25, max 500. */
|
|
3838
3846
|
async search(query, opts) {
|
|
3839
|
-
return this.searchBase(query, opts);
|
|
3847
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
3840
3848
|
}
|
|
3841
3849
|
};
|
|
3842
3850
|
|
|
@@ -4138,7 +4146,7 @@ var ContractExclusionSetsResource = class extends BaseResource {
|
|
|
4138
4146
|
/** Search ContractExclusionSets records: bounded contains on name (no vendor free-text search exists);
|
|
4139
4147
|
* limit defaults to 25, max 500. */
|
|
4140
4148
|
async search(query, opts) {
|
|
4141
|
-
return this.searchBase(query, opts);
|
|
4149
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
4142
4150
|
}
|
|
4143
4151
|
};
|
|
4144
4152
|
|
|
@@ -5176,7 +5184,7 @@ function appendWiresNote(wires, note) {
|
|
|
5176
5184
|
wires.note = (wires.note ? wires.note + " | " : "") + note;
|
|
5177
5185
|
}
|
|
5178
5186
|
function makeFetchCtx(rawHttp, v, contractId, budget) {
|
|
5179
|
-
const
|
|
5187
|
+
const OP6 = PROFITABILITY_OP;
|
|
5180
5188
|
const id = parseIdentifier(contractId, "contractId");
|
|
5181
5189
|
const idNum = typeof id === "number" ? id : Number(id);
|
|
5182
5190
|
const wires = { issued: 0, requests: 0, budget };
|
|
@@ -5188,19 +5196,19 @@ function makeFetchCtx(rawHttp, v, contractId, budget) {
|
|
|
5188
5196
|
} };
|
|
5189
5197
|
const readPart = (path, conditions, fields) => {
|
|
5190
5198
|
wires.issued += 1;
|
|
5191
|
-
return degradable(() => boundedPart(http, path, conditions, v.limit,
|
|
5199
|
+
return degradable(() => boundedPart(http, path, conditions, v.limit, OP6, fields));
|
|
5192
5200
|
};
|
|
5193
5201
|
const truncatedMonths = {};
|
|
5194
5202
|
const windowedPart = async (name, key, path, cond, fields, dateField) => {
|
|
5195
5203
|
const first = await readPart(path, cond, fields);
|
|
5196
5204
|
if (first.absent !== void 0 || !first.hasMore) return { part: stampPart(key, first, cond), rows: first.items };
|
|
5197
|
-
const wp = await degradable(() => expandByMonth(http, path, cond, v.limit,
|
|
5205
|
+
const wp = await degradable(() => expandByMonth(http, path, cond, v.limit, OP6, fields, dateField, v.dateFrom, v.dateTo, wires));
|
|
5198
5206
|
if (!("truncatedMonths" in wp)) return { part: stampPart(key, wp, cond), rows: [] };
|
|
5199
5207
|
const { truncatedMonths: tm, ...part } = wp;
|
|
5200
5208
|
truncatedMonths[name] = tm;
|
|
5201
5209
|
return { part, rows: wp.items };
|
|
5202
5210
|
};
|
|
5203
|
-
return { v, OP:
|
|
5211
|
+
return { v, OP: OP6, id, idNum, rawHttp, http, wires, windowOn, readPart, windowedPart, truncatedMonths };
|
|
5204
5212
|
}
|
|
5205
5213
|
|
|
5206
5214
|
// src/resources/special/contracts/profitability.stages.ts
|
|
@@ -6200,7 +6208,7 @@ var ContractsResource = class extends BaseResource {
|
|
|
6200
6208
|
/** Search Contract records: bounded contains on contractName (no vendor free-text search exists);
|
|
6201
6209
|
* limit defaults to 25, max 500. */
|
|
6202
6210
|
async search(query, opts) {
|
|
6203
|
-
return this.searchBase(query, opts);
|
|
6211
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
6204
6212
|
}
|
|
6205
6213
|
/** Node-parity special op (hand-written in src/resources/special/contracts.ts). */
|
|
6206
6214
|
profitability(id, opts) {
|
|
@@ -6322,7 +6330,7 @@ var CountriesResource = class extends BaseResource {
|
|
|
6322
6330
|
/** Search Country records: bounded contains on name (no vendor free-text search exists);
|
|
6323
6331
|
* limit defaults to 25, max 500. */
|
|
6324
6332
|
async search(query, opts) {
|
|
6325
|
-
return this.searchBase(query, opts);
|
|
6333
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
6326
6334
|
}
|
|
6327
6335
|
};
|
|
6328
6336
|
|
|
@@ -6389,7 +6397,7 @@ var DepartmentsResource = class extends BaseResource {
|
|
|
6389
6397
|
/** Search Department records: bounded contains on name (no vendor free-text search exists);
|
|
6390
6398
|
* limit defaults to 25, max 500. */
|
|
6391
6399
|
async search(query, opts) {
|
|
6392
|
-
return this.searchBase(query, opts);
|
|
6400
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
6393
6401
|
}
|
|
6394
6402
|
};
|
|
6395
6403
|
|
|
@@ -6456,7 +6464,7 @@ var DomainRegistrarsResource = class extends BaseResource {
|
|
|
6456
6464
|
/** Search DomainRegistrar records: bounded contains on name (no vendor free-text search exists);
|
|
6457
6465
|
* limit defaults to 25, max 500. */
|
|
6458
6466
|
async search(query, opts) {
|
|
6459
|
-
return this.searchBase(query, opts);
|
|
6467
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
6460
6468
|
}
|
|
6461
6469
|
};
|
|
6462
6470
|
|
|
@@ -6660,7 +6668,7 @@ var ExpenseReportsResource = class extends BaseResource {
|
|
|
6660
6668
|
/** Search ExpenseReport records: bounded contains on name (no vendor free-text search exists);
|
|
6661
6669
|
* limit defaults to 25, max 500. */
|
|
6662
6670
|
async search(query, opts) {
|
|
6663
|
-
return this.searchBase(query, opts);
|
|
6671
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
6664
6672
|
}
|
|
6665
6673
|
};
|
|
6666
6674
|
|
|
@@ -7313,7 +7321,7 @@ var OpportunityCategoriesResource = class extends BaseResource {
|
|
|
7313
7321
|
/** Search OpportunityCategory records: bounded contains on name (no vendor free-text search exists);
|
|
7314
7322
|
* limit defaults to 25, max 500. */
|
|
7315
7323
|
async search(query, opts) {
|
|
7316
|
-
return this.searchBase(query, opts);
|
|
7324
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
7317
7325
|
}
|
|
7318
7326
|
};
|
|
7319
7327
|
|
|
@@ -7439,7 +7447,7 @@ var ProductsResource = class extends BaseResource {
|
|
|
7439
7447
|
/** Search Product records: bounded contains on name (no vendor free-text search exists);
|
|
7440
7448
|
* limit defaults to 25, max 500. */
|
|
7441
7449
|
async search(query, opts) {
|
|
7442
|
-
return this.searchBase(query, opts);
|
|
7450
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
7443
7451
|
}
|
|
7444
7452
|
};
|
|
7445
7453
|
|
|
@@ -7569,7 +7577,7 @@ var ProjectChargesResource = class extends BaseResource {
|
|
|
7569
7577
|
/** Search ProjectCharge records: bounded contains on name (no vendor free-text search exists);
|
|
7570
7578
|
* limit defaults to 25, max 500. */
|
|
7571
7579
|
async search(query, opts) {
|
|
7572
|
-
return this.searchBase(query, opts);
|
|
7580
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
7573
7581
|
}
|
|
7574
7582
|
};
|
|
7575
7583
|
|
|
@@ -7695,7 +7703,7 @@ var ProjectsResource = class extends BaseResource {
|
|
|
7695
7703
|
/** Search Project records: bounded contains on projectName (no vendor free-text search exists);
|
|
7696
7704
|
* limit defaults to 25, max 500. */
|
|
7697
7705
|
async search(query, opts) {
|
|
7698
|
-
return this.searchBase(query, opts);
|
|
7706
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
7699
7707
|
}
|
|
7700
7708
|
/** Get the Project with its primary context records in one call (each part a single-record
|
|
7701
7709
|
* fetch; no sub-lists; absent/dangling references come back null). `names: true` (issue #77)
|
|
@@ -8016,7 +8024,7 @@ var QuoteItemsResource = class extends BaseResource {
|
|
|
8016
8024
|
/** Search QuoteItem records: bounded contains on name (no vendor free-text search exists);
|
|
8017
8025
|
* limit defaults to 25, max 500. */
|
|
8018
8026
|
async search(query, opts) {
|
|
8019
|
-
return this.searchBase(query, opts);
|
|
8027
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
8020
8028
|
}
|
|
8021
8029
|
};
|
|
8022
8030
|
|
|
@@ -8148,7 +8156,7 @@ var QuotesResource = class extends BaseResource {
|
|
|
8148
8156
|
/** Search Quote records: bounded contains on name (no vendor free-text search exists);
|
|
8149
8157
|
* limit defaults to 25, max 500. */
|
|
8150
8158
|
async search(query, opts) {
|
|
8151
|
-
return this.searchBase(query, opts);
|
|
8159
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
8152
8160
|
}
|
|
8153
8161
|
};
|
|
8154
8162
|
|
|
@@ -8192,7 +8200,7 @@ var QuoteTemplatesResource = class extends BaseResource {
|
|
|
8192
8200
|
/** Search QuoteTemplate records: bounded contains on name (no vendor free-text search exists);
|
|
8193
8201
|
* limit defaults to 25, max 500. */
|
|
8194
8202
|
async search(query, opts) {
|
|
8195
|
-
return this.searchBase(query, opts);
|
|
8203
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
8196
8204
|
}
|
|
8197
8205
|
};
|
|
8198
8206
|
|
|
@@ -8515,7 +8523,7 @@ var ResourcesResource = class extends BaseResource {
|
|
|
8515
8523
|
/** Search Resource records: bounded contains on firstName + lastName (no vendor free-text search exists);
|
|
8516
8524
|
* limit defaults to 25, max 500. */
|
|
8517
8525
|
async search(query, opts) {
|
|
8518
|
-
return this.searchBase(query, opts);
|
|
8526
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
8519
8527
|
}
|
|
8520
8528
|
/** Node-parity special op (hand-written in src/resources/special/resources.ts). */
|
|
8521
8529
|
transferOwnership(sourceResourceIds, destinationResourceId, opts = {}) {
|
|
@@ -8751,7 +8759,7 @@ var RolesResource = class extends BaseResource {
|
|
|
8751
8759
|
/** Search Role records: bounded contains on name (no vendor free-text search exists);
|
|
8752
8760
|
* limit defaults to 25, max 500. */
|
|
8753
8761
|
async search(query, opts) {
|
|
8754
|
-
return this.searchBase(query, opts);
|
|
8762
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
8755
8763
|
}
|
|
8756
8764
|
};
|
|
8757
8765
|
|
|
@@ -9155,7 +9163,7 @@ var ServicesResource = class extends BaseResource {
|
|
|
9155
9163
|
/** Search Service records: bounded contains on name (no vendor free-text search exists);
|
|
9156
9164
|
* limit defaults to 25, max 500. */
|
|
9157
9165
|
async search(query, opts) {
|
|
9158
|
-
return this.searchBase(query, opts);
|
|
9166
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
9159
9167
|
}
|
|
9160
9168
|
};
|
|
9161
9169
|
|
|
@@ -9199,7 +9207,7 @@ var SkillsResource = class extends BaseResource {
|
|
|
9199
9207
|
/** Search Skill records: bounded contains on name (no vendor free-text search exists);
|
|
9200
9208
|
* limit defaults to 25, max 500. */
|
|
9201
9209
|
async search(query, opts) {
|
|
9202
|
-
return this.searchBase(query, opts);
|
|
9210
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
9203
9211
|
}
|
|
9204
9212
|
};
|
|
9205
9213
|
|
|
@@ -9390,7 +9398,7 @@ var SurveysResource = class extends BaseResource {
|
|
|
9390
9398
|
/** Search Survey records: bounded contains on name (no vendor free-text search exists);
|
|
9391
9399
|
* limit defaults to 25, max 500. */
|
|
9392
9400
|
async search(query, opts) {
|
|
9393
|
-
return this.searchBase(query, opts);
|
|
9401
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
9394
9402
|
}
|
|
9395
9403
|
};
|
|
9396
9404
|
|
|
@@ -9706,7 +9714,7 @@ var TasksResource = class extends BaseResource {
|
|
|
9706
9714
|
/** Search Task records: bounded contains on title (no vendor free-text search exists);
|
|
9707
9715
|
* limit defaults to 25, max 500. */
|
|
9708
9716
|
async search(query, opts) {
|
|
9709
|
-
return this.searchBase(query, opts);
|
|
9717
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
9710
9718
|
}
|
|
9711
9719
|
};
|
|
9712
9720
|
|
|
@@ -9965,7 +9973,7 @@ var TicketCategoriesResource = class extends BaseResource {
|
|
|
9965
9973
|
/** Search TicketCategory records: bounded contains on name (no vendor free-text search exists);
|
|
9966
9974
|
* limit defaults to 25, max 500. */
|
|
9967
9975
|
async search(query, opts) {
|
|
9968
|
-
return this.searchBase(query, opts);
|
|
9976
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
9969
9977
|
}
|
|
9970
9978
|
};
|
|
9971
9979
|
|
|
@@ -10359,7 +10367,7 @@ var TicketChargesResource = class extends BaseResource {
|
|
|
10359
10367
|
/** Search TicketCharge records: bounded contains on name (no vendor free-text search exists);
|
|
10360
10368
|
* limit defaults to 25, max 500. */
|
|
10361
10369
|
async search(query, opts) {
|
|
10362
|
-
return this.searchBase(query, opts);
|
|
10370
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
10363
10371
|
}
|
|
10364
10372
|
/** Node-parity special op (hand-written in src/resources/special/ticket_charges.ts). */
|
|
10365
10373
|
moveToTicket(sourceId, toTicketId, opts = {}) {
|
|
@@ -10725,7 +10733,7 @@ var TicketNoteWebhooksResource = class extends BaseResource {
|
|
|
10725
10733
|
/** Search TicketNoteWebhook records: bounded contains on name (no vendor free-text search exists);
|
|
10726
10734
|
* limit defaults to 25, max 500. */
|
|
10727
10735
|
async search(query, opts) {
|
|
10728
|
-
return this.searchBase(query, opts);
|
|
10736
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
10729
10737
|
}
|
|
10730
10738
|
};
|
|
10731
10739
|
|
|
@@ -11763,7 +11771,8 @@ var TicketsResource = class extends BaseResource {
|
|
|
11763
11771
|
return this.findByField("ticketNumber", value);
|
|
11764
11772
|
}
|
|
11765
11773
|
/** Search Ticket records: bounded contains on title (no vendor free-text search exists);
|
|
11766
|
-
* limit defaults to 25, max 500.
|
|
11774
|
+
* limit defaults to 25, max 500. Optional companyID scopes the search to one company's tickets (and-joined
|
|
11775
|
+
* with the title match, server-side); includeFields projects the returned columns (id is always returned). */
|
|
11767
11776
|
async search(query, opts) {
|
|
11768
11777
|
return this.searchBase(query, opts);
|
|
11769
11778
|
}
|
|
@@ -11876,7 +11885,7 @@ var TicketWebhooksResource = class extends BaseResource {
|
|
|
11876
11885
|
/** Search TicketWebhook records: bounded contains on name (no vendor free-text search exists);
|
|
11877
11886
|
* limit defaults to 25, max 500. */
|
|
11878
11887
|
async search(query, opts) {
|
|
11879
|
-
return this.searchBase(query, opts);
|
|
11888
|
+
return this.searchBase(query, { limit: opts?.limit });
|
|
11880
11889
|
}
|
|
11881
11890
|
};
|
|
11882
11891
|
|
|
@@ -11897,7 +11906,7 @@ async function queryTimeEntries(_resource, filter, limit, operation, http) {
|
|
|
11897
11906
|
async function windowQuery3(_resource, kind, http, opts) {
|
|
11898
11907
|
const now = opts?.now ?? /* @__PURE__ */ new Date();
|
|
11899
11908
|
const tz = opts?.tz === void 0 ? void 0 : validateZone(opts.tz, `time_entries.${kind}`);
|
|
11900
|
-
const { from, to } =
|
|
11909
|
+
const { from, to } = dateOnlyWindowBounds(kind, now, tz);
|
|
11901
11910
|
const filter = [
|
|
11902
11911
|
{ field: "dateWorked", op: "gte", value: from },
|
|
11903
11912
|
{ field: "dateWorked", op: "lte", value: to }
|
|
@@ -11906,13 +11915,13 @@ async function windowQuery3(_resource, kind, http, opts) {
|
|
|
11906
11915
|
return items;
|
|
11907
11916
|
}
|
|
11908
11917
|
async function customRange3(_resource, from, to, http, opts) {
|
|
11909
|
-
|
|
11910
|
-
const fromB = customRangeDay(from, "from",
|
|
11911
|
-
const toB = customRangeDay(to, "to",
|
|
11918
|
+
if (opts?.tz !== void 0) validateZone(opts.tz, "time_entries.customRange");
|
|
11919
|
+
const fromB = customRangeDay(from, "from", void 0, "customRange");
|
|
11920
|
+
const toB = customRangeDay(to, "to", void 0, "customRange");
|
|
11912
11921
|
if (fromB.ms > toB.ms) {
|
|
11913
11922
|
throw new AutotaskConfigError("customRange: from must not be after to");
|
|
11914
11923
|
}
|
|
11915
|
-
const toEndMs =
|
|
11924
|
+
const toEndMs = toB.ms + DAY_MS2 - 1;
|
|
11916
11925
|
const filter = [
|
|
11917
11926
|
{ field: "dateWorked", op: "gte", value: iso2(fromB.ms) },
|
|
11918
11927
|
{ field: "dateWorked", op: "lte", value: iso2(toEndMs) }
|
|
@@ -11930,14 +11939,14 @@ async function postedDateStatusQuery(_resource, mode, http, opts) {
|
|
|
11930
11939
|
return items;
|
|
11931
11940
|
}
|
|
11932
11941
|
async function postedWithin(_resource, from, to, http, opts, opLabel = "time_entries.postedWithin") {
|
|
11933
|
-
const
|
|
11934
|
-
|
|
11935
|
-
const fromB = customRangeDay(from, "from",
|
|
11936
|
-
const toB = customRangeDay(to, "to",
|
|
11942
|
+
const OP6 = opLabel;
|
|
11943
|
+
if (opts?.tz !== void 0) validateZone(opts.tz, OP6);
|
|
11944
|
+
const fromB = customRangeDay(from, "from", void 0, OP6);
|
|
11945
|
+
const toB = customRangeDay(to, "to", void 0, OP6);
|
|
11937
11946
|
if (fromB.ms > toB.ms) {
|
|
11938
|
-
throw new AutotaskConfigError(`${
|
|
11947
|
+
throw new AutotaskConfigError(`${OP6}: from (${iso2(fromB.ms)}) must not be after to (${iso2(toB.ms)})`, { operation: OP6 });
|
|
11939
11948
|
}
|
|
11940
|
-
const windowToMs =
|
|
11949
|
+
const windowToMs = toB.ms + DAY_MS2 - 1;
|
|
11941
11950
|
const filter = [
|
|
11942
11951
|
{ field: "dateWorked", op: "gte", value: iso2(fromB.ms) },
|
|
11943
11952
|
{ field: "dateWorked", op: "lte", value: iso2(windowToMs) }
|
|
@@ -11946,7 +11955,7 @@ async function postedWithin(_resource, from, to, http, opts, opLabel = "time_ent
|
|
|
11946
11955
|
else if (opts?.posted === false) filter.push({ field: "postedDate", op: "notExist" });
|
|
11947
11956
|
if (opts?.ticketID !== void 0) filter.push({ field: "ticketID", op: "eq", value: opts.ticketID });
|
|
11948
11957
|
if (opts?.resourceID !== void 0) filter.push({ field: "resourceID", op: "eq", value: opts.resourceID });
|
|
11949
|
-
const { items, hasMore } = await queryTimeEntries(_resource, filter, clampWindowLimit(opts?.limit),
|
|
11958
|
+
const { items, hasMore } = await queryTimeEntries(_resource, filter, clampWindowLimit(opts?.limit), OP6, http);
|
|
11950
11959
|
let postedCount = 0;
|
|
11951
11960
|
for (const item of items) {
|
|
11952
11961
|
const postedDate = item.postedDate;
|
|
@@ -12447,6 +12456,103 @@ function moveToTicket2(_resource, sourceId, toTicketId, opts, http) {
|
|
|
12447
12456
|
return runMove(http, SPEC2, sourceId, toTicketId, opts);
|
|
12448
12457
|
}
|
|
12449
12458
|
|
|
12459
|
+
// src/resources/special/time_entries/recentTickets.ts
|
|
12460
|
+
var OP5 = "time_entries.recentTickets";
|
|
12461
|
+
var DAY_MS3 = 864e5;
|
|
12462
|
+
var TICKET_CHUNK = 100;
|
|
12463
|
+
var TICKET_FIELDS2 = ["id", "ticketNumber", "title", "status", "assignedResourceID", "companyID"];
|
|
12464
|
+
function positiveId(value, name) {
|
|
12465
|
+
const n = typeof value === "string" && /^\d+$/.test(value.trim()) ? Number(value) : value;
|
|
12466
|
+
if (typeof n !== "number" || !Number.isSafeInteger(n) || n < 1) {
|
|
12467
|
+
throw new AutotaskConfigError(`${OP5}: ${name} must be a positive integer id (got ${String(value)})`, { operation: OP5 });
|
|
12468
|
+
}
|
|
12469
|
+
return n;
|
|
12470
|
+
}
|
|
12471
|
+
async function recentTickets(_resource, from, to, http, opts) {
|
|
12472
|
+
if (opts === void 0 || opts === null || typeof opts !== "object") {
|
|
12473
|
+
throw new AutotaskConfigError(`${OP5}: opts { resourceID, companyID?, tz?, limit? } is required`, { operation: OP5 });
|
|
12474
|
+
}
|
|
12475
|
+
const resourceID = positiveId(opts.resourceID, "resourceID");
|
|
12476
|
+
const companyID = opts.companyID === void 0 ? void 0 : positiveId(opts.companyID, "companyID");
|
|
12477
|
+
if (opts.tz !== void 0) validateZone(opts.tz, OP5);
|
|
12478
|
+
const fromB = customRangeDay(from, "from", void 0, OP5);
|
|
12479
|
+
const toB = customRangeDay(to, "to", void 0, OP5);
|
|
12480
|
+
if (fromB.ms > toB.ms) {
|
|
12481
|
+
throw new AutotaskConfigError(`${OP5}: from (${isoUtc(fromB.ms)}) must not be after to (${isoUtc(toB.ms)})`, { operation: OP5 });
|
|
12482
|
+
}
|
|
12483
|
+
const windowToMs = toB.ms + DAY_MS3 - 1;
|
|
12484
|
+
const { items: entries, hasMore } = await queryTimeEntries(
|
|
12485
|
+
_resource,
|
|
12486
|
+
[
|
|
12487
|
+
{ field: "dateWorked", op: "gte", value: isoUtc(fromB.ms) },
|
|
12488
|
+
{ field: "dateWorked", op: "lte", value: isoUtc(windowToMs) },
|
|
12489
|
+
{ field: "resourceID", op: "eq", value: resourceID }
|
|
12490
|
+
],
|
|
12491
|
+
clampWindowLimit(opts.limit),
|
|
12492
|
+
OP5,
|
|
12493
|
+
http
|
|
12494
|
+
);
|
|
12495
|
+
const groups = /* @__PURE__ */ new Map();
|
|
12496
|
+
let entriesWithoutTicket = 0;
|
|
12497
|
+
for (const e of entries) {
|
|
12498
|
+
if (typeof e.ticketID !== "number") {
|
|
12499
|
+
entriesWithoutTicket += 1;
|
|
12500
|
+
continue;
|
|
12501
|
+
}
|
|
12502
|
+
const g = groups.get(e.ticketID) ?? { entryCount: 0, totalHours: 0, lastWorked: "" };
|
|
12503
|
+
g.entryCount += 1;
|
|
12504
|
+
g.totalHours += e.hoursWorked ?? 0;
|
|
12505
|
+
if ((e.dateWorked ?? "") > g.lastWorked) g.lastWorked = e.dateWorked ?? "";
|
|
12506
|
+
groups.set(e.ticketID, g);
|
|
12507
|
+
}
|
|
12508
|
+
const ids2 = [...groups.keys()];
|
|
12509
|
+
const tickets = /* @__PURE__ */ new Map();
|
|
12510
|
+
for (let c = 0; c < ids2.length; c += TICKET_CHUNK) {
|
|
12511
|
+
const chunk = ids2.slice(c, c + TICKET_CHUNK);
|
|
12512
|
+
const filter = [{ field: "id", op: "in", value: chunk }];
|
|
12513
|
+
const res = await http.request({
|
|
12514
|
+
method: "POST",
|
|
12515
|
+
idempotent: true,
|
|
12516
|
+
path: "/V1.0/Tickets/query",
|
|
12517
|
+
body: { MaxRecords: TICKET_CHUNK, filter, IncludeFields: TICKET_FIELDS2 },
|
|
12518
|
+
operation: OP5
|
|
12519
|
+
});
|
|
12520
|
+
for (const t of unwrapItems(res, OP5).items) if (typeof t.id === "number") tickets.set(t.id, t);
|
|
12521
|
+
}
|
|
12522
|
+
const items = [];
|
|
12523
|
+
const unresolvedTicketIDs = [];
|
|
12524
|
+
let excludedTickets = 0;
|
|
12525
|
+
for (const [ticketID, g] of groups) {
|
|
12526
|
+
const t = tickets.get(ticketID);
|
|
12527
|
+
if (t === void 0) unresolvedTicketIDs.push(ticketID);
|
|
12528
|
+
if (companyID !== void 0 && t?.companyID !== companyID) {
|
|
12529
|
+
if (t !== void 0) excludedTickets += 1;
|
|
12530
|
+
continue;
|
|
12531
|
+
}
|
|
12532
|
+
items.push({
|
|
12533
|
+
ticketID,
|
|
12534
|
+
...t?.ticketNumber !== void 0 ? { ticketNumber: t.ticketNumber } : {},
|
|
12535
|
+
...t?.title !== void 0 ? { title: t.title } : {},
|
|
12536
|
+
...t?.status !== void 0 ? { status: t.status } : {},
|
|
12537
|
+
...t?.assignedResourceID !== void 0 ? { assignedResourceID: t.assignedResourceID } : {},
|
|
12538
|
+
...t?.companyID !== void 0 ? { companyID: t.companyID } : {},
|
|
12539
|
+
entryCount: g.entryCount,
|
|
12540
|
+
totalHours: Math.round(g.totalHours * 100) / 100,
|
|
12541
|
+
lastWorked: g.lastWorked
|
|
12542
|
+
});
|
|
12543
|
+
}
|
|
12544
|
+
items.sort((a, b) => a.lastWorked < b.lastWorked ? 1 : a.lastWorked > b.lastWorked ? -1 : a.ticketID - b.ticketID);
|
|
12545
|
+
return {
|
|
12546
|
+
items,
|
|
12547
|
+
entriesRead: entries.length,
|
|
12548
|
+
entriesWithoutTicket,
|
|
12549
|
+
unresolvedTicketIDs,
|
|
12550
|
+
...companyID !== void 0 ? { excludedTickets } : {},
|
|
12551
|
+
window: { from: isoUtc(fromB.ms), to: isoUtc(windowToMs) },
|
|
12552
|
+
truncated: hasMore
|
|
12553
|
+
};
|
|
12554
|
+
}
|
|
12555
|
+
|
|
12450
12556
|
// src/resources/time_entries.ts
|
|
12451
12557
|
var TimeEntriesResource = class extends BaseResource {
|
|
12452
12558
|
constructor(http, pageSize) {
|
|
@@ -12579,6 +12685,10 @@ var TimeEntriesResource = class extends BaseResource {
|
|
|
12579
12685
|
return postedWithin(this, from, to, this.http, opts);
|
|
12580
12686
|
}
|
|
12581
12687
|
/** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
|
|
12688
|
+
recentTickets(from, to, opts) {
|
|
12689
|
+
return recentTickets(this, from, to, this.http, opts);
|
|
12690
|
+
}
|
|
12691
|
+
/** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
|
|
12582
12692
|
today(opts) {
|
|
12583
12693
|
return windowQuery3(this, "today", this.http, opts);
|
|
12584
12694
|
}
|