node-autotask 0.37.0 → 0.37.1
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 +8 -0
- package/dist/{chunk-7WR5WUQT.cjs → chunk-25VGFT5M.cjs} +143 -143
- package/dist/{chunk-CH2WXTYD.js → chunk-7IADHNBZ.js} +50 -13
- package/dist/{chunk-2PJCQGXZ.js → chunk-7WI7FBPB.js} +2 -2
- package/dist/{chunk-4GHBN2AW.cjs → chunk-PFFW4DIK.cjs} +283 -283
- package/dist/{chunk-75WJS26D.js → chunk-PFJAMFUL.js} +1 -1
- package/dist/{chunk-FYF46OT3.cjs → chunk-TBFXRNNE.cjs} +50 -13
- package/dist/{index-DAFg_68I.d.ts → index-BDqw377y.d.ts} +29 -3
- package/dist/{index-g8J6Qiu1.d.cts → index-CqepIQfp.d.cts} +29 -3
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/operations/index.cjs +169 -169
- package/dist/operations/index.d.cts +2 -2
- package/dist/operations/index.d.ts +2 -2
- package/dist/operations/index.js +1 -1
- package/dist/pool.cjs +8 -8
- package/dist/pool.d.cts +1 -1
- package/dist/pool.d.ts +1 -1
- package/dist/pool.js +3 -3
- package/dist/resources/index.cjs +3 -3
- package/dist/resources/index.d.cts +1 -1
- package/dist/resources/index.d.ts +1 -1
- package/dist/resources/index.js +2 -2
- package/docs/API.md +10 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.37.1] - 2026-10-29
|
|
9
|
+
Patch: circuit-breaker probe-settlement fixes only; the plan hash is unchanged (`5cd6c667...`), so consumers need no re-pin for the plan.
|
|
10
|
+
### Fixed
|
|
11
|
+
- **#262 (#270): a half-open probe that settles with a NON-COUNTED outcome releases its slot.** Any 4xx, ABORTED, EMPTY_RESPONSE, INVALID_RESPONSE, REDIRECT_BLOCKED or the deterministic field-validation 500 used to leave the admitted probe slot held, so two such probes exhausted `halfOpenProbes` and every later call to the host was refused locally with no way to self-heal. The slot is now released without counting a failure or re-arming the open period.
|
|
12
|
+
- **#271 (#272): a stale probe settlement is voided against a newer window.** A probe is pinned to the open window it was admitted in; if the circuit closed and re-opened while it was in flight, its late success, counted failure or non-counted settle no longer releases a slot, counts, re-arms or closes the newer window (the `halfOpenProbes` cap could be exceeded). A counted probe failure landing on a CLOSED host still counts like any in-flight failure.
|
|
13
|
+
### Changed (types)
|
|
14
|
+
- `CircuitBreakerState.windowOpenedAt?: number | null` is a new OPTIONAL field: the open-window identity, set once at the open transition and never moved by a re-arm. A custom `CircuitBreakerStore` should persist it as-is; a store that drops it leaves probes unpinned (the pre-#271 behaviour, never a jam). Processes sharing a custom store must run the same version, since an older build re-arming an entry drops the field.
|
|
15
|
+
|
|
8
16
|
## [0.37.0] - 2026-10-29
|
|
9
17
|
|
|
10
18
|
Minor: the plan hash moves `08cf890f...` (0.34.0, the last published release) -> `5cd6c667...` (a new `operations.revenueRollup` registry row, new `time_entries` posted-state options and error codes, the structured `zoneFacts.quirks` entries of #253 and their follow-ups, and the corrected `countOnly` mid-walk budget text of #255 in the usage of the four `time_entries` posted-state ops), so the next release is 0.37.0 and a consumer re-pins once. 0.36.0 was never published; its changes ship in 0.37.0.
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
var
|
|
128
|
+
var _chunkPFFW4DIKcjs = require('./chunk-PFFW4DIK.cjs');
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
|
|
@@ -141,7 +141,7 @@ var _chunk4GHBN2AWcjs = require('./chunk-4GHBN2AW.cjs');
|
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
|
|
144
|
-
var
|
|
144
|
+
var _chunkTBFXRNNEcjs = require('./chunk-TBFXRNNE.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 = _chunkTBFXRNNEcjs.resolveConfig.call(void 0, options);
|
|
296
|
+
this.http = new (0, _chunkTBFXRNNEcjs.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, _chunkPFFW4DIKcjs.AppointmentsResource)(this.http, this.config.pageSize);
|
|
299
|
+
this.authenticateResource = new (0, _chunkPFFW4DIKcjs.AuthenticateResource)(this.http);
|
|
300
|
+
this.billingCodes = new (0, _chunkTBFXRNNEcjs.BillingCodesResource)(this.http, this.config.pageSize);
|
|
301
|
+
this.billingItemApprovalLevels = new (0, _chunkPFFW4DIKcjs.BillingItemApprovalLevelsResource)(this.http, this.config.pageSize);
|
|
302
|
+
this.billingItems = new (0, _chunkTBFXRNNEcjs.BillingItemsResource)(this.http, this.config.pageSize);
|
|
303
|
+
this.changeRequestLinks = new (0, _chunkPFFW4DIKcjs.ChangeRequestLinksResource)(this.http, this.config.pageSize);
|
|
304
|
+
this.checklistLibraries = new (0, _chunkPFFW4DIKcjs.ChecklistLibrariesResource)(this.http, this.config.pageSize);
|
|
305
|
+
this.checklistLibraryChecklistItems = new (0, _chunkPFFW4DIKcjs.ChecklistLibraryChecklistItemsResource)(this.http, this.config.pageSize);
|
|
306
|
+
this.classificationIcons = new (0, _chunkPFFW4DIKcjs.ClassificationIconsResource)(this.http, this.config.pageSize);
|
|
307
|
+
this.companies = new (0, _chunkTBFXRNNEcjs.CompaniesResource)(this.http, this.config.pageSize);
|
|
308
|
+
this.companyAlerts = new (0, _chunkPFFW4DIKcjs.CompanyAlertsResource)(this.http, this.config.pageSize);
|
|
309
|
+
this.companyLocations = new (0, _chunkPFFW4DIKcjs.CompanyLocationsResource)(this.http, this.config.pageSize);
|
|
310
|
+
this.companyNotes = new (0, _chunkPFFW4DIKcjs.CompanyNotesResource)(this.http, this.config.pageSize);
|
|
311
|
+
this.companySiteConfigurations = new (0, _chunkPFFW4DIKcjs.CompanySiteConfigurationsResource)(this.http, this.config.pageSize);
|
|
312
|
+
this.companyWebhooks = new (0, _chunkPFFW4DIKcjs.CompanyWebhooksResource)(this.http, this.config.pageSize);
|
|
313
|
+
this.configurationItemBillingProductAssociations = new (0, _chunkPFFW4DIKcjs.ConfigurationItemBillingProductAssociationsResource)(this.http, this.config.pageSize);
|
|
314
|
+
this.configurationItemCategories = new (0, _chunkPFFW4DIKcjs.ConfigurationItemCategoriesResource)(this.http, this.config.pageSize);
|
|
315
|
+
this.configurationItemCategoryUdfAssociations = new (0, _chunkPFFW4DIKcjs.ConfigurationItemCategoryUdfAssociationsResource)(this.http, this.config.pageSize);
|
|
316
|
+
this.configurationItemDnsRecords = new (0, _chunkPFFW4DIKcjs.ConfigurationItemDnsRecordsResource)(this.http, this.config.pageSize);
|
|
317
|
+
this.configurationItemNotes = new (0, _chunkPFFW4DIKcjs.ConfigurationItemNotesResource)(this.http, this.config.pageSize);
|
|
318
|
+
this.configurationItemRelatedItems = new (0, _chunkPFFW4DIKcjs.ConfigurationItemRelatedItemsResource)(this.http, this.config.pageSize);
|
|
319
|
+
this.configurationItems = new (0, _chunkPFFW4DIKcjs.ConfigurationItemsResource)(this.http, this.config.pageSize);
|
|
320
|
+
this.configurationItemSslSubjectAlternativeNames = new (0, _chunkPFFW4DIKcjs.ConfigurationItemSslSubjectAlternativeNamesResource)(this.http, this.config.pageSize);
|
|
321
|
+
this.configurationItemTypes = new (0, _chunkPFFW4DIKcjs.ConfigurationItemTypesResource)(this.http, this.config.pageSize);
|
|
322
|
+
this.configurationItemWebhooks = new (0, _chunkPFFW4DIKcjs.ConfigurationItemWebhooksResource)(this.http, this.config.pageSize);
|
|
323
|
+
this.contactGroupContacts = new (0, _chunkPFFW4DIKcjs.ContactGroupContactsResource)(this.http, this.config.pageSize);
|
|
324
|
+
this.contactGroups = new (0, _chunkPFFW4DIKcjs.ContactGroupsResource)(this.http, this.config.pageSize);
|
|
325
|
+
this.contacts = new (0, _chunkPFFW4DIKcjs.ContactsResource)(this.http, this.config.pageSize);
|
|
326
|
+
this.contactWebhooks = new (0, _chunkPFFW4DIKcjs.ContactWebhooksResource)(this.http, this.config.pageSize);
|
|
327
|
+
this.contractBillingRules = new (0, _chunkPFFW4DIKcjs.ContractBillingRulesResource)(this.http, this.config.pageSize);
|
|
328
|
+
this.contractBlockHourFactors = new (0, _chunkPFFW4DIKcjs.ContractBlockHourFactorsResource)(this.http, this.config.pageSize);
|
|
329
|
+
this.contractBlocks = new (0, _chunkPFFW4DIKcjs.ContractBlocksResource)(this.http, this.config.pageSize);
|
|
330
|
+
this.contractCharges = new (0, _chunkPFFW4DIKcjs.ContractChargesResource)(this.http, this.config.pageSize);
|
|
331
|
+
this.contractExclusionBillingCodes = new (0, _chunkPFFW4DIKcjs.ContractExclusionBillingCodesResource)(this.http, this.config.pageSize);
|
|
332
|
+
this.contractExclusionRoles = new (0, _chunkPFFW4DIKcjs.ContractExclusionRolesResource)(this.http, this.config.pageSize);
|
|
333
|
+
this.contractExclusionSetExcludedRoles = new (0, _chunkPFFW4DIKcjs.ContractExclusionSetExcludedRolesResource)(this.http, this.config.pageSize);
|
|
334
|
+
this.contractExclusionSetExcludedWorkTypes = new (0, _chunkPFFW4DIKcjs.ContractExclusionSetExcludedWorkTypesResource)(this.http, this.config.pageSize);
|
|
335
|
+
this.contractExclusionSets = new (0, _chunkPFFW4DIKcjs.ContractExclusionSetsResource)(this.http, this.config.pageSize);
|
|
336
|
+
this.contractMilestones = new (0, _chunkPFFW4DIKcjs.ContractMilestonesResource)(this.http, this.config.pageSize);
|
|
337
|
+
this.contractNotes = new (0, _chunkPFFW4DIKcjs.ContractNotesResource)(this.http, this.config.pageSize);
|
|
338
|
+
this.contractRates = new (0, _chunkPFFW4DIKcjs.ContractRatesResource)(this.http, this.config.pageSize);
|
|
339
|
+
this.contractRetainers = new (0, _chunkPFFW4DIKcjs.ContractRetainersResource)(this.http, this.config.pageSize);
|
|
340
|
+
this.contractRoleCosts = new (0, _chunkPFFW4DIKcjs.ContractRoleCostsResource)(this.http, this.config.pageSize);
|
|
341
|
+
this.contractServiceAdjustments = new (0, _chunkPFFW4DIKcjs.ContractServiceAdjustmentsResource)(this.http, this.config.pageSize);
|
|
342
|
+
this.contractServiceBundleAdjustments = new (0, _chunkPFFW4DIKcjs.ContractServiceBundleAdjustmentsResource)(this.http, this.config.pageSize);
|
|
343
|
+
this.contractServiceBundles = new (0, _chunkPFFW4DIKcjs.ContractServiceBundlesResource)(this.http, this.config.pageSize);
|
|
344
|
+
this.contractServiceBundleUnits = new (0, _chunkPFFW4DIKcjs.ContractServiceBundleUnitsResource)(this.http, this.config.pageSize);
|
|
345
|
+
this.contractServices = new (0, _chunkPFFW4DIKcjs.ContractServicesResource)(this.http, this.config.pageSize);
|
|
346
|
+
this.contractServiceUnits = new (0, _chunkPFFW4DIKcjs.ContractServiceUnitsResource)(this.http, this.config.pageSize);
|
|
347
|
+
this.contracts = new (0, _chunkTBFXRNNEcjs.ContractsResource)(this.http, this.config.pageSize);
|
|
348
|
+
this.contractTicketPurchases = new (0, _chunkPFFW4DIKcjs.ContractTicketPurchasesResource)(this.http, this.config.pageSize);
|
|
349
|
+
this.countries = new (0, _chunkPFFW4DIKcjs.CountriesResource)(this.http, this.config.pageSize);
|
|
350
|
+
this.currencies = new (0, _chunkPFFW4DIKcjs.CurrenciesResource)(this.http, this.config.pageSize);
|
|
351
|
+
this.departments = new (0, _chunkPFFW4DIKcjs.DepartmentsResource)(this.http, this.config.pageSize);
|
|
352
|
+
this.domainRegistrars = new (0, _chunkPFFW4DIKcjs.DomainRegistrarsResource)(this.http, this.config.pageSize);
|
|
353
|
+
this.entityInformation = new (0, _chunkPFFW4DIKcjs.EntityInformationResource)(this.http);
|
|
354
|
+
this.expenseItemAttachments = new (0, _chunkPFFW4DIKcjs.ExpenseItemAttachmentsResource)(this.http, this.config.pageSize);
|
|
355
|
+
this.expenseItems = new (0, _chunkPFFW4DIKcjs.ExpenseItemsResource)(this.http, this.config.pageSize);
|
|
356
|
+
this.expenseReports = new (0, _chunkPFFW4DIKcjs.ExpenseReportsResource)(this.http, this.config.pageSize);
|
|
357
|
+
this.holidaySets = new (0, _chunkPFFW4DIKcjs.HolidaySetsResource)(this.http, this.config.pageSize);
|
|
358
|
+
this.holidays = new (0, _chunkPFFW4DIKcjs.HolidaysResource)(this.http, this.config.pageSize);
|
|
359
|
+
this.inventoryProducts = new (0, _chunkPFFW4DIKcjs.InventoryProductsResource)(this.http, this.config.pageSize);
|
|
360
|
+
this.invoices = new (0, _chunkTBFXRNNEcjs.InvoicesResource)(this.http, this.config.pageSize);
|
|
361
|
+
this.invoiceTemplates = new (0, _chunkPFFW4DIKcjs.InvoiceTemplatesResource)(this.http, this.config.pageSize);
|
|
362
|
+
this.modules = new (0, _chunkPFFW4DIKcjs.ModulesResource)(this.http);
|
|
363
|
+
this.notificationHistory = new (0, _chunkPFFW4DIKcjs.NotificationHistoryResource)(this.http, this.config.pageSize);
|
|
364
|
+
this.opportunities = new (0, _chunkPFFW4DIKcjs.OpportunitiesResource)(this.http, this.config.pageSize);
|
|
365
|
+
this.opportunityAttachments = new (0, _chunkPFFW4DIKcjs.OpportunityAttachmentsResource)(this.http, this.config.pageSize);
|
|
366
|
+
this.opportunityCategories = new (0, _chunkPFFW4DIKcjs.OpportunityCategoriesResource)(this.http, this.config.pageSize);
|
|
367
|
+
this.organizationalLevel1s = new (0, _chunkTBFXRNNEcjs.OrganizationalLevel1sResource)(this.http, this.config.pageSize);
|
|
368
|
+
this.organizationalLevel2s = new (0, _chunkTBFXRNNEcjs.OrganizationalLevel2sResource)(this.http, this.config.pageSize);
|
|
369
|
+
this.organizationalLevelAssociations = new (0, _chunkTBFXRNNEcjs.OrganizationalLevelAssociationsResource)(this.http, this.config.pageSize);
|
|
370
|
+
this.phases = new (0, _chunkPFFW4DIKcjs.PhasesResource)(this.http, this.config.pageSize);
|
|
371
|
+
this.products = new (0, _chunkPFFW4DIKcjs.ProductsResource)(this.http, this.config.pageSize);
|
|
372
|
+
this.productVendors = new (0, _chunkPFFW4DIKcjs.ProductVendorsResource)(this.http, this.config.pageSize);
|
|
373
|
+
this.projectCharges = new (0, _chunkPFFW4DIKcjs.ProjectChargesResource)(this.http, this.config.pageSize);
|
|
374
|
+
this.projectNotes = new (0, _chunkPFFW4DIKcjs.ProjectNotesResource)(this.http, this.config.pageSize);
|
|
375
|
+
this.projects = new (0, _chunkPFFW4DIKcjs.ProjectsResource)(this.http, this.config.pageSize);
|
|
376
|
+
this.purchaseApprovals = new (0, _chunkPFFW4DIKcjs.PurchaseApprovalsResource)(this.http, this.config.pageSize);
|
|
377
|
+
this.purchaseOrderItemReceiving = new (0, _chunkPFFW4DIKcjs.PurchaseOrderItemReceivingResource)(this.http, this.config.pageSize);
|
|
378
|
+
this.purchaseOrderItems = new (0, _chunkPFFW4DIKcjs.PurchaseOrderItemsResource)(this.http, this.config.pageSize);
|
|
379
|
+
this.purchaseOrders = new (0, _chunkPFFW4DIKcjs.PurchaseOrdersResource)(this.http, this.config.pageSize);
|
|
380
|
+
this.quoteItems = new (0, _chunkPFFW4DIKcjs.QuoteItemsResource)(this.http, this.config.pageSize);
|
|
381
|
+
this.quoteLocations = new (0, _chunkPFFW4DIKcjs.QuoteLocationsResource)(this.http, this.config.pageSize);
|
|
382
|
+
this.quotes = new (0, _chunkPFFW4DIKcjs.QuotesResource)(this.http, this.config.pageSize);
|
|
383
|
+
this.quoteTemplates = new (0, _chunkPFFW4DIKcjs.QuoteTemplatesResource)(this.http, this.config.pageSize);
|
|
384
|
+
this.resourceRoleQueues = new (0, _chunkPFFW4DIKcjs.ResourceRoleQueuesResource)(this.http, this.config.pageSize);
|
|
385
|
+
this.resourceRoles = new (0, _chunkPFFW4DIKcjs.ResourceRolesResource)(this.http, this.config.pageSize);
|
|
386
|
+
this.resourceSkills = new (0, _chunkPFFW4DIKcjs.ResourceSkillsResource)(this.http, this.config.pageSize);
|
|
387
|
+
this.resources = new (0, _chunkTBFXRNNEcjs.ResourcesResource)(this.http, this.config, this.config.pageSize);
|
|
388
|
+
this.resourceTimeOffAdditional = new (0, _chunkPFFW4DIKcjs.ResourceTimeOffAdditionalResource)(this.http, this.config.pageSize);
|
|
389
|
+
this.resourceTimeOffApprovers = new (0, _chunkPFFW4DIKcjs.ResourceTimeOffApproversResource)(this.http, this.config.pageSize);
|
|
390
|
+
this.resourceTimeOffBalances = new (0, _chunkPFFW4DIKcjs.ResourceTimeOffBalancesResource)(this.http, this.config.pageSize);
|
|
391
|
+
this.roles = new (0, _chunkPFFW4DIKcjs.RolesResource)(this.http, this.config.pageSize);
|
|
392
|
+
this.salesOrders = new (0, _chunkPFFW4DIKcjs.SalesOrdersResource)(this.http, this.config.pageSize);
|
|
393
|
+
this.serviceCalls = new (0, _chunkPFFW4DIKcjs.ServiceCallsResource)(this.http, this.config.pageSize);
|
|
394
|
+
this.serviceCallTaskResources = new (0, _chunkPFFW4DIKcjs.ServiceCallTaskResourcesResource)(this.http, this.config.pageSize);
|
|
395
|
+
this.serviceCallTasks = new (0, _chunkPFFW4DIKcjs.ServiceCallTasksResource)(this.http, this.config.pageSize);
|
|
396
|
+
this.serviceCallTicketResources = new (0, _chunkPFFW4DIKcjs.ServiceCallTicketResourcesResource)(this.http, this.config.pageSize);
|
|
397
|
+
this.serviceCallTickets = new (0, _chunkPFFW4DIKcjs.ServiceCallTicketsResource)(this.http, this.config.pageSize);
|
|
398
|
+
this.serviceLevelAgreementResults = new (0, _chunkPFFW4DIKcjs.ServiceLevelAgreementResultsResource)(this.http, this.config.pageSize);
|
|
399
|
+
this.services = new (0, _chunkPFFW4DIKcjs.ServicesResource)(this.http, this.config.pageSize);
|
|
400
|
+
this.skills = new (0, _chunkPFFW4DIKcjs.SkillsResource)(this.http, this.config.pageSize);
|
|
401
|
+
this.subscriptionPeriods = new (0, _chunkPFFW4DIKcjs.SubscriptionPeriodsResource)(this.http, this.config.pageSize);
|
|
402
|
+
this.subscriptions = new (0, _chunkPFFW4DIKcjs.SubscriptionsResource)(this.http, this.config.pageSize);
|
|
403
|
+
this.surveyResults = new (0, _chunkPFFW4DIKcjs.SurveyResultsResource)(this.http, this.config.pageSize);
|
|
404
|
+
this.surveys = new (0, _chunkPFFW4DIKcjs.SurveysResource)(this.http, this.config.pageSize);
|
|
405
|
+
this.tagAliases = new (0, _chunkPFFW4DIKcjs.TagAliasesResource)(this.http, this.config.pageSize);
|
|
406
|
+
this.tagGroups = new (0, _chunkPFFW4DIKcjs.TagGroupsResource)(this.http, this.config.pageSize);
|
|
407
|
+
this.tags = new (0, _chunkPFFW4DIKcjs.TagsResource)(this.http, this.config.pageSize);
|
|
408
|
+
this.taskSecondaryResources = new (0, _chunkPFFW4DIKcjs.TaskSecondaryResourcesResource)(this.http, this.config.pageSize);
|
|
409
|
+
this.tasks = new (0, _chunkPFFW4DIKcjs.TasksResource)(this.http, this.config.pageSize);
|
|
410
|
+
this.taxRegions = new (0, _chunkPFFW4DIKcjs.TaxRegionsResource)(this.http, this.config.pageSize);
|
|
411
|
+
this.thresholdInformation = new (0, _chunkPFFW4DIKcjs.ThresholdInformationResource)(this.http);
|
|
412
|
+
this.ticketAdditionalConfigurationItems = new (0, _chunkPFFW4DIKcjs.TicketAdditionalConfigurationItemsResource)(this.http, this.config.pageSize);
|
|
413
|
+
this.ticketAdditionalContacts = new (0, _chunkPFFW4DIKcjs.TicketAdditionalContactsResource)(this.http, this.config.pageSize);
|
|
414
|
+
this.ticketAttachments = new (0, _chunkPFFW4DIKcjs.TicketAttachmentsResource)(this.http, this.config.pageSize);
|
|
415
|
+
this.ticketCategories = new (0, _chunkPFFW4DIKcjs.TicketCategoriesResource)(this.http, this.config.pageSize);
|
|
416
|
+
this.ticketCategoryFieldDefaults = new (0, _chunkPFFW4DIKcjs.TicketCategoryFieldDefaultsResource)(this.http, this.config.pageSize);
|
|
417
|
+
this.ticketChangeRequestApprovals = new (0, _chunkPFFW4DIKcjs.TicketChangeRequestApprovalsResource)(this.http, this.config.pageSize);
|
|
418
|
+
this.ticketCharges = new (0, _chunkPFFW4DIKcjs.TicketChargesResource)(this.http, this.config.pageSize);
|
|
419
|
+
this.ticketChecklistItems = new (0, _chunkPFFW4DIKcjs.TicketChecklistItemsResource)(this.http, this.config.pageSize);
|
|
420
|
+
this.ticketChecklistLibraries = new (0, _chunkPFFW4DIKcjs.TicketChecklistLibrariesResource)(this.http, this.config.pageSize);
|
|
421
|
+
this.ticketHistory = new (0, _chunkPFFW4DIKcjs.TicketHistoryResource)(this.http, this.config.pageSize);
|
|
422
|
+
this.ticketNoteAttachments = new (0, _chunkPFFW4DIKcjs.TicketNoteAttachmentsResource)(this.http, this.config.pageSize);
|
|
423
|
+
this.ticketNotes = new (0, _chunkPFFW4DIKcjs.TicketNotesResource)(this.http, this.config.pageSize);
|
|
424
|
+
this.ticketNoteWebhooks = new (0, _chunkPFFW4DIKcjs.TicketNoteWebhooksResource)(this.http, this.config.pageSize);
|
|
425
|
+
this.ticketSecondaryResources = new (0, _chunkPFFW4DIKcjs.TicketSecondaryResourcesResource)(this.http, this.config.pageSize);
|
|
426
|
+
this.tickets = new (0, _chunkPFFW4DIKcjs.TicketsResource)(this.http, this.config.pageSize);
|
|
427
|
+
this.ticketWebhooks = new (0, _chunkPFFW4DIKcjs.TicketWebhooksResource)(this.http, this.config.pageSize);
|
|
428
|
+
this.timeEntries = new (0, _chunkTBFXRNNEcjs.TimeEntriesResource)(this.http, this.config.pageSize);
|
|
429
|
+
this.timeEntryAttachments = new (0, _chunkPFFW4DIKcjs.TimeEntryAttachmentsResource)(this.http, this.config.pageSize);
|
|
430
|
+
this.timeOffRequests = new (0, _chunkPFFW4DIKcjs.TimeOffRequestsResource)(this.http, this.config.pageSize);
|
|
431
|
+
this.versionInformation = new (0, _chunkPFFW4DIKcjs.VersionInformationResource)(this.http);
|
|
432
|
+
this.version = new (0, _chunkPFFW4DIKcjs.VersionResource)(this.http);
|
|
433
|
+
this.zoneInformation = new (0, _chunkPFFW4DIKcjs.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 _chunkTBFXRNNEcjs.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, _chunkTBFXRNNEcjs.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) : _chunkTBFXRNNEcjs.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 };
|
|
@@ -16598,18 +16598,21 @@ function evaluateBreakerGate(breaker, key, ctx) {
|
|
|
16598
16598
|
}
|
|
16599
16599
|
const admitted = { ...st, probes: st.probes + 1 };
|
|
16600
16600
|
breaker.store.set(key, admitted);
|
|
16601
|
-
return { probe: true };
|
|
16601
|
+
return { probe: true, probeWindow: admitted.windowOpenedAt ?? void 0 };
|
|
16602
16602
|
}
|
|
16603
16603
|
return { probe: false };
|
|
16604
16604
|
}
|
|
16605
|
-
function recordSuccess(breaker, key, probe, logger) {
|
|
16605
|
+
function recordSuccess(breaker, key, probe, probeWindow, logger) {
|
|
16606
16606
|
const st = breaker.store.get(key);
|
|
16607
16607
|
if (st === void 0 || st.openedAt === null) return;
|
|
16608
|
+
if (probe && probeWindow !== void 0 && st.windowOpenedAt !== probeWindow) return;
|
|
16608
16609
|
const next = {
|
|
16609
16610
|
failures: st.failures,
|
|
16610
16611
|
openedAt: st.openedAt,
|
|
16611
16612
|
successes: st.successes + 1,
|
|
16612
|
-
probes: probe ? Math.max(0, st.probes - 1) : st.probes
|
|
16613
|
+
probes: probe ? Math.max(0, st.probes - 1) : st.probes,
|
|
16614
|
+
windowOpenedAt: st.windowOpenedAt
|
|
16615
|
+
// a success never moves the window identity
|
|
16613
16616
|
};
|
|
16614
16617
|
if (next.successes >= breaker.successesToClose) {
|
|
16615
16618
|
breaker.store.delete(key);
|
|
@@ -16621,13 +16624,14 @@ function recordSuccess(breaker, key, probe, logger) {
|
|
|
16621
16624
|
}
|
|
16622
16625
|
breaker.store.set(key, next);
|
|
16623
16626
|
}
|
|
16624
|
-
function recordFailure(breaker, key, probe, logger, correlationId) {
|
|
16627
|
+
function recordFailure(breaker, key, probe, probeWindow, logger, correlationId) {
|
|
16625
16628
|
const now = Date.now();
|
|
16626
|
-
const st = breaker.store.get(key) ?? { failures: [], openedAt: null, successes: 0, probes: 0 };
|
|
16629
|
+
const st = breaker.store.get(key) ?? { failures: [], openedAt: null, successes: 0, probes: 0, windowOpenedAt: null };
|
|
16630
|
+
if (probe && probeWindow !== void 0 && st.openedAt !== null && st.windowOpenedAt !== probeWindow) return;
|
|
16627
16631
|
if (st.openedAt === null) {
|
|
16628
16632
|
const failures = [...st.failures.filter((t) => t > now - breaker.failureWindowMs), now];
|
|
16629
16633
|
if (failures.length >= breaker.failureThreshold) {
|
|
16630
|
-
breaker.store.set(key, { failures, openedAt: now, successes: 0, probes: 0 });
|
|
16634
|
+
breaker.store.set(key, { failures, openedAt: now, successes: 0, probes: 0, windowOpenedAt: now });
|
|
16631
16635
|
logger.warn?.(
|
|
16632
16636
|
`[autotask] circuit breaker OPEN for ${key} (${failures.length} counted failures in ${Math.round(breaker.failureWindowMs / 1e3)}s) \u2014 refusing locally for ${Math.round(breaker.openTimeoutMs / 1e3)}s`,
|
|
16633
16637
|
correlationId
|
|
@@ -16641,9 +16645,16 @@ function recordFailure(breaker, key, probe, logger, correlationId) {
|
|
|
16641
16645
|
failures: st.failures,
|
|
16642
16646
|
openedAt: now,
|
|
16643
16647
|
successes: 0,
|
|
16644
|
-
probes: probe ? Math.max(0, st.probes - 1) : st.probes
|
|
16648
|
+
probes: probe ? Math.max(0, st.probes - 1) : st.probes,
|
|
16649
|
+
windowOpenedAt: st.windowOpenedAt
|
|
16645
16650
|
});
|
|
16646
16651
|
}
|
|
16652
|
+
function settleProbe(breaker, key, probeWindow) {
|
|
16653
|
+
const st = breaker.store.get(key);
|
|
16654
|
+
if (st === void 0 || st.openedAt === null || st.probes === 0) return;
|
|
16655
|
+
if (probeWindow !== void 0 && st.windowOpenedAt !== probeWindow) return;
|
|
16656
|
+
breaker.store.set(key, { ...st, probes: st.probes - 1 });
|
|
16657
|
+
}
|
|
16647
16658
|
var HourlyBudget = class {
|
|
16648
16659
|
constructor(perHour, profile) {
|
|
16649
16660
|
this.perHour = perHour;
|
|
@@ -16990,18 +17001,38 @@ var HttpClient = class {
|
|
|
16990
17001
|
* budget on the original host dangles for the rest of the open period;
|
|
16991
17002
|
* bounded, conservative, nothing crosses hosts).
|
|
16992
17003
|
*/
|
|
16993
|
-
recordBreakerSuccess(
|
|
17004
|
+
recordBreakerSuccess(s) {
|
|
17005
|
+
const { breakerProbe: probe, breakerProbeKey: probeKey, breakerProbeWindow: probeWindow } = s;
|
|
16994
17006
|
const breaker = this.breaker;
|
|
16995
17007
|
if (breaker === void 0) return;
|
|
16996
17008
|
if (probe && (probeKey === void 0 || probeKey !== this.breakerKey)) return;
|
|
16997
|
-
recordSuccess(breaker, probe && probeKey !== void 0 ? probeKey : this.breakerKey, probe, this.logger);
|
|
17009
|
+
recordSuccess(breaker, probe && probeKey !== void 0 ? probeKey : this.breakerKey, probe, probeWindow, this.logger);
|
|
16998
17010
|
}
|
|
16999
17011
|
/** Breaker failure recording (issue #26); same host-pinning as the success recorder (issue #43). */
|
|
17000
|
-
recordBreakerFailure(
|
|
17012
|
+
recordBreakerFailure(s) {
|
|
17013
|
+
const { breakerProbe: probe, breakerProbeKey: probeKey, breakerProbeWindow: probeWindow, correlationId } = s;
|
|
17001
17014
|
const breaker = this.breaker;
|
|
17002
17015
|
if (breaker === void 0) return;
|
|
17003
17016
|
if (probe && (probeKey === void 0 || probeKey !== this.breakerKey)) return;
|
|
17004
|
-
recordFailure(breaker, probe && probeKey !== void 0 ? probeKey : this.breakerKey, probe, this.logger, correlationId);
|
|
17017
|
+
recordFailure(breaker, probe && probeKey !== void 0 ? probeKey : this.breakerKey, probe, probeWindow, this.logger, correlationId);
|
|
17018
|
+
}
|
|
17019
|
+
/**
|
|
17020
|
+
* Breaker probe settlement for a NON-COUNTED outcome (issue #262): the
|
|
17021
|
+
* failure predicate said the outcome is not a service failure (any 4xx,
|
|
17022
|
+
* ABORTED, EMPTY_RESPONSE, INVALID_RESPONSE, REDIRECT_BLOCKED, the
|
|
17023
|
+
* deterministic validation 500), so nothing is counted and the open
|
|
17024
|
+
* period is NOT re-armed — but the probe SETTLED, so its admitted
|
|
17025
|
+
* half-open slot is released (the contract in `circuit-breaker.ts`: every
|
|
17026
|
+
* probe completion decrements `probes`). Same host-pinning as the
|
|
17027
|
+
* recorders (issue #43): a re-pointed probe is voided, never settled
|
|
17028
|
+
* cross-host.
|
|
17029
|
+
*/
|
|
17030
|
+
settleBreakerProbe(s) {
|
|
17031
|
+
const { breakerProbe: probe, breakerProbeKey: probeKey, breakerProbeWindow: probeWindow } = s;
|
|
17032
|
+
const breaker = this.breaker;
|
|
17033
|
+
if (breaker === void 0 || !probe) return;
|
|
17034
|
+
if (probeKey === void 0 || probeKey !== this.breakerKey) return;
|
|
17035
|
+
settleProbe(breaker, probeKey, probeWindow);
|
|
17005
17036
|
}
|
|
17006
17037
|
// ---- per-call helpers ---------------------------------------------------
|
|
17007
17038
|
/** The caller's signal wins over the deadline when both fired. */
|
|
@@ -17125,6 +17156,7 @@ var HttpClient = class {
|
|
|
17125
17156
|
if (verdict.probe) {
|
|
17126
17157
|
s.breakerProbe = true;
|
|
17127
17158
|
s.breakerProbeKey = this.breakerKey;
|
|
17159
|
+
s.breakerProbeWindow = verdict.probeWindow;
|
|
17128
17160
|
}
|
|
17129
17161
|
}
|
|
17130
17162
|
// ---- the attempt --------------------------------------------------------
|
|
@@ -17362,7 +17394,7 @@ var HttpClient = class {
|
|
|
17362
17394
|
});
|
|
17363
17395
|
if (this.breaker !== void 0) {
|
|
17364
17396
|
try {
|
|
17365
|
-
this.recordBreakerSuccess(s
|
|
17397
|
+
this.recordBreakerSuccess(s);
|
|
17366
17398
|
} catch {
|
|
17367
17399
|
}
|
|
17368
17400
|
}
|
|
@@ -17371,7 +17403,11 @@ var HttpClient = class {
|
|
|
17371
17403
|
const { opts } = s;
|
|
17372
17404
|
if (this.breaker !== void 0 && err instanceof AutotaskError && err.notSent !== true) {
|
|
17373
17405
|
try {
|
|
17374
|
-
if (this.breaker.isFailure(err))
|
|
17406
|
+
if (this.breaker.isFailure(err)) {
|
|
17407
|
+
this.recordBreakerFailure(s);
|
|
17408
|
+
} else if (s.breakerProbe) {
|
|
17409
|
+
this.settleBreakerProbe(s);
|
|
17410
|
+
}
|
|
17375
17411
|
} catch {
|
|
17376
17412
|
}
|
|
17377
17413
|
}
|
|
@@ -17472,6 +17508,7 @@ var HttpClient = class {
|
|
|
17472
17508
|
attempt: 0,
|
|
17473
17509
|
breakerProbe: false,
|
|
17474
17510
|
breakerProbeKey: void 0,
|
|
17511
|
+
breakerProbeWindow: void 0,
|
|
17475
17512
|
// Armed LAST in the literal: nothing after this can throw, and the single
|
|
17476
17513
|
// try/finally below clears it on every exit path (#190).
|
|
17477
17514
|
deadlineTimer: setTimeout(() => deadline.abort(), timeoutMs)
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
VersionInformationResource,
|
|
126
126
|
VersionResource,
|
|
127
127
|
ZoneInformationResource
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-PFJAMFUL.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-7IADHNBZ.js";
|
|
145
145
|
|
|
146
146
|
// src/client.ts
|
|
147
147
|
var AutotaskClient = class {
|