node-autotask 0.8.3 → 0.10.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/ARCHITECTURE.md +13 -10
- package/MCP_TOOL_CATALOG.json +733 -251
- package/MCP_TOOL_MANIFEST.md +162 -133
- package/MCP_TOOL_OVERRIDES.json +2 -2
- package/N8N_MCP_MANIFEST.json +88 -25
- package/N8N_MCP_MANIFEST.md +26 -24
- package/README.md +12 -4
- package/capabilities.json +12503 -9316
- package/dist/capabilities.cjs +2 -3
- package/dist/capabilities.js +1 -2
- package/dist/{chunk-4WJCXIY2.js → chunk-3VB6N44U.js} +1141 -2977
- package/dist/{chunk-32AKZMY4.js → chunk-6KFP5HV3.js} +12502 -9316
- package/dist/chunk-DMMMWO6A.js +0 -0
- package/dist/chunk-FLB2X6O5.cjs +1 -0
- package/dist/{chunk-GYI4ZQID.js → chunk-HWC2WPX2.js} +4781 -89
- package/dist/chunk-IDPB4N2Q.cjs +1 -0
- package/dist/{chunk-F6YSQRZV.js → chunk-NVJ2PTN3.js} +7 -7
- package/dist/{chunk-5UGSQLLO.cjs → chunk-QUM74WLQ.cjs} +136 -136
- package/dist/{chunk-LAKEIYET.cjs → chunk-S7VMY5KN.cjs} +1468 -3304
- package/dist/chunk-UPQIUWOS.js +0 -0
- package/dist/{chunk-KNTUX3RR.cjs → chunk-WTVD2JZN.cjs} +12502 -9316
- package/dist/{chunk-V3XPLTIR.cjs → chunk-WTVLHMZA.cjs} +4784 -92
- package/dist/{index-B6JeThrY.d.ts → index-BOyh7S65.d.cts} +870 -79
- package/dist/{index-B0I2bGtx.d.cts → index-DGgMD8aq.d.ts} +870 -79
- package/dist/{index-DOCRp_83.d.cts → index-cQ6CRexR.d.cts} +158 -90
- package/dist/{index-DOCRp_83.d.ts → index-cQ6CRexR.d.ts} +158 -90
- package/dist/index.cjs +37 -22
- package/dist/index.d.cts +46 -5
- package/dist/index.d.ts +46 -5
- package/dist/index.js +48 -33
- package/dist/operations/index.cjs +480 -359
- package/dist/operations/index.d.cts +195 -16
- package/dist/operations/index.d.ts +195 -16
- package/dist/operations/index.js +370 -249
- package/dist/pool.cjs +36 -12
- package/dist/pool.d.cts +2 -3
- package/dist/pool.d.ts +2 -3
- package/dist/pool.js +33 -9
- package/dist/resources/index.cjs +5 -6
- package/dist/resources/index.d.cts +2 -2
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +4 -5
- package/dist/types/index.cjs +1 -2
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -2
- package/dist/untrusted.cjs +0 -1
- package/dist/untrusted.js +0 -1
- package/docs/API.md +693 -48
- package/docs/N8N-ADAPTER.md +4 -4
- package/examples/basic.ts +1 -1
- package/package.json +5 -3
- package/dist/capabilities.cjs.map +0 -1
- package/dist/capabilities.js.map +0 -1
- package/dist/chunk-32AKZMY4.js.map +0 -1
- package/dist/chunk-4WJCXIY2.js.map +0 -1
- package/dist/chunk-5UGSQLLO.cjs.map +0 -1
- package/dist/chunk-CXM35TEC.cjs +0 -1
- package/dist/chunk-CXM35TEC.cjs.map +0 -1
- package/dist/chunk-F6YSQRZV.js.map +0 -1
- package/dist/chunk-GIVD2CQ3.js +0 -1
- package/dist/chunk-GIVD2CQ3.js.map +0 -1
- package/dist/chunk-GYI4ZQID.js.map +0 -1
- package/dist/chunk-KNTUX3RR.cjs.map +0 -1
- package/dist/chunk-LAKEIYET.cjs.map +0 -1
- package/dist/chunk-MHBMSBTA.js +0 -1
- package/dist/chunk-MHBMSBTA.js.map +0 -1
- package/dist/chunk-NZUFSSIZ.cjs +0 -1
- package/dist/chunk-NZUFSSIZ.cjs.map +0 -1
- package/dist/chunk-V3XPLTIR.cjs.map +0 -1
- package/dist/client-DHmr0Oyx.d.ts +0 -203
- package/dist/client-Q6NoqinP.d.cts +0 -203
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/operations/index.cjs.map +0 -1
- package/dist/operations/index.js.map +0 -1
- package/dist/pool.cjs.map +0 -1
- package/dist/pool.js.map +0 -1
- package/dist/resources/index.cjs.map +0 -1
- package/dist/resources/index.js.map +0 -1
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/untrusted.cjs.map +0 -1
- package/dist/untrusted.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as AuditEvent, ez as ResolutionCaps, eh as QueryParams, I as Identifier, dC as PagingModel, dm as OperationResult, dB as Page, cD as EmptyReasonInfo, cF as EntityInformationModel, cV as FieldInformationModel, cT as Field, a as FilterCondition, cC as DryRunResult, ey as Resolution, d as Appointment, e as AppointmentCreate, g as AppointmentUpdate, f as AppointmentSummary, A as AuthTokenResultModel, B as BillingCode, j as BillingCodeCreate, l as BillingCodeUpdate, k as BillingCodeSummary, m as BillingItems, n as BillingItemsCreate, p as BillingItemsUpdate, o as BillingItemsSummary, C as ChangeRequestLink, q as ChangeRequestLinkCreate, s as ChangeRequestLinkUpdate, r as ChangeRequestLinkSummary, t as ChecklistLibrary, y as ChecklistLibraryCreate, D as ChecklistLibraryUpdate, z as ChecklistLibrarySummary, u as ChecklistLibraryChecklistItem, v as ChecklistLibraryChecklistItemCreate, x as ChecklistLibraryChecklistItemUpdate, w as ChecklistLibraryChecklistItemSummary, E as ClassificationIcon, G as ClassificationIconCreate, J as ClassificationIconUpdate, H as ClassificationIconSummary, K as Company, R as CompanyLocation, aM as Contact, V as CompanyNote, g9 as Ticket, dQ as Project, Q as CompanyCreate, a2 as CompanyUpdate, a1 as CompanySummary, P as CompanyContext, L as CompanyAlert, M as CompanyAlertCreate, O as CompanyAlertUpdate, N as CompanyAlertSummary, S as CompanyLocationCreate, U as CompanyLocationUpdate, T as CompanyLocationSummary, W as CompanyNoteCreate, Y as CompanyNoteUpdate, X as CompanyNoteSummary, Z as CompanySiteConfigurations, _ as CompanySiteConfigurationsCreate, a0 as CompanySiteConfigurationsUpdate, $ as CompanySiteConfigurationsSummary, a3 as CompanyWebhook, a4 as CompanyWebhookCreate, a6 as CompanyWebhookUpdate, a5 as CompanyWebhookSummary, a8 as ConfigurationItemBillingProductAssociations, a9 as ConfigurationItemBillingProductAssociationsCreate, ab as ConfigurationItemBillingProductAssociationsUpdate, aa as ConfigurationItemBillingProductAssociationsSummary, ac as ConfigurationItemCategory, ad as ConfigurationItemCategoryCreate, aj as ConfigurationItemCategoryUpdate, ae as ConfigurationItemCategorySummary, af as ConfigurationItemCategoryUdfAssociation, ag as ConfigurationItemCategoryUdfAssociationCreate, ai as ConfigurationItemCategoryUdfAssociationUpdate, ah as ConfigurationItemCategoryUdfAssociationSummary, am as ConfigurationItemDnsRecord, an as ConfigurationItemDnsRecordCreate, ap as ConfigurationItemDnsRecordUpdate, ao as ConfigurationItemDnsRecordSummary, aq as ConfigurationItemNote, ar as ConfigurationItemNoteCreate, at as ConfigurationItemNoteUpdate, as as ConfigurationItemNoteSummary, au as ConfigurationItemRelatedItem, av as ConfigurationItemRelatedItemCreate, ax as ConfigurationItemRelatedItemUpdate, aw as ConfigurationItemRelatedItemSummary, a7 as ConfigurationItem, aD as ConfigurationItemType, al as ConfigurationItemCreate, aH as ConfigurationItemUpdate, aC as ConfigurationItemSummary, ak as ConfigurationItemContext, ay as ConfigurationItemSslSubjectAlternativeName, az as ConfigurationItemSslSubjectAlternativeNameCreate, aB as ConfigurationItemSslSubjectAlternativeNameUpdate, aA as ConfigurationItemSslSubjectAlternativeNameSummary, aE as ConfigurationItemTypeCreate, aG as ConfigurationItemTypeUpdate, aF as ConfigurationItemTypeSummary, aI as ConfigurationItemWebhook, aJ as ConfigurationItemWebhookCreate, aL as ConfigurationItemWebhookUpdate, aK as ConfigurationItemWebhookSummary, aP as ContactGroupContacts, aQ as ContactGroupContactsCreate, aS as ContactGroupContactsUpdate, aR as ContactGroupContactsSummary, aT as ContactGroups, aU as ContactGroupsCreate, aW as ContactGroupsUpdate, aV as ContactGroupsSummary, aX as ContactSummary, aO as ContactCreate, aY as ContactUpdate, aN as ContactContext, aZ as ContactWebhook, a_ as ContactWebhookCreate, b0 as ContactWebhookUpdate, a$ as ContactWebhookSummary, b2 as ContractBillingRule, b3 as ContractBillingRuleCreate, b5 as ContractBillingRuleUpdate, b4 as ContractBillingRuleSummary, b8 as ContractBlockHourFactor, b9 as ContractBlockHourFactorCreate, bb as ContractBlockHourFactorUpdate, ba as ContractBlockHourFactorSummary, b6 as ContractBlock, b7 as ContractBlockCreate, bd as ContractBlockUpdate, bc as ContractBlockSummary, be as ContractCharge, bf as ContractChargeCreate, bh as ContractChargeUpdate, bg as ContractChargeSummary, bj as ContractExclusionBillingCode, bk as ContractExclusionBillingCodeCreate, bm as ContractExclusionBillingCodeUpdate, bl as ContractExclusionBillingCodeSummary, bn as ContractExclusionRoles, bo as ContractExclusionRolesCreate, bq as ContractExclusionRolesUpdate, bp as ContractExclusionRolesSummary, br as ContractExclusionSetExcludedRoles, bs as ContractExclusionSetExcludedRolesCreate, bu as ContractExclusionSetExcludedRolesUpdate, bt as ContractExclusionSetExcludedRolesSummary, bv as ContractExclusionSetExcludedWorkTypes, bw as ContractExclusionSetExcludedWorkTypesCreate, by as ContractExclusionSetExcludedWorkTypesUpdate, bx as ContractExclusionSetExcludedWorkTypesSummary, bz as ContractExclusionSets, bA as ContractExclusionSetsCreate, bC as ContractExclusionSetsUpdate, bB as ContractExclusionSetsSummary, bD as ContractMilestone, bE as ContractMilestoneCreate, bG as ContractMilestoneUpdate, bF as ContractMilestoneSummary, bH as ContractNote, bI as ContractNoteCreate, bK as ContractNoteUpdate, bJ as ContractNoteSummary, bL as ContractRate, bM as ContractRateCreate, bO as ContractRateUpdate, bN as ContractRateSummary, bP as ContractRetainers, bQ as ContractRetainersCreate, bS as ContractRetainersUpdate, bR as ContractRetainersSummary, bT as ContractRoleCosts, bU as ContractRoleCostsCreate, bW as ContractRoleCostsUpdate, bV as ContractRoleCostsSummary, bY as ContractServiceAdjustment, bZ as ContractServiceAdjustmentCreate, b$ as ContractServiceAdjustmentUpdate, b_ as ContractServiceAdjustmentSummary, c1 as ContractServiceBundleAdjustment, c2 as ContractServiceBundleAdjustmentCreate, c4 as ContractServiceBundleAdjustmentUpdate, c3 as ContractServiceBundleAdjustmentSummary, c0 as ContractServiceBundle, c5 as ContractServiceBundleCreate, cb as ContractServiceBundleUpdate, c6 as ContractServiceBundleSummary, c7 as ContractServiceBundleUnit, c8 as ContractServiceBundleUnitCreate, ca as ContractServiceBundleUnitUpdate, c9 as ContractServiceBundleUnitSummary, bX as ContractService, cc as ContractServiceCreate, ci as ContractServiceUpdate, cd as ContractServiceSummary, ce as ContractServiceUnit, cf as ContractServiceUnitCreate, ch as ContractServiceUnitUpdate, cg as ContractServiceUnitSummary, b1 as Contract, bi as ContractCreate, co as ContractUpdate, cj as ContractSummary, ck as ContractTicketPurchases, cl as ContractTicketPurchasesCreate, cn as ContractTicketPurchasesUpdate, cm as ContractTicketPurchasesSummary, cp as Country, cq as CountryCreate, cs as CountryUpdate, cr as CountrySummary, ct as Department, cu as DepartmentCreate, cw as DepartmentUpdate, cv as DepartmentSummary, cy as DomainRegistrar, cz as DomainRegistrarCreate, cB as DomainRegistrarUpdate, cA as DomainRegistrarSummary, cX as GlobalEntityInformationResultModel, cI as ExpenseItemAttachment, cJ as ExpenseItemAttachmentCreate, cL as ExpenseItemAttachmentUpdate, cK as ExpenseItemAttachmentSummary, cH as ExpenseItem, cM as ExpenseItemCreate, cO as ExpenseItemUpdate, cN as ExpenseItemSummary, cP as ExpenseReport, cQ as ExpenseReportCreate, cS as ExpenseReportUpdate, cR as ExpenseReportSummary, c_ as HolidaySet, c$ as HolidaySetCreate, d1 as HolidaySetUpdate, d0 as HolidaySetSummary, cY as Holiday, cZ as HolidayCreate, d3 as HolidayUpdate, d2 as HolidaySummary, d4 as InventoryProduct, d5 as InventoryProductCreate, d7 as InventoryProductUpdate, d6 as InventoryProductSummary, d8 as InventoryStockedItemAdd, d9 as InventoryStockedItemRemove, da as InventoryStockedItemTransfer, db as Invoice, dc as InvoiceCreate, de as InvoiceUpdate, dd as InvoiceSummary, dg as ModuleAccessResultModel, dh as NotificationHistory, di as NotificationHistoryCreate, dk as NotificationHistoryUpdate, dj as NotificationHistorySummary, dp as Opportunity, dy as OpportunityCreate, dA as OpportunityUpdate, dz as OpportunitySummary, dq as OpportunityAttachment, dr as OpportunityAttachmentCreate, dt as OpportunityAttachmentUpdate, ds as OpportunityAttachmentSummary, du as OpportunityCategory, dv as OpportunityCategoryCreate, dx as OpportunityCategoryUpdate, dw as OpportunityCategorySummary, dD as Phase, dE as PhaseCreate, dG as PhaseUpdate, dF as PhaseSummary, dI as Product, dJ as ProductCreate, dL as ProductUpdate, dK as ProductSummary, dM as ProductVendors, dN as ProductVendorsCreate, dP as ProductVendorsUpdate, dO as ProductVendorsSummary, dR as ProjectCharge, dS as ProjectChargeCreate, dU as ProjectChargeUpdate, dT as ProjectChargeSummary, dX as ProjectNote, dY as ProjectNoteCreate, d_ as ProjectNoteUpdate, dZ as ProjectNoteSummary, dW as ProjectCreate, e0 as ProjectUpdate, d$ as ProjectSummary, dV as ProjectContext, e1 as PurchaseApprovals, e2 as PurchaseApprovalsCreate, e4 as PurchaseApprovalsUpdate, e3 as PurchaseApprovalsSummary, e5 as PurchaseOrderItemReceiving, e6 as PurchaseOrderItemReceivingCreate, e8 as PurchaseOrderItemReceivingUpdate, e7 as PurchaseOrderItemReceivingSummary, e9 as PurchaseOrderItems, ea as PurchaseOrderItemsCreate, ec as PurchaseOrderItemsUpdate, eb as PurchaseOrderItemsSummary, ed as PurchaseOrders, ee as PurchaseOrdersCreate, eg as PurchaseOrdersUpdate, ef as PurchaseOrdersSummary, ek as QuoteItem, el as QuoteItemCreate, en as QuoteItemUpdate, em as QuoteItemSummary, eo as QuoteLocation, ep as QuoteLocationCreate, er as QuoteLocationUpdate, eq as QuoteLocationSummary, ei as Quote, ej as QuoteCreate, ex as QuoteUpdate, es as QuoteSummary, et as QuoteTemplate, eu as QuoteTemplateCreate, ew as QuoteTemplateUpdate, ev as QuoteTemplateSummary, eE as ResourceRoleQueue, eF as ResourceRoleQueueCreate, eH as ResourceRoleQueueUpdate, eG as ResourceRoleQueueSummary, eC as ResourceRole, eD as ResourceRoleCreate, eJ as ResourceRoleUpdate, eI as ResourceRoleSummary, eK as ResourceSkill, eL as ResourceSkillCreate, eN as ResourceSkillUpdate, eM as ResourceSkillSummary, eA as Resource, eB as ResourceCreate, e$ as ResourceUpdate, eO as ResourceSummary, eP as ResourceTimeOffAdditional, eQ as ResourceTimeOffAdditionalCreate, eS as ResourceTimeOffAdditionalUpdate, eR as ResourceTimeOffAdditionalSummary, eT as ResourceTimeOffApprover, eU as ResourceTimeOffApproverCreate, eW as ResourceTimeOffApproverUpdate, eV as ResourceTimeOffApproverSummary, eX as ResourceTimeOffBalance, eY as ResourceTimeOffBalanceCreate, e_ as ResourceTimeOffBalanceUpdate, eZ as ResourceTimeOffBalanceSummary, f0 as Role, f1 as RoleCreate, f3 as RoleUpdate, f2 as RoleSummary, f5 as ServiceCall, f6 as ServiceCallCreate, fo as ServiceCallUpdate, f7 as ServiceCallSummary, fa as ServiceCallTaskResource, fb as ServiceCallTaskResourceCreate, fd as ServiceCallTaskResourceUpdate, fc as ServiceCallTaskResourceSummary, f8 as ServiceCallTask, f9 as ServiceCallTaskCreate, ff as ServiceCallTaskUpdate, fe as ServiceCallTaskSummary, fi as ServiceCallTicketResource, fj as ServiceCallTicketResourceCreate, fl as ServiceCallTicketResourceUpdate, fk as ServiceCallTicketResourceSummary, fg as ServiceCallTicket, fh as ServiceCallTicketCreate, fn as ServiceCallTicketUpdate, fm as ServiceCallTicketSummary, fq as ServiceLevelAgreementResults, fr as ServiceLevelAgreementResultsCreate, ft as ServiceLevelAgreementResultsUpdate, fs as ServiceLevelAgreementResultsSummary, f4 as Service, fp as ServiceCreate, fv as ServiceUpdate, fu as ServiceSummary, fw as Skill, fx as SkillCreate, fz as SkillUpdate, fy as SkillSummary, fC as SubscriptionPeriod, fD as SubscriptionPeriodCreate, fF as SubscriptionPeriodUpdate, fE as SubscriptionPeriodSummary, fA as Subscription, fB as SubscriptionCreate, fH as SubscriptionUpdate, fG as SubscriptionSummary, fK as SurveyResults, fL as SurveyResultsCreate, fN as SurveyResultsUpdate, fM as SurveyResultsSummary, fI as Survey, fJ as SurveyCreate, fP as SurveyUpdate, fO as SurveySummary, fR as TagAlias, fS as TagAliasCreate, fU as TagAliasUpdate, fT as TagAliasSummary, fW as TagGroup, fX as TagGroupCreate, fZ as TagGroupUpdate, fY as TagGroupSummary, fQ as Tag, fV as TagCreate, f$ as TagUpdate, f_ as TagSummary, g2 as TaskSecondaryResource, g3 as TaskSecondaryResourceCreate, g5 as TaskSecondaryResourceUpdate, g4 as TaskSecondaryResourceSummary, g0 as Task, g1 as TaskCreate, g7 as TaskUpdate, g6 as TaskSummary, g8 as ThresholdStatusResultModel, ga as TicketAdditionalConfigurationItem, gb as TicketAdditionalConfigurationItemCreate, gd as TicketAdditionalConfigurationItemUpdate, gc as TicketAdditionalConfigurationItemSummary, ge as TicketAdditionalContact, gf as TicketAdditionalContactCreate, gh as TicketAdditionalContactUpdate, gg as TicketAdditionalContactSummary, gi as TicketAttachment, gj as TicketAttachmentCreate, gl as TicketAttachmentUpdate, gk as TicketAttachmentSummary, gm as TicketCategory, gn as TicketCategoryCreate, gt as TicketCategoryUpdate, gs as TicketCategorySummary, go as TicketCategoryFieldDefault, gp as TicketCategoryFieldDefaultCreate, gr as TicketCategoryFieldDefaultUpdate, gq as TicketCategoryFieldDefaultSummary, gu as TicketChangeRequestApproval, gv as TicketChangeRequestApprovalCreate, gx as TicketChangeRequestApprovalUpdate, gw as TicketChangeRequestApprovalSummary, gy as TicketCharge, gz as TicketChargeCreate, gB as TicketChargeUpdate, gA as TicketChargeSummary, gC as TicketChecklistItem, gD as TicketChecklistItemCreate, gF as TicketChecklistItemUpdate, gE as TicketChecklistItemSummary, gG as TicketChecklistLibrary, gH as TicketChecklistLibraryCreate, gJ as TicketChecklistLibraryUpdate, gI as TicketChecklistLibrarySummary, gM as TicketHistory, gN as TicketHistoryCreate, gP as TicketHistoryUpdate, gO as TicketHistorySummary, gR as TicketNoteAttachment, gS as TicketNoteAttachmentCreate, gU as TicketNoteAttachmentUpdate, gT as TicketNoteAttachmentSummary, gQ as TicketNote, gV as TicketNoteCreate, gX as TicketNoteUpdate, gW as TicketNoteSummary, gY as TicketNoteWebhook, gZ as TicketNoteWebhookCreate, g$ as TicketNoteWebhookUpdate, g_ as TicketNoteWebhookSummary, h0 as TicketSecondaryResource, h1 as TicketSecondaryResourceCreate, h3 as TicketSecondaryResourceUpdate, h2 as TicketSecondaryResourceSummary, gL as TicketCreate, h5 as TicketUpdate, h4 as TicketSummary, gK as TicketContext, h6 as TicketWebhook, h7 as TicketWebhookCreate, h9 as TicketWebhookUpdate, h8 as TicketWebhookSummary, ha as TimeEntry, hf as TimeEntryCreate, hh as TimeEntryUpdate, hg as TimeEntrySummary, hb as TimeEntryAttachment, hc as TimeEntryAttachmentCreate, he as TimeEntryAttachmentUpdate, hd as TimeEntryAttachmentSummary, hi as TimeOffRequest, hj as TimeOffRequestCreate, hm as TimeOffRequestUpdate, hl as TimeOffRequestSummary, c as ApiVersionResultModel, i as AutotaskVersionResultModel, ho as ZoneInformationResultModel } from './index-DOCRp_83.js';
|
|
1
|
+
import { I as Identifier, g as AuditEvent, ez as ResolutionCaps, Q as QueryParams, dD as PagingModel, dn as OperationResult, dC as Page, cE as EmptyReasonInfo, cG as EntityInformationModel, cW as FieldInformationModel, cU as Field, a as FilterCondition, cD as DryRunResult, ey as Resolution, c as Appointment, d as AppointmentCreate, f as AppointmentUpdate, e as AppointmentSummary, h as AuthTokenResultModel, B as BillingCode, j as BillingCodeCreate, l as BillingCodeUpdate, k as BillingCodeSummary, m as BillingItems, n as BillingItemsCreate, p as BillingItemsUpdate, o as BillingItemsSummary, C as ChangeRequestLink, q as ChangeRequestLinkCreate, s as ChangeRequestLinkUpdate, r as ChangeRequestLinkSummary, t as ChecklistLibrary, y as ChecklistLibraryCreate, D as ChecklistLibraryUpdate, z as ChecklistLibrarySummary, u as ChecklistLibraryChecklistItem, v as ChecklistLibraryChecklistItemCreate, x as ChecklistLibraryChecklistItemUpdate, w as ChecklistLibraryChecklistItemSummary, E as ClassificationIcon, G as ClassificationIconCreate, J as ClassificationIconUpdate, H as ClassificationIconSummary, K as Company, S as CompanyLocation, aN as Contact, W as CompanyNote, g9 as Ticket, dR as Project, hq as CompositeNamesSection, ha as TimeEntry, R as CompanyCreate, a3 as CompanyUpdate, a2 as CompanySummary, P as CompanyContext, L as CompanyAlert, M as CompanyAlertCreate, O as CompanyAlertUpdate, N as CompanyAlertSummary, T as CompanyLocationCreate, V as CompanyLocationUpdate, U as CompanyLocationSummary, X as CompanyNoteCreate, Z as CompanyNoteUpdate, Y as CompanyNoteSummary, _ as CompanySiteConfigurations, $ as CompanySiteConfigurationsCreate, a1 as CompanySiteConfigurationsUpdate, a0 as CompanySiteConfigurationsSummary, a4 as CompanyWebhook, a5 as CompanyWebhookCreate, a7 as CompanyWebhookUpdate, a6 as CompanyWebhookSummary, a9 as ConfigurationItemBillingProductAssociations, aa as ConfigurationItemBillingProductAssociationsCreate, ac as ConfigurationItemBillingProductAssociationsUpdate, ab as ConfigurationItemBillingProductAssociationsSummary, ad as ConfigurationItemCategory, ae as ConfigurationItemCategoryCreate, ak as ConfigurationItemCategoryUpdate, af as ConfigurationItemCategorySummary, ag as ConfigurationItemCategoryUdfAssociation, ah as ConfigurationItemCategoryUdfAssociationCreate, aj as ConfigurationItemCategoryUdfAssociationUpdate, ai as ConfigurationItemCategoryUdfAssociationSummary, an as ConfigurationItemDnsRecord, ao as ConfigurationItemDnsRecordCreate, aq as ConfigurationItemDnsRecordUpdate, ap as ConfigurationItemDnsRecordSummary, ar as ConfigurationItemNote, as as ConfigurationItemNoteCreate, au as ConfigurationItemNoteUpdate, at as ConfigurationItemNoteSummary, av as ConfigurationItemRelatedItem, aw as ConfigurationItemRelatedItemCreate, ay as ConfigurationItemRelatedItemUpdate, ax as ConfigurationItemRelatedItemSummary, a8 as ConfigurationItem, aE as ConfigurationItemType, am as ConfigurationItemCreate, aI as ConfigurationItemUpdate, aD as ConfigurationItemSummary, al as ConfigurationItemContext, az as ConfigurationItemSslSubjectAlternativeName, aA as ConfigurationItemSslSubjectAlternativeNameCreate, aC as ConfigurationItemSslSubjectAlternativeNameUpdate, aB as ConfigurationItemSslSubjectAlternativeNameSummary, aF as ConfigurationItemTypeCreate, aH as ConfigurationItemTypeUpdate, aG as ConfigurationItemTypeSummary, aJ as ConfigurationItemWebhook, aK as ConfigurationItemWebhookCreate, aM as ConfigurationItemWebhookUpdate, aL as ConfigurationItemWebhookSummary, aQ as ContactGroupContacts, aR as ContactGroupContactsCreate, aT as ContactGroupContactsUpdate, aS as ContactGroupContactsSummary, aU as ContactGroups, aV as ContactGroupsCreate, aX as ContactGroupsUpdate, aW as ContactGroupsSummary, aY as ContactSummary, aP as ContactCreate, aZ as ContactUpdate, aO as ContactContext, a_ as ContactWebhook, a$ as ContactWebhookCreate, b1 as ContactWebhookUpdate, b0 as ContactWebhookSummary, b3 as ContractBillingRule, b4 as ContractBillingRuleCreate, b6 as ContractBillingRuleUpdate, b5 as ContractBillingRuleSummary, b9 as ContractBlockHourFactor, ba as ContractBlockHourFactorCreate, bc as ContractBlockHourFactorUpdate, bb as ContractBlockHourFactorSummary, b7 as ContractBlock, b8 as ContractBlockCreate, be as ContractBlockUpdate, bd as ContractBlockSummary, bf as ContractCharge, bg as ContractChargeCreate, bi as ContractChargeUpdate, bh as ContractChargeSummary, bk as ContractExclusionBillingCode, bl as ContractExclusionBillingCodeCreate, bn as ContractExclusionBillingCodeUpdate, bm as ContractExclusionBillingCodeSummary, bo as ContractExclusionRoles, bp as ContractExclusionRolesCreate, br as ContractExclusionRolesUpdate, bq as ContractExclusionRolesSummary, bs as ContractExclusionSetExcludedRoles, bt as ContractExclusionSetExcludedRolesCreate, bv as ContractExclusionSetExcludedRolesUpdate, bu as ContractExclusionSetExcludedRolesSummary, bw as ContractExclusionSetExcludedWorkTypes, bx as ContractExclusionSetExcludedWorkTypesCreate, bz as ContractExclusionSetExcludedWorkTypesUpdate, by as ContractExclusionSetExcludedWorkTypesSummary, bA as ContractExclusionSets, bB as ContractExclusionSetsCreate, bD as ContractExclusionSetsUpdate, bC as ContractExclusionSetsSummary, bE as ContractMilestone, bF as ContractMilestoneCreate, bH as ContractMilestoneUpdate, bG as ContractMilestoneSummary, bI as ContractNote, bJ as ContractNoteCreate, bL as ContractNoteUpdate, bK as ContractNoteSummary, bM as ContractRate, bN as ContractRateCreate, bP as ContractRateUpdate, bO as ContractRateSummary, bQ as ContractRetainers, bR as ContractRetainersCreate, bT as ContractRetainersUpdate, bS as ContractRetainersSummary, bU as ContractRoleCosts, bV as ContractRoleCostsCreate, bX as ContractRoleCostsUpdate, bW as ContractRoleCostsSummary, bZ as ContractServiceAdjustment, b_ as ContractServiceAdjustmentCreate, c0 as ContractServiceAdjustmentUpdate, b$ as ContractServiceAdjustmentSummary, c2 as ContractServiceBundleAdjustment, c3 as ContractServiceBundleAdjustmentCreate, c5 as ContractServiceBundleAdjustmentUpdate, c4 as ContractServiceBundleAdjustmentSummary, c1 as ContractServiceBundle, c6 as ContractServiceBundleCreate, cc as ContractServiceBundleUpdate, c7 as ContractServiceBundleSummary, c8 as ContractServiceBundleUnit, c9 as ContractServiceBundleUnitCreate, cb as ContractServiceBundleUnitUpdate, ca as ContractServiceBundleUnitSummary, bY as ContractService, cd as ContractServiceCreate, cj as ContractServiceUpdate, ce as ContractServiceSummary, cf as ContractServiceUnit, cg as ContractServiceUnitCreate, ci as ContractServiceUnitUpdate, ch as ContractServiceUnitSummary, b2 as Contract, bj as ContractCreate, cp as ContractUpdate, ck as ContractSummary, cl as ContractTicketPurchases, cm as ContractTicketPurchasesCreate, co as ContractTicketPurchasesUpdate, cn as ContractTicketPurchasesSummary, cq as Country, cr as CountryCreate, ct as CountryUpdate, cs as CountrySummary, cu as Department, cv as DepartmentCreate, cx as DepartmentUpdate, cw as DepartmentSummary, cz as DomainRegistrar, cA as DomainRegistrarCreate, cC as DomainRegistrarUpdate, cB as DomainRegistrarSummary, cY as GlobalEntityInformationResultModel, cJ as ExpenseItemAttachment, cK as ExpenseItemAttachmentCreate, cM as ExpenseItemAttachmentUpdate, cL as ExpenseItemAttachmentSummary, cI as ExpenseItem, cN as ExpenseItemCreate, cP as ExpenseItemUpdate, cO as ExpenseItemSummary, cQ as ExpenseReport, cR as ExpenseReportCreate, cT as ExpenseReportUpdate, cS as ExpenseReportSummary, c$ as HolidaySet, d0 as HolidaySetCreate, d2 as HolidaySetUpdate, d1 as HolidaySetSummary, cZ as Holiday, c_ as HolidayCreate, d4 as HolidayUpdate, d3 as HolidaySummary, d5 as InventoryProduct, d6 as InventoryProductCreate, d8 as InventoryProductUpdate, d7 as InventoryProductSummary, d9 as InventoryStockedItemAdd, da as InventoryStockedItemRemove, db as InventoryStockedItemTransfer, dc as Invoice, dd as InvoiceCreate, df as InvoiceUpdate, de as InvoiceSummary, dh as ModuleAccessResultModel, di as NotificationHistory, dj as NotificationHistoryCreate, dl as NotificationHistoryUpdate, dk as NotificationHistorySummary, dq as Opportunity, dz as OpportunityCreate, dB as OpportunityUpdate, dA as OpportunitySummary, dr as OpportunityAttachment, ds as OpportunityAttachmentCreate, du as OpportunityAttachmentUpdate, dt as OpportunityAttachmentSummary, dv as OpportunityCategory, dw as OpportunityCategoryCreate, dy as OpportunityCategoryUpdate, dx as OpportunityCategorySummary, dE as Phase, dF as PhaseCreate, dH as PhaseUpdate, dG as PhaseSummary, dJ as Product, dK as ProductCreate, dM as ProductUpdate, dL as ProductSummary, dN as ProductVendors, dO as ProductVendorsCreate, dQ as ProductVendorsUpdate, dP as ProductVendorsSummary, dS as ProjectCharge, dT as ProjectChargeCreate, dV as ProjectChargeUpdate, dU as ProjectChargeSummary, dY as ProjectNote, dZ as ProjectNoteCreate, d$ as ProjectNoteUpdate, d_ as ProjectNoteSummary, dX as ProjectCreate, e1 as ProjectUpdate, e0 as ProjectSummary, hr as CompositeContextOptions, dW as ProjectContext, e2 as PurchaseApprovals, e3 as PurchaseApprovalsCreate, e5 as PurchaseApprovalsUpdate, e4 as PurchaseApprovalsSummary, e6 as PurchaseOrderItemReceiving, e7 as PurchaseOrderItemReceivingCreate, e9 as PurchaseOrderItemReceivingUpdate, e8 as PurchaseOrderItemReceivingSummary, ea as PurchaseOrderItems, eb as PurchaseOrderItemsCreate, ed as PurchaseOrderItemsUpdate, ec as PurchaseOrderItemsSummary, ee as PurchaseOrders, ef as PurchaseOrdersCreate, eh as PurchaseOrdersUpdate, eg as PurchaseOrdersSummary, ek as QuoteItem, el as QuoteItemCreate, en as QuoteItemUpdate, em as QuoteItemSummary, eo as QuoteLocation, ep as QuoteLocationCreate, er as QuoteLocationUpdate, eq as QuoteLocationSummary, ei as Quote, ej as QuoteCreate, ex as QuoteUpdate, es as QuoteSummary, et as QuoteTemplate, eu as QuoteTemplateCreate, ew as QuoteTemplateUpdate, ev as QuoteTemplateSummary, eE as ResourceRoleQueue, eF as ResourceRoleQueueCreate, eH as ResourceRoleQueueUpdate, eG as ResourceRoleQueueSummary, eC as ResourceRole, eD as ResourceRoleCreate, eJ as ResourceRoleUpdate, eI as ResourceRoleSummary, eK as ResourceSkill, eL as ResourceSkillCreate, eN as ResourceSkillUpdate, eM as ResourceSkillSummary, eA as Resource, eB as ResourceCreate, e$ as ResourceUpdate, eO as ResourceSummary, eP as ResourceTimeOffAdditional, eQ as ResourceTimeOffAdditionalCreate, eS as ResourceTimeOffAdditionalUpdate, eR as ResourceTimeOffAdditionalSummary, eT as ResourceTimeOffApprover, eU as ResourceTimeOffApproverCreate, eW as ResourceTimeOffApproverUpdate, eV as ResourceTimeOffApproverSummary, eX as ResourceTimeOffBalance, eY as ResourceTimeOffBalanceCreate, e_ as ResourceTimeOffBalanceUpdate, eZ as ResourceTimeOffBalanceSummary, f0 as Role, f1 as RoleCreate, f3 as RoleUpdate, f2 as RoleSummary, f5 as ServiceCall, f6 as ServiceCallCreate, fo as ServiceCallUpdate, f7 as ServiceCallSummary, fa as ServiceCallTaskResource, fb as ServiceCallTaskResourceCreate, fd as ServiceCallTaskResourceUpdate, fc as ServiceCallTaskResourceSummary, f8 as ServiceCallTask, f9 as ServiceCallTaskCreate, ff as ServiceCallTaskUpdate, fe as ServiceCallTaskSummary, fi as ServiceCallTicketResource, fj as ServiceCallTicketResourceCreate, fl as ServiceCallTicketResourceUpdate, fk as ServiceCallTicketResourceSummary, fg as ServiceCallTicket, fh as ServiceCallTicketCreate, fn as ServiceCallTicketUpdate, fm as ServiceCallTicketSummary, fq as ServiceLevelAgreementResults, fr as ServiceLevelAgreementResultsCreate, ft as ServiceLevelAgreementResultsUpdate, fs as ServiceLevelAgreementResultsSummary, f4 as Service, fp as ServiceCreate, fv as ServiceUpdate, fu as ServiceSummary, fw as Skill, fx as SkillCreate, fz as SkillUpdate, fy as SkillSummary, fC as SubscriptionPeriod, fD as SubscriptionPeriodCreate, fF as SubscriptionPeriodUpdate, fE as SubscriptionPeriodSummary, fA as Subscription, fB as SubscriptionCreate, fH as SubscriptionUpdate, fG as SubscriptionSummary, fK as SurveyResults, fL as SurveyResultsCreate, fN as SurveyResultsUpdate, fM as SurveyResultsSummary, fI as Survey, fJ as SurveyCreate, fP as SurveyUpdate, fO as SurveySummary, fR as TagAlias, fS as TagAliasCreate, fU as TagAliasUpdate, fT as TagAliasSummary, fW as TagGroup, fX as TagGroupCreate, fZ as TagGroupUpdate, fY as TagGroupSummary, fQ as Tag, fV as TagCreate, f$ as TagUpdate, f_ as TagSummary, g2 as TaskSecondaryResource, g3 as TaskSecondaryResourceCreate, g5 as TaskSecondaryResourceUpdate, g4 as TaskSecondaryResourceSummary, g0 as Task, g1 as TaskCreate, g7 as TaskUpdate, g6 as TaskSummary, g8 as ThresholdStatusResultModel, ga as TicketAdditionalConfigurationItem, gb as TicketAdditionalConfigurationItemCreate, gd as TicketAdditionalConfigurationItemUpdate, gc as TicketAdditionalConfigurationItemSummary, ge as TicketAdditionalContact, gf as TicketAdditionalContactCreate, gh as TicketAdditionalContactUpdate, gg as TicketAdditionalContactSummary, gi as TicketAttachment, gj as TicketAttachmentCreate, gl as TicketAttachmentUpdate, gk as TicketAttachmentSummary, gm as TicketCategory, gn as TicketCategoryCreate, gt as TicketCategoryUpdate, gs as TicketCategorySummary, go as TicketCategoryFieldDefault, gp as TicketCategoryFieldDefaultCreate, gr as TicketCategoryFieldDefaultUpdate, gq as TicketCategoryFieldDefaultSummary, gu as TicketChangeRequestApproval, gv as TicketChangeRequestApprovalCreate, gx as TicketChangeRequestApprovalUpdate, gw as TicketChangeRequestApprovalSummary, gy as TicketCharge, gz as TicketChargeCreate, gB as TicketChargeUpdate, gA as TicketChargeSummary, gC as TicketChecklistItem, gD as TicketChecklistItemCreate, gF as TicketChecklistItemUpdate, gE as TicketChecklistItemSummary, gG as TicketChecklistLibrary, gH as TicketChecklistLibraryCreate, gJ as TicketChecklistLibraryUpdate, gI as TicketChecklistLibrarySummary, gM as TicketHistory, gN as TicketHistoryCreate, gP as TicketHistoryUpdate, gO as TicketHistorySummary, gR as TicketNoteAttachment, gS as TicketNoteAttachmentCreate, gU as TicketNoteAttachmentUpdate, gT as TicketNoteAttachmentSummary, gQ as TicketNote, gV as TicketNoteCreate, gX as TicketNoteUpdate, gW as TicketNoteSummary, gY as TicketNoteWebhook, gZ as TicketNoteWebhookCreate, g$ as TicketNoteWebhookUpdate, g_ as TicketNoteWebhookSummary, h0 as TicketSecondaryResource, h1 as TicketSecondaryResourceCreate, h3 as TicketSecondaryResourceUpdate, h2 as TicketSecondaryResourceSummary, gL as TicketCreate, h5 as TicketUpdate, h4 as TicketSummary, gK as TicketContext, h6 as TicketWebhook, h7 as TicketWebhookCreate, h9 as TicketWebhookUpdate, h8 as TicketWebhookSummary, hf as TimeEntryCreate, hh as TimeEntryUpdate, hg as TimeEntrySummary, hb as TimeEntryAttachment, hc as TimeEntryAttachmentCreate, he as TimeEntryAttachmentUpdate, hd as TimeEntryAttachmentSummary, hi as TimeOffRequest, hj as TimeOffRequestCreate, hm as TimeOffRequestUpdate, hl as TimeOffRequestSummary, A as ApiVersionResultModel, i as AutotaskVersionResultModel, ho as ZoneInformationResultModel } from './index-cQ6CRexR.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A read-through TTL cache (lazy purge on read; expiry is `Date.now()`
|
|
@@ -13,6 +13,7 @@ declare class ReadCache {
|
|
|
13
13
|
/** The per-resource TTL overrides (issue #32; absent = every resource uses `ttlMs`). */
|
|
14
14
|
readonly perResourceTtlMs?: Readonly<Record<string, number>>;
|
|
15
15
|
private readonly store;
|
|
16
|
+
private epochCounter;
|
|
16
17
|
constructor(ttlMs: number, perResourceTtlMs?: Record<string, number>);
|
|
17
18
|
/**
|
|
18
19
|
* The TTL (ms) for a resource plan key: the `perResourceTtlMs` override
|
|
@@ -26,14 +27,21 @@ declare class ReadCache {
|
|
|
26
27
|
*/
|
|
27
28
|
get(key: string): unknown;
|
|
28
29
|
/** Store a successful read payload under `key`, live for `ttlFor(resource)`:
|
|
29
|
-
* the per-resource override (issue #32) when named, else `ttlMs`.
|
|
30
|
-
|
|
30
|
+
* the per-resource override (issue #32) when named, else `ttlMs`.
|
|
31
|
+
* `epoch` is the invalidation epoch the caller captured BEFORE its wire
|
|
32
|
+
* read: a read that straddled a `clear()` (a write) is dropped, never
|
|
33
|
+
* re-stored with its pre-write body. */
|
|
34
|
+
set(key: string, value: unknown, resource?: string, epoch?: number): void;
|
|
31
35
|
/** Drop every expired entry (returns the number removed). */
|
|
32
36
|
purgeExpired(): number;
|
|
33
37
|
/** Current entry count (live + not-yet-purged expired). */
|
|
34
38
|
get size(): number;
|
|
35
39
|
/** Drop one key (issue #36: a later positive outcome clears a stale 'absent' marker). */
|
|
36
40
|
delete(key: string): boolean;
|
|
41
|
+
/** The invalidation epoch: bumped by `clear()`; capture it before a wire
|
|
42
|
+
* read and pass it to `set` so a read in flight across a write cannot
|
|
43
|
+
* re-store its stale answer. */
|
|
44
|
+
get epoch(): number;
|
|
37
45
|
/** Drop everything (e.g. a caller that knows the tenant was reset). */
|
|
38
46
|
clear(): void;
|
|
39
47
|
}
|
|
@@ -108,6 +116,82 @@ declare class FieldCache {
|
|
|
108
116
|
clear(): void;
|
|
109
117
|
}
|
|
110
118
|
|
|
119
|
+
/** One stored name answer: the resolved name (null when the vendor
|
|
120
|
+
* returned no name part) + the blind marker (the vendor's true
|
|
121
|
+
* not-found for this id). */
|
|
122
|
+
interface ResourceNameEntry {
|
|
123
|
+
/** The composed display name (`firstName [middleName] lastName`,
|
|
124
|
+
* single spaces); null when the record exists but carries no name
|
|
125
|
+
* part (a vendor data gap — distinct from blind). */
|
|
126
|
+
name: string | null;
|
|
127
|
+
/** True when the per-id read is the vendor's true not-found (404 or
|
|
128
|
+
* `200 item: null`) — the table-invisible case the op reports with
|
|
129
|
+
* the id kept and no error. */
|
|
130
|
+
blind: boolean;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* A read-through TTL cache for `operations.expandResourceNames` name
|
|
134
|
+
* answers (lazy purge on read; expiry is `Date.now()` based).
|
|
135
|
+
* Constructed by `resolveConfig` from
|
|
136
|
+
* `resourceNameCache: { ttlMs, maxEntries }` — a positive-integer
|
|
137
|
+
* `ttlMs` is required (validated here, as in ReadCache / FieldCache).
|
|
138
|
+
*/
|
|
139
|
+
declare class ResourceNameCache {
|
|
140
|
+
/** The configured TTL in ms. */
|
|
141
|
+
readonly ttlMs: number;
|
|
142
|
+
/** The entry bound (the cap applies to STORED entries; inflight never counts). */
|
|
143
|
+
readonly maxEntries: number;
|
|
144
|
+
private readonly store;
|
|
145
|
+
private readonly inflightMap;
|
|
146
|
+
private epochCounter;
|
|
147
|
+
constructor(ttlMs: number, maxEntries?: number);
|
|
148
|
+
/** The namespaced key: `resources:<canonical id>` (the namespace
|
|
149
|
+
* leaves a documented path to future FK tables — v1 serves
|
|
150
|
+
* `resources` only). */
|
|
151
|
+
static key(id: Identifier): string;
|
|
152
|
+
/**
|
|
153
|
+
* Read-through lookup: the live entry (a copy), or `undefined`
|
|
154
|
+
* (absent OR expired — an expired entry is purged lazily on this
|
|
155
|
+
* read).
|
|
156
|
+
*/
|
|
157
|
+
get(id: Identifier): ResourceNameEntry | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* Store a name answer under the id, live for `ttlMs`. ALWAYS stores
|
|
160
|
+
* (the no-name-part answer `{ name: null, blind: false }` is a stable
|
|
161
|
+
* fact and is cached — the documented difference from the fieldCache
|
|
162
|
+
* empty rule); past the cap, purge expired first, then evict the
|
|
163
|
+
* oldest-inserted (Map insertion order; refreshes re-insert so the
|
|
164
|
+
* memory guard drops the OLDEST-inserted entries first).
|
|
165
|
+
*/
|
|
166
|
+
set(id: Identifier, value: ResourceNameEntry, epoch?: number): void;
|
|
167
|
+
/**
|
|
168
|
+
* In-flight de-duplication: the shared in-flight promise for the id,
|
|
169
|
+
* or `undefined` (nothing in flight — the caller issues the request
|
|
170
|
+
* and registers it with `track`).
|
|
171
|
+
*/
|
|
172
|
+
inflight(id: Identifier): Promise<unknown> | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* Register an in-flight name read: concurrent callers for the same id
|
|
175
|
+
* await the SAME promise (one wire request). The entry is dropped on
|
|
176
|
+
* settle — success OR failure (a failure is never cached; the next
|
|
177
|
+
* caller refetches).
|
|
178
|
+
*/
|
|
179
|
+
track(id: Identifier, promise: Promise<unknown>): Promise<unknown>;
|
|
180
|
+
/** Drop every expired entry (returns the number removed). */
|
|
181
|
+
purgeExpired(): number;
|
|
182
|
+
/** The invalidation epoch: bumped by `clear()`; capture it before a wire
|
|
183
|
+
* read and pass it to `set` so a stale answer is dropped. */
|
|
184
|
+
get epoch(): number;
|
|
185
|
+
/** Current entry count (live + not-yet-purged expired). */
|
|
186
|
+
get size(): number;
|
|
187
|
+
/**
|
|
188
|
+
* Drop everything — the SCOPED invalidation target: a real write to
|
|
189
|
+
* the `resources` resource through the same client (a rename via this
|
|
190
|
+
* client is always fresh).
|
|
191
|
+
*/
|
|
192
|
+
clear(): void;
|
|
193
|
+
}
|
|
194
|
+
|
|
111
195
|
/**
|
|
112
196
|
* AutotaskError hierarchy (ARCHITECTURE section 10).
|
|
113
197
|
*
|
|
@@ -706,6 +790,12 @@ declare const DEFAULT_MAX_RESPONSE_BYTES: number;
|
|
|
706
790
|
/** Bounded client-scan caps for resolution (section 19.2). */
|
|
707
791
|
declare const DEFAULT_MAX_SCAN_RECORDS = 500;
|
|
708
792
|
declare const DEFAULT_MAX_SCAN_PAGES = 4;
|
|
793
|
+
/** Default read-cache TTL (issue #80: the plan-derived default class, 5 min). */
|
|
794
|
+
declare const DEFAULT_READ_CACHE_TTL_MS = 300000;
|
|
795
|
+
/** Default field-metadata cache TTL (issue #80: the 5 min class). */
|
|
796
|
+
declare const DEFAULT_FIELD_CACHE_TTL_MS = 300000;
|
|
797
|
+
/** Default resource-name cache TTL (issue #80: the plan-derived reference class, 1 h). */
|
|
798
|
+
declare const DEFAULT_RESOURCE_NAME_CACHE_TTL_MS = 3600000;
|
|
709
799
|
interface AutotaskConfig {
|
|
710
800
|
/**
|
|
711
801
|
* Config profile (issue #4): `'library'` (default — changes nothing) or
|
|
@@ -806,13 +896,19 @@ interface AutotaskConfig {
|
|
|
806
896
|
isFailure?: (err: AutotaskError) => boolean;
|
|
807
897
|
};
|
|
808
898
|
/**
|
|
809
|
-
* Bounded client-scan
|
|
810
|
-
*
|
|
811
|
-
*
|
|
899
|
+
* Bounded client-scan for resolution (section 19.2). A bare-value
|
|
900
|
+
* `resolve` miss is answered by the server filter (zero items = no match,
|
|
901
|
+
* null). `scanOnMiss: true` opts in to re-checking a miss with a bounded
|
|
902
|
+
* unfiltered walk (exact match on the searchFields); a cap-tripped scan
|
|
903
|
+
* throws RESOLUTION_TRUNCATED. Default false: the vendor gives no signal
|
|
904
|
+
* that a filtered miss is incomplete (`pageDetails.requestCount` echoes
|
|
905
|
+
* MaxRecords, it is not a match count). Caps default 500 records /
|
|
906
|
+
* 4 pages; each must be an integer >= 1.
|
|
812
907
|
*/
|
|
813
908
|
resolution?: {
|
|
814
909
|
maxScanRecords?: number;
|
|
815
910
|
maxScanPages?: number;
|
|
911
|
+
scanOnMiss?: boolean;
|
|
816
912
|
};
|
|
817
913
|
/**
|
|
818
914
|
* Optional audit hook (section 19.3): one event per completed request,
|
|
@@ -834,43 +930,74 @@ interface AutotaskConfig {
|
|
|
834
930
|
*/
|
|
835
931
|
redactPersonalData?: boolean;
|
|
836
932
|
/**
|
|
837
|
-
*
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
*
|
|
841
|
-
* `
|
|
842
|
-
* `
|
|
843
|
-
*
|
|
844
|
-
*
|
|
845
|
-
*
|
|
933
|
+
* Read-through TTL cache for successful single-record reads (get-by-id
|
|
934
|
+
* and the id branch of `resolve`). ON by default (issue #80): an ABSENT
|
|
935
|
+
* block builds the default instance (`DEFAULT_READ_CACHE_TTL_MS` — 5
|
|
936
|
+
* min — with the plan-derived per-resource table
|
|
937
|
+
* `DEFAULT_PER_RESOURCE_TTL_MS` applied as the default map); `cache:
|
|
938
|
+
* false` is the explicit opt-out (no instance — the uncached path,
|
|
939
|
+
* byte-identical to the pre-#80 off mode); an object merges over the
|
|
940
|
+
* defaults (`ttlMs` optional). A cached read is a snapshot at fetch
|
|
941
|
+
* time: mutations are never cached, and any real write through this
|
|
942
|
+
* client clears the cache, so a write-then-read on the same client
|
|
943
|
+
* re-fetches; writes made elsewhere (another client, the Autotask UI)
|
|
944
|
+
* show up once the TTL expires. `ttlMs` must be a positive integer (ms)
|
|
945
|
+
* when present. `perResourceTtlMs` (issue #32) is an optional map of
|
|
946
|
+
* resource plan key -> TTL in ms whose entries OVERRIDE the default
|
|
947
|
+
* table per resource (operator entry > table entry > `ttlMs`); a
|
|
948
|
+
* resource named in neither falls back to `ttlMs`. Every value is a
|
|
846
949
|
* positive integer (validated fail-closed like `ttlMs`). The key
|
|
847
950
|
* contract (docs section 11.15): the entry takes the override for the
|
|
848
951
|
* plan key of the entity the read path points to — a contact read
|
|
849
952
|
* through `tickets.getContext` expires on the contact's TTL. The
|
|
850
953
|
* plan-derived default table (`DEFAULT_PER_RESOURCE_TTL_MS` in
|
|
851
954
|
* `src/cache-ttl-tables.ts`, reference class 1h vs default class 5min)
|
|
852
|
-
*
|
|
955
|
+
* IS the default per-resource map (issue #80 — applied by default, not
|
|
956
|
+
* just a reference).
|
|
853
957
|
*/
|
|
854
|
-
cache?: {
|
|
855
|
-
ttlMs
|
|
958
|
+
cache?: false | {
|
|
959
|
+
ttlMs?: number;
|
|
856
960
|
perResourceTtlMs?: Record<string, number>;
|
|
857
961
|
};
|
|
858
962
|
/**
|
|
859
|
-
*
|
|
860
|
-
* (`getEntityInfo` / `getFieldInfo` / `getUdfInfo`).
|
|
861
|
-
* (
|
|
862
|
-
*
|
|
863
|
-
*
|
|
963
|
+
* Live field-metadata channel for the entityInformation trio
|
|
964
|
+
* (`getEntityInfo` / `getFieldInfo` / `getUdfInfo`). ON by default
|
|
965
|
+
* (issue #80): an ABSENT block builds the default instance
|
|
966
|
+
* (`DEFAULT_FIELD_CACHE_TTL_MS` — 5 min — with `FIELD_CACHE_MAX_ENTITIES`);
|
|
967
|
+
* `fieldCache: false` is the explicit opt-out (no instance — the trio
|
|
968
|
+
* is the uncached wire path, bit-for-bit); an object merges over the
|
|
969
|
+
* defaults. Live reads are snapshots at fetch time: a vendor drift (a
|
|
970
|
+
* deterministic validation 500, or an INVALID_RESPONSE on a metadata
|
|
864
971
|
* read) invalidates the entity's entries so the next call refetches;
|
|
865
972
|
* anything the drift signals do not name shows up once `ttlMs` expires.
|
|
866
973
|
* Field metadata only — record reads are `cache`, a different channel.
|
|
867
|
-
* `ttlMs` must be a positive integer (ms); `maxEntities`
|
|
868
|
-
* positive integer) bounds the in-memory store.
|
|
974
|
+
* `ttlMs` must be a positive integer (ms) when present; `maxEntities`
|
|
975
|
+
* (optional, positive integer) bounds the in-memory store.
|
|
869
976
|
*/
|
|
870
|
-
fieldCache?: {
|
|
871
|
-
ttlMs
|
|
977
|
+
fieldCache?: false | {
|
|
978
|
+
ttlMs?: number;
|
|
872
979
|
maxEntities?: number;
|
|
873
980
|
};
|
|
981
|
+
/**
|
|
982
|
+
* Resource-name channel for `operations.expandResourceNames` (issue
|
|
983
|
+
* #65). ON by default (issue #80): an ABSENT block builds the default
|
|
984
|
+
* instance (`DEFAULT_RESOURCE_NAME_CACHE_TTL_MS` — 1 h — with
|
|
985
|
+
* `RESOURCE_NAME_CACHE_MAX_ENTRIES`); `resourceNameCache: false` is
|
|
986
|
+
* the explicit opt-out (no instance, and the op is the uncached per-id
|
|
987
|
+
* path, bit-for-bit — per-call de-duplication still applies); an
|
|
988
|
+
* object merges over the defaults. Stores the op's name projection per
|
|
989
|
+
* resource id (a resolved name, or the vendor's true not-found as a
|
|
990
|
+
* blind marker — a repeat miss costs no wire); failures are never
|
|
991
|
+
* cached. Live names are snapshots at fetch time: a `resources` write
|
|
992
|
+
* through the same client clears the channel; a rename made elsewhere
|
|
993
|
+
* shows up once `ttlMs` expires. `ttlMs` must be a positive integer
|
|
994
|
+
* (ms) when present; `maxEntries` (optional, positive integer) bounds
|
|
995
|
+
* the in-memory store.
|
|
996
|
+
*/
|
|
997
|
+
resourceNameCache?: false | {
|
|
998
|
+
ttlMs?: number;
|
|
999
|
+
maxEntries?: number;
|
|
1000
|
+
};
|
|
874
1001
|
/**
|
|
875
1002
|
* Opt-in PUT item-path fallback for updates (issue #34). OFF by default
|
|
876
1003
|
* (absent = the spec-derived route contract is unchanged: a 404 on the
|
|
@@ -987,19 +1114,22 @@ interface ResolvedAutotaskConfig {
|
|
|
987
1114
|
store?: CircuitBreakerStore;
|
|
988
1115
|
isFailure?: (err: AutotaskError) => boolean;
|
|
989
1116
|
};
|
|
990
|
-
/** Resolved scan caps (final values; defaults 500 records / 4 pages). */
|
|
1117
|
+
/** Resolved scan caps (final values; defaults 500 records / 4 pages; scanOnMiss default false). */
|
|
991
1118
|
resolution: {
|
|
992
1119
|
maxScanRecords: number;
|
|
993
1120
|
maxScanPages: number;
|
|
1121
|
+
scanOnMiss: boolean;
|
|
994
1122
|
};
|
|
995
1123
|
/** Audit hook (absent when the caller provided none). */
|
|
996
1124
|
onAudit?: (event: AuditEvent) => void;
|
|
997
1125
|
/** Response redaction for PII + CONFIDENTIAL fields (resolved; default true). */
|
|
998
1126
|
redactPersonalData: boolean;
|
|
999
|
-
/** The read cache (
|
|
1127
|
+
/** The read cache (the default instance when `cache` is absent; absent only for explicit `cache: false`, issue #80). */
|
|
1000
1128
|
readCache?: ReadCache;
|
|
1001
|
-
/** The field-metadata cache (
|
|
1129
|
+
/** The field-metadata cache (the default instance when `fieldCache` is absent; absent only for explicit `fieldCache: false`, issue #80). */
|
|
1002
1130
|
fieldCache?: FieldCache;
|
|
1131
|
+
/** The resource-name cache (the default instance when `resourceNameCache` is absent; absent only for explicit `resourceNameCache: false`, issue #65). */
|
|
1132
|
+
resourceNameCache?: ResourceNameCache;
|
|
1003
1133
|
/** Resolved update fallback gate (final value; OFF by default, issue #34). */
|
|
1004
1134
|
update: {
|
|
1005
1135
|
putFallback: boolean;
|
|
@@ -1028,6 +1158,24 @@ declare function resolveBaseUrl(partial: {
|
|
|
1028
1158
|
baseUrl?: string;
|
|
1029
1159
|
zone?: ZoneName;
|
|
1030
1160
|
}): string;
|
|
1161
|
+
/**
|
|
1162
|
+
* The credential core of `resolveConfig` (issue #80): the fail-closed
|
|
1163
|
+
* credential trim + zone -> base-URL resolution WITHOUT building the
|
|
1164
|
+
* cache instances. `ClientPool.keyFor` calls this to hash the credential
|
|
1165
|
+
* tuple — with the channels default-on, the full `resolveConfig` would
|
|
1166
|
+
* construct three throwaway cache instances on every pool access, so the
|
|
1167
|
+
* key path must not (the pool key ignores cache config by design: same
|
|
1168
|
+
* credentials = one client, first-built wins). `resolveConfig` reuses
|
|
1169
|
+
* this for the same fields, then resolves the rest.
|
|
1170
|
+
*/
|
|
1171
|
+
declare function resolveCredentials(config: AutotaskConfig): {
|
|
1172
|
+
baseUrl: string;
|
|
1173
|
+
zone?: ZoneName;
|
|
1174
|
+
apiIntegrationCode: string;
|
|
1175
|
+
userName: string;
|
|
1176
|
+
secret: string;
|
|
1177
|
+
impersonationResourceId?: string;
|
|
1178
|
+
};
|
|
1031
1179
|
/** Validate + resolve an AutotaskConfig (fail closed; throws AutotaskConfigError). */
|
|
1032
1180
|
declare function resolveConfig(config: AutotaskConfig): ResolvedAutotaskConfig;
|
|
1033
1181
|
|
|
@@ -1117,7 +1265,9 @@ declare function cursorToPath(baseUrl: string, cursor: string): string;
|
|
|
1117
1265
|
* (the node's production wire shape; `filter` is the conditions array).
|
|
1118
1266
|
* `via: 'get'` — GET `?search=<json>` with the FULL measured URL checked
|
|
1119
1267
|
* against the 2048-char cap; above it the call THROWS `QueryTooLongError`
|
|
1120
|
-
* (never a silent switch to POST).
|
|
1268
|
+
* (never a silent switch to POST). When `includeFields` is set the SDK
|
|
1269
|
+
* always appends `id` (issue #59: the vendor omits `id` from a row unless
|
|
1270
|
+
* it is named, and every caller needs the id to act on the row).
|
|
1121
1271
|
*/
|
|
1122
1272
|
declare function buildQueryRequest(baseUrl: string, resourcePath: string, params: QueryParams): RequestOptions;
|
|
1123
1273
|
/** Run `fn` with `signal` cancelling every SDK request it starts (and their retry waits). */
|
|
@@ -1133,14 +1283,22 @@ declare class HttpClient {
|
|
|
1133
1283
|
* TALKS.
|
|
1134
1284
|
*/
|
|
1135
1285
|
get baseUrl(): string;
|
|
1286
|
+
/** The owning client (assigned by the AutotaskClient constructor right
|
|
1287
|
+
* after construction). The transport is shared by every resource; the
|
|
1288
|
+
* cross-resource composite name resolution (issue #77) reaches the sibling
|
|
1289
|
+
* resource holders and the client config through this back-reference.
|
|
1290
|
+
* Undefined only for a standalone transport, which never runs a composite. */
|
|
1291
|
+
client: AutotaskClient | undefined;
|
|
1136
1292
|
readonly maxConcurrent: number;
|
|
1137
1293
|
readonly timeoutMs: number;
|
|
1138
1294
|
/** Bounded client-scan caps for resolution (section 19.2; per-client). */
|
|
1139
1295
|
readonly resolution: ResolutionCaps;
|
|
1140
|
-
/**
|
|
1296
|
+
/** Single-record read cache (issue #80: the default instance when `cache` is absent; undefined only when the user set `false` explicitly). */
|
|
1141
1297
|
readonly readCache: ReadCache | undefined;
|
|
1142
|
-
/**
|
|
1298
|
+
/** Field-metadata cache for the entityInformation trio (issue #80: the default instance when `fieldCache` is absent; undefined only when the user set `false` explicitly). */
|
|
1143
1299
|
readonly fieldCache: FieldCache | undefined;
|
|
1300
|
+
/** Resource-name cache for `operations.expandResourceNames` (issue #80: the default instance when `resourceNameCache` is absent; undefined only when the user set `false` explicitly, issue #65). */
|
|
1301
|
+
readonly resourceNameCache: ResourceNameCache | undefined;
|
|
1144
1302
|
/** Resolved update fallback gate (issue #34; OFF by default). */
|
|
1145
1303
|
readonly update: {
|
|
1146
1304
|
putFallback: boolean;
|
|
@@ -1322,8 +1480,12 @@ interface PaginateOptions {
|
|
|
1322
1480
|
}
|
|
1323
1481
|
/** Clamp a requested page size into the vendor range 1..500. */
|
|
1324
1482
|
declare function clampPageSize(pageSize: number): number;
|
|
1325
|
-
/**
|
|
1326
|
-
|
|
1483
|
+
/**
|
|
1484
|
+
* `ceil(total / pageSize)`; 0 for an empty result set. `total` must be a TRUE
|
|
1485
|
+
* match count (`count()`, POST .../query/count) — never `pageDetails.requestCount`,
|
|
1486
|
+
* which echoes the requested MaxRecords.
|
|
1487
|
+
*/
|
|
1488
|
+
declare function totalPagesFor(total: number, pageSize: number): number;
|
|
1327
1489
|
/**
|
|
1328
1490
|
* Yield pages one at a time until the walk ends. Requests pages 1, 2, 3, ...
|
|
1329
1491
|
* at `clampPageSize(opts.pageSize ?? 10)`; a walk that would fetch a 1001st
|
|
@@ -1366,9 +1528,11 @@ declare function toArray<T>(iter: AsyncIterable<T>): Promise<T[]>;
|
|
|
1366
1528
|
* the inventory is zero wire; the probe is a bounded read sweep);
|
|
1367
1529
|
* - operations.createGuidance serves CREATE_GUIDANCE (issue #12 — the
|
|
1368
1530
|
* 92-entity zone-fact catalog, zero wire);
|
|
1531
|
+
* - src/resources/base.ts reads UNTRUSTED_FIELDS_BY_RESOURCE for the
|
|
1532
|
+
* queryBounded noteChars free-text cap (issue #61 — response-side only);
|
|
1369
1533
|
* - docs/API.md §11.7/§11.8/§11.9/§11.10/§11.11/§11.12 render the same facts.
|
|
1370
1534
|
*
|
|
1371
|
-
* planHash:
|
|
1535
|
+
* planHash: 4c8d9f800e97c350acc681ade183f67474c044b674494eb78cd0f14a933dc1fc
|
|
1372
1536
|
*/
|
|
1373
1537
|
|
|
1374
1538
|
/** One pinned blind-surface stamp (the result-time sentinel object). */
|
|
@@ -1601,6 +1765,35 @@ interface BoundedQueryParams extends QueryParams {
|
|
|
1601
1765
|
* page size (min(500, limit)); `maxRecords` is ignored by this method.
|
|
1602
1766
|
*/
|
|
1603
1767
|
limit?: number;
|
|
1768
|
+
/**
|
|
1769
|
+
* Issue #59: return the N highest-`id` rows (1..2500, i.e.
|
|
1770
|
+
* `BOUNDED_QUERY_MAX_LIMIT`); the vendor has no sort parameter, so this
|
|
1771
|
+
* is a count-anchored mechanism (see the `latestWalk` docs); `limit` and
|
|
1772
|
+
* `latest` may coexist only when `limit >= latest`.
|
|
1773
|
+
*/
|
|
1774
|
+
latest?: number;
|
|
1775
|
+
/**
|
|
1776
|
+
* Issue #61 (slice A): opt-in per-field char cap on the resource's
|
|
1777
|
+
* untrusted-class free-text fields (notes/descriptions/UDF prose — the
|
|
1778
|
+
* generated `UNTRUSTED_FIELDS_BY_RESOURCE` set, the SAME set the MCP
|
|
1779
|
+
* projection wraps). Integer >= 1; ABSENT = the raw, untruncated result
|
|
1780
|
+
* bit-for-bit. The truncation runs at result-build — BEFORE the
|
|
1781
|
+
* server-side untrusted wrapper (the src/untrusted.ts contract: the
|
|
1782
|
+
* caller truncates first, then wraps) — and is response-side only
|
|
1783
|
+
* (zero wire). `0` / negative / non-integer is refused pre-request
|
|
1784
|
+
* (`AutotaskConfigError`, zero wire).
|
|
1785
|
+
*/
|
|
1786
|
+
noteChars?: number;
|
|
1787
|
+
/**
|
|
1788
|
+
* Issue #61 (slice B): a closed includeFields PRESET name (the
|
|
1789
|
+
* hand-authored FIELD_PRESETS list — v1: `billing_join` on billing_items).
|
|
1790
|
+
* Resolved PRE-WALK to the walk's `includeFields` (the vendor's column
|
|
1791
|
+
* selection rides the existing IncludeFields wire path; `id` is always
|
|
1792
|
+
* appended by the P1 id-append — zero extra wire). The refusals are
|
|
1793
|
+
* pre-request (zero wire): unknown name / resource mismatch / an explicit
|
|
1794
|
+
* `includeFields` in the same bag (see src/field-presets.ts).
|
|
1795
|
+
*/
|
|
1796
|
+
fieldsPreset?: string;
|
|
1604
1797
|
}
|
|
1605
1798
|
/** The bounded, complete-enough result of `queryBounded`. */
|
|
1606
1799
|
interface BoundedQueryResult<T> {
|
|
@@ -1637,6 +1830,15 @@ interface BoundedQueryResult<T> {
|
|
|
1637
1830
|
* Additive: items/fetched/hasMore are never mutated.
|
|
1638
1831
|
*/
|
|
1639
1832
|
emptyReason?: EmptyReasonInfo;
|
|
1833
|
+
/**
|
|
1834
|
+
* Issue #61 (slice A): the additive noteChars stamp — the count of the
|
|
1835
|
+
* TRUNCATED FIELDS (per field, across the returned items). Present ONLY
|
|
1836
|
+
* when > 0 (the additive-only-when-present house pattern: `blindSurface`,
|
|
1837
|
+
* `emptyReason`, `shapeDrift`). Absent = no field was truncated (the cap
|
|
1838
|
+
* was absent, or every value sat at or under it). Additive: the
|
|
1839
|
+
* items/fetched/hasMore walk values are never mutated (copy-on-truncate).
|
|
1840
|
+
*/
|
|
1841
|
+
noteCharsTruncated?: number;
|
|
1640
1842
|
}
|
|
1641
1843
|
/** Per-walk cursor state (one closure per `query`/`queryAll`/`queryBounded` call — walks never share state). */
|
|
1642
1844
|
interface QueryWalkState {
|
|
@@ -1725,6 +1927,29 @@ interface CreateRecoveryOpts {
|
|
|
1725
1927
|
}
|
|
1726
1928
|
/** The mutation options accepted by a `create` (the shared `MutationOpts` + the issue #13 recovery bag). */
|
|
1727
1929
|
type CreateOpts = MutationOpts & CreateRecoveryOpts;
|
|
1930
|
+
/** Issue #78: why a resolve or search miss is empty, and what to try next. */
|
|
1931
|
+
interface MissDetail {
|
|
1932
|
+
/** The fields and operator the match actually used (exact `eq` for resolve, `contains` for search). */
|
|
1933
|
+
tried: {
|
|
1934
|
+
fields: string[];
|
|
1935
|
+
operator: 'eq' | 'contains';
|
|
1936
|
+
};
|
|
1937
|
+
/** The blind-surface stamp when the resource's query surface is blind to records the API user does not own. */
|
|
1938
|
+
blindSurface?: BlindSurfaceInfo;
|
|
1939
|
+
/** Concrete next steps for the caller. */
|
|
1940
|
+
next: string[];
|
|
1941
|
+
}
|
|
1942
|
+
/** `resolveWithDetail`: the resolve outcome; `miss` is present only on a miss. */
|
|
1943
|
+
interface ResolveWithDetail<T> {
|
|
1944
|
+
record: T | null;
|
|
1945
|
+
resolutionCost: Resolution<T>['resolutionCost'];
|
|
1946
|
+
miss?: MissDetail;
|
|
1947
|
+
}
|
|
1948
|
+
/** `searchWithDetail`: the search outcome; `miss` is present only when empty. */
|
|
1949
|
+
interface SearchWithDetail<T> {
|
|
1950
|
+
items: T[];
|
|
1951
|
+
miss?: MissDetail;
|
|
1952
|
+
}
|
|
1728
1953
|
declare abstract class BaseResource<T = Record<string, unknown>, TCreate = Record<string, unknown>, TUpdate = Record<string, unknown>> {
|
|
1729
1954
|
protected readonly http: HttpClient;
|
|
1730
1955
|
protected readonly config: BaseResourceConfig;
|
|
@@ -1773,15 +1998,136 @@ declare abstract class BaseResource<T = Record<string, unknown>, TCreate = Recor
|
|
|
1773
1998
|
* - `count` is always omitted: `pageDetails.count` is the current page's
|
|
1774
1999
|
* record count (vendor-documented), never a total — `<resource>.count`
|
|
1775
2000
|
* is the total.
|
|
2001
|
+
* - Issue #59: `latest: N` (validated pre-request, zero wire) delegates to
|
|
2002
|
+
* `latestWalk` — the count-anchored N-highest-id mechanism; ABSENT, the
|
|
2003
|
+
* walk below is bit-for-bit the existing path.
|
|
1776
2004
|
* Pure read; no mutation paths involved.
|
|
1777
2005
|
*/
|
|
1778
2006
|
queryBounded(params?: BoundedQueryParams): Promise<BoundedQueryResult<T>>;
|
|
2007
|
+
/** Issue #61 (slice A): the noteChars truncation at the SINGLE chokepoint
|
|
2008
|
+
* of `queryBounded` — the normal walk and the `latest` paths both
|
|
2009
|
+
* produced their `BoundedQueryResult` here (the single chokepoint the
|
|
2010
|
+
* plan pins: R5). Copy-on-truncate (the input records are never
|
|
2011
|
+
* mutated); the additive `noteCharsTruncated` stamp = the truncated-
|
|
2012
|
+
* field count, ABSENT when 0. The resource's untrusted-class field set
|
|
2013
|
+
* is the generated stamp (the SAME plan column the registry's
|
|
2014
|
+
* `metadata.untrustedFields` channel stamps — zero second source of
|
|
2015
|
+
* truth); an absent set = the cap is a no-op for the resource (bit-for-
|
|
2016
|
+
* bit the pre-slice result). */
|
|
2017
|
+
private applyNoteChars;
|
|
2018
|
+
/** The bounded walk loop (shared by the normal `queryBounded` path and the
|
|
2019
|
+
* `latest` modes): walks the vendor cursor until `limit` TOTAL records
|
|
2020
|
+
* are collected or the cursor is exhausted; the 1000-page guard is a
|
|
2021
|
+
* SOFT stop (never a throw). ONE per-walk closure (walks never share
|
|
2022
|
+
* state). */
|
|
2023
|
+
private walkBounded;
|
|
2024
|
+
/** A walk stop is TRUNCATED when the 1000-page guard fired, or the limit
|
|
2025
|
+
* was met with a live next cursor (or a sliced final page): rows exist
|
|
2026
|
+
* past the stop point, and a top-N-by-id over the collected set alone is
|
|
2027
|
+
* unprovable (the `latest` mechanism refuses instead of guessing). */
|
|
2028
|
+
private walkTruncated;
|
|
2029
|
+
/** The 0-item result stamping — the ONE source of truth (the normal walk
|
|
2030
|
+
* and the `latest` empty outcome both ride it): the typed blind-surface
|
|
2031
|
+
* sentinel + the pinned empty-reason, through the filter-aware predicate
|
|
2032
|
+
* `blindStampFor` (`unfiltered-blind` surfaces stamp ONLY the unfiltered
|
|
2033
|
+
* call — a filtered empty result is a true absence; live-verified
|
|
2034
|
+
* S12-B P1: the filtered tickets.query returns data on ww29). Additive:
|
|
2035
|
+
* the walk values are never mutated. The PINNED reason is filter-aware
|
|
2036
|
+
* like the blind stamps (post-verification F1): a FILTERED empty walk on
|
|
2037
|
+
* a pinned surface is a true absence in that filter's scope, never a
|
|
2038
|
+
* tenant-scope claim — the pin states "EMPTY FOR THIS API USER" across
|
|
2039
|
+
* the whole surface, which a filter-scope 0 does not establish (no
|
|
2040
|
+
* speculation). */
|
|
2041
|
+
private stampEmptyQueryResult;
|
|
2042
|
+
/** Issue #59: id comparison honouring the Identifier contract (safe
|
|
2043
|
+
* numbers numerically; exact-digit strings via `BigInt`; mixed
|
|
2044
|
+
* number/string via `BigInt(String(a))`) — ids above 2^53 stay exact. */
|
|
2045
|
+
private compareIds;
|
|
2046
|
+
/** Issue #59: one `latest` threshold count probe — a ROWLESS
|
|
2047
|
+
* `count(F ∧ id gt T)` call (the vendor caps — ≤500 OR-conditions,
|
|
2048
|
+
* 8000 chars serialised — leave a single `gt` condition room on any
|
|
2049
|
+
* filter). The `BlindCountResult` sentinel (a record, not a number —
|
|
2050
|
+
* the declared `number` return is the documented under-type) unwraps to
|
|
2051
|
+
* its `count` value (always 0): at or above the max matching id the
|
|
2052
|
+
* count is 0, which is exactly the bracket-termination signal. */
|
|
2053
|
+
private countAboveId;
|
|
2054
|
+
/**
|
|
2055
|
+
* Issue #59: the `latest: N` mechanism — the N highest-`id` rows,
|
|
2056
|
+
* count-anchored (the vendor has no sort parameter; `id` is the primary
|
|
2057
|
+
* key, so "highest id" is the only order the SDK can prove). Three
|
|
2058
|
+
* branches:
|
|
2059
|
+
* 1. PROBE: `C = count(F)` — ONE rowless count call. A
|
|
2060
|
+
* `BlindCountResult` sentinel (a record, not a number) routes to
|
|
2061
|
+
* branch 3; a plain number to branch 2.
|
|
2062
|
+
* 2. NON-BLIND:
|
|
2063
|
+
* - `C === 0` → the stamped empty (1 wire total — the 0-item stamping
|
|
2064
|
+
* reused; a pinned `emptyReason` where the plan pins one).
|
|
2065
|
+
* - `C <= 2500` → FULL-SET mode: the bounded walk of `F` (limit `C`,
|
|
2066
|
+
* page size min(500, C)) collects the COMPLETE matching set — wire
|
|
2067
|
+
* 1 + ceil(C/500) <= 6, independent of table size. A truncated walk
|
|
2068
|
+
* (the vendor's rows disagree with its own count) is
|
|
2069
|
+
* LATEST_WINDOW_INCOMPLETE — the top-N of a truncated set is
|
|
2070
|
+
* unprovable. Sort id-descending; return the top N (a set of
|
|
2071
|
+
* C < N returns itself).
|
|
2072
|
+
* - `C > 2500` → THRESHOLD mode: find the smallest id threshold `T`
|
|
2073
|
+
* with `count(F ∧ id gt T) <= N` by exponential bracketing
|
|
2074
|
+
* (T = 1, 2, 4, …) + binary search — each probe ONE rowless count
|
|
2075
|
+
* call, the total budget LATEST_MAX_COUNT_PROBES (exhaustion →
|
|
2076
|
+
* LATEST_THRESHOLD_UNRESOLVED; worst case 1 + 2·log2(maxId)). The
|
|
2077
|
+
* window {F ∧ id gte T} holds exactly N+1 rows: `T` is the SMALLEST
|
|
2078
|
+
* threshold with count <= N, so `count(F ∧ id gt (T-1)) > N`, and
|
|
2079
|
+
* `count(gt (T-1)) = count(gt T) + count(eq T)` forces a matching
|
|
2080
|
+
* row with `id == T` (ids are unique primary keys) — every row
|
|
2081
|
+
* outside the window has a lower id, so the N highest of the window
|
|
2082
|
+
* ARE the N highest overall. Final step: ONE bounded walk of the
|
|
2083
|
+
* window (limit N+1, ≤ 6 pages), sort id-descending, take N.
|
|
2084
|
+
* `hasMore: false` — complete FOR THE REQUEST (the table may hold
|
|
2085
|
+
* more rows; `<resource>.count` is the total).
|
|
2086
|
+
* 3. BLIND: the count cannot be trusted (a blind 0 proves nothing) → the
|
|
2087
|
+
* bounded walk of `F` up to `limit` (default 500). A completing walk
|
|
2088
|
+
* (cursor exhausted within the limit) returns the sorted top-N WITH
|
|
2089
|
+
* the blind-surface sentinel stamp — the "highest id" claim is scoped
|
|
2090
|
+
* to the caller-visible enumeration (the one new stamp usage: the
|
|
2091
|
+
* normal path stamps only 0-item results). A truncated walk (the limit
|
|
2092
|
+
* reached with a live next cursor, or the 1000-page guard) →
|
|
2093
|
+
* LATEST_WINDOW_INCOMPLETE — a truncated enumeration's top-N-by-id is
|
|
2094
|
+
* unprovable, so the op refuses instead of returning a possibly-wrong
|
|
2095
|
+
* answer.
|
|
2096
|
+
* `includeFields` always carries `id` (the P1 id-append,
|
|
2097
|
+
* `buildQueryRequest`), which `latest` sorts on. Pure read; no mutation
|
|
2098
|
+
* paths involved.
|
|
2099
|
+
*/
|
|
2100
|
+
private latestWalk;
|
|
2101
|
+
/** The shared `latest` completion: the (provably complete or
|
|
2102
|
+
* stamp-scoped) set sorted id-descending, top N taken. `hasMore: false`
|
|
2103
|
+
* — the result is complete FOR THE REQUEST (the table may hold more
|
|
2104
|
+
* rows; `<resource>.count` is the total). */
|
|
2105
|
+
private finishLatest;
|
|
2106
|
+
/** The blind branch of `latestWalk` (branch 3): the bounded walk of `F`
|
|
2107
|
+
* up to `limit` (default 500) + the id-descending top-N. A completing
|
|
2108
|
+
* walk (cursor exhausted within the limit) is stamped with the
|
|
2109
|
+
* blind-surface sentinel — the "highest id" claim is scoped to the
|
|
2110
|
+
* caller-visible enumeration (the note says exactly that; the one new
|
|
2111
|
+
* stamp usage, the normal path stamps only 0-item results); a truncated
|
|
2112
|
+
* walk is LATEST_WINDOW_INCOMPLETE. */
|
|
2113
|
+
private latestBlindWalk;
|
|
2114
|
+
/** Issue #59: the typed refusal when the id-threshold probe budget is
|
|
2115
|
+
* exhausted — the NEW code is an addition to the served error-code
|
|
2116
|
+
* surface (docs/API.md §2; no new class — the `errorCodes` baseline is
|
|
2117
|
+
* untouched). Zero wire beyond the probes. */
|
|
2118
|
+
private latestThresholdUnresolvedError;
|
|
2119
|
+
/** Issue #59: the typed refusal when a `latest` walk truncates — the NEW
|
|
2120
|
+
* code is an addition to the served error-code surface (docs/API.md
|
|
2121
|
+
* §2). A truncated enumeration's top-N-by-id is unprovable, so the op
|
|
2122
|
+
* refuses instead of returning a possibly-wrong answer. */
|
|
2123
|
+
private latestWindowIncompleteError;
|
|
1779
2124
|
/** `POST /V1.0/<E>/query/count` → `queryCount` unwrapped to a plain number —
|
|
1780
2125
|
* or, on a plan-pinned blind surface, the `{ count: 0, blindSurface }`
|
|
1781
2126
|
* typed sentinel (S12-C T10; see `BlindCountResult`). */
|
|
1782
2127
|
protected countGlobal(params?: QueryParams): Promise<number>;
|
|
1783
|
-
/** Single-record GET through the
|
|
1784
|
-
*
|
|
2128
|
+
/** Single-record GET through the read cache (issue #80: default-on; with
|
|
2129
|
+
* `cache: false` this is exactly one `http.request` — the bit-for-bit
|
|
2130
|
+
* uncached path). Only the successful
|
|
1785
2131
|
* (already redacted) body is stored — errors throw before `set`.
|
|
1786
2132
|
* `fresh` skips the lookup (the read still refreshes the entry for the
|
|
1787
2133
|
* other callers): mutation-path reads (stale-object guard, dry-run diff)
|
|
@@ -1944,22 +2290,25 @@ declare abstract class BaseResource<T = Record<string, unknown>, TCreate = Recor
|
|
|
1944
2290
|
*/
|
|
1945
2291
|
protected deleteScopedModel(parentId: Identifier, id: Identifier): Promise<T>;
|
|
1946
2292
|
/** `GET /V1.0/<E>/entityInformation` → `{ info }` unwrapped.
|
|
1947
|
-
* Goes through the
|
|
1948
|
-
*
|
|
2293
|
+
* Goes through the field cache when it is present (issue #80:
|
|
2294
|
+
* default-on; `fieldCache: false` = the bit-for-bit uncached wire
|
|
2295
|
+
* path). A fresh
|
|
1949
2296
|
* (bypass + refresh) metadata read is the caller's act: drop the
|
|
1950
2297
|
* entity's entries via the fieldCache's `invalidate` first — the trio
|
|
1951
2298
|
* keeps its no-arg surface (the registry/MCP arity pin). */
|
|
1952
2299
|
getEntityInfo(): Promise<EntityInformationModel>;
|
|
1953
2300
|
/** `GET /V1.0/<E>/entityInformation/fields` → `{ fields }` unwrapped.
|
|
1954
|
-
* Goes through the
|
|
1955
|
-
*
|
|
2301
|
+
* Goes through the field cache when it is present (issue #80:
|
|
2302
|
+
* default-on; `fieldCache: false` = the bit-for-bit uncached wire
|
|
2303
|
+
* path). A fresh
|
|
1956
2304
|
* (bypass + refresh) metadata read is the caller's act: drop the
|
|
1957
2305
|
* entity's entries via the fieldCache's `invalidate` first — the trio
|
|
1958
2306
|
* keeps its no-arg surface (the registry/MCP arity pin). */
|
|
1959
2307
|
getFieldInfo(): Promise<FieldInformationModel[]>;
|
|
1960
2308
|
/** `GET /V1.0/<E>/entityInformation/userDefinedFields` → `{ fields }` unwrapped.
|
|
1961
|
-
* Goes through the
|
|
1962
|
-
*
|
|
2309
|
+
* Goes through the field cache when it is present (issue #80:
|
|
2310
|
+
* default-on; `fieldCache: false` = the bit-for-bit uncached wire
|
|
2311
|
+
* path). A fresh
|
|
1963
2312
|
* (bypass + refresh) metadata read is the caller's act: drop the
|
|
1964
2313
|
* entity's entries via the fieldCache's `invalidate` first — the trio
|
|
1965
2314
|
* keeps its no-arg surface (the registry/MCP arity pin). */
|
|
@@ -2087,24 +2436,39 @@ declare abstract class BaseResource<T = Record<string, unknown>, TCreate = Recor
|
|
|
2087
2436
|
* (OR-grouped when the entity covers several), bounded to 2 records —
|
|
2088
2437
|
* 1 → the record (cost `server-filter`), ≥2 → RESOLUTION_AMBIGUOUS with
|
|
2089
2438
|
* the candidate ids;
|
|
2090
|
-
* - zero items
|
|
2091
|
-
*
|
|
2092
|
-
*
|
|
2093
|
-
* (
|
|
2094
|
-
*
|
|
2095
|
-
*
|
|
2096
|
-
*
|
|
2097
|
-
*
|
|
2439
|
+
* - zero items is a COMPLETE non-match (the server filter is
|
|
2440
|
+
* authoritative) → null, cost `server-filter`. `pageDetails.requestCount`
|
|
2441
|
+
* is NOT consulted: the vendor echoes the requested MaxRecords there
|
|
2442
|
+
* (live-verified: 10 on a zero-match page), so it carries no match count;
|
|
2443
|
+
* - only with `resolution.scanOnMiss: true` is a miss re-checked by the
|
|
2444
|
+
* bounded CLIENT SCAN: an unfiltered walk, exact match on the
|
|
2445
|
+
* `searchFields`, capped by the client caps (`maxScanRecords` /
|
|
2446
|
+
* `maxScanPages`). A hit is cost `client-scan`; a completed scan with no
|
|
2447
|
+
* match → null; a cap-tripped scan THROWS RESOLUTION_TRUNCATED — never a
|
|
2448
|
+
* silent null.
|
|
2098
2449
|
* - bare value on an id-only resource → AutotaskConfigError (CONFIG_ERROR).
|
|
2099
2450
|
*/
|
|
2100
2451
|
resolveDetailed(identifier: number | string): Promise<Resolution<T>>;
|
|
2452
|
+
/**
|
|
2453
|
+
* Issue #78: `resolve` with the miss explained. A hit is `{ record, resolutionCost }`
|
|
2454
|
+
* (unchanged). A miss is never a bare `null`: `miss` carries the fields and operator
|
|
2455
|
+
* tried, the blind-surface stamp when the surface is blind, and the next steps.
|
|
2456
|
+
* Thrown outcomes (not found by id, ambiguous, truncated) are unchanged.
|
|
2457
|
+
*/
|
|
2458
|
+
resolveWithDetail(identifier: number | string): Promise<ResolveWithDetail<T>>;
|
|
2459
|
+
/**
|
|
2460
|
+
* Issue #78: `search` with an empty result explained (a bare `[]` reads as complete on a
|
|
2461
|
+
* blind surface). Hits are `{ items }` (unchanged); an empty result adds `miss`.
|
|
2462
|
+
*/
|
|
2463
|
+
searchWithDetail(query: string, opts?: {
|
|
2464
|
+
limit?: number;
|
|
2465
|
+
}): Promise<SearchWithDetail<T>>;
|
|
2466
|
+
/** The shared miss explanation for `resolveWithDetail` / `searchWithDetail`. */
|
|
2467
|
+
private missDetail;
|
|
2101
2468
|
/** The plain value projection of `resolveDetailed` (the `resolve` floor). */
|
|
2102
2469
|
protected resolveBase(identifier: number | string): Promise<T | null>;
|
|
2103
|
-
/**
|
|
2104
|
-
protected queryPage1<TItem>(conditions: FilterCondition[], maxRecords: number): Promise<
|
|
2105
|
-
items: TItem[];
|
|
2106
|
-
requestCount: number;
|
|
2107
|
-
}>;
|
|
2470
|
+
/** The items of one page of the resource's own `/query`. */
|
|
2471
|
+
protected queryPage1<TItem>(conditions: FilterCondition[], maxRecords: number): Promise<TItem[]>;
|
|
2108
2472
|
/**
|
|
2109
2473
|
* The bounded client-scan fallback (section 19.2): an unfiltered walk of
|
|
2110
2474
|
* the resource's own query endpoint, exact match on `fields`, bounded by
|
|
@@ -2229,6 +2593,17 @@ declare class BillingCodesResource extends BaseResource<BillingCode, BillingCode
|
|
|
2229
2593
|
}): Promise<BillingCodeSummary[]>;
|
|
2230
2594
|
}
|
|
2231
2595
|
|
|
2596
|
+
/** The shared window opts shape (`TimeEntriesWindowOptions` is an alias of
|
|
2597
|
+
* this type — `tz` is the issue #66 addition). */
|
|
2598
|
+
interface DateWindowOptions {
|
|
2599
|
+
/** Window anchor (default: now) — tests pin it for determinism. */
|
|
2600
|
+
now?: Date;
|
|
2601
|
+
/** Max records (default 25, clamped to 1..500 — plan bound). */
|
|
2602
|
+
limit?: number;
|
|
2603
|
+
/** IANA timezone (e.g. 'Australia/Sydney') — the window's calendar day/period is computed in that zone's local calendar and converted to UTC for the wire; omitted = UTC (the current behaviour, bit-for-bit). `last24h` is rolling and TZ-invariant (a zone never changes it). */
|
|
2604
|
+
tz?: string;
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2232
2607
|
/**
|
|
2233
2608
|
* BillingItemsResource — BillingItems resource (G5 batch B, plan key 'billing_items').
|
|
2234
2609
|
* GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
|
|
@@ -2267,6 +2642,30 @@ declare class BillingItemsResource extends BaseResource<BillingItems, BillingIte
|
|
|
2267
2642
|
resolve(identifier: number | string, opts?: {
|
|
2268
2643
|
expand?: boolean;
|
|
2269
2644
|
}): Promise<BillingItemsSummary | null>;
|
|
2645
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2646
|
+
customRange(from: string, to: string, opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2647
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2648
|
+
last14(opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2649
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2650
|
+
last24h(opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2651
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2652
|
+
last30(opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2653
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2654
|
+
last7(opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2655
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2656
|
+
last90(opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2657
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2658
|
+
lastFullFortnight(opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2659
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2660
|
+
lastFullMonth(opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2661
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2662
|
+
lastFullQuarter(opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2663
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2664
|
+
lastFullWeek(opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2665
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2666
|
+
today(opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2667
|
+
/** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
|
|
2668
|
+
yesterday(opts?: DateWindowOptions): Promise<BillingItems[]>;
|
|
2270
2669
|
}
|
|
2271
2670
|
|
|
2272
2671
|
/**
|
|
@@ -2456,6 +2855,27 @@ interface CompaniesDomainSearchOptions {
|
|
|
2456
2855
|
/** Max companies to return (default 25, clamped to 1..500). */
|
|
2457
2856
|
limit?: number;
|
|
2458
2857
|
}
|
|
2858
|
+
interface CompanySearchOptions {
|
|
2859
|
+
/** Max companies to return (default 25, clamped to 1..500). */
|
|
2860
|
+
limit?: number;
|
|
2861
|
+
/** Per-match family block: parentID (zero extra wire) + childIDs (one bounded query per match, capped at 50 with a truncation flag) + the blind-surface caveat. */
|
|
2862
|
+
includeFamily?: boolean;
|
|
2863
|
+
}
|
|
2864
|
+
/** The per-match family block (present on EVERY row iff includeFamily: true). */
|
|
2865
|
+
interface CompanyFamily {
|
|
2866
|
+
/** The match's own parentCompanyID (zero extra wire — the field is on the returned row; null when absent). */
|
|
2867
|
+
parentID: number | null;
|
|
2868
|
+
/** The ids of the children the bounded child query returns (vendor `parentCompanyID` eq; capped at {@link COMPANIES_FAMILY_CHILD_CAP}). */
|
|
2869
|
+
childIDs: number[];
|
|
2870
|
+
/** True when the single child page came back FULL (50 rows) with a live `pageDetails.nextPageUrl` (a short page, or a full page with a null cursor, is complete). */
|
|
2871
|
+
childIDsTruncated?: boolean;
|
|
2872
|
+
/** The plan-pinned blind-surface caveat (the family is seen by this API user, never complete). */
|
|
2873
|
+
blindNote: string;
|
|
2874
|
+
}
|
|
2875
|
+
/** A search row: the full Company record (CompanySummary is a structural alias of it) + the family block when includeFamily was set. */
|
|
2876
|
+
interface CompanyFamilyRow extends Company {
|
|
2877
|
+
family?: CompanyFamily;
|
|
2878
|
+
}
|
|
2459
2879
|
interface CompaniesUpsertByNameParams {
|
|
2460
2880
|
/** The company phone (live-required on the ww29 create). */
|
|
2461
2881
|
phone: string;
|
|
@@ -2502,6 +2922,10 @@ interface CompanyFullProfileOptions {
|
|
|
2502
2922
|
ticketLimit?: number;
|
|
2503
2923
|
/** Max project records (default 50). */
|
|
2504
2924
|
projectLimit?: number;
|
|
2925
|
+
/** Opt-in name/label siblings (issue #77; default OFF — the sibling keys are ABSENT, not null, and no name/label resolution runs: zero added wire, byte-identical output). ON: the company row (owner / created-by resource names), the openTickets rows (the same ticket-field siblings as tickets.fullContext) and the projects rows (lead / creator resource names + the contract name — project picklists are OUT of the closed label scope, OQ1) carry the siblings + the top-level `names` section. */
|
|
2926
|
+
names?: boolean;
|
|
2927
|
+
/** May LOWER the composite's name-read budget (default 20 — the count of COLD wire reads issued for name resolution; cache hits are free of the budget). The caller may lower it, never raise it; over-budget ids serve `name: null, capped: true` (never an error). */
|
|
2928
|
+
maxNameReads?: number;
|
|
2505
2929
|
}
|
|
2506
2930
|
/** One capped list part (a full page sets `capped: true` — more may exist). */
|
|
2507
2931
|
interface CompanyFullProfilePart<TItem> {
|
|
@@ -2539,6 +2963,8 @@ interface CompanyFullProfile {
|
|
|
2539
2963
|
notes: CompanyFullProfilePart<CompanyNote>;
|
|
2540
2964
|
openTickets: CompanyFullProfileOpenTickets;
|
|
2541
2965
|
projects: CompanyFullProfilePart<Project>;
|
|
2966
|
+
/** The opt-in name/label section (issue #77) — present EXACTLY when `names: true` (the sibling keys are absent from the rows otherwise). */
|
|
2967
|
+
names?: CompositeNamesSection;
|
|
2542
2968
|
/** Per-part status: 'ok', or `openTickets: 'blind'` when the sentinel stamps. */
|
|
2543
2969
|
parts: {
|
|
2544
2970
|
company: 'ok';
|
|
@@ -2549,12 +2975,116 @@ interface CompanyFullProfile {
|
|
|
2549
2975
|
projects: 'ok';
|
|
2550
2976
|
};
|
|
2551
2977
|
}
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2978
|
+
/** The closed `source` set for `companies.unbilledWork`. */
|
|
2979
|
+
type UnbilledWorkSource = 'posted_uninvoiced' | 'invoice' | 'date_range' | 'tickets';
|
|
2980
|
+
/** Options for `unbilledWork` (closed bag; the pinned defaults). */
|
|
2981
|
+
interface UnbilledWorkOptions {
|
|
2982
|
+
/** Which billing-items population to read (default `'posted_uninvoiced'` = no invoiceID, the uninvoiced mark). */
|
|
2983
|
+
source?: UnbilledWorkSource;
|
|
2984
|
+
/** Include the parent company's data via company.parentCompanyID (default true; ONE level only). */
|
|
2985
|
+
includeParent?: boolean;
|
|
2986
|
+
/** Window start (YYYY-MM-DD) on the billing items' itemDate — applied in EVERY source (required for source 'date_range'). */
|
|
2987
|
+
dateFrom?: string;
|
|
2988
|
+
/** Window end (YYYY-MM-DD) on the billing items' itemDate — applied in EVERY source (required for source 'date_range'). */
|
|
2989
|
+
dateTo?: string;
|
|
2990
|
+
/** The invoice id (required shape when source is 'invoice'). */
|
|
2991
|
+
invoiceId?: Identifier;
|
|
2992
|
+
/** The ticket ids (required non-empty shape when source is 'tickets'). */
|
|
2993
|
+
ticketIds?: Identifier[];
|
|
2994
|
+
/** Request the note fields (time_entries summaryNotes; billing_items description) (default false — notes EXCLUDED). */
|
|
2995
|
+
includeNotes?: boolean;
|
|
2996
|
+
/** Per-field char cap on the note fields (default 400, integer >= 1; applied only when includeNotes is true). */
|
|
2997
|
+
noteChars?: number;
|
|
2998
|
+
/** The rollup mode (default `'ticket'` — per-ticket rows; `'entry'` — the capped per-entry list). */
|
|
2999
|
+
rollup?: 'ticket' | 'entry';
|
|
3000
|
+
/** The per-part record cap (default 50, clamped 1..500 — the fullProfile house clamp). */
|
|
3001
|
+
limit?: number;
|
|
3002
|
+
}
|
|
3003
|
+
/** One capped part (the single-page bounded read's shape + status). */
|
|
3004
|
+
interface UnbilledWorkPart<TItem> {
|
|
3005
|
+
items: TItem[];
|
|
3006
|
+
/** True when the page came back FULL (the cap rows) — more may exist. */
|
|
3007
|
+
capped: boolean;
|
|
3008
|
+
/** The part's hasMore (a live next cursor at the full page). */
|
|
3009
|
+
hasMore: boolean;
|
|
3010
|
+
/** An honest note (the skipped-join-set / truncation / blind-sentinel / true-zero cases). */
|
|
3011
|
+
note?: string;
|
|
3012
|
+
/** The S12-C typed sentinel, present exactly when the filter-aware predicate stamps the empty answer. */
|
|
3013
|
+
blindSurface?: BlindSurfaceInfo;
|
|
3014
|
+
status: 'ok' | 'blind' | 'skipped';
|
|
3015
|
+
}
|
|
3016
|
+
/** One per-ticket rollup row (the `unassigned` bucket carries ticketId null). */
|
|
3017
|
+
interface UnbilledWorkRollupRow {
|
|
3018
|
+
ticketId: number | null;
|
|
3019
|
+
itemCount: number;
|
|
3020
|
+
hours: number;
|
|
3021
|
+
preTax: number;
|
|
3022
|
+
entryCount: number;
|
|
3023
|
+
}
|
|
3024
|
+
/** The rollup part (discriminated by mode). */
|
|
3025
|
+
type UnbilledWorkRollup = {
|
|
3026
|
+
mode: 'ticket';
|
|
3027
|
+
rows: UnbilledWorkRollupRow[];
|
|
3028
|
+
} | {
|
|
3029
|
+
mode: 'entry';
|
|
3030
|
+
items: TimeEntry[];
|
|
3031
|
+
capped: boolean;
|
|
3032
|
+
hasMore: boolean;
|
|
3033
|
+
};
|
|
3034
|
+
/** The headline totals (derived from the folded rows — one source of truth). */
|
|
3035
|
+
interface UnbilledWorkTotals {
|
|
3036
|
+
/** Σ extendedPrice over the billing-items part (the pre-tax extended line). */
|
|
3037
|
+
preTax: number;
|
|
3038
|
+
/** Σ hoursWorked over the time-entries part (the time that actually worked). */
|
|
3039
|
+
hours: number;
|
|
3040
|
+
/** The time-entries part row count. */
|
|
3041
|
+
entryCount: number;
|
|
3042
|
+
/** Σ totalAmount over the billing-items part (surfaced for reconciliation). */
|
|
3043
|
+
totalAmount: number;
|
|
3044
|
+
/** Σ taxDollars over the billing-items part (surfaced for reconciliation). */
|
|
3045
|
+
taxDollars: number;
|
|
3046
|
+
}
|
|
3047
|
+
/** The warnings block (capped lists + the full counts). */
|
|
3048
|
+
interface UnbilledWorkWarnings {
|
|
3049
|
+
/** The billing items whose timeEntryID is empty/0 (list capped at `limit` + the full count). */
|
|
3050
|
+
noTimeEntry: {
|
|
3051
|
+
items: Array<{
|
|
3052
|
+
billingItemId: number;
|
|
3053
|
+
}>;
|
|
3054
|
+
count: number;
|
|
3055
|
+
};
|
|
3056
|
+
/** The billing items WITH a resolvable time entry where |billed quantity − hoursWorked| > 0 (strict; list capped at `limit` + the full count). */
|
|
3057
|
+
hourDelta: {
|
|
3058
|
+
items: Array<{
|
|
3059
|
+
billingItemId: number;
|
|
3060
|
+
timeEntryId: number;
|
|
3061
|
+
billedQuantity: number;
|
|
3062
|
+
entryHours: number;
|
|
3063
|
+
}>;
|
|
3064
|
+
count: number;
|
|
3065
|
+
};
|
|
3066
|
+
}
|
|
3067
|
+
/** The unbilled-work composite result (ONE call, 6(+1) bounded reads). */
|
|
3068
|
+
interface UnbilledWorkResult {
|
|
3069
|
+
company: Company;
|
|
3070
|
+
/** The parent company (null when absent / dangling — includeParent is one level only). */
|
|
3071
|
+
parent: Company | null;
|
|
3072
|
+
billingItems: UnbilledWorkPart<BillingItems>;
|
|
3073
|
+
timeEntries: UnbilledWorkPart<TimeEntry>;
|
|
3074
|
+
rollup: UnbilledWorkRollup;
|
|
3075
|
+
/** The anti-join section: the fetched time entries whose id is in no fetched billing item's timeEntryID (client-side, zero wire). */
|
|
3076
|
+
unposted: UnbilledWorkPart<TimeEntry>;
|
|
3077
|
+
totals: UnbilledWorkTotals;
|
|
3078
|
+
warnings: UnbilledWorkWarnings;
|
|
3079
|
+
/** Per-part status (the typed blind/skipped vocabulary). */
|
|
3080
|
+
parts: {
|
|
3081
|
+
company: 'ok';
|
|
3082
|
+
parent: 'ok' | 'skipped';
|
|
3083
|
+
billingItems: 'ok' | 'blind';
|
|
3084
|
+
timeEntries: 'ok' | 'blind' | 'skipped';
|
|
3085
|
+
unposted: 'ok';
|
|
3086
|
+
};
|
|
3087
|
+
}
|
|
2558
3088
|
|
|
2559
3089
|
/** Query params for CompaniesResource (the G3 filter surface; no per-resource invention). */
|
|
2560
3090
|
type CompaniesResourceQueryParams = QueryParams;
|
|
@@ -2593,10 +3123,18 @@ declare class CompaniesResource extends BaseResource<Company, CompanyCreate, Com
|
|
|
2593
3123
|
expand?: boolean;
|
|
2594
3124
|
}): Promise<CompanySummary | null>;
|
|
2595
3125
|
/** Search Company records: bounded contains on companyName (no vendor free-text search exists);
|
|
2596
|
-
* limit defaults to 25, max 500.
|
|
2597
|
-
|
|
3126
|
+
* limit defaults to 25, max 500. The closed opts bag { limit?, includeFamily? }:
|
|
3127
|
+
* includeFamily: true adds the per-match family block (parentID — zero extra wire —
|
|
3128
|
+
* the record's own parentCompanyID; childIDs — one bounded single-page query per match,
|
|
3129
|
+
* capped at 50 with the childIDsTruncated flag; the blind-surface blindNote — the
|
|
3130
|
+
* family is reported as SEEN BY THIS API USER, never as complete). */
|
|
3131
|
+
search(query: string, opts?: CompanySearchOptions): Promise<CompanyFamilyRow[]>;
|
|
3132
|
+
/** `search` with an empty result explained. Same closed opts discipline as `search`: only `limit` is
|
|
3133
|
+
* accepted here (an unknown key is refused pre-request, zero wire — never silently dropped); the
|
|
3134
|
+
* family block is a `search`-only option. */
|
|
3135
|
+
searchWithDetail(query: string, opts?: {
|
|
2598
3136
|
limit?: number;
|
|
2599
|
-
}): Promise<
|
|
3137
|
+
}): Promise<SearchWithDetail<Company>>;
|
|
2600
3138
|
/** Get the Company with its primary context records in one call (each part a single-record
|
|
2601
3139
|
* fetch; no sub-lists; absent/dangling references come back null). */
|
|
2602
3140
|
getContext(id: Identifier): Promise<CompanyContext>;
|
|
@@ -2614,6 +3152,8 @@ declare class CompaniesResource extends BaseResource<Company, CompanyCreate, Com
|
|
|
2614
3152
|
upsertByName(companyName: string, params: CompaniesUpsertByNameParams, opts?: MutationOpts): Promise<CompaniesUpsertByNameResult | DryRunResult<Record<string, unknown>>>;
|
|
2615
3153
|
/** Node-parity special op (hand-written in src/resources/special/companies.ts). */
|
|
2616
3154
|
fullProfile(id: Identifier, opts?: CompanyFullProfileOptions): Promise<CompanyFullProfile>;
|
|
3155
|
+
/** Node-parity special op (hand-written in src/resources/special/companies.ts). */
|
|
3156
|
+
unbilledWork(id: Identifier, opts?: UnbilledWorkOptions): Promise<UnbilledWorkResult>;
|
|
2617
3157
|
}
|
|
2618
3158
|
|
|
2619
3159
|
/**
|
|
@@ -3132,6 +3672,10 @@ interface ConfigurationItemProfileOptions {
|
|
|
3132
3672
|
noteLimit?: number;
|
|
3133
3673
|
/** Max related-item records (default 50). */
|
|
3134
3674
|
relatedLimit?: number;
|
|
3675
|
+
/** Opt-in name/label siblings (issue #77; default OFF — the sibling keys are ABSENT, not null, and no name/label resolution runs: zero added wire, byte-identical output). ON: the ci row carries the closed-scope sibling (the contract name — the CI row has NO issue-listed picklist fields, so no labels) + the top-level `names` section. */
|
|
3676
|
+
names?: boolean;
|
|
3677
|
+
/** May LOWER the composite's name-read budget (default 20 — the count of COLD wire reads issued for name resolution; cache hits are free of the budget). The caller may lower it, never raise it; over-budget ids serve `name: null, capped: true` (never an error). */
|
|
3678
|
+
maxNameReads?: number;
|
|
3135
3679
|
}
|
|
3136
3680
|
/** One capped list part (a full page sets `capped: true` — more may exist). */
|
|
3137
3681
|
interface ConfigurationItemProfilePart<TItem> {
|
|
@@ -3164,6 +3708,8 @@ interface ConfigurationItemProfile {
|
|
|
3164
3708
|
notes: ConfigurationItemProfilePart<ConfigurationItemNote>;
|
|
3165
3709
|
relatedItems: ConfigurationItemProfilePart<ConfigurationItemRelatedItem>;
|
|
3166
3710
|
productAssociations: ConfigurationItemProfileProductAssociations;
|
|
3711
|
+
/** The opt-in name/label section (issue #77) — present EXACTLY when `names: true` (the sibling keys are absent from the rows otherwise). */
|
|
3712
|
+
names?: CompositeNamesSection;
|
|
3167
3713
|
/** Per-part status: FK parts 'ok' | 'absent' (dangling/missing FK); list parts 'ok'; productAssociations 'ok' | 'blind' (the typed wall annotation). */
|
|
3168
3714
|
parts: {
|
|
3169
3715
|
ci: 'ok';
|
|
@@ -5015,11 +5561,35 @@ declare class InvoicesResource extends BaseResource<Invoice, InvoiceCreate, Invo
|
|
|
5015
5561
|
expand?: boolean;
|
|
5016
5562
|
}): Promise<InvoiceSummary | null>;
|
|
5017
5563
|
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5564
|
+
customRange(from: string, to: string, opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5565
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5566
|
+
last14(opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5567
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5568
|
+
last24h(opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5569
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5570
|
+
last30(opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5571
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5572
|
+
last7(opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5573
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5574
|
+
last90(opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5575
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5576
|
+
lastFullFortnight(opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5577
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5578
|
+
lastFullMonth(opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5579
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5580
|
+
lastFullQuarter(opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5581
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5582
|
+
lastFullWeek(opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5583
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5018
5584
|
markupHtml(id: Identifier): Promise<string>;
|
|
5019
5585
|
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5020
5586
|
markupXml(id: Identifier): Promise<string>;
|
|
5021
5587
|
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5022
5588
|
pdf(id: Identifier): Promise<Buffer>;
|
|
5589
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5590
|
+
today(opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5591
|
+
/** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
|
|
5592
|
+
yesterday(opts?: DateWindowOptions): Promise<Invoice[]>;
|
|
5023
5593
|
}
|
|
5024
5594
|
|
|
5025
5595
|
/**
|
|
@@ -5470,8 +6040,11 @@ declare class ProjectsResource extends BaseResource<Project, ProjectCreate, Proj
|
|
|
5470
6040
|
limit?: number;
|
|
5471
6041
|
}): Promise<ProjectSummary[]>;
|
|
5472
6042
|
/** Get the Project with its primary context records in one call (each part a single-record
|
|
5473
|
-
* fetch; no sub-lists; absent/dangling references come back null).
|
|
5474
|
-
|
|
6043
|
+
* fetch; no sub-lists; absent/dangling references come back null). `names: true` (issue #77)
|
|
6044
|
+
* adds the opt-in name siblings on the project row (creator name, contract name — the
|
|
6045
|
+
* closed scope; project picklists stay label-less) + the top-level `names` section;
|
|
6046
|
+
* `maxNameReads` may lower the name-read budget (default 20), never raise it. */
|
|
6047
|
+
getContext(id: Identifier, opts?: CompositeContextOptions): Promise<ProjectContext>;
|
|
5475
6048
|
}
|
|
5476
6049
|
|
|
5477
6050
|
/**
|
|
@@ -5973,8 +6546,13 @@ declare class ResourcesResource extends BaseResource<Resource, ResourceCreate, R
|
|
|
5973
6546
|
queryAll(params?: ResourcesResourceQueryParams): Promise<Resource[]>;
|
|
5974
6547
|
/** Count matching records (queryCount envelope unwrapped to a plain number). */
|
|
5975
6548
|
count(params?: ResourcesResourceQueryParams): Promise<number>;
|
|
5976
|
-
/** Get one record by id (item envelope; item: null → NotFoundError).
|
|
5977
|
-
|
|
6549
|
+
/** Get one record by id (item envelope; item: null → NotFoundError).
|
|
6550
|
+
* `fresh: true` in the opts bag bypasses AND refreshes the ReadCache entry for this id
|
|
6551
|
+
* (the per-id authority read of operations.expandResourceNames with fresh: true — issue #77);
|
|
6552
|
+
* a plain get is the bit-for-bit cached read. */
|
|
6553
|
+
get(id: Identifier, opts?: {
|
|
6554
|
+
fresh?: boolean;
|
|
6555
|
+
}): Promise<Resource>;
|
|
5978
6556
|
/** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
|
|
5979
6557
|
* keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
|
|
5980
6558
|
* partial body is merged into the CURRENT record first: one fresh GET (which also serves the
|
|
@@ -7623,6 +8201,10 @@ interface TicketFullContextOptions {
|
|
|
7623
8201
|
includeHistories?: boolean;
|
|
7624
8202
|
/** Long note/history text is truncated to this many chars in the served copy and flagged (default 500). */
|
|
7625
8203
|
textLimit?: number;
|
|
8204
|
+
/** Opt-in name/label siblings (issue #77; default OFF — the sibling keys are ABSENT, not null, and no name/label resolution runs: zero added wire, byte-identical output). ON: the ticket row and each time-entry row carry the closed-scope siblings (the ticket picklist labels — status / priority / ticketType / issueType / subIssueType / source / queue — plus the contract / billing-code / role record-FK names and the resource names — creator + the time-entry resource) and the top-level `names` section. */
|
|
8205
|
+
names?: boolean;
|
|
8206
|
+
/** May LOWER the composite's name-read budget (default 20 — the count of COLD wire reads issued for name resolution; cache hits are free of the budget). The caller may lower it, never raise it; over-budget ids serve `name: null, capped: true` (never an error). */
|
|
8207
|
+
maxNameReads?: number;
|
|
7626
8208
|
}
|
|
7627
8209
|
/** One capped list part (a full page sets `capped: true` — more may exist). */
|
|
7628
8210
|
interface TicketFullContextPart<TItem = Record<string, unknown>> {
|
|
@@ -7668,8 +8250,10 @@ interface TicketFullContext {
|
|
|
7668
8250
|
attachments: TicketFullContextAttachments;
|
|
7669
8251
|
/** Present only when `includeHistories: true`. */
|
|
7670
8252
|
histories?: TicketFullContextPart;
|
|
7671
|
-
/** True when ANY part hit its cap (more may exist past the cap). */
|
|
8253
|
+
/** True when ANY part hit its cap (more may exist past the cap) — or any name read hit the name-read budget (issue #77, `names: true`). */
|
|
7672
8254
|
truncated: boolean;
|
|
8255
|
+
/** The opt-in name/label section (issue #77) — present EXACTLY when `names: true` (the sibling keys are absent from the rows otherwise). */
|
|
8256
|
+
names?: CompositeNamesSection;
|
|
7673
8257
|
/** Per-part status: FK parts 'ok' | 'absent' (dangling/missing FK); list parts 'ok' (served by the global /query route — a 0-row filtered query is a legitimate answer), 'ok-scoped' (issue #35: the plan-declared scoped route served the part because the global route 404/500'd in this zone — only where the plan declares a scoped route), or 'miss' (issue #35: every declared route failed; the part serves no items, recorded in the part's routeFacts). */
|
|
7674
8258
|
parts: {
|
|
7675
8259
|
company: 'ok' | 'absent';
|
|
@@ -7821,7 +8405,11 @@ declare class TicketWebhooksResource extends BaseResource<TicketWebhook, TicketW
|
|
|
7821
8405
|
* is ONE bounded server-filtered query on `dateWorked` (gte/lte). The node
|
|
7822
8406
|
* computes the bounds in the configured timezone; the SDK pins UTC (the API
|
|
7823
8407
|
* is UTC — plan metadata) and the second-precision `YYYY-MM-DDTHH:mm:ssZ`
|
|
7824
|
-
* value format the node sends.
|
|
8408
|
+
* value format the node sends. Issue #66 (sub-ask 3) makes the zone
|
|
8409
|
+
* OPT-IN: `opts.tz` (an IANA zone) anchors the window's calendar day/period
|
|
8410
|
+
* in that zone — computed locally and converted to UTC for the wire —
|
|
8411
|
+
* while omitted `tz` keeps the UTC behaviour bit-for-bit (the node-parity
|
|
8412
|
+
* timezone behaviour is now available on demand).
|
|
7825
8413
|
*
|
|
7826
8414
|
* `getPosted`/`getUnposted` keep their names and their documented meaning
|
|
7827
8415
|
* ("posted" / "not posted") and the wire is the specification's own
|
|
@@ -7841,12 +8429,10 @@ declare class TicketWebhooksResource extends BaseResource<TicketWebhook, TicketW
|
|
|
7841
8429
|
* of scope (plan row = server filter).
|
|
7842
8430
|
*/
|
|
7843
8431
|
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
limit?: number;
|
|
7849
|
-
}
|
|
8432
|
+
/** The shared window opts (issue #66: the `DateWindowOptions` shape — `now`,
|
|
8433
|
+
* `limit`, and the `tz` IANA-zone anchor; omitted `tz` = UTC, the current
|
|
8434
|
+
* behaviour bit-for-bit) under its historical name. */
|
|
8435
|
+
type TimeEntriesWindowOptions = DateWindowOptions;
|
|
7850
8436
|
interface TimeEntriesStatusOptions {
|
|
7851
8437
|
/** Max records (default 25, clamped to 1..500 — plan bound). */
|
|
7852
8438
|
limit?: number;
|
|
@@ -7863,6 +8449,8 @@ interface TimeEntriesPostedWindowOptions {
|
|
|
7863
8449
|
ticketID?: number;
|
|
7864
8450
|
/** Optional resourceID eq narrowing. */
|
|
7865
8451
|
resourceID?: number;
|
|
8452
|
+
/** IANA timezone (e.g. 'Australia/Sydney') — the from/to bounds are the LOCAL calendar days in that zone (from-day start / to-day end, converted to UTC for the wire); omitted = UTC days (the current behaviour, bit-for-bit). */
|
|
8453
|
+
tz?: string;
|
|
7866
8454
|
}
|
|
7867
8455
|
/** The posted-window read result (issue #10): the window's items + the two-direction count in one pass. */
|
|
7868
8456
|
interface TimeEntriesPostedWindowResult {
|
|
@@ -7877,6 +8465,8 @@ interface TimeEntriesPostedWindowResult {
|
|
|
7877
8465
|
from: string;
|
|
7878
8466
|
to: string;
|
|
7879
8467
|
};
|
|
8468
|
+
/** True when the vendor reports more matching records than the bounded read returned (a live `pageDetails.nextPageUrl` cursor) — the posted/unposted counts then cover the returned rows ONLY (at most `limit`); re-query with a wider window or a narrowing filter to reconcile the totals. */
|
|
8469
|
+
truncated: boolean;
|
|
7880
8470
|
}
|
|
7881
8471
|
/**
|
|
7882
8472
|
* `createForResource` params. The typed linkage pins + the time window are
|
|
@@ -7991,6 +8581,8 @@ declare class TimeEntriesResource extends BaseResource<TimeEntry, TimeEntryCreat
|
|
|
7991
8581
|
/** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
|
|
7992
8582
|
customRange(from: string, to: string, opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
|
|
7993
8583
|
/** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
|
|
8584
|
+
dateWorkedWindow(from: string, to: string, opts?: TimeEntriesPostedWindowOptions): Promise<TimeEntriesPostedWindowResult>;
|
|
8585
|
+
/** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
|
|
7994
8586
|
getPosted(opts?: TimeEntriesStatusOptions): Promise<TimeEntry[]>;
|
|
7995
8587
|
/** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
|
|
7996
8588
|
getUnposted(opts?: TimeEntriesStatusOptions): Promise<TimeEntry[]>;
|
|
@@ -8151,4 +8743,203 @@ declare class ZoneInformationResource {
|
|
|
8151
8743
|
get(user?: string): Promise<ZoneInformationResultModel>;
|
|
8152
8744
|
}
|
|
8153
8745
|
|
|
8154
|
-
export { CountriesResource as $, type AutotaskConfig as A, BillingCodesResource as B, ChangeRequestLinksResource as C, ContractBillingRulesResource as D, ContractBlockHourFactorsResource as E, ContractBlocksResource as F, ContractChargesResource as G, HttpClient as H, ContractExclusionBillingCodesResource as I, ContractExclusionRolesResource as J, ContractExclusionSetExcludedRolesResource as K, ContractExclusionSetExcludedWorkTypesResource as L, ContractExclusionSetsResource as M, ContractMilestonesResource as N, ContractNotesResource as O, ContractRatesResource as P, ContractRetainersResource as Q, type ResolvedAutotaskConfig as R, ContractRoleCostsResource as S, ContractServiceAdjustmentsResource as T, ContractServiceBundleAdjustmentsResource as U, ContractServiceBundlesResource as V, ContractServiceBundleUnitsResource as W, ContractServicesResource as X, ContractServiceUnitsResource as Y, ContractsResource as Z, ContractTicketPurchasesResource as _, AppointmentsResource as a, TicketChecklistLibrariesResource as a$, DepartmentsResource as a0, DomainRegistrarsResource as a1, EntityInformationResource as a2, ExpenseItemAttachmentsResource as a3, ExpenseItemsResource as a4, ExpenseReportsResource as a5, HolidaySetsResource as a6, HolidaysResource as a7, InventoryProductsResource as a8, InvoicesResource as a9, RolesResource as aA, ServiceCallsResource as aB, ServiceCallTaskResourcesResource as aC, ServiceCallTasksResource as aD, ServiceCallTicketResourcesResource as aE, ServiceCallTicketsResource as aF, ServiceLevelAgreementResultsResource as aG, ServicesResource as aH, SkillsResource as aI, SubscriptionPeriodsResource as aJ, SubscriptionsResource as aK, SurveyResultsResource as aL, SurveysResource as aM, TagAliasesResource as aN, TagGroupsResource as aO, TagsResource as aP, TaskSecondaryResourcesResource as aQ, TasksResource as aR, ThresholdInformationResource as aS, TicketAdditionalConfigurationItemsResource as aT, TicketAdditionalContactsResource as aU, TicketAttachmentsResource as aV, TicketCategoriesResource as aW, TicketCategoryFieldDefaultsResource as aX, TicketChangeRequestApprovalsResource as aY, TicketChargesResource as aZ, TicketChecklistItemsResource as a_, ModulesResource as aa, NotificationHistoryResource as ab, OpportunitiesResource as ac, OpportunityAttachmentsResource as ad, OpportunityCategoriesResource as ae, PhasesResource as af, ProductsResource as ag, ProductVendorsResource as ah, ProjectChargesResource as ai, ProjectNotesResource as aj, ProjectsResource as ak, PurchaseApprovalsResource as al, PurchaseOrderItemReceivingResource as am, PurchaseOrderItemsResource as an, PurchaseOrdersResource as ao, QuoteItemsResource as ap, QuoteLocationsResource as aq, QuotesResource as ar, QuoteTemplatesResource as as, ResourceRoleQueuesResource as at, ResourceRolesResource as au, ResourceSkillsResource as av, ResourcesResource as aw, ResourceTimeOffAdditionalResource as ax, ResourceTimeOffApproversResource as ay, ResourceTimeOffBalancesResource as az, AuthenticateResource as b, type ContractExclusionSetExcludedWorkTypesResourceQueryParams as b$, TicketHistoryResource as b0, TicketNoteAttachmentsResource as b1, TicketNotesResource as b2, TicketNoteWebhooksResource as b3, TicketSecondaryResourcesResource as b4, TicketsResource as b5, TicketWebhooksResource as b6, TimeEntriesResource as b7, TimeEntryAttachmentsResource as b8, TimeOffRequestsResource as b9, type CompanyNotesResourceQueryParams as bA, type CompanySiteConfigurationsResourceQueryParams as bB, type CompanyWebhooksResourceQueryParams as bC, type ConfigProfile as bD, type ConfigurationItemBillingProductAssociationsResourceQueryParams as bE, type ConfigurationItemCategoriesResourceQueryParams as bF, type ConfigurationItemCategoryUdfAssociationsResourceQueryParams as bG, type ConfigurationItemDnsRecordsResourceQueryParams as bH, type ConfigurationItemNotesResourceQueryParams as bI, type ConfigurationItemRelatedItemsResourceQueryParams as bJ, type ConfigurationItemSslSubjectAlternativeNamesResourceQueryParams as bK, type ConfigurationItemTypesResourceQueryParams as bL, type ConfigurationItemWebhooksResourceQueryParams as bM, type ConfigurationItemsResourceQueryParams as bN, ConfirmationRequiredError as bO, ConflictError as bP, type ContactGroupContactsResourceQueryParams as bQ, type ContactGroupsResourceQueryParams as bR, type ContactWebhooksResourceQueryParams as bS, type ContactsResourceQueryParams as bT, type ContractBillingRulesResourceQueryParams as bU, type ContractBlockHourFactorsResourceQueryParams as bV, type ContractBlocksResourceQueryParams as bW, type ContractChargesResourceQueryParams as bX, type ContractExclusionBillingCodesResourceQueryParams as bY, type ContractExclusionRolesResourceQueryParams as bZ, type ContractExclusionSetExcludedRolesResourceQueryParams as b_, VersionInformationResource as ba, VersionResource as bb, ZoneInformationResource as bc, AGENT_PROFILE as bd, type AppointmentsResourceQueryParams as be, AutotaskAbortError as bf, AutotaskConfigError as bg, AutotaskError as bh, type AutotaskErrorOptions as bi, AutotaskNetworkError as bj, AutotaskTimeoutError as bk, BadRequestError as bl, type BillingCodesResourceQueryParams as bm, type BillingItemsResourceQueryParams as bn, CREDENTIAL_HEADER_NAMES as bo, CREDENTIAL_SHAPE_POINTER as bp, type ChangeRequestLinksResourceQueryParams as bq, type ChecklistLibrariesResourceQueryParams as br, type ChecklistLibraryChecklistItemsResourceQueryParams as bs, CircuitBreakerError as bt, type CircuitBreakerState as bu, type CircuitBreakerStore as bv, type ClassificationIconsResourceQueryParams as bw, type CompaniesResourceQueryParams as bx, type CompanyAlertsResourceQueryParams as by, type CompanyLocationsResourceQueryParams as bz, BillingItemsResource as c, type PhasesResourceQueryParams as c$, type ContractExclusionSetsResourceQueryParams as c0, type ContractMilestonesResourceQueryParams as c1, type ContractNotesResourceQueryParams as c2, type ContractRatesResourceQueryParams as c3, type ContractRetainersResourceQueryParams as c4, type ContractRoleCostsResourceQueryParams as c5, type ContractServiceAdjustmentsResourceQueryParams as c6, type ContractServiceBundleAdjustmentsResourceQueryParams as c7, type ContractServiceBundleUnitsResourceQueryParams as c8, type ContractServiceBundlesResourceQueryParams as c9, EmptyResponseError as cA, type ErrorCategory as cB, type ExpenseItemAttachmentsResourceQueryParams as cC, type ExpenseItemsResourceQueryParams as cD, type ExpenseReportsResourceQueryParams as cE, ForbiddenError as cF, type HolidaySetsResourceQueryParams as cG, type HolidaysResourceQueryParams as cH, HostPolicyDeniedError as cI, IDEMPOTENT_METHODS as cJ, InMemoryCircuitBreakerStore as cK, InMemoryCooldownStore as cL, type InventoryProductsResourceQueryParams as cM, type InvoicesResourceQueryParams as cN, type Logger as cO, MAX_PAGES as cP, MAX_PAGE_SIZE as cQ, MarkerUnsafeIdError as cR, NoopLogger as cS, NotFoundError as cT, type NotificationHistoryResourceQueryParams as cU, type OpportunitiesResourceQueryParams as cV, type OpportunityAttachmentsResourceQueryParams as cW, type OpportunityCategoriesResourceQueryParams as cX, type PageFetcher as cY, type PaginateOptions as cZ, PaginationLimitError as c_, type ContractServiceUnitsResourceQueryParams as ca, type ContractServicesResourceQueryParams as cb, type ContractTicketPurchasesResourceQueryParams as cc, type ContractsResourceQueryParams as cd, type CooldownStore as ce, type CountriesResourceQueryParams as cf, type CredentialShapeExpectation as cg, DEFAULT_CIRCUIT_BREAKER_FAILURE_THRESHOLD as ch, DEFAULT_CIRCUIT_BREAKER_MAX_ENTRIES as ci, DEFAULT_CIRCUIT_BREAKER_OPEN_TIMEOUT_MS as cj, DEFAULT_CIRCUIT_BREAKER_SUCCESSES_TO_CLOSE as ck, DEFAULT_CIRCUIT_BREAKER_WINDOW_MS as cl, DEFAULT_COOLDOWN_DEFAULT_MS as cm, DEFAULT_COOLDOWN_MAX_ENTRIES as cn, DEFAULT_COOLDOWN_MAX_MS as co, DEFAULT_MAX_CONCURRENT as cp, DEFAULT_MAX_RESPONSE_BYTES as cq, DEFAULT_MAX_RETRIES as cr, DEFAULT_MAX_SCAN_PAGES as cs, DEFAULT_MAX_SCAN_RECORDS as ct, DEFAULT_PAGE_SIZE as cu, DEFAULT_TIMEOUT_MS as cv, DEFAULT_ZONE as cw, DeleteBoundaryError as cx, type DepartmentsResourceQueryParams as cy, type DomainRegistrarsResourceQueryParams as cz, ChecklistLibrariesResource as d, type TicketsResourceQueryParams as d$, type ProductVendorsResourceQueryParams as d0, type ProductsResourceQueryParams as d1, type ProjectChargesResourceQueryParams as d2, type ProjectNotesResourceQueryParams as d3, type ProjectsResourceQueryParams as d4, type PurchaseApprovalsResourceQueryParams as d5, type PurchaseOrderItemReceivingResourceQueryParams as d6, type PurchaseOrderItemsResourceQueryParams as d7, type PurchaseOrdersResourceQueryParams as d8, QueryTooLongError as d9, type ServicesResourceQueryParams as dA, type SkillsResourceQueryParams as dB, StaleObjectError as dC, type SubscriptionPeriodsResourceQueryParams as dD, type SubscriptionsResourceQueryParams as dE, type SurveyResultsResourceQueryParams as dF, type SurveysResourceQueryParams as dG, type TagAliasesResourceQueryParams as dH, type TagGroupsResourceQueryParams as dI, type TagsResourceQueryParams as dJ, type TaskSecondaryResourcesResourceQueryParams as dK, type TasksResourceQueryParams as dL, type TicketAdditionalConfigurationItemsResourceQueryParams as dM, type TicketAdditionalContactsResourceQueryParams as dN, type TicketAttachmentsResourceQueryParams as dO, type TicketCategoriesResourceQueryParams as dP, type TicketCategoryFieldDefaultsResourceQueryParams as dQ, type TicketChangeRequestApprovalsResourceQueryParams as dR, type TicketChargesResourceQueryParams as dS, type TicketChecklistItemsResourceQueryParams as dT, type TicketChecklistLibrariesResourceQueryParams as dU, type TicketHistoryResourceQueryParams as dV, type TicketNoteAttachmentsResourceQueryParams as dW, type TicketNoteWebhooksResourceQueryParams as dX, type TicketNotesResourceQueryParams as dY, type TicketSecondaryResourcesResourceQueryParams as dZ, type TicketWebhooksResourceQueryParams as d_, type QuoteItemsResourceQueryParams as da, type QuoteLocationsResourceQueryParams as db, type QuoteTemplatesResourceQueryParams as dc, type QuotesResourceQueryParams as dd, REDACTED as de, RateLimitError as df, RecoveryTruncatedError as dg, type RequestOptions as dh, ResolutionError as di, type ResourceRoleQueuesResourceQueryParams as dj, type ResourceRolesResourceQueryParams as dk, type ResourceSkillsResourceQueryParams as dl, type ResourceTimeOffAdditionalResourceQueryParams as dm, type ResourceTimeOffApproversResourceQueryParams as dn, type ResourceTimeOffBalancesResourceQueryParams as dp, type ResourcesResourceQueryParams as dq, ResponseRejectedError as dr, type RolesResourceQueryParams as ds, ServerError as dt, type ServiceCallTaskResourcesResourceQueryParams as du, type ServiceCallTasksResourceQueryParams as dv, type ServiceCallTicketResourcesResourceQueryParams as dw, type ServiceCallTicketsResourceQueryParams as dx, type ServiceCallsResourceQueryParams as dy, type ServiceLevelAgreementResultsResourceQueryParams as dz, ChecklistLibraryChecklistItemsResource as e, type TimeEntriesResourceQueryParams as e0, type TimeEntryAttachmentsResourceQueryParams as e1, type TimeOffRequestsResourceQueryParams as e2, UnauthorizedError as e3, UnexpectedContentTypeError as e4, UnprocessableEntityError as e5, type VendorFieldError as e6, ZONES as e7, ZONE_CATALOG as e8, type ZoneName as e9, runWithSignal as eA, toArray as eB, totalPagesFor as eC, unwrapItem as eD, unwrapItems as eE, unwrapOperation as eF, unwrapQueryCount as eG, zoneUrl as eH, type RelationshipResource as eI, type BlindSurfaceInventory as eJ, type BlindSurfaceRow as eK, type CreateBlockerKind as eL, type CreateGuidanceReport as eM, type FieldCacheKind as eN, FIELD_CACHE_KINDS as eO, buildBreakerKey as ea, buildQueryRequest as eb, buildTenantKey as ec, buildUrl as ed, clampPageSize as ee, collectAll as ef, cooldownDurationMs as eg, cursorToPath as eh, defaultCircuitBreakerStore as ei, defaultCooldownStore as ej, errorFromStatus as ek, formatVendorDetail as el, isAutotaskError as em, isBreakerFailure as en, isCredentialHeaderName as eo, isDeterministicVendor500 as ep, mergeDetails as eq, paginate as er, paginateItems as es, parseVendorErrors as et, passthrough as eu, redactRecord as ev, resetDefaultCircuitBreakerStore as ew, resetDefaultCooldownStore as ex, resolveBaseUrl as ey, resolveConfig as ez, ClassificationIconsResource as f, CompaniesResource as g, CompanyAlertsResource as h, CompanyLocationsResource as i, CompanyNotesResource as j, CompanySiteConfigurationsResource as k, CompanyWebhooksResource as l, ConfigurationItemBillingProductAssociationsResource as m, ConfigurationItemCategoriesResource as n, ConfigurationItemCategoryUdfAssociationsResource as o, ConfigurationItemDnsRecordsResource as p, ConfigurationItemNotesResource as q, ConfigurationItemRelatedItemsResource as r, ConfigurationItemsResource as s, ConfigurationItemSslSubjectAlternativeNamesResource as t, ConfigurationItemTypesResource as u, ConfigurationItemWebhooksResource as v, ContactGroupContactsResource as w, ContactGroupsResource as x, ContactsResource as y, ContactWebhooksResource as z };
|
|
8746
|
+
/**
|
|
8747
|
+
* AutotaskClient — top-level facade (ARCHITECTURE sections 5, 6).
|
|
8748
|
+
*
|
|
8749
|
+
* G3 wires config + transport + auth only; resource accessors (companies,
|
|
8750
|
+
* tickets, ...) land at G4/G5, and the cross-resource `operations` layer at
|
|
8751
|
+
* G6. The constructor validates fail-closed BEFORE anything is wired —
|
|
8752
|
+
* invalid configuration throws `AutotaskConfigError` and construction issues
|
|
8753
|
+
* no request.
|
|
8754
|
+
*/
|
|
8755
|
+
|
|
8756
|
+
declare class AutotaskClient {
|
|
8757
|
+
/** The validated config (resolved defaults; final values). */
|
|
8758
|
+
readonly config: ResolvedAutotaskConfig;
|
|
8759
|
+
/** The transport (shared by every resource; the only fetch site). */
|
|
8760
|
+
readonly http: HttpClient;
|
|
8761
|
+
readonly appointments: AppointmentsResource;
|
|
8762
|
+
readonly authenticateResource: AuthenticateResource;
|
|
8763
|
+
readonly billingCodes: BillingCodesResource;
|
|
8764
|
+
readonly billingItems: BillingItemsResource;
|
|
8765
|
+
readonly changeRequestLinks: ChangeRequestLinksResource;
|
|
8766
|
+
readonly checklistLibraries: ChecklistLibrariesResource;
|
|
8767
|
+
readonly checklistLibraryChecklistItems: ChecklistLibraryChecklistItemsResource;
|
|
8768
|
+
readonly classificationIcons: ClassificationIconsResource;
|
|
8769
|
+
readonly companies: CompaniesResource;
|
|
8770
|
+
readonly companyAlerts: CompanyAlertsResource;
|
|
8771
|
+
readonly companyLocations: CompanyLocationsResource;
|
|
8772
|
+
readonly companyNotes: CompanyNotesResource;
|
|
8773
|
+
readonly companySiteConfigurations: CompanySiteConfigurationsResource;
|
|
8774
|
+
readonly companyWebhooks: CompanyWebhooksResource;
|
|
8775
|
+
readonly configurationItemBillingProductAssociations: ConfigurationItemBillingProductAssociationsResource;
|
|
8776
|
+
readonly configurationItemCategories: ConfigurationItemCategoriesResource;
|
|
8777
|
+
readonly configurationItemCategoryUdfAssociations: ConfigurationItemCategoryUdfAssociationsResource;
|
|
8778
|
+
readonly configurationItemDnsRecords: ConfigurationItemDnsRecordsResource;
|
|
8779
|
+
readonly configurationItemNotes: ConfigurationItemNotesResource;
|
|
8780
|
+
readonly configurationItemRelatedItems: ConfigurationItemRelatedItemsResource;
|
|
8781
|
+
readonly configurationItems: ConfigurationItemsResource;
|
|
8782
|
+
readonly configurationItemSslSubjectAlternativeNames: ConfigurationItemSslSubjectAlternativeNamesResource;
|
|
8783
|
+
readonly configurationItemTypes: ConfigurationItemTypesResource;
|
|
8784
|
+
readonly configurationItemWebhooks: ConfigurationItemWebhooksResource;
|
|
8785
|
+
readonly contactGroupContacts: ContactGroupContactsResource;
|
|
8786
|
+
readonly contactGroups: ContactGroupsResource;
|
|
8787
|
+
readonly contacts: ContactsResource;
|
|
8788
|
+
readonly contactWebhooks: ContactWebhooksResource;
|
|
8789
|
+
readonly contractBillingRules: ContractBillingRulesResource;
|
|
8790
|
+
readonly contractBlockHourFactors: ContractBlockHourFactorsResource;
|
|
8791
|
+
readonly contractBlocks: ContractBlocksResource;
|
|
8792
|
+
readonly contractCharges: ContractChargesResource;
|
|
8793
|
+
readonly contractExclusionBillingCodes: ContractExclusionBillingCodesResource;
|
|
8794
|
+
readonly contractExclusionRoles: ContractExclusionRolesResource;
|
|
8795
|
+
readonly contractExclusionSetExcludedRoles: ContractExclusionSetExcludedRolesResource;
|
|
8796
|
+
readonly contractExclusionSetExcludedWorkTypes: ContractExclusionSetExcludedWorkTypesResource;
|
|
8797
|
+
readonly contractExclusionSets: ContractExclusionSetsResource;
|
|
8798
|
+
readonly contractMilestones: ContractMilestonesResource;
|
|
8799
|
+
readonly contractNotes: ContractNotesResource;
|
|
8800
|
+
readonly contractRates: ContractRatesResource;
|
|
8801
|
+
readonly contractRetainers: ContractRetainersResource;
|
|
8802
|
+
readonly contractRoleCosts: ContractRoleCostsResource;
|
|
8803
|
+
readonly contractServiceAdjustments: ContractServiceAdjustmentsResource;
|
|
8804
|
+
readonly contractServiceBundleAdjustments: ContractServiceBundleAdjustmentsResource;
|
|
8805
|
+
readonly contractServiceBundles: ContractServiceBundlesResource;
|
|
8806
|
+
readonly contractServiceBundleUnits: ContractServiceBundleUnitsResource;
|
|
8807
|
+
readonly contractServices: ContractServicesResource;
|
|
8808
|
+
readonly contractServiceUnits: ContractServiceUnitsResource;
|
|
8809
|
+
readonly contracts: ContractsResource;
|
|
8810
|
+
readonly contractTicketPurchases: ContractTicketPurchasesResource;
|
|
8811
|
+
readonly countries: CountriesResource;
|
|
8812
|
+
readonly departments: DepartmentsResource;
|
|
8813
|
+
readonly domainRegistrars: DomainRegistrarsResource;
|
|
8814
|
+
readonly entityInformation: EntityInformationResource;
|
|
8815
|
+
readonly expenseItemAttachments: ExpenseItemAttachmentsResource;
|
|
8816
|
+
readonly expenseItems: ExpenseItemsResource;
|
|
8817
|
+
readonly expenseReports: ExpenseReportsResource;
|
|
8818
|
+
readonly holidaySets: HolidaySetsResource;
|
|
8819
|
+
readonly holidays: HolidaysResource;
|
|
8820
|
+
readonly inventoryProducts: InventoryProductsResource;
|
|
8821
|
+
readonly invoices: InvoicesResource;
|
|
8822
|
+
readonly modules: ModulesResource;
|
|
8823
|
+
readonly notificationHistory: NotificationHistoryResource;
|
|
8824
|
+
readonly opportunities: OpportunitiesResource;
|
|
8825
|
+
readonly opportunityAttachments: OpportunityAttachmentsResource;
|
|
8826
|
+
readonly opportunityCategories: OpportunityCategoriesResource;
|
|
8827
|
+
readonly phases: PhasesResource;
|
|
8828
|
+
readonly products: ProductsResource;
|
|
8829
|
+
readonly productVendors: ProductVendorsResource;
|
|
8830
|
+
readonly projectCharges: ProjectChargesResource;
|
|
8831
|
+
readonly projectNotes: ProjectNotesResource;
|
|
8832
|
+
readonly projects: ProjectsResource;
|
|
8833
|
+
readonly purchaseApprovals: PurchaseApprovalsResource;
|
|
8834
|
+
readonly purchaseOrderItemReceiving: PurchaseOrderItemReceivingResource;
|
|
8835
|
+
readonly purchaseOrderItems: PurchaseOrderItemsResource;
|
|
8836
|
+
readonly purchaseOrders: PurchaseOrdersResource;
|
|
8837
|
+
readonly quoteItems: QuoteItemsResource;
|
|
8838
|
+
readonly quoteLocations: QuoteLocationsResource;
|
|
8839
|
+
readonly quotes: QuotesResource;
|
|
8840
|
+
readonly quoteTemplates: QuoteTemplatesResource;
|
|
8841
|
+
readonly resourceRoleQueues: ResourceRoleQueuesResource;
|
|
8842
|
+
readonly resourceRoles: ResourceRolesResource;
|
|
8843
|
+
readonly resourceSkills: ResourceSkillsResource;
|
|
8844
|
+
readonly resources: ResourcesResource;
|
|
8845
|
+
readonly resourceTimeOffAdditional: ResourceTimeOffAdditionalResource;
|
|
8846
|
+
readonly resourceTimeOffApprovers: ResourceTimeOffApproversResource;
|
|
8847
|
+
readonly resourceTimeOffBalances: ResourceTimeOffBalancesResource;
|
|
8848
|
+
readonly roles: RolesResource;
|
|
8849
|
+
readonly serviceCalls: ServiceCallsResource;
|
|
8850
|
+
readonly serviceCallTaskResources: ServiceCallTaskResourcesResource;
|
|
8851
|
+
readonly serviceCallTasks: ServiceCallTasksResource;
|
|
8852
|
+
readonly serviceCallTicketResources: ServiceCallTicketResourcesResource;
|
|
8853
|
+
readonly serviceCallTickets: ServiceCallTicketsResource;
|
|
8854
|
+
readonly serviceLevelAgreementResults: ServiceLevelAgreementResultsResource;
|
|
8855
|
+
readonly services: ServicesResource;
|
|
8856
|
+
readonly skills: SkillsResource;
|
|
8857
|
+
readonly subscriptionPeriods: SubscriptionPeriodsResource;
|
|
8858
|
+
readonly subscriptions: SubscriptionsResource;
|
|
8859
|
+
readonly surveyResults: SurveyResultsResource;
|
|
8860
|
+
readonly surveys: SurveysResource;
|
|
8861
|
+
readonly tagAliases: TagAliasesResource;
|
|
8862
|
+
readonly tagGroups: TagGroupsResource;
|
|
8863
|
+
readonly tags: TagsResource;
|
|
8864
|
+
readonly taskSecondaryResources: TaskSecondaryResourcesResource;
|
|
8865
|
+
readonly tasks: TasksResource;
|
|
8866
|
+
readonly thresholdInformation: ThresholdInformationResource;
|
|
8867
|
+
readonly ticketAdditionalConfigurationItems: TicketAdditionalConfigurationItemsResource;
|
|
8868
|
+
readonly ticketAdditionalContacts: TicketAdditionalContactsResource;
|
|
8869
|
+
readonly ticketAttachments: TicketAttachmentsResource;
|
|
8870
|
+
readonly ticketCategories: TicketCategoriesResource;
|
|
8871
|
+
readonly ticketCategoryFieldDefaults: TicketCategoryFieldDefaultsResource;
|
|
8872
|
+
readonly ticketChangeRequestApprovals: TicketChangeRequestApprovalsResource;
|
|
8873
|
+
readonly ticketCharges: TicketChargesResource;
|
|
8874
|
+
readonly ticketChecklistItems: TicketChecklistItemsResource;
|
|
8875
|
+
readonly ticketChecklistLibraries: TicketChecklistLibrariesResource;
|
|
8876
|
+
readonly ticketHistory: TicketHistoryResource;
|
|
8877
|
+
readonly ticketNoteAttachments: TicketNoteAttachmentsResource;
|
|
8878
|
+
readonly ticketNotes: TicketNotesResource;
|
|
8879
|
+
readonly ticketNoteWebhooks: TicketNoteWebhooksResource;
|
|
8880
|
+
readonly ticketSecondaryResources: TicketSecondaryResourcesResource;
|
|
8881
|
+
readonly tickets: TicketsResource;
|
|
8882
|
+
readonly ticketWebhooks: TicketWebhooksResource;
|
|
8883
|
+
readonly timeEntries: TimeEntriesResource;
|
|
8884
|
+
readonly timeEntryAttachments: TimeEntryAttachmentsResource;
|
|
8885
|
+
readonly timeOffRequests: TimeOffRequestsResource;
|
|
8886
|
+
readonly versionInformation: VersionInformationResource;
|
|
8887
|
+
readonly version: VersionResource;
|
|
8888
|
+
readonly zoneInformation: ZoneInformationResource;
|
|
8889
|
+
/**
|
|
8890
|
+
* Fail-closed: invalid configuration throws `AutotaskConfigError` before
|
|
8891
|
+
* anything is wired. Construction issues NO request.
|
|
8892
|
+
*/
|
|
8893
|
+
constructor(options: AutotaskConfig);
|
|
8894
|
+
/**
|
|
8895
|
+
* `GET /V1.0/Authenticate` → `AuthTokenResultModel` (as-is). The SDK does
|
|
8896
|
+
* NOT store, refresh, or send the token automatically — it is a
|
|
8897
|
+
* probe/alternative for integrations that front the API with a
|
|
8898
|
+
* token-accepting layer. The default transport always uses the 3-header
|
|
8899
|
+
* scheme.
|
|
8900
|
+
*/
|
|
8901
|
+
authenticate(): Promise<AuthTokenResultModel>;
|
|
8902
|
+
/**
|
|
8903
|
+
* The client-side hourly budget state (issue #4) — the LOCAL count only:
|
|
8904
|
+
* `{ perHour, used, remaining }`, or `undefined` when `rateLimit.perHour`
|
|
8905
|
+
* is off. The limiter is per process and cannot see other instances or
|
|
8906
|
+
* integrations on the tenant; the tenant-wide count is
|
|
8907
|
+
* `client.thresholdInformation.get()`.
|
|
8908
|
+
*/
|
|
8909
|
+
hourlyBudget(): {
|
|
8910
|
+
perHour: number;
|
|
8911
|
+
used: number;
|
|
8912
|
+
remaining: number;
|
|
8913
|
+
} | undefined;
|
|
8914
|
+
/**
|
|
8915
|
+
* Run `fn` with `signal` cancelling every SDK request it starts, retry
|
|
8916
|
+
* waits included (aborting throws `AutotaskAbortError`, code `ABORTED`, never
|
|
8917
|
+
* retried). The way a host propagates request cancellation (an MCP handler's
|
|
8918
|
+
* `extra.signal`) through `invoke` or any resource method without a signal
|
|
8919
|
+
* parameter on each: `await client.withSignal(signal, () => invoke(client, ...))`.
|
|
8920
|
+
*/
|
|
8921
|
+
withSignal<T>(signal: AbortSignal, fn: () => Promise<T>): Promise<T>;
|
|
8922
|
+
/**
|
|
8923
|
+
* Bounded-parallel bulk helper (ARCHITECTURE section 10, `concurrency`):
|
|
8924
|
+
* runs `fn` over `items` with at most `opts.concurrency` in flight
|
|
8925
|
+
* (default: this client's `maxConcurrent`). Results are in INPUT order. A
|
|
8926
|
+
* rejection stops new items from starting and rejects the batch with the
|
|
8927
|
+
* first error once the in-flight items settle. `opts.signal` stops new items
|
|
8928
|
+
* from starting once aborted (the batch then rejects with the abort reason)
|
|
8929
|
+
* and cancels the SDK requests `fn` has in flight (via `withSignal`). `opts.settle: true` runs every item and
|
|
8930
|
+
* resolves to per-item `{ status: 'fulfilled', value } | { status:
|
|
8931
|
+
* 'rejected', reason }` results instead of rejecting.
|
|
8932
|
+
*/
|
|
8933
|
+
batch<T, R>(fn: (item: T) => Promise<R>, items: readonly T[], opts?: {
|
|
8934
|
+
concurrency?: number;
|
|
8935
|
+
signal?: AbortSignal;
|
|
8936
|
+
settle?: false;
|
|
8937
|
+
}): Promise<R[]>;
|
|
8938
|
+
batch<T, R>(fn: (item: T) => Promise<R>, items: readonly T[], opts: {
|
|
8939
|
+
concurrency?: number;
|
|
8940
|
+
signal?: AbortSignal;
|
|
8941
|
+
settle: true;
|
|
8942
|
+
}): Promise<PromiseSettledResult<R>[]>;
|
|
8943
|
+
}
|
|
8944
|
+
|
|
8945
|
+
export { ConfigurationItemRelatedItemsResource as $, type AutotaskConfig as A, BadRequestError as B, CREDENTIAL_HEADER_NAMES as C, type ClassificationIconsResourceQueryParams as D, CompaniesResource as E, type CompaniesResourceQueryParams as F, CompanyAlertsResource as G, type CompanyAlertsResourceQueryParams as H, CompanyLocationsResource as I, type CompanyLocationsResourceQueryParams as J, CompanyNotesResource as K, type CompanyNotesResourceQueryParams as L, CompanySiteConfigurationsResource as M, type CompanySiteConfigurationsResourceQueryParams as N, CompanyWebhooksResource as O, type CompanyWebhooksResourceQueryParams as P, type ConfigProfile as Q, ConfigurationItemBillingProductAssociationsResource as R, type ConfigurationItemBillingProductAssociationsResourceQueryParams as S, ConfigurationItemCategoriesResource as T, type ConfigurationItemCategoriesResourceQueryParams as U, ConfigurationItemCategoryUdfAssociationsResource as V, type ConfigurationItemCategoryUdfAssociationsResourceQueryParams as W, ConfigurationItemDnsRecordsResource as X, type ConfigurationItemDnsRecordsResourceQueryParams as Y, ConfigurationItemNotesResource as Z, type ConfigurationItemNotesResourceQueryParams as _, AutotaskClient as a, type CooldownStore as a$, type ConfigurationItemRelatedItemsResourceQueryParams as a0, ConfigurationItemSslSubjectAlternativeNamesResource as a1, type ConfigurationItemSslSubjectAlternativeNamesResourceQueryParams as a2, ConfigurationItemTypesResource as a3, type ConfigurationItemTypesResourceQueryParams as a4, ConfigurationItemWebhooksResource as a5, type ConfigurationItemWebhooksResourceQueryParams as a6, ConfigurationItemsResource as a7, type ConfigurationItemsResourceQueryParams as a8, ConfirmationRequiredError as a9, type ContractExclusionSetsResourceQueryParams as aA, ContractMilestonesResource as aB, type ContractMilestonesResourceQueryParams as aC, ContractNotesResource as aD, type ContractNotesResourceQueryParams as aE, ContractRatesResource as aF, type ContractRatesResourceQueryParams as aG, ContractRetainersResource as aH, type ContractRetainersResourceQueryParams as aI, ContractRoleCostsResource as aJ, type ContractRoleCostsResourceQueryParams as aK, ContractServiceAdjustmentsResource as aL, type ContractServiceAdjustmentsResourceQueryParams as aM, ContractServiceBundleAdjustmentsResource as aN, type ContractServiceBundleAdjustmentsResourceQueryParams as aO, ContractServiceBundleUnitsResource as aP, type ContractServiceBundleUnitsResourceQueryParams as aQ, ContractServiceBundlesResource as aR, type ContractServiceBundlesResourceQueryParams as aS, ContractServiceUnitsResource as aT, type ContractServiceUnitsResourceQueryParams as aU, ContractServicesResource as aV, type ContractServicesResourceQueryParams as aW, ContractTicketPurchasesResource as aX, type ContractTicketPurchasesResourceQueryParams as aY, ContractsResource as aZ, type ContractsResourceQueryParams as a_, ConflictError as aa, ContactGroupContactsResource as ab, type ContactGroupContactsResourceQueryParams as ac, ContactGroupsResource as ad, type ContactGroupsResourceQueryParams as ae, ContactWebhooksResource as af, type ContactWebhooksResourceQueryParams as ag, ContactsResource as ah, type ContactsResourceQueryParams as ai, ContractBillingRulesResource as aj, type ContractBillingRulesResourceQueryParams as ak, ContractBlockHourFactorsResource as al, type ContractBlockHourFactorsResourceQueryParams as am, ContractBlocksResource as an, type ContractBlocksResourceQueryParams as ao, ContractChargesResource as ap, type ContractChargesResourceQueryParams as aq, ContractExclusionBillingCodesResource as ar, type ContractExclusionBillingCodesResourceQueryParams as as, ContractExclusionRolesResource as at, type ContractExclusionRolesResourceQueryParams as au, ContractExclusionSetExcludedRolesResource as av, type ContractExclusionSetExcludedRolesResourceQueryParams as aw, ContractExclusionSetExcludedWorkTypesResource as ax, type ContractExclusionSetExcludedWorkTypesResourceQueryParams as ay, ContractExclusionSetsResource as az, AGENT_PROFILE as b, OpportunityCategoriesResource as b$, CountriesResource as b0, type CountriesResourceQueryParams as b1, type CredentialShapeExpectation as b2, DEFAULT_CIRCUIT_BREAKER_FAILURE_THRESHOLD as b3, DEFAULT_CIRCUIT_BREAKER_MAX_ENTRIES as b4, DEFAULT_CIRCUIT_BREAKER_OPEN_TIMEOUT_MS as b5, DEFAULT_CIRCUIT_BREAKER_SUCCESSES_TO_CLOSE as b6, DEFAULT_CIRCUIT_BREAKER_WINDOW_MS as b7, DEFAULT_COOLDOWN_DEFAULT_MS as b8, DEFAULT_COOLDOWN_MAX_ENTRIES as b9, ForbiddenError as bA, HolidaySetsResource as bB, type HolidaySetsResourceQueryParams as bC, HolidaysResource as bD, type HolidaysResourceQueryParams as bE, HostPolicyDeniedError as bF, HttpClient as bG, IDEMPOTENT_METHODS as bH, InMemoryCircuitBreakerStore as bI, InMemoryCooldownStore as bJ, InventoryProductsResource as bK, type InventoryProductsResourceQueryParams as bL, InvoicesResource as bM, type InvoicesResourceQueryParams as bN, type Logger as bO, MAX_PAGES as bP, MAX_PAGE_SIZE as bQ, MarkerUnsafeIdError as bR, ModulesResource as bS, NoopLogger as bT, NotFoundError as bU, NotificationHistoryResource as bV, type NotificationHistoryResourceQueryParams as bW, OpportunitiesResource as bX, type OpportunitiesResourceQueryParams as bY, OpportunityAttachmentsResource as bZ, type OpportunityAttachmentsResourceQueryParams as b_, DEFAULT_COOLDOWN_MAX_MS as ba, DEFAULT_FIELD_CACHE_TTL_MS as bb, DEFAULT_MAX_CONCURRENT as bc, DEFAULT_MAX_RESPONSE_BYTES as bd, DEFAULT_MAX_RETRIES as be, DEFAULT_MAX_SCAN_PAGES as bf, DEFAULT_MAX_SCAN_RECORDS as bg, DEFAULT_PAGE_SIZE as bh, DEFAULT_READ_CACHE_TTL_MS as bi, DEFAULT_RESOURCE_NAME_CACHE_TTL_MS as bj, DEFAULT_TIMEOUT_MS as bk, DEFAULT_ZONE as bl, DeleteBoundaryError as bm, DepartmentsResource as bn, type DepartmentsResourceQueryParams as bo, DomainRegistrarsResource as bp, type DomainRegistrarsResourceQueryParams as bq, EmptyResponseError as br, EntityInformationResource as bs, type ErrorCategory as bt, ExpenseItemAttachmentsResource as bu, type ExpenseItemAttachmentsResourceQueryParams as bv, ExpenseItemsResource as bw, type ExpenseItemsResourceQueryParams as bx, ExpenseReportsResource as by, type ExpenseReportsResourceQueryParams as bz, AppointmentsResource as c, ServiceCallTicketsResource as c$, type OpportunityCategoriesResourceQueryParams as c0, type PageFetcher as c1, type PaginateOptions as c2, PaginationLimitError as c3, PhasesResource as c4, type PhasesResourceQueryParams as c5, ProductVendorsResource as c6, type ProductVendorsResourceQueryParams as c7, ProductsResource as c8, type ProductsResourceQueryParams as c9, type RequestOptions as cA, ResolutionError as cB, type ResolvedAutotaskConfig as cC, ResourceRoleQueuesResource as cD, type ResourceRoleQueuesResourceQueryParams as cE, ResourceRolesResource as cF, type ResourceRolesResourceQueryParams as cG, ResourceSkillsResource as cH, type ResourceSkillsResourceQueryParams as cI, ResourceTimeOffAdditionalResource as cJ, type ResourceTimeOffAdditionalResourceQueryParams as cK, ResourceTimeOffApproversResource as cL, type ResourceTimeOffApproversResourceQueryParams as cM, ResourceTimeOffBalancesResource as cN, type ResourceTimeOffBalancesResourceQueryParams as cO, ResourcesResource as cP, type ResourcesResourceQueryParams as cQ, ResponseRejectedError as cR, RolesResource as cS, type RolesResourceQueryParams as cT, ServerError as cU, ServiceCallTaskResourcesResource as cV, type ServiceCallTaskResourcesResourceQueryParams as cW, ServiceCallTasksResource as cX, type ServiceCallTasksResourceQueryParams as cY, ServiceCallTicketResourcesResource as cZ, type ServiceCallTicketResourcesResourceQueryParams as c_, ProjectChargesResource as ca, type ProjectChargesResourceQueryParams as cb, ProjectNotesResource as cc, type ProjectNotesResourceQueryParams as cd, ProjectsResource as ce, type ProjectsResourceQueryParams as cf, PurchaseApprovalsResource as cg, type PurchaseApprovalsResourceQueryParams as ch, PurchaseOrderItemReceivingResource as ci, type PurchaseOrderItemReceivingResourceQueryParams as cj, PurchaseOrderItemsResource as ck, type PurchaseOrderItemsResourceQueryParams as cl, PurchaseOrdersResource as cm, type PurchaseOrdersResourceQueryParams as cn, QueryTooLongError as co, QuoteItemsResource as cp, type QuoteItemsResourceQueryParams as cq, QuoteLocationsResource as cr, type QuoteLocationsResourceQueryParams as cs, QuoteTemplatesResource as ct, type QuoteTemplatesResourceQueryParams as cu, QuotesResource as cv, type QuotesResourceQueryParams as cw, REDACTED as cx, RateLimitError as cy, RecoveryTruncatedError as cz, type AppointmentsResourceQueryParams as d, type TimeEntriesResourceQueryParams as d$, type ServiceCallTicketsResourceQueryParams as d0, ServiceCallsResource as d1, type ServiceCallsResourceQueryParams as d2, ServiceLevelAgreementResultsResource as d3, type ServiceLevelAgreementResultsResourceQueryParams as d4, ServicesResource as d5, type ServicesResourceQueryParams as d6, SkillsResource as d7, type SkillsResourceQueryParams as d8, StaleObjectError as d9, TicketCategoriesResource as dA, type TicketCategoriesResourceQueryParams as dB, TicketCategoryFieldDefaultsResource as dC, type TicketCategoryFieldDefaultsResourceQueryParams as dD, TicketChangeRequestApprovalsResource as dE, type TicketChangeRequestApprovalsResourceQueryParams as dF, TicketChargesResource as dG, type TicketChargesResourceQueryParams as dH, TicketChecklistItemsResource as dI, type TicketChecklistItemsResourceQueryParams as dJ, TicketChecklistLibrariesResource as dK, type TicketChecklistLibrariesResourceQueryParams as dL, TicketHistoryResource as dM, type TicketHistoryResourceQueryParams as dN, TicketNoteAttachmentsResource as dO, type TicketNoteAttachmentsResourceQueryParams as dP, TicketNoteWebhooksResource as dQ, type TicketNoteWebhooksResourceQueryParams as dR, TicketNotesResource as dS, type TicketNotesResourceQueryParams as dT, TicketSecondaryResourcesResource as dU, type TicketSecondaryResourcesResourceQueryParams as dV, TicketWebhooksResource as dW, type TicketWebhooksResourceQueryParams as dX, TicketsResource as dY, type TicketsResourceQueryParams as dZ, TimeEntriesResource as d_, SubscriptionPeriodsResource as da, type SubscriptionPeriodsResourceQueryParams as db, SubscriptionsResource as dc, type SubscriptionsResourceQueryParams as dd, SurveyResultsResource as de, type SurveyResultsResourceQueryParams as df, SurveysResource as dg, type SurveysResourceQueryParams as dh, TagAliasesResource as di, type TagAliasesResourceQueryParams as dj, TagGroupsResource as dk, type TagGroupsResourceQueryParams as dl, TagsResource as dm, type TagsResourceQueryParams as dn, TaskSecondaryResourcesResource as dp, type TaskSecondaryResourcesResourceQueryParams as dq, TasksResource as dr, type TasksResourceQueryParams as ds, ThresholdInformationResource as dt, TicketAdditionalConfigurationItemsResource as du, type TicketAdditionalConfigurationItemsResourceQueryParams as dv, TicketAdditionalContactsResource as dw, type TicketAdditionalContactsResourceQueryParams as dx, TicketAttachmentsResource as dy, type TicketAttachmentsResourceQueryParams as dz, AuthenticateResource as e, TimeEntryAttachmentsResource as e0, type TimeEntryAttachmentsResourceQueryParams as e1, TimeOffRequestsResource as e2, type TimeOffRequestsResourceQueryParams as e3, UnauthorizedError as e4, UnexpectedContentTypeError as e5, UnprocessableEntityError as e6, type VendorFieldError as e7, VersionInformationResource as e8, VersionResource as e9, resetDefaultCircuitBreakerStore as eA, resetDefaultCooldownStore as eB, resolveBaseUrl as eC, resolveConfig as eD, resolveCredentials as eE, runWithSignal as eF, toArray as eG, totalPagesFor as eH, unwrapItem as eI, unwrapItems as eJ, unwrapOperation as eK, unwrapQueryCount as eL, zoneUrl as eM, type BlindSurfaceInfo as eN, type RelationshipResource as eO, type BlindSurfaceInventory as eP, type BlindSurfaceRow as eQ, type CreateBlockerKind as eR, type CreateGuidanceReport as eS, type FieldCacheKind as eT, FIELD_CACHE_KINDS as eU, ZONES as ea, ZONE_CATALOG as eb, ZoneInformationResource as ec, type ZoneName as ed, buildBreakerKey as ee, buildQueryRequest as ef, buildTenantKey as eg, buildUrl as eh, clampPageSize as ei, collectAll as ej, cooldownDurationMs as ek, cursorToPath as el, defaultCircuitBreakerStore as em, defaultCooldownStore as en, errorFromStatus as eo, formatVendorDetail as ep, isAutotaskError as eq, isBreakerFailure as er, isCredentialHeaderName as es, isDeterministicVendor500 as et, mergeDetails as eu, paginate as ev, paginateItems as ew, parseVendorErrors as ex, passthrough as ey, redactRecord as ez, AutotaskAbortError as f, AutotaskConfigError as g, AutotaskError as h, type AutotaskErrorOptions as i, AutotaskNetworkError as j, AutotaskTimeoutError as k, BillingCodesResource as l, type BillingCodesResourceQueryParams as m, BillingItemsResource as n, type BillingItemsResourceQueryParams as o, CREDENTIAL_SHAPE_POINTER as p, ChangeRequestLinksResource as q, type ChangeRequestLinksResourceQueryParams as r, ChecklistLibrariesResource as s, type ChecklistLibrariesResourceQueryParams as t, ChecklistLibraryChecklistItemsResource as u, type ChecklistLibraryChecklistItemsResourceQueryParams as v, CircuitBreakerError as w, type CircuitBreakerState as x, type CircuitBreakerStore as y, ClassificationIconsResource as z };
|