node-autotask 0.78.0 → 0.79.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 +6 -0
- package/MCP_TOOL_CATALOG.json +137 -9
- package/README.md +1 -1
- package/capabilities.json +483 -7
- package/dist/capabilities-data.js +482 -6
- package/dist/capabilities.cjs +4 -4
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-S7JH6K2Z.cjs → chunk-2YFX77XI.cjs} +164 -10
- package/dist/{chunk-YONRIG6F.cjs → chunk-75TQWC3M.cjs} +31 -30
- package/dist/{chunk-U7LVWEO4.cjs → chunk-EEGAMP4D.cjs} +199 -199
- package/dist/{chunk-YH5UCY2X.js → chunk-GJU4DJ6H.js} +3 -3
- package/dist/{chunk-3SYNF5QD.js → chunk-MQ2DXOZW.js} +2 -2
- package/dist/{chunk-S7BJNQ2X.js → chunk-XIPZDDZS.js} +3 -2
- package/dist/{chunk-MVKI2AZX.cjs → chunk-XJQS3FBA.cjs} +3 -3
- package/dist/{chunk-XBT332X7.js → chunk-YK32RN77.js} +159 -5
- package/dist/{index-BHqdOo_5.d.cts → index-BGFWqM2_.d.cts} +45 -1
- package/dist/{index-BHqdOo_5.d.ts → index-BGFWqM2_.d.ts} +45 -1
- package/dist/{index-DfcdtQO0.d.cts → index-DBz-dqAY.d.cts} +3 -2
- package/dist/{index-ci3TSJrT.d.ts → index-DS3jnPiq.d.ts} +3 -2
- package/dist/index.cjs +84 -84
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/operations/index.cjs +51 -51
- package/dist/operations/index.d.cts +4 -4
- package/dist/operations/index.d.ts +4 -4
- package/dist/operations/index.js +2 -2
- package/dist/pool.cjs +12 -12
- 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 +27 -27
- package/dist/resources/index.d.cts +2 -2
- package/dist/resources/index.d.ts +2 -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 +3 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXJQS3FBA_cjs = require('./chunk-XJQS3FBA.cjs');
|
|
4
4
|
var chunkBD4AUGCJ_cjs = require('./chunk-BD4AUGCJ.cjs');
|
|
5
5
|
var crypto = require('crypto');
|
|
6
6
|
var async_hooks = require('async_hooks');
|
|
@@ -6402,6 +6402,22 @@ var RELATIONSHIP_MAP = {
|
|
|
6402
6402
|
"delete": false
|
|
6403
6403
|
}
|
|
6404
6404
|
},
|
|
6405
|
+
{
|
|
6406
|
+
"resource": "project_attachments",
|
|
6407
|
+
"apiEntity": "ProjectAttachment",
|
|
6408
|
+
"parentField": "projectID",
|
|
6409
|
+
"parentSegment": "Attachments",
|
|
6410
|
+
"tier": "extended",
|
|
6411
|
+
"workflowResource": false,
|
|
6412
|
+
"specialOps": [],
|
|
6413
|
+
"searchCovers": null,
|
|
6414
|
+
"scopedOps": {
|
|
6415
|
+
"create": true,
|
|
6416
|
+
"query": true,
|
|
6417
|
+
"update": false,
|
|
6418
|
+
"delete": true
|
|
6419
|
+
}
|
|
6420
|
+
},
|
|
6405
6421
|
{
|
|
6406
6422
|
"resource": "project_charges",
|
|
6407
6423
|
"apiEntity": "ProjectCharge",
|
|
@@ -10155,6 +10171,75 @@ var RELATIONSHIP_MAP = {
|
|
|
10155
10171
|
},
|
|
10156
10172
|
"deleteBoundary": null,
|
|
10157
10173
|
"markerField": null
|
|
10174
|
+
},
|
|
10175
|
+
"project_attachments": {
|
|
10176
|
+
"resource": "project_attachments",
|
|
10177
|
+
"apiEntity": "ProjectAttachment",
|
|
10178
|
+
"kind": "entity",
|
|
10179
|
+
"path": "ProjectAttachments",
|
|
10180
|
+
"parentScoped": true,
|
|
10181
|
+
"tier": "extended",
|
|
10182
|
+
"workflowResource": false,
|
|
10183
|
+
"group": "A",
|
|
10184
|
+
"parent": {
|
|
10185
|
+
"resource": "projects",
|
|
10186
|
+
"segment": "Attachments",
|
|
10187
|
+
"field": "projectID"
|
|
10188
|
+
},
|
|
10189
|
+
"children": [],
|
|
10190
|
+
"naturalKeys": {
|
|
10191
|
+
"hasSearch": false,
|
|
10192
|
+
"searchCovers": null,
|
|
10193
|
+
"findBy": []
|
|
10194
|
+
},
|
|
10195
|
+
"blindSurfaces": null,
|
|
10196
|
+
"zoneFacts": {
|
|
10197
|
+
"createGuidance": {
|
|
10198
|
+
"createOp": "project_attachments.create",
|
|
10199
|
+
"parentScoped": true,
|
|
10200
|
+
"liveProvenPrefix": [],
|
|
10201
|
+
"unproven": true,
|
|
10202
|
+
"blocker": {
|
|
10203
|
+
"kind": "unknown",
|
|
10204
|
+
"message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
|
|
10205
|
+
"remedy": "Read current field and picklist metadata, supply the project id, and preview the attachment before applying.",
|
|
10206
|
+
"requires": {
|
|
10207
|
+
"allOf": [
|
|
10208
|
+
"attachmentType",
|
|
10209
|
+
"fullPath",
|
|
10210
|
+
"title",
|
|
10211
|
+
"publish",
|
|
10212
|
+
"data"
|
|
10213
|
+
]
|
|
10214
|
+
}
|
|
10215
|
+
},
|
|
10216
|
+
"requiresByValue": [
|
|
10217
|
+
{
|
|
10218
|
+
"field": "attachmentType",
|
|
10219
|
+
"value": "FILE_ATTACHMENT",
|
|
10220
|
+
"requires": {
|
|
10221
|
+
"allOf": [
|
|
10222
|
+
"data"
|
|
10223
|
+
]
|
|
10224
|
+
}
|
|
10225
|
+
}
|
|
10226
|
+
],
|
|
10227
|
+
"vendorEvidence": [
|
|
10228
|
+
"Official ProjectAttachmentsEntity.htm and REST_Attachments.htm: Projects is the parent; file creation requires attachmentType, title, fullPath, publish and base64 data. Project queries include child project-note attachments; no nesting. Static contract, with live create unproven."
|
|
10229
|
+
],
|
|
10230
|
+
"deleteBoundary": {
|
|
10231
|
+
"available": true,
|
|
10232
|
+
"note": null
|
|
10233
|
+
},
|
|
10234
|
+
"parentCompany": {
|
|
10235
|
+
"via": "projectID",
|
|
10236
|
+
"resource": "projects",
|
|
10237
|
+
"field": "companyID"
|
|
10238
|
+
}
|
|
10239
|
+
}
|
|
10240
|
+
},
|
|
10241
|
+
"deleteBoundary": null,
|
|
10242
|
+
"markerField": null
|
|
10158
10243
|
}
|
|
10159
10244
|
};
|
|
10160
10245
|
var BLIND_SURFACE_STAMPS = {
|
|
@@ -13315,6 +13400,50 @@ var CREATE_GUIDANCE = {
|
|
|
13315
13400
|
"note": "the vendor defines no DELETE for products (spec-derived: the vendored api-docs.json defines no DELETE on the entity's paths) \u2014 a create cannot be undone through the API; cleanup is UI-only."
|
|
13316
13401
|
}
|
|
13317
13402
|
},
|
|
13403
|
+
{
|
|
13404
|
+
"resource": "project_attachments",
|
|
13405
|
+
"createOp": "project_attachments.create",
|
|
13406
|
+
"parentScoped": true,
|
|
13407
|
+
"liveProvenPrefix": [],
|
|
13408
|
+
"unproven": true,
|
|
13409
|
+
"blocker": {
|
|
13410
|
+
"kind": "unknown",
|
|
13411
|
+
"message": "Attachment creation is documented; valid input remains subject to API-user permissions and vendor validation.",
|
|
13412
|
+
"remedy": "Read current field and picklist metadata, supply the project id, and preview the attachment before applying.",
|
|
13413
|
+
"requires": {
|
|
13414
|
+
"allOf": [
|
|
13415
|
+
"attachmentType",
|
|
13416
|
+
"fullPath",
|
|
13417
|
+
"title",
|
|
13418
|
+
"publish",
|
|
13419
|
+
"data"
|
|
13420
|
+
]
|
|
13421
|
+
}
|
|
13422
|
+
},
|
|
13423
|
+
"vendorEvidence": [
|
|
13424
|
+
"Official ProjectAttachmentsEntity.htm and REST_Attachments.htm: Projects is the parent; file creation requires attachmentType, title, fullPath, publish and base64 data. Project queries include child project-note attachments; no nesting. Static contract, with live create unproven."
|
|
13425
|
+
],
|
|
13426
|
+
"deleteBoundary": {
|
|
13427
|
+
"available": true,
|
|
13428
|
+
"note": null
|
|
13429
|
+
},
|
|
13430
|
+
"requiresByValue": [
|
|
13431
|
+
{
|
|
13432
|
+
"field": "attachmentType",
|
|
13433
|
+
"value": "FILE_ATTACHMENT",
|
|
13434
|
+
"requires": {
|
|
13435
|
+
"allOf": [
|
|
13436
|
+
"data"
|
|
13437
|
+
]
|
|
13438
|
+
}
|
|
13439
|
+
}
|
|
13440
|
+
],
|
|
13441
|
+
"parentCompany": {
|
|
13442
|
+
"via": "projectID",
|
|
13443
|
+
"resource": "projects",
|
|
13444
|
+
"field": "companyID"
|
|
13445
|
+
}
|
|
13446
|
+
},
|
|
13318
13447
|
{
|
|
13319
13448
|
"resource": "project_charges",
|
|
13320
13449
|
"createOp": "project_charges.create",
|
|
@@ -14459,7 +14588,7 @@ var CREATE_GUIDANCE = {
|
|
|
14459
14588
|
}
|
|
14460
14589
|
],
|
|
14461
14590
|
"counts": {
|
|
14462
|
-
"total":
|
|
14591
|
+
"total": 109,
|
|
14463
14592
|
"byKind": {
|
|
14464
14593
|
"ok": 41,
|
|
14465
14594
|
"blind-reference": 16,
|
|
@@ -14469,7 +14598,7 @@ var CREATE_GUIDANCE = {
|
|
|
14469
14598
|
"resource-role-pair": 2,
|
|
14470
14599
|
"delete-absent": 0,
|
|
14471
14600
|
"non-mutable": 0,
|
|
14472
|
-
"unknown":
|
|
14601
|
+
"unknown": 33
|
|
14473
14602
|
}
|
|
14474
14603
|
}
|
|
14475
14604
|
};
|
|
@@ -15211,6 +15340,9 @@ var UNTRUSTED_FIELDS_BY_RESOURCE = {
|
|
|
15211
15340
|
],
|
|
15212
15341
|
"configuration_item_note_attachments": [
|
|
15213
15342
|
"title"
|
|
15343
|
+
],
|
|
15344
|
+
"project_attachments": [
|
|
15345
|
+
"title"
|
|
15214
15346
|
]
|
|
15215
15347
|
};
|
|
15216
15348
|
|
|
@@ -17085,7 +17217,7 @@ async function capabilitySets() {
|
|
|
17085
17217
|
const fieldOps = /* @__PURE__ */ new Map();
|
|
17086
17218
|
const udfCapable = /* @__PURE__ */ new Set();
|
|
17087
17219
|
const resources = /* @__PURE__ */ new Set();
|
|
17088
|
-
for (const rec of await
|
|
17220
|
+
for (const rec of await chunkXJQS3FBA_cjs.loadCapabilityRecords()) {
|
|
17089
17221
|
if (rec.resource === "operations") continue;
|
|
17090
17222
|
resources.add(rec.resource);
|
|
17091
17223
|
if (rec.operation === "getFieldInfo") fieldOps.set(rec.resource, rec);
|
|
@@ -17096,7 +17228,7 @@ async function capabilitySets() {
|
|
|
17096
17228
|
var derivedIndexPromise = null;
|
|
17097
17229
|
function derivedIndexLoad() {
|
|
17098
17230
|
if (derivedIndexPromise === null) {
|
|
17099
|
-
derivedIndexPromise =
|
|
17231
|
+
derivedIndexPromise = chunkXJQS3FBA_cjs.loadCapabilityRecords().then((records) => {
|
|
17100
17232
|
const index = /* @__PURE__ */ new Map();
|
|
17101
17233
|
for (const rec of records) {
|
|
17102
17234
|
const declared = rec.metadata?.derivedFields;
|
|
@@ -18273,6 +18405,7 @@ var MODEL_FIELD_SETS = {
|
|
|
18273
18405
|
"phases": ["id", "createDate", "creatorResourceID", "description", "dueDate", "estimatedHours", "externalID", "isScheduled", "lastActivityDateTime", "parentPhaseID", "phaseNumber", "projectID", "startDate", "title", "soapParentPropertyId"],
|
|
18274
18406
|
"product_vendors": ["id", "isActive", "isDefault", "productID", "vendorCost", "vendorID", "vendorPartNumber", "soapParentPropertyId"],
|
|
18275
18407
|
"products": ["id", "billingType", "chargeBillingCodeID", "createdByResourceID", "createdTime", "defaultVendorID", "description", "doesNotRequireProcurement", "externalProductID", "impersonatorCreatorResourceID", "internalProductID", "isActive", "isEligibleForRma", "isSerialized", "link", "manufacturerName", "manufacturerProductName", "markupRate", "msrp", "name", "periodType", "priceCostMethod", "productBillingCodeID", "productCategory", "sku", "unitCost", "unitPrice", "vendorProductNumber", "defaultInstalledProductCategoryID", "userDefinedFields"],
|
|
18408
|
+
"project_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "projectID", "projectNoteID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
|
|
18276
18409
|
"project_charges": ["id", "billableAmount", "billingCodeID", "chargeType", "contractServiceBundleID", "contractServiceID", "createDate", "creatorResourceID", "datePurchased", "description", "estimatedCost", "extendedCost", "internalCurrencyBillableAmount", "internalCurrencyUnitPrice", "internalPurchaseOrderNumber", "isBillableToCompany", "isBilled", "name", "notes", "organizationalLevelAssociationID", "productID", "projectID", "purchaseOrderNumber", "status", "statusLastModifiedBy", "statusLastModifiedDate", "unitCost", "unitPrice", "unitQuantity", "soapParentPropertyId"],
|
|
18277
18410
|
"project_notes": ["id", "createDateTime", "createdByContactID", "creatorResourceID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "isAnnouncement", "lastActivityDate", "noteType", "projectID", "publish", "title", "soapParentPropertyId"],
|
|
18278
18411
|
"projects": ["id", "actualBilledHours", "actualHours", "changeOrdersBudget", "changeOrdersRevenue", "companyID", "companyOwnerResourceID", "completedDateTime", "completedPercentage", "contractID", "createDateTime", "creatorResourceID", "department", "description", "duration", "endDateTime", "estimatedSalesCost", "estimatedTime", "extProjectNumber", "extProjectType", "impersonatorCreatorResourceID", "laborEstimatedCosts", "laborEstimatedMarginPercentage", "laborEstimatedRevenue", "lastActivityDateTime", "lastActivityPersonType", "lastActivityResourceID", "opportunityID", "organizationalLevelAssociationID", "originalEstimatedRevenue", "projectCostEstimatedMarginPercentage", "projectCostsBudget", "projectCostsRevenue", "projectLeadResourceID", "projectName", "projectNumber", "projectType", "purchaseOrderNumber", "sgda", "startDateTime", "status", "statusDateTime", "statusDetail", "userDefinedFields"],
|
|
@@ -18373,6 +18506,7 @@ var MODEL_DATE_FIELDS = {
|
|
|
18373
18506
|
"opportunity_attachments": ["attachDate"],
|
|
18374
18507
|
"phases": ["createDate", "dueDate", "lastActivityDateTime", "startDate"],
|
|
18375
18508
|
"products": ["createdTime"],
|
|
18509
|
+
"project_attachments": ["attachDate"],
|
|
18376
18510
|
"project_charges": ["createDate", "datePurchased", "statusLastModifiedDate"],
|
|
18377
18511
|
"project_notes": ["createDateTime", "lastActivityDate"],
|
|
18378
18512
|
"projects": ["completedDateTime", "createDateTime", "endDateTime", "lastActivityDateTime", "startDateTime", "statusDateTime"],
|
|
@@ -20749,6 +20883,7 @@ var WRITABLE2 = /* @__PURE__ */ new Set(["attachmentType", "contentType", "data"
|
|
|
20749
20883
|
var FILE_WRITABLE = /* @__PURE__ */ new Set(["attachmentType", "data", "fullPath", "publish", "title"]);
|
|
20750
20884
|
var NON_QUERYABLE = /* @__PURE__ */ new Set(["creatortype", "data", "filesize"]);
|
|
20751
20885
|
var SCOPED_ATTACHMENT_PARENTS = {
|
|
20886
|
+
project_attachments: { field: "projectID", name: "project" },
|
|
20752
20887
|
task_attachments: { field: "taskID", name: "task" },
|
|
20753
20888
|
task_note_attachments: { field: "taskNoteID", name: "task note" },
|
|
20754
20889
|
configuration_item_attachments: { field: "configurationItemID", name: "configuration item" },
|
|
@@ -20796,14 +20931,19 @@ function admitFileAttachment(resource, data, parentId) {
|
|
|
20796
20931
|
if (data === null || typeof data !== "object" || ![Object.prototype, null].includes(Object.getPrototypeOf(data))) fail2("data must be a plain record");
|
|
20797
20932
|
const body = data;
|
|
20798
20933
|
const reference = {
|
|
20934
|
+
project_attachments: void 0,
|
|
20799
20935
|
task_note_attachments: "attachedByContactID",
|
|
20800
20936
|
configuration_item_attachments: "parentAttachmentID",
|
|
20801
20937
|
configuration_item_note_attachments: void 0
|
|
20802
20938
|
}[resource];
|
|
20803
20939
|
for (const field of Object.keys(body)) if (!FILE_WRITABLE.has(field) && field !== reference) fail2(`${field} is not a supported create field`);
|
|
20804
20940
|
if (body.attachmentType !== "FILE_ATTACHMENT") fail2("attachmentType must explicitly be FILE_ATTACHMENT; other attachment types are unsupported");
|
|
20941
|
+
const maxLength = resource === "project_attachments" ? void 0 : 255;
|
|
20805
20942
|
for (const field of ["fullPath", "title"]) {
|
|
20806
|
-
|
|
20943
|
+
const value = body[field];
|
|
20944
|
+
const requirement = `${field} is required and must be a nonblank string${maxLength === void 0 ? "" : ` of at most ${maxLength} characters`}`;
|
|
20945
|
+
if (typeof value !== "string" || value.trim() === "") return fail2(requirement);
|
|
20946
|
+
if (maxLength !== void 0 && value.length > maxLength) fail2(requirement);
|
|
20807
20947
|
}
|
|
20808
20948
|
if (typeof body.publish !== "number" || !Number.isSafeInteger(body.publish)) fail2("publish must be an integer from current field metadata");
|
|
20809
20949
|
if (typeof body.data !== "string" || !isBase64(body.data)) fail2("FILE_ATTACHMENT requires nonempty base64 data");
|
|
@@ -21728,6 +21868,20 @@ var SIMPLE_RESOURCES = [
|
|
|
21728
21868
|
helpers: { search: true, resolve: true, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
|
|
21729
21869
|
opForms: { get: "global", create: "global", update: "global" }
|
|
21730
21870
|
},
|
|
21871
|
+
{
|
|
21872
|
+
key: "project_attachments",
|
|
21873
|
+
accessor: "projectAttachments",
|
|
21874
|
+
resourcePath: "/V1.0/ProjectAttachments",
|
|
21875
|
+
parentScopedPath: "/V1.0/Projects/{parentId}/Attachments",
|
|
21876
|
+
parentPath: "/V1.0/Projects",
|
|
21877
|
+
parentField: "projectID",
|
|
21878
|
+
deletable: true,
|
|
21879
|
+
udfCapable: false,
|
|
21880
|
+
attachmentGet: true,
|
|
21881
|
+
ops: { query: true, queryAll: false, count: true, get: true, create: true, update: false, delete: true, getEntityInfo: true, getFieldInfo: true, getUdfInfo: false, download: false },
|
|
21882
|
+
helpers: { search: false, resolve: false, getContext: false, createIfNotExists: false, attachToDocument: false, findBy: [] },
|
|
21883
|
+
opForms: { get: "scoped", create: "scoped", delete: "scoped" }
|
|
21884
|
+
},
|
|
21731
21885
|
{
|
|
21732
21886
|
key: "project_charges",
|
|
21733
21887
|
accessor: "projectCharges",
|
|
@@ -22411,7 +22565,7 @@ var SIMPLE_RESOURCES = [
|
|
|
22411
22565
|
var GenericResource = class extends BaseResource {
|
|
22412
22566
|
constructor(http, config, pageSize) {
|
|
22413
22567
|
super(http, config, pageSize);
|
|
22414
|
-
if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
|
|
22568
|
+
if (["company_attachments", "company_note_attachments", "configuration_item_attachments", "configuration_item_note_attachments", "project_attachments", "task_attachments", "task_note_attachments"].includes(config.key)) this.getUdfInfo = async () => {
|
|
22415
22569
|
throw new OperationNotSupportedError(config.key, "getUdfInfo");
|
|
22416
22570
|
};
|
|
22417
22571
|
if (config.ops?.create === false || isScopedAttachmentResource(config.key) || ["company_attachments", "task_predecessors"].includes(config.key)) this.createIfNotExists = async () => {
|
|
@@ -24294,7 +24448,7 @@ function dateBucketLabel(value, bucket) {
|
|
|
24294
24448
|
var queryResourceKeysPromise = null;
|
|
24295
24449
|
function queryResourceKeys() {
|
|
24296
24450
|
if (queryResourceKeysPromise === null) {
|
|
24297
|
-
queryResourceKeysPromise =
|
|
24451
|
+
queryResourceKeysPromise = chunkXJQS3FBA_cjs.loadCapabilityRecords().then((records) => {
|
|
24298
24452
|
const s = /* @__PURE__ */ new Set();
|
|
24299
24453
|
for (const rec of records) if (rec.operation === "query") s.add(rec.resource);
|
|
24300
24454
|
return s;
|
|
@@ -24416,7 +24570,7 @@ function parseTopAndLimit(opts, problems) {
|
|
|
24416
24570
|
return { top, limit };
|
|
24417
24571
|
}
|
|
24418
24572
|
async function checkFieldNames(resourceKey, conditions, opts, problems) {
|
|
24419
|
-
const records = resourceKey === void 0 ? [] : await
|
|
24573
|
+
const records = resourceKey === void 0 ? [] : await chunkXJQS3FBA_cjs.loadCapabilityRecords();
|
|
24420
24574
|
const record = resourceKey === void 0 ? void 0 : records.find((r) => r.resource === resourceKey && r.operation === "query");
|
|
24421
24575
|
if (record === void 0) return void 0;
|
|
24422
24576
|
const strings = (v) => Array.isArray(v) ? v.filter((f) => typeof f === "string" && f.trim() !== "") : [];
|
|
@@ -25061,7 +25215,7 @@ async function uiLink(client, input) {
|
|
|
25061
25215
|
var indexPromise = null;
|
|
25062
25216
|
function operationIndex() {
|
|
25063
25217
|
if (indexPromise === null) {
|
|
25064
|
-
indexPromise =
|
|
25218
|
+
indexPromise = chunkXJQS3FBA_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
|
|
25065
25219
|
}
|
|
25066
25220
|
return indexPromise;
|
|
25067
25221
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkEEGAMP4D_cjs = require('./chunk-EEGAMP4D.cjs');
|
|
4
|
+
var chunk2YFX77XI_cjs = require('./chunk-2YFX77XI.cjs');
|
|
5
5
|
|
|
6
6
|
// src/client.ts
|
|
7
7
|
var AutotaskClient = class {
|
|
@@ -90,6 +90,7 @@ var AutotaskClient = class {
|
|
|
90
90
|
phases;
|
|
91
91
|
products;
|
|
92
92
|
productVendors;
|
|
93
|
+
projectAttachments;
|
|
93
94
|
projectCharges;
|
|
94
95
|
projectNotes;
|
|
95
96
|
projects;
|
|
@@ -163,34 +164,34 @@ var AutotaskClient = class {
|
|
|
163
164
|
* anything is wired. Construction issues NO request.
|
|
164
165
|
*/
|
|
165
166
|
constructor(options) {
|
|
166
|
-
this.config =
|
|
167
|
-
this.http = new
|
|
167
|
+
this.config = chunk2YFX77XI_cjs.resolveConfig(options);
|
|
168
|
+
this.http = new chunk2YFX77XI_cjs.HttpClient(this.config);
|
|
168
169
|
this.http.client = this;
|
|
169
|
-
for (const entry of
|
|
170
|
-
this[entry.accessor] = new
|
|
170
|
+
for (const entry of chunk2YFX77XI_cjs.SIMPLE_RESOURCES) {
|
|
171
|
+
this[entry.accessor] = new chunk2YFX77XI_cjs.GenericResource(this.http, entry, this.config.pageSize);
|
|
171
172
|
}
|
|
172
|
-
this.companies = new
|
|
173
|
-
this.configurationItems = new
|
|
174
|
-
this.contacts = new
|
|
175
|
-
this.contracts = new
|
|
176
|
-
this.inventoryProducts = new
|
|
177
|
-
this.invoices = new
|
|
178
|
-
this.quotes = new
|
|
179
|
-
this.resourceTimeOffAdditional = new
|
|
180
|
-
this.resourceTimeOffBalances = new
|
|
181
|
-
this.resources = new
|
|
182
|
-
this.serviceCalls = new
|
|
183
|
-
this.ticketCharges = new
|
|
184
|
-
this.tickets = new
|
|
185
|
-
this.timeEntries = new
|
|
186
|
-
this.timeOffRequests = new
|
|
187
|
-
this.authenticateResource = new
|
|
188
|
-
this.entityInformation = new
|
|
189
|
-
this.modules = new
|
|
190
|
-
this.thresholdInformation = new
|
|
191
|
-
this.version = new
|
|
192
|
-
this.versionInformation = new
|
|
193
|
-
this.zoneInformation = new
|
|
173
|
+
this.companies = new chunk2YFX77XI_cjs.CompaniesResource(this.http, this.config.pageSize);
|
|
174
|
+
this.configurationItems = new chunkEEGAMP4D_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
|
|
175
|
+
this.contacts = new chunkEEGAMP4D_cjs.ContactsResource(this.http, this.config.pageSize);
|
|
176
|
+
this.contracts = new chunk2YFX77XI_cjs.ContractsResource(this.http, this.config.pageSize);
|
|
177
|
+
this.inventoryProducts = new chunkEEGAMP4D_cjs.InventoryProductsResource(this.http, this.config.pageSize);
|
|
178
|
+
this.invoices = new chunk2YFX77XI_cjs.InvoicesResource(this.http, this.config.pageSize);
|
|
179
|
+
this.quotes = new chunkEEGAMP4D_cjs.QuotesResource(this.http, this.config.pageSize);
|
|
180
|
+
this.resourceTimeOffAdditional = new chunkEEGAMP4D_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
|
|
181
|
+
this.resourceTimeOffBalances = new chunkEEGAMP4D_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
|
|
182
|
+
this.resources = new chunkEEGAMP4D_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
|
|
183
|
+
this.serviceCalls = new chunkEEGAMP4D_cjs.ServiceCallsResource(this.http, this.config.pageSize);
|
|
184
|
+
this.ticketCharges = new chunkEEGAMP4D_cjs.TicketChargesResource(this.http, this.config.pageSize);
|
|
185
|
+
this.tickets = new chunkEEGAMP4D_cjs.TicketsResource(this.http, this.config.pageSize);
|
|
186
|
+
this.timeEntries = new chunk2YFX77XI_cjs.TimeEntriesResource(this.http, this.config.pageSize);
|
|
187
|
+
this.timeOffRequests = new chunkEEGAMP4D_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
|
|
188
|
+
this.authenticateResource = new chunkEEGAMP4D_cjs.AuthenticateResource(this.http);
|
|
189
|
+
this.entityInformation = new chunkEEGAMP4D_cjs.EntityInformationResource(this.http);
|
|
190
|
+
this.modules = new chunkEEGAMP4D_cjs.ModulesResource(this.http);
|
|
191
|
+
this.thresholdInformation = new chunkEEGAMP4D_cjs.ThresholdInformationResource(this.http);
|
|
192
|
+
this.version = new chunkEEGAMP4D_cjs.VersionResource(this.http);
|
|
193
|
+
this.versionInformation = new chunkEEGAMP4D_cjs.VersionInformationResource(this.http);
|
|
194
|
+
this.zoneInformation = new chunkEEGAMP4D_cjs.ZoneInformationResource(this.http);
|
|
194
195
|
}
|
|
195
196
|
/**
|
|
196
197
|
* `GET /V1.0/Authenticate` → `AuthTokenResultModel` (as-is). The SDK does
|
|
@@ -224,10 +225,10 @@ var AutotaskClient = class {
|
|
|
224
225
|
* parameter on each: `await client.withSignal(signal, () => invoke(client, ...))`.
|
|
225
226
|
*/
|
|
226
227
|
withSignal(signal, fn) {
|
|
227
|
-
return
|
|
228
|
+
return chunk2YFX77XI_cjs.runWithSignal(signal, fn);
|
|
228
229
|
}
|
|
229
230
|
async batch(fn, items, opts = {}) {
|
|
230
|
-
return
|
|
231
|
+
return chunk2YFX77XI_cjs.runBounded(fn, items, { ...opts, concurrency: opts.concurrency ?? this.config.maxConcurrent });
|
|
231
232
|
}
|
|
232
233
|
};
|
|
233
234
|
|