node-autotask 0.42.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/MCP_TOOL_CATALOG.json +27 -8
- package/MCP_TOOL_MANIFEST.md +138 -137
- package/N8N_MCP_MANIFEST.json +17 -17
- package/N8N_MCP_MANIFEST.md +18 -18
- package/README.md +6 -19
- package/capabilities.json +1825 -1442
- package/dist/{base-CVx2VMSj.d.cts → base-CftidiyZ.d.cts} +2 -1
- package/dist/{base-CVx2VMSj.d.ts → base-CftidiyZ.d.ts} +2 -1
- package/dist/capabilities.cjs +2 -2
- package/dist/capabilities.d.cts +2 -1
- package/dist/capabilities.d.ts +2 -1
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-HD5BRA3Z.cjs → chunk-6WLGHKIU.cjs} +286 -286
- package/dist/{chunk-TTPHVFPJ.js → chunk-7MCKJTSA.js} +3 -3
- package/dist/{chunk-5VHSLJMR.js → chunk-A6LHCJQP.js} +30 -9
- package/dist/{chunk-ZR24JGW2.js → chunk-BKTOMNT2.js} +2 -2
- package/dist/{chunk-SEFJJY4J.cjs → chunk-EMYDC5SG.cjs} +151 -120
- package/dist/{chunk-MYL34QU5.cjs → chunk-KWQSGWY5.cjs} +143 -143
- package/dist/{chunk-AETFO6BO.js → chunk-LYI5FRPX.js} +55 -24
- package/dist/{chunk-WP33PQVM.js → chunk-N6IWPGHB.js} +1824 -1441
- package/dist/{chunk-VEOSOIU4.cjs → chunk-PH3ESYAF.cjs} +1824 -1441
- package/dist/{chunk-MJTKK3QG.cjs → chunk-SN4BMQ2N.cjs} +31 -10
- package/dist/{index-Cm_Xpt7X.d.cts → index-D8FtzUGP.d.ts} +54 -41
- package/dist/{index-C3KFMnRT.d.cts → index-DgBA1JMH.d.cts} +131 -130
- package/dist/{index-C3KFMnRT.d.ts → index-DgBA1JMH.d.ts} +131 -130
- package/dist/{index-C7rMJ4IV.d.ts → index-YbEk0awP.d.cts} +54 -41
- package/dist/index.cjs +23 -23
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +5 -5
- package/dist/operations/index.cjs +337 -244
- package/dist/operations/index.d.cts +53 -45
- package/dist/operations/index.d.ts +53 -45
- package/dist/operations/index.js +121 -28
- package/dist/pool.cjs +9 -9
- package/dist/pool.d.cts +4 -3
- package/dist/pool.d.ts +4 -3
- package/dist/pool.js +5 -5
- package/dist/resources/index.cjs +5 -5
- package/dist/resources/index.d.cts +2 -2
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +4 -4
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/untrusted.cjs +2 -2
- package/dist/untrusted.d.cts +14 -5
- package/dist/untrusted.d.ts +14 -5
- package/dist/untrusted.js +1 -1
- package/docs/API.md +126 -37
- package/examples/mcp/schemas.ts +2 -0
- package/examples/mcp/tools-read.ts +3 -2
- package/package.json +17 -10
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
var
|
|
128
|
+
var _chunk6WLGHKIUcjs = require('./chunk-6WLGHKIU.cjs');
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
|
|
@@ -141,7 +141,7 @@ var _chunkHD5BRA3Zcjs = require('./chunk-HD5BRA3Z.cjs');
|
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
|
|
144
|
-
var
|
|
144
|
+
var _chunkEMYDC5SGcjs = require('./chunk-EMYDC5SG.cjs');
|
|
145
145
|
|
|
146
146
|
// src/client.ts
|
|
147
147
|
var AutotaskClient = class {
|
|
@@ -292,145 +292,145 @@ var AutotaskClient = class {
|
|
|
292
292
|
* anything is wired. Construction issues NO request.
|
|
293
293
|
*/
|
|
294
294
|
constructor(options) {
|
|
295
|
-
this.config =
|
|
296
|
-
this.http = new (0,
|
|
295
|
+
this.config = _chunkEMYDC5SGcjs.resolveConfig.call(void 0, options);
|
|
296
|
+
this.http = new (0, _chunkEMYDC5SGcjs.HttpClient)(this.config);
|
|
297
297
|
this.http.client = this;
|
|
298
|
-
this.appointments = new (0,
|
|
299
|
-
this.authenticateResource = new (0,
|
|
300
|
-
this.billingCodes = new (0,
|
|
301
|
-
this.billingItemApprovalLevels = new (0,
|
|
302
|
-
this.billingItems = new (0,
|
|
303
|
-
this.changeRequestLinks = new (0,
|
|
304
|
-
this.checklistLibraries = new (0,
|
|
305
|
-
this.checklistLibraryChecklistItems = new (0,
|
|
306
|
-
this.classificationIcons = new (0,
|
|
307
|
-
this.companies = new (0,
|
|
308
|
-
this.companyAlerts = new (0,
|
|
309
|
-
this.companyLocations = new (0,
|
|
310
|
-
this.companyNotes = new (0,
|
|
311
|
-
this.companySiteConfigurations = new (0,
|
|
312
|
-
this.companyWebhooks = new (0,
|
|
313
|
-
this.configurationItemBillingProductAssociations = new (0,
|
|
314
|
-
this.configurationItemCategories = new (0,
|
|
315
|
-
this.configurationItemCategoryUdfAssociations = new (0,
|
|
316
|
-
this.configurationItemDnsRecords = new (0,
|
|
317
|
-
this.configurationItemNotes = new (0,
|
|
318
|
-
this.configurationItemRelatedItems = new (0,
|
|
319
|
-
this.configurationItems = new (0,
|
|
320
|
-
this.configurationItemSslSubjectAlternativeNames = new (0,
|
|
321
|
-
this.configurationItemTypes = new (0,
|
|
322
|
-
this.configurationItemWebhooks = new (0,
|
|
323
|
-
this.contactGroupContacts = new (0,
|
|
324
|
-
this.contactGroups = new (0,
|
|
325
|
-
this.contacts = new (0,
|
|
326
|
-
this.contactWebhooks = new (0,
|
|
327
|
-
this.contractBillingRules = new (0,
|
|
328
|
-
this.contractBlockHourFactors = new (0,
|
|
329
|
-
this.contractBlocks = new (0,
|
|
330
|
-
this.contractCharges = new (0,
|
|
331
|
-
this.contractExclusionBillingCodes = new (0,
|
|
332
|
-
this.contractExclusionRoles = new (0,
|
|
333
|
-
this.contractExclusionSetExcludedRoles = new (0,
|
|
334
|
-
this.contractExclusionSetExcludedWorkTypes = new (0,
|
|
335
|
-
this.contractExclusionSets = new (0,
|
|
336
|
-
this.contractMilestones = new (0,
|
|
337
|
-
this.contractNotes = new (0,
|
|
338
|
-
this.contractRates = new (0,
|
|
339
|
-
this.contractRetainers = new (0,
|
|
340
|
-
this.contractRoleCosts = new (0,
|
|
341
|
-
this.contractServiceAdjustments = new (0,
|
|
342
|
-
this.contractServiceBundleAdjustments = new (0,
|
|
343
|
-
this.contractServiceBundles = new (0,
|
|
344
|
-
this.contractServiceBundleUnits = new (0,
|
|
345
|
-
this.contractServices = new (0,
|
|
346
|
-
this.contractServiceUnits = new (0,
|
|
347
|
-
this.contracts = new (0,
|
|
348
|
-
this.contractTicketPurchases = new (0,
|
|
349
|
-
this.countries = new (0,
|
|
350
|
-
this.currencies = new (0,
|
|
351
|
-
this.departments = new (0,
|
|
352
|
-
this.domainRegistrars = new (0,
|
|
353
|
-
this.entityInformation = new (0,
|
|
354
|
-
this.expenseItemAttachments = new (0,
|
|
355
|
-
this.expenseItems = new (0,
|
|
356
|
-
this.expenseReports = new (0,
|
|
357
|
-
this.holidaySets = new (0,
|
|
358
|
-
this.holidays = new (0,
|
|
359
|
-
this.inventoryProducts = new (0,
|
|
360
|
-
this.invoices = new (0,
|
|
361
|
-
this.invoiceTemplates = new (0,
|
|
362
|
-
this.modules = new (0,
|
|
363
|
-
this.notificationHistory = new (0,
|
|
364
|
-
this.opportunities = new (0,
|
|
365
|
-
this.opportunityAttachments = new (0,
|
|
366
|
-
this.opportunityCategories = new (0,
|
|
367
|
-
this.organizationalLevel1s = new (0,
|
|
368
|
-
this.organizationalLevel2s = new (0,
|
|
369
|
-
this.organizationalLevelAssociations = new (0,
|
|
370
|
-
this.phases = new (0,
|
|
371
|
-
this.products = new (0,
|
|
372
|
-
this.productVendors = new (0,
|
|
373
|
-
this.projectCharges = new (0,
|
|
374
|
-
this.projectNotes = new (0,
|
|
375
|
-
this.projects = new (0,
|
|
376
|
-
this.purchaseApprovals = new (0,
|
|
377
|
-
this.purchaseOrderItemReceiving = new (0,
|
|
378
|
-
this.purchaseOrderItems = new (0,
|
|
379
|
-
this.purchaseOrders = new (0,
|
|
380
|
-
this.quoteItems = new (0,
|
|
381
|
-
this.quoteLocations = new (0,
|
|
382
|
-
this.quotes = new (0,
|
|
383
|
-
this.quoteTemplates = new (0,
|
|
384
|
-
this.resourceRoleQueues = new (0,
|
|
385
|
-
this.resourceRoles = new (0,
|
|
386
|
-
this.resourceSkills = new (0,
|
|
387
|
-
this.resources = new (0,
|
|
388
|
-
this.resourceTimeOffAdditional = new (0,
|
|
389
|
-
this.resourceTimeOffApprovers = new (0,
|
|
390
|
-
this.resourceTimeOffBalances = new (0,
|
|
391
|
-
this.roles = new (0,
|
|
392
|
-
this.salesOrders = new (0,
|
|
393
|
-
this.serviceCalls = new (0,
|
|
394
|
-
this.serviceCallTaskResources = new (0,
|
|
395
|
-
this.serviceCallTasks = new (0,
|
|
396
|
-
this.serviceCallTicketResources = new (0,
|
|
397
|
-
this.serviceCallTickets = new (0,
|
|
398
|
-
this.serviceLevelAgreementResults = new (0,
|
|
399
|
-
this.services = new (0,
|
|
400
|
-
this.skills = new (0,
|
|
401
|
-
this.subscriptionPeriods = new (0,
|
|
402
|
-
this.subscriptions = new (0,
|
|
403
|
-
this.surveyResults = new (0,
|
|
404
|
-
this.surveys = new (0,
|
|
405
|
-
this.tagAliases = new (0,
|
|
406
|
-
this.tagGroups = new (0,
|
|
407
|
-
this.tags = new (0,
|
|
408
|
-
this.taskSecondaryResources = new (0,
|
|
409
|
-
this.tasks = new (0,
|
|
410
|
-
this.taxRegions = new (0,
|
|
411
|
-
this.thresholdInformation = new (0,
|
|
412
|
-
this.ticketAdditionalConfigurationItems = new (0,
|
|
413
|
-
this.ticketAdditionalContacts = new (0,
|
|
414
|
-
this.ticketAttachments = new (0,
|
|
415
|
-
this.ticketCategories = new (0,
|
|
416
|
-
this.ticketCategoryFieldDefaults = new (0,
|
|
417
|
-
this.ticketChangeRequestApprovals = new (0,
|
|
418
|
-
this.ticketCharges = new (0,
|
|
419
|
-
this.ticketChecklistItems = new (0,
|
|
420
|
-
this.ticketChecklistLibraries = new (0,
|
|
421
|
-
this.ticketHistory = new (0,
|
|
422
|
-
this.ticketNoteAttachments = new (0,
|
|
423
|
-
this.ticketNotes = new (0,
|
|
424
|
-
this.ticketNoteWebhooks = new (0,
|
|
425
|
-
this.ticketSecondaryResources = new (0,
|
|
426
|
-
this.tickets = new (0,
|
|
427
|
-
this.ticketWebhooks = new (0,
|
|
428
|
-
this.timeEntries = new (0,
|
|
429
|
-
this.timeEntryAttachments = new (0,
|
|
430
|
-
this.timeOffRequests = new (0,
|
|
431
|
-
this.versionInformation = new (0,
|
|
432
|
-
this.version = new (0,
|
|
433
|
-
this.zoneInformation = new (0,
|
|
298
|
+
this.appointments = new (0, _chunk6WLGHKIUcjs.AppointmentsResource)(this.http, this.config.pageSize);
|
|
299
|
+
this.authenticateResource = new (0, _chunk6WLGHKIUcjs.AuthenticateResource)(this.http);
|
|
300
|
+
this.billingCodes = new (0, _chunkEMYDC5SGcjs.BillingCodesResource)(this.http, this.config.pageSize);
|
|
301
|
+
this.billingItemApprovalLevels = new (0, _chunk6WLGHKIUcjs.BillingItemApprovalLevelsResource)(this.http, this.config.pageSize);
|
|
302
|
+
this.billingItems = new (0, _chunkEMYDC5SGcjs.BillingItemsResource)(this.http, this.config.pageSize);
|
|
303
|
+
this.changeRequestLinks = new (0, _chunk6WLGHKIUcjs.ChangeRequestLinksResource)(this.http, this.config.pageSize);
|
|
304
|
+
this.checklistLibraries = new (0, _chunk6WLGHKIUcjs.ChecklistLibrariesResource)(this.http, this.config.pageSize);
|
|
305
|
+
this.checklistLibraryChecklistItems = new (0, _chunk6WLGHKIUcjs.ChecklistLibraryChecklistItemsResource)(this.http, this.config.pageSize);
|
|
306
|
+
this.classificationIcons = new (0, _chunk6WLGHKIUcjs.ClassificationIconsResource)(this.http, this.config.pageSize);
|
|
307
|
+
this.companies = new (0, _chunkEMYDC5SGcjs.CompaniesResource)(this.http, this.config.pageSize);
|
|
308
|
+
this.companyAlerts = new (0, _chunk6WLGHKIUcjs.CompanyAlertsResource)(this.http, this.config.pageSize);
|
|
309
|
+
this.companyLocations = new (0, _chunk6WLGHKIUcjs.CompanyLocationsResource)(this.http, this.config.pageSize);
|
|
310
|
+
this.companyNotes = new (0, _chunk6WLGHKIUcjs.CompanyNotesResource)(this.http, this.config.pageSize);
|
|
311
|
+
this.companySiteConfigurations = new (0, _chunk6WLGHKIUcjs.CompanySiteConfigurationsResource)(this.http, this.config.pageSize);
|
|
312
|
+
this.companyWebhooks = new (0, _chunk6WLGHKIUcjs.CompanyWebhooksResource)(this.http, this.config.pageSize);
|
|
313
|
+
this.configurationItemBillingProductAssociations = new (0, _chunk6WLGHKIUcjs.ConfigurationItemBillingProductAssociationsResource)(this.http, this.config.pageSize);
|
|
314
|
+
this.configurationItemCategories = new (0, _chunk6WLGHKIUcjs.ConfigurationItemCategoriesResource)(this.http, this.config.pageSize);
|
|
315
|
+
this.configurationItemCategoryUdfAssociations = new (0, _chunk6WLGHKIUcjs.ConfigurationItemCategoryUdfAssociationsResource)(this.http, this.config.pageSize);
|
|
316
|
+
this.configurationItemDnsRecords = new (0, _chunk6WLGHKIUcjs.ConfigurationItemDnsRecordsResource)(this.http, this.config.pageSize);
|
|
317
|
+
this.configurationItemNotes = new (0, _chunk6WLGHKIUcjs.ConfigurationItemNotesResource)(this.http, this.config.pageSize);
|
|
318
|
+
this.configurationItemRelatedItems = new (0, _chunk6WLGHKIUcjs.ConfigurationItemRelatedItemsResource)(this.http, this.config.pageSize);
|
|
319
|
+
this.configurationItems = new (0, _chunk6WLGHKIUcjs.ConfigurationItemsResource)(this.http, this.config.pageSize);
|
|
320
|
+
this.configurationItemSslSubjectAlternativeNames = new (0, _chunk6WLGHKIUcjs.ConfigurationItemSslSubjectAlternativeNamesResource)(this.http, this.config.pageSize);
|
|
321
|
+
this.configurationItemTypes = new (0, _chunk6WLGHKIUcjs.ConfigurationItemTypesResource)(this.http, this.config.pageSize);
|
|
322
|
+
this.configurationItemWebhooks = new (0, _chunk6WLGHKIUcjs.ConfigurationItemWebhooksResource)(this.http, this.config.pageSize);
|
|
323
|
+
this.contactGroupContacts = new (0, _chunk6WLGHKIUcjs.ContactGroupContactsResource)(this.http, this.config.pageSize);
|
|
324
|
+
this.contactGroups = new (0, _chunk6WLGHKIUcjs.ContactGroupsResource)(this.http, this.config.pageSize);
|
|
325
|
+
this.contacts = new (0, _chunk6WLGHKIUcjs.ContactsResource)(this.http, this.config.pageSize);
|
|
326
|
+
this.contactWebhooks = new (0, _chunk6WLGHKIUcjs.ContactWebhooksResource)(this.http, this.config.pageSize);
|
|
327
|
+
this.contractBillingRules = new (0, _chunk6WLGHKIUcjs.ContractBillingRulesResource)(this.http, this.config.pageSize);
|
|
328
|
+
this.contractBlockHourFactors = new (0, _chunk6WLGHKIUcjs.ContractBlockHourFactorsResource)(this.http, this.config.pageSize);
|
|
329
|
+
this.contractBlocks = new (0, _chunk6WLGHKIUcjs.ContractBlocksResource)(this.http, this.config.pageSize);
|
|
330
|
+
this.contractCharges = new (0, _chunk6WLGHKIUcjs.ContractChargesResource)(this.http, this.config.pageSize);
|
|
331
|
+
this.contractExclusionBillingCodes = new (0, _chunk6WLGHKIUcjs.ContractExclusionBillingCodesResource)(this.http, this.config.pageSize);
|
|
332
|
+
this.contractExclusionRoles = new (0, _chunk6WLGHKIUcjs.ContractExclusionRolesResource)(this.http, this.config.pageSize);
|
|
333
|
+
this.contractExclusionSetExcludedRoles = new (0, _chunk6WLGHKIUcjs.ContractExclusionSetExcludedRolesResource)(this.http, this.config.pageSize);
|
|
334
|
+
this.contractExclusionSetExcludedWorkTypes = new (0, _chunk6WLGHKIUcjs.ContractExclusionSetExcludedWorkTypesResource)(this.http, this.config.pageSize);
|
|
335
|
+
this.contractExclusionSets = new (0, _chunk6WLGHKIUcjs.ContractExclusionSetsResource)(this.http, this.config.pageSize);
|
|
336
|
+
this.contractMilestones = new (0, _chunk6WLGHKIUcjs.ContractMilestonesResource)(this.http, this.config.pageSize);
|
|
337
|
+
this.contractNotes = new (0, _chunk6WLGHKIUcjs.ContractNotesResource)(this.http, this.config.pageSize);
|
|
338
|
+
this.contractRates = new (0, _chunk6WLGHKIUcjs.ContractRatesResource)(this.http, this.config.pageSize);
|
|
339
|
+
this.contractRetainers = new (0, _chunk6WLGHKIUcjs.ContractRetainersResource)(this.http, this.config.pageSize);
|
|
340
|
+
this.contractRoleCosts = new (0, _chunk6WLGHKIUcjs.ContractRoleCostsResource)(this.http, this.config.pageSize);
|
|
341
|
+
this.contractServiceAdjustments = new (0, _chunk6WLGHKIUcjs.ContractServiceAdjustmentsResource)(this.http, this.config.pageSize);
|
|
342
|
+
this.contractServiceBundleAdjustments = new (0, _chunk6WLGHKIUcjs.ContractServiceBundleAdjustmentsResource)(this.http, this.config.pageSize);
|
|
343
|
+
this.contractServiceBundles = new (0, _chunk6WLGHKIUcjs.ContractServiceBundlesResource)(this.http, this.config.pageSize);
|
|
344
|
+
this.contractServiceBundleUnits = new (0, _chunk6WLGHKIUcjs.ContractServiceBundleUnitsResource)(this.http, this.config.pageSize);
|
|
345
|
+
this.contractServices = new (0, _chunk6WLGHKIUcjs.ContractServicesResource)(this.http, this.config.pageSize);
|
|
346
|
+
this.contractServiceUnits = new (0, _chunk6WLGHKIUcjs.ContractServiceUnitsResource)(this.http, this.config.pageSize);
|
|
347
|
+
this.contracts = new (0, _chunkEMYDC5SGcjs.ContractsResource)(this.http, this.config.pageSize);
|
|
348
|
+
this.contractTicketPurchases = new (0, _chunk6WLGHKIUcjs.ContractTicketPurchasesResource)(this.http, this.config.pageSize);
|
|
349
|
+
this.countries = new (0, _chunk6WLGHKIUcjs.CountriesResource)(this.http, this.config.pageSize);
|
|
350
|
+
this.currencies = new (0, _chunk6WLGHKIUcjs.CurrenciesResource)(this.http, this.config.pageSize);
|
|
351
|
+
this.departments = new (0, _chunk6WLGHKIUcjs.DepartmentsResource)(this.http, this.config.pageSize);
|
|
352
|
+
this.domainRegistrars = new (0, _chunk6WLGHKIUcjs.DomainRegistrarsResource)(this.http, this.config.pageSize);
|
|
353
|
+
this.entityInformation = new (0, _chunk6WLGHKIUcjs.EntityInformationResource)(this.http);
|
|
354
|
+
this.expenseItemAttachments = new (0, _chunk6WLGHKIUcjs.ExpenseItemAttachmentsResource)(this.http, this.config.pageSize);
|
|
355
|
+
this.expenseItems = new (0, _chunk6WLGHKIUcjs.ExpenseItemsResource)(this.http, this.config.pageSize);
|
|
356
|
+
this.expenseReports = new (0, _chunk6WLGHKIUcjs.ExpenseReportsResource)(this.http, this.config.pageSize);
|
|
357
|
+
this.holidaySets = new (0, _chunk6WLGHKIUcjs.HolidaySetsResource)(this.http, this.config.pageSize);
|
|
358
|
+
this.holidays = new (0, _chunk6WLGHKIUcjs.HolidaysResource)(this.http, this.config.pageSize);
|
|
359
|
+
this.inventoryProducts = new (0, _chunk6WLGHKIUcjs.InventoryProductsResource)(this.http, this.config.pageSize);
|
|
360
|
+
this.invoices = new (0, _chunkEMYDC5SGcjs.InvoicesResource)(this.http, this.config.pageSize);
|
|
361
|
+
this.invoiceTemplates = new (0, _chunk6WLGHKIUcjs.InvoiceTemplatesResource)(this.http, this.config.pageSize);
|
|
362
|
+
this.modules = new (0, _chunk6WLGHKIUcjs.ModulesResource)(this.http);
|
|
363
|
+
this.notificationHistory = new (0, _chunk6WLGHKIUcjs.NotificationHistoryResource)(this.http, this.config.pageSize);
|
|
364
|
+
this.opportunities = new (0, _chunk6WLGHKIUcjs.OpportunitiesResource)(this.http, this.config.pageSize);
|
|
365
|
+
this.opportunityAttachments = new (0, _chunk6WLGHKIUcjs.OpportunityAttachmentsResource)(this.http, this.config.pageSize);
|
|
366
|
+
this.opportunityCategories = new (0, _chunk6WLGHKIUcjs.OpportunityCategoriesResource)(this.http, this.config.pageSize);
|
|
367
|
+
this.organizationalLevel1s = new (0, _chunkEMYDC5SGcjs.OrganizationalLevel1sResource)(this.http, this.config.pageSize);
|
|
368
|
+
this.organizationalLevel2s = new (0, _chunkEMYDC5SGcjs.OrganizationalLevel2sResource)(this.http, this.config.pageSize);
|
|
369
|
+
this.organizationalLevelAssociations = new (0, _chunkEMYDC5SGcjs.OrganizationalLevelAssociationsResource)(this.http, this.config.pageSize);
|
|
370
|
+
this.phases = new (0, _chunk6WLGHKIUcjs.PhasesResource)(this.http, this.config.pageSize);
|
|
371
|
+
this.products = new (0, _chunk6WLGHKIUcjs.ProductsResource)(this.http, this.config.pageSize);
|
|
372
|
+
this.productVendors = new (0, _chunk6WLGHKIUcjs.ProductVendorsResource)(this.http, this.config.pageSize);
|
|
373
|
+
this.projectCharges = new (0, _chunk6WLGHKIUcjs.ProjectChargesResource)(this.http, this.config.pageSize);
|
|
374
|
+
this.projectNotes = new (0, _chunk6WLGHKIUcjs.ProjectNotesResource)(this.http, this.config.pageSize);
|
|
375
|
+
this.projects = new (0, _chunk6WLGHKIUcjs.ProjectsResource)(this.http, this.config.pageSize);
|
|
376
|
+
this.purchaseApprovals = new (0, _chunk6WLGHKIUcjs.PurchaseApprovalsResource)(this.http, this.config.pageSize);
|
|
377
|
+
this.purchaseOrderItemReceiving = new (0, _chunk6WLGHKIUcjs.PurchaseOrderItemReceivingResource)(this.http, this.config.pageSize);
|
|
378
|
+
this.purchaseOrderItems = new (0, _chunk6WLGHKIUcjs.PurchaseOrderItemsResource)(this.http, this.config.pageSize);
|
|
379
|
+
this.purchaseOrders = new (0, _chunk6WLGHKIUcjs.PurchaseOrdersResource)(this.http, this.config.pageSize);
|
|
380
|
+
this.quoteItems = new (0, _chunk6WLGHKIUcjs.QuoteItemsResource)(this.http, this.config.pageSize);
|
|
381
|
+
this.quoteLocations = new (0, _chunk6WLGHKIUcjs.QuoteLocationsResource)(this.http, this.config.pageSize);
|
|
382
|
+
this.quotes = new (0, _chunk6WLGHKIUcjs.QuotesResource)(this.http, this.config.pageSize);
|
|
383
|
+
this.quoteTemplates = new (0, _chunk6WLGHKIUcjs.QuoteTemplatesResource)(this.http, this.config.pageSize);
|
|
384
|
+
this.resourceRoleQueues = new (0, _chunk6WLGHKIUcjs.ResourceRoleQueuesResource)(this.http, this.config.pageSize);
|
|
385
|
+
this.resourceRoles = new (0, _chunk6WLGHKIUcjs.ResourceRolesResource)(this.http, this.config.pageSize);
|
|
386
|
+
this.resourceSkills = new (0, _chunk6WLGHKIUcjs.ResourceSkillsResource)(this.http, this.config.pageSize);
|
|
387
|
+
this.resources = new (0, _chunkEMYDC5SGcjs.ResourcesResource)(this.http, this.config, this.config.pageSize);
|
|
388
|
+
this.resourceTimeOffAdditional = new (0, _chunk6WLGHKIUcjs.ResourceTimeOffAdditionalResource)(this.http, this.config.pageSize);
|
|
389
|
+
this.resourceTimeOffApprovers = new (0, _chunk6WLGHKIUcjs.ResourceTimeOffApproversResource)(this.http, this.config.pageSize);
|
|
390
|
+
this.resourceTimeOffBalances = new (0, _chunk6WLGHKIUcjs.ResourceTimeOffBalancesResource)(this.http, this.config.pageSize);
|
|
391
|
+
this.roles = new (0, _chunk6WLGHKIUcjs.RolesResource)(this.http, this.config.pageSize);
|
|
392
|
+
this.salesOrders = new (0, _chunk6WLGHKIUcjs.SalesOrdersResource)(this.http, this.config.pageSize);
|
|
393
|
+
this.serviceCalls = new (0, _chunk6WLGHKIUcjs.ServiceCallsResource)(this.http, this.config.pageSize);
|
|
394
|
+
this.serviceCallTaskResources = new (0, _chunk6WLGHKIUcjs.ServiceCallTaskResourcesResource)(this.http, this.config.pageSize);
|
|
395
|
+
this.serviceCallTasks = new (0, _chunk6WLGHKIUcjs.ServiceCallTasksResource)(this.http, this.config.pageSize);
|
|
396
|
+
this.serviceCallTicketResources = new (0, _chunk6WLGHKIUcjs.ServiceCallTicketResourcesResource)(this.http, this.config.pageSize);
|
|
397
|
+
this.serviceCallTickets = new (0, _chunk6WLGHKIUcjs.ServiceCallTicketsResource)(this.http, this.config.pageSize);
|
|
398
|
+
this.serviceLevelAgreementResults = new (0, _chunk6WLGHKIUcjs.ServiceLevelAgreementResultsResource)(this.http, this.config.pageSize);
|
|
399
|
+
this.services = new (0, _chunk6WLGHKIUcjs.ServicesResource)(this.http, this.config.pageSize);
|
|
400
|
+
this.skills = new (0, _chunk6WLGHKIUcjs.SkillsResource)(this.http, this.config.pageSize);
|
|
401
|
+
this.subscriptionPeriods = new (0, _chunk6WLGHKIUcjs.SubscriptionPeriodsResource)(this.http, this.config.pageSize);
|
|
402
|
+
this.subscriptions = new (0, _chunk6WLGHKIUcjs.SubscriptionsResource)(this.http, this.config.pageSize);
|
|
403
|
+
this.surveyResults = new (0, _chunk6WLGHKIUcjs.SurveyResultsResource)(this.http, this.config.pageSize);
|
|
404
|
+
this.surveys = new (0, _chunk6WLGHKIUcjs.SurveysResource)(this.http, this.config.pageSize);
|
|
405
|
+
this.tagAliases = new (0, _chunk6WLGHKIUcjs.TagAliasesResource)(this.http, this.config.pageSize);
|
|
406
|
+
this.tagGroups = new (0, _chunk6WLGHKIUcjs.TagGroupsResource)(this.http, this.config.pageSize);
|
|
407
|
+
this.tags = new (0, _chunk6WLGHKIUcjs.TagsResource)(this.http, this.config.pageSize);
|
|
408
|
+
this.taskSecondaryResources = new (0, _chunk6WLGHKIUcjs.TaskSecondaryResourcesResource)(this.http, this.config.pageSize);
|
|
409
|
+
this.tasks = new (0, _chunk6WLGHKIUcjs.TasksResource)(this.http, this.config.pageSize);
|
|
410
|
+
this.taxRegions = new (0, _chunk6WLGHKIUcjs.TaxRegionsResource)(this.http, this.config.pageSize);
|
|
411
|
+
this.thresholdInformation = new (0, _chunk6WLGHKIUcjs.ThresholdInformationResource)(this.http);
|
|
412
|
+
this.ticketAdditionalConfigurationItems = new (0, _chunk6WLGHKIUcjs.TicketAdditionalConfigurationItemsResource)(this.http, this.config.pageSize);
|
|
413
|
+
this.ticketAdditionalContacts = new (0, _chunk6WLGHKIUcjs.TicketAdditionalContactsResource)(this.http, this.config.pageSize);
|
|
414
|
+
this.ticketAttachments = new (0, _chunk6WLGHKIUcjs.TicketAttachmentsResource)(this.http, this.config.pageSize);
|
|
415
|
+
this.ticketCategories = new (0, _chunk6WLGHKIUcjs.TicketCategoriesResource)(this.http, this.config.pageSize);
|
|
416
|
+
this.ticketCategoryFieldDefaults = new (0, _chunk6WLGHKIUcjs.TicketCategoryFieldDefaultsResource)(this.http, this.config.pageSize);
|
|
417
|
+
this.ticketChangeRequestApprovals = new (0, _chunk6WLGHKIUcjs.TicketChangeRequestApprovalsResource)(this.http, this.config.pageSize);
|
|
418
|
+
this.ticketCharges = new (0, _chunk6WLGHKIUcjs.TicketChargesResource)(this.http, this.config.pageSize);
|
|
419
|
+
this.ticketChecklistItems = new (0, _chunk6WLGHKIUcjs.TicketChecklistItemsResource)(this.http, this.config.pageSize);
|
|
420
|
+
this.ticketChecklistLibraries = new (0, _chunk6WLGHKIUcjs.TicketChecklistLibrariesResource)(this.http, this.config.pageSize);
|
|
421
|
+
this.ticketHistory = new (0, _chunk6WLGHKIUcjs.TicketHistoryResource)(this.http, this.config.pageSize);
|
|
422
|
+
this.ticketNoteAttachments = new (0, _chunk6WLGHKIUcjs.TicketNoteAttachmentsResource)(this.http, this.config.pageSize);
|
|
423
|
+
this.ticketNotes = new (0, _chunk6WLGHKIUcjs.TicketNotesResource)(this.http, this.config.pageSize);
|
|
424
|
+
this.ticketNoteWebhooks = new (0, _chunk6WLGHKIUcjs.TicketNoteWebhooksResource)(this.http, this.config.pageSize);
|
|
425
|
+
this.ticketSecondaryResources = new (0, _chunk6WLGHKIUcjs.TicketSecondaryResourcesResource)(this.http, this.config.pageSize);
|
|
426
|
+
this.tickets = new (0, _chunk6WLGHKIUcjs.TicketsResource)(this.http, this.config.pageSize);
|
|
427
|
+
this.ticketWebhooks = new (0, _chunk6WLGHKIUcjs.TicketWebhooksResource)(this.http, this.config.pageSize);
|
|
428
|
+
this.timeEntries = new (0, _chunkEMYDC5SGcjs.TimeEntriesResource)(this.http, this.config.pageSize);
|
|
429
|
+
this.timeEntryAttachments = new (0, _chunk6WLGHKIUcjs.TimeEntryAttachmentsResource)(this.http, this.config.pageSize);
|
|
430
|
+
this.timeOffRequests = new (0, _chunk6WLGHKIUcjs.TimeOffRequestsResource)(this.http, this.config.pageSize);
|
|
431
|
+
this.versionInformation = new (0, _chunk6WLGHKIUcjs.VersionInformationResource)(this.http);
|
|
432
|
+
this.version = new (0, _chunk6WLGHKIUcjs.VersionResource)(this.http);
|
|
433
|
+
this.zoneInformation = new (0, _chunk6WLGHKIUcjs.ZoneInformationResource)(this.http);
|
|
434
434
|
}
|
|
435
435
|
/**
|
|
436
436
|
* `GET /V1.0/Authenticate` → `AuthTokenResultModel` (as-is). The SDK does
|
|
@@ -464,12 +464,12 @@ var AutotaskClient = class {
|
|
|
464
464
|
* parameter on each: `await client.withSignal(signal, () => invoke(client, ...))`.
|
|
465
465
|
*/
|
|
466
466
|
withSignal(signal, fn) {
|
|
467
|
-
return
|
|
467
|
+
return _chunkEMYDC5SGcjs.runWithSignal.call(void 0, signal, fn);
|
|
468
468
|
}
|
|
469
469
|
async batch(fn, items, opts = {}) {
|
|
470
470
|
const concurrency = _nullishCoalesce(opts.concurrency, () => ( this.config.maxConcurrent));
|
|
471
471
|
if (!Number.isInteger(concurrency) || concurrency <= 0) {
|
|
472
|
-
throw new (0,
|
|
472
|
+
throw new (0, _chunkEMYDC5SGcjs.AutotaskConfigError)("batch concurrency must be a positive integer");
|
|
473
473
|
}
|
|
474
474
|
const { signal, settle } = opts;
|
|
475
475
|
const results = new Array(items.length);
|
|
@@ -484,7 +484,7 @@ var AutotaskClient = class {
|
|
|
484
484
|
const i = next++;
|
|
485
485
|
try {
|
|
486
486
|
const item = items[i];
|
|
487
|
-
const value = await (signal === void 0 ? fn(item) :
|
|
487
|
+
const value = await (signal === void 0 ? fn(item) : _chunkEMYDC5SGcjs.runWithSignal.call(void 0, signal, () => fn(item)));
|
|
488
488
|
results[i] = settle ? { status: "fulfilled", value } : value;
|
|
489
489
|
} catch (error) {
|
|
490
490
|
if (settle) results[i] = { status: "rejected", reason: error };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CAPABILITIES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N6IWPGHB.js";
|
|
4
4
|
import {
|
|
5
5
|
wrapUntrusted
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A6LHCJQP.js";
|
|
7
7
|
|
|
8
8
|
// src/auth.ts
|
|
9
9
|
var AUTH_HEADERS = {
|
|
@@ -17788,7 +17788,6 @@ async function resolveCompositeNames(http, plan, opts = {}) {
|
|
|
17788
17788
|
const lobId = plan.lineOfBusinessId ?? contractLobPointer;
|
|
17789
17789
|
if (lobId !== void 0) {
|
|
17790
17790
|
const chain = await resolveLineOfBusinessChain(http, lobId, { budget: remaining, onError: "degrade" });
|
|
17791
|
-
remaining -= chain.used;
|
|
17792
17791
|
if (chain.truncated) section.truncated = true;
|
|
17793
17792
|
const fromContract = plan.lineOfBusinessId === void 0;
|
|
17794
17793
|
lineOfBusiness2 = {
|
|
@@ -18061,6 +18060,18 @@ function selfPrefixes(resourceKey) {
|
|
|
18061
18060
|
const rels = Object.keys(RELATION_TARGETS).filter((rel) => RELATION_TARGETS[rel].resource === resourceKey);
|
|
18062
18061
|
return [resourceKey, ...rels];
|
|
18063
18062
|
}
|
|
18063
|
+
function normalizeOwnField(resourceKey, field) {
|
|
18064
|
+
const parts = field.split(".");
|
|
18065
|
+
return parts.length === 2 && selfPrefixes(resourceKey).includes(parts[0]) ? parts[1] : field;
|
|
18066
|
+
}
|
|
18067
|
+
function assertUndottedUdfField(condition, operation) {
|
|
18068
|
+
if (condition.udf === true && typeof condition.field === "string" && condition.field.includes(".")) {
|
|
18069
|
+
throw new AutotaskConfigError(`${operation}: a dotted filter field cannot be a UDF condition \u2014 the request was not issued`, {
|
|
18070
|
+
operation,
|
|
18071
|
+
suggestedAction: "Use an undotted tenant UDF name with udf: true; own-field prefixes and relation paths apply only to ordinary fields."
|
|
18072
|
+
});
|
|
18073
|
+
}
|
|
18074
|
+
}
|
|
18064
18075
|
var isRelationLeaf = (c) => isRecord2(c) && c.op !== "and" && c.op !== "or" && typeof c.field === "string" && c.field.includes(".");
|
|
18065
18076
|
function hasRelationConditions(conditions) {
|
|
18066
18077
|
if (conditions === void 0) return false;
|
|
@@ -18072,6 +18083,7 @@ function validateRelationLeaves(resourceKey, conditions, op) {
|
|
|
18072
18083
|
for (const c of conds) {
|
|
18073
18084
|
if (isRecord2(c) && Array.isArray(c.items)) walk(c.items);
|
|
18074
18085
|
if (!isRelationLeaf(c)) continue;
|
|
18086
|
+
assertUndottedUdfField(c, op);
|
|
18075
18087
|
const field = c.field;
|
|
18076
18088
|
const [rel, sub, ...rest] = field.split(".");
|
|
18077
18089
|
const fail = (why) => {
|
|
@@ -18084,7 +18096,6 @@ function validateRelationLeaves(resourceKey, conditions, op) {
|
|
|
18084
18096
|
if (rest.length > 0 || !sub) fail("is not <resource>.<field> (multi-hop relations are not supported)");
|
|
18085
18097
|
continue;
|
|
18086
18098
|
}
|
|
18087
|
-
if (c.udf === true) fail("cannot be a UDF condition");
|
|
18088
18099
|
if (rest.length > 0 || !sub) fail("is not <relation>.<field> (multi-hop relations are not supported)");
|
|
18089
18100
|
if (!valid.includes(rel)) fail(`names an unknown relation for ${resourceKey} (valid: ${valid.join(", ") || "none"})`);
|
|
18090
18101
|
const parentFields = MODEL_FIELD_SETS[RELATION_TARGETS[rel].resource];
|
|
@@ -18257,7 +18268,7 @@ function validateWalkBag(walk, prefix, details) {
|
|
|
18257
18268
|
const wr = typeof walk === "object" && walk !== null && !Array.isArray(walk) ? walk.maxRows : void 0;
|
|
18258
18269
|
if (!Number.isInteger(wr) || wr < 1) {
|
|
18259
18270
|
throw new AutotaskConfigError(
|
|
18260
|
-
`${prefix} walk.maxRows must be a positive integer (got ${String(wr)}) \u2014 it is the walk's TOTAL row cap
|
|
18271
|
+
`${prefix} walk.maxRows must be a positive integer (got ${String(wr)}) \u2014 it is the walk's TOTAL row cap, independent of limit`,
|
|
18261
18272
|
details
|
|
18262
18273
|
);
|
|
18263
18274
|
}
|
|
@@ -18303,6 +18314,9 @@ var QueryBase = class {
|
|
|
18303
18314
|
// ------------------------------------------------------------------
|
|
18304
18315
|
/** One page fetch: page 1 POSTs the QueryModel body; later pages POST the same body (`buildQueryBody`) to the absolute cursor (issue #118). */
|
|
18305
18316
|
async fetchPage(params, page, pageSize, state) {
|
|
18317
|
+
if (params.includeFields !== void 0) {
|
|
18318
|
+
params = { ...params, includeFields: params.includeFields.map((field) => normalizeOwnField(this.config.key, field)) };
|
|
18319
|
+
}
|
|
18306
18320
|
const operation = `${this.config.key}.query`;
|
|
18307
18321
|
if (page === 1) {
|
|
18308
18322
|
const req = buildQueryRequest(this.http.baseUrl, this.resourcePath, { ...params, maxRecords: pageSize });
|
|
@@ -18407,7 +18421,8 @@ var QueryBase = class {
|
|
|
18407
18421
|
* - `limit` = total records (default 500, hard max 2500 — above it throws
|
|
18408
18422
|
* AutotaskConfigError; it is NOT a page size). The page-1 request uses
|
|
18409
18423
|
* the internal page size min(500, limit) (the `latest` mechanism sizes
|
|
18410
|
-
* its walk from the matching count)
|
|
18424
|
+
* its walk from the matching count). Explicit `walk.maxRows` replaces
|
|
18425
|
+
* the total cap; `limit` then only sizes pages. Every follow-up page POSTs the
|
|
18411
18426
|
* SAME QueryModel body (`buildQueryBody`: MaxRecords, IncludeFields and
|
|
18412
18427
|
* the preserved filter) to the absolute cursor (issue #118 — the vendor
|
|
18413
18428
|
* honours IncludeFields there and ignores MaxRecords, serving its own
|
|
@@ -18466,20 +18481,20 @@ var QueryBase = class {
|
|
|
18466
18481
|
"queryBounded: walk.maxRows is not combinable with latest \u2014 the count-anchored mechanism has its own walk window"
|
|
18467
18482
|
);
|
|
18468
18483
|
}
|
|
18469
|
-
const cap = maxRows
|
|
18484
|
+
const cap = maxRows ?? limit;
|
|
18485
|
+
const labelPages = maxRows !== void 0 && readNamesOpt(this.http.client, params?.names, `${this.config.key}.query`);
|
|
18470
18486
|
let walkParams = params ?? {};
|
|
18471
18487
|
const relation = await rewriteRelationFilters(this.http, this.config.key, normalizedConditions(walkParams.filter), `${this.config.key}.query`);
|
|
18472
|
-
if (relation?.never === true) return { items: [], fetched: 0, hasMore: false, pagesWalked: 0, relationNote: relation.note };
|
|
18488
|
+
if (relation?.never === true) return { items: [], fetched: 0, hasMore: false, pagesWalked: 0, relationNote: relation.note, ...maxRows === void 0 ? {} : { truncated: false } };
|
|
18473
18489
|
if (relation !== void 0) walkParams = { ...walkParams, filter: relation.conditions };
|
|
18474
18490
|
if (latest !== void 0) {
|
|
18475
18491
|
return this.applyNoteChars(await this.latestWalk(walkParams, Math.max(limit, latest), latest), noteChars);
|
|
18476
18492
|
}
|
|
18477
|
-
const { items, pages, guard, sliced, cursor } = await this.walkBounded(walkParams, cap, limit);
|
|
18478
|
-
const hasMore = (items.length >= cap || guard) && (sliced > 0 || cursor !== null);
|
|
18493
|
+
const { items, pages, guard, sliced, cursor, names } = await this.walkBounded(walkParams, cap, limit, labelPages);
|
|
18494
|
+
const hasMore = maxRows === void 0 ? (items.length >= cap || guard) && (sliced > 0 || cursor !== null) : guard || sliced > 0 || cursor !== null;
|
|
18479
18495
|
const result = { items, fetched: items.length, hasMore, pagesWalked: pages };
|
|
18480
|
-
if (maxRows !== void 0)
|
|
18481
|
-
|
|
18482
|
-
}
|
|
18496
|
+
if (maxRows !== void 0) result.truncated = hasMore;
|
|
18497
|
+
if (names !== void 0) result.names = names;
|
|
18483
18498
|
this.stampEmptyQueryResult(result, params);
|
|
18484
18499
|
return this.applyNoteChars(result, noteChars);
|
|
18485
18500
|
}
|
|
@@ -18510,12 +18525,14 @@ var QueryBase = class {
|
|
|
18510
18525
|
* SOFT stop (never a throw). ONE per-walk closure (walks never share
|
|
18511
18526
|
* state).
|
|
18512
18527
|
* @internal */
|
|
18513
|
-
async walkBounded(p, limit, pageSizeBase) {
|
|
18528
|
+
async walkBounded(p, limit, pageSizeBase, labelPages = false) {
|
|
18514
18529
|
const state = { cursor: null };
|
|
18515
18530
|
const items = [];
|
|
18516
18531
|
let pages = 0;
|
|
18517
18532
|
let sliced = 0;
|
|
18518
18533
|
let guard = false;
|
|
18534
|
+
const nameNotes = /* @__PURE__ */ new Set();
|
|
18535
|
+
const nameReasons = {};
|
|
18519
18536
|
const pageSize = Math.min(MAX_PAGE_SIZE, pageSizeBase ?? limit);
|
|
18520
18537
|
for (; ; ) {
|
|
18521
18538
|
if (pages >= MAX_PAGES) {
|
|
@@ -18524,6 +18541,14 @@ var QueryBase = class {
|
|
|
18524
18541
|
}
|
|
18525
18542
|
const page = await this.fetchPage(p, pages + 1, pageSize, state);
|
|
18526
18543
|
pages += 1;
|
|
18544
|
+
if (labelPages && this.http.client !== void 0) {
|
|
18545
|
+
const labelled = await labelRows(this.http.client, this.config.key, page.items);
|
|
18546
|
+
page.items = labelled.rows;
|
|
18547
|
+
if (labelled.names !== void 0) {
|
|
18548
|
+
nameNotes.add(labelled.names.note.replace("the per-call cap", "the per-page cap"));
|
|
18549
|
+
Object.assign(nameReasons, labelled.names.reasons);
|
|
18550
|
+
}
|
|
18551
|
+
}
|
|
18527
18552
|
const remaining = limit - items.length;
|
|
18528
18553
|
const take = page.items.slice(0, remaining);
|
|
18529
18554
|
sliced += Math.max(0, page.items.length - remaining);
|
|
@@ -18531,7 +18556,11 @@ var QueryBase = class {
|
|
|
18531
18556
|
if (items.length >= limit) break;
|
|
18532
18557
|
if (!page.hasMore || page.items.length === 0) break;
|
|
18533
18558
|
}
|
|
18534
|
-
|
|
18559
|
+
const names = nameNotes.size === 0 ? void 0 : {
|
|
18560
|
+
note: [...nameNotes].join("; "),
|
|
18561
|
+
...Object.keys(nameReasons).length === 0 ? {} : { reasons: nameReasons }
|
|
18562
|
+
};
|
|
18563
|
+
return { items, pages, guard, sliced, cursor: state.cursor, ...names === void 0 ? {} : { names } };
|
|
18535
18564
|
}
|
|
18536
18565
|
/** A walk stop is TRUNCATED when the 1000-page guard fired, or the limit
|
|
18537
18566
|
* was met with a live next cursor (or a sliced final page): rows exist
|
|
@@ -18663,7 +18692,7 @@ var QueryBase = class {
|
|
|
18663
18692
|
if (probes > LATEST_MAX_COUNT_PROBES) throw this.latestThresholdUnresolvedError();
|
|
18664
18693
|
};
|
|
18665
18694
|
let lo = 0n;
|
|
18666
|
-
let hi
|
|
18695
|
+
let hi;
|
|
18667
18696
|
for (let t = 1n; ; t = t << 1n) {
|
|
18668
18697
|
spend();
|
|
18669
18698
|
if (await this.countAboveId(baseConds, t) <= latest) {
|
|
@@ -19913,7 +19942,7 @@ var MutationBase = class extends MetaBase {
|
|
|
19913
19942
|
const collectionUpdate = scopedUpdate || this.config.collectionUpdate === true;
|
|
19914
19943
|
const path = scopedUpdate ? this.scopedCollectionPath(parentId) : collectionUpdate ? this.resourcePath : `${this.resourcePath}/${id}`;
|
|
19915
19944
|
const method = scopedUpdate ? "PATCH" : "PUT";
|
|
19916
|
-
let current
|
|
19945
|
+
let current;
|
|
19917
19946
|
try {
|
|
19918
19947
|
current = parentId === void 0 ? await this.getGlobal(id, true) : this.config.attachmentGet ? await this.getScopedModel(parentId, id, true) : await this.getScopedRaw(parentId, id, true);
|
|
19919
19948
|
} catch (err) {
|
|
@@ -19972,7 +20001,7 @@ var MutationBase = class extends MetaBase {
|
|
|
19972
20001
|
const checks = [];
|
|
19973
20002
|
const warnings = [];
|
|
19974
20003
|
const path = parentId === void 0 ? `${this.resourcePath}/${id}` : this.scopedItemPath(parentId, id);
|
|
19975
|
-
let current
|
|
20004
|
+
let current;
|
|
19976
20005
|
try {
|
|
19977
20006
|
current = parentId === void 0 ? await this.getGlobal(id, true) : this.config.attachmentGet ? await this.getScopedModel(parentId, id, true) : await this.getScopedRaw(parentId, id, true);
|
|
19978
20007
|
} catch (err) {
|
|
@@ -20913,7 +20942,7 @@ function formatUnknownNameList(names, cap = UNKNOWN_NAME_LIST_CAP) {
|
|
|
20913
20942
|
const more = names.length > cap ? ` (and ${names.length - cap} more)` : "";
|
|
20914
20943
|
return `${listed}${more}`;
|
|
20915
20944
|
}
|
|
20916
|
-
function collectFilterFieldNames(conditions, resourceKey) {
|
|
20945
|
+
function collectFilterFieldNames(conditions, resourceKey, operation = `${resourceKey ?? "resource"}.query`) {
|
|
20917
20946
|
const out = [];
|
|
20918
20947
|
const walk = (conds) => {
|
|
20919
20948
|
for (const cond of conds) {
|
|
@@ -20922,6 +20951,7 @@ function collectFilterFieldNames(conditions, resourceKey) {
|
|
|
20922
20951
|
if (Array.isArray(cond.items)) walk(cond.items);
|
|
20923
20952
|
continue;
|
|
20924
20953
|
}
|
|
20954
|
+
assertUndottedUdfField(cond, operation);
|
|
20925
20955
|
if (cond.udf === true) continue;
|
|
20926
20956
|
if (typeof cond.field === "string" && cond.field.length > 0) {
|
|
20927
20957
|
if (!cond.field.includes(".")) {
|
|
@@ -20929,8 +20959,8 @@ function collectFilterFieldNames(conditions, resourceKey) {
|
|
|
20929
20959
|
continue;
|
|
20930
20960
|
}
|
|
20931
20961
|
if (resourceKey !== void 0) {
|
|
20932
|
-
const
|
|
20933
|
-
if (
|
|
20962
|
+
const own = normalizeOwnField(resourceKey, cond.field);
|
|
20963
|
+
if (own !== cond.field) out.push(own);
|
|
20934
20964
|
}
|
|
20935
20965
|
}
|
|
20936
20966
|
}
|
|
@@ -20958,7 +20988,7 @@ function readIncludeNames(record, includeFields) {
|
|
|
20958
20988
|
shapeOk = false;
|
|
20959
20989
|
break;
|
|
20960
20990
|
}
|
|
20961
|
-
names.push(entry);
|
|
20991
|
+
names.push(normalizeOwnField(record.resource, entry));
|
|
20962
20992
|
}
|
|
20963
20993
|
}
|
|
20964
20994
|
if (!shapeOk) {
|
|
@@ -21014,7 +21044,7 @@ async function validateQueryFieldNames(record, holder, args) {
|
|
|
21014
21044
|
let filterNames;
|
|
21015
21045
|
if (bag["filter"] !== void 0) {
|
|
21016
21046
|
const conditions = normalizedConditions(bag["filter"]);
|
|
21017
|
-
filterNames = collectFilterFieldNames(conditions ?? [], record.resource);
|
|
21047
|
+
filterNames = collectFilterFieldNames(conditions ?? [], record.resource, record.id);
|
|
21018
21048
|
}
|
|
21019
21049
|
if (fieldCheck === false) return;
|
|
21020
21050
|
const found = await findUnknownFieldNames(record, holder, { includeFields: includeNames ?? [], filter: filterNames ?? [] });
|
|
@@ -24816,7 +24846,7 @@ async function assertResourceActive(http, rid) {
|
|
|
24816
24846
|
async function resolveAllocationCode(http, rid, linkage, pins, departments) {
|
|
24817
24847
|
let usedLinkage = linkage;
|
|
24818
24848
|
const pinnedForCode = pins.code !== void 0 ? pins.code : pins.role;
|
|
24819
|
-
let code
|
|
24849
|
+
let code;
|
|
24820
24850
|
const familiesTried = [];
|
|
24821
24851
|
code = await resolveCode(http, familyOf(linkage), familyLabel(familyOf(linkage)), pinnedForCode, departments, OP5);
|
|
24822
24852
|
familiesTried.push({ family: familyOf(linkage), label: familyLabel(familyOf(linkage)), filters: [{ field: "useType", op: "eq", value: familyOf(linkage) }, { field: "isActive", op: "eq", value: true }] });
|
|
@@ -25578,6 +25608,7 @@ export {
|
|
|
25578
25608
|
collectAll,
|
|
25579
25609
|
toArray,
|
|
25580
25610
|
MODEL_DATE_FIELDS,
|
|
25611
|
+
normalizeOwnField,
|
|
25581
25612
|
WORKFLOW_RESOURCES,
|
|
25582
25613
|
MAX_FIELD_CATALOG_WIRE,
|
|
25583
25614
|
FIELD_CATALOG_HONESTY_NOTE,
|