node-autotask 0.10.0 → 0.12.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/MCP_TOOL_CATALOG.json +27 -9
- package/MCP_TOOL_MANIFEST.md +13 -12
- package/N8N_MCP_MANIFEST.json +3 -3
- package/N8N_MCP_MANIFEST.md +4 -4
- package/README.md +1 -1
- package/capabilities.json +1460 -1250
- package/dist/capabilities.cjs +2 -2
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-NVJ2PTN3.js → chunk-3WIDDEHP.js} +2 -2
- package/dist/{chunk-6KFP5HV3.js → chunk-4A6XLQHE.js} +1459 -1249
- package/dist/{chunk-WTVLHMZA.cjs → chunk-5N6DYKXO.cjs} +519 -39
- package/dist/{chunk-HWC2WPX2.js → chunk-GD4JRPYF.js} +498 -18
- package/dist/{chunk-WTVD2JZN.cjs → chunk-JKZVCFRY.cjs} +1459 -1249
- package/dist/{chunk-3VB6N44U.js → chunk-MY7ZSXY3.js} +1075 -6
- package/dist/{chunk-QUM74WLQ.cjs → chunk-SRJI5XUZ.cjs} +135 -135
- package/dist/{chunk-S7VMY5KN.cjs → chunk-TELBX6HK.cjs} +1462 -393
- package/dist/{index-DGgMD8aq.d.ts → index-D8I6taEo.d.cts} +200 -2
- package/dist/{index-BOyh7S65.d.cts → index-uAxAcRol.d.ts} +200 -2
- package/dist/index.cjs +19 -19
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/operations/index.cjs +213 -529
- package/dist/operations/index.d.cts +24 -6
- package/dist/operations/index.d.ts +24 -6
- package/dist/operations/index.js +102 -418
- package/dist/pool.cjs +8 -8
- package/dist/pool.d.cts +2 -2
- package/dist/pool.d.ts +2 -2
- package/dist/pool.js +4 -4
- package/dist/resources/index.cjs +4 -4
- package/dist/resources/index.d.cts +2 -2
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +3 -3
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/docs/API.md +192 -2
- package/docs/N8N-ADAPTER.md +1 -1
- package/package.json +1 -1
- package/dist/{index-cQ6CRexR.d.cts → index-BXtKN1M5.d.cts} +201 -201
- package/dist/{index-cQ6CRexR.d.ts → index-BXtKN1M5.d.ts} +201 -201
|
@@ -30,26 +30,32 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var _chunkWTVLHMZAcjs = require('../chunk-WTVLHMZA.cjs');
|
|
34
33
|
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
var _chunk5N6DYKXOcjs = require('../chunk-5N6DYKXO.cjs');
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
var _chunkJKZVCFRYcjs = require('../chunk-JKZVCFRY.cjs');
|
|
37
43
|
|
|
38
44
|
// src/operations/searchAcrossResources.ts
|
|
39
45
|
var DEFAULT_LIMIT = 25;
|
|
40
46
|
function resourceFor(client, key) {
|
|
41
|
-
return client[
|
|
47
|
+
return client[_chunk5N6DYKXOcjs.camelKey.call(void 0, key)];
|
|
42
48
|
}
|
|
43
49
|
async function searchAcrossResources(client, query, opts = {}) {
|
|
44
50
|
const text = query.trim();
|
|
45
51
|
if (text === "") {
|
|
46
|
-
throw new (0,
|
|
52
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)("searchAcrossResources: query must be a non-empty string");
|
|
47
53
|
}
|
|
48
|
-
const keys = _nullishCoalesce(opts.resources, () => (
|
|
54
|
+
const keys = _nullishCoalesce(opts.resources, () => ( _chunk5N6DYKXOcjs.WORKFLOW_RESOURCES));
|
|
49
55
|
if (keys.length === 0) {
|
|
50
|
-
throw new (0,
|
|
56
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)("searchAcrossResources: no resources requested");
|
|
51
57
|
}
|
|
52
|
-
const limit =
|
|
58
|
+
const limit = _chunk5N6DYKXOcjs.clampPageSize.call(void 0, _nullishCoalesce(opts.limit, () => ( DEFAULT_LIMIT)));
|
|
53
59
|
const results = [];
|
|
54
60
|
const skipped = [];
|
|
55
61
|
for (const key of keys) {
|
|
@@ -67,7 +73,7 @@ async function searchAcrossResources(client, query, opts = {}) {
|
|
|
67
73
|
|
|
68
74
|
// src/operations/resolveAny.ts
|
|
69
75
|
function resourceFor2(client, key) {
|
|
70
|
-
return client[
|
|
76
|
+
return client[_chunk5N6DYKXOcjs.camelKey.call(void 0, key)];
|
|
71
77
|
}
|
|
72
78
|
var FAULT_CATEGORIES = /* @__PURE__ */ new Set(["auth", "rate_limit", "server", "network", "timeout", "policy"]);
|
|
73
79
|
function missCost(identifier) {
|
|
@@ -76,13 +82,13 @@ function missCost(identifier) {
|
|
|
76
82
|
}
|
|
77
83
|
async function resolveAny(client, identifier, opts = {}) {
|
|
78
84
|
if (typeof identifier === "number") {
|
|
79
|
-
|
|
85
|
+
_chunk5N6DYKXOcjs.parseIdentifier.call(void 0, identifier, "identifier");
|
|
80
86
|
} else if (identifier.trim() === "") {
|
|
81
|
-
throw new (0,
|
|
87
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)("resolveAny: identifier must be non-empty");
|
|
82
88
|
}
|
|
83
|
-
const keys = _nullishCoalesce(opts.resources, () => (
|
|
89
|
+
const keys = _nullishCoalesce(opts.resources, () => ( _chunk5N6DYKXOcjs.WORKFLOW_RESOURCES));
|
|
84
90
|
if (keys.length === 0) {
|
|
85
|
-
throw new (0,
|
|
91
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)("resolveAny: no resources requested");
|
|
86
92
|
}
|
|
87
93
|
const results = [];
|
|
88
94
|
for (const key of keys) {
|
|
@@ -112,9 +118,9 @@ async function resolveAny(client, identifier, opts = {}) {
|
|
|
112
118
|
} catch (err) {
|
|
113
119
|
let code;
|
|
114
120
|
let candidates = [];
|
|
115
|
-
if (err instanceof
|
|
121
|
+
if (err instanceof _chunk5N6DYKXOcjs.AutotaskConfigError) {
|
|
116
122
|
code = "CONFIG_ERROR";
|
|
117
|
-
} else if (
|
|
123
|
+
} else if (_chunk5N6DYKXOcjs.isAutotaskError.call(void 0, err)) {
|
|
118
124
|
if (FAULT_CATEGORIES.has(err.category)) throw err;
|
|
119
125
|
code = err.code;
|
|
120
126
|
if (code === "RESOLUTION_AMBIGUOUS" && err.resourceIds !== void 0) {
|
|
@@ -138,301 +144,67 @@ async function resolveAny(client, identifier, opts = {}) {
|
|
|
138
144
|
return { identifier, results, matches };
|
|
139
145
|
}
|
|
140
146
|
|
|
141
|
-
// src/
|
|
142
|
-
var
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
"configuration_item_webhooks": ["id", "deactivationUrl", "isActive", "isReady", "isSubscribedToCreateEvents", "isSubscribedToDeleteEvents", "isSubscribedToUpdateEvents", "name", "notificationEmailAddress", "ownerResourceID", "secretKey", "sendThresholdExceededNotification", "webhookGUID", "webhookUrl"],
|
|
165
|
-
"configuration_items": ["id", "apiVendorID", "configurationItemCategoryID", "companyID", "companyLocationID", "configurationItemType", "contactID", "contractID", "contractServiceBundleID", "contractServiceID", "createDate", "createdByPersonID", "dailyCost", "dattoAvailableKilobytes", "dattoDeviceMemoryMegabytes", "dattoDrivesErrors", "dattoHostname", "dattoInternalIP", "dattoKernelVersionID", "dattoLastCheckInDateTime", "dattoNICSpeedKilobitsPerSecond", "dattoNumberOfAgents", "dattoNumberOfDrives", "dattoNumberOfVolumes", "dattoOffsiteUsedBytes", "dattoOSVersionID", "dattoPercentageUsed", "dattoProtectedKilobytes", "dattoRemoteIP", "dattoSerialNumber", "dattoUptimeSeconds", "dattoUsedKilobytes", "dattoZFSVersionID", "deviceNetworkingID", "domain", "domainRegistrarID", "domainRegistrationDateTime", "domainLastUpdatedDateTime", "domainExpirationDateTime", "hourlyCost", "impersonatorCreatorResourceID", "installDate", "installedByContactID", "installedByID", "isActive", "lastActivityPersonID", "lastActivityPersonType", "lastModifiedTime", "location", "monthlyCost", "notes", "numberOfUsers", "parentConfigurationItemID", "perUseCost", "productID", "referenceNumber", "referenceTitle", "rmmDeviceAuditAntivirusStatusID", "rmmDeviceAuditArchitectureID", "rmmDeviceAuditBackupStatusID", "rmmDeviceAuditDescription", "rmmDeviceAuditDeviceTypeID", "rmmDeviceAuditDisplayAdaptorID", "rmmDeviceAuditDomainID", "rmmDeviceAuditExternalIPAddress", "rmmDeviceAuditHostname", "rmmDeviceAuditIPAddress", "rmmDeviceAuditLastUser", "rmmDeviceAuditMacAddress", "rmmDeviceAuditManufacturerID", "rmmDeviceAuditFirmwareID", "rmmDeviceAuditMemoryBytes", "rmmDeviceAuditMissingPatchCount", "rmmDeviceAuditMobileNetworkOperatorID", "rmmDeviceAuditMobileNumber", "rmmDeviceAuditModelID", "rmmDeviceAuditMotherboardID", "rmmDeviceAuditOperatingSystem", "rmmDeviceAuditPatchStatusID", "rmmDeviceAuditProcessorID", "rmmDeviceAuditServicePackID", "rmmDeviceAuditSNMPContact", "rmmDeviceAuditSNMPLocation", "rmmDeviceAuditSNMPName", "rmmDeviceAuditSoftwareStatusID", "rmmDeviceAuditStorageBytes", "rmmDeviceID", "rmmDeviceUID", "rmmVsaxDeviceID", "rmmOpenAlertCount", "serialNumber", "serviceBundleID", "serviceID", "serviceLevelAgreementID", "setupFee", "sourceChargeID", "sourceChargeType", "sslSource", "sslCommonName", "sslValidFromDateTime", "sslValidUntilDateTime", "sslIssuedBy", "sslOrganization", "sslOrganizationUnit", "sslLocation", "sslSerialNumber", "sslSignatureAlgorithm", "vendorID", "warrantyExpirationDate", "rmmIsInMaintenanceMode", "rmmIsMobileDeviceManagementEnrolled", "rmmDeviceUrl", "userDefinedFields"],
|
|
166
|
-
"contact_group_contacts": ["id", "contactId", "contactGroupId", "soapParentPropertyId"],
|
|
167
|
-
"contact_groups": ["id", "name", "isActive"],
|
|
168
|
-
"contact_webhooks": ["id", "deactivationUrl", "isActive", "isReady", "isSubscribedToCreateEvents", "isSubscribedToDeleteEvents", "isSubscribedToUpdateEvents", "name", "notificationEmailAddress", "ownerResourceID", "secretKey", "sendThresholdExceededNotification", "webhookGUID", "webhookUrl"],
|
|
169
|
-
"contacts": ["id", "additionalAddressInformation", "addressLine", "addressLine1", "alternatePhone", "apiVendorID", "bulkEmailOptOutTime", "city", "companyID", "companyLocationID", "countryID", "createDate", "emailAddress", "emailAddress2", "emailAddress3", "extension", "externalID", "facebookUrl", "faxNumber", "firstName", "impersonatorCreatorResourceID", "isActive", "isOptedOutFromBulkEmail", "lastActivityDate", "lastModifiedDate", "lastName", "linkedInUrl", "middleInitial", "mobilePhone", "namePrefix", "nameSuffix", "note", "receivesEmailNotifications", "phone", "primaryContact", "roomNumber", "solicitationOptOut", "solicitationOptOutTime", "state", "surveyOptOut", "title", "twitterUrl", "zipCode", "soapParentPropertyId", "userDefinedFields"],
|
|
170
|
-
"contract_billing_rules": ["id", "contractID", "createChargesAsBillable", "dailyProratedCost", "dailyProratedPrice", "determineUnits", "endDate", "executionMethod", "includeItemsInChargeDescription", "invoiceDescription", "isActive", "isDailyProrationEnabled", "maximumUnits", "minimumUnits", "productID", "startDate", "soapParentPropertyId"],
|
|
171
|
-
"contract_block_hour_factors": ["id", "blockHourMultiplier", "contractHourlyRate", "contractID", "internalCurrencyContractHourlyRate", "roleID", "soapParentPropertyId"],
|
|
172
|
-
"contract_blocks": ["id", "contractID", "datePurchased", "endDate", "hourlyRate", "hours", "hoursApproved", "invoiceNumber", "isPaid", "paymentNumber", "paymentType", "startDate", "status", "soapParentPropertyId"],
|
|
173
|
-
"contract_charges": ["id", "billableAmount", "billingCodeID", "chargeType", "contractID", "contractServiceBundleID", "contractServiceID", "createDate", "creatorResourceID", "datePurchased", "description", "extendedCost", "internalCurrencyBillableAmount", "internalCurrencyUnitPrice", "internalPurchaseOrderNumber", "isBillableToCompany", "isBilled", "name", "notes", "organizationalLevelAssociationID", "productID", "purchaseOrderNumber", "status", "statusLastModifiedBy", "statusLastModifiedDate", "unitCost", "unitPrice", "unitQuantity", "soapParentPropertyId"],
|
|
174
|
-
"contract_exclusion_billing_codes": ["id", "billingCodeID", "contractID", "soapParentPropertyId"],
|
|
175
|
-
"contract_exclusion_roles": ["id", "contractID", "roleID", "soapParentPropertyId"],
|
|
176
|
-
"contract_exclusion_set_excluded_roles": ["id", "contractExclusionSetID", "excludedRoleID", "soapParentPropertyId"],
|
|
177
|
-
"contract_exclusion_set_excluded_work_types": ["id", "contractExclusionSetID", "excludedWorkTypeID", "soapParentPropertyId"],
|
|
178
|
-
"contract_exclusion_sets": ["id", "description", "isActive", "name"],
|
|
179
|
-
"contract_milestones": ["id", "amount", "billingCodeID", "contractID", "createDate", "creatorResourceID", "dateDue", "description", "internalCurrencyAmount", "isInitialPayment", "organizationalLevelAssociationID", "status", "title", "soapParentPropertyId"],
|
|
180
|
-
"contract_notes": ["id", "contractID", "createDateTime", "creatorResourceID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "lastActivityDate", "title", "soapParentPropertyId"],
|
|
181
|
-
"contract_rates": ["id", "contractHourlyRate", "contractID", "internalCurrencyContractHourlyRate", "roleID", "soapParentPropertyId"],
|
|
182
|
-
"contract_retainers": ["id", "amount", "amountApproved", "contractID", "datePurchased", "endDate", "internalCurrencyAmount", "internalCurrencyAmountApproved", "invoiceNumber", "isPaid", "paymentID", "paymentNumber", "startDate", "status", "soapParentPropertyId"],
|
|
183
|
-
"contract_role_costs": ["id", "contractID", "rate", "resourceID", "roleID", "soapParentPropertyId"],
|
|
184
|
-
"contract_service_bundle_units": ["id", "approveAndPostDate", "contractID", "contractServiceBundleID", "cost", "endDate", "internalCurrencyPrice", "organizationalLevelAssociationID", "price", "serviceBundleID", "startDate", "units", "soapParentPropertyId"],
|
|
185
|
-
"contract_service_bundles": ["id", "adjustedPrice", "contractID", "internalCurrencyAdjustedPrice", "internalCurrencyUnitPrice", "internalDescription", "invoiceDescription", "quoteItemID", "serviceBundleID", "unitPrice", "soapParentPropertyId"],
|
|
186
|
-
"contract_service_units": ["id", "approveAndPostDate", "contractID", "contractServiceID", "cost", "endDate", "internalCurrencyPrice", "organizationalLevelAssociationID", "price", "serviceID", "startDate", "units", "vendorCompanyID", "soapParentPropertyId"],
|
|
187
|
-
"contract_services": ["id", "contractID", "internalCurrencyAdjustedPrice", "internalCurrencyUnitPrice", "internalDescription", "invoiceDescription", "quoteItemID", "serviceID", "unitCost", "unitPrice", "soapParentPropertyId"],
|
|
188
|
-
"contract_ticket_purchases": ["id", "contractID", "datePurchased", "endDate", "invoiceNumber", "isPaid", "paymentNumber", "paymentType", "perTicketRate", "startDate", "status", "ticketsPurchased", "ticketsUsed", "soapParentPropertyId"],
|
|
189
|
-
"contracts": ["id", "billingPreference", "billToCompanyContactID", "billToCompanyID", "companyID", "contactID", "contactName", "contractCategory", "contractExclusionSetID", "contractName", "contractNumber", "contractPeriodType", "contractType", "description", "endDate", "estimatedCost", "estimatedHours", "estimatedRevenue", "exclusionContractID", "internalCurrencyOverageBillingRate", "internalCurrencySetupFee", "isCompliant", "isDefaultContract", "lastModifiedDateTime", "opportunityID", "organizationalLevelAssociationID", "overageBillingRate", "purchaseOrderNumber", "renewedContractID", "serviceLevelAgreementID", "setupFee", "setupFeeBillingCodeID", "startDate", "status", "timeReportingRequiresStartAndStopTimes", "userDefinedFields"],
|
|
190
|
-
"countries": ["id", "addressFormatID", "countryCode", "displayName", "invoiceTemplateID", "isActive", "isDefaultCountry", "name", "purchaseOrderTemplateID", "quoteTemplateID"],
|
|
191
|
-
"departments": ["id", "description", "name", "number", "primaryLocationID"],
|
|
192
|
-
"domain_registrars": ["id", "name", "url"],
|
|
193
|
-
"expense_item_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "expenseItemID", "expenseReportID", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
|
|
194
|
-
"expense_items": ["id", "companyID", "description", "destination", "entertainmentLocation", "expenseCategory", "expenseCurrencyExpenseAmount", "expenseCurrencyID", "expenseDate", "expenseReportID", "glCode", "haveReceipt", "internalCurrencyExpenseAmount", "internalCurrencyReimbursementAmount", "isBillableToCompany", "isReimbursable", "isRejected", "miles", "odometerEnd", "odometerStart", "origin", "paymentType", "projectID", "purchaseOrderNumber", "reimbursementCurrencyReimbursementAmount", "taskID", "ticketID", "workType", "soapParentPropertyId"],
|
|
195
|
-
"expense_reports": ["id", "amountDue", "approvedDate", "approverID", "departmentNumber", "internalCurrencyCashAdvanceAmount", "internalCurrencyExpenseTotal", "name", "organizationalLevelAssociationID", "quickBooksReferenceNumber", "reimbursementCurrencyAmountDue", "reimbursementCurrencyCashAdvanceAmount", "reimbursementCurrencyID", "rejectionReason", "status", "submit", "submitDate", "submitterID", "weekEnding"],
|
|
196
|
-
"holiday_sets": ["id", "holidaySetDescription", "holidaySetName"],
|
|
197
|
-
"holidays": ["id", "holidayDate", "holidayName", "holidaySetID", "soapParentPropertyId"],
|
|
198
|
-
"inventory_products": ["id", "availableUnits", "backOrderQuantity", "bin", "createDateTime", "createdByResourceID", "inventoryLocationID", "onHandUnits", "pickedUnits", "productID", "quantityMaximum", "quantityMinimum", "referenceNumber", "reservedUnits", "unitsOnOrder"],
|
|
199
|
-
"invoices": ["id", "batchID", "comments", "companyID", "createDateTime", "creatorResourceID", "dueDate", "fromDate", "invoiceDateTime", "invoiceEditorTemplateID", "invoiceNumber", "invoiceTotal", "isVoided", "orderNumber", "paidDate", "paymentTerm", "taxGroup", "taxRegionName", "toDate", "totalTaxValue", "voidedByResourceID", "voidedDate", "webServiceDate"],
|
|
200
|
-
"notification_history": ["id", "companyID", "entityNumber", "entityTitle", "initiatingContactID", "initiatingResourceID", "isActive", "isDeleted", "isTemplateJob", "notificationHistoryTypeID", "notificationSentTime", "opportunityID", "projectID", "quoteID", "recipientDisplayName", "recipientEmailAddress", "taskID", "templateName", "ticketID", "timeEntryID"],
|
|
201
|
-
"opportunities": ["id", "advancedField1", "advancedField2", "advancedField3", "advancedField4", "advancedField5", "amount", "assessmentScore", "barriers", "closedDate", "companyID", "contactID", "cost", "createDate", "creatorResourceID", "description", "helpNeeded", "impersonatorCreatorResourceID", "lastActivity", "leadSource", "lossReason", "lossReasonDetail", "lostDate", "market", "monthlyCost", "monthlyRevenue", "nextStep", "onetimeCost", "onetimeRevenue", "opportunityCategoryID", "organizationalLevelAssociationID", "ownerResourceID", "primaryCompetitor", "probability", "productID", "projectedCloseDate", "promisedFulfillmentDate", "promotionName", "quarterlyCost", "quarterlyRevenue", "rating", "relationshipAssessmentScore", "revenueSpread", "revenueSpreadUnit", "salesOrderID", "salesProcessPercentComplete", "semiannualCost", "semiannualRevenue", "stage", "startDate", "status", "technicalAssessmentScore", "throughDate", "title", "totalAmountMonths", "useQuoteTotals", "winReason", "winReasonDetail", "yearlyCost", "yearlyRevenue", "userDefinedFields"],
|
|
202
|
-
"opportunity_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentAttachmentID", "parentID", "publish", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
|
|
203
|
-
"opportunity_categories": ["id", "displayColorRGB", "isActive", "isGlobalDefault", "name", "nickname"],
|
|
204
|
-
"phases": ["id", "createDate", "creatorResourceID", "description", "dueDate", "estimatedHours", "externalID", "isScheduled", "lastActivityDateTime", "parentPhaseID", "phaseNumber", "projectID", "startDate", "title", "soapParentPropertyId"],
|
|
205
|
-
"product_vendors": ["id", "isActive", "isDefault", "productID", "vendorCost", "vendorID", "vendorPartNumber", "soapParentPropertyId"],
|
|
206
|
-
"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"],
|
|
207
|
-
"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"],
|
|
208
|
-
"project_notes": ["id", "createDateTime", "createdByContactID", "creatorResourceID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "isAnnouncement", "lastActivityDate", "noteType", "projectID", "publish", "title", "soapParentPropertyId"],
|
|
209
|
-
"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"],
|
|
210
|
-
"purchase_approvals": ["id", "costType", "isApproved", "rejectNote"],
|
|
211
|
-
"purchase_order_item_receiving": ["id", "purchaseOrderItemID", "quantityBackOrdered", "quantityNowReceiving", "quantityPreviouslyReceived", "receiveDate", "receivedByResourceID", "serialNumber", "vendorInvoiceNumber", "soapParentPropertyId"],
|
|
212
|
-
"purchase_order_items": ["id", "chargeID", "contractID", "estimatedArrivalDate", "internalCurrencyUnitCost", "inventoryLocationID", "memo", "orderID", "productID", "projectID", "quantity", "salesOrderID", "ticketID", "unitCost", "soapParentPropertyId"],
|
|
213
|
-
"purchase_orders": ["id", "cancelDateTime", "createDateTime", "creatorResourceID", "externalPONumber", "fax", "freight", "generalMemo", "impersonatorCreatorResourceID", "internalCurrencyFreight", "latestEstimatedArrivalDate", "paymentTerm", "phone", "purchaseForCompanyID", "purchaseOrderNumber", "purchaseOrderTemplateID", "shippingDate", "shippingType", "shipToAddress1", "shipToAddress2", "shipToCity", "shipToName", "shipToPostalCode", "shipToState", "showEachTaxInGroup", "showTaxCategory", "status", "submitDateTime", "taxRegionID", "useItemDescriptionsFrom", "vendorID", "vendorInvoiceNumber", "additionalVendorInvoiceNumbers"],
|
|
214
|
-
"quote_items": ["id", "averageCost", "chargeID", "description", "expenseID", "highestCost", "internalCurrencyLineDiscount", "internalCurrencyUnitDiscount", "internalCurrencyUnitPrice", "isOptional", "isTaxable", "laborID", "lineDiscount", "markupRate", "name", "percentageDiscount", "periodType", "productID", "quantity", "quoteID", "quoteItemType", "serviceBundleID", "serviceID", "shippingID", "sortOrderID", "taxCategoryID", "totalEffectiveTax", "unitCost", "unitDiscount", "unitPrice", "soapParentPropertyId"],
|
|
215
|
-
"quote_locations": ["id", "address1", "address2", "city", "postalCode", "state"],
|
|
216
|
-
"quote_templates": ["id", "calculateTaxSeparately", "createDate", "createdBy", "currencyNegativeFormat", "currencyPositiveFormat", "dateFormat", "description", "displayTaxCategorySuperscripts", "isActive", "lastActivityBy", "lastActivityDate", "name", "numberFormat", "pageLayout", "pageNumberFormat", "showEachTaxInGroup", "showGridHeader", "showTaxCategory", "showVerticalGridLines"],
|
|
217
|
-
"quotes": ["id", "approvalStatus", "approvalStatusChangedByResourceID", "approvalStatusChangedDate", "billToLocationID", "calculateTaxSeparately", "comment", "companyID", "contactID", "createDate", "creatorResourceID", "description", "effectiveDate", "expirationDate", "extApprovalContactResponse", "extApprovalResponseDate", "extApprovalResponseSignature", "externalQuoteNumber", "groupByID", "impersonatorCreatorResourceID", "isActive", "lastActivityDate", "lastModifiedBy", "lastPublishedByResourceID", "lastPublishedDateTime", "name", "opportunityID", "paymentTerm", "paymentType", "primaryQuote", "proposalProjectID", "purchaseOrderNumber", "quoteNumber", "quoteTemplateID", "shippingType", "shipToLocationID", "showEachTaxInGroup", "showTaxCategory", "soldToLocationID", "taxRegionID"],
|
|
218
|
-
"resource_role_queues": ["id", "queueID", "resourceID", "soapParentPropertyId"],
|
|
219
|
-
"resource_roles": ["id", "departmentID", "isActive", "queueID", "resourceID", "roleID", "soapParentPropertyId"],
|
|
220
|
-
"resource_skills": ["id", "resourceID", "skillDescription", "skillID", "skillLevel", "soapParentPropertyId"],
|
|
221
|
-
"resource_time_off_approvers": ["id", "resourceID", "approverResourceID", "approvalLevel", "soapParentPropertyId"],
|
|
222
|
-
"resource_time_off_balances": ["id", "resourceID", "floatingHolidayAnnualAllowance", "floatingHolidayBalance", "floatingHolidayPlanned", "floatingHolidayUsed", "floatingHolidayWaitingApproval", "personalTimeAnnualAllowance", "personalTimeBalance", "personalTimePlanned", "personalTimeUsed", "personalTimeWaitingApproval", "sickTimeAnnualAllowance", "sickTimeBalance", "sickTimePlanned", "sickTimeUsed", "sickTimeWaitingApproval", "vacationTimeAnnualAllowance", "vacationTimeBalance", "vacationTimePlanned", "vacationTimeUsed", "vacationTimeWaitingApproval", "year", "soapParentPropertyId"],
|
|
223
|
-
"resources": ["id", "accountingReferenceID", "dateFormat", "defaultServiceDeskRoleID", "email", "email2", "email3", "emailTypeCode", "emailTypeCode2", "emailTypeCode3", "firstName", "gender", "greeting", "hireDate", "homePhone", "initials", "internalCost", "isActive", "lastName", "licenseType", "locationID", "middleName", "mobilePhone", "numberFormat", "officeExtension", "officePhone", "payrollIdentifier", "payrollType", "resourceType", "suffix", "surveyResourceRating", "timeFormat", "title", "travelAvailabilityPct", "userName", "userType"],
|
|
224
|
-
"roles": ["id", "description", "hourlyFactor", "hourlyRate", "isActive", "isExcludedFromNewContracts", "isSystemRole", "name", "quoteItemDefaultTaxCategoryId", "roleType"],
|
|
225
|
-
"service_call_task_resources": ["id", "resourceID", "serviceCallTaskID", "soapParentPropertyId"],
|
|
226
|
-
"service_call_tasks": ["id", "serviceCallID", "taskID", "soapParentPropertyId"],
|
|
227
|
-
"service_call_ticket_resources": ["id", "resourceID", "serviceCallTicketID", "soapParentPropertyId"],
|
|
228
|
-
"service_call_tickets": ["id", "serviceCallID", "ticketID", "soapParentPropertyId"],
|
|
229
|
-
"service_calls": ["id", "cancelationNoticeHours", "canceledByResourceID", "canceledDateTime", "companyID", "companyLocationID", "createDateTime", "creatorResourceID", "description", "duration", "endDateTime", "impersonatorCreatorResourceID", "isComplete", "lastModifiedDateTime", "startDateTime", "status"],
|
|
230
|
-
"service_level_agreement_results": ["id", "firstResponseElapsedHours", "firstResponseInitiatingResourceID", "firstResponseResourceID", "isFirstResponseMet", "isResolutionMet", "isResolutionPlanMet", "resolutionElapsedHours", "resolutionPlanElapsedHours", "resolutionPlanResourceID", "resolutionResourceID", "serviceLevelAgreementName", "ticketID", "soapParentPropertyId"],
|
|
231
|
-
"services": ["id", "billingCodeID", "createDate", "creatorResourceID", "description", "invoiceDescription", "isActive", "lastModifiedDate", "markupRate", "name", "periodType", "serviceLevelAgreementID", "unitCost", "unitPrice", "updateResourceID", "vendorCompanyID", "manufacturerServiceProvider", "manufacturerServiceProviderProductNumber", "catalogNumberPartNumber", "sku", "internalID", "externalID", "url", "userDefinedFields"],
|
|
232
|
-
"skills": ["id", "categoryID", "description", "isActive", "name"],
|
|
233
|
-
"subscription_periods": ["id", "periodCost", "periodDate", "periodPrice", "postedDate", "purchaseOrderNumber", "subscriptionID", "soapParentPropertyId"],
|
|
234
|
-
"subscriptions": ["id", "configurationItemID", "description", "effectiveDate", "expirationDate", "impersonatorCreatorResourceID", "materialCodeID", "organizationalLevelAssociationID", "periodCost", "periodPrice", "periodType", "purchaseOrderNumber", "status", "subscriptionName", "totalCost", "totalPrice", "vendorID", "userDefinedFields"],
|
|
235
|
-
"survey_results": ["id", "companyID", "companyRating", "completeDate", "contactID", "contactRating", "resourceRating", "sendDate", "surveyID", "surveyRating", "ticketID"],
|
|
236
|
-
"surveys": ["id", "description", "displayName", "name"],
|
|
237
|
-
"tag_aliases": ["id", "alias", "tagID", "soapParentPropertyId"],
|
|
238
|
-
"tag_groups": ["id", "displayColor", "isActive", "isSystem", "label"],
|
|
239
|
-
"tags": ["id", "createDateTime", "isActive", "isExcludedFromAutomaticTagging", "isSystem", "label", "lastModifiedDateTime", "tagGroupID"],
|
|
240
|
-
"task_secondary_resources": ["id", "resourceID", "roleID", "taskID", "soapParentPropertyId"],
|
|
241
|
-
"tasks": ["id", "assignedResourceID", "assignedResourceRoleID", "billingCodeID", "canClientPortalUserCompleteTask", "companyLocationID", "completedByResourceID", "completedByType", "completedDateTime", "createDateTime", "creatorResourceID", "creatorType", "departmentID", "description", "endDateTime", "estimatedHours", "externalID", "hoursToBeScheduled", "isTaskBillable", "isVisibleInClientPortal", "lastActivityDateTime", "lastActivityPersonType", "lastActivityResourceID", "phaseID", "priority", "priorityLabel", "projectID", "purchaseOrderNumber", "remainingHours", "startDateTime", "status", "taskCategoryID", "taskNumber", "taskType", "title", "soapParentPropertyId", "userDefinedFields"],
|
|
242
|
-
"ticket_additional_configuration_items": ["id", "configurationItemID", "ticketID", "soapParentPropertyId"],
|
|
243
|
-
"ticket_additional_contacts": ["id", "contactID", "ticketID", "soapParentPropertyId"],
|
|
244
|
-
"ticket_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentAttachmentID", "parentID", "publish", "ticketID", "ticketNoteID", "timeEntryID", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
|
|
245
|
-
"ticket_categories": ["id", "displayColorRGB", "isActive", "isApiOnly", "isGlobalDefault", "name", "nickname"],
|
|
246
|
-
"ticket_category_field_defaults": ["id", "description", "estimatedHours", "issueTypeID", "organizationalLevelAssociationID", "priority", "purchaseOrderNumber", "queueID", "resolution", "serviceLevelAgreementID", "sourceID", "status", "subIssueTypeID", "ticketCategoryID", "ticketTypeID", "title", "workTypeID", "soapParentPropertyId"],
|
|
247
|
-
"ticket_change_request_approvals": ["id", "approveRejectDateTime", "approveRejectNote", "contactID", "isApproved", "resourceID", "ticketID", "soapParentPropertyId"],
|
|
248
|
-
"ticket_charges": ["id", "billableAmount", "billingCodeID", "chargeType", "contractServiceBundleID", "contractServiceID", "createDate", "creatorResourceID", "datePurchased", "description", "extendedCost", "internalCurrencyBillableAmount", "internalCurrencyUnitPrice", "internalPurchaseOrderNumber", "isBillableToCompany", "isBilled", "name", "notes", "organizationalLevelAssociationID", "productID", "purchaseOrderNumber", "status", "statusLastModifiedBy", "statusLastModifiedDate", "ticketID", "unitCost", "unitPrice", "unitQuantity", "soapParentPropertyId"],
|
|
249
|
-
"ticket_checklist_items": ["id", "completedByResourceID", "completedDateTime", "isCompleted", "isImportant", "itemName", "knowledgebaseArticleID", "position", "ticketID", "soapParentPropertyId"],
|
|
250
|
-
"ticket_history": ["id", "action", "date", "detail", "resourceID", "ticketID", "soapParentPropertyId"],
|
|
251
|
-
"ticket_note_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "publish", "ticketID", "ticketNoteID", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
|
|
252
|
-
"ticket_note_webhooks": ["id", "deactivationUrl", "isActive", "isReady", "isSubscribedToCreateEvents", "isSubscribedToDeleteEvents", "isSubscribedToUpdateEvents", "name", "notificationEmailAddress", "ownerResourceID", "secretKey", "sendThresholdExceededNotification", "webhookGUID", "webhookUrl"],
|
|
253
|
-
"ticket_notes": ["id", "createDateTime", "createdByContactID", "creatorResourceID", "description", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "lastActivityDate", "noteType", "publish", "ticketID", "title", "soapParentPropertyId"],
|
|
254
|
-
"ticket_secondary_resources": ["id", "resourceID", "roleID", "ticketID", "soapParentPropertyId"],
|
|
255
|
-
"ticket_webhooks": ["id", "deactivationUrl", "isActive", "isReady", "isSubscribedToCreateEvents", "isSubscribedToDeleteEvents", "isSubscribedToUpdateEvents", "name", "notificationEmailAddress", "ownerResourceID", "secretKey", "sendThresholdExceededNotification", "webhookGUID", "webhookUrl"],
|
|
256
|
-
"tickets": ["id", "apiVendorID", "assignedResourceID", "assignedResourceRoleID", "billingCodeID", "changeApprovalBoard", "changeApprovalStatus", "changeApprovalType", "changeInfoField1", "changeInfoField2", "changeInfoField3", "changeInfoField4", "changeInfoField5", "companyID", "companyLocationID", "completedByResourceID", "completedDate", "configurationItemID", "contactID", "contractID", "contractServiceBundleID", "contractServiceID", "createDate", "createdByContactID", "creatorResourceID", "creatorType", "currentServiceThermometerRating", "description", "dueDateTime", "estimatedHours", "externalID", "firstResponseAssignedResourceID", "firstResponseDateTime", "firstResponseDueDateTime", "firstResponseInitiatingResourceID", "hoursToBeScheduled", "impersonatorCreatorResourceID", "isAssignedToComanaged", "issueType", "isVisibleToComanaged", "lastActivityDate", "lastActivityPersonType", "lastActivityResourceID", "lastCustomerNotificationDateTime", "lastCustomerVisibleActivityDateTime", "lastTrackedModificationDateTime", "monitorID", "monitorTypeID", "opportunityID", "organizationalLevelAssociationID", "previousServiceThermometerRating", "priority", "problemTicketId", "projectID", "purchaseOrderNumber", "queueID", "resolution", "resolutionPlanDateTime", "resolutionPlanDueDateTime", "resolvedDateTime", "resolvedDueDateTime", "rmaStatus", "rmaType", "rmmAlertID", "serviceLevelAgreementHasBeenMet", "serviceLevelAgreementID", "serviceLevelAgreementPausedNextEventHours", "serviceThermometerTemperature", "source", "status", "subIssueType", "ticketCategory", "ticketNumber", "ticketType", "title", "userDefinedFields"],
|
|
257
|
-
"time_entries": ["id", "billingApprovalDateTime", "billingApprovalLevelMostRecent", "billingApprovalResourceID", "billingCodeID", "contractID", "contractServiceBundleID", "contractServiceID", "createDateTime", "creatorUserID", "dateWorked", "endDateTime", "hoursToBill", "hoursWorked", "impersonatorCreatorResourceID", "impersonatorUpdaterResourceID", "internalBillingCodeID", "internalNotes", "isInternalNotesVisibleToComanaged", "isNonBillable", "lastModifiedDateTime", "lastModifiedUserID", "offsetHours", "resourceID", "roleID", "showOnInvoice", "startDateTime", "summaryNotes", "taskID", "ticketID", "timeEntryType"],
|
|
258
|
-
"time_entry_attachments": ["id", "attachDate", "attachedByContactID", "attachedByResourceID", "attachmentType", "contentType", "creatorType", "fileSize", "fullPath", "impersonatorCreatorResourceID", "opportunityID", "parentID", "publish", "taskID", "ticketID", "timeEntryID", "title", "data", "parentType", "soapParentPropertyId", "isTaskAttachment"],
|
|
259
|
-
"time_off_requests": ["id", "approvedDateTime", "approveRejectResourceID", "createdByResourceID", "createDateTime", "endTime", "hours", "impersonatorApproveRejectResourceID", "lastModifiedByResourceID", "lastModifiedDateTime", "lastApprovedLevel", "reason", "rejectReason", "requestDate", "resourceID", "startTime", "status", "timeOffRequestType", "soapParentPropertyId"]
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
// src/operations/fetchMany.ts
|
|
263
|
-
var FETCH_MANY_MAX_ITEMS = 20;
|
|
264
|
-
function validateFetchManyItems(items, cap, opName = "fetchMany", capRef = `FETCH_MANY_MAX_ITEMS = ${FETCH_MANY_MAX_ITEMS}`, validation) {
|
|
265
|
-
if (!Array.isArray(items)) {
|
|
266
|
-
throw new (0, _chunkWTVLHMZAcjs.AutotaskConfigError)(
|
|
267
|
-
`${opName}: items must be the items ARRAY \u2014 one positional arg, [{ resource: string, id: number, fields?: string[] }] (got ${Array.isArray(items) ? "an array" : typeof items})`,
|
|
268
|
-
{
|
|
269
|
-
suggestedAction: 'Pass args = [[{ resource: "tickets", id: 123 }, { resource: "projects", id: 456 }]] \u2014 the items array is the single positional argument.'
|
|
270
|
-
}
|
|
271
|
-
);
|
|
272
|
-
}
|
|
273
|
-
if (items.length === 0) {
|
|
274
|
-
throw new (0, _chunkWTVLHMZAcjs.AutotaskConfigError)(`${opName}: items must not be empty (a zero-item batch is a shape error, not a no-op)`, {
|
|
275
|
-
suggestedAction: "Pass at least one { resource, id } item \u2014 or use the resource's query op for a filtered read."
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
if (items.length > cap) {
|
|
279
|
-
throw new (0, _chunkWTVLHMZAcjs.AutotaskConfigError)(
|
|
280
|
-
`${opName}: ${items.length} items over the ${cap}-item cap (${capRef}) \u2014 zero items were fetched (pre-request)`,
|
|
281
|
-
{
|
|
282
|
-
suggestedAction: `Split the batch into groups of <= ${cap} items \u2014 or, for more than ${cap} records / a filtered set, use the resource's bounded query op (<resource>.query).`
|
|
283
|
-
}
|
|
284
|
-
);
|
|
285
|
-
}
|
|
286
|
-
const problems = [];
|
|
287
|
-
for (let i = 0; i < items.length; i += 1) {
|
|
288
|
-
const it = items[i];
|
|
289
|
-
const at = `items[${i}]`;
|
|
290
|
-
if (typeof it !== "object" || it === null || Array.isArray(it)) {
|
|
291
|
-
problems.push(`${at}: must be an object { resource: string, id: number, fields?: string[] }`);
|
|
292
|
-
continue;
|
|
293
|
-
}
|
|
294
|
-
const item = it;
|
|
295
|
-
if (typeof item.resource !== "string" || item.resource.trim() === "") {
|
|
296
|
-
problems.push(`${at}.resource: required \u2014 the plan resource key (string, e.g. 'tickets'; see autotask_catalog)`);
|
|
297
|
-
continue;
|
|
298
|
-
}
|
|
299
|
-
const resourceKey = item.resource;
|
|
300
|
-
const fields = MODEL_FIELD_SETS[resourceKey];
|
|
301
|
-
if (fields === void 0) {
|
|
302
|
-
problems.push(
|
|
303
|
-
`${at}.resource: "${resourceKey}" is not a single-record GETtable resource (${Object.keys(MODEL_FIELD_SETS).length} known) \u2014 see autotask_catalog for the exact plan keys`
|
|
304
|
-
);
|
|
305
|
-
continue;
|
|
306
|
-
}
|
|
307
|
-
const rel = _chunkWTVLHMZAcjs.RELATIONSHIP_MAP[resourceKey];
|
|
308
|
-
if (rel !== void 0 && rel.parentScoped) {
|
|
309
|
-
problems.push(
|
|
310
|
-
`${at}.resource: "${resourceKey}" is a parent-scoped child \u2014 its get needs (parentId, id); fetchMany takes single numeric ids of TOP-LEVEL records (scoped reads: client.${_chunkWTVLHMZAcjs.camelKey.call(void 0, resourceKey)}.get(parentId, id))`
|
|
311
|
-
);
|
|
312
|
-
continue;
|
|
313
|
-
}
|
|
314
|
-
try {
|
|
315
|
-
_chunkWTVLHMZAcjs.parseIdentifier.call(void 0, item.id, `${at}.id`);
|
|
316
|
-
} catch (e2) {
|
|
317
|
-
if (typeof item.id === "string") {
|
|
318
|
-
problems.push(
|
|
319
|
-
`${at}.id: "${item.id}" is not a vendor numeric id \u2014 non-numeric string identifiers are autotask_resolve_any territory (resolveAny / the resource's findBy* helpers)`
|
|
320
|
-
);
|
|
321
|
-
} else if (typeof item.id === "number") {
|
|
322
|
-
problems.push(
|
|
323
|
-
`${at}.id: ${item.id} is not a non-negative safe integer (a JS number this large is already corrupted \u2014 pass the canonical integer string form)`
|
|
324
|
-
);
|
|
325
|
-
} else {
|
|
326
|
-
problems.push(`${at}.id: required \u2014 the vendor numeric id (safe integer, or the canonical integer string for ids above 2^53)`);
|
|
327
|
-
}
|
|
328
|
-
continue;
|
|
329
|
-
}
|
|
330
|
-
if (item.fields !== void 0) {
|
|
331
|
-
if (!Array.isArray(item.fields) || item.fields.some((f) => typeof f !== "string")) {
|
|
332
|
-
problems.push(`${at}.fields: must be an array of exact vendor field names (discover them via operations.fieldCatalog)`);
|
|
333
|
-
continue;
|
|
334
|
-
}
|
|
335
|
-
if (_optionalChain([validation, 'optionalAccess', _ => _.fieldCheck]) !== false) {
|
|
336
|
-
const authoritative = _nullishCoalesce(_optionalChain([validation, 'optionalAccess', _2 => _2.fieldSetsByResource, 'optionalAccess', _3 => _3.get, 'call', _4 => _4(resourceKey)]), () => ( fields));
|
|
337
|
-
for (const f of item.fields) {
|
|
338
|
-
if (!authoritative.includes(f)) {
|
|
339
|
-
problems.push(
|
|
340
|
-
`${at}.fields: "${f}" is not a field of ${resourceKey} \u2014 a hallucinated field is a shape error, not a silent projection-miss (exact vendor field names via operations.fieldCatalog)`
|
|
341
|
-
);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
if (problems.length > 0) {
|
|
348
|
-
throw new (0, _chunkWTVLHMZAcjs.AutotaskConfigError)(
|
|
349
|
-
`${opName}: ${problems.length} problem(s) found pre-request (zero wire was issued)
|
|
350
|
-
- ` + problems.join("\n- "),
|
|
351
|
-
{ suggestedAction: "Fix every item above and call again \u2014 validation covers the whole batch up-front (one round, zero wire)." }
|
|
352
|
-
);
|
|
147
|
+
// src/operations/aggregate.ts
|
|
148
|
+
var AGGREGATE_TOP_MAX = 100;
|
|
149
|
+
var AGGREGATE_DEFAULT_TOP = 25;
|
|
150
|
+
var AGGREGATE_DEFAULT_LIMIT = _chunk5N6DYKXOcjs.BOUNDED_QUERY_MAX_LIMIT;
|
|
151
|
+
var AGGREGATE_DATE_BUCKETS = ["month", "week", "year"];
|
|
152
|
+
var DATE_ONLY_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
153
|
+
var DATETIME_RE = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d{1,9})?(Z|[+-]\d{2}:?\d{2})?$/;
|
|
154
|
+
function parseDateInstant(v) {
|
|
155
|
+
if (typeof v !== "string") return null;
|
|
156
|
+
let m = v.match(DATE_ONLY_RE);
|
|
157
|
+
if (m) {
|
|
158
|
+
return _nullishCoalesce(validUtc(Number(m[1]), Number(m[2]), Number(m[3])), () => ( null));
|
|
159
|
+
}
|
|
160
|
+
m = v.match(DATETIME_RE);
|
|
161
|
+
if (m) {
|
|
162
|
+
const t = validUtc(Number(m[1]), Number(m[2]), Number(m[3]), Number(m[4]), Number(m[5]), Number(m[6]));
|
|
163
|
+
if (t === null) return null;
|
|
164
|
+
const zone = m[8];
|
|
165
|
+
if (zone === void 0 || zone === "Z") return t;
|
|
166
|
+
const sign = zone[0] === "-" ? -1 : 1;
|
|
167
|
+
const hh = Number(zone.slice(1, 3));
|
|
168
|
+
const mm = Number(zone.slice(zone.length - 2));
|
|
169
|
+
return t - sign * (hh * 60 + mm) * 6e4;
|
|
353
170
|
}
|
|
171
|
+
return null;
|
|
354
172
|
}
|
|
355
|
-
function
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
|
|
173
|
+
function validUtc(y, mo, d, h = 0, mi = 0, s = 0) {
|
|
174
|
+
const dt = new Date(Date.UTC(y, mo - 1, d, h, mi, s));
|
|
175
|
+
if (y >= 0 && y < 100) dt.setUTCFullYear(y);
|
|
176
|
+
if (dt.getUTCFullYear() !== y || dt.getUTCMonth() !== mo - 1 || dt.getUTCDate() !== d || dt.getUTCHours() !== h || dt.getUTCMinutes() !== mi || dt.getUTCSeconds() !== s) {
|
|
177
|
+
return null;
|
|
359
178
|
}
|
|
360
|
-
return
|
|
179
|
+
return dt.getTime();
|
|
361
180
|
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
try {
|
|
385
|
-
const rows = await holder.getFieldInfo();
|
|
386
|
-
const names = [];
|
|
387
|
-
for (const row of rows) {
|
|
388
|
-
if (typeof row.name === "string") names.push(row.name);
|
|
389
|
-
}
|
|
390
|
-
liveFieldSets.set(key, names.length > 0 ? names : null);
|
|
391
|
-
} catch (err) {
|
|
392
|
-
if (!_chunkWTVLHMZAcjs.isAutotaskError.call(void 0, err) || err.code === "ABORTED") throw err;
|
|
393
|
-
liveFieldSets.set(key, null);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
validateFetchManyItems(items, cap, void 0, void 0, { fieldSetsByResource: liveFieldSets });
|
|
397
|
-
} else {
|
|
398
|
-
validateFetchManyItems(items, cap);
|
|
399
|
-
}
|
|
400
|
-
const results = [];
|
|
401
|
-
for (const item of items) {
|
|
402
|
-
const key = item.resource;
|
|
403
|
-
const id = _chunkWTVLHMZAcjs.parseIdentifier.call(void 0, item.id, `items[${results.length}].id`);
|
|
404
|
-
const holder = client[_chunkWTVLHMZAcjs.camelKey.call(void 0, key)];
|
|
405
|
-
if (holder === void 0) {
|
|
406
|
-
throw new (0, _chunkWTVLHMZAcjs.AutotaskConfigError)(`fetchMany: the client exposes no accessor for resource "${key}"`, {
|
|
407
|
-
suggestedAction: "Rebuild the client from the SDK build that ships this registry (the resource set is pinned by the plan)."
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
try {
|
|
411
|
-
const value = await holder.get(id);
|
|
412
|
-
results.push({ resource: key, id, found: true, value: item.fields !== void 0 ? project(value, item.fields) : value });
|
|
413
|
-
} catch (err) {
|
|
414
|
-
if (err instanceof _chunkWTVLHMZAcjs.NotFoundError) {
|
|
415
|
-
results.push({ resource: key, id, found: false, value: null, error: { code: "NOT_FOUND", message: err.message } });
|
|
416
|
-
} else if (_chunkWTVLHMZAcjs.isAutotaskError.call(void 0, err) && err.code !== "ABORTED") {
|
|
417
|
-
const e = { code: err.code, message: err.message };
|
|
418
|
-
if (err.httpStatus !== void 0) e.httpStatus = err.httpStatus;
|
|
419
|
-
results.push({ resource: key, id, found: false, value: null, error: e });
|
|
420
|
-
} else {
|
|
421
|
-
throw err;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
181
|
+
var pad2 = (n) => String(n).padStart(2, "0");
|
|
182
|
+
function isoWeekLabel(ms) {
|
|
183
|
+
const d = new Date(ms);
|
|
184
|
+
const dow = d.getUTCDay() || 7;
|
|
185
|
+
const S = d.getUTCFullYear() < 200 ? 100 : 0;
|
|
186
|
+
const thu = new Date(Date.UTC(d.getUTCFullYear() + S, d.getUTCMonth(), d.getUTCDate() + (4 - dow)));
|
|
187
|
+
const isoYear = thu.getUTCFullYear() - S;
|
|
188
|
+
const week = Math.ceil(((thu.getTime() - Date.UTC(thu.getUTCFullYear(), 0, 1)) / 864e5 + 1) / 7);
|
|
189
|
+
return `${isoYear}-W${pad2(week)}`;
|
|
190
|
+
}
|
|
191
|
+
function dateBucketLabel(value, bucket) {
|
|
192
|
+
if (value === null || value === void 0) return null;
|
|
193
|
+
const t = parseDateInstant(value);
|
|
194
|
+
if (t === null) return value;
|
|
195
|
+
const d = new Date(t);
|
|
196
|
+
switch (bucket) {
|
|
197
|
+
case "month":
|
|
198
|
+
return `${d.getUTCFullYear()}-${pad2(d.getUTCMonth() + 1)}`;
|
|
199
|
+
case "year":
|
|
200
|
+
return `${d.getUTCFullYear()}`;
|
|
201
|
+
case "week":
|
|
202
|
+
return isoWeekLabel(t);
|
|
424
203
|
}
|
|
425
|
-
const ok = results.filter((r) => r.found).length;
|
|
426
|
-
return { results, ok, failed: results.length - ok };
|
|
427
204
|
}
|
|
428
|
-
|
|
429
|
-
// src/operations/aggregate.ts
|
|
430
|
-
var AGGREGATE_TOP_MAX = 100;
|
|
431
|
-
var AGGREGATE_DEFAULT_TOP = 25;
|
|
432
|
-
var AGGREGATE_DEFAULT_LIMIT = _chunkWTVLHMZAcjs.BOUNDED_QUERY_MAX_LIMIT;
|
|
433
205
|
var QUERY_RESOURCE_KEYS = (() => {
|
|
434
206
|
const s = /* @__PURE__ */ new Set();
|
|
435
|
-
for (const rec of
|
|
207
|
+
for (const rec of _chunkJKZVCFRYcjs.CAPABILITIES) if (rec.operation === "query") s.add(rec.resource);
|
|
436
208
|
return s;
|
|
437
209
|
})();
|
|
438
210
|
var AGGREGATE_OPT_KEYS = ["groupBy", "sum", "top", "limit"];
|
|
@@ -467,14 +239,14 @@ function validateAggregate(operation, filter, opts) {
|
|
|
467
239
|
conditions = [];
|
|
468
240
|
} else {
|
|
469
241
|
try {
|
|
470
|
-
conditions =
|
|
242
|
+
conditions = _chunk5N6DYKXOcjs.buildFilter.call(void 0, conds).filter;
|
|
471
243
|
} catch (err) {
|
|
472
|
-
problems.push(err instanceof
|
|
244
|
+
problems.push(err instanceof _chunk5N6DYKXOcjs.AutotaskConfigError ? err.message : `filter must be the query-bag filter (13 operators; caps 500 OR-conditions / 1 UDF / 8000 chars); ${String(err)}`);
|
|
473
245
|
}
|
|
474
246
|
}
|
|
475
247
|
}
|
|
476
248
|
if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
|
|
477
|
-
throw new (0,
|
|
249
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
478
250
|
`aggregate: opts must be the options object (got ${Array.isArray(opts) ? "an array" : typeof opts})`,
|
|
479
251
|
{ operation: "operations.aggregate" }
|
|
480
252
|
);
|
|
@@ -484,7 +256,8 @@ function validateAggregate(operation, filter, opts) {
|
|
|
484
256
|
problems.push(`unknown opts key "${key}" \u2014 the bag is closed: ${AGGREGATE_OPT_KEYS.join(", ")}`);
|
|
485
257
|
}
|
|
486
258
|
}
|
|
487
|
-
const fieldSets = resourceKey !== void 0 ? MODEL_FIELD_SETS[resourceKey] : void 0;
|
|
259
|
+
const fieldSets = resourceKey !== void 0 ? _chunk5N6DYKXOcjs.MODEL_FIELD_SETS[resourceKey] : void 0;
|
|
260
|
+
const dateSets = resourceKey !== void 0 ? _chunk5N6DYKXOcjs.MODEL_DATE_FIELDS[resourceKey] : void 0;
|
|
488
261
|
const checkFields = (name, fields) => {
|
|
489
262
|
if (fields === void 0) return [];
|
|
490
263
|
if (!Array.isArray(fields) || fields.length === 0 || fields.some((f) => typeof f !== "string" || f.trim() === "")) {
|
|
@@ -501,7 +274,39 @@ function validateAggregate(operation, filter, opts) {
|
|
|
501
274
|
}
|
|
502
275
|
return out;
|
|
503
276
|
};
|
|
504
|
-
const groupBy =
|
|
277
|
+
const groupBy = [];
|
|
278
|
+
if (opts.groupBy !== void 0) {
|
|
279
|
+
if (!Array.isArray(opts.groupBy) || opts.groupBy.length === 0 || opts.groupBy.some((f) => typeof f !== "string" || f.trim() === "")) {
|
|
280
|
+
problems.push("groupBy must be a non-empty array of exact vendor field names (a date-typed field may carry the closed bucket suffix @month | @week | @year \u2014 discover them via operations.fieldCatalog)");
|
|
281
|
+
} else {
|
|
282
|
+
for (const f of opts.groupBy) {
|
|
283
|
+
const at = f.indexOf("@");
|
|
284
|
+
if (at === -1) {
|
|
285
|
+
if (fieldSets === void 0 || !fieldSets.includes(f)) {
|
|
286
|
+
problems.push(`groupBy: "${f}" is not a field of ${resourceKey} \u2014 a hallucinated field is a shape error, not a silent fold-miss (exact vendor field names via operations.fieldCatalog)`);
|
|
287
|
+
} else {
|
|
288
|
+
groupBy.push({ name: f, base: f });
|
|
289
|
+
}
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
const base = f.slice(0, at);
|
|
293
|
+
const suffix = f.slice(at + 1);
|
|
294
|
+
if (!AGGREGATE_DATE_BUCKETS.includes(suffix)) {
|
|
295
|
+
problems.push(`groupBy: "${f}": unknown bucket suffix "${suffix}" \u2014 the closed set is month | week | year (the suffix applies to date-typed fields only)`);
|
|
296
|
+
continue;
|
|
297
|
+
}
|
|
298
|
+
if (fieldSets === void 0 || !fieldSets.includes(base)) {
|
|
299
|
+
problems.push(`groupBy: "${f}": "${base}" is not a field of ${resourceKey} \u2014 a hallucinated field is a shape error, not a silent fold-miss (exact vendor field names via operations.fieldCatalog)`);
|
|
300
|
+
continue;
|
|
301
|
+
}
|
|
302
|
+
if (dateSets === void 0 || !dateSets.includes(base)) {
|
|
303
|
+
problems.push(`groupBy: "${f}": "${base}" is not a date field of ${resourceKey} (the @month/@week/@year bucket suffix applies to date-typed fields of the resource's vendored model \u2014 exact vendor field names via operations.fieldCatalog)`);
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
groupBy.push({ name: f, base, bucket: suffix });
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
505
310
|
const sum = checkFields("sum", opts.sum);
|
|
506
311
|
let top = AGGREGATE_DEFAULT_TOP;
|
|
507
312
|
if (opts.top !== void 0) {
|
|
@@ -516,11 +321,11 @@ function validateAggregate(operation, filter, opts) {
|
|
|
516
321
|
if (!Number.isInteger(opts.limit)) {
|
|
517
322
|
problems.push(`limit must be an integer (got ${String(opts.limit)})`);
|
|
518
323
|
} else {
|
|
519
|
-
limit = Math.min(Math.max(opts.limit, 1),
|
|
324
|
+
limit = Math.min(Math.max(opts.limit, 1), _chunk5N6DYKXOcjs.BOUNDED_QUERY_MAX_LIMIT);
|
|
520
325
|
}
|
|
521
326
|
}
|
|
522
327
|
if (problems.length > 0) {
|
|
523
|
-
throw new (0,
|
|
328
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
524
329
|
`aggregate: ${problems.length} problem(s) found pre-request (zero wire was issued)
|
|
525
330
|
- ` + problems.join("\n- "),
|
|
526
331
|
{ operation: "operations.aggregate" }
|
|
@@ -530,9 +335,9 @@ function validateAggregate(operation, filter, opts) {
|
|
|
530
335
|
}
|
|
531
336
|
async function aggregate(client, operation, filter, opts = {}) {
|
|
532
337
|
const v = validateAggregate(operation, filter, opts);
|
|
533
|
-
const holder = client[
|
|
338
|
+
const holder = client[_chunk5N6DYKXOcjs.camelKey.call(void 0, v.resourceKey)];
|
|
534
339
|
if (holder === void 0) {
|
|
535
|
-
throw new (0,
|
|
340
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(`aggregate: the client exposes no accessor for resource "${v.resourceKey}"`, {
|
|
536
341
|
operation: "operations.aggregate",
|
|
537
342
|
suggestedAction: "Rebuild the client from the SDK build that ships this registry (the resource set is pinned by the plan)."
|
|
538
343
|
});
|
|
@@ -551,9 +356,10 @@ async function aggregate(client, operation, filter, opts = {}) {
|
|
|
551
356
|
for (const item of res.items) {
|
|
552
357
|
const key = {};
|
|
553
358
|
const values = [];
|
|
554
|
-
for (const
|
|
555
|
-
const
|
|
556
|
-
|
|
359
|
+
for (const spec of v.groupBy) {
|
|
360
|
+
const raw = item[spec.base] === void 0 ? null : item[spec.base];
|
|
361
|
+
const value = spec.bucket === void 0 ? raw : dateBucketLabel(raw, spec.bucket);
|
|
362
|
+
key[spec.name] = value;
|
|
557
363
|
values.push(value);
|
|
558
364
|
}
|
|
559
365
|
const keyOrder = JSON.stringify(values);
|
|
@@ -582,148 +388,24 @@ async function aggregate(client, operation, filter, opts = {}) {
|
|
|
582
388
|
return result;
|
|
583
389
|
}
|
|
584
390
|
|
|
585
|
-
// src/operations/fetchByIds.ts
|
|
586
|
-
var FETCH_BY_IDS_MAX_ITEMS = 500;
|
|
587
|
-
var FETCH_BY_IDS_CHUNK_SIZE = 250;
|
|
588
|
-
function project2(value, fields) {
|
|
589
|
-
const out = {};
|
|
590
|
-
for (const f of fields) {
|
|
591
|
-
if (f in value) out[f] = value[f];
|
|
592
|
-
}
|
|
593
|
-
return out;
|
|
594
|
-
}
|
|
595
|
-
function resourcePathOf(key, holder) {
|
|
596
|
-
const path = _optionalChain([holder, 'optionalAccess', _5 => _5.resourcePath]);
|
|
597
|
-
if (typeof path !== "string" || path === "") {
|
|
598
|
-
throw new (0, _chunkWTVLHMZAcjs.AutotaskConfigError)(`fetchByIds: the client exposes no ${key} resource path (registry drift)`, {
|
|
599
|
-
suggestedAction: "Rebuild the client from the SDK build that ships this registry (the resource set is pinned by the plan)."
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
return path;
|
|
603
|
-
}
|
|
604
|
-
async function fetchByIds(client, items, opts = {}) {
|
|
605
|
-
if (opts.maxItems !== void 0) {
|
|
606
|
-
if (!Number.isInteger(opts.maxItems) || opts.maxItems < 1) {
|
|
607
|
-
throw new (0, _chunkWTVLHMZAcjs.AutotaskConfigError)(`fetchByIds: maxItems must be an integer >= 1 (got ${String(opts.maxItems)})`);
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
const cap = Math.min(FETCH_BY_IDS_MAX_ITEMS, _nullishCoalesce(opts.maxItems, () => ( FETCH_BY_IDS_MAX_ITEMS)));
|
|
611
|
-
validateFetchManyItems(items, cap, "fetchByIds", `FETCH_BY_IDS_MAX_ITEMS = ${FETCH_BY_IDS_MAX_ITEMS}`);
|
|
612
|
-
const groups = /* @__PURE__ */ new Map();
|
|
613
|
-
const canonical = [];
|
|
614
|
-
for (let i = 0; i < items.length; i += 1) {
|
|
615
|
-
const item = items[i];
|
|
616
|
-
const id = _chunkWTVLHMZAcjs.parseIdentifier.call(void 0, item.id, `items[${i}].id`);
|
|
617
|
-
canonical[i] = id;
|
|
618
|
-
const g = _nullishCoalesce(groups.get(item.resource), () => ( { indices: [], fields: /* @__PURE__ */ new Set(), anyFields: false }));
|
|
619
|
-
g.indices.push(i);
|
|
620
|
-
if (item.fields !== void 0) {
|
|
621
|
-
g.anyFields = true;
|
|
622
|
-
for (const f of item.fields) g.fields.add(f);
|
|
623
|
-
}
|
|
624
|
-
groups.set(item.resource, g);
|
|
625
|
-
}
|
|
626
|
-
const byKey = /* @__PURE__ */ new Map();
|
|
627
|
-
for (const [key, group] of groups) {
|
|
628
|
-
const holder = client[_chunkWTVLHMZAcjs.camelKey.call(void 0, key)];
|
|
629
|
-
if (holder === void 0) {
|
|
630
|
-
throw new (0, _chunkWTVLHMZAcjs.AutotaskConfigError)(`fetchByIds: the client exposes no accessor for resource "${key}"`, {
|
|
631
|
-
suggestedAction: "Rebuild the client from the SDK build that ships this registry (the resource set is pinned by the plan)."
|
|
632
|
-
});
|
|
633
|
-
}
|
|
634
|
-
const resourcePath = resourcePathOf(key, holder);
|
|
635
|
-
const unique = [];
|
|
636
|
-
const seen = /* @__PURE__ */ new Set();
|
|
637
|
-
for (const i of group.indices) {
|
|
638
|
-
const k = String(canonical[i]);
|
|
639
|
-
if (!seen.has(k)) {
|
|
640
|
-
seen.add(k);
|
|
641
|
-
unique.push(canonical[i]);
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
const includeFields = group.anyFields && group.indices.every((i) => items[i].fields !== void 0) ? [...group.fields] : void 0;
|
|
645
|
-
const kOf = (id) => `${key}:${String(id)}`;
|
|
646
|
-
for (let c = 0; c < unique.length; c += FETCH_BY_IDS_CHUNK_SIZE) {
|
|
647
|
-
const chunk = unique.slice(c, c + FETCH_BY_IDS_CHUNK_SIZE);
|
|
648
|
-
const chunkKeys = new Set(chunk.map((id) => String(id)));
|
|
649
|
-
try {
|
|
650
|
-
const req = _chunkWTVLHMZAcjs.buildQueryRequest.call(void 0, client.http.baseUrl, resourcePath, {
|
|
651
|
-
filter: [{ field: "id", op: "in", value: chunk }],
|
|
652
|
-
maxRecords: FETCH_BY_IDS_CHUNK_SIZE,
|
|
653
|
-
includeFields
|
|
654
|
-
});
|
|
655
|
-
const res = await client.http.request({ ...req, operation: `${key}.fetchByIds` });
|
|
656
|
-
const { items: rows } = _chunkWTVLHMZAcjs.unwrapItems.call(void 0, res, `${key}.fetchByIds`);
|
|
657
|
-
for (const row of rows) {
|
|
658
|
-
const k = String(row.id);
|
|
659
|
-
if (!chunkKeys.has(k)) continue;
|
|
660
|
-
const q = kOf(k);
|
|
661
|
-
if (!byKey.has(q)) byKey.set(q, { found: true, value: row });
|
|
662
|
-
}
|
|
663
|
-
} catch (err) {
|
|
664
|
-
if (_chunkWTVLHMZAcjs.isAutotaskError.call(void 0, err) && err.code !== "ABORTED") {
|
|
665
|
-
const e = { code: err.code, message: err.message };
|
|
666
|
-
if (err.httpStatus !== void 0) e.httpStatus = err.httpStatus;
|
|
667
|
-
for (const u of chunk) {
|
|
668
|
-
const q = kOf(u);
|
|
669
|
-
if (!byKey.has(q)) byKey.set(q, { found: false, value: null, error: e });
|
|
670
|
-
}
|
|
671
|
-
continue;
|
|
672
|
-
}
|
|
673
|
-
throw err;
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
for (const id of unique) {
|
|
677
|
-
const k = kOf(id);
|
|
678
|
-
if (byKey.has(k)) continue;
|
|
679
|
-
try {
|
|
680
|
-
const value = await holder.get(id);
|
|
681
|
-
byKey.set(k, { found: true, value });
|
|
682
|
-
} catch (err) {
|
|
683
|
-
if (err instanceof _chunkWTVLHMZAcjs.NotFoundError) {
|
|
684
|
-
byKey.set(k, { found: false, value: null, error: { code: "NOT_FOUND", message: err.message } });
|
|
685
|
-
} else if (_chunkWTVLHMZAcjs.isAutotaskError.call(void 0, err) && err.code !== "ABORTED") {
|
|
686
|
-
const e = { code: err.code, message: err.message };
|
|
687
|
-
if (err.httpStatus !== void 0) e.httpStatus = err.httpStatus;
|
|
688
|
-
byKey.set(k, { found: false, value: null, error: e });
|
|
689
|
-
} else {
|
|
690
|
-
throw err;
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
const results = [];
|
|
696
|
-
for (let i = 0; i < items.length; i += 1) {
|
|
697
|
-
const item = items[i];
|
|
698
|
-
const id = canonical[i];
|
|
699
|
-
const out = byKey.get(`${item.resource}:${String(id)}`);
|
|
700
|
-
const value = out.found ? item.fields !== void 0 ? project2(out.value, item.fields) : out.value : null;
|
|
701
|
-
results.push(
|
|
702
|
-
out.found ? { resource: item.resource, id, found: true, value } : { resource: item.resource, id, found: false, value: null, error: out.error }
|
|
703
|
-
);
|
|
704
|
-
}
|
|
705
|
-
const ok = results.filter((r) => r.found).length;
|
|
706
|
-
return { results, ok, failed: results.length - ok };
|
|
707
|
-
}
|
|
708
|
-
|
|
709
391
|
// src/operations/relationshipMap.ts
|
|
710
392
|
async function relationshipMap(client, resourceKey) {
|
|
711
393
|
void client;
|
|
712
394
|
if (typeof resourceKey !== "string" || resourceKey.trim() === "") {
|
|
713
|
-
throw new (0,
|
|
395
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
714
396
|
`relationshipMap: resourceKey must be a non-empty plan resource key string (e.g. 'tickets'; got ${typeof resourceKey === "string" ? "a blank string" : typeof resourceKey})`,
|
|
715
397
|
{ suggestedAction: "Pass the exact plan resource key (snake_case) from autotask_catalog \u2014 e.g. tickets, companies, configuration_items, ticket_notes." }
|
|
716
398
|
);
|
|
717
399
|
}
|
|
718
400
|
const key = resourceKey.trim();
|
|
719
|
-
const entry =
|
|
401
|
+
const entry = _chunk5N6DYKXOcjs.RELATIONSHIP_MAP[key];
|
|
720
402
|
if (entry === void 0) {
|
|
721
|
-
throw new (0,
|
|
722
|
-
`relationshipMap: unknown resource "${key}" \u2014 the plan has ${Object.keys(
|
|
403
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskError)(
|
|
404
|
+
`relationshipMap: unknown resource "${key}" \u2014 the plan has ${Object.keys(_chunk5N6DYKXOcjs.RELATIONSHIP_MAP).length} resources`,
|
|
723
405
|
{
|
|
724
406
|
code: "RESOURCE_UNKNOWN",
|
|
725
407
|
category: "validation",
|
|
726
|
-
suggestedAction: `Pass the exact plan resource key (snake_case) from autotask_catalog (e.g. tickets, companies, configuration_items). Zone facts served are ${
|
|
408
|
+
suggestedAction: `Pass the exact plan resource key (snake_case) from autotask_catalog (e.g. tickets, companies, configuration_items). Zone facts served are ${_chunk5N6DYKXOcjs.RELATIONSHIP_ZONE.label} (${_chunk5N6DYKXOcjs.RELATIONSHIP_ZONE.zone})-verified.`
|
|
727
409
|
}
|
|
728
410
|
);
|
|
729
411
|
}
|
|
@@ -740,24 +422,24 @@ var BLIND_SURFACE_KINDS = [
|
|
|
740
422
|
async function blindSurfaces(client, opts) {
|
|
741
423
|
void client;
|
|
742
424
|
if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
|
|
743
|
-
throw new (0,
|
|
425
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)("blindSurfaces: opts must be an object { resource?: string, kind?: BlindSurfaceKind }");
|
|
744
426
|
}
|
|
745
|
-
const inv =
|
|
427
|
+
const inv = _chunk5N6DYKXOcjs.BLIND_SURFACE_INVENTORY;
|
|
746
428
|
if (inv === null) {
|
|
747
|
-
throw new (0,
|
|
429
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)("blindSurfaces: the reachability inventory is absent from the generated artifact \u2014 re-run the build");
|
|
748
430
|
}
|
|
749
431
|
let surfaces = inv.surfaces;
|
|
750
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
432
|
+
if (_optionalChain([opts, 'optionalAccess', _ => _.resource]) !== void 0) {
|
|
751
433
|
const key = typeof opts.resource === "string" ? opts.resource.trim() : "";
|
|
752
434
|
if (key === "") {
|
|
753
|
-
throw new (0,
|
|
435
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
754
436
|
"blindSurfaces: opts.resource must be a non-empty plan resource key string (e.g. 'tickets')",
|
|
755
437
|
{ suggestedAction: "Pass the exact plan resource key (snake_case) from autotask_catalog \u2014 e.g. tickets, companies, configuration_items." }
|
|
756
438
|
);
|
|
757
439
|
}
|
|
758
440
|
if (!inv.surfaces.some((row) => row.resource === key)) {
|
|
759
|
-
throw new (0,
|
|
760
|
-
`blindSurfaces: unknown resource "${key}" \u2014 the plan has ${Object.keys(
|
|
441
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskError)(
|
|
442
|
+
`blindSurfaces: unknown resource "${key}" \u2014 the plan has ${Object.keys(_chunk5N6DYKXOcjs.RELATIONSHIP_MAP).length} resources`,
|
|
761
443
|
{
|
|
762
444
|
code: "RESOURCE_UNKNOWN",
|
|
763
445
|
category: "validation",
|
|
@@ -767,9 +449,9 @@ async function blindSurfaces(client, opts) {
|
|
|
767
449
|
}
|
|
768
450
|
surfaces = surfaces.filter((row) => row.resource === key);
|
|
769
451
|
}
|
|
770
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
452
|
+
if (_optionalChain([opts, 'optionalAccess', _2 => _2.kind]) !== void 0) {
|
|
771
453
|
if (!BLIND_SURFACE_KINDS.includes(opts.kind)) {
|
|
772
|
-
throw new (0,
|
|
454
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
773
455
|
`blindSurfaces: unknown kind "${String(opts.kind)}" \u2014 the valid classes are: ${BLIND_SURFACE_KINDS.join(", ")}`,
|
|
774
456
|
{ suggestedAction: `Filter with one of: ${BLIND_SURFACE_KINDS.join(", ")} (or omit kind for the full 116-surface inventory).` }
|
|
775
457
|
);
|
|
@@ -782,51 +464,51 @@ async function blindSurfaces(client, opts) {
|
|
|
782
464
|
// src/operations/probeReachability.ts
|
|
783
465
|
async function probeReachability(client, opts) {
|
|
784
466
|
if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
|
|
785
|
-
throw new (0,
|
|
467
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)("probeReachability: opts must be an object { resources?: string[], limit?: 1|2, maxWireCalls?: number, confirmProbe?: true }");
|
|
786
468
|
}
|
|
787
|
-
const defs =
|
|
788
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
789
|
-
throw new (0,
|
|
469
|
+
const defs = _chunk5N6DYKXOcjs.REACHABILITY_PROBE_DEFAULTS;
|
|
470
|
+
if (_optionalChain([opts, 'optionalAccess', _3 => _3.confirmProbe]) !== true) {
|
|
471
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
790
472
|
"probeReachability: confirmProbe: true is required \u2014 the op deliberately fans out read wire across the tenant (one bounded query per surface); pass confirmProbe: true to run it",
|
|
791
473
|
{ suggestedAction: `Re-call with { confirmProbe: true } (plus resources/limit/maxWireCalls as needed). For the ZERO-wire pinned inventory use operations.blindSurfaces.` }
|
|
792
474
|
);
|
|
793
475
|
}
|
|
794
|
-
const limit = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
476
|
+
const limit = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _4 => _4.limit]), () => ( defs.limitDefault));
|
|
795
477
|
if (!Number.isInteger(limit) || limit < 1 || limit > defs.limitMax) {
|
|
796
|
-
throw new (0,
|
|
478
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
797
479
|
`probeReachability: limit must be an integer 1..${defs.limitMax} (got ${String(limit)}) \u2014 the rows-per-surface bound for the discovery read`
|
|
798
480
|
);
|
|
799
481
|
}
|
|
800
|
-
const cap = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
482
|
+
const cap = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _5 => _5.maxWireCalls]), () => ( defs.defaultCap));
|
|
801
483
|
if (!Number.isInteger(cap) || cap < 1) {
|
|
802
|
-
throw new (0,
|
|
484
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(`probeReachability: maxWireCalls must be a positive integer (got ${String(cap)})`);
|
|
803
485
|
}
|
|
804
486
|
if (cap > defs.hardCap) {
|
|
805
|
-
throw new (0,
|
|
487
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
806
488
|
`probeReachability: maxWireCalls ${cap} exceeds the hard wire cap of ${defs.hardCap} \u2014 the sweep is refused above it (never capped silently)`,
|
|
807
489
|
{ suggestedAction: `Pass maxWireCalls \u2264 ${defs.hardCap} and a resources set no larger than the cap (the refused set is never truncated).` }
|
|
808
490
|
);
|
|
809
491
|
}
|
|
810
|
-
const inv =
|
|
492
|
+
const inv = _chunk5N6DYKXOcjs.BLIND_SURFACE_INVENTORY;
|
|
811
493
|
if (inv === null) {
|
|
812
|
-
throw new (0,
|
|
494
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)("probeReachability: the reachability inventory is absent from the generated artifact \u2014 re-run the build");
|
|
813
495
|
}
|
|
814
496
|
let targets;
|
|
815
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
497
|
+
if (_optionalChain([opts, 'optionalAccess', _6 => _6.resources]) === void 0) {
|
|
816
498
|
targets = [...defs.defaultTargets];
|
|
817
499
|
} else {
|
|
818
500
|
if (!Array.isArray(opts.resources) || opts.resources.length === 0) {
|
|
819
|
-
throw new (0,
|
|
501
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)("probeReachability: opts.resources must be a non-empty string[] of plan resource keys (or omit it for the default non-data-full set)");
|
|
820
502
|
}
|
|
821
503
|
const seen = /* @__PURE__ */ new Set();
|
|
822
504
|
for (const r of opts.resources) {
|
|
823
505
|
if (typeof r !== "string" || r.trim() === "") {
|
|
824
|
-
throw new (0,
|
|
506
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(`probeReachability: opts.resources must contain non-empty plan resource key strings (got ${typeof r === "string" && r.trim() === "" ? "a blank string" : typeof r})`);
|
|
825
507
|
}
|
|
826
508
|
const key = r.trim();
|
|
827
509
|
if (!inv.surfaces.some((row) => row.resource === key)) {
|
|
828
510
|
const surfaceCount = new Set(inv.surfaces.map((s) => s.resource)).size;
|
|
829
|
-
throw new (0,
|
|
511
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskError)(
|
|
830
512
|
`probeReachability: unknown resource "${key}" \u2014 the inventory has ${surfaceCount} surfaces`,
|
|
831
513
|
{
|
|
832
514
|
code: "RESOURCE_UNKNOWN",
|
|
@@ -840,7 +522,7 @@ async function probeReachability(client, opts) {
|
|
|
840
522
|
targets = [...seen];
|
|
841
523
|
}
|
|
842
524
|
if (targets.length > cap) {
|
|
843
|
-
throw new (0,
|
|
525
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
844
526
|
`probeReachability: ${targets.length} requested surface(s) exceed the wire cap of ${cap} \u2014 the sweep is refused above its cap (never truncated)`,
|
|
845
527
|
{ suggestedAction: `Raise maxWireCalls (\u2264 ${defs.hardCap}) to cover the set, or pass a smaller resources list.` }
|
|
846
528
|
);
|
|
@@ -850,8 +532,8 @@ async function probeReachability(client, opts) {
|
|
|
850
532
|
for (const resource of targets.sort()) {
|
|
851
533
|
const row = byResource.get(resource);
|
|
852
534
|
if (row === void 0) continue;
|
|
853
|
-
const holder = client[
|
|
854
|
-
const probeFn = _optionalChain([holder, 'optionalAccess',
|
|
535
|
+
const holder = client[_chunk5N6DYKXOcjs.camelKey.call(void 0, resource)];
|
|
536
|
+
const probeFn = _optionalChain([holder, 'optionalAccess', _7 => _7.queryBounded]);
|
|
855
537
|
if (typeof probeFn !== "function") {
|
|
856
538
|
results.push({
|
|
857
539
|
...row,
|
|
@@ -862,14 +544,14 @@ async function probeReachability(client, opts) {
|
|
|
862
544
|
}
|
|
863
545
|
try {
|
|
864
546
|
const res = await probeFn.call(holder, { limit });
|
|
865
|
-
const items = Array.isArray(_optionalChain([res, 'optionalAccess',
|
|
547
|
+
const items = Array.isArray(_optionalChain([res, 'optionalAccess', _8 => _8.items])) ? res.items : [];
|
|
866
548
|
results.push({
|
|
867
549
|
...row,
|
|
868
550
|
unfilteredRows: items.length,
|
|
869
551
|
probe: { ok: true, wire: 1, error: null }
|
|
870
552
|
});
|
|
871
553
|
} catch (err) {
|
|
872
|
-
const code =
|
|
554
|
+
const code = _chunk5N6DYKXOcjs.isAutotaskError.call(void 0, err) ? err.code : "NETWORK_ERROR";
|
|
873
555
|
const message = err instanceof Error ? err.message : String(err);
|
|
874
556
|
results.push({
|
|
875
557
|
...row,
|
|
@@ -897,24 +579,24 @@ var CREATE_BLOCKER_KINDS = [
|
|
|
897
579
|
async function createGuidance(client, opts) {
|
|
898
580
|
void client;
|
|
899
581
|
if (opts !== void 0 && (typeof opts !== "object" || opts === null || Array.isArray(opts))) {
|
|
900
|
-
throw new (0,
|
|
582
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
901
583
|
"createGuidance: opts must be an object { resources?: string[], kind?: CreateBlockerKind }"
|
|
902
584
|
);
|
|
903
585
|
}
|
|
904
|
-
let rows =
|
|
905
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
586
|
+
let rows = _chunk5N6DYKXOcjs.CREATE_GUIDANCE.rows;
|
|
587
|
+
if (_optionalChain([opts, 'optionalAccess', _9 => _9.resources]) !== void 0) {
|
|
906
588
|
if (!Array.isArray(opts.resources) || opts.resources.length === 0) {
|
|
907
|
-
throw new (0,
|
|
589
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)("createGuidance: opts.resources must be a non-empty string[] of plan resource keys");
|
|
908
590
|
}
|
|
909
591
|
const wanted = /* @__PURE__ */ new Set();
|
|
910
592
|
for (const r of opts.resources) {
|
|
911
593
|
if (typeof r !== "string" || r.trim() === "") {
|
|
912
|
-
throw new (0,
|
|
594
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)("createGuidance: opts.resources must contain non-empty plan resource key strings");
|
|
913
595
|
}
|
|
914
596
|
const key = r.trim();
|
|
915
|
-
if (!
|
|
916
|
-
throw new (0,
|
|
917
|
-
`createGuidance: unknown resource "${key}" \u2014 the catalog has ${
|
|
597
|
+
if (!_chunk5N6DYKXOcjs.CREATE_GUIDANCE.rows.some((row) => row.resource === key)) {
|
|
598
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskError)(
|
|
599
|
+
`createGuidance: unknown resource "${key}" \u2014 the catalog has ${_chunk5N6DYKXOcjs.CREATE_GUIDANCE.rows.length} create entities`,
|
|
918
600
|
{
|
|
919
601
|
code: "RESOURCE_UNKNOWN",
|
|
920
602
|
category: "validation",
|
|
@@ -926,20 +608,20 @@ async function createGuidance(client, opts) {
|
|
|
926
608
|
}
|
|
927
609
|
rows = rows.filter((row) => wanted.has(row.resource));
|
|
928
610
|
}
|
|
929
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
611
|
+
if (_optionalChain([opts, 'optionalAccess', _10 => _10.kind]) !== void 0) {
|
|
930
612
|
if (!CREATE_BLOCKER_KINDS.includes(opts.kind)) {
|
|
931
|
-
throw new (0,
|
|
613
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
932
614
|
`createGuidance: unknown kind "${String(opts.kind)}" \u2014 the valid kinds are: ${CREATE_BLOCKER_KINDS.join(", ")}`
|
|
933
615
|
);
|
|
934
616
|
}
|
|
935
|
-
rows = rows.filter((row) => _optionalChain([row, 'access',
|
|
617
|
+
rows = rows.filter((row) => _optionalChain([row, 'access', _11 => _11.blocker, 'optionalAccess', _12 => _12.kind]) === opts.kind);
|
|
936
618
|
}
|
|
937
619
|
return {
|
|
938
|
-
zone:
|
|
939
|
-
label:
|
|
940
|
-
verifiedAt:
|
|
620
|
+
zone: _chunk5N6DYKXOcjs.CREATE_GUIDANCE.zone,
|
|
621
|
+
label: _chunk5N6DYKXOcjs.CREATE_GUIDANCE.label,
|
|
622
|
+
verifiedAt: _chunk5N6DYKXOcjs.CREATE_GUIDANCE.verifiedAt,
|
|
941
623
|
rows,
|
|
942
|
-
counts:
|
|
624
|
+
counts: _chunk5N6DYKXOcjs.CREATE_GUIDANCE.counts
|
|
943
625
|
};
|
|
944
626
|
}
|
|
945
627
|
|
|
@@ -948,7 +630,7 @@ var RECOVERY_CONFIRM = "operations.recovery";
|
|
|
948
630
|
var RECOVERY_DEFAULT_LIMIT = 25;
|
|
949
631
|
var RECOVERY_MAX_LIMIT = 100;
|
|
950
632
|
function configError(message, operation, suggestedAction) {
|
|
951
|
-
throw new (0,
|
|
633
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(message, { operation, suggestedAction });
|
|
952
634
|
}
|
|
953
635
|
function parseMatchId(record) {
|
|
954
636
|
const raw = record.id;
|
|
@@ -965,7 +647,7 @@ function parseMatchId(record) {
|
|
|
965
647
|
}
|
|
966
648
|
async function recovery(client, input, opts = {}) {
|
|
967
649
|
const operation = RECOVERY_CONFIRM;
|
|
968
|
-
if (!
|
|
650
|
+
if (!_chunk5N6DYKXOcjs.isRecord.call(void 0, input)) {
|
|
969
651
|
configError(
|
|
970
652
|
`recovery: input must be an object { resource, marker, ... } (got ${typeof input})`,
|
|
971
653
|
operation,
|
|
@@ -996,10 +678,10 @@ async function recovery(client, input, opts = {}) {
|
|
|
996
678
|
"Pass action: 'delete' for the destructive path (dry-run-first; the apply requires the confirm string)."
|
|
997
679
|
);
|
|
998
680
|
}
|
|
999
|
-
const entry =
|
|
681
|
+
const entry = _chunk5N6DYKXOcjs.RELATIONSHIP_MAP[resource];
|
|
1000
682
|
if (entry === void 0) {
|
|
1001
|
-
throw new (0,
|
|
1002
|
-
`recovery: unknown resource "${resource}" \u2014 the plan has ${Object.keys(
|
|
683
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskError)(
|
|
684
|
+
`recovery: unknown resource "${resource}" \u2014 the plan has ${Object.keys(_chunk5N6DYKXOcjs.RELATIONSHIP_MAP).length} resources`,
|
|
1003
685
|
{
|
|
1004
686
|
code: "RESOURCE_UNKNOWN",
|
|
1005
687
|
category: "validation",
|
|
@@ -1008,7 +690,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1008
690
|
}
|
|
1009
691
|
);
|
|
1010
692
|
}
|
|
1011
|
-
const holder = client[
|
|
693
|
+
const holder = client[_chunk5N6DYKXOcjs.camelKey.call(void 0, resource)];
|
|
1012
694
|
if (!holder || typeof holder.queryBounded !== "function") {
|
|
1013
695
|
configError(
|
|
1014
696
|
`recovery: ${resource} exposes no bounded query surface \u2014 the marker search cannot run`,
|
|
@@ -1016,7 +698,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1016
698
|
"Use a resource with a query surface, or address the record by id directly (get/fetchMany)."
|
|
1017
699
|
);
|
|
1018
700
|
}
|
|
1019
|
-
const field = input.field !== void 0 ? String(input.field) :
|
|
701
|
+
const field = input.field !== void 0 ? String(input.field) : _chunk5N6DYKXOcjs.MARKER_FIELDS[resource];
|
|
1020
702
|
if (typeof field !== "string" || field.trim() === "") {
|
|
1021
703
|
configError(
|
|
1022
704
|
`recovery: ${resource} has no plan markerField and no input.field was passed \u2014 the marker search needs a name-like field to filter on`,
|
|
@@ -1052,7 +734,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1052
734
|
);
|
|
1053
735
|
}
|
|
1054
736
|
for (const c of input.filter) {
|
|
1055
|
-
if (!
|
|
737
|
+
if (!_chunk5N6DYKXOcjs.isRecord.call(void 0, c) || typeof c.op !== "string" || c.op === "and" || c.op === "or") {
|
|
1056
738
|
configError(
|
|
1057
739
|
"recovery: input.filter accepts only plain leaf conditions ({ field, op, value }) \u2014 no grouping",
|
|
1058
740
|
operation,
|
|
@@ -1073,7 +755,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1073
755
|
}
|
|
1074
756
|
limit = input.limit;
|
|
1075
757
|
}
|
|
1076
|
-
const boundaryNote =
|
|
758
|
+
const boundaryNote = _chunk5N6DYKXOcjs.DELETE_BOUNDARY_NOTES[resource];
|
|
1077
759
|
const boundary = {
|
|
1078
760
|
available: boundaryNote === void 0,
|
|
1079
761
|
reason: _nullishCoalesce(boundaryNote, () => ( null)),
|
|
@@ -1085,7 +767,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1085
767
|
};
|
|
1086
768
|
const isDelete = action === "delete";
|
|
1087
769
|
if (isDelete && boundaryNote !== void 0) {
|
|
1088
|
-
throw new (0,
|
|
770
|
+
throw new (0, _chunk5N6DYKXOcjs.DeleteBoundaryError)(
|
|
1089
771
|
`recovery: the vendor defines no DELETE for ${resource} \u2014 the delete cannot be issued through the API (zero wire was issued)`,
|
|
1090
772
|
{
|
|
1091
773
|
operation,
|
|
@@ -1094,10 +776,10 @@ async function recovery(client, input, opts = {}) {
|
|
|
1094
776
|
}
|
|
1095
777
|
);
|
|
1096
778
|
}
|
|
1097
|
-
const dryRun = _optionalChain([opts, 'optionalAccess',
|
|
1098
|
-
const confirm = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
779
|
+
const dryRun = _optionalChain([opts, 'optionalAccess', _13 => _13.dryRun]) !== false;
|
|
780
|
+
const confirm = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _14 => _14.confirm]), () => ( input.confirm));
|
|
1099
781
|
if (isDelete && !dryRun && confirm !== RECOVERY_CONFIRM) {
|
|
1100
|
-
throw new (0,
|
|
782
|
+
throw new (0, _chunk5N6DYKXOcjs.ConfirmationRequiredError)(
|
|
1101
783
|
`recovery: action 'delete' apply is destructive and requires its confirmation flag: pass confirm: "${RECOVERY_CONFIRM}"`,
|
|
1102
784
|
{
|
|
1103
785
|
operation: RECOVERY_CONFIRM,
|
|
@@ -1113,7 +795,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1113
795
|
const query = await holder.queryBounded({ filter: conditions, limit });
|
|
1114
796
|
if (query.hasMore) {
|
|
1115
797
|
const wire = isDelete ? "DELETE wire" : "mutating wire";
|
|
1116
|
-
throw new (0,
|
|
798
|
+
throw new (0, _chunk5N6DYKXOcjs.RecoveryTruncatedError)(
|
|
1117
799
|
`recovery: the marker search on ${resource} TRIPPED its match cap (${limit}) \u2014 more matches exist than were returned (zero ${wire} was issued)`,
|
|
1118
800
|
{
|
|
1119
801
|
operation,
|
|
@@ -1152,7 +834,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1152
834
|
return { ...base, simulated: true, dryRun: true };
|
|
1153
835
|
}
|
|
1154
836
|
if (unsafeId) {
|
|
1155
|
-
throw new (0,
|
|
837
|
+
throw new (0, _chunk5N6DYKXOcjs.MarkerUnsafeIdError)(
|
|
1156
838
|
`recovery: ${unsafeIds.length} of ${matches.length} match(es) on ${resource} have ids beyond Number.MAX_SAFE_INTEGER \u2014 they CANNOT be addressed through the SDK's typed delete surface (zero DELETE wire was issued)`,
|
|
1157
839
|
{
|
|
1158
840
|
operation,
|
|
@@ -1163,7 +845,7 @@ async function recovery(client, input, opts = {}) {
|
|
|
1163
845
|
}
|
|
1164
846
|
const deleteMethod = holder.delete;
|
|
1165
847
|
if (deleteMethod === void 0) {
|
|
1166
|
-
throw new (0,
|
|
848
|
+
throw new (0, _chunk5N6DYKXOcjs.DeleteBoundaryError)(
|
|
1167
849
|
`recovery: ${resource} has no delete method on the client \u2014 the boundary is marked available in the plan but the typed delete surface is missing`,
|
|
1168
850
|
{
|
|
1169
851
|
operation,
|
|
@@ -1192,14 +874,14 @@ async function recovery(client, input, opts = {}) {
|
|
|
1192
874
|
verify = "still-present";
|
|
1193
875
|
}
|
|
1194
876
|
} catch (err) {
|
|
1195
|
-
if (err instanceof
|
|
877
|
+
if (err instanceof _chunk5N6DYKXOcjs.NotFoundError) verify = "not-found";
|
|
1196
878
|
else {
|
|
1197
879
|
verify = "error";
|
|
1198
|
-
code =
|
|
880
|
+
code = _chunk5N6DYKXOcjs.isAutotaskError.call(void 0, err) ? err.code : "SERVER_ERROR";
|
|
1199
881
|
}
|
|
1200
882
|
}
|
|
1201
883
|
} catch (err) {
|
|
1202
|
-
code =
|
|
884
|
+
code = _chunk5N6DYKXOcjs.isAutotaskError.call(void 0, err) ? err.code : "SERVER_ERROR";
|
|
1203
885
|
}
|
|
1204
886
|
deleted.push({ id, verified: verify === "not-found", code });
|
|
1205
887
|
}
|
|
@@ -1207,13 +889,13 @@ async function recovery(client, input, opts = {}) {
|
|
|
1207
889
|
}
|
|
1208
890
|
|
|
1209
891
|
// src/operations/invoke.ts
|
|
1210
|
-
var RECORDS =
|
|
892
|
+
var RECORDS = _chunkJKZVCFRYcjs.CAPABILITIES;
|
|
1211
893
|
var byId = new Map(RECORDS.map((r) => [r.id, r]));
|
|
1212
894
|
function needsConfirmation(record) {
|
|
1213
895
|
return record.effect === "destructive" || (_nullishCoalesce(record.flags, () => ( []))).includes("requiresApproval");
|
|
1214
896
|
}
|
|
1215
897
|
function refuse(message, operation, suggestedAction) {
|
|
1216
|
-
throw new (0,
|
|
898
|
+
throw new (0, _chunk5N6DYKXOcjs.ConfirmationRequiredError)(message, { operation, suggestedAction });
|
|
1217
899
|
}
|
|
1218
900
|
var MODE_BY_EFFECT = {
|
|
1219
901
|
read: "read",
|
|
@@ -1257,7 +939,7 @@ function looseTypeOk(type, value) {
|
|
|
1257
939
|
case "string[]":
|
|
1258
940
|
return Array.isArray(value) && value.every((v) => typeof v === "string");
|
|
1259
941
|
case "object":
|
|
1260
|
-
return
|
|
942
|
+
return _chunk5N6DYKXOcjs.isRecord.call(void 0, value);
|
|
1261
943
|
default:
|
|
1262
944
|
return true;
|
|
1263
945
|
}
|
|
@@ -1274,7 +956,7 @@ function validateDispatchArgs(record, argsIn) {
|
|
|
1274
956
|
const schema = _nullishCoalesce(record.inputSchema, () => ( {}));
|
|
1275
957
|
const names = Object.keys(schema);
|
|
1276
958
|
if (args.length > names.length) {
|
|
1277
|
-
throw new (0,
|
|
959
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
1278
960
|
`invoke: "${operation}" declares ${names.length} positional arg(s) (${declaredArgList(record)}) but ${args.length} were passed \u2014 extra args are refused, not dropped (v0.2.0 silently dropped them)`,
|
|
1279
961
|
{
|
|
1280
962
|
operation,
|
|
@@ -1284,7 +966,7 @@ function validateDispatchArgs(record, argsIn) {
|
|
|
1284
966
|
}
|
|
1285
967
|
const required = names.filter((n) => schema[n].required);
|
|
1286
968
|
if (args.length < required.length) {
|
|
1287
|
-
throw new (0,
|
|
969
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
1288
970
|
`invoke: "${operation}" requires ${required.length} positional arg(s) (${required.map((n) => `${n}: ${schema[n].type}`).join(", ")}) but only ${args.length} were passed \u2014 declared args: ${declaredArgList(record)}`,
|
|
1289
971
|
{ operation }
|
|
1290
972
|
);
|
|
@@ -1295,7 +977,7 @@ function validateDispatchArgs(record, argsIn) {
|
|
|
1295
977
|
const name = names[i];
|
|
1296
978
|
const spec = schema[name];
|
|
1297
979
|
if (!looseTypeOk(spec.type, value)) {
|
|
1298
|
-
throw new (0,
|
|
980
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
1299
981
|
`invoke: "${operation}" arg ${i + 1} is declared ${name}: ${spec.type} \u2014 the value has the wrong type (pass a ${spec.type} value)`,
|
|
1300
982
|
{ operation }
|
|
1301
983
|
);
|
|
@@ -1346,12 +1028,12 @@ function validateParamsBag(record, args) {
|
|
|
1346
1028
|
if (record.inputSchemaStrict !== true) return;
|
|
1347
1029
|
const valid = PARAMS_BAG_KEYS[record.operation];
|
|
1348
1030
|
if (valid === void 0) return;
|
|
1349
|
-
const bag = _optionalChain([args, 'optionalAccess',
|
|
1350
|
-
if (bag === void 0 || bag === null || !
|
|
1031
|
+
const bag = _optionalChain([args, 'optionalAccess', _15 => _15[0]]);
|
|
1032
|
+
if (bag === void 0 || bag === null || !_chunk5N6DYKXOcjs.isRecord.call(void 0, bag)) return;
|
|
1351
1033
|
const unknown = Object.keys(bag).filter((k) => !valid.includes(k));
|
|
1352
1034
|
if (unknown.length === 0) return;
|
|
1353
1035
|
const suggestions = unknown.map((k) => [k, suggestForKey(k, valid)]).filter((pair) => pair[1] !== null).map(([k, s]) => `"${k}" \u2192 "${s}"`);
|
|
1354
|
-
throw new (0,
|
|
1036
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
1355
1037
|
`invoke: "${record.id}" params bag has unknown key(s) ${unknown.map((k) => `"${k}"`).join(", ")} \u2014 the bag is closed (valid keys: ${valid.join(", ")})`,
|
|
1356
1038
|
{
|
|
1357
1039
|
operation: record.id,
|
|
@@ -1365,7 +1047,7 @@ function validateInvokeOptions(opts, operation) {
|
|
|
1365
1047
|
const unknown = Object.keys(opts).filter((k) => !INVOKE_OPTION_KEYS.includes(k));
|
|
1366
1048
|
if (unknown.length === 0) return;
|
|
1367
1049
|
const suggestions = unknown.map((k) => [k, suggestForKey(k, ["dryRun", "confirm", "lastModifiedDate"])]).filter((pair) => pair[1] !== null).map(([k, s]) => `"${k}" \u2192 "${s}"`);
|
|
1368
|
-
throw new (0,
|
|
1050
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
1369
1051
|
`invoke: "${operation}" has unknown option key(s) ${unknown.map((k) => `"${k}"`).join(", ")} \u2014 the options set is closed (valid: dryRun, confirm, lastModifiedDate)`,
|
|
1370
1052
|
{
|
|
1371
1053
|
operation,
|
|
@@ -1378,7 +1060,7 @@ function unknownKeysRefusal(raw, validKeys, subject, operation) {
|
|
|
1378
1060
|
const unknown = Object.keys(raw).filter((k) => !validKeys.includes(k));
|
|
1379
1061
|
if (unknown.length === 0) return null;
|
|
1380
1062
|
const suggestions = unknown.map((k) => [k, suggestForKey(k, [...validKeys])]).filter((pair) => pair[1] !== null).map(([k, s]) => `"${k}" \u2192 "${s}"`);
|
|
1381
|
-
return new (0,
|
|
1063
|
+
return new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
1382
1064
|
`unknown ${subject} ${unknown.map((k) => `"${k}"`).join(", ")} \u2014 the ${subject} set is closed (valid keys: ${validKeys.join(", ")})`,
|
|
1383
1065
|
{
|
|
1384
1066
|
...operation !== void 0 ? { operation } : {},
|
|
@@ -1390,7 +1072,7 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
|
|
|
1390
1072
|
const args = _nullishCoalesce(argsIn, () => ( []));
|
|
1391
1073
|
const record = byId.get(operation);
|
|
1392
1074
|
if (record === void 0) {
|
|
1393
|
-
throw new (0,
|
|
1075
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
1394
1076
|
`invoke: unknown operation "${operation}" \u2014 it is not in the capability registry`,
|
|
1395
1077
|
{ operation, suggestedAction: "List the registry (the ./capabilities subpath) for the exact operation key." }
|
|
1396
1078
|
);
|
|
@@ -1398,17 +1080,17 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
|
|
|
1398
1080
|
validateInvokeOptions(opts, operation);
|
|
1399
1081
|
const mode = opts.mode;
|
|
1400
1082
|
if (mode !== void 0 && MODE_BY_EFFECT[record.effect] !== mode) {
|
|
1401
|
-
throw new (0,
|
|
1083
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(crossModeRefusal(operation, record.effect, mode), { operation });
|
|
1402
1084
|
}
|
|
1403
1085
|
if (opts.dryRun !== void 0 && typeof opts.dryRun !== "boolean") {
|
|
1404
|
-
throw new (0,
|
|
1086
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
1405
1087
|
`invoke: dryRun must be a boolean (got ${typeof opts.dryRun}) \u2014 "${operation}" was not issued`,
|
|
1406
1088
|
{ operation, suggestedAction: "Pass dryRun: true (simulate) or dryRun: false (apply) as a real boolean." }
|
|
1407
1089
|
);
|
|
1408
1090
|
}
|
|
1409
1091
|
const isWrite = record.effect !== "read";
|
|
1410
1092
|
if (!isWrite && opts.dryRun === true) {
|
|
1411
|
-
throw new (0,
|
|
1093
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
1412
1094
|
`invoke: "${operation}" is a read \u2014 dryRun is not applicable (reads issue their request as-is)`,
|
|
1413
1095
|
{ operation }
|
|
1414
1096
|
);
|
|
@@ -1423,15 +1105,15 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
|
|
|
1423
1105
|
validateDispatchArgs(record, args);
|
|
1424
1106
|
validateParamsBag(record, args);
|
|
1425
1107
|
const boundedQuery = record.kind === "primitive" && record.operation === "query";
|
|
1426
|
-
let holder = client[
|
|
1108
|
+
let holder = client[_chunk5N6DYKXOcjs.camelKey.call(void 0, record.resource)];
|
|
1427
1109
|
if (typeof holder === "function") {
|
|
1428
|
-
holder = _nullishCoalesce(client[`${
|
|
1110
|
+
holder = _nullishCoalesce(client[`${_chunk5N6DYKXOcjs.camelKey.call(void 0, record.resource)}Resource`], () => ( holder));
|
|
1429
1111
|
}
|
|
1430
1112
|
if (holder === void 0 && record.resource === "operations") {
|
|
1431
1113
|
holder = {
|
|
1432
1114
|
resolveAny: (identifier, opts2) => resolveAny(client, identifier, opts2),
|
|
1433
1115
|
searchAcrossResources: (query, opts2) => searchAcrossResources(client, query, opts2),
|
|
1434
|
-
fetchMany: (items, opts2) => fetchMany(client, items, opts2),
|
|
1116
|
+
fetchMany: (items, opts2) => _chunk5N6DYKXOcjs.fetchMany.call(void 0, client, items, opts2),
|
|
1435
1117
|
// Issue #62: the generic aggregate + the cheap count — the
|
|
1436
1118
|
// groupBy/sum-absent mode is ONE vendor /query/count (the S12-C blind
|
|
1437
1119
|
// sentinel rides through); the group/sum modes walk the named
|
|
@@ -1441,12 +1123,12 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
|
|
|
1441
1123
|
// Issue #59 PR-B: the bulk fetch by ids — query-first chunked `id in`
|
|
1442
1124
|
// reads + the per-id `get` fallback (blind-surface-safe; per-item
|
|
1443
1125
|
// typed outcomes reuse the fetchMany shapes).
|
|
1444
|
-
fetchByIds: (items, opts2) => fetchByIds(client, items, opts2),
|
|
1126
|
+
fetchByIds: (items, opts2) => _chunk5N6DYKXOcjs.fetchByIds.call(void 0, client, items, opts2),
|
|
1445
1127
|
// Issue #65: opt-in resource name expansion — per-id resources.get
|
|
1446
1128
|
// reads ONLY (never an id-in query — the resources table can be blind
|
|
1447
1129
|
// to count/query while per-id reads work); blind-marked rows for ids
|
|
1448
1130
|
// the API user cannot resolve; the name cache (default-on).
|
|
1449
|
-
expandResourceNames: (ids, opts2) =>
|
|
1131
|
+
expandResourceNames: (ids, opts2) => _chunk5N6DYKXOcjs.expandResourceNames.call(void 0, client, ids, opts2),
|
|
1450
1132
|
relationshipMap: (resourceKey) => relationshipMap(client, resourceKey),
|
|
1451
1133
|
// Issue #11: the served blind-surface inventory (zero wire) + the
|
|
1452
1134
|
// bounded caller-opted reachability sweep (read-only, confirmProbe-
|
|
@@ -1459,7 +1141,7 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
|
|
|
1459
1141
|
// entityInformation GETs (the op's own cap refuses over-cap fan-outs
|
|
1460
1142
|
// pre-request; per-resource failures are recorded on the row and
|
|
1461
1143
|
// never abort the call).
|
|
1462
|
-
fieldCatalog: (opts2) =>
|
|
1144
|
+
fieldCatalog: (opts2) => _chunk5N6DYKXOcjs.fieldCatalog.call(void 0, client, opts2),
|
|
1463
1145
|
// Issue #9: the one-call recovery/cleanup op — effect write in the
|
|
1464
1146
|
// registry (the governor's dry-run-first applies to it); the op's own
|
|
1465
1147
|
// confirm gate makes the destructive action deliberate (the governor
|
|
@@ -1468,7 +1150,7 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
|
|
|
1468
1150
|
};
|
|
1469
1151
|
}
|
|
1470
1152
|
if (holder === void 0) {
|
|
1471
|
-
throw new (0,
|
|
1153
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
1472
1154
|
`invoke: the client exposes no accessor for resource "${record.resource}"`,
|
|
1473
1155
|
{ operation }
|
|
1474
1156
|
);
|
|
@@ -1476,7 +1158,7 @@ async function invokeMode(client, operation, argsIn = [], opts = {}) {
|
|
|
1476
1158
|
const methodName = boundedQuery ? "queryBounded" : record.operation;
|
|
1477
1159
|
const method = holder[methodName];
|
|
1478
1160
|
if (typeof method !== "function") {
|
|
1479
|
-
throw new (0,
|
|
1161
|
+
throw new (0, _chunk5N6DYKXOcjs.AutotaskConfigError)(
|
|
1480
1162
|
`invoke: "${record.resource}.${methodName}" is not a callable method on the client`,
|
|
1481
1163
|
{ operation }
|
|
1482
1164
|
);
|
|
@@ -1578,4 +1260,6 @@ async function invokeDelete(client, operation, args = [], opts = {}) {
|
|
|
1578
1260
|
|
|
1579
1261
|
|
|
1580
1262
|
|
|
1581
|
-
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
exports.AGGREGATE_DATE_BUCKETS = AGGREGATE_DATE_BUCKETS; exports.AGGREGATE_DEFAULT_LIMIT = AGGREGATE_DEFAULT_LIMIT; exports.AGGREGATE_DEFAULT_TOP = AGGREGATE_DEFAULT_TOP; exports.AGGREGATE_TOP_MAX = AGGREGATE_TOP_MAX; exports.BLIND_SURFACE_KINDS = BLIND_SURFACE_KINDS; exports.CREATE_BLOCKER_KINDS = CREATE_BLOCKER_KINDS; exports.EXPAND_RESOURCE_NAMES_MAX_IDS = _chunk5N6DYKXOcjs.EXPAND_RESOURCE_NAMES_MAX_IDS; exports.FETCH_BY_IDS_CHUNK_SIZE = _chunk5N6DYKXOcjs.FETCH_BY_IDS_CHUNK_SIZE; exports.FETCH_BY_IDS_MAX_ITEMS = _chunk5N6DYKXOcjs.FETCH_BY_IDS_MAX_ITEMS; exports.FETCH_MANY_MAX_ITEMS = _chunk5N6DYKXOcjs.FETCH_MANY_MAX_ITEMS; exports.FIELD_CACHE_KINDS = _chunk5N6DYKXOcjs.FIELD_CACHE_KINDS; exports.FIELD_CATALOG_HONESTY_NOTE = _chunk5N6DYKXOcjs.FIELD_CATALOG_HONESTY_NOTE; exports.INVOKE_OPTION_KEYS = INVOKE_OPTION_KEYS; exports.MAX_FIELD_CATALOG_WIRE = _chunk5N6DYKXOcjs.MAX_FIELD_CATALOG_WIRE; exports.PARAMS_BAG_KEYS = PARAMS_BAG_KEYS; exports.PICKLIST_VALUE_NOT_SERVED_NOTE = _chunk5N6DYKXOcjs.PICKLIST_VALUE_NOT_SERVED_NOTE; exports.RECOVERY_CONFIRM = RECOVERY_CONFIRM; exports.RECOVERY_DEFAULT_LIMIT = RECOVERY_DEFAULT_LIMIT; exports.RECOVERY_MAX_LIMIT = RECOVERY_MAX_LIMIT; exports.WORKFLOW_RESOURCES = _chunk5N6DYKXOcjs.WORKFLOW_RESOURCES; exports.aggregate = aggregate; exports.blindSurfaces = blindSurfaces; exports.createGuidance = createGuidance; exports.dateBucketLabel = dateBucketLabel; exports.expandResourceNames = _chunk5N6DYKXOcjs.expandResourceNames; exports.fetchByIds = _chunk5N6DYKXOcjs.fetchByIds; exports.fetchMany = _chunk5N6DYKXOcjs.fetchMany; exports.fieldCatalog = _chunk5N6DYKXOcjs.fieldCatalog; exports.invoke = invoke; exports.invokeDelete = invokeDelete; exports.invokeRead = invokeRead; exports.invokeWrite = invokeWrite; exports.needsConfirmation = needsConfirmation; exports.probeReachability = probeReachability; exports.recovery = recovery; exports.relationshipMap = relationshipMap; exports.resolveAny = resolveAny; exports.searchAcrossResources = searchAcrossResources; exports.unknownKeysRefusal = unknownKeysRefusal; exports.validateDispatchArgs = validateDispatchArgs; exports.validateFetchManyItems = _chunk5N6DYKXOcjs.validateFetchManyItems; exports.validateInvokeOptions = validateInvokeOptions; exports.validateParamsBag = validateParamsBag;
|