node-autotask 0.39.0 → 0.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/MCP_TOOL_MANIFEST.md +4 -4
- package/N8N_MCP_MANIFEST.json +2 -2
- package/N8N_MCP_MANIFEST.md +3 -3
- package/capabilities.json +144 -144
- package/dist/capabilities.cjs +2 -2
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-45PLS73K.cjs → chunk-5QS3VT34.cjs} +160 -110
- package/dist/{chunk-2KQS3RHQ.js → chunk-GDSCYY2G.js} +143 -143
- package/dist/{chunk-LD5UPSDB.js → chunk-GSGP2B4I.js} +2 -2
- package/dist/{chunk-6ROB5KXB.cjs → chunk-HSBIVZGJ.cjs} +285 -285
- package/dist/{chunk-OKFTECIE.js → chunk-I7IM342A.js} +2 -2
- package/dist/{chunk-KSNK6UEW.cjs → chunk-N2JOGUGI.cjs} +143 -143
- package/dist/{chunk-FV5PJLIZ.js → chunk-UNOQESFU.js} +73 -23
- package/dist/{chunk-RAZEXOLC.cjs → chunk-VR6RYXTD.cjs} +143 -143
- package/dist/{index-Bmoiwhx2.d.ts → index-BsyWsYWi.d.cts} +7180 -51
- package/dist/{index-BVOOHPvr.d.cts → index-BsyWsYWi.d.ts} +7180 -51
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +4 -4
- package/dist/operations/index.cjs +179 -177
- package/dist/operations/index.d.cts +3 -221
- package/dist/operations/index.d.ts +3 -221
- package/dist/operations/index.js +4 -2
- package/dist/pool.cjs +9 -9
- package/dist/pool.d.cts +1 -2
- package/dist/pool.d.ts +1 -2
- package/dist/pool.js +4 -4
- package/dist/resources/index.cjs +4 -4
- package/dist/resources/index.d.cts +1 -2
- package/dist/resources/index.d.ts +1 -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 +49 -10
- package/package.json +1 -1
- package/dist/index-BQVStxwi.d.cts +0 -6893
- package/dist/index-BQVStxwi.d.ts +0 -6893
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
VersionInformationResource,
|
|
126
126
|
VersionResource,
|
|
127
127
|
ZoneInformationResource
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-GSGP2B4I.js";
|
|
129
129
|
import {
|
|
130
130
|
AutotaskConfigError,
|
|
131
131
|
BillingCodesResource,
|
|
@@ -141,7 +141,7 @@ import {
|
|
|
141
141
|
TimeEntriesResource,
|
|
142
142
|
resolveConfig,
|
|
143
143
|
runWithSignal
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-UNOQESFU.js";
|
|
145
145
|
|
|
146
146
|
// src/client.ts
|
|
147
147
|
var AutotaskClient = class {
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
var
|
|
128
|
+
var _chunkHSBIVZGJcjs = require('./chunk-HSBIVZGJ.cjs');
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
|
|
@@ -141,7 +141,7 @@ var _chunk6ROB5KXBcjs = require('./chunk-6ROB5KXB.cjs');
|
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
|
|
144
|
-
var
|
|
144
|
+
var _chunk5QS3VT34cjs = require('./chunk-5QS3VT34.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 = _chunk5QS3VT34cjs.resolveConfig.call(void 0, options);
|
|
296
|
+
this.http = new (0, _chunk5QS3VT34cjs.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, _chunkHSBIVZGJcjs.AppointmentsResource)(this.http, this.config.pageSize);
|
|
299
|
+
this.authenticateResource = new (0, _chunkHSBIVZGJcjs.AuthenticateResource)(this.http);
|
|
300
|
+
this.billingCodes = new (0, _chunk5QS3VT34cjs.BillingCodesResource)(this.http, this.config.pageSize);
|
|
301
|
+
this.billingItemApprovalLevels = new (0, _chunkHSBIVZGJcjs.BillingItemApprovalLevelsResource)(this.http, this.config.pageSize);
|
|
302
|
+
this.billingItems = new (0, _chunk5QS3VT34cjs.BillingItemsResource)(this.http, this.config.pageSize);
|
|
303
|
+
this.changeRequestLinks = new (0, _chunkHSBIVZGJcjs.ChangeRequestLinksResource)(this.http, this.config.pageSize);
|
|
304
|
+
this.checklistLibraries = new (0, _chunkHSBIVZGJcjs.ChecklistLibrariesResource)(this.http, this.config.pageSize);
|
|
305
|
+
this.checklistLibraryChecklistItems = new (0, _chunkHSBIVZGJcjs.ChecklistLibraryChecklistItemsResource)(this.http, this.config.pageSize);
|
|
306
|
+
this.classificationIcons = new (0, _chunkHSBIVZGJcjs.ClassificationIconsResource)(this.http, this.config.pageSize);
|
|
307
|
+
this.companies = new (0, _chunk5QS3VT34cjs.CompaniesResource)(this.http, this.config.pageSize);
|
|
308
|
+
this.companyAlerts = new (0, _chunkHSBIVZGJcjs.CompanyAlertsResource)(this.http, this.config.pageSize);
|
|
309
|
+
this.companyLocations = new (0, _chunkHSBIVZGJcjs.CompanyLocationsResource)(this.http, this.config.pageSize);
|
|
310
|
+
this.companyNotes = new (0, _chunkHSBIVZGJcjs.CompanyNotesResource)(this.http, this.config.pageSize);
|
|
311
|
+
this.companySiteConfigurations = new (0, _chunkHSBIVZGJcjs.CompanySiteConfigurationsResource)(this.http, this.config.pageSize);
|
|
312
|
+
this.companyWebhooks = new (0, _chunkHSBIVZGJcjs.CompanyWebhooksResource)(this.http, this.config.pageSize);
|
|
313
|
+
this.configurationItemBillingProductAssociations = new (0, _chunkHSBIVZGJcjs.ConfigurationItemBillingProductAssociationsResource)(this.http, this.config.pageSize);
|
|
314
|
+
this.configurationItemCategories = new (0, _chunkHSBIVZGJcjs.ConfigurationItemCategoriesResource)(this.http, this.config.pageSize);
|
|
315
|
+
this.configurationItemCategoryUdfAssociations = new (0, _chunkHSBIVZGJcjs.ConfigurationItemCategoryUdfAssociationsResource)(this.http, this.config.pageSize);
|
|
316
|
+
this.configurationItemDnsRecords = new (0, _chunkHSBIVZGJcjs.ConfigurationItemDnsRecordsResource)(this.http, this.config.pageSize);
|
|
317
|
+
this.configurationItemNotes = new (0, _chunkHSBIVZGJcjs.ConfigurationItemNotesResource)(this.http, this.config.pageSize);
|
|
318
|
+
this.configurationItemRelatedItems = new (0, _chunkHSBIVZGJcjs.ConfigurationItemRelatedItemsResource)(this.http, this.config.pageSize);
|
|
319
|
+
this.configurationItems = new (0, _chunkHSBIVZGJcjs.ConfigurationItemsResource)(this.http, this.config.pageSize);
|
|
320
|
+
this.configurationItemSslSubjectAlternativeNames = new (0, _chunkHSBIVZGJcjs.ConfigurationItemSslSubjectAlternativeNamesResource)(this.http, this.config.pageSize);
|
|
321
|
+
this.configurationItemTypes = new (0, _chunkHSBIVZGJcjs.ConfigurationItemTypesResource)(this.http, this.config.pageSize);
|
|
322
|
+
this.configurationItemWebhooks = new (0, _chunkHSBIVZGJcjs.ConfigurationItemWebhooksResource)(this.http, this.config.pageSize);
|
|
323
|
+
this.contactGroupContacts = new (0, _chunkHSBIVZGJcjs.ContactGroupContactsResource)(this.http, this.config.pageSize);
|
|
324
|
+
this.contactGroups = new (0, _chunkHSBIVZGJcjs.ContactGroupsResource)(this.http, this.config.pageSize);
|
|
325
|
+
this.contacts = new (0, _chunkHSBIVZGJcjs.ContactsResource)(this.http, this.config.pageSize);
|
|
326
|
+
this.contactWebhooks = new (0, _chunkHSBIVZGJcjs.ContactWebhooksResource)(this.http, this.config.pageSize);
|
|
327
|
+
this.contractBillingRules = new (0, _chunkHSBIVZGJcjs.ContractBillingRulesResource)(this.http, this.config.pageSize);
|
|
328
|
+
this.contractBlockHourFactors = new (0, _chunkHSBIVZGJcjs.ContractBlockHourFactorsResource)(this.http, this.config.pageSize);
|
|
329
|
+
this.contractBlocks = new (0, _chunkHSBIVZGJcjs.ContractBlocksResource)(this.http, this.config.pageSize);
|
|
330
|
+
this.contractCharges = new (0, _chunkHSBIVZGJcjs.ContractChargesResource)(this.http, this.config.pageSize);
|
|
331
|
+
this.contractExclusionBillingCodes = new (0, _chunkHSBIVZGJcjs.ContractExclusionBillingCodesResource)(this.http, this.config.pageSize);
|
|
332
|
+
this.contractExclusionRoles = new (0, _chunkHSBIVZGJcjs.ContractExclusionRolesResource)(this.http, this.config.pageSize);
|
|
333
|
+
this.contractExclusionSetExcludedRoles = new (0, _chunkHSBIVZGJcjs.ContractExclusionSetExcludedRolesResource)(this.http, this.config.pageSize);
|
|
334
|
+
this.contractExclusionSetExcludedWorkTypes = new (0, _chunkHSBIVZGJcjs.ContractExclusionSetExcludedWorkTypesResource)(this.http, this.config.pageSize);
|
|
335
|
+
this.contractExclusionSets = new (0, _chunkHSBIVZGJcjs.ContractExclusionSetsResource)(this.http, this.config.pageSize);
|
|
336
|
+
this.contractMilestones = new (0, _chunkHSBIVZGJcjs.ContractMilestonesResource)(this.http, this.config.pageSize);
|
|
337
|
+
this.contractNotes = new (0, _chunkHSBIVZGJcjs.ContractNotesResource)(this.http, this.config.pageSize);
|
|
338
|
+
this.contractRates = new (0, _chunkHSBIVZGJcjs.ContractRatesResource)(this.http, this.config.pageSize);
|
|
339
|
+
this.contractRetainers = new (0, _chunkHSBIVZGJcjs.ContractRetainersResource)(this.http, this.config.pageSize);
|
|
340
|
+
this.contractRoleCosts = new (0, _chunkHSBIVZGJcjs.ContractRoleCostsResource)(this.http, this.config.pageSize);
|
|
341
|
+
this.contractServiceAdjustments = new (0, _chunkHSBIVZGJcjs.ContractServiceAdjustmentsResource)(this.http, this.config.pageSize);
|
|
342
|
+
this.contractServiceBundleAdjustments = new (0, _chunkHSBIVZGJcjs.ContractServiceBundleAdjustmentsResource)(this.http, this.config.pageSize);
|
|
343
|
+
this.contractServiceBundles = new (0, _chunkHSBIVZGJcjs.ContractServiceBundlesResource)(this.http, this.config.pageSize);
|
|
344
|
+
this.contractServiceBundleUnits = new (0, _chunkHSBIVZGJcjs.ContractServiceBundleUnitsResource)(this.http, this.config.pageSize);
|
|
345
|
+
this.contractServices = new (0, _chunkHSBIVZGJcjs.ContractServicesResource)(this.http, this.config.pageSize);
|
|
346
|
+
this.contractServiceUnits = new (0, _chunkHSBIVZGJcjs.ContractServiceUnitsResource)(this.http, this.config.pageSize);
|
|
347
|
+
this.contracts = new (0, _chunk5QS3VT34cjs.ContractsResource)(this.http, this.config.pageSize);
|
|
348
|
+
this.contractTicketPurchases = new (0, _chunkHSBIVZGJcjs.ContractTicketPurchasesResource)(this.http, this.config.pageSize);
|
|
349
|
+
this.countries = new (0, _chunkHSBIVZGJcjs.CountriesResource)(this.http, this.config.pageSize);
|
|
350
|
+
this.currencies = new (0, _chunkHSBIVZGJcjs.CurrenciesResource)(this.http, this.config.pageSize);
|
|
351
|
+
this.departments = new (0, _chunkHSBIVZGJcjs.DepartmentsResource)(this.http, this.config.pageSize);
|
|
352
|
+
this.domainRegistrars = new (0, _chunkHSBIVZGJcjs.DomainRegistrarsResource)(this.http, this.config.pageSize);
|
|
353
|
+
this.entityInformation = new (0, _chunkHSBIVZGJcjs.EntityInformationResource)(this.http);
|
|
354
|
+
this.expenseItemAttachments = new (0, _chunkHSBIVZGJcjs.ExpenseItemAttachmentsResource)(this.http, this.config.pageSize);
|
|
355
|
+
this.expenseItems = new (0, _chunkHSBIVZGJcjs.ExpenseItemsResource)(this.http, this.config.pageSize);
|
|
356
|
+
this.expenseReports = new (0, _chunkHSBIVZGJcjs.ExpenseReportsResource)(this.http, this.config.pageSize);
|
|
357
|
+
this.holidaySets = new (0, _chunkHSBIVZGJcjs.HolidaySetsResource)(this.http, this.config.pageSize);
|
|
358
|
+
this.holidays = new (0, _chunkHSBIVZGJcjs.HolidaysResource)(this.http, this.config.pageSize);
|
|
359
|
+
this.inventoryProducts = new (0, _chunkHSBIVZGJcjs.InventoryProductsResource)(this.http, this.config.pageSize);
|
|
360
|
+
this.invoices = new (0, _chunk5QS3VT34cjs.InvoicesResource)(this.http, this.config.pageSize);
|
|
361
|
+
this.invoiceTemplates = new (0, _chunkHSBIVZGJcjs.InvoiceTemplatesResource)(this.http, this.config.pageSize);
|
|
362
|
+
this.modules = new (0, _chunkHSBIVZGJcjs.ModulesResource)(this.http);
|
|
363
|
+
this.notificationHistory = new (0, _chunkHSBIVZGJcjs.NotificationHistoryResource)(this.http, this.config.pageSize);
|
|
364
|
+
this.opportunities = new (0, _chunkHSBIVZGJcjs.OpportunitiesResource)(this.http, this.config.pageSize);
|
|
365
|
+
this.opportunityAttachments = new (0, _chunkHSBIVZGJcjs.OpportunityAttachmentsResource)(this.http, this.config.pageSize);
|
|
366
|
+
this.opportunityCategories = new (0, _chunkHSBIVZGJcjs.OpportunityCategoriesResource)(this.http, this.config.pageSize);
|
|
367
|
+
this.organizationalLevel1s = new (0, _chunk5QS3VT34cjs.OrganizationalLevel1sResource)(this.http, this.config.pageSize);
|
|
368
|
+
this.organizationalLevel2s = new (0, _chunk5QS3VT34cjs.OrganizationalLevel2sResource)(this.http, this.config.pageSize);
|
|
369
|
+
this.organizationalLevelAssociations = new (0, _chunk5QS3VT34cjs.OrganizationalLevelAssociationsResource)(this.http, this.config.pageSize);
|
|
370
|
+
this.phases = new (0, _chunkHSBIVZGJcjs.PhasesResource)(this.http, this.config.pageSize);
|
|
371
|
+
this.products = new (0, _chunkHSBIVZGJcjs.ProductsResource)(this.http, this.config.pageSize);
|
|
372
|
+
this.productVendors = new (0, _chunkHSBIVZGJcjs.ProductVendorsResource)(this.http, this.config.pageSize);
|
|
373
|
+
this.projectCharges = new (0, _chunkHSBIVZGJcjs.ProjectChargesResource)(this.http, this.config.pageSize);
|
|
374
|
+
this.projectNotes = new (0, _chunkHSBIVZGJcjs.ProjectNotesResource)(this.http, this.config.pageSize);
|
|
375
|
+
this.projects = new (0, _chunkHSBIVZGJcjs.ProjectsResource)(this.http, this.config.pageSize);
|
|
376
|
+
this.purchaseApprovals = new (0, _chunkHSBIVZGJcjs.PurchaseApprovalsResource)(this.http, this.config.pageSize);
|
|
377
|
+
this.purchaseOrderItemReceiving = new (0, _chunkHSBIVZGJcjs.PurchaseOrderItemReceivingResource)(this.http, this.config.pageSize);
|
|
378
|
+
this.purchaseOrderItems = new (0, _chunkHSBIVZGJcjs.PurchaseOrderItemsResource)(this.http, this.config.pageSize);
|
|
379
|
+
this.purchaseOrders = new (0, _chunkHSBIVZGJcjs.PurchaseOrdersResource)(this.http, this.config.pageSize);
|
|
380
|
+
this.quoteItems = new (0, _chunkHSBIVZGJcjs.QuoteItemsResource)(this.http, this.config.pageSize);
|
|
381
|
+
this.quoteLocations = new (0, _chunkHSBIVZGJcjs.QuoteLocationsResource)(this.http, this.config.pageSize);
|
|
382
|
+
this.quotes = new (0, _chunkHSBIVZGJcjs.QuotesResource)(this.http, this.config.pageSize);
|
|
383
|
+
this.quoteTemplates = new (0, _chunkHSBIVZGJcjs.QuoteTemplatesResource)(this.http, this.config.pageSize);
|
|
384
|
+
this.resourceRoleQueues = new (0, _chunkHSBIVZGJcjs.ResourceRoleQueuesResource)(this.http, this.config.pageSize);
|
|
385
|
+
this.resourceRoles = new (0, _chunkHSBIVZGJcjs.ResourceRolesResource)(this.http, this.config.pageSize);
|
|
386
|
+
this.resourceSkills = new (0, _chunkHSBIVZGJcjs.ResourceSkillsResource)(this.http, this.config.pageSize);
|
|
387
|
+
this.resources = new (0, _chunk5QS3VT34cjs.ResourcesResource)(this.http, this.config, this.config.pageSize);
|
|
388
|
+
this.resourceTimeOffAdditional = new (0, _chunkHSBIVZGJcjs.ResourceTimeOffAdditionalResource)(this.http, this.config.pageSize);
|
|
389
|
+
this.resourceTimeOffApprovers = new (0, _chunkHSBIVZGJcjs.ResourceTimeOffApproversResource)(this.http, this.config.pageSize);
|
|
390
|
+
this.resourceTimeOffBalances = new (0, _chunkHSBIVZGJcjs.ResourceTimeOffBalancesResource)(this.http, this.config.pageSize);
|
|
391
|
+
this.roles = new (0, _chunkHSBIVZGJcjs.RolesResource)(this.http, this.config.pageSize);
|
|
392
|
+
this.salesOrders = new (0, _chunkHSBIVZGJcjs.SalesOrdersResource)(this.http, this.config.pageSize);
|
|
393
|
+
this.serviceCalls = new (0, _chunkHSBIVZGJcjs.ServiceCallsResource)(this.http, this.config.pageSize);
|
|
394
|
+
this.serviceCallTaskResources = new (0, _chunkHSBIVZGJcjs.ServiceCallTaskResourcesResource)(this.http, this.config.pageSize);
|
|
395
|
+
this.serviceCallTasks = new (0, _chunkHSBIVZGJcjs.ServiceCallTasksResource)(this.http, this.config.pageSize);
|
|
396
|
+
this.serviceCallTicketResources = new (0, _chunkHSBIVZGJcjs.ServiceCallTicketResourcesResource)(this.http, this.config.pageSize);
|
|
397
|
+
this.serviceCallTickets = new (0, _chunkHSBIVZGJcjs.ServiceCallTicketsResource)(this.http, this.config.pageSize);
|
|
398
|
+
this.serviceLevelAgreementResults = new (0, _chunkHSBIVZGJcjs.ServiceLevelAgreementResultsResource)(this.http, this.config.pageSize);
|
|
399
|
+
this.services = new (0, _chunkHSBIVZGJcjs.ServicesResource)(this.http, this.config.pageSize);
|
|
400
|
+
this.skills = new (0, _chunkHSBIVZGJcjs.SkillsResource)(this.http, this.config.pageSize);
|
|
401
|
+
this.subscriptionPeriods = new (0, _chunkHSBIVZGJcjs.SubscriptionPeriodsResource)(this.http, this.config.pageSize);
|
|
402
|
+
this.subscriptions = new (0, _chunkHSBIVZGJcjs.SubscriptionsResource)(this.http, this.config.pageSize);
|
|
403
|
+
this.surveyResults = new (0, _chunkHSBIVZGJcjs.SurveyResultsResource)(this.http, this.config.pageSize);
|
|
404
|
+
this.surveys = new (0, _chunkHSBIVZGJcjs.SurveysResource)(this.http, this.config.pageSize);
|
|
405
|
+
this.tagAliases = new (0, _chunkHSBIVZGJcjs.TagAliasesResource)(this.http, this.config.pageSize);
|
|
406
|
+
this.tagGroups = new (0, _chunkHSBIVZGJcjs.TagGroupsResource)(this.http, this.config.pageSize);
|
|
407
|
+
this.tags = new (0, _chunkHSBIVZGJcjs.TagsResource)(this.http, this.config.pageSize);
|
|
408
|
+
this.taskSecondaryResources = new (0, _chunkHSBIVZGJcjs.TaskSecondaryResourcesResource)(this.http, this.config.pageSize);
|
|
409
|
+
this.tasks = new (0, _chunkHSBIVZGJcjs.TasksResource)(this.http, this.config.pageSize);
|
|
410
|
+
this.taxRegions = new (0, _chunkHSBIVZGJcjs.TaxRegionsResource)(this.http, this.config.pageSize);
|
|
411
|
+
this.thresholdInformation = new (0, _chunkHSBIVZGJcjs.ThresholdInformationResource)(this.http);
|
|
412
|
+
this.ticketAdditionalConfigurationItems = new (0, _chunkHSBIVZGJcjs.TicketAdditionalConfigurationItemsResource)(this.http, this.config.pageSize);
|
|
413
|
+
this.ticketAdditionalContacts = new (0, _chunkHSBIVZGJcjs.TicketAdditionalContactsResource)(this.http, this.config.pageSize);
|
|
414
|
+
this.ticketAttachments = new (0, _chunkHSBIVZGJcjs.TicketAttachmentsResource)(this.http, this.config.pageSize);
|
|
415
|
+
this.ticketCategories = new (0, _chunkHSBIVZGJcjs.TicketCategoriesResource)(this.http, this.config.pageSize);
|
|
416
|
+
this.ticketCategoryFieldDefaults = new (0, _chunkHSBIVZGJcjs.TicketCategoryFieldDefaultsResource)(this.http, this.config.pageSize);
|
|
417
|
+
this.ticketChangeRequestApprovals = new (0, _chunkHSBIVZGJcjs.TicketChangeRequestApprovalsResource)(this.http, this.config.pageSize);
|
|
418
|
+
this.ticketCharges = new (0, _chunkHSBIVZGJcjs.TicketChargesResource)(this.http, this.config.pageSize);
|
|
419
|
+
this.ticketChecklistItems = new (0, _chunkHSBIVZGJcjs.TicketChecklistItemsResource)(this.http, this.config.pageSize);
|
|
420
|
+
this.ticketChecklistLibraries = new (0, _chunkHSBIVZGJcjs.TicketChecklistLibrariesResource)(this.http, this.config.pageSize);
|
|
421
|
+
this.ticketHistory = new (0, _chunkHSBIVZGJcjs.TicketHistoryResource)(this.http, this.config.pageSize);
|
|
422
|
+
this.ticketNoteAttachments = new (0, _chunkHSBIVZGJcjs.TicketNoteAttachmentsResource)(this.http, this.config.pageSize);
|
|
423
|
+
this.ticketNotes = new (0, _chunkHSBIVZGJcjs.TicketNotesResource)(this.http, this.config.pageSize);
|
|
424
|
+
this.ticketNoteWebhooks = new (0, _chunkHSBIVZGJcjs.TicketNoteWebhooksResource)(this.http, this.config.pageSize);
|
|
425
|
+
this.ticketSecondaryResources = new (0, _chunkHSBIVZGJcjs.TicketSecondaryResourcesResource)(this.http, this.config.pageSize);
|
|
426
|
+
this.tickets = new (0, _chunkHSBIVZGJcjs.TicketsResource)(this.http, this.config.pageSize);
|
|
427
|
+
this.ticketWebhooks = new (0, _chunkHSBIVZGJcjs.TicketWebhooksResource)(this.http, this.config.pageSize);
|
|
428
|
+
this.timeEntries = new (0, _chunk5QS3VT34cjs.TimeEntriesResource)(this.http, this.config.pageSize);
|
|
429
|
+
this.timeEntryAttachments = new (0, _chunkHSBIVZGJcjs.TimeEntryAttachmentsResource)(this.http, this.config.pageSize);
|
|
430
|
+
this.timeOffRequests = new (0, _chunkHSBIVZGJcjs.TimeOffRequestsResource)(this.http, this.config.pageSize);
|
|
431
|
+
this.versionInformation = new (0, _chunkHSBIVZGJcjs.VersionInformationResource)(this.http);
|
|
432
|
+
this.version = new (0, _chunkHSBIVZGJcjs.VersionResource)(this.http);
|
|
433
|
+
this.zoneInformation = new (0, _chunkHSBIVZGJcjs.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 _chunk5QS3VT34cjs.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, _chunk5QS3VT34cjs.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) : _chunk5QS3VT34cjs.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,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CAPABILITIES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GDSCYY2G.js";
|
|
4
4
|
import {
|
|
5
5
|
wrapUntrusted
|
|
6
6
|
} from "./chunk-5VHSLJMR.js";
|
|
@@ -20530,6 +20530,7 @@ var BaseResource = class extends MutationBase {
|
|
|
20530
20530
|
|
|
20531
20531
|
// src/operations/compositeNames.ts
|
|
20532
20532
|
var PICKLIST_VALUE_NOT_SERVED_NOTE = "The picklist is served to this API user, but this record's value is not in it (an inactive or unexposed value) \u2014 the label cannot be resolved and is null; refreshing the field catalog will not surface it. (A picklist the vendor does not expose at all is reported with the field-catalog honesty note instead.)";
|
|
20533
|
+
var PICKLIST_CATALOG_UNAVAILABLE_NOTE = "The field-catalog read that serves picklist labels failed for this call, so this label is unavailable (null), not absent: the value may well have one. Retry the call once the catalog read succeeds (see names.catalogError).";
|
|
20533
20534
|
var DEFAULT_MAX_NAME_READS = 20;
|
|
20534
20535
|
var TICKET_LABEL_FIELDS = ["status", "priority", "ticketType", "issueType", "subIssueType", "source", "queueID"];
|
|
20535
20536
|
function isVendorId(value) {
|
|
@@ -20556,7 +20557,7 @@ function createNamePlan(labelFields = [], labelResource) {
|
|
|
20556
20557
|
...lineOfBusinessContractId !== void 0 ? { lineOfBusinessContractId } : {}
|
|
20557
20558
|
}),
|
|
20558
20559
|
addResource: (value) => {
|
|
20559
|
-
if (!isVendorId(value)) return;
|
|
20560
|
+
if (!isVendorId(value) || Number(value) === 0) return;
|
|
20560
20561
|
const k = String(value);
|
|
20561
20562
|
if (!resSeen.has(k)) {
|
|
20562
20563
|
resSeen.add(k);
|
|
@@ -20564,7 +20565,7 @@ function createNamePlan(labelFields = [], labelResource) {
|
|
|
20564
20565
|
}
|
|
20565
20566
|
},
|
|
20566
20567
|
addFk: (table, value) => {
|
|
20567
|
-
if (!isVendorId(value)) return;
|
|
20568
|
+
if (!isVendorId(value) || Number(value) === 0) return;
|
|
20568
20569
|
const k = `${table}:${String(value)}`;
|
|
20569
20570
|
if (!fkSeen.has(k)) {
|
|
20570
20571
|
fkSeen.add(k);
|
|
@@ -20786,12 +20787,14 @@ async function resolveCompositeNames(http, plan, opts = {}) {
|
|
|
20786
20787
|
const picklists = {};
|
|
20787
20788
|
if (plan.labelFields.length > 0) {
|
|
20788
20789
|
let usable = true;
|
|
20790
|
+
let failure;
|
|
20789
20791
|
try {
|
|
20790
20792
|
const labelResource = plan.labelResource ?? "tickets";
|
|
20791
20793
|
const catalog = await fieldCatalog(client, { resources: [labelResource], labels: true, fields: [...plan.labelFields] });
|
|
20792
20794
|
const row = catalog.rows.find((r) => r.resource === labelResource);
|
|
20793
20795
|
if (row === void 0 || row.error !== null || row.fields === void 0) {
|
|
20794
20796
|
usable = false;
|
|
20797
|
+
failure = row?.error ?? { code: "INVALID_RESPONSE", message: `fieldCatalog: no ${labelResource} row` };
|
|
20795
20798
|
} else {
|
|
20796
20799
|
for (const f of plan.labelFields) {
|
|
20797
20800
|
const frow = row.fields.find((x) => x.name === f);
|
|
@@ -20799,10 +20802,15 @@ async function resolveCompositeNames(http, plan, opts = {}) {
|
|
|
20799
20802
|
}
|
|
20800
20803
|
}
|
|
20801
20804
|
} catch (err) {
|
|
20802
|
-
if (isAutotaskError(err) && err.code !== "ABORTED")
|
|
20803
|
-
|
|
20805
|
+
if (isAutotaskError(err) && err.code !== "ABORTED") {
|
|
20806
|
+
usable = false;
|
|
20807
|
+
failure = { code: err.code, message: err.message };
|
|
20808
|
+
} else throw err;
|
|
20809
|
+
}
|
|
20810
|
+
if (!usable) {
|
|
20811
|
+
section.catalogError = failure;
|
|
20812
|
+
for (const f of plan.labelFields) section.reasons[f] = PICKLIST_CATALOG_UNAVAILABLE_NOTE;
|
|
20804
20813
|
}
|
|
20805
|
-
if (!usable) for (const f of plan.labelFields) section.reasons[f] = FIELD_CATALOG_HONESTY_NOTE;
|
|
20806
20814
|
}
|
|
20807
20815
|
let lineOfBusiness2 = null;
|
|
20808
20816
|
const lobId = plan.lineOfBusinessId ?? contractLobPointer;
|
|
@@ -20835,12 +20843,12 @@ async function resolveCompositeNames(http, plan, opts = {}) {
|
|
|
20835
20843
|
if (value === null || value === void 0) return null;
|
|
20836
20844
|
const values = picklists[field];
|
|
20837
20845
|
if (values === void 0) {
|
|
20838
|
-
section.reasons[field] = FIELD_CATALOG_HONESTY_NOTE;
|
|
20846
|
+
section.reasons[field] = section.catalogError !== void 0 ? PICKLIST_CATALOG_UNAVAILABLE_NOTE : FIELD_CATALOG_HONESTY_NOTE;
|
|
20839
20847
|
return null;
|
|
20840
20848
|
}
|
|
20841
20849
|
const hit = values.find((v) => String(v.value) === String(value));
|
|
20842
20850
|
if (hit === void 0) {
|
|
20843
|
-
section.reasons[field] = PICKLIST_VALUE_NOT_SERVED_NOTE;
|
|
20851
|
+
if (String(value) !== "0") section.reasons[field] = PICKLIST_VALUE_NOT_SERVED_NOTE;
|
|
20844
20852
|
return null;
|
|
20845
20853
|
}
|
|
20846
20854
|
return typeof hit.label === "string" ? hit.label : null;
|
|
@@ -20861,6 +20869,7 @@ function untrustedName(name) {
|
|
|
20861
20869
|
const [[capped]] = truncateNoteChars([{ v: name }], LABEL_NAME_MAX_CHARS, ["v"]);
|
|
20862
20870
|
return wrapUntrusted(capped.v) ?? capped.v;
|
|
20863
20871
|
}
|
|
20872
|
+
var lastPicklists = /* @__PURE__ */ new WeakMap();
|
|
20864
20873
|
function readNamesOpt(value, where) {
|
|
20865
20874
|
if (value === void 0) return true;
|
|
20866
20875
|
if (typeof value !== "boolean") {
|
|
@@ -20873,17 +20882,31 @@ async function labelRows(client, resourceKey, rows) {
|
|
|
20873
20882
|
for (const row of rows) for (const k of Object.keys(row)) keys.add(k);
|
|
20874
20883
|
if (keys.size === 0) return { rows: [...rows] };
|
|
20875
20884
|
let picklistFields = [];
|
|
20885
|
+
let unavailable = [];
|
|
20886
|
+
let catalogError;
|
|
20876
20887
|
const modelFields = MODEL_FIELD_SETS[resourceKey] ?? [];
|
|
20877
20888
|
const candidates = [...keys].filter((f) => f !== "id" && modelFields.includes(f) && ROW_FK_TABLES[f] === void 0 && !isResourceFkField(f));
|
|
20878
20889
|
if (candidates.length > 0) try {
|
|
20879
20890
|
const catalog = await fieldCatalog(client, { resources: [resourceKey], labels: true });
|
|
20880
|
-
const
|
|
20881
|
-
|
|
20891
|
+
const row = catalog.rows.find((r) => r.resource === resourceKey);
|
|
20892
|
+
const known = lastPicklists.get(client) ?? /* @__PURE__ */ new Map();
|
|
20893
|
+
lastPicklists.set(client, known);
|
|
20894
|
+
if (row?.fields === void 0) {
|
|
20895
|
+
const last = known.get(resourceKey);
|
|
20896
|
+
unavailable = (last ?? []).filter((f) => candidates.includes(f));
|
|
20897
|
+
if (last === void 0 || unavailable.length > 0) {
|
|
20898
|
+
catalogError = row?.error ?? { code: "INVALID_RESPONSE", message: `fieldCatalog: no ${resourceKey} row` };
|
|
20899
|
+
}
|
|
20900
|
+
} else {
|
|
20901
|
+
const all = row.fields.filter((f) => f.isPickList).map((f) => f.name);
|
|
20902
|
+
known.set(resourceKey, all);
|
|
20903
|
+
picklistFields = all.filter((f) => candidates.includes(f));
|
|
20904
|
+
}
|
|
20882
20905
|
} catch (err) {
|
|
20883
20906
|
if (!isAutotaskError(err) || err.code === "ABORTED") throw err;
|
|
20884
20907
|
}
|
|
20885
|
-
const labelled = (field) => picklistFields.includes(field) || ROW_FK_TABLES[field] !== void 0 || isResourceFkField(field);
|
|
20886
|
-
if (![...keys].some(labelled)) return { rows: [...rows] };
|
|
20908
|
+
const labelled = (field) => picklistFields.includes(field) || unavailable.includes(field) || ROW_FK_TABLES[field] !== void 0 || isResourceFkField(field);
|
|
20909
|
+
if (catalogError === void 0 && ![...keys].some(labelled)) return { rows: [...rows] };
|
|
20887
20910
|
const builder = createNamePlan(picklistFields, resourceKey);
|
|
20888
20911
|
for (const row of rows) {
|
|
20889
20912
|
for (const [field, value] of Object.entries(row)) {
|
|
@@ -20895,11 +20918,18 @@ async function labelRows(client, resourceKey, rows) {
|
|
|
20895
20918
|
}
|
|
20896
20919
|
const plan = builder.plan();
|
|
20897
20920
|
const names = plan.resourceIds.length === 0 && plan.recordFks.length === 0 && picklistFields.length === 0 ? void 0 : await resolveCompositeNames(client.http, plan);
|
|
20921
|
+
const secondReadFailed = names?.section.catalogError;
|
|
20922
|
+
if (secondReadFailed !== void 0) {
|
|
20923
|
+
catalogError ??= secondReadFailed;
|
|
20924
|
+
unavailable = [.../* @__PURE__ */ new Set([...unavailable, ...picklistFields])];
|
|
20925
|
+
}
|
|
20898
20926
|
const out = rows.map((row) => {
|
|
20899
20927
|
const r = { ...row };
|
|
20900
20928
|
for (const [field, value] of Object.entries(row)) {
|
|
20901
|
-
const
|
|
20902
|
-
if (picklistFields.includes(field)) r[`${field}Label`] =
|
|
20929
|
+
const has2 = value !== null && value !== void 0 && names !== void 0;
|
|
20930
|
+
if (picklistFields.includes(field)) r[`${field}Label`] = has2 ? names.labelFor(field, value) : null;
|
|
20931
|
+
else if (unavailable.includes(field)) r[`${field}Label`] = null;
|
|
20932
|
+
const set = has2 && value !== 0 && value !== "0";
|
|
20903
20933
|
const table = ROW_FK_TABLES[field];
|
|
20904
20934
|
if (table !== void 0) r[`${field}Name`] = set && isVendorId(value) ? untrustedName(names.recordName(table, value)) : null;
|
|
20905
20935
|
else if (isResourceFkField(field)) r[`${field}Name`] = set && isVendorId(value) ? untrustedName(names.resourceName(value)) : null;
|
|
@@ -20907,16 +20937,28 @@ async function labelRows(client, resourceKey, rows) {
|
|
|
20907
20937
|
if (r["assignedResourceIDName"] !== void 0) r["assignedResourceName"] = r["assignedResourceIDName"];
|
|
20908
20938
|
return r;
|
|
20909
20939
|
});
|
|
20910
|
-
|
|
20911
|
-
const
|
|
20912
|
-
const reasons = names
|
|
20913
|
-
|
|
20940
|
+
const capped = names === void 0 ? 0 : Object.values(names.section.rows).filter((row) => row.capped).length;
|
|
20941
|
+
const unresolved = Object.keys(names?.section.reasons ?? {});
|
|
20942
|
+
const reasons = { ...names?.section.reasons };
|
|
20943
|
+
for (const f of unavailable) reasons[f] = PICKLIST_CATALOG_UNAVAILABLE_NOTE;
|
|
20944
|
+
if (capped === 0 && unresolved.length === 0 && catalogError === void 0) return { rows: out };
|
|
20914
20945
|
const parts = [];
|
|
20915
20946
|
if (capped > 0) parts.push(`${capped} id(s) left unlabelled (their *Name is null): the per-call cap of ${DEFAULT_MAX_NAME_READS} uncached name reads was hit \u2014 names already read are cached, so repeating or narrowing the call labels more`);
|
|
20916
|
-
if (
|
|
20947
|
+
if (unresolved.length > 0) parts.push(`picklist label(s) unavailable for ${unresolved.join(", ")} (see reasons)`);
|
|
20948
|
+
if (catalogError !== void 0) {
|
|
20949
|
+
parts.push(
|
|
20950
|
+
`the ${resourceKey} field catalog read failed (${catalogError.code}), so picklist labels are unavailable for this call, not absent: ` + (unavailable.length > 0 ? `the *Label is null for ${unavailable.join(", ")}` : "no *Label sibling was added (the picklist fields are unknown until a catalog read succeeds)") + " \u2014 retry the call to label them"
|
|
20951
|
+
);
|
|
20952
|
+
}
|
|
20917
20953
|
return {
|
|
20918
20954
|
rows: out,
|
|
20919
|
-
names: {
|
|
20955
|
+
names: {
|
|
20956
|
+
truncated: capped > 0,
|
|
20957
|
+
capped,
|
|
20958
|
+
note: parts.join("; "),
|
|
20959
|
+
...Object.keys(reasons).length > 0 ? { reasons } : {},
|
|
20960
|
+
...catalogError !== void 0 ? { catalogError } : {}
|
|
20961
|
+
}
|
|
20920
20962
|
};
|
|
20921
20963
|
}
|
|
20922
20964
|
async function labelFetchResults(client, result) {
|
|
@@ -20926,20 +20968,27 @@ async function labelFetchResults(client, result) {
|
|
|
20926
20968
|
});
|
|
20927
20969
|
const results = [...result.results];
|
|
20928
20970
|
const summaries = [];
|
|
20971
|
+
const reasons = {};
|
|
20972
|
+
const catalogErrors = {};
|
|
20929
20973
|
for (const [resource, indices] of byResource) {
|
|
20930
20974
|
const labelled = await labelRows(client, resource, indices.map((i) => results[i].value));
|
|
20931
20975
|
indices.forEach((idx, j) => {
|
|
20932
20976
|
results[idx] = { ...results[idx], value: labelled.rows[j] };
|
|
20933
20977
|
});
|
|
20934
|
-
if (labelled.names !== void 0)
|
|
20978
|
+
if (labelled.names !== void 0) {
|
|
20979
|
+
summaries.push(labelled.names);
|
|
20980
|
+
for (const [field, why] of Object.entries(labelled.names.reasons ?? {})) reasons[`${resource}.${field}`] = why;
|
|
20981
|
+
if (labelled.names.catalogError !== void 0) catalogErrors[resource] = labelled.names.catalogError;
|
|
20982
|
+
}
|
|
20935
20983
|
}
|
|
20936
20984
|
if (summaries.length === 0) return { ...result, results };
|
|
20937
|
-
const
|
|
20985
|
+
const catalogError = Object.values(catalogErrors)[0];
|
|
20938
20986
|
const names = {
|
|
20939
20987
|
truncated: summaries.some((s) => s.truncated),
|
|
20940
20988
|
capped: summaries.reduce((n, s) => n + s.capped, 0),
|
|
20941
20989
|
note: summaries.map((s) => s.note).join("; "),
|
|
20942
|
-
...Object.keys(reasons).length > 0 ? { reasons } : {}
|
|
20990
|
+
...Object.keys(reasons).length > 0 ? { reasons } : {},
|
|
20991
|
+
...catalogError !== void 0 ? { catalogError, catalogErrors } : {}
|
|
20943
20992
|
};
|
|
20944
20993
|
return { ...result, results, names };
|
|
20945
20994
|
}
|
|
@@ -26608,6 +26657,7 @@ export {
|
|
|
26608
26657
|
MIN_FIELD_CATALOG_MAX_BYTES,
|
|
26609
26658
|
fieldCatalog,
|
|
26610
26659
|
PICKLIST_VALUE_NOT_SERVED_NOTE,
|
|
26660
|
+
PICKLIST_CATALOG_UNAVAILABLE_NOTE,
|
|
26611
26661
|
TICKET_LABEL_FIELDS,
|
|
26612
26662
|
createNamePlan,
|
|
26613
26663
|
addNameSibling,
|