node-autotask 0.44.0 → 0.45.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/MCP_TOOL_CATALOG.json +153 -1269
  3. package/MCP_TOOL_MANIFEST.md +28 -95
  4. package/MCP_TOOL_OVERRIDES.json +8 -62
  5. package/N8N_MCP_MANIFEST.json +118 -695
  6. package/N8N_MCP_MANIFEST.md +32 -52
  7. package/README.md +5 -10
  8. package/capabilities.json +23788 -31075
  9. package/dist/{base-CftidiyZ.d.cts → base-BVoYDlVA.d.cts} +2 -2
  10. package/dist/{base-CftidiyZ.d.ts → base-BVoYDlVA.d.ts} +2 -2
  11. package/dist/capabilities.cjs +2 -2
  12. package/dist/capabilities.js +1 -1
  13. package/dist/{chunk-N6IWPGHB.js → chunk-ASMCTZO2.js} +23787 -31074
  14. package/dist/{chunk-6WLGHKIU.cjs → chunk-DC3PY4EF.cjs} +1839 -1407
  15. package/dist/{chunk-BKTOMNT2.js → chunk-DXKXQHCX.js} +5 -5
  16. package/dist/{chunk-KWQSGWY5.cjs → chunk-JO6WI763.cjs} +143 -143
  17. package/dist/{chunk-LYI5FRPX.js → chunk-NSW7JPVS.js} +11544 -13365
  18. package/dist/{chunk-7MCKJTSA.js → chunk-O4PIPUS4.js} +1583 -1151
  19. package/dist/{chunk-PH3ESYAF.cjs → chunk-VXVYFJH3.cjs} +23787 -31074
  20. package/dist/{chunk-EMYDC5SG.cjs → chunk-YMBVKVK4.cjs} +6123 -7944
  21. package/dist/{index-YbEk0awP.d.cts → index-C5g1H_hF.d.ts} +1194 -1415
  22. package/dist/{index-D8FtzUGP.d.ts → index-Db0SNnQn.d.cts} +1194 -1415
  23. package/dist/{index-DgBA1JMH.d.cts → index-c549LvOb.d.cts} +188 -188
  24. package/dist/{index-DgBA1JMH.d.ts → index-c549LvOb.d.ts} +188 -188
  25. package/dist/index.cjs +22 -22
  26. package/dist/index.d.cts +15 -42
  27. package/dist/index.d.ts +15 -42
  28. package/dist/index.js +7 -7
  29. package/dist/operations/index.cjs +5 -2327
  30. package/dist/operations/index.d.cts +7 -287
  31. package/dist/operations/index.d.ts +7 -287
  32. package/dist/operations/index.js +29 -2351
  33. package/dist/pool.cjs +8 -8
  34. package/dist/pool.d.cts +1 -1
  35. package/dist/pool.d.ts +1 -1
  36. package/dist/pool.js +4 -4
  37. package/dist/resources/index.cjs +4 -4
  38. package/dist/resources/index.d.cts +2 -2
  39. package/dist/resources/index.d.ts +2 -2
  40. package/dist/resources/index.js +7 -7
  41. package/dist/types/index.d.cts +1 -1
  42. package/dist/types/index.d.ts +1 -1
  43. package/docs/API.md +201 -303
  44. package/docs/LIVE-TESTING.md +4 -6
  45. package/docs/N8N-ADAPTER.md +26 -26
  46. package/n8n-mcp.curation.json +3 -3
  47. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { q as AuditEvent, e$ as ResolutionCaps, I as Identifier, e0 as OrganizationalLevelAssociation, dY as OrganizationalLevel2, dU as OrganizationalLevel1, Q as QueryParams, cX as EmptyReasonInfo, e_ as Resolution, e4 as Page, cZ as EntityInformationModel, dc as FieldInformationModel, da as Field, a as FilterCondition, O as OperationResult, cW as DryRunResult, m as Appointment, n as AppointmentCreate, p as AppointmentUpdate, o as AppointmentSummary, r as AuthTokenResultModel, B as BillingCode, t as BillingCodeCreate, v as BillingCodeUpdate, u as BillingCodeSummary, w as BillingItemApprovalLevel, x as BillingItemApprovalLevelCreate, z as BillingItemApprovalLevelUpdate, D as BillingItems, G as BillingItemsCreate, K as BillingItemsUpdate, J as BillingItemsSummary, C as ChangeRequestLink, L as ChangeRequestLinkCreate, N as ChangeRequestLinkUpdate, M as ChangeRequestLinkSummary, R as ChecklistLibrary, X as ChecklistLibraryCreate, Z as ChecklistLibraryUpdate, Y as ChecklistLibrarySummary, S as ChecklistLibraryChecklistItem, U as ChecklistLibraryChecklistItemCreate, W as ChecklistLibraryChecklistItemUpdate, V as ChecklistLibraryChecklistItemSummary, _ as ClassificationIcon, $ as ClassificationIconCreate, a1 as ClassificationIconUpdate, a0 as ClassificationIconSummary, a2 as Company, a9 as CompanyLocation, b3 as Contact, ad as CompanyNote, gJ as Ticket, ei as Project, hW as CompositeNamesSection, l as TimeEntry, a8 as CompanyCreate, am as CompanyUpdate, al as CompanySummary, a7 as CompanyContext, a3 as CompanyAlert, a4 as CompanyAlertCreate, a6 as CompanyAlertUpdate, a5 as CompanyAlertSummary, aa as CompanyLocationCreate, ac as CompanyLocationUpdate, ab as CompanyLocationSummary, ae as CompanyNoteCreate, ag as CompanyNoteUpdate, af as CompanyNoteSummary, ah as CompanySiteConfigurations, ai as CompanySiteConfigurationsCreate, ak as CompanySiteConfigurationsUpdate, aj as CompanySiteConfigurationsSummary, an as CompanyWebhook, ao as CompanyWebhookCreate, aq as CompanyWebhookUpdate, ap as CompanyWebhookSummary, ar as ConfigurationItemBillingProductAssociations, as as ConfigurationItemBillingProductAssociationsCreate, au as ConfigurationItemBillingProductAssociationsUpdate, at as ConfigurationItemBillingProductAssociationsSummary, av as ConfigurationItemCategory, aw as ConfigurationItemCategoryCreate, aC as ConfigurationItemCategoryUpdate, ax as ConfigurationItemCategorySummary, ay as ConfigurationItemCategoryUdfAssociation, az as ConfigurationItemCategoryUdfAssociationCreate, aB as ConfigurationItemCategoryUdfAssociationUpdate, aA as ConfigurationItemCategoryUdfAssociationSummary, aF as ConfigurationItemDnsRecord, aG as ConfigurationItemDnsRecordCreate, aI as ConfigurationItemDnsRecordUpdate, aH as ConfigurationItemDnsRecordSummary, aJ as ConfigurationItemNote, aK as ConfigurationItemNoteCreate, aM as ConfigurationItemNoteUpdate, aL as ConfigurationItemNoteSummary, aN as ConfigurationItemRelatedItem, aO as ConfigurationItemRelatedItemCreate, aQ as ConfigurationItemRelatedItemUpdate, aP as ConfigurationItemRelatedItemSummary, c as ConfigurationItem, aW as ConfigurationItemType, aE as ConfigurationItemCreate, a_ as ConfigurationItemUpdate, aV as ConfigurationItemSummary, aD as ConfigurationItemContext, aR as ConfigurationItemSslSubjectAlternativeName, aS as ConfigurationItemSslSubjectAlternativeNameCreate, aU as ConfigurationItemSslSubjectAlternativeNameUpdate, aT as ConfigurationItemSslSubjectAlternativeNameSummary, aX as ConfigurationItemTypeCreate, aZ as ConfigurationItemTypeUpdate, aY as ConfigurationItemTypeSummary, a$ as ConfigurationItemWebhook, b0 as ConfigurationItemWebhookCreate, b2 as ConfigurationItemWebhookUpdate, b1 as ConfigurationItemWebhookSummary, b6 as ContactGroupContacts, b7 as ContactGroupContactsCreate, b9 as ContactGroupContactsUpdate, b8 as ContactGroupContactsSummary, ba as ContactGroups, bb as ContactGroupsCreate, bd as ContactGroupsUpdate, bc as ContactGroupsSummary, be as ContactSummary, b5 as ContactCreate, bf as ContactUpdate, b4 as ContactContext, bg as ContactWebhook, bh as ContactWebhookCreate, bj as ContactWebhookUpdate, bi as ContactWebhookSummary, bk as ContractBillingRule, bl as ContractBillingRuleCreate, bn as ContractBillingRuleUpdate, bm as ContractBillingRuleSummary, bq as ContractBlockHourFactor, br as ContractBlockHourFactorCreate, bt as ContractBlockHourFactorUpdate, bs as ContractBlockHourFactorSummary, bo as ContractBlock, bp as ContractBlockCreate, bv as ContractBlockUpdate, bu as ContractBlockSummary, d as ContractCharge, bw as ContractChargeCreate, by as ContractChargeUpdate, bx as ContractChargeSummary, bA as ContractExclusionBillingCode, bB as ContractExclusionBillingCodeCreate, bD as ContractExclusionBillingCodeUpdate, bC as ContractExclusionBillingCodeSummary, bE as ContractExclusionRoles, bF as ContractExclusionRolesCreate, bH as ContractExclusionRolesUpdate, bG as ContractExclusionRolesSummary, bI as ContractExclusionSetExcludedRoles, bJ as ContractExclusionSetExcludedRolesCreate, bL as ContractExclusionSetExcludedRolesUpdate, bK as ContractExclusionSetExcludedRolesSummary, bM as ContractExclusionSetExcludedWorkTypes, bN as ContractExclusionSetExcludedWorkTypesCreate, bP as ContractExclusionSetExcludedWorkTypesUpdate, bO as ContractExclusionSetExcludedWorkTypesSummary, bQ as ContractExclusionSets, bR as ContractExclusionSetsCreate, bT as ContractExclusionSetsUpdate, bS as ContractExclusionSetsSummary, bU as ContractMilestone, bV as ContractMilestoneCreate, bX as ContractMilestoneUpdate, bW as ContractMilestoneSummary, bY as ContractNote, bZ as ContractNoteCreate, b$ as ContractNoteUpdate, b_ as ContractNoteSummary, c0 as ContractRate, c1 as ContractRateCreate, c3 as ContractRateUpdate, c2 as ContractRateSummary, c4 as ContractRetainers, c5 as ContractRetainersCreate, c7 as ContractRetainersUpdate, c6 as ContractRetainersSummary, c8 as ContractRoleCosts, c9 as ContractRoleCostsCreate, cb as ContractRoleCostsUpdate, ca as ContractRoleCostsSummary, cc as ContractServiceAdjustment, cd as ContractServiceAdjustmentCreate, cf as ContractServiceAdjustmentUpdate, ce as ContractServiceAdjustmentSummary, ch as ContractServiceBundleAdjustment, ci as ContractServiceBundleAdjustmentCreate, ck as ContractServiceBundleAdjustmentUpdate, cj as ContractServiceBundleAdjustmentSummary, cg as ContractServiceBundle, cl as ContractServiceBundleCreate, cr as ContractServiceBundleUpdate, cm as ContractServiceBundleSummary, cn as ContractServiceBundleUnit, co as ContractServiceBundleUnitCreate, cq as ContractServiceBundleUnitUpdate, cp as ContractServiceBundleUnitSummary, f as ContractService, cs as ContractServiceCreate, cy as ContractServiceUpdate, ct as ContractServiceSummary, cu as ContractServiceUnit, cv as ContractServiceUnitCreate, cx as ContractServiceUnitUpdate, cw as ContractServiceUnitSummary, e as Contract, dt as Invoice, f0 as Resource, E as ExpenseItem, g4 as Subscription, bz as ContractCreate, cE as ContractUpdate, cz as ContractSummary, cA as ContractTicketPurchases, cB as ContractTicketPurchasesCreate, cD as ContractTicketPurchasesUpdate, cC as ContractTicketPurchasesSummary, cF as Country, cG as CountryCreate, cI as CountryUpdate, cH as CountrySummary, cJ as Currency, cK as CurrencyCreate, cM as CurrencyUpdate, cL as CurrencySummary, cN as Department, cO as DepartmentCreate, cQ as DepartmentUpdate, cP as DepartmentSummary, cS as DomainRegistrar, cT as DomainRegistrarCreate, cV as DomainRegistrarUpdate, cU as DomainRegistrarSummary, de as GlobalEntityInformationResultModel, c$ as ExpenseItemAttachment, d0 as ExpenseItemAttachmentCreate, d2 as ExpenseItemAttachmentUpdate, d1 as ExpenseItemAttachmentSummary, d3 as ExpenseItemCreate, d5 as ExpenseItemUpdate, d4 as ExpenseItemSummary, d6 as ExpenseReport, d7 as ExpenseReportCreate, d9 as ExpenseReportUpdate, d8 as ExpenseReportSummary, g as HolidaySet, dg as HolidaySetCreate, di as HolidaySetUpdate, dh as HolidaySetSummary, H as Holiday, df as HolidayCreate, dk as HolidayUpdate, dj as HolidaySummary, dl as InventoryProduct, dm as InventoryProductCreate, dp as InventoryProductUpdate, dn as InventoryProductSummary, dq as InventoryStockedItemAdd, dr as InventoryStockedItemRemove, ds as InventoryStockedItemTransfer, du as InvoiceCreate, dA as InvoiceUpdate, dv as InvoiceSummary, dw as InvoiceTemplate, dx as InvoiceTemplateCreate, dz as InvoiceTemplateUpdate, dC as ModuleAccessResultModel, dD as NotificationHistory, dE as NotificationHistoryCreate, dG as NotificationHistoryUpdate, dF as NotificationHistorySummary, h as Opportunity, dR as OpportunityCreate, dT as OpportunityUpdate, dS as OpportunitySummary, dJ as OpportunityAttachment, dK as OpportunityAttachmentCreate, dM as OpportunityAttachmentUpdate, dL as OpportunityAttachmentSummary, dN as OpportunityCategory, dO as OpportunityCategoryCreate, dQ as OpportunityCategoryUpdate, dP as OpportunityCategorySummary, dV as OrganizationalLevel1Create, dX as OrganizationalLevel1Update, dZ as OrganizationalLevel2Create, d$ as OrganizationalLevel2Update, e1 as OrganizationalLevelAssociationCreate, e3 as OrganizationalLevelAssociationUpdate, e5 as Phase, e6 as PhaseCreate, e8 as PhaseUpdate, e7 as PhaseSummary, ea as Product, eb as ProductCreate, ed as ProductUpdate, ec as ProductSummary, ee as ProductVendors, ef as ProductVendorsCreate, eh as ProductVendorsUpdate, eg as ProductVendorsSummary, i as ProjectCharge, ej as ProjectChargeCreate, el as ProjectChargeUpdate, ek as ProjectChargeSummary, eo as ProjectNote, ep as ProjectNoteCreate, er as ProjectNoteUpdate, eq as ProjectNoteSummary, en as ProjectCreate, et as ProjectUpdate, es as ProjectSummary, hX as CompositeContextOptions, em as ProjectContext, eu as PurchaseApprovals, ev as PurchaseApprovalsCreate, ex as PurchaseApprovalsUpdate, ew as PurchaseApprovalsSummary, ey as PurchaseOrderItemReceiving, ez as PurchaseOrderItemReceivingCreate, eB as PurchaseOrderItemReceivingUpdate, eA as PurchaseOrderItemReceivingSummary, eC as PurchaseOrderItems, eD as PurchaseOrderItemsCreate, eF as PurchaseOrderItemsUpdate, eE as PurchaseOrderItemsSummary, eG as PurchaseOrders, eH as PurchaseOrdersCreate, eJ as PurchaseOrdersUpdate, eI as PurchaseOrdersSummary, eM as QuoteItem, eN as QuoteItemCreate, eP as QuoteItemUpdate, eO as QuoteItemSummary, eQ as QuoteLocation, eR as QuoteLocationCreate, eT as QuoteLocationUpdate, eS as QuoteLocationSummary, eK as Quote, eL as QuoteCreate, eZ as QuoteUpdate, eU as QuoteSummary, eV as QuoteTemplate, eW as QuoteTemplateCreate, eY as QuoteTemplateUpdate, eX as QuoteTemplateSummary, f4 as ResourceRoleQueue, f5 as ResourceRoleQueueCreate, f7 as ResourceRoleQueueUpdate, f6 as ResourceRoleQueueSummary, f2 as ResourceRole, f3 as ResourceRoleCreate, f9 as ResourceRoleUpdate, f8 as ResourceRoleSummary, fa as ResourceSkill, fb as ResourceSkillCreate, fd as ResourceSkillUpdate, fc as ResourceSkillSummary, f1 as ResourceCreate, fr as ResourceUpdate, fe as ResourceSummary, ff as ResourceTimeOffAdditional, fg as ResourceTimeOffAdditionalCreate, fi as ResourceTimeOffAdditionalUpdate, fh as ResourceTimeOffAdditionalSummary, fj as ResourceTimeOffApprover, fk as ResourceTimeOffApproverCreate, fm as ResourceTimeOffApproverUpdate, fl as ResourceTimeOffApproverSummary, fn as ResourceTimeOffBalance, fo as ResourceTimeOffBalanceCreate, fq as ResourceTimeOffBalanceUpdate, fp as ResourceTimeOffBalanceSummary, fs as Role, ft as RoleCreate, fv as RoleUpdate, fu as RoleSummary, fw as SalesOrder, fx as SalesOrderCreate, fz as SalesOrderUpdate, fB as ServiceCall, fC as ServiceCallCreate, fU as ServiceCallUpdate, fD as ServiceCallSummary, fG as ServiceCallTaskResource, fH as ServiceCallTaskResourceCreate, fJ as ServiceCallTaskResourceUpdate, fI as ServiceCallTaskResourceSummary, fE as ServiceCallTask, fF as ServiceCallTaskCreate, fL as ServiceCallTaskUpdate, fK as ServiceCallTaskSummary, fO as ServiceCallTicketResource, fP as ServiceCallTicketResourceCreate, fR as ServiceCallTicketResourceUpdate, fQ as ServiceCallTicketResourceSummary, fM as ServiceCallTicket, fN as ServiceCallTicketCreate, fT as ServiceCallTicketUpdate, fS as ServiceCallTicketSummary, fW as ServiceLevelAgreementResults, fX as ServiceLevelAgreementResultsCreate, fZ as ServiceLevelAgreementResultsUpdate, fY as ServiceLevelAgreementResultsSummary, fA as Service, fV as ServiceCreate, f$ as ServiceUpdate, f_ as ServiceSummary, g0 as Skill, g1 as SkillCreate, g3 as SkillUpdate, g2 as SkillSummary, g6 as SubscriptionPeriod, g7 as SubscriptionPeriodCreate, g9 as SubscriptionPeriodUpdate, g8 as SubscriptionPeriodSummary, g5 as SubscriptionCreate, gb as SubscriptionUpdate, ga as SubscriptionSummary, ge as SurveyResults, gf as SurveyResultsCreate, gh as SurveyResultsUpdate, gg as SurveyResultsSummary, gc as Survey, gd as SurveyCreate, gj as SurveyUpdate, gi as SurveySummary, gl as TagAlias, gm as TagAliasCreate, go as TagAliasUpdate, gn as TagAliasSummary, gq as TagGroup, gr as TagGroupCreate, gt as TagGroupUpdate, gs as TagGroupSummary, gk as Tag, gp as TagCreate, gv as TagUpdate, gu as TagSummary, gy as TaskSecondaryResource, gz as TaskSecondaryResourceCreate, gB as TaskSecondaryResourceUpdate, gA as TaskSecondaryResourceSummary, gw as Task, gx as TaskCreate, gD as TaskUpdate, gC as TaskSummary, gE as TaxRegion, gF as TaxRegionCreate, gH as TaxRegionUpdate, gI as ThresholdStatusResultModel, T as TicketAdditionalConfigurationItem, gK as TicketAdditionalConfigurationItemCreate, gM as TicketAdditionalConfigurationItemUpdate, gL as TicketAdditionalConfigurationItemSummary, j as TicketAdditionalContact, gN as TicketAdditionalContactCreate, gP as TicketAdditionalContactUpdate, gO as TicketAdditionalContactSummary, gQ as TicketAttachment, gR as TicketAttachmentCreate, gT as TicketAttachmentUpdate, gS as TicketAttachmentSummary, gU as TicketCategory, gV as TicketCategoryCreate, g$ as TicketCategoryUpdate, g_ as TicketCategorySummary, gW as TicketCategoryFieldDefault, gX as TicketCategoryFieldDefaultCreate, gZ as TicketCategoryFieldDefaultUpdate, gY as TicketCategoryFieldDefaultSummary, h0 as TicketChangeRequestApproval, h1 as TicketChangeRequestApprovalCreate, h3 as TicketChangeRequestApprovalUpdate, h2 as TicketChangeRequestApprovalSummary, k as TicketCharge, h4 as TicketChargeCreate, h6 as TicketChargeUpdate, h5 as TicketChargeSummary, h7 as TicketChecklistItem, h8 as TicketChecklistItemCreate, ha as TicketChecklistItemUpdate, h9 as TicketChecklistItemSummary, hb as TicketChecklistLibrary, hc as TicketChecklistLibraryCreate, he as TicketChecklistLibraryUpdate, hd as TicketChecklistLibrarySummary, hh as TicketHistory, hi as TicketHistoryCreate, hk as TicketHistoryUpdate, hj as TicketHistorySummary, hm as TicketNoteAttachment, hn as TicketNoteAttachmentCreate, hp as TicketNoteAttachmentUpdate, ho as TicketNoteAttachmentSummary, hl as TicketNote, hq as TicketNoteCreate, hs as TicketNoteUpdate, hr as TicketNoteSummary, ht as TicketNoteWebhook, hu as TicketNoteWebhookCreate, hw as TicketNoteWebhookUpdate, hv as TicketNoteWebhookSummary, hx as TicketSecondaryResource, hy as TicketSecondaryResourceCreate, hA as TicketSecondaryResourceUpdate, hz as TicketSecondaryResourceSummary, hg as TicketCreate, hC as TicketUpdate, hB as TicketSummary, hf as TicketContext, hD as TicketWebhook, hE as TicketWebhookCreate, hG as TicketWebhookUpdate, hF as TicketWebhookSummary, hL as TimeEntryCreate, hN as TimeEntryUpdate, hM as TimeEntrySummary, hH as TimeEntryAttachment, hI as TimeEntryAttachmentCreate, hK as TimeEntryAttachmentUpdate, hJ as TimeEntryAttachmentSummary, hO as TimeOffRequest, hP as TimeOffRequestCreate, hS as TimeOffRequestUpdate, hR as TimeOffRequestSummary, A as ApiVersionResultModel, s as AutotaskVersionResultModel, hU as ZoneInformationResultModel } from './index-DgBA1JMH.js';
1
+ import { i as AuditEvent, eY as ResolutionCaps, I as Identifier, dZ as OrganizationalLevelAssociation, dV as OrganizationalLevel2, dR as OrganizationalLevel1, E as EmptyReasonInfo, Q as QueryParams, eX as Resolution, e1 as Page, cS as EntityInformationModel, d6 as FieldInformationModel, d4 as Field, c as FilterCondition, O as OperationResult, cQ as DryRunResult, e as Appointment, f as AppointmentCreate, h as AppointmentUpdate, g as AppointmentSummary, j as AuthTokenResultModel, B as BillingCode, l as BillingCodeCreate, n as BillingCodeUpdate, m as BillingCodeSummary, o as BillingItemApprovalLevel, p as BillingItemApprovalLevelCreate, r as BillingItemApprovalLevelUpdate, s as BillingItems, t as BillingItemsCreate, v as BillingItemsUpdate, u as BillingItemsSummary, C as ChangeRequestLink, w as ChangeRequestLinkCreate, y as ChangeRequestLinkUpdate, x as ChangeRequestLinkSummary, z as ChecklistLibrary, K as ChecklistLibraryCreate, M as ChecklistLibraryUpdate, L as ChecklistLibrarySummary, D as ChecklistLibraryChecklistItem, G as ChecklistLibraryChecklistItemCreate, J as ChecklistLibraryChecklistItemUpdate, H as ChecklistLibraryChecklistItemSummary, N as ClassificationIcon, R as ClassificationIconCreate, T as ClassificationIconUpdate, S as ClassificationIconSummary, U as Company, $ as CompanyLocation, aW as Contact, a3 as CompanyNote, gG as Ticket, ee as Project, hW as CompositeNamesSection, hH as TimeEntry, _ as CompanyCreate, ac as CompanyUpdate, ab as CompanySummary, Z as CompanyContext, V as CompanyAlert, W as CompanyAlertCreate, Y as CompanyAlertUpdate, X as CompanyAlertSummary, a0 as CompanyLocationCreate, a2 as CompanyLocationUpdate, a1 as CompanyLocationSummary, a4 as CompanyNoteCreate, a6 as CompanyNoteUpdate, a5 as CompanyNoteSummary, a7 as CompanySiteConfigurations, a8 as CompanySiteConfigurationsCreate, aa as CompanySiteConfigurationsUpdate, a9 as CompanySiteConfigurationsSummary, ad as CompanyWebhook, ae as CompanyWebhookCreate, ag as CompanyWebhookUpdate, af as CompanyWebhookSummary, ai as ConfigurationItemBillingProductAssociations, aj as ConfigurationItemBillingProductAssociationsCreate, al as ConfigurationItemBillingProductAssociationsUpdate, ak as ConfigurationItemBillingProductAssociationsSummary, am as ConfigurationItemCategory, an as ConfigurationItemCategoryCreate, at as ConfigurationItemCategoryUpdate, ao as ConfigurationItemCategorySummary, ap as ConfigurationItemCategoryUdfAssociation, aq as ConfigurationItemCategoryUdfAssociationCreate, as as ConfigurationItemCategoryUdfAssociationUpdate, ar as ConfigurationItemCategoryUdfAssociationSummary, aw as ConfigurationItemDnsRecord, ax as ConfigurationItemDnsRecordCreate, az as ConfigurationItemDnsRecordUpdate, ay as ConfigurationItemDnsRecordSummary, aA as ConfigurationItemNote, aB as ConfigurationItemNoteCreate, aD as ConfigurationItemNoteUpdate, aC as ConfigurationItemNoteSummary, aE as ConfigurationItemRelatedItem, aF as ConfigurationItemRelatedItemCreate, aH as ConfigurationItemRelatedItemUpdate, aG as ConfigurationItemRelatedItemSummary, ah as ConfigurationItem, aN as ConfigurationItemType, av as ConfigurationItemCreate, aR as ConfigurationItemUpdate, aM as ConfigurationItemSummary, au as ConfigurationItemContext, aI as ConfigurationItemSslSubjectAlternativeName, aJ as ConfigurationItemSslSubjectAlternativeNameCreate, aL as ConfigurationItemSslSubjectAlternativeNameUpdate, aK as ConfigurationItemSslSubjectAlternativeNameSummary, aO as ConfigurationItemTypeCreate, aQ as ConfigurationItemTypeUpdate, aP as ConfigurationItemTypeSummary, aS as ConfigurationItemWebhook, aT as ConfigurationItemWebhookCreate, aV as ConfigurationItemWebhookUpdate, aU as ConfigurationItemWebhookSummary, aZ as ContactGroupContacts, a_ as ContactGroupContactsCreate, b0 as ContactGroupContactsUpdate, a$ as ContactGroupContactsSummary, b1 as ContactGroups, b2 as ContactGroupsCreate, b4 as ContactGroupsUpdate, b3 as ContactGroupsSummary, aY as ContactCreate, b6 as ContactUpdate, b5 as ContactSummary, aX as ContactContext, b7 as ContactWebhook, b8 as ContactWebhookCreate, ba as ContactWebhookUpdate, b9 as ContactWebhookSummary, bc as ContractBillingRule, bd as ContractBillingRuleCreate, bf as ContractBillingRuleUpdate, be as ContractBillingRuleSummary, bi as ContractBlockHourFactor, bj as ContractBlockHourFactorCreate, bl as ContractBlockHourFactorUpdate, bk as ContractBlockHourFactorSummary, bg as ContractBlock, bh as ContractBlockCreate, bn as ContractBlockUpdate, bm as ContractBlockSummary, bo as ContractCharge, bp as ContractChargeCreate, br as ContractChargeUpdate, bq as ContractChargeSummary, bt as ContractExclusionBillingCode, bu as ContractExclusionBillingCodeCreate, bw as ContractExclusionBillingCodeUpdate, bv as ContractExclusionBillingCodeSummary, bx as ContractExclusionRoles, by as ContractExclusionRolesCreate, bA as ContractExclusionRolesUpdate, bz as ContractExclusionRolesSummary, bB as ContractExclusionSetExcludedRoles, bC as ContractExclusionSetExcludedRolesCreate, bE as ContractExclusionSetExcludedRolesUpdate, bD as ContractExclusionSetExcludedRolesSummary, bF as ContractExclusionSetExcludedWorkTypes, bG as ContractExclusionSetExcludedWorkTypesCreate, bI as ContractExclusionSetExcludedWorkTypesUpdate, bH as ContractExclusionSetExcludedWorkTypesSummary, bJ as ContractExclusionSets, bK as ContractExclusionSetsCreate, bM as ContractExclusionSetsUpdate, bL as ContractExclusionSetsSummary, bN as ContractMilestone, bO as ContractMilestoneCreate, bQ as ContractMilestoneUpdate, bP as ContractMilestoneSummary, bR as ContractNote, bS as ContractNoteCreate, bU as ContractNoteUpdate, bT as ContractNoteSummary, bV as ContractRate, bW as ContractRateCreate, bY as ContractRateUpdate, bX as ContractRateSummary, bZ as ContractRetainers, b_ as ContractRetainersCreate, c0 as ContractRetainersUpdate, b$ as ContractRetainersSummary, c1 as ContractRoleCosts, c2 as ContractRoleCostsCreate, c4 as ContractRoleCostsUpdate, c3 as ContractRoleCostsSummary, c6 as ContractServiceAdjustment, c7 as ContractServiceAdjustmentCreate, c9 as ContractServiceAdjustmentUpdate, c8 as ContractServiceAdjustmentSummary, cb as ContractServiceBundleAdjustment, cc as ContractServiceBundleAdjustmentCreate, ce as ContractServiceBundleAdjustmentUpdate, cd as ContractServiceBundleAdjustmentSummary, ca as ContractServiceBundle, cf as ContractServiceBundleCreate, cl as ContractServiceBundleUpdate, cg as ContractServiceBundleSummary, ch as ContractServiceBundleUnit, ci as ContractServiceBundleUnitCreate, ck as ContractServiceBundleUnitUpdate, cj as ContractServiceBundleUnitSummary, c5 as ContractService, cm as ContractServiceCreate, cs as ContractServiceUpdate, cn as ContractServiceSummary, co as ContractServiceUnit, cp as ContractServiceUnitCreate, cr as ContractServiceUnitUpdate, cq as ContractServiceUnitSummary, bb as Contract, dp as Invoice, eZ as Resource, cU as ExpenseItem, g1 as Subscription, bs as ContractCreate, cy as ContractUpdate, ct as ContractSummary, cu as ContractTicketPurchases, cv as ContractTicketPurchasesCreate, cx as ContractTicketPurchasesUpdate, cw as ContractTicketPurchasesSummary, cz as Country, cA as CountryCreate, cC as CountryUpdate, cB as CountrySummary, cD as Currency, cE as CurrencyCreate, cG as CurrencyUpdate, cF as CurrencySummary, cH as Department, cI as DepartmentCreate, cK as DepartmentUpdate, cJ as DepartmentSummary, cM as DomainRegistrar, cN as DomainRegistrarCreate, cP as DomainRegistrarUpdate, cO as DomainRegistrarSummary, d8 as GlobalEntityInformationResultModel, cV as ExpenseItemAttachment, cW as ExpenseItemAttachmentCreate, cY as ExpenseItemAttachmentUpdate, cX as ExpenseItemAttachmentSummary, cZ as ExpenseItemCreate, c$ as ExpenseItemUpdate, c_ as ExpenseItemSummary, d0 as ExpenseReport, d1 as ExpenseReportCreate, d3 as ExpenseReportUpdate, d2 as ExpenseReportSummary, db as HolidaySet, dc as HolidaySetCreate, de as HolidaySetUpdate, dd as HolidaySetSummary, d9 as Holiday, da as HolidayCreate, dg as HolidayUpdate, df as HolidaySummary, dh as InventoryProduct, di as InventoryProductCreate, dk as InventoryProductUpdate, dj as InventoryProductSummary, dl as InventoryStockedItemAdd, dm as InventoryStockedItemRemove, dn as InventoryStockedItemTransfer, dq as InvoiceCreate, dw as InvoiceUpdate, dr as InvoiceSummary, ds as InvoiceTemplate, dt as InvoiceTemplateCreate, dv as InvoiceTemplateUpdate, dy as ModuleAccessResultModel, dz as NotificationHistory, dA as NotificationHistoryCreate, dC as NotificationHistoryUpdate, dB as NotificationHistorySummary, dF as Opportunity, dO as OpportunityCreate, dQ as OpportunityUpdate, dP as OpportunitySummary, dG as OpportunityAttachment, dH as OpportunityAttachmentCreate, dJ as OpportunityAttachmentUpdate, dI as OpportunityAttachmentSummary, dK as OpportunityCategory, dL as OpportunityCategoryCreate, dN as OpportunityCategoryUpdate, dM as OpportunityCategorySummary, dS as OrganizationalLevel1Create, dU as OrganizationalLevel1Update, dW as OrganizationalLevel2Create, dY as OrganizationalLevel2Update, d_ as OrganizationalLevelAssociationCreate, e0 as OrganizationalLevelAssociationUpdate, e2 as Phase, e3 as PhaseCreate, e5 as PhaseUpdate, e4 as PhaseSummary, e6 as Product, e7 as ProductCreate, e9 as ProductUpdate, e8 as ProductSummary, ea as ProductVendors, eb as ProductVendorsCreate, ed as ProductVendorsUpdate, ec as ProductVendorsSummary, ef as ProjectCharge, eg as ProjectChargeCreate, ei as ProjectChargeUpdate, eh as ProjectChargeSummary, el as ProjectNote, em as ProjectNoteCreate, eo as ProjectNoteUpdate, en as ProjectNoteSummary, ek as ProjectCreate, eq as ProjectUpdate, ep as ProjectSummary, hX as CompositeContextOptions, ej as ProjectContext, er as PurchaseApprovals, es as PurchaseApprovalsCreate, eu as PurchaseApprovalsUpdate, et as PurchaseApprovalsSummary, ev as PurchaseOrderItemReceiving, ew as PurchaseOrderItemReceivingCreate, ey as PurchaseOrderItemReceivingUpdate, ex as PurchaseOrderItemReceivingSummary, ez as PurchaseOrderItems, eA as PurchaseOrderItemsCreate, eC as PurchaseOrderItemsUpdate, eB as PurchaseOrderItemsSummary, eD as PurchaseOrders, eE as PurchaseOrdersCreate, eG as PurchaseOrdersUpdate, eF as PurchaseOrdersSummary, eJ as QuoteItem, eK as QuoteItemCreate, eM as QuoteItemUpdate, eL as QuoteItemSummary, eN as QuoteLocation, eO as QuoteLocationCreate, eQ as QuoteLocationUpdate, eP as QuoteLocationSummary, eH as Quote, eI as QuoteCreate, eW as QuoteUpdate, eR as QuoteSummary, eS as QuoteTemplate, eT as QuoteTemplateCreate, eV as QuoteTemplateUpdate, eU as QuoteTemplateSummary, f1 as ResourceRoleQueue, f2 as ResourceRoleQueueCreate, f4 as ResourceRoleQueueUpdate, f3 as ResourceRoleQueueSummary, e$ as ResourceRole, f0 as ResourceRoleCreate, f6 as ResourceRoleUpdate, f5 as ResourceRoleSummary, f7 as ResourceSkill, f8 as ResourceSkillCreate, fa as ResourceSkillUpdate, f9 as ResourceSkillSummary, hg as TicketCreate, hC as TicketUpdate, hB as TicketSummary, hf as TicketContext, fD as ServiceCallTaskResource, fB as ServiceCallTask, fk as ResourceTimeOffBalance, hP as TimeOffRequest, e_ as ResourceCreate, fo as ResourceUpdate, fb as ResourceSummary, fc as ResourceTimeOffAdditional, fd as ResourceTimeOffAdditionalCreate, ff as ResourceTimeOffAdditionalUpdate, fe as ResourceTimeOffAdditionalSummary, fg as ResourceTimeOffApprover, fh as ResourceTimeOffApproverCreate, fj as ResourceTimeOffApproverUpdate, fi as ResourceTimeOffApproverSummary, fl as ResourceTimeOffBalanceCreate, fn as ResourceTimeOffBalanceUpdate, fm as ResourceTimeOffBalanceSummary, fp as Role, fq as RoleCreate, fs as RoleUpdate, fr as RoleSummary, ft as SalesOrder, fu as SalesOrderCreate, fw as SalesOrderUpdate, fy as ServiceCall, fJ as ServiceCallTicket, fz as ServiceCallCreate, fR as ServiceCallUpdate, fA as ServiceCallSummary, fE as ServiceCallTaskResourceCreate, fG as ServiceCallTaskResourceUpdate, fF as ServiceCallTaskResourceSummary, fC as ServiceCallTaskCreate, fI as ServiceCallTaskUpdate, fH as ServiceCallTaskSummary, fL as ServiceCallTicketResource, fM as ServiceCallTicketResourceCreate, fO as ServiceCallTicketResourceUpdate, fN as ServiceCallTicketResourceSummary, fK as ServiceCallTicketCreate, fQ as ServiceCallTicketUpdate, fP as ServiceCallTicketSummary, fT as ServiceLevelAgreementResults, fU as ServiceLevelAgreementResultsCreate, fW as ServiceLevelAgreementResultsUpdate, fV as ServiceLevelAgreementResultsSummary, fx as Service, fS as ServiceCreate, fY as ServiceUpdate, fX as ServiceSummary, fZ as Skill, f_ as SkillCreate, g0 as SkillUpdate, f$ as SkillSummary, g3 as SubscriptionPeriod, g4 as SubscriptionPeriodCreate, g6 as SubscriptionPeriodUpdate, g5 as SubscriptionPeriodSummary, g2 as SubscriptionCreate, g8 as SubscriptionUpdate, g7 as SubscriptionSummary, gb as SurveyResults, gc as SurveyResultsCreate, ge as SurveyResultsUpdate, gd as SurveyResultsSummary, g9 as Survey, ga as SurveyCreate, gg as SurveyUpdate, gf as SurveySummary, gi as TagAlias, gj as TagAliasCreate, gl as TagAliasUpdate, gk as TagAliasSummary, gn as TagGroup, go as TagGroupCreate, gq as TagGroupUpdate, gp as TagGroupSummary, gh as Tag, gm as TagCreate, gs as TagUpdate, gr as TagSummary, gv as TaskSecondaryResource, gw as TaskSecondaryResourceCreate, gy as TaskSecondaryResourceUpdate, gx as TaskSecondaryResourceSummary, gt as Task, gu as TaskCreate, gA as TaskUpdate, gz as TaskSummary, gB as TaxRegion, gC as TaxRegionCreate, gE as TaxRegionUpdate, gF as ThresholdStatusResultModel, gH as TicketAdditionalConfigurationItem, gI as TicketAdditionalConfigurationItemCreate, gK as TicketAdditionalConfigurationItemUpdate, gJ as TicketAdditionalConfigurationItemSummary, gL as TicketAdditionalContact, gM as TicketAdditionalContactCreate, gO as TicketAdditionalContactUpdate, gN as TicketAdditionalContactSummary, gP as TicketAttachment, gQ as TicketAttachmentCreate, gS as TicketAttachmentUpdate, gR as TicketAttachmentSummary, gT as TicketCategory, gU as TicketCategoryCreate, g_ as TicketCategoryUpdate, gZ as TicketCategorySummary, gV as TicketCategoryFieldDefault, gW as TicketCategoryFieldDefaultCreate, gY as TicketCategoryFieldDefaultUpdate, gX as TicketCategoryFieldDefaultSummary, g$ as TicketChangeRequestApproval, h0 as TicketChangeRequestApprovalCreate, h2 as TicketChangeRequestApprovalUpdate, h1 as TicketChangeRequestApprovalSummary, h3 as TicketCharge, h4 as TicketChargeCreate, h6 as TicketChargeUpdate, h5 as TicketChargeSummary, h7 as TicketChecklistItem, h8 as TicketChecklistItemCreate, ha as TicketChecklistItemUpdate, h9 as TicketChecklistItemSummary, hb as TicketChecklistLibrary, hc as TicketChecklistLibraryCreate, he as TicketChecklistLibraryUpdate, hd as TicketChecklistLibrarySummary, hh as TicketHistory, hi as TicketHistoryCreate, hk as TicketHistoryUpdate, hj as TicketHistorySummary, hm as TicketNoteAttachment, hn as TicketNoteAttachmentCreate, hp as TicketNoteAttachmentUpdate, ho as TicketNoteAttachmentSummary, hl as TicketNote, hq as TicketNoteCreate, hs as TicketNoteUpdate, hr as TicketNoteSummary, ht as TicketNoteWebhook, hu as TicketNoteWebhookCreate, hw as TicketNoteWebhookUpdate, hv as TicketNoteWebhookSummary, hx as TicketSecondaryResource, hy as TicketSecondaryResourceCreate, hA as TicketSecondaryResourceUpdate, hz as TicketSecondaryResourceSummary, hD as TicketWebhook, hE as TicketWebhookCreate, hG as TicketWebhookUpdate, hF as TicketWebhookSummary, hM as TimeEntryCreate, hO as TimeEntryUpdate, hN as TimeEntrySummary, hI as TimeEntryAttachment, hJ as TimeEntryAttachmentCreate, hL as TimeEntryAttachmentUpdate, hK as TimeEntryAttachmentSummary, hQ as TimeOffRequestCreate, hT as TimeOffRequestUpdate, hS as TimeOffRequestSummary, A as ApiVersionResultModel, k as AutotaskVersionResultModel, hV as ZoneInformationResultModel } from './index-c549LvOb.cjs';
2
2
 
3
3
  /** Default bound of the read cache (a long-lived server must not grow without bound). */
4
4
  declare const READ_CACHE_MAX_ENTRIES = 4096;
@@ -176,8 +176,8 @@ interface AutotaskConfig {
176
176
  /**
177
177
  * Row label siblings on the read surfaces (issue #287): when `true`,
178
178
  * `query`/`queryBounded` (and the invoke `<resource>.query` path),
179
- * `operations.aggregate` group keys, `operations.fetchMany` and
180
- * `fetchByIds` add the `*Name` / `*Label` siblings to the served rows
179
+ * `operations.aggregate` group keys and `operations.fetchByIds` add the
180
+ * `*Name` / `*Label` siblings to the served rows
181
181
  * (picklist `<field>Label`, `<fk>Name` for the record-FK fields and the
182
182
  * staff name for `resourceID`/`*ResourceID`). Default `false` (raw ids —
183
183
  * the label pass costs a field-catalog read plus up to 20 cold name
@@ -738,20 +738,18 @@ declare class HttpClient {
738
738
  * update dry-run envelope (issue #14 — additive);
739
739
  * - src/http.ts attaches EMPTY_REASON_STAMPS / POINTER_NOTES to typed
740
740
  * errors (issue #14 — the reason rides on the error details, additive);
741
- * - operations.recovery reads DELETE_BOUNDARY_NOTES + MARKER_FIELDS
742
- * (issue #9 — zero wire);
743
741
  * - src/resources/base.ts reads RESPONSE_DRIFT_MARKERS on a drifted 2xx
744
742
  * create (issue #13 — ONE bounded marker read; absent pin = old behaviour);
745
- * - operations.blindSurfaces / operations.probeReachability serve
746
- * BLIND_SURFACE_INVENTORY + REACHABILITY_PROBE_DEFAULTS (issue #11 —
747
- * the inventory is zero wire; the probe is a bounded read sweep);
743
+ * - BLIND_SURFACE_INVENTORY + REACHABILITY_PROBE_DEFAULTS — the
744
+ * plan.reachability artifacts (issue #11); the ops that served them were
745
+ * deleted in #289, the plan data and the artifacts remain;
748
746
  * - operations.createGuidance serves CREATE_GUIDANCE (issue #12 — the
749
747
  * zone-fact create-guidance catalog, zero wire);
750
748
  * - src/resources/base.ts reads UNTRUSTED_FIELDS_BY_RESOURCE for the
751
749
  * queryBounded noteChars free-text cap (issue #61 — response-side only);
752
750
  * - docs/API.md §11.7/§11.8/§11.9/§11.10/§11.11/§11.12 render the same facts.
753
751
  *
754
- * planHash: f2b02eb792fd6e2934afab0a48b1c2e338bf741080d15550512c2db5091f4bc5
752
+ * planHash: dc0c06eae0d75d77a9d41c50f8d9a4a7ce458f34e62aa1e7f9b5f35a487e4020
755
753
  */
756
754
 
757
755
  /** One pinned blind-surface stamp (the result-time sentinel object). */
@@ -767,44 +765,6 @@ interface BlindSurfaceInfo {
767
765
  /** The zone fact + remedy, LLM-consumer grade. */
768
766
  note: string;
769
767
  }
770
- /** One blind-surface inventory row (issue #11 — the served discovery row). */
771
- interface BlindSurfaceRow {
772
- /** The plan resource key. */
773
- resource: string;
774
- /** The affected read ops (the pinned subset of count/query that exist for the resource). */
775
- ops: Array<'count' | 'query'>;
776
- /** The blind class (closed set): unowned-blind | fully-blind | unfiltered-blind | unknown (no class assigned — data-full or no count observable). */
777
- kind: 'unowned-blind' | 'fully-blind' | 'unfiltered-blind' | 'unknown';
778
- /** The ww29 discovery fact: rows seen for the unfiltered limit-2 read (0 = blind; 1-2 = data-full; null = no count observable). */
779
- unfilteredRows: number | null;
780
- /** The authority op that answers for a record (e.g. companies.get); null when the plan has no get row. */
781
- authority: string | null;
782
- /** The discovery fact + remedy, LLM-consumer grade. */
783
- note: string;
784
- /** The proof level: live-verified | discovery-sweep | spec-derived. */
785
- proof: 'live-verified' | 'discovery-sweep' | 'spec-derived';
786
- }
787
- /** The blind-surface inventory (issue #11 — the served 116-surface artifact). */
788
- interface BlindSurfaceInventory {
789
- zone: string;
790
- label: string;
791
- verifiedAt: string | null;
792
- /** The discovery sweep date (the ww29 run). */
793
- discoveredAt: string | null;
794
- surfaces: BlindSurfaceRow[];
795
- counts: {
796
- total: number;
797
- dataFull: number;
798
- blind: number;
799
- pinned: number;
800
- };
801
- /** The resources the sweep found data-full (safe for unfiltered reads). */
802
- dataFull: string[];
803
- remedies: {
804
- generic: string;
805
- byResource: Record<string, string>;
806
- };
807
- }
808
768
  /** The create-blocker class (issue #12 — the closed 9-set; the gate re-derives). */
809
769
  type CreateBlockerKind = 'ok' | 'blind-reference' | 'blind-parent' | 'picklist-unexposed' | 'undocumented-ladder' | 'resource-role-pair' | 'delete-absent' | 'non-mutable' | 'unknown';
810
770
  /**
@@ -1020,7 +980,7 @@ interface RelationshipResource {
1020
980
  note: string;
1021
981
  proof: string;
1022
982
  } | null;
1023
- /** The spec-derived name-like field the recovery marker query filters on (issue #9; null = none). */
983
+ /** The spec-derived name-like marker field (issue #9; null = none). */
1024
984
  markerField: string | null;
1025
985
  }
1026
986
 
@@ -1269,7 +1229,7 @@ interface MutationOpts {
1269
1229
  * written; a 429 is still retried per `Retry-After` on the pre-#105
1270
1230
  * retriable set, GET/PUT/DELETE + flagged calls. The optional stale-object
1271
1231
  * guard's verification read keeps the client budget. Compound ops
1272
- * (`time_entries.createForResource`, `companies.upsertByName`) apply the
1232
+ * (e.g. `time_entries.moveToTicket`, `tickets.changeStatus`) apply the
1273
1233
  * override to the op's mutation send only — their pre-wire resolution
1274
1234
  * reads keep the client budget.)
1275
1235
  */
@@ -1378,10 +1338,13 @@ declare function toArray<T>(iter: AsyncIterable<T>): Promise<T[]>;
1378
1338
 
1379
1339
  /** Query-walk layer of `BaseResource` (issue #165): paging, bounded query, blind count, latest probes. */
1380
1340
  declare abstract class QueryBase<T = Record<string, unknown>> {
1381
- protected readonly http: HttpClient;
1341
+ private readonly httpClient;
1382
1342
  protected readonly config: BaseResourceConfig;
1383
1343
  /** Default page size for query walks (the client's resolved `pageSize`). */
1384
1344
  protected readonly defaultPageSize: number;
1345
+ /** The transport client behind this resource. Public: the hand-written special ops read
1346
+ * `resource.http` instead of taking a redundant `http` argument (issue #292). */
1347
+ get http(): HttpClient;
1385
1348
  /** Versioned global URL segment (from the config), e.g. '/V1.0/Companies'. */
1386
1349
  protected get resourcePath(): string;
1387
1350
  /** The vendor entity this resource's ids identify (issue #116 — the `details.idRefs` label, e.g. `company`). */
@@ -1898,17 +1861,6 @@ declare class BillingItemApprovalLevelsResource extends BaseResource<BillingItem
1898
1861
  create(data: BillingItemApprovalLevelCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<BillingItemApprovalLevelCreate>>;
1899
1862
  }
1900
1863
 
1901
- /** The shared window opts shape (`TimeEntriesWindowOptions` is an alias of
1902
- * this type — `tz` is the issue #66 addition). */
1903
- interface DateWindowOptions {
1904
- /** Window anchor (default: now) — tests pin it for determinism. */
1905
- now?: Date;
1906
- /** Max records (default 500 = the hard cap — a call without limit takes the first 500 rows in vendor id order; a window with more than 500 matching rows needs the bounded query op with the same date-window filter — its 2500-row walk cap, issue #128). */
1907
- limit?: number;
1908
- /** 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). For the date-only `time_entries.dateWorked` the zone only picks the calendar dates; the wire bounds are whole UTC days of them (see `dateOnlyWindowBounds`). */
1909
- tz?: string;
1910
- }
1911
-
1912
1864
  /**
1913
1865
  * BillingItemsResource — BillingItems resource (G5 batch B, plan key 'billing_items').
1914
1866
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
@@ -1949,30 +1901,6 @@ declare class BillingItemsResource extends BaseResource<BillingItems, BillingIte
1949
1901
  resolve(identifier: number | string, opts?: {
1950
1902
  expand?: boolean;
1951
1903
  }): Promise<BillingItemsSummary | null>;
1952
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1953
- customRange(from: string, to: string, opts?: DateWindowOptions): Promise<BillingItems[]>;
1954
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1955
- last14(opts?: DateWindowOptions): Promise<BillingItems[]>;
1956
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1957
- last24h(opts?: DateWindowOptions): Promise<BillingItems[]>;
1958
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1959
- last30(opts?: DateWindowOptions): Promise<BillingItems[]>;
1960
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1961
- last7(opts?: DateWindowOptions): Promise<BillingItems[]>;
1962
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1963
- last90(opts?: DateWindowOptions): Promise<BillingItems[]>;
1964
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1965
- lastFullFortnight(opts?: DateWindowOptions): Promise<BillingItems[]>;
1966
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1967
- lastFullMonth(opts?: DateWindowOptions): Promise<BillingItems[]>;
1968
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1969
- lastFullQuarter(opts?: DateWindowOptions): Promise<BillingItems[]>;
1970
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1971
- lastFullWeek(opts?: DateWindowOptions): Promise<BillingItems[]>;
1972
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1973
- today(opts?: DateWindowOptions): Promise<BillingItems[]>;
1974
- /** Node-parity special op (hand-written in src/resources/special/billing_items.ts). */
1975
- yesterday(opts?: DateWindowOptions): Promise<BillingItems[]>;
1976
1904
  }
1977
1905
 
1978
1906
  /**
@@ -2152,14 +2080,6 @@ declare class ClassificationIconsResource extends BaseResource<ClassificationIco
2152
2080
  }): Promise<ClassificationIconSummary[]>;
2153
2081
  }
2154
2082
 
2155
- interface CompaniesDomainSearchOptions {
2156
- /** Node-parity knob: `'eq'` is mapped to `contains` (vendor has no exact
2157
- * domain operator for URL fields). Both values behave identically. */
2158
- searchType?: 'contains' | 'eq';
2159
- /** Max companies to return (default 25, clamped to 1..500). */
2160
- limit?: number;
2161
- }
2162
-
2163
2083
  interface CompanySearchOptions {
2164
2084
  /** Max companies to return (default 25, clamped to 1..500). */
2165
2085
  limit?: number;
@@ -2182,43 +2102,6 @@ interface CompanyFamilyRow extends Company {
2182
2102
  family?: CompanyFamily;
2183
2103
  }
2184
2104
 
2185
- interface CompaniesUpsertByNameParams {
2186
- /** The company phone (live-required on the ww29 create). */
2187
- phone: string;
2188
- /**
2189
- * The owner resource (REQUIRED on the create path — an active NON-API-only
2190
- * resource; the node cannot enumerate candidates: the resources table is
2191
- * blind to the API user). Absent + a dedup miss → the typed
2192
- * OWNER_RESOURCE_REQUIRED (zero wire, the remedy names the fixture-free fix).
2193
- */
2194
- ownerResourceID?: number;
2195
- /** The company type picklist (default 1 — the ww29-proven value). */
2196
- companyType?: number;
2197
- }
2198
- /** The typed blindSurface caveat (both the EXISTS and the CREATED results). */
2199
- interface CompaniesBlindSurfaceCaveat {
2200
- companies: true;
2201
- caveat: string;
2202
- /**
2203
- * The S12-C base-level typed sentinel (additive) — present when the dedup
2204
- * read hit the plan-pinned blind shape (zero items on companies.query).
2205
- */
2206
- sentinel?: BlindSurfaceInfo;
2207
- }
2208
- /** The typed EXISTS/CREATED result (blind-surface-aware). */
2209
- interface CompaniesUpsertByNameResult {
2210
- /** The company id (existing match or newly created). */
2211
- id: number;
2212
- /** False when the dedup match short-circuited the create. */
2213
- created: boolean;
2214
- /** The matched record (present when created is false). */
2215
- existing?: Company;
2216
- /** The dedup boundary carried IN the result (a query-miss is NOT proof of absence). */
2217
- blindSurface: CompaniesBlindSurfaceCaveat;
2218
- /** The vendor side effects reported on the created result (the V5 auto-location). */
2219
- sideEffects?: string[];
2220
- }
2221
-
2222
2105
  /** One picklist entry of `TicketModel.status` (the vendor sends `value` as a string). */
2223
2106
  interface TicketStatusPicklistValue {
2224
2107
  id: number;
@@ -2413,6 +2296,14 @@ interface CrmPrepareResult {
2413
2296
  caveats: string[];
2414
2297
  }
2415
2298
 
2299
+ interface CompaniesDomainSearchOptions {
2300
+ /** Node-parity knob: `'eq'` is mapped to `contains` (vendor has no exact
2301
+ * domain operator for URL fields). Both values behave identically. */
2302
+ searchType?: 'contains' | 'eq';
2303
+ /** Max companies to return (default 25, clamped to 1..500). */
2304
+ limit?: number;
2305
+ }
2306
+
2416
2307
  /** The closed `source` set for `companies.unbilledWork`. */
2417
2308
  type UnbilledWorkSource = 'posted_uninvoiced' | 'invoice' | 'date_range' | 'tickets';
2418
2309
  /** Options for `unbilledWork` (closed bag; the pinned defaults). */
@@ -2578,9 +2469,9 @@ declare class CompaniesResource extends BaseResource<Company, CompanyCreate, Com
2578
2469
  /** Get the Company with its primary context records in one call (each part a single-record
2579
2470
  * fetch; no sub-lists; absent/dangling references come back null). */
2580
2471
  getContext(id: Identifier): Promise<CompanyContext>;
2581
- /** Node-parity special op (hand-written in src/resources/special/companies.ts). */
2472
+ /** Node-parity special op (hand-written in src/resources/special/companies/search.ts). */
2582
2473
  searchByDomain(domain: string, opts?: CompaniesDomainSearchOptions): Promise<Company[]>;
2583
- /** Node-parity special op (hand-written in src/resources/special/companies.ts). */
2474
+ /** Node-parity special op (hand-written in src/resources/special/companies/search.ts). */
2584
2475
  searchByIdentity(identity: {
2585
2476
  companyName?: string;
2586
2477
  email?: string;
@@ -2588,13 +2479,11 @@ declare class CompaniesResource extends BaseResource<Company, CompanyCreate, Com
2588
2479
  }, opts?: {
2589
2480
  limit?: number;
2590
2481
  }): Promise<Company[]>;
2591
- /** Node-parity special op (hand-written in src/resources/special/companies.ts). */
2592
- upsertByName(companyName: string, params: CompaniesUpsertByNameParams, opts?: MutationOpts): Promise<CompaniesUpsertByNameResult | DryRunResult<Record<string, unknown>>>;
2593
- /** Node-parity special op (hand-written in src/resources/special/companies.ts). */
2482
+ /** Node-parity special op (hand-written in src/resources/special/companies/fullProfile.ts). */
2594
2483
  fullProfile(id: Identifier, opts?: CompanyFullProfileOptions): Promise<CompanyFullProfile>;
2595
- /** Node-parity special op (hand-written in src/resources/special/companies.ts). */
2484
+ /** Node-parity special op (hand-written in src/resources/special/companies/unbilledWork.ts). */
2596
2485
  unbilledWork(id: Identifier, opts?: UnbilledWorkOptions): Promise<UnbilledWorkResult>;
2597
- /** Node-parity special op (hand-written in src/resources/special/companies.ts). */
2486
+ /** Node-parity special op (hand-written in src/resources/special/companies/prepareCrmWrite.ts). */
2598
2487
  prepareCrmWrite(input: CrmPrepareInput): Promise<CrmPrepareResult>;
2599
2488
  }
2600
2489
 
@@ -3503,14 +3392,17 @@ declare class ContactGroupsResource extends BaseResource<ContactGroups, ContactG
3503
3392
  }): Promise<ContactGroupsSummary[]>;
3504
3393
  }
3505
3394
 
3506
- /**
3507
- * Contacts special ops — node-parity `moveToCompany` (G4 batch A).
3508
- *
3509
- * The node's "move contact to company" composition: read the source contact,
3510
- * verify the destination company, abort when the email already exists under
3511
- * that company (the vendor's duplicate-email rule), create the contact under
3512
- * the destination, and optionally delete the source.
3513
- */
3395
+ /** One composite part\'s outcome: the value, or null + the typed absent reason. */
3396
+ interface CompositePartValue<TValue = unknown> {
3397
+ value: TValue | null;
3398
+ /** Present only when the part degraded (typed reason). */
3399
+ absent?: string;
3400
+ /** The tenant\'s closed-status set this part filtered on (the open-tickets parts only). */
3401
+ closedStatus?: {
3402
+ closedIds: number[];
3403
+ source: 'resolved';
3404
+ };
3405
+ }
3514
3406
 
3515
3407
  /**
3516
3408
  * `moveToCompany` options. Extends `MutationOpts` (G10b F1): `dryRun` and
@@ -3533,31 +3425,48 @@ interface MoveToCompanyResult {
3533
3425
  created: true;
3534
3426
  sourceDeleted: boolean;
3535
3427
  }
3536
- interface ContactsUpsertByEmailExtra {
3537
- /** Contact first name (default: the email local-part — the required-set gap the node fills). */
3538
- firstName?: string;
3539
- /** Contact last name (default: the non-empty neutral 'Unknown' — the ww29 create 500s on an empty lastName; S12-A live-verified). */
3540
- lastName?: string;
3541
- /**
3542
- * The zone quirk ABSORBED: a JSON boolean is ACCEPTED and mapped to the
3543
- * zone-correct number (true→1 / false→0); a raw 0/1 number passes through.
3544
- * Default: active (1).
3545
- */
3546
- isActive?: boolean | number;
3428
+ /** Options for `fullProfile` (all optional; the pinned defaults). */
3429
+ interface ContactFullProfileOptions {
3430
+ /** Max open-ticket records (default 50, 1-2500 — the server's `ticket_limit` bound). */
3431
+ ticketLimit?: number;
3547
3432
  }
3548
- /** The typed EXISTS/CREATED result (the requested taxonomy). */
3549
- interface ContactsUpsertByEmailResult {
3550
- /** The contact id (existing match or newly created). */
3551
- id: number;
3552
- /** False when the dedup match short-circuited the create. */
3553
- created: boolean;
3554
- /**
3555
- * The matched record (present when created is false). NOTE: emailAddress
3556
- * arrives [REDACTED] under the default redaction policy (the PII set) —
3557
- * the result is equality-proof by the server-side match, NOT by reading
3558
- * the email back.
3559
- */
3560
- existing?: ContactSummary;
3433
+ /**
3434
+ * The contact with its company and its open tickets in ONE call (issue #313):
3435
+ * the composite the MCP server served as `autotask_contact_full_profile`.
3436
+ *
3437
+ * TWO-STAGE root: the vendor endpoint is parent-scoped
3438
+ * (GET /V1.0/Companies/{parentId}/Contacts/{id}) and the SDK's `contacts.get`
3439
+ * declares TWO required positional args (parentId, id) — a flat single-arg
3440
+ * call can never satisfy it. Stage 1 resolves the FK with a single-record
3441
+ * query (the root read is NOT caught: a vendor fault on it fails the call
3442
+ * with the typed error; no row -> the typed NOT_FOUND for the contact id).
3443
+ * A contact with no company FK: the contact row itself is the root and the
3444
+ * company part degrades to `absent: 'NO_FK'` (the op never hard-fails on a
3445
+ * missing company).
3446
+ *
3447
+ * Parts (bounded reads through the registry seam):
3448
+ * - `company`: `companies.get [fk]` (the typed absent degradation on a miss).
3449
+ * - `open_tickets`: the open tickets for the contact id — the closed set is
3450
+ * the tenant's live status picklist (`tickets.statusSemantics` with
3451
+ * `allowAssumed: false`), never a literal; a composite that cannot tell
3452
+ * open from closed degrades the part to `absent: 'CLOSED_STATUS_UNRESOLVED'`
3453
+ * (with the `closedStatus` disclosure).
3454
+ *
3455
+ * The result is the served pre-marking shape `{ root, parts }`: the server
3456
+ * keeps its per-part untrusted marking on top, so the tool output is
3457
+ * field-for-field the composite the server served today. Wire: 1 stage-1
3458
+ * query + 1 root read (2-3 with the company part) + the open-tickets
3459
+ * resolution (status catalog, field-cached) + 1 tickets query.
3460
+ */
3461
+ interface ContactFullProfile {
3462
+ /** The contact (the parent-scoped root read, or the stage-1 row when the contact has no company FK). */
3463
+ root: Contact;
3464
+ parts: {
3465
+ /** The contact's company (the `companies.get` record), or the typed absent degradation (`NO_FK` when the contact has no company). */
3466
+ company: CompositePartValue<Company>;
3467
+ /** The contact's open tickets (the bounded `tickets.query` result envelope) + the `closedStatus` disclosure, or the typed absent degradation. */
3468
+ open_tickets: CompositePartValue<BoundedQueryResult<Ticket>>;
3469
+ };
3561
3470
  }
3562
3471
 
3563
3472
  /**
@@ -3617,7 +3526,7 @@ declare class ContactsResource extends BaseResource<Contact, ContactCreate, Cont
3617
3526
  /** Node-parity special op (hand-written in src/resources/special/contacts.ts). */
3618
3527
  moveToCompany(sourceContactId: Identifier, destinationCompanyId: Identifier, opts?: MoveToCompanyOptions): Promise<MoveToCompanyResult | DryRunResult<Record<string, unknown>>>;
3619
3528
  /** Node-parity special op (hand-written in src/resources/special/contacts.ts). */
3620
- upsertByEmail(companyID: Identifier, email: string, extra?: ContactsUpsertByEmailExtra, opts?: MutationOpts): Promise<ContactsUpsertByEmailResult | DryRunResult<Record<string, unknown>>>;
3529
+ fullProfile(id: Identifier, opts?: ContactFullProfileOptions): Promise<ContactFullProfile>;
3621
3530
  }
3622
3531
 
3623
3532
  /**
@@ -4518,6 +4427,33 @@ declare class ContractServiceUnitsResource extends BaseResource<ContractServiceU
4518
4427
  }): Promise<ContractServiceUnitSummary | null>;
4519
4428
  }
4520
4429
 
4430
+ /** Options for `fullProfile` (all optional; the pinned defaults). */
4431
+ interface ContractFullProfileOptions {
4432
+ /** Max service records (default 50, 1-2500 — the server's `service_limit` bound). */
4433
+ serviceLimit?: number;
4434
+ /** Max billing-rule records (default 50, 1-2500 — the server's `billing_rule_limit` bound). */
4435
+ billingRuleLimit?: number;
4436
+ }
4437
+ /**
4438
+ * The contract with its services, billing rules, recent charges and service
4439
+ * units in ONE call (issue #313). See the module doc for the root/part
4440
+ * semantics, the fixed recent-N charges part and the fixed units cap.
4441
+ */
4442
+ interface ContractFullProfile {
4443
+ /** The contract record (the root read). */
4444
+ root: Contract;
4445
+ parts: {
4446
+ /** The contract's services (the bounded `contract_services.query` result envelope), or the typed absent degradation. */
4447
+ services: CompositePartValue<BoundedQueryResult<ContractService>>;
4448
+ /** The contract's billing rules (the bounded `contract_billing_rules.query` result envelope), or the typed absent degradation. */
4449
+ billing_rules: CompositePartValue<BoundedQueryResult<ContractBillingRule>>;
4450
+ /** The N newest charges (the count-anchored `latest` CHARGES_RECENT_CAP envelope), or the typed absent degradation. */
4451
+ charges: CompositePartValue<BoundedQueryResult<ContractCharge>>;
4452
+ /** The service units (the bounded `contract_service_units.query` envelope at the fixed SERVICE_UNITS_CAP), or the typed absent degradation. */
4453
+ units: CompositePartValue<BoundedQueryResult<ContractServiceUnit>>;
4454
+ };
4455
+ }
4456
+
4521
4457
  /** The full LOB chain for one contract. */
4522
4458
  interface ContractLineOfBusinessResult {
4523
4459
  contractId: Identifier;
@@ -4543,10 +4479,10 @@ type ProfitabilityLabourCostMethod = 'billing_item_our_cost' | 'contract_role_co
4543
4479
  /** A ladder rung that actually carried rows (plus 'missing'). */
4544
4480
  type ProfitRateSource = 'billing_item.ourCost' | 'contract_role_costs.rate' | 'resource.internalCost' | 'provided' | 'missing';
4545
4481
  interface ProfitabilityOptions {
4546
- /** Window start, YYYY-MM-DD (REQUIRED). */
4547
- dateFrom: string;
4548
- /** Window end, YYYY-MM-DD, >= dateFrom (REQUIRED). */
4549
- dateTo: string;
4482
+ /** Window start, YYYY-MM-DD. Optional pair with dateTo: BOTH omitted → the window defaults to the last full calendar month (UTC) and the result's period carries defaulted + note; exactly ONE supplied → typed CONFIG_ERROR (a half window is never sent). */
4483
+ dateFrom?: string;
4484
+ /** Window end, YYYY-MM-DD, >= dateFrom. Optional pair with dateFrom (same contract). */
4485
+ dateTo?: string;
4550
4486
  /** The ladder rung rows start from (default 'billing_item_our_cost'; row-level fallback walks down). */
4551
4487
  labourCostMethod?: ProfitabilityLabourCostMethod;
4552
4488
  /** The caller-supplied labour rate; REQUIRED when labourCostMethod is 'provided'; optional final-rung catch-all otherwise. */
@@ -4736,6 +4672,10 @@ interface ContractsProfitabilityResult {
4736
4672
  dateTo: string;
4737
4673
  months: string[];
4738
4674
  asOf: string;
4675
+ /** true only when dateFrom/dateTo were both omitted and the window defaulted (to the last full calendar month, UTC). */
4676
+ defaulted?: boolean;
4677
+ /** Present only when defaulted: the windowDefaulted note (month label + UTC basis). */
4678
+ note?: string;
4739
4679
  };
4740
4680
  currency: {
4741
4681
  companyCurrencyID: number | null;
@@ -4844,10 +4784,12 @@ declare class ContractsResource extends BaseResource<Contract, ContractCreate, C
4844
4784
  search(query: string, opts?: {
4845
4785
  limit?: number;
4846
4786
  }): Promise<ContractSummary[]>;
4847
- /** Node-parity special op (hand-written in src/resources/special/contracts.ts). */
4787
+ /** Node-parity special op (hand-written in src/resources/special/contracts/profitability.ts). */
4848
4788
  profitability(id: Identifier, opts: ProfitabilityOptions): Promise<ContractsProfitabilityResult>;
4849
- /** Node-parity special op (hand-written in src/resources/special/contracts.ts). */
4789
+ /** Node-parity special op (hand-written in src/resources/special/contracts/lineOfBusiness.ts). */
4850
4790
  lineOfBusiness(contractId: Identifier, associationId?: Identifier): Promise<ContractLineOfBusinessResult>;
4791
+ /** Node-parity special op (hand-written in src/resources/special/contracts/fullProfile.ts). */
4792
+ fullProfile(id: Identifier, opts?: ContractFullProfileOptions): Promise<ContractFullProfile>;
4851
4793
  }
4852
4794
 
4853
4795
  /**
@@ -5426,35 +5368,11 @@ declare class InvoicesResource extends BaseResource<Invoice, InvoiceCreate, Invo
5426
5368
  expand?: boolean;
5427
5369
  }): Promise<InvoiceSummary | null>;
5428
5370
  /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5429
- customRange(from: string, to: string, opts?: DateWindowOptions): Promise<Invoice[]>;
5430
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5431
- last14(opts?: DateWindowOptions): Promise<Invoice[]>;
5432
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5433
- last24h(opts?: DateWindowOptions): Promise<Invoice[]>;
5434
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5435
- last30(opts?: DateWindowOptions): Promise<Invoice[]>;
5436
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5437
- last7(opts?: DateWindowOptions): Promise<Invoice[]>;
5438
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5439
- last90(opts?: DateWindowOptions): Promise<Invoice[]>;
5440
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5441
- lastFullFortnight(opts?: DateWindowOptions): Promise<Invoice[]>;
5442
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5443
- lastFullMonth(opts?: DateWindowOptions): Promise<Invoice[]>;
5444
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5445
- lastFullQuarter(opts?: DateWindowOptions): Promise<Invoice[]>;
5446
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5447
- lastFullWeek(opts?: DateWindowOptions): Promise<Invoice[]>;
5448
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5449
5371
  markupHtml(id: Identifier): Promise<string>;
5450
5372
  /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5451
5373
  markupXml(id: Identifier): Promise<string>;
5452
5374
  /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5453
5375
  pdf(id: Identifier): Promise<Buffer>;
5454
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5455
- today(opts?: DateWindowOptions): Promise<Invoice[]>;
5456
- /** Node-parity special op (hand-written in src/resources/special/invoices.ts). */
5457
- yesterday(opts?: DateWindowOptions): Promise<Invoice[]>;
5458
5376
  }
5459
5377
 
5460
5378
  /**
@@ -6337,6 +6255,33 @@ declare class QuoteLocationsResource extends BaseResource<QuoteLocation, QuoteLo
6337
6255
  }): Promise<QuoteLocationSummary | null>;
6338
6256
  }
6339
6257
 
6258
+ /** Options for `withItems` (all optional; the pinned defaults). */
6259
+ interface QuoteWithItemsOptions {
6260
+ /** Max line-item records (default 50, 1-2500 — the server's `item_limit` bound). */
6261
+ itemLimit?: number;
6262
+ }
6263
+ /**
6264
+ * The quote with its line items in ONE call (issue #313): the composite the
6265
+ * MCP server served as `autotask_quote_get` (the plain `quotes.get` stays the
6266
+ * vendor read). The quote is the ROOT (a missing quote fails the call with
6267
+ * the typed NOT_FOUND); the items PART is the bounded fan-out
6268
+ * (`quote_items.query` filtered on `quoteID eq`), degrading independently to
6269
+ * `{ value: null, absent: <code> }`.
6270
+ *
6271
+ * The result is the served pre-marking shape `{ root, parts }`: the server
6272
+ * keeps its per-part untrusted marking on top, so the tool output is
6273
+ * field-for-field the composite the server served today. Wire: 1 root read +
6274
+ * 1 bounded query (1 page common case).
6275
+ */
6276
+ interface QuoteWithItems {
6277
+ /** The quote record (the root read). */
6278
+ root: Quote;
6279
+ parts: {
6280
+ /** The line items (the bounded `quote_items.query` result envelope), or the typed absent degradation. */
6281
+ items: CompositePartValue<BoundedQueryResult<QuoteItem>>;
6282
+ };
6283
+ }
6284
+
6340
6285
  /**
6341
6286
  * QuotesResource — Quote resource (G4 batch A, plan key 'quotes').
6342
6287
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
@@ -6386,6 +6331,8 @@ declare class QuotesResource extends BaseResource<Quote, QuoteCreate, QuoteUpdat
6386
6331
  search(query: string, opts?: {
6387
6332
  limit?: number;
6388
6333
  }): Promise<QuoteSummary[]>;
6334
+ /** Node-parity special op (hand-written in src/resources/special/quotes.ts). */
6335
+ withItems(id: Identifier, opts?: QuoteWithItemsOptions): Promise<QuoteWithItems>;
6389
6336
  }
6390
6337
 
6391
6338
  /**
@@ -6541,213 +6488,248 @@ declare class ResourceSkillsResource extends BaseResource<ResourceSkill, Resourc
6541
6488
  }): Promise<ResourceSkillSummary | null>;
6542
6489
  }
6543
6490
 
6544
- interface TransferOwnershipOptions {
6545
- /** Default `true`: list the changes, issue no update. */
6546
- dryRun?: boolean;
6547
- /**
6548
- * Issue #105: the per-call retry budget for the per-company PUTs. `0` =
6549
- * exactly one send per company, no auto-retry; omitted = the client's
6550
- * configured `maxRetries`.
6551
- */
6552
- maxRetries?: number;
6553
- }
6554
- interface OwnershipChange {
6555
- /** The company id being re-owned. */
6556
- id: Identifier;
6557
- /** Current owner (null when the vendor omits it). */
6558
- fromOwnerResourceID: number | null;
6559
- /** The destination resource id every change applies. */
6560
- toOwnerResourceID: Identifier;
6561
- }
6562
- interface TransferOwnershipResult {
6563
- /** `true` when no update was issued. */
6564
- dryRun: boolean;
6565
- /** One entry per id, in the given order. */
6566
- changes: OwnershipChange[];
6491
+ interface TicketChangeStatusResult {
6492
+ ticketId: Identifier;
6493
+ previousStatus: number | null;
6494
+ /** The post-PUT read-back value (verified === targetStatus or the op throws). */
6495
+ status: number;
6496
+ changed: true;
6497
+ /** The map-required fields the node filled with proven-safe defaults. */
6498
+ filledFields: string[];
6499
+ /** Discovery-merge count applied on PUT 500s (0 = first-try PUT). */
6500
+ discoveryMerges: number;
6567
6501
  }
6568
- /**
6569
- * The pinned dry-run envelope for `transferOwnership` (G10b F2) + the
6570
- * from→to list the gateway wants (`changes` — an additive field on top of
6571
- * the pinned shape, present in both modes).
6572
- */
6573
- interface TransferOwnershipDryRunResult extends DryRunResult<OwnershipChange[]> {
6574
- /** One entry per id, in the given order (the from→to list). */
6575
- changes: OwnershipChange[];
6502
+ interface TicketChangeStatusNoChange {
6503
+ ticketId: Identifier;
6504
+ changed: false;
6505
+ status: number;
6506
+ reason: 'NO_CHANGE';
6576
6507
  }
6577
6508
 
6578
6509
  /**
6579
- * ResourcesResource — Resource resource (G5 batch B, plan key 'resources').
6580
- * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
6581
- * Do not hand-edit; re-run the generator (the plan is the source of truth).
6510
+ * One route fact on a composite child part that the default global `/query`
6511
+ * route did not serve (issue #35): the route attempted, the path it
6512
+ * attempted, and the HTTP status that failed it (null when the failure was
6513
+ * not an HTTP status — a shape or transport fault).
6582
6514
  */
6583
-
6584
- /** Query params for ResourcesResource (the G3 filter surface; no per-resource invention). */
6585
- type ResourcesResourceQueryParams = QueryParams;
6586
- declare class ResourcesResource extends BaseResource<Resource, ResourceCreate, ResourceUpdate> {
6587
- private readonly clientConfig;
6588
- constructor(http: HttpClient, clientConfig: ResolvedAutotaskConfig, pageSize: number);
6589
- /** Query Resource records with the G3 filter surface (server-side JSON filter). */
6590
- query(params?: ResourcesResourceQueryParams): AsyncIterable<Resource>;
6591
- /** Get every Resource record (the MCP-preferred read; 1000-page guarded). */
6592
- queryAll(params?: ResourcesResourceQueryParams): Promise<Resource[]>;
6593
- /** Count matching records (queryCount envelope unwrapped to a plain number). */
6594
- count(params?: ResourcesResourceQueryParams): Promise<number>;
6595
- /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
6596
- get(id: Identifier, opts?: {
6597
- fresh?: boolean;
6598
- } | null): Promise<Resource>;
6599
- /** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
6600
- * keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
6601
- * partial body is merged into the CURRENT record first: one fresh GET (which also serves the
6602
- * stale-object guard's read) then the collection PUT of the merged model — an explicit null in the
6603
- * caller body sends null; an omitted field keeps the current value. `raw: true` in the opts bag sends
6604
- * the body as-is (full model or intentional partial — the compatibility escape hatch; no merge read).
6605
- * `dryRun: true` returns the pinned envelope whose `data` is the merged body (the exact confirmed
6606
- * wire) with the best-effort diff, from that same single read; a caller-supplied lastModifiedDate that
6607
- * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
6608
- update(id: Identifier, data: ResourceUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<ResourceUpdate>>;
6609
- /** Resolve a Resource from a numeric id (or, where the vendor indexes a primary text field,
6610
- * from an exact match on firstName / lastName). A numeric id miss throws NOT_FOUND; a complete
6611
- * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
6612
- * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
6613
- * The compact shape is the structural alias of the full record; `expand: true` is the
6614
- * type-level escape hatch. */
6615
- resolve(identifier: number | string, opts?: {
6616
- expand?: boolean;
6617
- }): Promise<ResourceSummary | null>;
6618
- /** Search Resource records: bounded contains on firstName + lastName (no vendor free-text search exists);
6619
- * limit defaults to 25, max 500. */
6620
- search(query: string, opts?: {
6621
- limit?: number;
6622
- }): Promise<ResourceSummary[]>;
6623
- /** Node-parity special op (hand-written in src/resources/special/resources.ts). */
6624
- transferOwnership(sourceResourceIds: Identifier[], destinationResourceId: Identifier, opts?: TransferOwnershipOptions): Promise<TransferOwnershipResult | TransferOwnershipDryRunResult>;
6625
- /** Node-parity special op (hand-written in src/resources/special/resources.ts). */
6626
- whoAmI(): Promise<ResourceSummary | null>;
6515
+ interface TicketChildRouteFact {
6516
+ /** The route that was attempted (the plan-declared scoped collection read is 'scoped'). */
6517
+ route: 'global' | 'scoped';
6518
+ /** The path the route attempted (e.g. '/V1.0/TicketNotes/query' or '/V1.0/Tickets/527119/Notes'). */
6519
+ path: string;
6520
+ /** The HTTP status that failed the route (null for a non-HTTP failure). */
6521
+ httpStatus: number | null;
6627
6522
  }
6628
6523
 
6629
- /**
6630
- * ResourceTimeOffAdditionalResource — ResourceTimeOffAdditional resource (G5 batch B, plan key 'resource_time_off_additional').
6631
- * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
6632
- * Do not hand-edit; re-run the generator (the plan is the source of truth).
6633
- * Parent-scoped child of 'resources': CRUD under /V1.0/Resources/{parentId}/TimeOffAdditional —
6634
- * the global query/count stay unscoped (narrow with the 'resourceID' filter).
6635
- */
6636
-
6637
- /** Query params for ResourceTimeOffAdditionalResource (the G3 filter surface; no per-resource invention). */
6638
- type ResourceTimeOffAdditionalResourceQueryParams = QueryParams;
6639
- declare class ResourceTimeOffAdditionalResource extends BaseResource<ResourceTimeOffAdditional, ResourceTimeOffAdditionalCreate, ResourceTimeOffAdditionalUpdate> {
6640
- constructor(http: HttpClient, pageSize: number);
6641
- /** Update a record under the parent (PATCH on the collection — swagger documents put+patch there;
6642
- * the vendor keys the record by the id in the body; OperationResultModel → { id}). `dryRun: true` returns
6643
- * the pinned envelope with the best-effort diff; a caller-supplied lastModifiedDate that
6644
- * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
6645
- update(parentId: Identifier, id: Identifier, data: ResourceTimeOffAdditionalUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<ResourceTimeOffAdditionalUpdate>>;
6646
- /** Resolve a ResourceTimeOffAdditional from a numeric id (or, where the vendor indexes a primary text field,
6647
- * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
6648
- * a bare value rejects with a config error (ids only);
6649
- * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
6650
- * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
6651
- * The compact shape is the structural alias of the full record; `expand: true` is the
6652
- * type-level escape hatch. */
6653
- resolve(identifier: number | string, opts?: {
6654
- expand?: boolean;
6655
- }): Promise<ResourceTimeOffAdditionalSummary | null>;
6656
- /** Node-parity special op (hand-written in src/resources/special/resource_time_off_additional.ts). */
6657
- getByResource(resourceId: Identifier): Promise<ResourceTimeOffAdditional[]>;
6524
+ /** Options for `fullContext` (all optional; the pinned defaults). */
6525
+ interface TicketFullContextOptions {
6526
+ /** Max note records (default 50). */
6527
+ noteLimit?: number;
6528
+ /** Max time-entry records (default 50). */
6529
+ timeEntryLimit?: number;
6530
+ /** Include the attachments part (default true) — METADATA only (ids + names); data download stays a separate op. */
6531
+ includeAttachments?: boolean;
6532
+ /** Include the histories part (default false — budget control). */
6533
+ includeHistories?: boolean;
6534
+ /** Long note/history text is truncated to this many chars in the served copy and flagged (default 500). */
6535
+ textLimit?: number;
6536
+ /** 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. */
6537
+ names?: boolean;
6538
+ /** 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` and the names section sets `truncated: true` (never an error). */
6539
+ maxNameReads?: number;
6540
+ }
6541
+ /** One capped list part (a full page sets `capped: true` — more may exist). */
6542
+ interface TicketFullContextPart<TItem = Record<string, unknown>> {
6543
+ items: TItem[];
6544
+ /** True when the part returned a full page (the vendor query has no sort — more may exist past the cap). */
6545
+ capped: boolean;
6546
+ /** Present only when the part was served by the plan-declared parent-scoped route (issue #35: the global /query route 404/500'd in this zone). Absent when the default global route served the part (working-zone shape unchanged). */
6547
+ route?: 'scoped';
6548
+ /** Present only when the part status is 'miss' (issue #35): every declared route attempted, in attempt order. The part serves no items; the call itself succeeds (a part miss never fails the op — the same rule as the FK 'absent' parts). */
6549
+ routeFacts?: TicketChildRouteFact[];
6550
+ }
6551
+ /** The attachments part is METADATA only (data download stays a separate op). */
6552
+ interface TicketFullContextAttachments {
6553
+ ids: number[];
6554
+ /** The attachment `title` (null when absent). */
6555
+ names: Array<string | null>;
6556
+ capped: boolean;
6557
+ route?: 'scoped';
6558
+ routeFacts?: TicketChildRouteFact[];
6658
6559
  }
6659
-
6660
6560
  /**
6661
- * ResourceTimeOffApproversResource — ResourceTimeOffApprover resource (G5 batch B, plan key 'resource_time_off_approvers').
6662
- * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
6663
- * Do not hand-edit; re-run the generator (the plan is the source of truth).
6664
- * Parent-scoped child of 'resources': CRUD under /V1.0/Resources/{parentId}/TimeOffApprovers —
6665
- * the global query/count stay unscoped (narrow with the 'resourceID' filter).
6561
+ * The full ticket context in ONE call (plan T3): the ticket + its context
6562
+ * parts (the proven `getContext` 5-part composite — dangling FKs come back
6563
+ * null and are reported in `parts`, a part miss never fails the op) + its
6564
+ * notes, time entries, attachment metadata and (opt-in) histories via the
6565
+ * timeline's bounded query machinery. 8 bounded reads (10 with
6566
+ * `includeHistories`); zero mutating. The ticket itself missing → the
6567
+ * `getContext` NotFoundError propagates.
6666
6568
  */
6667
-
6668
- /** Query params for ResourceTimeOffApproversResource (the G3 filter surface; no per-resource invention). */
6669
- type ResourceTimeOffApproversResourceQueryParams = QueryParams;
6670
- declare class ResourceTimeOffApproversResource extends BaseResource<ResourceTimeOffApprover, ResourceTimeOffApproverCreate, ResourceTimeOffApproverUpdate> {
6671
- constructor(http: HttpClient, pageSize: number);
6672
- /** Query ResourceTimeOffApprover records (global; narrow with the resourceID filter). */
6673
- query(params?: ResourceTimeOffApproversResourceQueryParams): AsyncIterable<ResourceTimeOffApprover>;
6674
- /** Get every ResourceTimeOffApprover record (the MCP-preferred read; 1000-page guarded). */
6675
- queryAll(params?: ResourceTimeOffApproversResourceQueryParams): Promise<ResourceTimeOffApprover[]>;
6676
- /** Count matching records (queryCount envelope unwrapped to a plain number). */
6677
- count(params?: ResourceTimeOffApproversResourceQueryParams): Promise<number>;
6678
- /** Get one record by parent + id (/V1.0/Resources/{parentId}/TimeOffApprovers/{id} — vendor item envelope; item: null → NotFoundError). */
6679
- get(parentId: Identifier, id: Identifier, opts?: {
6680
- fresh?: boolean;
6681
- } | null): Promise<ResourceTimeOffApprover>;
6682
- /** Resolve a ResourceTimeOffApprover from a numeric id (or, where the vendor indexes a primary text field,
6683
- * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
6684
- * a bare value rejects with a config error (ids only);
6685
- * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
6686
- * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
6687
- * The compact shape is the structural alias of the full record; `expand: true` is the
6688
- * type-level escape hatch. */
6689
- resolve(identifier: number | string, opts?: {
6690
- expand?: boolean;
6691
- }): Promise<ResourceTimeOffApproverSummary | null>;
6569
+ interface TicketFullContext {
6570
+ ticket: Ticket;
6571
+ /** Null when the ticket carries no companyID (or the record misses). */
6572
+ company: Company | null;
6573
+ /** Null when the ticket carries no contactID (or the record misses). */
6574
+ contact: Contact | null;
6575
+ /** Null when the ticket carries no assignedResourceID (or the record misses). */
6576
+ assignedResource: Resource | null;
6577
+ /** Null when the ticket carries no projectID (or the record misses). */
6578
+ project: Project | null;
6579
+ notes: TicketFullContextPart;
6580
+ timeEntries: TicketFullContextPart;
6581
+ /** Present when `includeAttachments` is not false (default: present). */
6582
+ attachments: TicketFullContextAttachments;
6583
+ /** Present only when `includeHistories: true`. */
6584
+ histories?: TicketFullContextPart;
6585
+ /** 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`). */
6586
+ truncated: boolean;
6587
+ /** The opt-in name/label section (issue #77) — present EXACTLY when `names: true` (the sibling keys are absent from the rows otherwise). */
6588
+ names?: CompositeNamesSection;
6589
+ /** The Line of Business chain that applies to this ticket — present EXACTLY when `names: true`. Resolved from the ticket's own `organizationalLevelAssociationID` when set, otherwise from the ticket's CONTRACT's pointer (`source: 'contract'`, `contractId` says which; the association is maintained on contracts in practice, so this is the common path). The three hops: the OrganizationalLevelAssociation, the OrganizationalLevel2 (the customizable "Line of Business" label) and the OrganizationalLevel1 (the division). An absent pointer anywhere is reported with all-`missing` markers; a dangling record is `unresolved`; a broken chain is never an error. Costs 1 association + up to 2 level reads inside `maxNameReads`, plus one cached contract read when the fallback runs. */
6590
+ lineOfBusiness?: LineOfBusinessNames;
6591
+ /** 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). */
6592
+ parts: {
6593
+ company: 'ok' | 'absent';
6594
+ contact: 'ok' | 'absent';
6595
+ assignedResource: 'ok' | 'absent';
6596
+ project: 'ok' | 'absent';
6597
+ notes: 'ok' | 'ok-scoped' | 'miss';
6598
+ timeEntries: 'ok' | 'ok-scoped' | 'miss';
6599
+ attachments: 'ok' | 'ok-scoped' | 'miss';
6600
+ histories?: 'ok' | 'ok-scoped' | 'miss';
6601
+ };
6692
6602
  }
6693
6603
 
6694
- /**
6695
- * ResourceTimeOffBalancesResource — ResourceTimeOffBalance resource (G5 batch B, plan key 'resource_time_off_balances').
6696
- * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
6697
- * Do not hand-edit; re-run the generator (the plan is the source of truth).
6698
- * Parent-scoped child of 'resources': CRUD under /V1.0/Resources/{parentId}/TimeOffBalances —
6699
- * the global query/count stay unscoped (narrow with the 'resourceID' filter).
6700
- */
6604
+ /** The full LOB chain for one ticket. */
6605
+ interface TicketLineOfBusinessResult {
6606
+ ticketId: Identifier;
6607
+ /** Where the association id came from: the ticket's own pointer, its contract's, the caller's argument, or null when none was found. */
6608
+ associationSource: 'ticket' | 'contract' | 'argument' | null;
6609
+ /** The contract consulted for the fallback (null when the ticket pointer or the argument supplied the id). */
6610
+ contractId: Identifier | null;
6611
+ /** The association row when served, otherwise null. */
6612
+ association: OrganizationalLevelAssociation | null;
6613
+ /** The OrganizationalLevel2 row (the customizable "Line of Business" label), otherwise null. */
6614
+ organizationalLevel2: OrganizationalLevel2 | null;
6615
+ /** The OrganizationalLevel1 row (the division), otherwise null. */
6616
+ organizationalLevel1: OrganizationalLevel1 | null;
6617
+ /** Explicit per-hop markers — a broken chain is reported, never thrown.
6618
+ * `capped` cannot occur on this op: its fixed budget always covers the full
6619
+ * chain (1 association + up to 2 level reads). */
6620
+ markers: {
6621
+ association: LineOfBusinessMarker;
6622
+ organizationalLevel2: LineOfBusinessMarker;
6623
+ organizationalLevel1: LineOfBusinessMarker;
6624
+ };
6625
+ }
6701
6626
 
6702
- /** Query params for ResourceTimeOffBalancesResource (the G3 filter surface; no per-resource invention). */
6703
- type ResourceTimeOffBalancesResourceQueryParams = QueryParams;
6704
- declare class ResourceTimeOffBalancesResource extends BaseResource<ResourceTimeOffBalance, ResourceTimeOffBalanceCreate, ResourceTimeOffBalanceUpdate> {
6705
- constructor(http: HttpClient, pageSize: number);
6706
- /** Get one record by parent + id (/V1.0/Resources/{parentId}/TimeOffBalances/{id} — vendor item envelope; item: null → NotFoundError). */
6707
- get(parentId: Identifier, id: Identifier, opts?: {
6708
- fresh?: boolean;
6709
- } | null): Promise<ResourceTimeOffBalance>;
6710
- /** Resolve a ResourceTimeOffBalance from a numeric id (or, where the vendor indexes a primary text field,
6711
- * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
6712
- * a bare value rejects with a config error (ids only);
6713
- * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
6714
- * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
6715
- * The compact shape is the structural alias of the full record; `expand: true` is the
6716
- * type-level escape hatch. */
6717
- resolve(identifier: number | string, opts?: {
6718
- expand?: boolean;
6719
- }): Promise<ResourceTimeOffBalanceSummary | null>;
6720
- /** Node-parity special op (hand-written in src/resources/special/resource_time_off_balances.ts). */
6721
- getByResource(resourceId: Identifier): Promise<ResourceTimeOffBalance[]>;
6722
- /** Node-parity special op (hand-written in src/resources/special/resource_time_off_balances.ts). */
6723
- getByYear(resourceId: Identifier, year: number): Promise<ResourceTimeOffBalance>;
6627
+ interface TicketSlaHealth {
6628
+ ticketId: Identifier;
6629
+ /** SLA result rows found for the ticket. */
6630
+ slaCount: number;
6631
+ /** `true` when every milestone of every SLA is met (a ticket with no SLAs is healthy). */
6632
+ healthy: boolean;
6633
+ /** True when a full page of SLA rows came back (more may exist; `healthy` is a lower bound). */
6634
+ truncated: boolean;
6635
+ slas: Array<{
6636
+ id: number;
6637
+ name: string | null;
6638
+ milestones: Array<{
6639
+ name: 'firstResponse' | 'resolution' | 'resolutionPlan';
6640
+ met: boolean | null;
6641
+ elapsedHours: number | null;
6642
+ }>;
6643
+ }>;
6644
+ }
6645
+ interface TicketSummaryResult {
6646
+ ticketId: Identifier;
6647
+ ticketNumber: string | null;
6648
+ title: string | null;
6649
+ /** `description` truncated to `summaryTextLimit` (default 500 chars, '…' suffix). */
6650
+ description: string;
6651
+ /** Length of the ORIGINAL description. */
6652
+ descriptionLength: number;
6653
+ descriptionTruncated: boolean;
6654
+ status: number | null;
6655
+ priority: number | null;
6656
+ companyID: number | null;
6657
+ contactID: number | null;
6658
+ assignedResourceID: number | null;
6659
+ projectID: number | null;
6660
+ createDate: string | null;
6661
+ dueDateTime: string | null;
6662
+ /** floor((now - createDate) / day) — null when createDate is absent. */
6663
+ ageDays: number | null;
6664
+ }
6665
+ interface TicketTimelineEvent {
6666
+ kind: 'note' | 'timeEntry' | 'history';
6667
+ id: number;
6668
+ date: string | null;
6669
+ /** `description`/`detail` truncated to `textLimit` (default 500 chars). */
6670
+ text: string | null;
6671
+ /** Notes only. */
6672
+ title: string | null;
6673
+ /** Time entries only. */
6674
+ hours: number | null;
6675
+ /** Histories only. */
6676
+ action: string | null;
6677
+ /** True when `text` was cut at `textLimit` (the full text is on the source record). */
6678
+ textTruncated: boolean;
6679
+ }
6680
+ interface TicketTimeline {
6681
+ ticketId: Identifier;
6682
+ count: number;
6683
+ /** Ascending by date (null dates last), bounded by `limit` (default 100, max 500). */
6684
+ events: TicketTimelineEvent[];
6685
+ /**
6686
+ * True when events were left out: a source returned `limit` rows (the
6687
+ * vendor query has no sort, so more may exist) or the merged list was cut
6688
+ * to `limit`. Narrow `since`/`until` to page through the rest.
6689
+ */
6690
+ truncated: boolean;
6691
+ /** Which sources (`notes`, `timeEntries`, `histories`) returned a full page. */
6692
+ cappedSources: string[];
6693
+ /**
6694
+ * Present only when at least one source deviated from the default global
6695
+ * `/query` route (issue #35): per-source route status — 'ok' (the global
6696
+ * route served it), 'ok-scoped' (the plan-declared scoped route served it
6697
+ * because the global route 404/500'd in this zone), 'miss' (every declared
6698
+ * route failed; the source contributed no events). Absent in the working
6699
+ * zone (the shape is unchanged).
6700
+ */
6701
+ sourceRoutes?: {
6702
+ notes: 'ok' | 'ok-scoped' | 'miss';
6703
+ timeEntries: 'ok' | 'ok-scoped' | 'miss';
6704
+ histories?: 'ok' | 'ok-scoped' | 'miss';
6705
+ };
6724
6706
  }
6725
6707
 
6726
6708
  /**
6727
- * RolesResource — Role resource (G5 batch B, plan key 'roles').
6709
+ * TicketsResource — Ticket resource (G4 batch A, plan key 'tickets').
6728
6710
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
6729
6711
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
6730
6712
  */
6731
6713
 
6732
- /** Query params for RolesResource (the G3 filter surface; no per-resource invention). */
6733
- type RolesResourceQueryParams = QueryParams;
6734
- declare class RolesResource extends BaseResource<Role, RoleCreate, RoleUpdate> {
6714
+ /** Query params for TicketsResource (the G3 filter surface; no per-resource invention). */
6715
+ type TicketsResourceQueryParams = QueryParams;
6716
+ declare class TicketsResource extends BaseResource<Ticket, TicketCreate, TicketUpdate> {
6735
6717
  constructor(http: HttpClient, pageSize: number);
6736
- /** Query Role records with the G3 filter surface (server-side JSON filter). */
6737
- query(params?: RolesResourceQueryParams): AsyncIterable<Role>;
6738
- /** Get every Role record (the MCP-preferred read; 1000-page guarded). */
6739
- queryAll(params?: RolesResourceQueryParams): Promise<Role[]>;
6718
+ /** Query Ticket records with the G3 filter surface (server-side JSON filter). */
6719
+ query(params?: TicketsResourceQueryParams): AsyncIterable<Ticket>;
6720
+ /** Get every Ticket record (the MCP-preferred read; 1000-page guarded). */
6721
+ queryAll(params?: TicketsResourceQueryParams): Promise<Ticket[]>;
6740
6722
  /** Count matching records (queryCount envelope unwrapped to a plain number). */
6741
- count(params?: RolesResourceQueryParams): Promise<number>;
6723
+ count(params?: TicketsResourceQueryParams): Promise<number>;
6742
6724
  /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
6743
6725
  get(id: Identifier, opts?: {
6744
6726
  fresh?: boolean;
6745
- } | null): Promise<Role>;
6727
+ } | null): Promise<Ticket>;
6746
6728
  /** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
6747
6729
  * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
6748
6730
  * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
6749
6731
  * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
6750
- create(data: RoleCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<RoleCreate>>;
6732
+ create(data: TicketCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<TicketCreate>>;
6751
6733
  /** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
6752
6734
  * keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
6753
6735
  * partial body is merged into the CURRENT record first: one fresh GET (which also serves the
@@ -6757,80 +6739,223 @@ declare class RolesResource extends BaseResource<Role, RoleCreate, RoleUpdate> {
6757
6739
  * `dryRun: true` returns the pinned envelope whose `data` is the merged body (the exact confirmed
6758
6740
  * wire) with the best-effort diff, from that same single read; a caller-supplied lastModifiedDate that
6759
6741
  * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
6760
- update(id: Identifier, data: RoleUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<RoleUpdate>>;
6761
- /** Resolve a Role from a numeric id (or, where the vendor indexes a primary text field,
6762
- * from an exact match on name). A numeric id miss throws NOT_FOUND; a complete
6742
+ update(id: Identifier, data: TicketUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<TicketUpdate>>;
6743
+ /** Resolve a Ticket from a numeric id (or, where the vendor indexes a primary text field,
6744
+ * from an exact match on title). A numeric id miss throws NOT_FOUND; a complete
6763
6745
  * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
6764
6746
  * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
6765
6747
  * The compact shape is the structural alias of the full record; `expand: true` is the
6766
6748
  * type-level escape hatch. */
6767
6749
  resolve(identifier: number | string, opts?: {
6768
6750
  expand?: boolean;
6769
- }): Promise<RoleSummary | null>;
6770
- /** Search Role records: bounded contains on name (no vendor free-text search exists);
6771
- * limit defaults to 25, max 500. */
6751
+ }): Promise<TicketSummary | null>;
6752
+ /** findByTicketNumber — exact 'ticketNumber' filter; ambiguity throws RESOLUTION_AMBIGUOUS with the candidate ids. */
6753
+ findByTicketNumber(value: string): Promise<TicketSummary | null>;
6754
+ /** Search Ticket records: bounded contains on title (no vendor free-text search exists);
6755
+ * limit defaults to 25, max 500. Optional companyID scopes the search to one company's tickets (and-joined
6756
+ * with the title match, server-side); includeFields projects the returned columns (id is always returned). */
6772
6757
  search(query: string, opts?: {
6773
6758
  limit?: number;
6774
- }): Promise<RoleSummary[]>;
6759
+ companyID?: Identifier;
6760
+ includeFields?: string[];
6761
+ }): Promise<TicketSummary[]>;
6762
+ /** Get the Ticket with its primary context records in one call (each part a single-record
6763
+ * fetch; no sub-lists; absent/dangling references come back null). */
6764
+ getContext(id: Identifier): Promise<TicketContext>;
6765
+ /** Node-parity special op (hand-written in src/resources/special/tickets/changeStatus.ts). */
6766
+ changeStatus(id: Identifier, targetStatus: number, fields?: Record<string, unknown>, opts?: MutationOpts): Promise<TicketChangeStatusResult | TicketChangeStatusNoChange | DryRunResult<Record<string, unknown>>>;
6767
+ /** Node-parity special op (hand-written in src/resources/special/tickets/sla.ts). */
6768
+ slaHealthCheck(id: Identifier, opts?: {
6769
+ now?: Date;
6770
+ }): Promise<TicketSlaHealth>;
6771
+ /** Node-parity special op (hand-written in src/resources/special/tickets/sla.ts). */
6772
+ summary(id: Identifier, opts?: {
6773
+ summaryTextLimit?: number;
6774
+ now?: Date;
6775
+ }): Promise<TicketSummaryResult>;
6776
+ /** Node-parity special op (hand-written in src/resources/special/tickets/timeline.ts). */
6777
+ timeline(id: Identifier, opts?: {
6778
+ since?: string;
6779
+ until?: string;
6780
+ limit?: number;
6781
+ textLimit?: number;
6782
+ includeHistories?: boolean;
6783
+ }): Promise<TicketTimeline>;
6784
+ /** Node-parity special op (hand-written in src/resources/special/tickets/fullContext.ts). */
6785
+ fullContext(id: Identifier, opts?: TicketFullContextOptions): Promise<TicketFullContext>;
6786
+ /** Node-parity special op (hand-written in src/resources/special/tickets/statusSemantics.ts). */
6787
+ statusSemantics(opts?: TicketStatusOptions): Promise<TicketStatusSemantics>;
6788
+ /** Node-parity special op (hand-written in src/resources/special/tickets/forResource.ts). */
6789
+ forResource(resourceID: Identifier, opts?: TicketsForResourceListOptions): Promise<TicketsForResourceResult>;
6790
+ forResource(resourceID: Identifier, opts: TicketsForResourceCountOptions): Promise<TicketsForResourceCountResult>;
6791
+ forResource(resourceID: Identifier, opts?: TicketsForResourceOptions): Promise<TicketsForResourceResult | TicketsForResourceCountResult>;
6792
+ /** Node-parity special op (hand-written in src/resources/special/tickets/lineOfBusiness.ts). */
6793
+ lineOfBusiness(ticketId: Identifier, associationId?: Identifier): Promise<TicketLineOfBusinessResult>;
6775
6794
  }
6776
6795
 
6777
- /**
6778
- * SalesOrdersResource — SalesOrder resource (G5 batch B, plan key 'sales_orders').
6779
- * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
6780
- * Do not hand-edit; re-run the generator (the plan is the source of truth).
6781
- */
6782
-
6783
- /** Query params for SalesOrdersResource (the G3 filter surface; no per-resource invention). */
6784
- type SalesOrdersResourceQueryParams = QueryParams;
6785
- declare class SalesOrdersResource extends BaseResource<SalesOrder, SalesOrderCreate, SalesOrderUpdate> {
6786
- constructor(http: HttpClient, pageSize: number);
6787
- /** Query SalesOrder records with the G3 filter surface (server-side JSON filter). */
6788
- query(params?: SalesOrdersResourceQueryParams): AsyncIterable<SalesOrder>;
6789
- /** Get every SalesOrder record (the MCP-preferred read; 1000-page guarded). */
6790
- queryAll(params?: SalesOrdersResourceQueryParams): Promise<SalesOrder[]>;
6791
- /** Count matching records (queryCount envelope unwrapped to a plain number). */
6792
- count(params?: SalesOrdersResourceQueryParams): Promise<number>;
6793
- /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
6794
- get(id: Identifier, opts?: {
6795
- fresh?: boolean;
6796
- } | null): Promise<SalesOrder>;
6797
- /** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
6798
- * keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
6799
- * partial body is merged into the CURRENT record first: one fresh GET (which also serves the
6800
- * stale-object guard's read) then the collection PUT of the merged model — an explicit null in the
6801
- * caller body sends null; an omitted field keeps the current value. `raw: true` in the opts bag sends
6802
- * the body as-is (full model or intentional partial — the compatibility escape hatch; no merge read).
6803
- * `dryRun: true` returns the pinned envelope whose `data` is the merged body (the exact confirmed
6804
- * wire) with the best-effort diff, from that same single read; a caller-supplied lastModifiedDate that
6805
- * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
6806
- update(id: Identifier, data: SalesOrderUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<SalesOrderUpdate>>;
6796
+ type TicketAssignmentScope = 'primary' | 'secondary' | 'both';
6797
+ interface TicketsForResourceOptions {
6798
+ /** Which assignments to include (default 'both'). */
6799
+ scope?: TicketAssignmentScope;
6800
+ /** Keep only open tickets (default false) — the closed set is the tenant's picklist, see `closedStatus` in the result. */
6801
+ openOnly?: boolean;
6802
+ /** Explicit closed ids, overriding the resolved picklist (a caller decision, reported as source 'picklist'). */
6803
+ excludeStatusIds?: number[];
6804
+ /** Total ticket cap (1-500, default 100); `capped` is true when anything was dropped. */
6805
+ limit?: number;
6806
+ /** Extra Ticket fields on top of the pinned projection (id, ticketNumber, title, status, assignedResourceID, companyID). */
6807
+ includeFields?: string[];
6808
+ /** `false` (default true, unchanged): throw `STATUS_SEMANTICS_UNRESOLVED` instead of falling back to the assumed closed id 5 when the tenant picklist cannot be resolved (issue #244). */
6809
+ allowAssumed?: boolean;
6810
+ /** `true` (issue #248): return only the OPEN-ticket counts (`TicketsForResourceCountResult`, no ticket rows). `openOnly` and `limit` do not apply (`limit` is not validated): the open filter is always on and no rows are returned. The secondary link read follows next-page links (ids only) up to 20 pages, so `capped` is true only past 10,000 links. */
6811
+ countOnly?: boolean;
6812
+ }
6813
+ /** Options that select the rows result (`countOnly` absent or false). */
6814
+ type TicketsForResourceListOptions = Omit<TicketsForResourceOptions, 'countOnly'> & {
6815
+ countOnly?: false;
6816
+ };
6817
+ /** Options that select the count-only result. */
6818
+ type TicketsForResourceCountOptions = Omit<TicketsForResourceOptions, 'countOnly'> & {
6819
+ countOnly: true;
6820
+ };
6821
+ /**
6822
+ * The count-only result (issue #248). All figures count OPEN tickets (the same
6823
+ * filter as `tickets.count` with `status` not in the closed set): `primary`
6824
+ * equals `tickets.count({ filter: [assignedResourceID eq R, open leaf] })`,
6825
+ * `secondary` is the de-duplicated open secondary ticket ids, `both` their
6826
+ * overlap, `open` the union (primary + secondary - both).
6827
+ */
6828
+ interface TicketsForResourceCountResult {
6829
+ resourceID: number;
6830
+ scope: TicketAssignmentScope;
6831
+ primary: number;
6832
+ secondary: number;
6833
+ both: number;
6834
+ open: number;
6835
+ /** True only when the secondary link read had more pages than it read, so `secondary`/`both`/`open` may undercount. */
6836
+ capped: boolean;
6837
+ closedStatus: TicketStatusDisclosure;
6838
+ }
6839
+ interface TicketsForResourceResult {
6840
+ resourceID: number;
6841
+ scope: TicketAssignmentScope;
6842
+ openOnly: boolean;
6843
+ /** The union, de-duplicated by id, ascending. */
6844
+ tickets: Ticket[];
6845
+ /** Ids returned for the primary read. */
6846
+ primaryIds: number[];
6847
+ /** Ticket ids the secondary link rows point at (and the ticket read returned). */
6848
+ secondaryIds: number[];
6849
+ /** The de-duplicated intersection: primary AND secondary. */
6850
+ bothIds: number[];
6851
+ /** `open` counts the OPEN tickets among those returned (a closed ticket rides the set when openOnly is false); `primary`/`secondary`/`both` count ids in the union. All four describe the returned, possibly capped, set. */
6852
+ counts: {
6853
+ primary: number;
6854
+ secondary: number;
6855
+ both: number;
6856
+ open: number;
6857
+ };
6858
+ /** True when a link page, the primary page or the total cap cut the answer. */
6859
+ capped: boolean;
6860
+ /** Ticket ids the link rows named that the ticket read did not return (deleted or invisible to this API user). */
6861
+ unresolvedIds: number[];
6862
+ /** The closed set this call filtered on, and its provenance (issue #226 disclosure). */
6863
+ closedStatus: TicketStatusDisclosure;
6807
6864
  }
6808
6865
 
6866
+ /** Options for `workload` (all optional; the pinned defaults). */
6867
+ interface ResourceWorkloadOptions {
6868
+ /** Max open-ticket records in the rows part (default 50, 1-2500 — the server's `ticket_limit` bound; the join itself is additionally capped at 500 by `tickets.forResource`). */
6869
+ ticketLimit?: number;
6870
+ /** Max assignment / task-detail records (default 50, 1-2500 — the server's `task_limit` bound). */
6871
+ taskLimit?: number;
6872
+ /** Max time-off-request records (default 50, 1-2500 — the server's `time_off_limit` bound). */
6873
+ timeOffLimit?: number;
6874
+ }
6875
+ /** The exact open totals beside the rows (the countOnly read's figures). */
6876
+ interface WorkloadOpenTotals {
6877
+ primary: unknown;
6878
+ secondary: unknown;
6879
+ both: unknown;
6880
+ open: unknown;
6881
+ capped: unknown;
6882
+ }
6883
+ /** The open-tickets part value: the forResource rows + the exact totals beside them (or the typed reason the count read failed). */
6884
+ type WorkloadOpenTicketsValue = TicketsForResourceResult & {
6885
+ /** The exact open totals from the countOnly read (no row cap). */
6886
+ totals?: WorkloadOpenTotals;
6887
+ /** Present only when the countOnly read degraded: the part's typed code (the rows stand, the totals do not). */
6888
+ totalsAbsent?: string;
6889
+ };
6809
6890
  /**
6810
- * ServiceCallsResource — ServiceCall resource (G5 batch B, plan key 'service_calls').
6891
+ * The resource's workload in ONE call (issue #313): the composite the MCP
6892
+ * server served as `autotask_resource_workload` — open tickets, assignments,
6893
+ * balances, time off.
6894
+ *
6895
+ * The resource is the ROOT (a missing resource fails the call with the typed
6896
+ * NOT_FOUND); the five PARTS are bounded reads through the registry seam
6897
+ * (then the task-details join), degrading independently to `{ value: null, absent:
6898
+ * <code> }`.
6899
+ *
6900
+ * - `open_tickets`: the SDK's `tickets.forResource` rows (primary OR
6901
+ * secondary assignments, de-duplicated, open-only on the tenant's closed
6902
+ * set, the join capped at 500) MERGED with a second `tickets.forResource`
6903
+ * countOnly read for the exact totals `{ primary, secondary, both, open,
6904
+ * capped }` beside the rows (`counts` on the rows describe only the
6905
+ * returned, possibly capped, set). A failed count read says why
6906
+ * (`totalsAbsent: <code>`) instead of vanishing. `allowAssumed: false` on
6907
+ * both reads: the answer never rests on a guessed closed id; the part
6908
+ * degrades instead.
6909
+ * - `task_assignments`: `service_call_task_resources.query { resourceID eq }`.
6910
+ * - `task_details`: the tasks behind the assignments — joined through the
6911
+ * assignment task ids (`taskID in`, bounded by IN_FILTER_CAP); no
6912
+ * assignments (or the assignments part degraded) -> `absent: 'NO_ASSIGNMENTS'`.
6913
+ * - `time_off_balances`: `resource_time_off_balances.getByResource [id]`.
6914
+ * - `time_off_requests`: `time_off_requests.query { resourceID eq }`.
6915
+ *
6916
+ * The result is the served pre-marking shape `{ root, parts }`: the server
6917
+ * keeps its per-part untrusted marking on top, so the tool output is
6918
+ * field-for-field the composite the server served today. Wire: 1 root read +
6919
+ * 5 parts (incl. the two forResource reads), then 0-1 (the task-details join).
6920
+ */
6921
+ interface ResourceWorkload {
6922
+ /** The resource record (the root read). */
6923
+ root: Resource;
6924
+ parts: {
6925
+ /** The open tickets (the forResource rows + the exact `totals` beside them, or `totalsAbsent` when the count read degraded), or the typed absent degradation. */
6926
+ open_tickets: CompositePartValue<WorkloadOpenTicketsValue>;
6927
+ /** The resource's task assignments (the bounded `service_call_task_resources.query` result envelope), or the typed absent degradation. */
6928
+ task_assignments: CompositePartValue<BoundedQueryResult<ServiceCallTaskResource>>;
6929
+ /** The tasks behind the assignments (the bounded `service_call_tasks.query` result envelope), or the typed absent degradation (`NO_ASSIGNMENTS` when there are no assignment task ids). */
6930
+ task_details: CompositePartValue<BoundedQueryResult<ServiceCallTask>>;
6931
+ /** The time-off balances (the `resource_time_off_balances.getByResource` record list), or the typed absent degradation. */
6932
+ time_off_balances: CompositePartValue<ResourceTimeOffBalance[]>;
6933
+ /** The time-off requests (the bounded `time_off_requests.query` result envelope), or the typed absent degradation. */
6934
+ time_off_requests: CompositePartValue<BoundedQueryResult<TimeOffRequest>>;
6935
+ };
6936
+ }
6937
+
6938
+ /**
6939
+ * ResourcesResource — Resource resource (G5 batch B, plan key 'resources').
6811
6940
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
6812
6941
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
6813
6942
  */
6814
6943
 
6815
- /** Query params for ServiceCallsResource (the G3 filter surface; no per-resource invention). */
6816
- type ServiceCallsResourceQueryParams = QueryParams;
6817
- declare class ServiceCallsResource extends BaseResource<ServiceCall, ServiceCallCreate, ServiceCallUpdate> {
6818
- constructor(http: HttpClient, pageSize: number);
6819
- /** Query ServiceCall records with the G3 filter surface (server-side JSON filter). */
6820
- query(params?: ServiceCallsResourceQueryParams): AsyncIterable<ServiceCall>;
6821
- /** Get every ServiceCall record (the MCP-preferred read; 1000-page guarded). */
6822
- queryAll(params?: ServiceCallsResourceQueryParams): Promise<ServiceCall[]>;
6944
+ /** Query params for ResourcesResource (the G3 filter surface; no per-resource invention). */
6945
+ type ResourcesResourceQueryParams = QueryParams;
6946
+ declare class ResourcesResource extends BaseResource<Resource, ResourceCreate, ResourceUpdate> {
6947
+ private readonly clientConfig;
6948
+ constructor(http: HttpClient, clientConfig: ResolvedAutotaskConfig, pageSize: number);
6949
+ /** Query Resource records with the G3 filter surface (server-side JSON filter). */
6950
+ query(params?: ResourcesResourceQueryParams): AsyncIterable<Resource>;
6951
+ /** Get every Resource record (the MCP-preferred read; 1000-page guarded). */
6952
+ queryAll(params?: ResourcesResourceQueryParams): Promise<Resource[]>;
6823
6953
  /** Count matching records (queryCount envelope unwrapped to a plain number). */
6824
- count(params?: ServiceCallsResourceQueryParams): Promise<number>;
6954
+ count(params?: ResourcesResourceQueryParams): Promise<number>;
6825
6955
  /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
6826
6956
  get(id: Identifier, opts?: {
6827
6957
  fresh?: boolean;
6828
- } | null): Promise<ServiceCall>;
6829
- /** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
6830
- * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
6831
- * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
6832
- * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
6833
- create(data: ServiceCallCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCallCreate>>;
6958
+ } | null): Promise<Resource>;
6834
6959
  /** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
6835
6960
  * keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
6836
6961
  * partial body is merged into the CURRENT record first: one fresh GET (which also serves the
@@ -6840,53 +6965,45 @@ declare class ServiceCallsResource extends BaseResource<ServiceCall, ServiceCall
6840
6965
  * `dryRun: true` returns the pinned envelope whose `data` is the merged body (the exact confirmed
6841
6966
  * wire) with the best-effort diff, from that same single read; a caller-supplied lastModifiedDate that
6842
6967
  * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
6843
- update(id: Identifier, data: ServiceCallUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<ServiceCallUpdate>>;
6844
- /** Delete a record (OperationResultModel → { id}). `dryRun: true` returns the pinned
6845
- * envelope and never issues the delete. */
6846
- delete(id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
6847
- /** Resolve a ServiceCall from a numeric id (or, where the vendor indexes a primary text field,
6848
- * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
6849
- * a bare value rejects with a config error (ids only);
6968
+ update(id: Identifier, data: ResourceUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<ResourceUpdate>>;
6969
+ /** Resolve a Resource from a numeric id (or, where the vendor indexes a primary text field,
6970
+ * from an exact match on firstName / lastName). A numeric id miss throws NOT_FOUND; a complete
6850
6971
  * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
6851
6972
  * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
6852
6973
  * The compact shape is the structural alias of the full record; `expand: true` is the
6853
6974
  * type-level escape hatch. */
6854
6975
  resolve(identifier: number | string, opts?: {
6855
6976
  expand?: boolean;
6856
- }): Promise<ServiceCallSummary | null>;
6977
+ }): Promise<ResourceSummary | null>;
6978
+ /** Search Resource records: bounded contains on firstName + lastName (no vendor free-text search exists);
6979
+ * limit defaults to 25, max 500. */
6980
+ search(query: string, opts?: {
6981
+ limit?: number;
6982
+ }): Promise<ResourceSummary[]>;
6983
+ /** Node-parity special op (hand-written in src/resources/special/resources.ts). */
6984
+ whoAmI(): Promise<ResourceSummary | null>;
6985
+ /** Node-parity special op (hand-written in src/resources/special/resources.ts). */
6986
+ workload(id: Identifier, opts?: ResourceWorkloadOptions): Promise<ResourceWorkload>;
6857
6987
  }
6858
6988
 
6859
6989
  /**
6860
- * ServiceCallTaskResourcesResource — ServiceCallTaskResource resource (G5 batch B, plan key 'service_call_task_resources').
6990
+ * ResourceTimeOffAdditionalResource — ResourceTimeOffAdditional resource (G5 batch B, plan key 'resource_time_off_additional').
6861
6991
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
6862
6992
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
6863
- * Parent-scoped child of 'service_call_tasks': CRUD under /V1.0/ServiceCallTasks/{parentId}/Resources —
6864
- * the global query/count stay unscoped (narrow with the 'serviceCallTaskID' filter).
6993
+ * Parent-scoped child of 'resources': CRUD under /V1.0/Resources/{parentId}/TimeOffAdditional —
6994
+ * the global query/count stay unscoped (narrow with the 'resourceID' filter).
6865
6995
  */
6866
6996
 
6867
- /** Query params for ServiceCallTaskResourcesResource (the G3 filter surface; no per-resource invention). */
6868
- type ServiceCallTaskResourcesResourceQueryParams = QueryParams;
6869
- declare class ServiceCallTaskResourcesResource extends BaseResource<ServiceCallTaskResource, ServiceCallTaskResourceCreate, ServiceCallTaskResourceUpdate> {
6997
+ /** Query params for ResourceTimeOffAdditionalResource (the G3 filter surface; no per-resource invention). */
6998
+ type ResourceTimeOffAdditionalResourceQueryParams = QueryParams;
6999
+ declare class ResourceTimeOffAdditionalResource extends BaseResource<ResourceTimeOffAdditional, ResourceTimeOffAdditionalCreate, ResourceTimeOffAdditionalUpdate> {
6870
7000
  constructor(http: HttpClient, pageSize: number);
6871
- /** Query ServiceCallTaskResource records (global; narrow with the serviceCallTaskID filter). */
6872
- query(params?: ServiceCallTaskResourcesResourceQueryParams): AsyncIterable<ServiceCallTaskResource>;
6873
- /** Get every ServiceCallTaskResource record (the MCP-preferred read; 1000-page guarded). */
6874
- queryAll(params?: ServiceCallTaskResourcesResourceQueryParams): Promise<ServiceCallTaskResource[]>;
6875
- /** Count matching records (queryCount envelope unwrapped to a plain number). */
6876
- count(params?: ServiceCallTaskResourcesResourceQueryParams): Promise<number>;
6877
- /** Get one record by parent + id (/V1.0/ServiceCallTasks/{parentId}/Resources/{id} — vendor item envelope; item: null → NotFoundError). */
6878
- get(parentId: Identifier, id: Identifier, opts?: {
6879
- fresh?: boolean;
6880
- } | null): Promise<ServiceCallTaskResource>;
6881
- /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
6882
- * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
6883
- * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
6884
- * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
6885
- create(parentId: Identifier, data: ServiceCallTaskResourceCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCallTaskResourceCreate>>;
6886
- /** Delete a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the pinned
6887
- * envelope and never issues the delete. */
6888
- delete(parentId: Identifier, id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
6889
- /** Resolve a ServiceCallTaskResource from a numeric id (or, where the vendor indexes a primary text field,
7001
+ /** Update a record under the parent (PATCH on the collection — swagger documents put+patch there;
7002
+ * the vendor keys the record by the id in the body; OperationResultModel → { id}). `dryRun: true` returns
7003
+ * the pinned envelope with the best-effort diff; a caller-supplied lastModifiedDate that
7004
+ * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
7005
+ update(parentId: Identifier, id: Identifier, data: ResourceTimeOffAdditionalUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<ResourceTimeOffAdditionalUpdate>>;
7006
+ /** Resolve a ResourceTimeOffAdditional from a numeric id (or, where the vendor indexes a primary text field,
6890
7007
  * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
6891
7008
  * a bare value rejects with a config error (ids only);
6892
7009
  * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
@@ -6895,40 +7012,34 @@ declare class ServiceCallTaskResourcesResource extends BaseResource<ServiceCallT
6895
7012
  * type-level escape hatch. */
6896
7013
  resolve(identifier: number | string, opts?: {
6897
7014
  expand?: boolean;
6898
- }): Promise<ServiceCallTaskResourceSummary | null>;
7015
+ }): Promise<ResourceTimeOffAdditionalSummary | null>;
7016
+ /** Node-parity special op (hand-written in src/resources/special/resource_time_off_additional.ts). */
7017
+ getByResource(resourceId: Identifier): Promise<ResourceTimeOffAdditional[]>;
6899
7018
  }
6900
7019
 
6901
7020
  /**
6902
- * ServiceCallTasksResource — ServiceCallTask resource (G5 batch B, plan key 'service_call_tasks').
7021
+ * ResourceTimeOffApproversResource — ResourceTimeOffApprover resource (G5 batch B, plan key 'resource_time_off_approvers').
6903
7022
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
6904
7023
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
6905
- * Parent-scoped child of 'service_calls': CRUD under /V1.0/ServiceCalls/{parentId}/Tasks —
6906
- * the global query/count stay unscoped (narrow with the 'serviceCallID' filter).
7024
+ * Parent-scoped child of 'resources': CRUD under /V1.0/Resources/{parentId}/TimeOffApprovers —
7025
+ * the global query/count stay unscoped (narrow with the 'resourceID' filter).
6907
7026
  */
6908
7027
 
6909
- /** Query params for ServiceCallTasksResource (the G3 filter surface; no per-resource invention). */
6910
- type ServiceCallTasksResourceQueryParams = QueryParams;
6911
- declare class ServiceCallTasksResource extends BaseResource<ServiceCallTask, ServiceCallTaskCreate, ServiceCallTaskUpdate> {
7028
+ /** Query params for ResourceTimeOffApproversResource (the G3 filter surface; no per-resource invention). */
7029
+ type ResourceTimeOffApproversResourceQueryParams = QueryParams;
7030
+ declare class ResourceTimeOffApproversResource extends BaseResource<ResourceTimeOffApprover, ResourceTimeOffApproverCreate, ResourceTimeOffApproverUpdate> {
6912
7031
  constructor(http: HttpClient, pageSize: number);
6913
- /** Query ServiceCallTask records (global; narrow with the serviceCallID filter). */
6914
- query(params?: ServiceCallTasksResourceQueryParams): AsyncIterable<ServiceCallTask>;
6915
- /** Get every ServiceCallTask record (the MCP-preferred read; 1000-page guarded). */
6916
- queryAll(params?: ServiceCallTasksResourceQueryParams): Promise<ServiceCallTask[]>;
7032
+ /** Query ResourceTimeOffApprover records (global; narrow with the resourceID filter). */
7033
+ query(params?: ResourceTimeOffApproversResourceQueryParams): AsyncIterable<ResourceTimeOffApprover>;
7034
+ /** Get every ResourceTimeOffApprover record (the MCP-preferred read; 1000-page guarded). */
7035
+ queryAll(params?: ResourceTimeOffApproversResourceQueryParams): Promise<ResourceTimeOffApprover[]>;
6917
7036
  /** Count matching records (queryCount envelope unwrapped to a plain number). */
6918
- count(params?: ServiceCallTasksResourceQueryParams): Promise<number>;
6919
- /** Get one record by parent + id (/V1.0/ServiceCalls/{parentId}/Tasks/{id} — vendor item envelope; item: null → NotFoundError). */
7037
+ count(params?: ResourceTimeOffApproversResourceQueryParams): Promise<number>;
7038
+ /** Get one record by parent + id (/V1.0/Resources/{parentId}/TimeOffApprovers/{id} — vendor item envelope; item: null → NotFoundError). */
6920
7039
  get(parentId: Identifier, id: Identifier, opts?: {
6921
7040
  fresh?: boolean;
6922
- } | null): Promise<ServiceCallTask>;
6923
- /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
6924
- * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
6925
- * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
6926
- * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
6927
- create(parentId: Identifier, data: ServiceCallTaskCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCallTaskCreate>>;
6928
- /** Delete a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the pinned
6929
- * envelope and never issues the delete. */
6930
- delete(parentId: Identifier, id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
6931
- /** Resolve a ServiceCallTask from a numeric id (or, where the vendor indexes a primary text field,
7041
+ } | null): Promise<ResourceTimeOffApprover>;
7042
+ /** Resolve a ResourceTimeOffApprover from a numeric id (or, where the vendor indexes a primary text field,
6932
7043
  * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
6933
7044
  * a bare value rejects with a config error (ids only);
6934
7045
  * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
@@ -6937,40 +7048,26 @@ declare class ServiceCallTasksResource extends BaseResource<ServiceCallTask, Ser
6937
7048
  * type-level escape hatch. */
6938
7049
  resolve(identifier: number | string, opts?: {
6939
7050
  expand?: boolean;
6940
- }): Promise<ServiceCallTaskSummary | null>;
7051
+ }): Promise<ResourceTimeOffApproverSummary | null>;
6941
7052
  }
6942
7053
 
6943
7054
  /**
6944
- * ServiceCallTicketResourcesResource — ServiceCallTicketResource resource (G5 batch B, plan key 'service_call_ticket_resources').
7055
+ * ResourceTimeOffBalancesResource — ResourceTimeOffBalance resource (G5 batch B, plan key 'resource_time_off_balances').
6945
7056
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
6946
7057
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
6947
- * Parent-scoped child of 'service_call_tickets': CRUD under /V1.0/ServiceCallTickets/{parentId}/Resources —
6948
- * the global query/count stay unscoped (narrow with the 'serviceCallTicketID' filter).
7058
+ * Parent-scoped child of 'resources': CRUD under /V1.0/Resources/{parentId}/TimeOffBalances —
7059
+ * the global query/count stay unscoped (narrow with the 'resourceID' filter).
6949
7060
  */
6950
7061
 
6951
- /** Query params for ServiceCallTicketResourcesResource (the G3 filter surface; no per-resource invention). */
6952
- type ServiceCallTicketResourcesResourceQueryParams = QueryParams;
6953
- declare class ServiceCallTicketResourcesResource extends BaseResource<ServiceCallTicketResource, ServiceCallTicketResourceCreate, ServiceCallTicketResourceUpdate> {
7062
+ /** Query params for ResourceTimeOffBalancesResource (the G3 filter surface; no per-resource invention). */
7063
+ type ResourceTimeOffBalancesResourceQueryParams = QueryParams;
7064
+ declare class ResourceTimeOffBalancesResource extends BaseResource<ResourceTimeOffBalance, ResourceTimeOffBalanceCreate, ResourceTimeOffBalanceUpdate> {
6954
7065
  constructor(http: HttpClient, pageSize: number);
6955
- /** Query ServiceCallTicketResource records (global; narrow with the serviceCallTicketID filter). */
6956
- query(params?: ServiceCallTicketResourcesResourceQueryParams): AsyncIterable<ServiceCallTicketResource>;
6957
- /** Get every ServiceCallTicketResource record (the MCP-preferred read; 1000-page guarded). */
6958
- queryAll(params?: ServiceCallTicketResourcesResourceQueryParams): Promise<ServiceCallTicketResource[]>;
6959
- /** Count matching records (queryCount envelope unwrapped to a plain number). */
6960
- count(params?: ServiceCallTicketResourcesResourceQueryParams): Promise<number>;
6961
- /** Get one record by parent + id (/V1.0/ServiceCallTickets/{parentId}/Resources/{id} — vendor item envelope; item: null → NotFoundError). */
7066
+ /** Get one record by parent + id (/V1.0/Resources/{parentId}/TimeOffBalances/{id} — vendor item envelope; item: null → NotFoundError). */
6962
7067
  get(parentId: Identifier, id: Identifier, opts?: {
6963
7068
  fresh?: boolean;
6964
- } | null): Promise<ServiceCallTicketResource>;
6965
- /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
6966
- * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
6967
- * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
6968
- * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
6969
- create(parentId: Identifier, data: ServiceCallTicketResourceCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCallTicketResourceCreate>>;
6970
- /** Delete a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the pinned
6971
- * envelope and never issues the delete. */
6972
- delete(parentId: Identifier, id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
6973
- /** Resolve a ServiceCallTicketResource from a numeric id (or, where the vendor indexes a primary text field,
7069
+ } | null): Promise<ResourceTimeOffBalance>;
7070
+ /** Resolve a ResourceTimeOffBalance from a numeric id (or, where the vendor indexes a primary text field,
6974
7071
  * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
6975
7072
  * a bare value rejects with a config error (ids only);
6976
7073
  * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
@@ -6979,108 +7076,160 @@ declare class ServiceCallTicketResourcesResource extends BaseResource<ServiceCal
6979
7076
  * type-level escape hatch. */
6980
7077
  resolve(identifier: number | string, opts?: {
6981
7078
  expand?: boolean;
6982
- }): Promise<ServiceCallTicketResourceSummary | null>;
7079
+ }): Promise<ResourceTimeOffBalanceSummary | null>;
7080
+ /** Node-parity special op (hand-written in src/resources/special/resource_time_off_balances.ts). */
7081
+ getByResource(resourceId: Identifier): Promise<ResourceTimeOffBalance[]>;
7082
+ /** Node-parity special op (hand-written in src/resources/special/resource_time_off_balances.ts). */
7083
+ getByYear(resourceId: Identifier, year: number): Promise<ResourceTimeOffBalance>;
6983
7084
  }
6984
7085
 
6985
7086
  /**
6986
- * ServiceCallTicketsResource — ServiceCallTicket resource (G5 batch B, plan key 'service_call_tickets').
7087
+ * RolesResource — Role resource (G5 batch B, plan key 'roles').
6987
7088
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
6988
7089
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
6989
- * Parent-scoped child of 'service_calls': CRUD under /V1.0/ServiceCalls/{parentId}/Tickets —
6990
- * the global query/count stay unscoped (narrow with the 'serviceCallID' filter).
6991
7090
  */
6992
7091
 
6993
- /** Query params for ServiceCallTicketsResource (the G3 filter surface; no per-resource invention). */
6994
- type ServiceCallTicketsResourceQueryParams = QueryParams;
6995
- declare class ServiceCallTicketsResource extends BaseResource<ServiceCallTicket, ServiceCallTicketCreate, ServiceCallTicketUpdate> {
7092
+ /** Query params for RolesResource (the G3 filter surface; no per-resource invention). */
7093
+ type RolesResourceQueryParams = QueryParams;
7094
+ declare class RolesResource extends BaseResource<Role, RoleCreate, RoleUpdate> {
6996
7095
  constructor(http: HttpClient, pageSize: number);
6997
- /** Query ServiceCallTicket records (global; narrow with the serviceCallID filter). */
6998
- query(params?: ServiceCallTicketsResourceQueryParams): AsyncIterable<ServiceCallTicket>;
6999
- /** Get every ServiceCallTicket record (the MCP-preferred read; 1000-page guarded). */
7000
- queryAll(params?: ServiceCallTicketsResourceQueryParams): Promise<ServiceCallTicket[]>;
7096
+ /** Query Role records with the G3 filter surface (server-side JSON filter). */
7097
+ query(params?: RolesResourceQueryParams): AsyncIterable<Role>;
7098
+ /** Get every Role record (the MCP-preferred read; 1000-page guarded). */
7099
+ queryAll(params?: RolesResourceQueryParams): Promise<Role[]>;
7001
7100
  /** Count matching records (queryCount envelope unwrapped to a plain number). */
7002
- count(params?: ServiceCallTicketsResourceQueryParams): Promise<number>;
7003
- /** Get one record by parent + id (/V1.0/ServiceCalls/{parentId}/Tickets/{id} — vendor item envelope; item: null → NotFoundError). */
7004
- get(parentId: Identifier, id: Identifier, opts?: {
7101
+ count(params?: RolesResourceQueryParams): Promise<number>;
7102
+ /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
7103
+ get(id: Identifier, opts?: {
7005
7104
  fresh?: boolean;
7006
- } | null): Promise<ServiceCallTicket>;
7007
- /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
7105
+ } | null): Promise<Role>;
7106
+ /** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
7008
7107
  * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
7009
7108
  * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
7010
7109
  * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
7011
- create(parentId: Identifier, data: ServiceCallTicketCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCallTicketCreate>>;
7012
- /** Delete a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the pinned
7013
- * envelope and never issues the delete. */
7014
- delete(parentId: Identifier, id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
7015
- /** Resolve a ServiceCallTicket from a numeric id (or, where the vendor indexes a primary text field,
7016
- * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
7017
- * a bare value rejects with a config error (ids only);
7110
+ create(data: RoleCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<RoleCreate>>;
7111
+ /** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
7112
+ * keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
7113
+ * partial body is merged into the CURRENT record first: one fresh GET (which also serves the
7114
+ * stale-object guard's read) then the collection PUT of the merged model — an explicit null in the
7115
+ * caller body sends null; an omitted field keeps the current value. `raw: true` in the opts bag sends
7116
+ * the body as-is (full model or intentional partial — the compatibility escape hatch; no merge read).
7117
+ * `dryRun: true` returns the pinned envelope whose `data` is the merged body (the exact confirmed
7118
+ * wire) with the best-effort diff, from that same single read; a caller-supplied lastModifiedDate that
7119
+ * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
7120
+ update(id: Identifier, data: RoleUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<RoleUpdate>>;
7121
+ /** Resolve a Role from a numeric id (or, where the vendor indexes a primary text field,
7122
+ * from an exact match on name). A numeric id miss throws NOT_FOUND; a complete
7018
7123
  * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
7019
7124
  * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
7020
7125
  * The compact shape is the structural alias of the full record; `expand: true` is the
7021
7126
  * type-level escape hatch. */
7022
7127
  resolve(identifier: number | string, opts?: {
7023
7128
  expand?: boolean;
7024
- }): Promise<ServiceCallTicketSummary | null>;
7129
+ }): Promise<RoleSummary | null>;
7130
+ /** Search Role records: bounded contains on name (no vendor free-text search exists);
7131
+ * limit defaults to 25, max 500. */
7132
+ search(query: string, opts?: {
7133
+ limit?: number;
7134
+ }): Promise<RoleSummary[]>;
7025
7135
  }
7026
7136
 
7027
7137
  /**
7028
- * ServiceLevelAgreementResultsResource — ServiceLevelAgreementResults resource (G5 batch B, plan key 'service_level_agreement_results').
7138
+ * SalesOrdersResource — SalesOrder resource (G5 batch B, plan key 'sales_orders').
7029
7139
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
7030
7140
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
7031
7141
  */
7032
7142
 
7033
- /** Query params for ServiceLevelAgreementResultsResource (the G3 filter surface; no per-resource invention). */
7034
- type ServiceLevelAgreementResultsResourceQueryParams = QueryParams;
7035
- declare class ServiceLevelAgreementResultsResource extends BaseResource<ServiceLevelAgreementResults, ServiceLevelAgreementResultsCreate, ServiceLevelAgreementResultsUpdate> {
7143
+ /** Query params for SalesOrdersResource (the G3 filter surface; no per-resource invention). */
7144
+ type SalesOrdersResourceQueryParams = QueryParams;
7145
+ declare class SalesOrdersResource extends BaseResource<SalesOrder, SalesOrderCreate, SalesOrderUpdate> {
7036
7146
  constructor(http: HttpClient, pageSize: number);
7037
- /** Query ServiceLevelAgreementResults records with the G3 filter surface (server-side JSON filter). */
7038
- query(params?: ServiceLevelAgreementResultsResourceQueryParams): AsyncIterable<ServiceLevelAgreementResults>;
7039
- /** Get every ServiceLevelAgreementResults record (the MCP-preferred read; 1000-page guarded). */
7040
- queryAll(params?: ServiceLevelAgreementResultsResourceQueryParams): Promise<ServiceLevelAgreementResults[]>;
7147
+ /** Query SalesOrder records with the G3 filter surface (server-side JSON filter). */
7148
+ query(params?: SalesOrdersResourceQueryParams): AsyncIterable<SalesOrder>;
7149
+ /** Get every SalesOrder record (the MCP-preferred read; 1000-page guarded). */
7150
+ queryAll(params?: SalesOrdersResourceQueryParams): Promise<SalesOrder[]>;
7041
7151
  /** Count matching records (queryCount envelope unwrapped to a plain number). */
7042
- count(params?: ServiceLevelAgreementResultsResourceQueryParams): Promise<number>;
7152
+ count(params?: SalesOrdersResourceQueryParams): Promise<number>;
7043
7153
  /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
7044
7154
  get(id: Identifier, opts?: {
7045
7155
  fresh?: boolean;
7046
- } | null): Promise<ServiceLevelAgreementResults>;
7047
- /** Resolve a ServiceLevelAgreementResults from a numeric id (or, where the vendor indexes a primary text field,
7048
- * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
7049
- * a bare value rejects with a config error (ids only);
7050
- * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
7051
- * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
7052
- * The compact shape is the structural alias of the full record; `expand: true` is the
7053
- * type-level escape hatch. */
7054
- resolve(identifier: number | string, opts?: {
7055
- expand?: boolean;
7056
- }): Promise<ServiceLevelAgreementResultsSummary | null>;
7156
+ } | null): Promise<SalesOrder>;
7157
+ /** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
7158
+ * keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
7159
+ * partial body is merged into the CURRENT record first: one fresh GET (which also serves the
7160
+ * stale-object guard's read) then the collection PUT of the merged model — an explicit null in the
7161
+ * caller body sends null; an omitted field keeps the current value. `raw: true` in the opts bag sends
7162
+ * the body as-is (full model or intentional partial — the compatibility escape hatch; no merge read).
7163
+ * `dryRun: true` returns the pinned envelope whose `data` is the merged body (the exact confirmed
7164
+ * wire) with the best-effort diff, from that same single read; a caller-supplied lastModifiedDate that
7165
+ * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
7166
+ update(id: Identifier, data: SalesOrderUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<SalesOrderUpdate>>;
7167
+ }
7168
+
7169
+ /** Options for `fullProfile` (all optional; the pinned defaults). */
7170
+ interface ServiceCallFullProfileOptions {
7171
+ /** Max ticket records (default 50, 1-2500 — the server's `ticket_limit` bound). */
7172
+ ticketLimit?: number;
7173
+ /** Max task records (default 50, 1-2500 — the server's `task_limit` bound); also bounds the assignments read. */
7174
+ taskLimit?: number;
7175
+ }
7176
+ /**
7177
+ * The service call with its tickets, tasks and resource assignments in ONE
7178
+ * call (issue #313): the composite the MCP server served as
7179
+ * `autotask_service_call_full_profile`. The service call is the ROOT (a
7180
+ * missing call fails the call with the typed NOT_FOUND); the three PARTS are
7181
+ * bounded reads, degrading independently to `{ value: null, absent:
7182
+ * <code> }`.
7183
+ *
7184
+ * The resource assignments join through the task ids (the assignment model
7185
+ * keys on `serviceCallTaskID` + `resourceID`, not `serviceCallID`): the
7186
+ * `in` filter is bounded by `IN_FILTER_CAP` (100 task ids); no task ids
7187
+ * (no tasks, or the tasks part degraded) -> the part degrades to
7188
+ * `absent: 'NO_TASKS'`.
7189
+ *
7190
+ * The result is the served pre-marking shape `{ root, parts }`: the server
7191
+ * keeps its per-part untrusted marking on top, so the tool output is
7192
+ * field-for-field the composite the server served today. Wire: 1 root read +
7193
+ * 2 bounded queries, then 0-1 (the assignments join).
7194
+ */
7195
+ interface ServiceCallFullProfile {
7196
+ /** The service call record (the root read). */
7197
+ root: ServiceCall;
7198
+ parts: {
7199
+ /** The call's tickets (the bounded `service_call_tickets.query` result envelope), or the typed absent degradation. */
7200
+ tickets: CompositePartValue<BoundedQueryResult<ServiceCallTicket>>;
7201
+ /** The call's tasks (the bounded `service_call_tasks.query` result envelope), or the typed absent degradation. */
7202
+ tasks: CompositePartValue<BoundedQueryResult<ServiceCallTask>>;
7203
+ /** The resource assignments behind the call's tasks (the bounded `service_call_task_resources.query` result envelope), or the typed absent degradation (`NO_TASKS` when there are no task ids). */
7204
+ resource_assignments: CompositePartValue<BoundedQueryResult<ServiceCallTaskResource>>;
7205
+ };
7057
7206
  }
7058
7207
 
7059
7208
  /**
7060
- * ServicesResource — Service resource (G5 batch B, plan key 'services').
7209
+ * ServiceCallsResource — ServiceCall resource (G5 batch B, plan key 'service_calls').
7061
7210
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
7062
7211
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
7063
7212
  */
7064
7213
 
7065
- /** Query params for ServicesResource (the G3 filter surface; no per-resource invention). */
7066
- type ServicesResourceQueryParams = QueryParams;
7067
- declare class ServicesResource extends BaseResource<Service, ServiceCreate, ServiceUpdate> {
7214
+ /** Query params for ServiceCallsResource (the G3 filter surface; no per-resource invention). */
7215
+ type ServiceCallsResourceQueryParams = QueryParams;
7216
+ declare class ServiceCallsResource extends BaseResource<ServiceCall, ServiceCallCreate, ServiceCallUpdate> {
7068
7217
  constructor(http: HttpClient, pageSize: number);
7069
- /** Query Service records with the G3 filter surface (server-side JSON filter). */
7070
- query(params?: ServicesResourceQueryParams): AsyncIterable<Service>;
7071
- /** Get every Service record (the MCP-preferred read; 1000-page guarded). */
7072
- queryAll(params?: ServicesResourceQueryParams): Promise<Service[]>;
7218
+ /** Query ServiceCall records with the G3 filter surface (server-side JSON filter). */
7219
+ query(params?: ServiceCallsResourceQueryParams): AsyncIterable<ServiceCall>;
7220
+ /** Get every ServiceCall record (the MCP-preferred read; 1000-page guarded). */
7221
+ queryAll(params?: ServiceCallsResourceQueryParams): Promise<ServiceCall[]>;
7073
7222
  /** Count matching records (queryCount envelope unwrapped to a plain number). */
7074
- count(params?: ServicesResourceQueryParams): Promise<number>;
7223
+ count(params?: ServiceCallsResourceQueryParams): Promise<number>;
7075
7224
  /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
7076
7225
  get(id: Identifier, opts?: {
7077
7226
  fresh?: boolean;
7078
- } | null): Promise<Service>;
7227
+ } | null): Promise<ServiceCall>;
7079
7228
  /** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
7080
7229
  * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
7081
7230
  * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
7082
7231
  * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
7083
- create(data: ServiceCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCreate>>;
7232
+ create(data: ServiceCallCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCallCreate>>;
7084
7233
  /** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
7085
7234
  * keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
7086
7235
  * partial body is merged into the CURRENT record first: one fresh GET (which also serves the
@@ -7090,80 +7239,97 @@ declare class ServicesResource extends BaseResource<Service, ServiceCreate, Serv
7090
7239
  * `dryRun: true` returns the pinned envelope whose `data` is the merged body (the exact confirmed
7091
7240
  * wire) with the best-effort diff, from that same single read; a caller-supplied lastModifiedDate that
7092
7241
  * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
7093
- update(id: Identifier, data: ServiceUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<ServiceUpdate>>;
7094
- /** Resolve a Service from a numeric id (or, where the vendor indexes a primary text field,
7095
- * from an exact match on name). A numeric id miss throws NOT_FOUND; a complete
7242
+ update(id: Identifier, data: ServiceCallUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<ServiceCallUpdate>>;
7243
+ /** Delete a record (OperationResultModel → { id}). `dryRun: true` returns the pinned
7244
+ * envelope and never issues the delete. */
7245
+ delete(id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
7246
+ /** Resolve a ServiceCall from a numeric id (or, where the vendor indexes a primary text field,
7247
+ * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
7248
+ * a bare value rejects with a config error (ids only);
7096
7249
  * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
7097
7250
  * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
7098
7251
  * The compact shape is the structural alias of the full record; `expand: true` is the
7099
7252
  * type-level escape hatch. */
7100
7253
  resolve(identifier: number | string, opts?: {
7101
7254
  expand?: boolean;
7102
- }): Promise<ServiceSummary | null>;
7103
- /** Search Service records: bounded contains on name (no vendor free-text search exists);
7104
- * limit defaults to 25, max 500. */
7105
- search(query: string, opts?: {
7106
- limit?: number;
7107
- }): Promise<ServiceSummary[]>;
7255
+ }): Promise<ServiceCallSummary | null>;
7256
+ /** Node-parity special op (hand-written in src/resources/special/service_calls.ts). */
7257
+ fullProfile(id: Identifier, opts?: ServiceCallFullProfileOptions): Promise<ServiceCallFullProfile>;
7108
7258
  }
7109
7259
 
7110
7260
  /**
7111
- * SkillsResource — Skill resource (G5 batch B, plan key 'skills').
7261
+ * ServiceCallTaskResourcesResource — ServiceCallTaskResource resource (G5 batch B, plan key 'service_call_task_resources').
7112
7262
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
7113
7263
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
7264
+ * Parent-scoped child of 'service_call_tasks': CRUD under /V1.0/ServiceCallTasks/{parentId}/Resources —
7265
+ * the global query/count stay unscoped (narrow with the 'serviceCallTaskID' filter).
7114
7266
  */
7115
7267
 
7116
- /** Query params for SkillsResource (the G3 filter surface; no per-resource invention). */
7117
- type SkillsResourceQueryParams = QueryParams;
7118
- declare class SkillsResource extends BaseResource<Skill, SkillCreate, SkillUpdate> {
7268
+ /** Query params for ServiceCallTaskResourcesResource (the G3 filter surface; no per-resource invention). */
7269
+ type ServiceCallTaskResourcesResourceQueryParams = QueryParams;
7270
+ declare class ServiceCallTaskResourcesResource extends BaseResource<ServiceCallTaskResource, ServiceCallTaskResourceCreate, ServiceCallTaskResourceUpdate> {
7119
7271
  constructor(http: HttpClient, pageSize: number);
7120
- /** Query Skill records with the G3 filter surface (server-side JSON filter). */
7121
- query(params?: SkillsResourceQueryParams): AsyncIterable<Skill>;
7122
- /** Get every Skill record (the MCP-preferred read; 1000-page guarded). */
7123
- queryAll(params?: SkillsResourceQueryParams): Promise<Skill[]>;
7272
+ /** Query ServiceCallTaskResource records (global; narrow with the serviceCallTaskID filter). */
7273
+ query(params?: ServiceCallTaskResourcesResourceQueryParams): AsyncIterable<ServiceCallTaskResource>;
7274
+ /** Get every ServiceCallTaskResource record (the MCP-preferred read; 1000-page guarded). */
7275
+ queryAll(params?: ServiceCallTaskResourcesResourceQueryParams): Promise<ServiceCallTaskResource[]>;
7124
7276
  /** Count matching records (queryCount envelope unwrapped to a plain number). */
7125
- count(params?: SkillsResourceQueryParams): Promise<number>;
7126
- /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
7127
- get(id: Identifier, opts?: {
7277
+ count(params?: ServiceCallTaskResourcesResourceQueryParams): Promise<number>;
7278
+ /** Get one record by parent + id (/V1.0/ServiceCallTasks/{parentId}/Resources/{id} — vendor item envelope; item: null → NotFoundError). */
7279
+ get(parentId: Identifier, id: Identifier, opts?: {
7128
7280
  fresh?: boolean;
7129
- } | null): Promise<Skill>;
7130
- /** Resolve a Skill from a numeric id (or, where the vendor indexes a primary text field,
7131
- * from an exact match on name). A numeric id miss throws NOT_FOUND; a complete
7281
+ } | null): Promise<ServiceCallTaskResource>;
7282
+ /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
7283
+ * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
7284
+ * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
7285
+ * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
7286
+ create(parentId: Identifier, data: ServiceCallTaskResourceCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCallTaskResourceCreate>>;
7287
+ /** Delete a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the pinned
7288
+ * envelope and never issues the delete. */
7289
+ delete(parentId: Identifier, id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
7290
+ /** Resolve a ServiceCallTaskResource from a numeric id (or, where the vendor indexes a primary text field,
7291
+ * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
7292
+ * a bare value rejects with a config error (ids only);
7132
7293
  * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
7133
7294
  * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
7134
7295
  * The compact shape is the structural alias of the full record; `expand: true` is the
7135
7296
  * type-level escape hatch. */
7136
7297
  resolve(identifier: number | string, opts?: {
7137
7298
  expand?: boolean;
7138
- }): Promise<SkillSummary | null>;
7139
- /** Search Skill records: bounded contains on name (no vendor free-text search exists);
7140
- * limit defaults to 25, max 500. */
7141
- search(query: string, opts?: {
7142
- limit?: number;
7143
- }): Promise<SkillSummary[]>;
7299
+ }): Promise<ServiceCallTaskResourceSummary | null>;
7144
7300
  }
7145
7301
 
7146
7302
  /**
7147
- * SubscriptionPeriodsResource — SubscriptionPeriod resource (G5 batch B, plan key 'subscription_periods').
7303
+ * ServiceCallTasksResource — ServiceCallTask resource (G5 batch B, plan key 'service_call_tasks').
7148
7304
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
7149
7305
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
7306
+ * Parent-scoped child of 'service_calls': CRUD under /V1.0/ServiceCalls/{parentId}/Tasks —
7307
+ * the global query/count stay unscoped (narrow with the 'serviceCallID' filter).
7150
7308
  */
7151
7309
 
7152
- /** Query params for SubscriptionPeriodsResource (the G3 filter surface; no per-resource invention). */
7153
- type SubscriptionPeriodsResourceQueryParams = QueryParams;
7154
- declare class SubscriptionPeriodsResource extends BaseResource<SubscriptionPeriod, SubscriptionPeriodCreate, SubscriptionPeriodUpdate> {
7310
+ /** Query params for ServiceCallTasksResource (the G3 filter surface; no per-resource invention). */
7311
+ type ServiceCallTasksResourceQueryParams = QueryParams;
7312
+ declare class ServiceCallTasksResource extends BaseResource<ServiceCallTask, ServiceCallTaskCreate, ServiceCallTaskUpdate> {
7155
7313
  constructor(http: HttpClient, pageSize: number);
7156
- /** Query SubscriptionPeriod records with the G3 filter surface (server-side JSON filter). */
7157
- query(params?: SubscriptionPeriodsResourceQueryParams): AsyncIterable<SubscriptionPeriod>;
7158
- /** Get every SubscriptionPeriod record (the MCP-preferred read; 1000-page guarded). */
7159
- queryAll(params?: SubscriptionPeriodsResourceQueryParams): Promise<SubscriptionPeriod[]>;
7314
+ /** Query ServiceCallTask records (global; narrow with the serviceCallID filter). */
7315
+ query(params?: ServiceCallTasksResourceQueryParams): AsyncIterable<ServiceCallTask>;
7316
+ /** Get every ServiceCallTask record (the MCP-preferred read; 1000-page guarded). */
7317
+ queryAll(params?: ServiceCallTasksResourceQueryParams): Promise<ServiceCallTask[]>;
7160
7318
  /** Count matching records (queryCount envelope unwrapped to a plain number). */
7161
- count(params?: SubscriptionPeriodsResourceQueryParams): Promise<number>;
7162
- /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
7163
- get(id: Identifier, opts?: {
7319
+ count(params?: ServiceCallTasksResourceQueryParams): Promise<number>;
7320
+ /** Get one record by parent + id (/V1.0/ServiceCalls/{parentId}/Tasks/{id} — vendor item envelope; item: null → NotFoundError). */
7321
+ get(parentId: Identifier, id: Identifier, opts?: {
7164
7322
  fresh?: boolean;
7165
- } | null): Promise<SubscriptionPeriod>;
7166
- /** Resolve a SubscriptionPeriod from a numeric id (or, where the vendor indexes a primary text field,
7323
+ } | null): Promise<ServiceCallTask>;
7324
+ /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
7325
+ * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
7326
+ * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
7327
+ * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
7328
+ create(parentId: Identifier, data: ServiceCallTaskCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCallTaskCreate>>;
7329
+ /** Delete a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the pinned
7330
+ * envelope and never issues the delete. */
7331
+ delete(parentId: Identifier, id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
7332
+ /** Resolve a ServiceCallTask from a numeric id (or, where the vendor indexes a primary text field,
7167
7333
  * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
7168
7334
  * a bare value rejects with a config error (ids only);
7169
7335
  * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
@@ -7172,28 +7338,263 @@ declare class SubscriptionPeriodsResource extends BaseResource<SubscriptionPerio
7172
7338
  * type-level escape hatch. */
7173
7339
  resolve(identifier: number | string, opts?: {
7174
7340
  expand?: boolean;
7175
- }): Promise<SubscriptionPeriodSummary | null>;
7341
+ }): Promise<ServiceCallTaskSummary | null>;
7176
7342
  }
7177
7343
 
7178
7344
  /**
7179
- * SubscriptionsResource — Subscription resource (G4 batch A, plan key 'subscriptions').
7345
+ * ServiceCallTicketResourcesResource — ServiceCallTicketResource resource (G5 batch B, plan key 'service_call_ticket_resources').
7180
7346
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
7181
7347
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
7348
+ * Parent-scoped child of 'service_call_tickets': CRUD under /V1.0/ServiceCallTickets/{parentId}/Resources —
7349
+ * the global query/count stay unscoped (narrow with the 'serviceCallTicketID' filter).
7182
7350
  */
7183
7351
 
7184
- /** Query params for SubscriptionsResource (the G3 filter surface; no per-resource invention). */
7185
- type SubscriptionsResourceQueryParams = QueryParams;
7186
- declare class SubscriptionsResource extends BaseResource<Subscription, SubscriptionCreate, SubscriptionUpdate> {
7352
+ /** Query params for ServiceCallTicketResourcesResource (the G3 filter surface; no per-resource invention). */
7353
+ type ServiceCallTicketResourcesResourceQueryParams = QueryParams;
7354
+ declare class ServiceCallTicketResourcesResource extends BaseResource<ServiceCallTicketResource, ServiceCallTicketResourceCreate, ServiceCallTicketResourceUpdate> {
7187
7355
  constructor(http: HttpClient, pageSize: number);
7188
- /** Query Subscription records with the G3 filter surface (server-side JSON filter). */
7189
- query(params?: SubscriptionsResourceQueryParams): AsyncIterable<Subscription>;
7190
- /** Get every Subscription record (the MCP-preferred read; 1000-page guarded). */
7191
- queryAll(params?: SubscriptionsResourceQueryParams): Promise<Subscription[]>;
7356
+ /** Query ServiceCallTicketResource records (global; narrow with the serviceCallTicketID filter). */
7357
+ query(params?: ServiceCallTicketResourcesResourceQueryParams): AsyncIterable<ServiceCallTicketResource>;
7358
+ /** Get every ServiceCallTicketResource record (the MCP-preferred read; 1000-page guarded). */
7359
+ queryAll(params?: ServiceCallTicketResourcesResourceQueryParams): Promise<ServiceCallTicketResource[]>;
7192
7360
  /** Count matching records (queryCount envelope unwrapped to a plain number). */
7193
- count(params?: SubscriptionsResourceQueryParams): Promise<number>;
7194
- /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
7195
- get(id: Identifier, opts?: {
7196
- fresh?: boolean;
7361
+ count(params?: ServiceCallTicketResourcesResourceQueryParams): Promise<number>;
7362
+ /** Get one record by parent + id (/V1.0/ServiceCallTickets/{parentId}/Resources/{id} — vendor item envelope; item: null → NotFoundError). */
7363
+ get(parentId: Identifier, id: Identifier, opts?: {
7364
+ fresh?: boolean;
7365
+ } | null): Promise<ServiceCallTicketResource>;
7366
+ /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
7367
+ * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
7368
+ * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
7369
+ * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
7370
+ create(parentId: Identifier, data: ServiceCallTicketResourceCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCallTicketResourceCreate>>;
7371
+ /** Delete a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the pinned
7372
+ * envelope and never issues the delete. */
7373
+ delete(parentId: Identifier, id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
7374
+ /** Resolve a ServiceCallTicketResource from a numeric id (or, where the vendor indexes a primary text field,
7375
+ * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
7376
+ * a bare value rejects with a config error (ids only);
7377
+ * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
7378
+ * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
7379
+ * The compact shape is the structural alias of the full record; `expand: true` is the
7380
+ * type-level escape hatch. */
7381
+ resolve(identifier: number | string, opts?: {
7382
+ expand?: boolean;
7383
+ }): Promise<ServiceCallTicketResourceSummary | null>;
7384
+ }
7385
+
7386
+ /**
7387
+ * ServiceCallTicketsResource — ServiceCallTicket resource (G5 batch B, plan key 'service_call_tickets').
7388
+ * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
7389
+ * Do not hand-edit; re-run the generator (the plan is the source of truth).
7390
+ * Parent-scoped child of 'service_calls': CRUD under /V1.0/ServiceCalls/{parentId}/Tickets —
7391
+ * the global query/count stay unscoped (narrow with the 'serviceCallID' filter).
7392
+ */
7393
+
7394
+ /** Query params for ServiceCallTicketsResource (the G3 filter surface; no per-resource invention). */
7395
+ type ServiceCallTicketsResourceQueryParams = QueryParams;
7396
+ declare class ServiceCallTicketsResource extends BaseResource<ServiceCallTicket, ServiceCallTicketCreate, ServiceCallTicketUpdate> {
7397
+ constructor(http: HttpClient, pageSize: number);
7398
+ /** Query ServiceCallTicket records (global; narrow with the serviceCallID filter). */
7399
+ query(params?: ServiceCallTicketsResourceQueryParams): AsyncIterable<ServiceCallTicket>;
7400
+ /** Get every ServiceCallTicket record (the MCP-preferred read; 1000-page guarded). */
7401
+ queryAll(params?: ServiceCallTicketsResourceQueryParams): Promise<ServiceCallTicket[]>;
7402
+ /** Count matching records (queryCount envelope unwrapped to a plain number). */
7403
+ count(params?: ServiceCallTicketsResourceQueryParams): Promise<number>;
7404
+ /** Get one record by parent + id (/V1.0/ServiceCalls/{parentId}/Tickets/{id} — vendor item envelope; item: null → NotFoundError). */
7405
+ get(parentId: Identifier, id: Identifier, opts?: {
7406
+ fresh?: boolean;
7407
+ } | null): Promise<ServiceCallTicket>;
7408
+ /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
7409
+ * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
7410
+ * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
7411
+ * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
7412
+ create(parentId: Identifier, data: ServiceCallTicketCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCallTicketCreate>>;
7413
+ /** Delete a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the pinned
7414
+ * envelope and never issues the delete. */
7415
+ delete(parentId: Identifier, id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
7416
+ /** Resolve a ServiceCallTicket from a numeric id (or, where the vendor indexes a primary text field,
7417
+ * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
7418
+ * a bare value rejects with a config error (ids only);
7419
+ * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
7420
+ * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
7421
+ * The compact shape is the structural alias of the full record; `expand: true` is the
7422
+ * type-level escape hatch. */
7423
+ resolve(identifier: number | string, opts?: {
7424
+ expand?: boolean;
7425
+ }): Promise<ServiceCallTicketSummary | null>;
7426
+ }
7427
+
7428
+ /**
7429
+ * ServiceLevelAgreementResultsResource — ServiceLevelAgreementResults resource (G5 batch B, plan key 'service_level_agreement_results').
7430
+ * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
7431
+ * Do not hand-edit; re-run the generator (the plan is the source of truth).
7432
+ */
7433
+
7434
+ /** Query params for ServiceLevelAgreementResultsResource (the G3 filter surface; no per-resource invention). */
7435
+ type ServiceLevelAgreementResultsResourceQueryParams = QueryParams;
7436
+ declare class ServiceLevelAgreementResultsResource extends BaseResource<ServiceLevelAgreementResults, ServiceLevelAgreementResultsCreate, ServiceLevelAgreementResultsUpdate> {
7437
+ constructor(http: HttpClient, pageSize: number);
7438
+ /** Query ServiceLevelAgreementResults records with the G3 filter surface (server-side JSON filter). */
7439
+ query(params?: ServiceLevelAgreementResultsResourceQueryParams): AsyncIterable<ServiceLevelAgreementResults>;
7440
+ /** Get every ServiceLevelAgreementResults record (the MCP-preferred read; 1000-page guarded). */
7441
+ queryAll(params?: ServiceLevelAgreementResultsResourceQueryParams): Promise<ServiceLevelAgreementResults[]>;
7442
+ /** Count matching records (queryCount envelope unwrapped to a plain number). */
7443
+ count(params?: ServiceLevelAgreementResultsResourceQueryParams): Promise<number>;
7444
+ /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
7445
+ get(id: Identifier, opts?: {
7446
+ fresh?: boolean;
7447
+ } | null): Promise<ServiceLevelAgreementResults>;
7448
+ /** Resolve a ServiceLevelAgreementResults from a numeric id (or, where the vendor indexes a primary text field,
7449
+ * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
7450
+ * a bare value rejects with a config error (ids only);
7451
+ * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
7452
+ * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
7453
+ * The compact shape is the structural alias of the full record; `expand: true` is the
7454
+ * type-level escape hatch. */
7455
+ resolve(identifier: number | string, opts?: {
7456
+ expand?: boolean;
7457
+ }): Promise<ServiceLevelAgreementResultsSummary | null>;
7458
+ }
7459
+
7460
+ /**
7461
+ * ServicesResource — Service resource (G5 batch B, plan key 'services').
7462
+ * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
7463
+ * Do not hand-edit; re-run the generator (the plan is the source of truth).
7464
+ */
7465
+
7466
+ /** Query params for ServicesResource (the G3 filter surface; no per-resource invention). */
7467
+ type ServicesResourceQueryParams = QueryParams;
7468
+ declare class ServicesResource extends BaseResource<Service, ServiceCreate, ServiceUpdate> {
7469
+ constructor(http: HttpClient, pageSize: number);
7470
+ /** Query Service records with the G3 filter surface (server-side JSON filter). */
7471
+ query(params?: ServicesResourceQueryParams): AsyncIterable<Service>;
7472
+ /** Get every Service record (the MCP-preferred read; 1000-page guarded). */
7473
+ queryAll(params?: ServicesResourceQueryParams): Promise<Service[]>;
7474
+ /** Count matching records (queryCount envelope unwrapped to a plain number). */
7475
+ count(params?: ServicesResourceQueryParams): Promise<number>;
7476
+ /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
7477
+ get(id: Identifier, opts?: {
7478
+ fresh?: boolean;
7479
+ } | null): Promise<Service>;
7480
+ /** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
7481
+ * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
7482
+ * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
7483
+ * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
7484
+ create(data: ServiceCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<ServiceCreate>>;
7485
+ /** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
7486
+ * keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
7487
+ * partial body is merged into the CURRENT record first: one fresh GET (which also serves the
7488
+ * stale-object guard's read) then the collection PUT of the merged model — an explicit null in the
7489
+ * caller body sends null; an omitted field keeps the current value. `raw: true` in the opts bag sends
7490
+ * the body as-is (full model or intentional partial — the compatibility escape hatch; no merge read).
7491
+ * `dryRun: true` returns the pinned envelope whose `data` is the merged body (the exact confirmed
7492
+ * wire) with the best-effort diff, from that same single read; a caller-supplied lastModifiedDate that
7493
+ * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
7494
+ update(id: Identifier, data: ServiceUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<ServiceUpdate>>;
7495
+ /** Resolve a Service from a numeric id (or, where the vendor indexes a primary text field,
7496
+ * from an exact match on name). A numeric id miss throws NOT_FOUND; a complete
7497
+ * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
7498
+ * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
7499
+ * The compact shape is the structural alias of the full record; `expand: true` is the
7500
+ * type-level escape hatch. */
7501
+ resolve(identifier: number | string, opts?: {
7502
+ expand?: boolean;
7503
+ }): Promise<ServiceSummary | null>;
7504
+ /** Search Service records: bounded contains on name (no vendor free-text search exists);
7505
+ * limit defaults to 25, max 500. */
7506
+ search(query: string, opts?: {
7507
+ limit?: number;
7508
+ }): Promise<ServiceSummary[]>;
7509
+ }
7510
+
7511
+ /**
7512
+ * SkillsResource — Skill resource (G5 batch B, plan key 'skills').
7513
+ * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
7514
+ * Do not hand-edit; re-run the generator (the plan is the source of truth).
7515
+ */
7516
+
7517
+ /** Query params for SkillsResource (the G3 filter surface; no per-resource invention). */
7518
+ type SkillsResourceQueryParams = QueryParams;
7519
+ declare class SkillsResource extends BaseResource<Skill, SkillCreate, SkillUpdate> {
7520
+ constructor(http: HttpClient, pageSize: number);
7521
+ /** Query Skill records with the G3 filter surface (server-side JSON filter). */
7522
+ query(params?: SkillsResourceQueryParams): AsyncIterable<Skill>;
7523
+ /** Get every Skill record (the MCP-preferred read; 1000-page guarded). */
7524
+ queryAll(params?: SkillsResourceQueryParams): Promise<Skill[]>;
7525
+ /** Count matching records (queryCount envelope unwrapped to a plain number). */
7526
+ count(params?: SkillsResourceQueryParams): Promise<number>;
7527
+ /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
7528
+ get(id: Identifier, opts?: {
7529
+ fresh?: boolean;
7530
+ } | null): Promise<Skill>;
7531
+ /** Resolve a Skill from a numeric id (or, where the vendor indexes a primary text field,
7532
+ * from an exact match on name). A numeric id miss throws NOT_FOUND; a complete
7533
+ * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
7534
+ * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
7535
+ * The compact shape is the structural alias of the full record; `expand: true` is the
7536
+ * type-level escape hatch. */
7537
+ resolve(identifier: number | string, opts?: {
7538
+ expand?: boolean;
7539
+ }): Promise<SkillSummary | null>;
7540
+ /** Search Skill records: bounded contains on name (no vendor free-text search exists);
7541
+ * limit defaults to 25, max 500. */
7542
+ search(query: string, opts?: {
7543
+ limit?: number;
7544
+ }): Promise<SkillSummary[]>;
7545
+ }
7546
+
7547
+ /**
7548
+ * SubscriptionPeriodsResource — SubscriptionPeriod resource (G5 batch B, plan key 'subscription_periods').
7549
+ * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
7550
+ * Do not hand-edit; re-run the generator (the plan is the source of truth).
7551
+ */
7552
+
7553
+ /** Query params for SubscriptionPeriodsResource (the G3 filter surface; no per-resource invention). */
7554
+ type SubscriptionPeriodsResourceQueryParams = QueryParams;
7555
+ declare class SubscriptionPeriodsResource extends BaseResource<SubscriptionPeriod, SubscriptionPeriodCreate, SubscriptionPeriodUpdate> {
7556
+ constructor(http: HttpClient, pageSize: number);
7557
+ /** Query SubscriptionPeriod records with the G3 filter surface (server-side JSON filter). */
7558
+ query(params?: SubscriptionPeriodsResourceQueryParams): AsyncIterable<SubscriptionPeriod>;
7559
+ /** Get every SubscriptionPeriod record (the MCP-preferred read; 1000-page guarded). */
7560
+ queryAll(params?: SubscriptionPeriodsResourceQueryParams): Promise<SubscriptionPeriod[]>;
7561
+ /** Count matching records (queryCount envelope unwrapped to a plain number). */
7562
+ count(params?: SubscriptionPeriodsResourceQueryParams): Promise<number>;
7563
+ /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
7564
+ get(id: Identifier, opts?: {
7565
+ fresh?: boolean;
7566
+ } | null): Promise<SubscriptionPeriod>;
7567
+ /** Resolve a SubscriptionPeriod from a numeric id (or, where the vendor indexes a primary text field,
7568
+ * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
7569
+ * a bare value rejects with a config error (ids only);
7570
+ * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
7571
+ * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
7572
+ * The compact shape is the structural alias of the full record; `expand: true` is the
7573
+ * type-level escape hatch. */
7574
+ resolve(identifier: number | string, opts?: {
7575
+ expand?: boolean;
7576
+ }): Promise<SubscriptionPeriodSummary | null>;
7577
+ }
7578
+
7579
+ /**
7580
+ * SubscriptionsResource — Subscription resource (G4 batch A, plan key 'subscriptions').
7581
+ * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
7582
+ * Do not hand-edit; re-run the generator (the plan is the source of truth).
7583
+ */
7584
+
7585
+ /** Query params for SubscriptionsResource (the G3 filter surface; no per-resource invention). */
7586
+ type SubscriptionsResourceQueryParams = QueryParams;
7587
+ declare class SubscriptionsResource extends BaseResource<Subscription, SubscriptionCreate, SubscriptionUpdate> {
7588
+ constructor(http: HttpClient, pageSize: number);
7589
+ /** Query Subscription records with the G3 filter surface (server-side JSON filter). */
7590
+ query(params?: SubscriptionsResourceQueryParams): AsyncIterable<Subscription>;
7591
+ /** Get every Subscription record (the MCP-preferred read; 1000-page guarded). */
7592
+ queryAll(params?: SubscriptionsResourceQueryParams): Promise<Subscription[]>;
7593
+ /** Count matching records (queryCount envelope unwrapped to a plain number). */
7594
+ count(params?: SubscriptionsResourceQueryParams): Promise<number>;
7595
+ /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
7596
+ get(id: Identifier, opts?: {
7597
+ fresh?: boolean;
7197
7598
  } | null): Promise<Subscription>;
7198
7599
  /** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
7199
7600
  * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
@@ -8095,536 +8496,81 @@ declare class TicketNoteAttachmentsResource extends BaseResource<TicketNoteAttac
8095
8496
  * The compact shape is the structural alias of the full record; `expand: true` is the
8096
8497
  * type-level escape hatch. */
8097
8498
  resolve(identifier: number | string, opts?: {
8098
- expand?: boolean;
8099
- }): Promise<TicketNoteAttachmentSummary | null>;
8100
- }
8101
-
8102
- /**
8103
- * TicketNotesResource — TicketNote resource (G4 batch A, plan key 'ticket_notes').
8104
- * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
8105
- * Do not hand-edit; re-run the generator (the plan is the source of truth).
8106
- * Parent-scoped child of 'tickets': CRUD under /V1.0/Tickets/{parentId}/Notes —
8107
- * the global query/count stay unscoped (narrow with the 'ticketID' filter).
8108
- */
8109
-
8110
- /** Query params for TicketNotesResource (the G3 filter surface; no per-resource invention). */
8111
- type TicketNotesResourceQueryParams = QueryParams;
8112
- declare class TicketNotesResource extends BaseResource<TicketNote, TicketNoteCreate, TicketNoteUpdate> {
8113
- constructor(http: HttpClient, pageSize: number);
8114
- /** Query TicketNote records (global; narrow with the ticketID filter). */
8115
- query(params?: TicketNotesResourceQueryParams): AsyncIterable<TicketNote>;
8116
- /** Get every TicketNote record (the MCP-preferred read; 1000-page guarded). */
8117
- queryAll(params?: TicketNotesResourceQueryParams): Promise<TicketNote[]>;
8118
- /** Count matching records (queryCount envelope unwrapped to a plain number). */
8119
- count(params?: TicketNotesResourceQueryParams): Promise<number>;
8120
- /** Get one record by parent + id (/V1.0/Tickets/{parentId}/Notes/{id} — vendor item envelope; item: null → NotFoundError). */
8121
- get(parentId: Identifier, id: Identifier, opts?: {
8122
- fresh?: boolean;
8123
- } | null): Promise<TicketNote>;
8124
- /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
8125
- * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
8126
- * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
8127
- * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
8128
- create(parentId: Identifier, data: TicketNoteCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<TicketNoteCreate>>;
8129
- /** Update a record under the parent (PATCH on the collection — swagger documents put+patch there;
8130
- * the vendor keys the record by the id in the body; OperationResultModel → { id}). `dryRun: true` returns
8131
- * the pinned envelope with the best-effort diff; a caller-supplied lastModifiedDate that
8132
- * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
8133
- update(parentId: Identifier, id: Identifier, data: TicketNoteUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<TicketNoteUpdate>>;
8134
- /** Resolve a TicketNote from a numeric id (or, where the vendor indexes a primary text field,
8135
- * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
8136
- * a bare value rejects with a config error (ids only);
8137
- * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
8138
- * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
8139
- * The compact shape is the structural alias of the full record; `expand: true` is the
8140
- * type-level escape hatch. */
8141
- resolve(identifier: number | string, opts?: {
8142
- expand?: boolean;
8143
- }): Promise<TicketNoteSummary | null>;
8144
- }
8145
-
8146
- /**
8147
- * TicketNoteWebhooksResource — TicketNoteWebhook resource (G5 batch B, plan key 'ticket_note_webhooks').
8148
- * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
8149
- * Do not hand-edit; re-run the generator (the plan is the source of truth).
8150
- * Parent-scoped child of 'ticket_notes': CRUD under /V1.0/TicketNotes/{parentId}/Webhook —
8151
- * the global query/count stay unscoped (narrow with the 'parent' filter).
8152
- */
8153
-
8154
- /** Query params for TicketNoteWebhooksResource (the G3 filter surface; no per-resource invention). */
8155
- type TicketNoteWebhooksResourceQueryParams = QueryParams;
8156
- declare class TicketNoteWebhooksResource extends BaseResource<TicketNoteWebhook, TicketNoteWebhookCreate, TicketNoteWebhookUpdate> {
8157
- constructor(http: HttpClient, pageSize: number);
8158
- /** Query TicketNoteWebhook records (global; narrow with the parent filter). */
8159
- query(params?: TicketNoteWebhooksResourceQueryParams): AsyncIterable<TicketNoteWebhook>;
8160
- /** Get every TicketNoteWebhook record (the MCP-preferred read; 1000-page guarded). */
8161
- queryAll(params?: TicketNoteWebhooksResourceQueryParams): Promise<TicketNoteWebhook[]>;
8162
- /** Count matching records (queryCount envelope unwrapped to a plain number). */
8163
- count(params?: TicketNoteWebhooksResourceQueryParams): Promise<number>;
8164
- /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
8165
- get(id: Identifier, opts?: {
8166
- fresh?: boolean;
8167
- } | null): Promise<TicketNoteWebhook>;
8168
- /** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
8169
- * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
8170
- * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
8171
- * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
8172
- create(data: TicketNoteWebhookCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<TicketNoteWebhookCreate>>;
8173
- /** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
8174
- * keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
8175
- * partial body is merged into the CURRENT record first: one fresh GET (which also serves the
8176
- * stale-object guard's read) then the collection PUT of the merged model — an explicit null in the
8177
- * caller body sends null; an omitted field keeps the current value. `raw: true` in the opts bag sends
8178
- * the body as-is (full model or intentional partial — the compatibility escape hatch; no merge read).
8179
- * `dryRun: true` returns the pinned envelope whose `data` is the merged body (the exact confirmed
8180
- * wire) with the best-effort diff, from that same single read; a caller-supplied lastModifiedDate that
8181
- * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
8182
- update(id: Identifier, data: TicketNoteWebhookUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<TicketNoteWebhookUpdate>>;
8183
- /** Delete a record (OperationResultModel → { id}). `dryRun: true` returns the pinned
8184
- * envelope and never issues the delete. */
8185
- delete(id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
8186
- /** Resolve a TicketNoteWebhook from a numeric id (or, where the vendor indexes a primary text field,
8187
- * from an exact match on name). A numeric id miss throws NOT_FOUND; a complete
8188
- * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
8189
- * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
8190
- * The compact shape is the structural alias of the full record; `expand: true` is the
8191
- * type-level escape hatch. */
8192
- resolve(identifier: number | string, opts?: {
8193
- expand?: boolean;
8194
- }): Promise<TicketNoteWebhookSummary | null>;
8195
- /** Search TicketNoteWebhook records: bounded contains on name (no vendor free-text search exists);
8196
- * limit defaults to 25, max 500. */
8197
- search(query: string, opts?: {
8198
- limit?: number;
8199
- }): Promise<TicketNoteWebhookSummary[]>;
8200
- }
8201
-
8202
- /**
8203
- * TicketSecondaryResourcesResource — TicketSecondaryResource resource (G4 batch A, plan key 'ticket_secondary_resources').
8204
- * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
8205
- * Do not hand-edit; re-run the generator (the plan is the source of truth).
8206
- * Parent-scoped child of 'tickets': CRUD under /V1.0/Tickets/{parentId}/SecondaryResources —
8207
- * the global query/count stay unscoped (narrow with the 'ticketID' filter).
8208
- */
8209
-
8210
- /** Query params for TicketSecondaryResourcesResource (the G3 filter surface; no per-resource invention). */
8211
- type TicketSecondaryResourcesResourceQueryParams = QueryParams;
8212
- declare class TicketSecondaryResourcesResource extends BaseResource<TicketSecondaryResource, TicketSecondaryResourceCreate, TicketSecondaryResourceUpdate> {
8213
- constructor(http: HttpClient, pageSize: number);
8214
- /** Query TicketSecondaryResource records (global; narrow with the ticketID filter). */
8215
- query(params?: TicketSecondaryResourcesResourceQueryParams): AsyncIterable<TicketSecondaryResource>;
8216
- /** Get every TicketSecondaryResource record (the MCP-preferred read; 1000-page guarded). */
8217
- queryAll(params?: TicketSecondaryResourcesResourceQueryParams): Promise<TicketSecondaryResource[]>;
8218
- /** Count matching records (queryCount envelope unwrapped to a plain number). */
8219
- count(params?: TicketSecondaryResourcesResourceQueryParams): Promise<number>;
8220
- /** Get one record by parent + id (/V1.0/Tickets/{parentId}/SecondaryResources/{id} — vendor item envelope; item: null → NotFoundError). */
8221
- get(parentId: Identifier, id: Identifier, opts?: {
8222
- fresh?: boolean;
8223
- } | null): Promise<TicketSecondaryResource>;
8224
- /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
8225
- * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
8226
- * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
8227
- * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
8228
- create(parentId: Identifier, data: TicketSecondaryResourceCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<TicketSecondaryResourceCreate>>;
8229
- /** Delete a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the pinned
8230
- * envelope and never issues the delete. */
8231
- delete(parentId: Identifier, id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
8232
- /** Resolve a TicketSecondaryResource from a numeric id (or, where the vendor indexes a primary text field,
8233
- * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
8234
- * a bare value rejects with a config error (ids only);
8235
- * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
8236
- * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
8237
- * The compact shape is the structural alias of the full record; `expand: true` is the
8238
- * type-level escape hatch. */
8239
- resolve(identifier: number | string, opts?: {
8240
- expand?: boolean;
8241
- }): Promise<TicketSecondaryResourceSummary | null>;
8242
- }
8243
-
8244
- /**
8245
- * One route fact on a composite child part that the default global `/query`
8246
- * route did not serve (issue #35): the route attempted, the path it
8247
- * attempted, and the HTTP status that failed it (null when the failure was
8248
- * not an HTTP status — a shape or transport fault).
8249
- */
8250
- interface TicketChildRouteFact {
8251
- /** The route that was attempted (the plan-declared scoped collection read is 'scoped'). */
8252
- route: 'global' | 'scoped';
8253
- /** The path the route attempted (e.g. '/V1.0/TicketNotes/query' or '/V1.0/Tickets/527119/Notes'). */
8254
- path: string;
8255
- /** The HTTP status that failed the route (null for a non-HTTP failure). */
8256
- httpStatus: number | null;
8257
- }
8258
-
8259
- interface TicketSlaHealth {
8260
- ticketId: Identifier;
8261
- /** SLA result rows found for the ticket. */
8262
- slaCount: number;
8263
- /** `true` when every milestone of every SLA is met (a ticket with no SLAs is healthy). */
8264
- healthy: boolean;
8265
- /** True when a full page of SLA rows came back (more may exist; `healthy` is a lower bound). */
8266
- truncated: boolean;
8267
- slas: Array<{
8268
- id: number;
8269
- name: string | null;
8270
- milestones: Array<{
8271
- name: 'firstResponse' | 'resolution' | 'resolutionPlan';
8272
- met: boolean | null;
8273
- elapsedHours: number | null;
8274
- }>;
8275
- }>;
8276
- }
8277
- interface TicketSummaryResult {
8278
- ticketId: Identifier;
8279
- ticketNumber: string | null;
8280
- title: string | null;
8281
- /** `description` truncated to `summaryTextLimit` (default 500 chars, '…' suffix). */
8282
- description: string;
8283
- /** Length of the ORIGINAL description. */
8284
- descriptionLength: number;
8285
- descriptionTruncated: boolean;
8286
- status: number | null;
8287
- priority: number | null;
8288
- companyID: number | null;
8289
- contactID: number | null;
8290
- assignedResourceID: number | null;
8291
- projectID: number | null;
8292
- createDate: string | null;
8293
- dueDateTime: string | null;
8294
- /** floor((now - createDate) / day) — null when createDate is absent. */
8295
- ageDays: number | null;
8296
- }
8297
- interface TicketTimelineEvent {
8298
- kind: 'note' | 'timeEntry' | 'history';
8299
- id: number;
8300
- date: string | null;
8301
- /** `description`/`detail` truncated to `textLimit` (default 500 chars). */
8302
- text: string | null;
8303
- /** Notes only. */
8304
- title: string | null;
8305
- /** Time entries only. */
8306
- hours: number | null;
8307
- /** Histories only. */
8308
- action: string | null;
8309
- /** True when `text` was cut at `textLimit` (the full text is on the source record). */
8310
- textTruncated: boolean;
8311
- }
8312
- interface TicketTimeline {
8313
- ticketId: Identifier;
8314
- count: number;
8315
- /** Ascending by date (null dates last), bounded by `limit` (default 100, max 500). */
8316
- events: TicketTimelineEvent[];
8317
- /**
8318
- * True when events were left out: a source returned `limit` rows (the
8319
- * vendor query has no sort, so more may exist) or the merged list was cut
8320
- * to `limit`. Narrow `since`/`until` to page through the rest.
8321
- */
8322
- truncated: boolean;
8323
- /** Which sources (`notes`, `timeEntries`, `histories`) returned a full page. */
8324
- cappedSources: string[];
8325
- /**
8326
- * Present only when at least one source deviated from the default global
8327
- * `/query` route (issue #35): per-source route status — 'ok' (the global
8328
- * route served it), 'ok-scoped' (the plan-declared scoped route served it
8329
- * because the global route 404/500'd in this zone), 'miss' (every declared
8330
- * route failed; the source contributed no events). Absent in the working
8331
- * zone (the shape is unchanged).
8332
- */
8333
- sourceRoutes?: {
8334
- notes: 'ok' | 'ok-scoped' | 'miss';
8335
- timeEntries: 'ok' | 'ok-scoped' | 'miss';
8336
- histories?: 'ok' | 'ok-scoped' | 'miss';
8337
- };
8338
- }
8339
-
8340
- interface OpenWithNoteAndAssignParams {
8341
- /** The company the ticket opens under (the vendor field companyID). */
8342
- companyID: number;
8343
- /** The ticket title (required). */
8344
- title: string;
8345
- /** Priority picklist (default 3 — the ww29-proven Low). */
8346
- priority?: number;
8347
- /** Status picklist (default 1 — New). */
8348
- status?: number;
8349
- /**
8350
- * The queue (the vendor field queueID). The node NEVER guesses a queue:
8351
- * omitted + the vendor 500 names it → the typed QUEUE_REQUIRED error
8352
- * (vendor message + suggestedAction: discover via autotask_describe(tickets.create)).
8353
- */
8354
- queueID?: number;
8355
- }
8356
- interface OpenWithNoteAndAssignNote {
8357
- /** The note text (required). */
8358
- description: string;
8359
- /**
8360
- * The note title (REQUIRED — S12-A live-verified on ww29: the vendor 500s
8361
- * the scoped note create without it — `Missing Required Field: title.`;
8362
- * the S11-B proven note body is { title, description, noteType: 1,
8363
- * publish: 1 }, ticketID supplied by the scoped path).
8364
- */
8365
- title: string;
8366
- /** The note type integer picklist (default 1). */
8367
- noteType?: number;
8368
- /** The publish integer picklist 1/2/4 (default 1 — NOT a boolean). */
8369
- publish?: number;
8370
- }
8371
- interface OpenWithNoteAndAssignAssign {
8372
- /** The resource to assign (prechecked via resources.get — RESOURCE_INVALID on missing/inactive; number, or a canonical integer string for ids above 2^53). */
8373
- resourceID: Identifier;
8374
- /**
8375
- * The resource role to assign (REQUIRED — S12-A live-verified on ww29:
8376
- * the vendor REQUIRES both ids when assigning a resource —
8377
- * `Data violation: When assigning a Resource, you must assign both a
8378
- * assignedResourceID and assignedResourceRoleID.` — a roleID without a
8379
- * resourceID (or vice versa) is a zero-wire config fault, never a
8380
- * half-assignment on the wire).
8381
- */
8382
- roleID: number;
8383
- }
8384
- /** One step of the partial-failure contract (create/note/assign). */
8385
- interface OpenStepResult {
8386
- name: 'create' | 'note' | 'assign';
8387
- ok: boolean;
8388
- /** The typed failure (code + vendor detail) when ok is false. */
8389
- error?: string;
8390
- }
8391
- interface OpenWithNoteAndAssignResult {
8392
- /** The created ticket id (always present once the create settled). */
8393
- ticketId: number;
8394
- /** The vendor ticket number (from the assign merge read when assign ran; null otherwise). */
8395
- ticketNumber: string | null;
8396
- /** The created note id (null when no note was requested or the step failed). */
8397
- noteId: number | null;
8398
- /** True when the assignment was applied (the merge PUT settled 200). */
8399
- assigned: boolean;
8400
- /** The partial-failure contract: every step's outcome (a failure never throws — it lands here). */
8401
- steps: OpenStepResult[];
8402
- /**
8403
- * Present when the assign precheck touched the resources surface (blind to
8404
- * the API user — count/query return 0; get is the authority; docs/API.md §11).
8405
- */
8406
- blind?: {
8407
- resources: true;
8408
- note: string;
8409
- };
8410
- }
8411
-
8412
- interface TicketChangeStatusResult {
8413
- ticketId: Identifier;
8414
- previousStatus: number | null;
8415
- /** The post-PUT read-back value (verified === targetStatus or the op throws). */
8416
- status: number;
8417
- changed: true;
8418
- /** The map-required fields the node filled with proven-safe defaults. */
8419
- filledFields: string[];
8420
- /** Discovery-merge count applied on PUT 500s (0 = first-try PUT). */
8421
- discoveryMerges: number;
8422
- }
8423
- interface TicketChangeStatusNoChange {
8424
- ticketId: Identifier;
8425
- changed: false;
8426
- status: number;
8427
- reason: 'NO_CHANGE';
8428
- }
8429
-
8430
- /** Options for `fullContext` (all optional; the pinned defaults). */
8431
- interface TicketFullContextOptions {
8432
- /** Max note records (default 50). */
8433
- noteLimit?: number;
8434
- /** Max time-entry records (default 50). */
8435
- timeEntryLimit?: number;
8436
- /** Include the attachments part (default true) — METADATA only (ids + names); data download stays a separate op. */
8437
- includeAttachments?: boolean;
8438
- /** Include the histories part (default false — budget control). */
8439
- includeHistories?: boolean;
8440
- /** Long note/history text is truncated to this many chars in the served copy and flagged (default 500). */
8441
- textLimit?: number;
8442
- /** 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. */
8443
- names?: boolean;
8444
- /** 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` and the names section sets `truncated: true` (never an error). */
8445
- maxNameReads?: number;
8446
- }
8447
- /** One capped list part (a full page sets `capped: true` — more may exist). */
8448
- interface TicketFullContextPart<TItem = Record<string, unknown>> {
8449
- items: TItem[];
8450
- /** True when the part returned a full page (the vendor query has no sort — more may exist past the cap). */
8451
- capped: boolean;
8452
- /** Present only when the part was served by the plan-declared parent-scoped route (issue #35: the global /query route 404/500'd in this zone). Absent when the default global route served the part (working-zone shape unchanged). */
8453
- route?: 'scoped';
8454
- /** Present only when the part status is 'miss' (issue #35): every declared route attempted, in attempt order. The part serves no items; the call itself succeeds (a part miss never fails the op — the same rule as the FK 'absent' parts). */
8455
- routeFacts?: TicketChildRouteFact[];
8456
- }
8457
- /** The attachments part is METADATA only (data download stays a separate op). */
8458
- interface TicketFullContextAttachments {
8459
- ids: number[];
8460
- /** The attachment `title` (null when absent). */
8461
- names: Array<string | null>;
8462
- capped: boolean;
8463
- route?: 'scoped';
8464
- routeFacts?: TicketChildRouteFact[];
8465
- }
8466
- /**
8467
- * The full ticket context in ONE call (plan T3): the ticket + its context
8468
- * parts (the proven `getContext` 5-part composite — dangling FKs come back
8469
- * null and are reported in `parts`, a part miss never fails the op) + its
8470
- * notes, time entries, attachment metadata and (opt-in) histories via the
8471
- * timeline's bounded query machinery. 8 bounded reads (10 with
8472
- * `includeHistories`); zero mutating. The ticket itself missing → the
8473
- * `getContext` NotFoundError propagates.
8474
- */
8475
- interface TicketFullContext {
8476
- ticket: Ticket;
8477
- /** Null when the ticket carries no companyID (or the record misses). */
8478
- company: Company | null;
8479
- /** Null when the ticket carries no contactID (or the record misses). */
8480
- contact: Contact | null;
8481
- /** Null when the ticket carries no assignedResourceID (or the record misses). */
8482
- assignedResource: Resource | null;
8483
- /** Null when the ticket carries no projectID (or the record misses). */
8484
- project: Project | null;
8485
- notes: TicketFullContextPart;
8486
- timeEntries: TicketFullContextPart;
8487
- /** Present when `includeAttachments` is not false (default: present). */
8488
- attachments: TicketFullContextAttachments;
8489
- /** Present only when `includeHistories: true`. */
8490
- histories?: TicketFullContextPart;
8491
- /** 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`). */
8492
- truncated: boolean;
8493
- /** The opt-in name/label section (issue #77) — present EXACTLY when `names: true` (the sibling keys are absent from the rows otherwise). */
8494
- names?: CompositeNamesSection;
8495
- /** The Line of Business chain that applies to this ticket — present EXACTLY when `names: true`. Resolved from the ticket's own `organizationalLevelAssociationID` when set, otherwise from the ticket's CONTRACT's pointer (`source: 'contract'`, `contractId` says which; the association is maintained on contracts in practice, so this is the common path). The three hops: the OrganizationalLevelAssociation, the OrganizationalLevel2 (the customizable "Line of Business" label) and the OrganizationalLevel1 (the division). An absent pointer anywhere is reported with all-`missing` markers; a dangling record is `unresolved`; a broken chain is never an error. Costs 1 association + up to 2 level reads inside `maxNameReads`, plus one cached contract read when the fallback runs. */
8496
- lineOfBusiness?: LineOfBusinessNames;
8497
- /** 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). */
8498
- parts: {
8499
- company: 'ok' | 'absent';
8500
- contact: 'ok' | 'absent';
8501
- assignedResource: 'ok' | 'absent';
8502
- project: 'ok' | 'absent';
8503
- notes: 'ok' | 'ok-scoped' | 'miss';
8504
- timeEntries: 'ok' | 'ok-scoped' | 'miss';
8505
- attachments: 'ok' | 'ok-scoped' | 'miss';
8506
- histories?: 'ok' | 'ok-scoped' | 'miss';
8507
- };
8508
- }
8509
-
8510
- type TicketAssignmentScope = 'primary' | 'secondary' | 'both';
8511
- interface TicketsForResourceOptions {
8512
- /** Which assignments to include (default 'both'). */
8513
- scope?: TicketAssignmentScope;
8514
- /** Keep only open tickets (default false) — the closed set is the tenant's picklist, see `closedStatus` in the result. */
8515
- openOnly?: boolean;
8516
- /** Explicit closed ids, overriding the resolved picklist (a caller decision, reported as source 'picklist'). */
8517
- excludeStatusIds?: number[];
8518
- /** Total ticket cap (1-500, default 100); `capped` is true when anything was dropped. */
8519
- limit?: number;
8520
- /** Extra Ticket fields on top of the pinned projection (id, ticketNumber, title, status, assignedResourceID, companyID). */
8521
- includeFields?: string[];
8522
- /** `false` (default true, unchanged): throw `STATUS_SEMANTICS_UNRESOLVED` instead of falling back to the assumed closed id 5 when the tenant picklist cannot be resolved (issue #244). */
8523
- allowAssumed?: boolean;
8524
- /** `true` (issue #248): return only the OPEN-ticket counts (`TicketsForResourceCountResult`, no ticket rows). `openOnly` and `limit` do not apply (`limit` is not validated): the open filter is always on and no rows are returned. The secondary link read follows next-page links (ids only) up to 20 pages, so `capped` is true only past 10,000 links. */
8525
- countOnly?: boolean;
8526
- }
8527
- /** Options that select the rows result (`countOnly` absent or false). */
8528
- type TicketsForResourceListOptions = Omit<TicketsForResourceOptions, 'countOnly'> & {
8529
- countOnly?: false;
8530
- };
8531
- /** Options that select the count-only result. */
8532
- type TicketsForResourceCountOptions = Omit<TicketsForResourceOptions, 'countOnly'> & {
8533
- countOnly: true;
8534
- };
8535
- /**
8536
- * The count-only result (issue #248). All figures count OPEN tickets (the same
8537
- * filter as `tickets.count` with `status` not in the closed set): `primary`
8538
- * equals `tickets.count({ filter: [assignedResourceID eq R, open leaf] })`,
8539
- * `secondary` is the de-duplicated open secondary ticket ids, `both` their
8540
- * overlap, `open` the union (primary + secondary - both).
8541
- */
8542
- interface TicketsForResourceCountResult {
8543
- resourceID: number;
8544
- scope: TicketAssignmentScope;
8545
- primary: number;
8546
- secondary: number;
8547
- both: number;
8548
- open: number;
8549
- /** True only when the secondary link read had more pages than it read, so `secondary`/`both`/`open` may undercount. */
8550
- capped: boolean;
8551
- closedStatus: TicketStatusDisclosure;
8552
- }
8553
- interface TicketsForResourceResult {
8554
- resourceID: number;
8555
- scope: TicketAssignmentScope;
8556
- openOnly: boolean;
8557
- /** The union, de-duplicated by id, ascending. */
8558
- tickets: Ticket[];
8559
- /** Ids returned for the primary read. */
8560
- primaryIds: number[];
8561
- /** Ticket ids the secondary link rows point at (and the ticket read returned). */
8562
- secondaryIds: number[];
8563
- /** The de-duplicated intersection: primary AND secondary. */
8564
- bothIds: number[];
8565
- /** `open` counts the OPEN tickets among those returned (a closed ticket rides the set when openOnly is false); `primary`/`secondary`/`both` count ids in the union. All four describe the returned, possibly capped, set. */
8566
- counts: {
8567
- primary: number;
8568
- secondary: number;
8569
- both: number;
8570
- open: number;
8571
- };
8572
- /** True when a link page, the primary page or the total cap cut the answer. */
8573
- capped: boolean;
8574
- /** Ticket ids the link rows named that the ticket read did not return (deleted or invisible to this API user). */
8575
- unresolvedIds: number[];
8576
- /** The closed set this call filtered on, and its provenance (issue #226 disclosure). */
8577
- closedStatus: TicketStatusDisclosure;
8578
- }
8579
-
8580
- /** The full LOB chain for one ticket. */
8581
- interface TicketLineOfBusinessResult {
8582
- ticketId: Identifier;
8583
- /** Where the association id came from: the ticket's own pointer, its contract's, the caller's argument, or null when none was found. */
8584
- associationSource: 'ticket' | 'contract' | 'argument' | null;
8585
- /** The contract consulted for the fallback (null when the ticket pointer or the argument supplied the id). */
8586
- contractId: Identifier | null;
8587
- /** The association row when served, otherwise null. */
8588
- association: OrganizationalLevelAssociation | null;
8589
- /** The OrganizationalLevel2 row (the customizable "Line of Business" label), otherwise null. */
8590
- organizationalLevel2: OrganizationalLevel2 | null;
8591
- /** The OrganizationalLevel1 row (the division), otherwise null. */
8592
- organizationalLevel1: OrganizationalLevel1 | null;
8593
- /** Explicit per-hop markers — a broken chain is reported, never thrown.
8594
- * `capped` cannot occur on this op: its fixed budget always covers the full
8595
- * chain (1 association + up to 2 level reads). */
8596
- markers: {
8597
- association: LineOfBusinessMarker;
8598
- organizationalLevel2: LineOfBusinessMarker;
8599
- organizationalLevel1: LineOfBusinessMarker;
8600
- };
8499
+ expand?: boolean;
8500
+ }): Promise<TicketNoteAttachmentSummary | null>;
8601
8501
  }
8602
8502
 
8603
8503
  /**
8604
- * TicketsResource — Ticket resource (G4 batch A, plan key 'tickets').
8504
+ * TicketNotesResource — TicketNote resource (G4 batch A, plan key 'ticket_notes').
8605
8505
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
8606
8506
  * Do not hand-edit; re-run the generator (the plan is the source of truth).
8507
+ * Parent-scoped child of 'tickets': CRUD under /V1.0/Tickets/{parentId}/Notes —
8508
+ * the global query/count stay unscoped (narrow with the 'ticketID' filter).
8607
8509
  */
8608
8510
 
8609
- /** Query params for TicketsResource (the G3 filter surface; no per-resource invention). */
8610
- type TicketsResourceQueryParams = QueryParams;
8611
- declare class TicketsResource extends BaseResource<Ticket, TicketCreate, TicketUpdate> {
8511
+ /** Query params for TicketNotesResource (the G3 filter surface; no per-resource invention). */
8512
+ type TicketNotesResourceQueryParams = QueryParams;
8513
+ declare class TicketNotesResource extends BaseResource<TicketNote, TicketNoteCreate, TicketNoteUpdate> {
8612
8514
  constructor(http: HttpClient, pageSize: number);
8613
- /** Query Ticket records with the G3 filter surface (server-side JSON filter). */
8614
- query(params?: TicketsResourceQueryParams): AsyncIterable<Ticket>;
8615
- /** Get every Ticket record (the MCP-preferred read; 1000-page guarded). */
8616
- queryAll(params?: TicketsResourceQueryParams): Promise<Ticket[]>;
8515
+ /** Query TicketNote records (global; narrow with the ticketID filter). */
8516
+ query(params?: TicketNotesResourceQueryParams): AsyncIterable<TicketNote>;
8517
+ /** Get every TicketNote record (the MCP-preferred read; 1000-page guarded). */
8518
+ queryAll(params?: TicketNotesResourceQueryParams): Promise<TicketNote[]>;
8617
8519
  /** Count matching records (queryCount envelope unwrapped to a plain number). */
8618
- count(params?: TicketsResourceQueryParams): Promise<number>;
8520
+ count(params?: TicketNotesResourceQueryParams): Promise<number>;
8521
+ /** Get one record by parent + id (/V1.0/Tickets/{parentId}/Notes/{id} — vendor item envelope; item: null → NotFoundError). */
8522
+ get(parentId: Identifier, id: Identifier, opts?: {
8523
+ fresh?: boolean;
8524
+ } | null): Promise<TicketNote>;
8525
+ /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
8526
+ * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
8527
+ * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
8528
+ * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
8529
+ create(parentId: Identifier, data: TicketNoteCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<TicketNoteCreate>>;
8530
+ /** Update a record under the parent (PATCH on the collection — swagger documents put+patch there;
8531
+ * the vendor keys the record by the id in the body; OperationResultModel → { id}). `dryRun: true` returns
8532
+ * the pinned envelope with the best-effort diff; a caller-supplied lastModifiedDate that
8533
+ * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
8534
+ update(parentId: Identifier, id: Identifier, data: TicketNoteUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<TicketNoteUpdate>>;
8535
+ /** Resolve a TicketNote from a numeric id (or, where the vendor indexes a primary text field,
8536
+ * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
8537
+ * a bare value rejects with a config error (ids only);
8538
+ * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
8539
+ * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
8540
+ * The compact shape is the structural alias of the full record; `expand: true` is the
8541
+ * type-level escape hatch. */
8542
+ resolve(identifier: number | string, opts?: {
8543
+ expand?: boolean;
8544
+ }): Promise<TicketNoteSummary | null>;
8545
+ }
8546
+
8547
+ /**
8548
+ * TicketNoteWebhooksResource — TicketNoteWebhook resource (G5 batch B, plan key 'ticket_note_webhooks').
8549
+ * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
8550
+ * Do not hand-edit; re-run the generator (the plan is the source of truth).
8551
+ * Parent-scoped child of 'ticket_notes': CRUD under /V1.0/TicketNotes/{parentId}/Webhook —
8552
+ * the global query/count stay unscoped (narrow with the 'parent' filter).
8553
+ */
8554
+
8555
+ /** Query params for TicketNoteWebhooksResource (the G3 filter surface; no per-resource invention). */
8556
+ type TicketNoteWebhooksResourceQueryParams = QueryParams;
8557
+ declare class TicketNoteWebhooksResource extends BaseResource<TicketNoteWebhook, TicketNoteWebhookCreate, TicketNoteWebhookUpdate> {
8558
+ constructor(http: HttpClient, pageSize: number);
8559
+ /** Query TicketNoteWebhook records (global; narrow with the parent filter). */
8560
+ query(params?: TicketNoteWebhooksResourceQueryParams): AsyncIterable<TicketNoteWebhook>;
8561
+ /** Get every TicketNoteWebhook record (the MCP-preferred read; 1000-page guarded). */
8562
+ queryAll(params?: TicketNoteWebhooksResourceQueryParams): Promise<TicketNoteWebhook[]>;
8563
+ /** Count matching records (queryCount envelope unwrapped to a plain number). */
8564
+ count(params?: TicketNoteWebhooksResourceQueryParams): Promise<number>;
8619
8565
  /** Get one record by id (item envelope; item: null → NotFoundError). `fresh: true` bypasses the read-cache lookup and refreshes the entry (issue #250). */
8620
8566
  get(id: Identifier, opts?: {
8621
8567
  fresh?: boolean;
8622
- } | null): Promise<Ticket>;
8568
+ } | null): Promise<TicketNoteWebhook>;
8623
8569
  /** Create a record (OperationResultModel → { id}). `dryRun: true` returns the
8624
8570
  * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
8625
8571
  * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
8626
8572
  * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
8627
- create(data: TicketCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<TicketCreate>>;
8573
+ create(data: TicketNoteWebhookCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<TicketNoteWebhookCreate>>;
8628
8574
  /** Update a record (PUT on the COLLECTION — the vendored spec's item path is GET-only; the vendor
8629
8575
  * keys the record by the id in the body). The vendor validates the FULL model on this route (V2), so a
8630
8576
  * partial body is merged into the CURRENT record first: one fresh GET (which also serves the
@@ -8634,60 +8580,66 @@ declare class TicketsResource extends BaseResource<Ticket, TicketCreate, TicketU
8634
8580
  * `dryRun: true` returns the pinned envelope whose `data` is the merged body (the exact confirmed
8635
8581
  * wire) with the best-effort diff, from that same single read; a caller-supplied lastModifiedDate that
8636
8582
  * mismatches the vendor's current value throws STALE_OBJECT before the mutation. */
8637
- update(id: Identifier, data: TicketUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<TicketUpdate>>;
8638
- /** Resolve a Ticket from a numeric id (or, where the vendor indexes a primary text field,
8639
- * from an exact match on title). A numeric id miss throws NOT_FOUND; a complete
8583
+ update(id: Identifier, data: TicketNoteWebhookUpdate, opts?: MutationOpts): Promise<OperationResult | DryRunResult<TicketNoteWebhookUpdate>>;
8584
+ /** Delete a record (OperationResultModel → { id}). `dryRun: true` returns the pinned
8585
+ * envelope and never issues the delete. */
8586
+ delete(id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
8587
+ /** Resolve a TicketNoteWebhook from a numeric id (or, where the vendor indexes a primary text field,
8588
+ * from an exact match on name). A numeric id miss throws NOT_FOUND; a complete
8640
8589
  * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
8641
8590
  * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
8642
8591
  * The compact shape is the structural alias of the full record; `expand: true` is the
8643
8592
  * type-level escape hatch. */
8644
8593
  resolve(identifier: number | string, opts?: {
8645
8594
  expand?: boolean;
8646
- }): Promise<TicketSummary | null>;
8647
- /** findByTicketNumber — exact 'ticketNumber' filter; ambiguity throws RESOLUTION_AMBIGUOUS with the candidate ids. */
8648
- findByTicketNumber(value: string): Promise<TicketSummary | null>;
8649
- /** Search Ticket records: bounded contains on title (no vendor free-text search exists);
8650
- * limit defaults to 25, max 500. Optional companyID scopes the search to one company's tickets (and-joined
8651
- * with the title match, server-side); includeFields projects the returned columns (id is always returned). */
8595
+ }): Promise<TicketNoteWebhookSummary | null>;
8596
+ /** Search TicketNoteWebhook records: bounded contains on name (no vendor free-text search exists);
8597
+ * limit defaults to 25, max 500. */
8652
8598
  search(query: string, opts?: {
8653
8599
  limit?: number;
8654
- companyID?: Identifier;
8655
- includeFields?: string[];
8656
- }): Promise<TicketSummary[]>;
8657
- /** Get the Ticket with its primary context records in one call (each part a single-record
8658
- * fetch; no sub-lists; absent/dangling references come back null). */
8659
- getContext(id: Identifier): Promise<TicketContext>;
8660
- /** Node-parity special op (hand-written in src/resources/special/tickets.ts). */
8661
- changeStatus(id: Identifier, targetStatus: number, fields?: Record<string, unknown>, opts?: MutationOpts): Promise<TicketChangeStatusResult | TicketChangeStatusNoChange | DryRunResult<Record<string, unknown>>>;
8662
- /** Node-parity special op (hand-written in src/resources/special/tickets.ts). */
8663
- openWithNoteAndAssign(params: OpenWithNoteAndAssignParams, note?: OpenWithNoteAndAssignNote, assign?: OpenWithNoteAndAssignAssign, opts?: MutationOpts): Promise<OpenWithNoteAndAssignResult | DryRunResult<Record<string, unknown>>>;
8664
- /** Node-parity special op (hand-written in src/resources/special/tickets.ts). */
8665
- slaHealthCheck(id: Identifier, opts?: {
8666
- now?: Date;
8667
- }): Promise<TicketSlaHealth>;
8668
- /** Node-parity special op (hand-written in src/resources/special/tickets.ts). */
8669
- summary(id: Identifier, opts?: {
8670
- summaryTextLimit?: number;
8671
- now?: Date;
8672
- }): Promise<TicketSummaryResult>;
8673
- /** Node-parity special op (hand-written in src/resources/special/tickets.ts). */
8674
- timeline(id: Identifier, opts?: {
8675
- since?: string;
8676
- until?: string;
8677
- limit?: number;
8678
- textLimit?: number;
8679
- includeHistories?: boolean;
8680
- }): Promise<TicketTimeline>;
8681
- /** Node-parity special op (hand-written in src/resources/special/tickets.ts). */
8682
- fullContext(id: Identifier, opts?: TicketFullContextOptions): Promise<TicketFullContext>;
8683
- /** Node-parity special op (hand-written in src/resources/special/tickets.ts). */
8684
- statusSemantics(opts?: TicketStatusOptions): Promise<TicketStatusSemantics>;
8685
- /** Node-parity special op (hand-written in src/resources/special/tickets.ts). */
8686
- forResource(resourceID: Identifier, opts?: TicketsForResourceListOptions): Promise<TicketsForResourceResult>;
8687
- forResource(resourceID: Identifier, opts: TicketsForResourceCountOptions): Promise<TicketsForResourceCountResult>;
8688
- forResource(resourceID: Identifier, opts?: TicketsForResourceOptions): Promise<TicketsForResourceResult | TicketsForResourceCountResult>;
8689
- /** Node-parity special op (hand-written in src/resources/special/tickets.ts). */
8690
- lineOfBusiness(ticketId: Identifier, associationId?: Identifier): Promise<TicketLineOfBusinessResult>;
8600
+ }): Promise<TicketNoteWebhookSummary[]>;
8601
+ }
8602
+
8603
+ /**
8604
+ * TicketSecondaryResourcesResource — TicketSecondaryResource resource (G4 batch A, plan key 'ticket_secondary_resources').
8605
+ * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
8606
+ * Do not hand-edit; re-run the generator (the plan is the source of truth).
8607
+ * Parent-scoped child of 'tickets': CRUD under /V1.0/Tickets/{parentId}/SecondaryResources —
8608
+ * the global query/count stay unscoped (narrow with the 'ticketID' filter).
8609
+ */
8610
+
8611
+ /** Query params for TicketSecondaryResourcesResource (the G3 filter surface; no per-resource invention). */
8612
+ type TicketSecondaryResourcesResourceQueryParams = QueryParams;
8613
+ declare class TicketSecondaryResourcesResource extends BaseResource<TicketSecondaryResource, TicketSecondaryResourceCreate, TicketSecondaryResourceUpdate> {
8614
+ constructor(http: HttpClient, pageSize: number);
8615
+ /** Query TicketSecondaryResource records (global; narrow with the ticketID filter). */
8616
+ query(params?: TicketSecondaryResourcesResourceQueryParams): AsyncIterable<TicketSecondaryResource>;
8617
+ /** Get every TicketSecondaryResource record (the MCP-preferred read; 1000-page guarded). */
8618
+ queryAll(params?: TicketSecondaryResourcesResourceQueryParams): Promise<TicketSecondaryResource[]>;
8619
+ /** Count matching records (queryCount envelope unwrapped to a plain number). */
8620
+ count(params?: TicketSecondaryResourcesResourceQueryParams): Promise<number>;
8621
+ /** Get one record by parent + id (/V1.0/Tickets/{parentId}/SecondaryResources/{id} — vendor item envelope; item: null → NotFoundError). */
8622
+ get(parentId: Identifier, id: Identifier, opts?: {
8623
+ fresh?: boolean;
8624
+ } | null): Promise<TicketSecondaryResource>;
8625
+ /** Create a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the
8626
+ * pinned envelope (section 19.3) and never issues the create. A 2xx that is not the
8627
+ * specced envelope runs the plan-pinned marker recovery (issue #13 — one bounded read;
8628
+ * `recoverIdFromMarker: false` restores the pre-recovery behaviour). */
8629
+ create(parentId: Identifier, data: TicketSecondaryResourceCreate, opts?: CreateOpts): Promise<OperationResult | DryRunResult<TicketSecondaryResourceCreate>>;
8630
+ /** Delete a record under the parent (OperationResultModel → { id}). `dryRun: true` returns the pinned
8631
+ * envelope and never issues the delete. */
8632
+ delete(parentId: Identifier, id: Identifier, opts?: MutationOpts): Promise<OperationResult | DryRunResult<Record<string, unknown>>>;
8633
+ /** Resolve a TicketSecondaryResource from a numeric id (or, where the vendor indexes a primary text field,
8634
+ * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
8635
+ * a bare value rejects with a config error (ids only);
8636
+ * non-match returns null; ambiguity throws RESOLUTION_AMBIGUOUS (candidate ids) and a
8637
+ * cap-tripped bounded client scan throws RESOLUTION_TRUNCATED (never a silent null).
8638
+ * The compact shape is the structural alias of the full record; `expand: true` is the
8639
+ * type-level escape hatch. */
8640
+ resolve(identifier: number | string, opts?: {
8641
+ expand?: boolean;
8642
+ }): Promise<TicketSecondaryResourceSummary | null>;
8691
8643
  }
8692
8644
 
8693
8645
  /**
@@ -8746,70 +8698,85 @@ declare class TicketWebhooksResource extends BaseResource<TicketWebhook, TicketW
8746
8698
  }): Promise<TicketWebhookSummary[]>;
8747
8699
  }
8748
8700
 
8749
- /** The shared window opts (issue #66: the `DateWindowOptions` shape — `now`,
8750
- * `limit`, and the `tz` IANA-zone anchor; omitted `tz` = UTC, the current
8751
- * behaviour bit-for-bit) under its historical name. */
8752
- type TimeEntriesWindowOptions = DateWindowOptions;
8701
+ /** time_entries.moveToTicket (issue #197): create -> verify -> delete on the shared move engine. */
8702
+ type TimeEntriesMoveToTicketOptions = MoveToTicketOptions;
8703
+ type TimeEntriesMoveToTicketResult = MoveResult;
8704
+
8705
+ /**
8706
+ * Posted state of time entries, derived from `billing_items.timeEntryID`.
8707
+ *
8708
+ * This zone's TimeEntry entity has no `postedDate`/`postedOnTime` (reads omit
8709
+ * them, `postedDate` filters 500: W-D3), so the join is the authority: an entry
8710
+ * is posted when a billing item references it. Approval is NOT consulted:
8711
+ * live ww29 2026-10-27 showed `billingApprovalDateTime` is never populated while
8712
+ * billing items DO reference those entries.
8713
+ *
8714
+ * Cost: one `BillingItems/query` per {@link FETCH_BY_IDS_CHUNK_SIZE} ids; the
8715
+ * entry read is capped at 500, so at most 2 joins (250 safe-integer ids serialise
8716
+ * to <= ~4.3k chars, under the 8,000-char filter cap). A 429 (or any other fault)
8717
+ * propagates: no swallow, no per-id fallback.
8718
+ */
8719
+
8720
+ type PostedState = 'posted' | 'unposted';
8721
+
8753
8722
  /**
8754
- * Paging past the 500-entry cap (issue #242), shared by getPosted / getUnposted /
8755
- * postedWithin / dateWorkedWindow. `cursor` pages a busy window across calls (each
8756
- * call stays one entry page + at most 2 joins); `countOnly` returns the window's
8757
- * honest totals in one budgeted call.
8723
+ * Paging past the 500-entry cap (issue #242). `cursor` pages a busy window
8724
+ * across calls (each call stays one entry page + at most 2 joins); `countOnly`
8725
+ * returns the window's honest totals in one budgeted call.
8758
8726
  */
8759
8727
  interface TimeEntriesPostedPagingOptions {
8760
8728
  /** Continue the window: the `nextCursor` of the previous call made with the SAME window and filters. The page is the vendor's continuation page (up to 500 entries; `limit` sizes the first page only), joined the same way. Not with `countOnly`. */
8761
8729
  cursor?: string;
8762
- /** `true`: return only the window's totals (`TimeEntriesPostedCountResult`, no rows). One count call sizes the window, then EVERY entry page is read (ids only) and joined, under `maxVendorCalls`; complete or a typed refusal, never a short total (the distinct-id total must equal the count before or after the walk, else INVALID_RESPONSE). `limit` and `posted` do not apply. */
8730
+ /** `true`: return only the window's totals (`TimeEntriesPostedCountResult`, no rows). One count call sizes the window, then EVERY entry page is read (ids only) and joined, under `maxVendorCalls`; complete or a typed refusal, never a short total (the distinct-id total must equal the count before or after the walk, else INVALID_RESPONSE). `limit` and `state` do not apply. */
8763
8731
  countOnly?: boolean;
8764
8732
  /** The countOnly wire budget (integer 1-200, default 30). An estimate (1 count + 1 per 500 entries + 1 per 250 entries + 1 re-count after the walk) over it refuses with BUDGET_EXCEEDED before any page is read. */
8765
8733
  maxVendorCalls?: number;
8766
8734
  }
8767
- interface TimeEntriesStatusOptions extends TimeEntriesPostedPagingOptions {
8768
- /** Max entries read (default 500 = the hard cap, issue #128); `hasMore` flags a capped read. */
8735
+ /** dateWorkedWindow options: the state narrowing + the eq narrowings + the shared paging bag. */
8736
+ interface TimeEntriesPostedWindowOptions extends TimeEntriesPostedPagingOptions {
8737
+ /** Posted-state narrowing, applied CLIENT-side after the billing-item join: 'posted' = rows a billing item references, 'unposted' = rows none references, omitted = both. No postedDate condition is ever sent. */
8738
+ state?: PostedState;
8739
+ /** Max records (default 500 = the hard cap — a window with more than 500 matching rows: the bounded query op (time_entries.query) with the same dateWorked filter, its 2500-row walk cap; issue #128). */
8769
8740
  limit?: number;
8770
- /** Optional ticketID eq narrowing (node parity). */
8741
+ /** Optional ticketID eq narrowing. */
8771
8742
  ticketID?: number;
8772
- /** Inclusive `dateWorked` window start, 'YYYY-MM-DD' (a calendar day, no tz shift — dateWorked is date-only). */
8773
- /** OPTIONAL, but pass it: a call without dates reads the tenant's first 500 time entries (effectively the oldest), a near-empty/misleading slice with `hasMore` true. */
8774
- dateFrom?: string;
8775
- /** Inclusive `dateWorked` window end, 'YYYY-MM-DD'. */
8776
- /** OPTIONAL, but pass it together with `dateFrom` (see there). */
8777
- dateTo?: string;
8743
+ /** Optional resourceID eq narrowing. */
8744
+ resourceID?: number;
8778
8745
  }
8779
- /** The getPosted / getUnposted result: the classified entries plus an honest truncation flag. */
8780
- interface TimeEntriesPostedStateResult {
8781
- /** getPosted: entries a billing item references. getUnposted: entries no billing item references. */
8746
+ /** Options that select the rows result (`countOnly` absent or false). */
8747
+ type TimeEntriesPostedWindowListOptions = Omit<TimeEntriesPostedWindowOptions, 'countOnly'> & {
8748
+ countOnly?: false;
8749
+ };
8750
+ /** Options that select the count-only result. */
8751
+ type TimeEntriesPostedWindowCountOptions = Omit<TimeEntriesPostedWindowOptions, 'countOnly'> & {
8752
+ countOnly: true;
8753
+ };
8754
+ /** The posted-window read result (issue #10): the window's items + the two-direction count in one pass. */
8755
+ interface TimeEntriesPostedWindowResult {
8756
+ /** The window's entries read, narrowed by `state` when set (bounded by `limit`). */
8782
8757
  items: TimeEntry[];
8783
- /** True when the entry read or a billing-item join page had more rows than one bounded page: the result is partial (a window with more than 500 entries returns the first 500) — narrow the window. */
8784
- hasMore: boolean;
8785
- /** The inclusive dateWorked window queried (second-precision UTC); a side is null when that bound was not given. */
8758
+ /** Of EVERY entry read (before the `state` narrowing), those a billing item references (the join — never a `postedDate` read). With `state` set, `items.length` can differ from postedCount + unpostedCount. */
8759
+ postedCount: number;
8760
+ /** Of EVERY entry read (before the `state` narrowing), those no billing item references — non-zero even with `state: 'posted'` (entries whose join page was truncated are in neither count). */
8761
+ unpostedCount: number;
8762
+ /** The inclusive UTC window actually queried (wire bounds, second precision). */
8786
8763
  window: {
8787
- from: string | null;
8788
- to: string | null;
8764
+ from: string;
8765
+ to: string;
8789
8766
  };
8790
8767
  /** The vendor's next-page cursor for the entry read: pass it back as `opts.cursor` (same window and filters) to read the next page. null on the last page. */
8791
8768
  nextCursor: string | null;
8792
- /** Entries read on this page whose billing-item join page was truncated: withheld from `items` (never called posted or unposted), so a cursor loop does not see them. 0 normally; > 0 also sets `hasMore`. */
8769
+ /** Entries read whose billing-item join page was truncated: in neither count nor a `state`-narrowed `items` (a cursor loop does not see them). 0 normally; > 0 also sets `truncated`. */
8793
8770
  unconfirmed: number;
8794
- /** INFORMATIONAL only, not posted state: items whose `billingApprovalDateTime` is set. Some tenants (ww29) never populate it. */
8795
- approvedCount: number;
8796
- /** INFORMATIONAL only, not posted state: items without `billingApprovalDateTime`. */
8797
- unapprovedCount: number;
8771
+ /** True when the entry read has a live `pageDetails.nextPageUrl` cursor (more matching records than the bounded read returned) OR a billing-item join page was truncated (those entries are in neither count) — 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. */
8772
+ truncated: boolean;
8798
8773
  }
8799
- /** Options that select the rows result (`countOnly` absent or false). */
8800
- type TimeEntriesStatusListOptions = Omit<TimeEntriesStatusOptions, 'countOnly'> & {
8801
- countOnly?: false;
8802
- };
8803
- /** Options that select the count-only result. */
8804
- type TimeEntriesStatusCountOptions = Omit<TimeEntriesStatusOptions, 'countOnly'> & {
8805
- countOnly: true;
8806
- };
8807
8774
  /** The countOnly result (issue #242): the whole window, every entry page read and joined. */
8808
8775
  interface TimeEntriesPostedCountResult {
8809
- /** The inclusive dateWorked window counted (null side when that bound was not given). */
8776
+ /** The inclusive dateWorked window counted. */
8810
8777
  window: {
8811
- from: string | null;
8812
- to: string | null;
8778
+ from: string;
8779
+ to: string;
8813
8780
  };
8814
8781
  /** Entries in the window (every page read; de-duplicated by id). Always postedCount + unpostedCount. */
8815
8782
  total: number;
@@ -8824,154 +8791,6 @@ interface TimeEntriesPostedCountResult {
8824
8791
  /** The budget in force (`maxVendorCalls`). */
8825
8792
  budget: number;
8826
8793
  }
8827
- /** postedWithin options: the optional narrowing + the shared limit bound. */
8828
- interface TimeEntriesPostedWindowOptions extends TimeEntriesPostedPagingOptions {
8829
- /** Posted narrowing, applied CLIENT-side after the billing-item join: `true` = posted rows only, `false` = unposted rows only (entries no billing item references), omitted = both. No postedDate condition is ever sent. */
8830
- posted?: boolean;
8831
- /** Max records (default 500 = the hard cap — a window with more than 500 matching rows: the bounded query op (time_entries.query) with the same dateWorked filter, its 2500-row walk cap; issue #128). */
8832
- limit?: number;
8833
- /** Optional ticketID eq narrowing. */
8834
- ticketID?: number;
8835
- /** Optional resourceID eq narrowing. */
8836
- resourceID?: number;
8837
- /** IANA timezone — accepted and validated, but it never shifts `from`/`to`: `dateWorked` is a date-only value at 00:00 UTC, so those calendar days ARE the bounds (a zone-converted window picked the wrong day behind UTC). */
8838
- tz?: string;
8839
- }
8840
- /** The posted-window read result (issue #10): the window's items + the two-direction count in one pass. */
8841
- interface TimeEntriesPostedWindowResult {
8842
- /** The window's entries read, narrowed by `posted` when set (bounded by `limit`). */
8843
- items: TimeEntry[];
8844
- /** Of EVERY entry read (before the `posted` narrowing), those a billing item references (the join — never a `postedDate` read). With `posted` set, `items.length` can differ from postedCount + unpostedCount. */
8845
- postedCount: number;
8846
- /** Of EVERY entry read (before the `posted` narrowing), those no billing item references — non-zero even with `posted: true` (entries whose join page was truncated are in neither count). */
8847
- unpostedCount: number;
8848
- /** The inclusive UTC window actually queried (wire bounds, second precision). */
8849
- window: {
8850
- from: string;
8851
- to: string;
8852
- };
8853
- /** The vendor's next-page cursor for the entry read: pass it back as `opts.cursor` (same window and filters) to read the next page. null on the last page. */
8854
- nextCursor: string | null;
8855
- /** Entries read whose billing-item join page was truncated: in neither count nor a `posted`-narrowed `items` (a cursor loop does not see them). 0 normally; > 0 also sets `truncated`. */
8856
- unconfirmed: number;
8857
- /** True when the entry read has a live `pageDetails.nextPageUrl` cursor (more matching records than the bounded read returned) OR a billing-item join page was truncated (those entries are in neither count) — 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. */
8858
- truncated: boolean;
8859
- }
8860
- /** Options that select the rows result (`countOnly` absent or false). */
8861
- type TimeEntriesPostedWindowListOptions = Omit<TimeEntriesPostedWindowOptions, 'countOnly'> & {
8862
- countOnly?: false;
8863
- };
8864
- /** Options that select the count-only result. */
8865
- type TimeEntriesPostedWindowCountOptions = Omit<TimeEntriesPostedWindowOptions, 'countOnly'> & {
8866
- countOnly: true;
8867
- };
8868
-
8869
- /**
8870
- * `createForResource` params. The typed linkage pins + the time window are
8871
- * first-class; anything else passes through as a vendor TimeEntry field
8872
- * (read-only + resolver-owned fields are stripped before the wire).
8873
- */
8874
- interface TimeEntriesCreateForResourceParams {
8875
- /**
8876
- * Pin the INTERNAL linkage: an EXISTING active internal allocation code
8877
- * (useType 3). Verified by get (active / family / applicable) — typed
8878
- * failures, never a silent substitute, and never a create.
8879
- */
8880
- internallAllocationCodeID?: number;
8881
- /** Pin the TICKET linkage (vendor gate: roleID is also required — validated as an allocation code). */
8882
- ticketID?: number;
8883
- /** Pin the TASK linkage (vendor gate: roleID is also required — validated as an allocation code). */
8884
- taskID?: number;
8885
- /**
8886
- * TASK/TICKET linkage: pin the roleID value. The vendor validates it as an
8887
- * ALLOCATION CODE (gate 3) — it must be an active general code applicable
8888
- * to the resource. Omit and the resolver picks one.
8889
- */
8890
- roleID?: number;
8891
- /** Date worked, UTC `YYYY-MM-DD` (default: today). */
8892
- dateWorked?: string;
8893
- /** Window start, UTC ISO (default: today `T09:00:00.000Z`). */
8894
- startDateTime?: string;
8895
- /** Window end, UTC ISO (default: today `T18:00:00.000Z`). */
8896
- endDateTime?: string;
8897
- /** Hours worked (default: 8). */
8898
- hoursWorked?: number;
8899
- /** Clock for the window defaults (tests pin it for determinism; stripped before the wire — never sent). */
8900
- now?: Date;
8901
- /**
8902
- * Any other vendor TimeEntry field (summaryNotes, internalNotes,
8903
- * isNonBillable, offsetHours, showOnInvoice, …). Read-only and
8904
- * resolver-owned fields are stripped and never sent.
8905
- */
8906
- [field: string]: unknown;
8907
- }
8908
- /** The allocation code the entry bills against (the resolver's pick or the caller pin). */
8909
- interface TimeEntriesAllocationCodeInfo {
8910
- id: number;
8911
- name: string | null;
8912
- department: number | null;
8913
- billingCodeType: number | null;
8914
- }
8915
- /** Normalised `createForResource` result (the applied path). */
8916
- interface TimeEntriesCreateForResourceResult {
8917
- /** The created TimeEntry id (the vendor OperationResultModel itemId). */
8918
- id: number;
8919
- /** The linkage actually sent: 'internal' | 'task' | 'ticket'. */
8920
- linkage: 'internal' | 'task' | 'ticket';
8921
- /** The allocation code the entry bills against. */
8922
- allocationCode: TimeEntriesAllocationCodeInfo;
8923
- /** TASK/TICKET only: the roleID value actually sent (the H2 code id, or the demoted H1 role id). */
8924
- roleID?: number;
8925
- /** TASK/TICKET only: the 1-based role-ladder position of the successful attempt. */
8926
- roleAttempts?: number;
8927
- /** Discovery-loop field merges applied before success (0 = first-try create). */
8928
- discoveryMerges: number;
8929
- }
8930
-
8931
- /** time_entries.moveToTicket (issue #197): create -> verify -> delete on the shared move engine. */
8932
- type TimeEntriesMoveToTicketOptions = MoveToTicketOptions;
8933
- type TimeEntriesMoveToTicketResult = MoveResult;
8934
-
8935
- /** Options for `time_entries.approve` (the shared mutation bag + the approval pins). */
8936
- interface TimeEntriesApproveOptions extends MutationOpts {
8937
- /** The approving resource id (default: the time entry's own resourceID). */
8938
- approvalResourceID?: Identifier;
8939
- /** The approval level (1-based integer, default 1). */
8940
- approvalLevel?: number;
8941
- /** The approval instant (ISO string or Date, default: now). */
8942
- approvalDateTime?: string | Date;
8943
- }
8944
- /**
8945
- * `approved`: the approval level was created AND the follow-up update
8946
- * persisted both time-entry fields (verified by the read-back).
8947
- * `approval_fields_not_persisted`: the approval level was created but the
8948
- * read-back shows the vendor kept the old billingApprovalDateTime /
8949
- * billingApprovalResourceID — re-apply, or set them in the Autotask UI.
8950
- */
8951
- type TimeEntriesApproveStatus = 'approved' | 'approval_fields_not_persisted';
8952
- /** What `time_entries.approve` returns on the applied path. */
8953
- interface TimeEntriesApproveResult {
8954
- /** The approved time entry. */
8955
- timeEntryID: number;
8956
- /** The id of the created BillingItemApprovalLevels record. */
8957
- billingItemApprovalLevelID: number;
8958
- /** The approval level sent (1-based). */
8959
- approvalLevel: number;
8960
- /** The approving resource id sent. */
8961
- approvalResourceID: number;
8962
- /** The approval instant sent (ISO 8601). */
8963
- approvalDateTime: string;
8964
- /** Read back from the time entry: the vendor's most-recent level (null when unset). */
8965
- billingApprovalLevelMostRecent: number | null;
8966
- /** Read back from the time entry: the persisted approval instant (null when unset). */
8967
- billingApprovalDateTime: string | null;
8968
- /** Read back from the time entry: the persisted approving resource (null when unset). */
8969
- billingApprovalResourceID: number | null;
8970
- /** Honest outcome of the two-call sequence. */
8971
- status: TimeEntriesApproveStatus;
8972
- /** `status === 'approved'` (true only when the read-back matched what was sent). */
8973
- persisted: boolean;
8974
- }
8975
8794
 
8976
8795
  /**
8977
8796
  * TimeEntriesResource — TimeEntry resource (G5 batch B, plan key 'time_entries').
@@ -9021,52 +8840,12 @@ declare class TimeEntriesResource extends BaseResource<TimeEntry, TimeEntryCreat
9021
8840
  resolve(identifier: number | string, opts?: {
9022
8841
  expand?: boolean;
9023
8842
  }): Promise<TimeEntrySummary | null>;
9024
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9025
- approve(id: Identifier, opts?: TimeEntriesApproveOptions): Promise<TimeEntriesApproveResult | DryRunResult<Record<string, unknown>>>;
9026
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9027
- createForResource(resourceID: Identifier, params: TimeEntriesCreateForResourceParams, opts?: MutationOpts): Promise<TimeEntriesCreateForResourceResult | DryRunResult<Record<string, unknown>>>;
9028
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9029
- customRange(from: string, to: string, opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9030
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
8843
+ /** Node-parity special op (hand-written in src/resources/special/time_entries/windows.ts). */
9031
8844
  dateWorkedWindow(from: string, to: string, opts?: TimeEntriesPostedWindowListOptions): Promise<TimeEntriesPostedWindowResult>;
9032
8845
  dateWorkedWindow(from: string, to: string, opts: TimeEntriesPostedWindowCountOptions): Promise<TimeEntriesPostedCountResult>;
9033
8846
  dateWorkedWindow(from: string, to: string, opts?: TimeEntriesPostedWindowOptions): Promise<TimeEntriesPostedWindowResult | TimeEntriesPostedCountResult>;
9034
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9035
- getPosted(opts?: TimeEntriesStatusListOptions): Promise<TimeEntriesPostedStateResult>;
9036
- getPosted(opts: TimeEntriesStatusCountOptions): Promise<TimeEntriesPostedCountResult>;
9037
- getPosted(opts?: TimeEntriesStatusOptions): Promise<TimeEntriesPostedStateResult | TimeEntriesPostedCountResult>;
9038
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9039
- getUnposted(opts?: TimeEntriesStatusListOptions): Promise<TimeEntriesPostedStateResult>;
9040
- getUnposted(opts: TimeEntriesStatusCountOptions): Promise<TimeEntriesPostedCountResult>;
9041
- getUnposted(opts?: TimeEntriesStatusOptions): Promise<TimeEntriesPostedStateResult | TimeEntriesPostedCountResult>;
9042
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9043
- last14(opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9044
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9045
- last24h(opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9046
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9047
- last30(opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9048
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9049
- last7(opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9050
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9051
- last90(opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9052
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9053
- lastFullFortnight(opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9054
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9055
- lastFullMonth(opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9056
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9057
- lastFullQuarter(opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9058
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9059
- lastFullWeek(opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9060
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
8847
+ /** Node-parity special op (hand-written in src/resources/special/time_entries/move.ts). */
9061
8848
  moveToTicket(sourceId: Identifier, toTicketId: Identifier, opts?: TimeEntriesMoveToTicketOptions): Promise<TimeEntriesMoveToTicketResult | DryRunResult<Record<string, unknown>>>;
9062
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9063
- postedWithin(from: string, to: string, opts?: TimeEntriesPostedWindowListOptions): Promise<TimeEntriesPostedWindowResult>;
9064
- postedWithin(from: string, to: string, opts: TimeEntriesPostedWindowCountOptions): Promise<TimeEntriesPostedCountResult>;
9065
- postedWithin(from: string, to: string, opts?: TimeEntriesPostedWindowOptions): Promise<TimeEntriesPostedWindowResult | TimeEntriesPostedCountResult>;
9066
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9067
- today(opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9068
- /** Node-parity special op (hand-written in src/resources/special/time_entries.ts). */
9069
- yesterday(opts?: TimeEntriesWindowOptions): Promise<TimeEntry[]>;
9070
8849
  }
9071
8850
 
9072
8851
  /**
@@ -9411,5 +9190,5 @@ declare class AutotaskClient {
9411
9190
  }): Promise<PromiseSettledResult<R>[]>;
9412
9191
  }
9413
9192
 
9414
- export { ConfigurationItemSslSubjectAlternativeNamesResource as $, BillingCodesResource as B, CompanyLocationsResource as D, CompanyNotesResource as F, CompanySiteConfigurationsResource as H, CompanyWebhooksResource as J, ConfigurationItemBillingProductAssociationsResource as M, ConfigurationItemCategoriesResource as O, ConfigurationItemCategoryUdfAssociationsResource as Q, TtlCache as T, ConfigurationItemDnsRecordsResource as U, ConfigurationItemNotesResource as W, ConfigurationItemRelatedItemsResource as Y, AutotaskClient as a, CurrenciesResource as a$, ConfigurationItemTypesResource as a1, ConfigurationItemWebhooksResource as a3, ConfigurationItemsResource as a5, ContactGroupContactsResource as a7, ContactGroupsResource as a9, ContractRatesResource as aB, ContractRetainersResource as aD, ContractRoleCostsResource as aF, ContractServiceAdjustmentsResource as aH, ContractServiceBundleAdjustmentsResource as aJ, ContractServiceBundleUnitsResource as aL, ContractServiceBundlesResource as aN, ContractServiceUnitsResource as aP, ContractServicesResource as aR, ContractTicketPurchasesResource as aT, ContractsResource as aW, CountriesResource as aZ, ContactWebhooksResource as ab, ContactsResource as ad, ContractBillingRulesResource as af, ContractBlockHourFactorsResource as ah, ContractBlocksResource as aj, ContractChargesResource as al, ContractExclusionBillingCodesResource as an, ContractExclusionRolesResource as ap, ContractExclusionSetExcludedRolesResource as ar, ContractExclusionSetExcludedWorkTypesResource as at, ContractExclusionSetsResource as av, ContractMilestonesResource as ax, ContractNotesResource as az, DEFAULT_ZONE as b1, DepartmentsResource as b2, DomainRegistrarsResource as b4, EntityInformationResource as b6, ExpenseItemAttachmentsResource as b7, ExpenseItemsResource as b9, OpportunityCategoriesResource as bB, OrganizationalLevel1sResource as bD, OrganizationalLevel2sResource as bF, OrganizationalLevelAssociationsResource as bH, PhasesResource as bL, ProductVendorsResource as bN, ProductsResource as bP, ExpenseReportsResource as bb, FIELD_CACHE_KINDS as bd, HolidaySetsResource as bf, HolidaysResource as bh, HttpClient as bj, IDEMPOTENT_METHODS as bk, InventoryProductsResource as bl, InvoiceTemplatesResource as bn, InvoicesResource as bp, MAX_PAGES as bs, ModulesResource as bt, NoopLogger as bu, NotificationHistoryResource as bv, OpportunitiesResource as bx, OpportunityAttachmentsResource as bz, SubscriptionsResource as c$, ProjectChargesResource as c1, ProjectNotesResource as c3, ProjectsResource as c5, PurchaseApprovalsResource as c7, PurchaseOrderItemReceivingResource as c9, ResourceTimeOffBalancesResource as cB, ResourcesResource as cD, RolesResource as cF, SalesOrdersResource as cH, ServiceCallTaskResourcesResource as cJ, ServiceCallTasksResource as cL, ServiceCallTicketResourcesResource as cN, ServiceCallTicketsResource as cP, ServiceCallsResource as cR, ServiceLevelAgreementResultsResource as cT, ServicesResource as cV, SkillsResource as cX, SubscriptionPeriodsResource as cZ, PurchaseOrderItemsResource as cb, PurchaseOrdersResource as cd, QuoteItemsResource as cf, QuoteLocationsResource as ch, QuoteTemplatesResource as cj, QuotesResource as cl, READ_CACHE_MAX_ENTRIES as cn, REDACTED as co, REFERENCE_ENTITIES as cp, REFERENCE_TTL_MS as cq, ResourceRoleQueuesResource as cr, ResourceRolesResource as ct, ResourceSkillsResource as cv, ResourceTimeOffAdditionalResource as cx, ResourceTimeOffApproversResource as cz, TimeEntryAttachmentsResource as d$, SurveyResultsResource as d1, SurveysResource as d3, TagAliasesResource as d5, TagGroupsResource as d7, TagsResource as d9, TicketHistoryResource as dB, TicketNoteAttachmentsResource as dD, TicketNoteWebhooksResource as dF, TicketNotesResource as dH, TicketSecondaryResourcesResource as dJ, TicketWebhooksResource as dL, TicketsResource as dN, TimeEntriesResource as dW, TaskSecondaryResourcesResource as db, TasksResource as dd, TaxRegionsResource as df, ThresholdInformationResource as dh, TicketAdditionalConfigurationItemsResource as di, TicketAdditionalContactsResource as dk, TicketAttachmentsResource as dm, TicketCategoriesResource as dp, TicketCategoryFieldDefaultsResource as dr, TicketChangeRequestApprovalsResource as dt, TicketChargesResource as dv, TicketChecklistItemsResource as dx, TicketChecklistLibrariesResource as dz, AGENT_PROFILE as e, TimeOffRequestsResource as e1, VersionInformationResource as e4, VersionResource as e5, ZONES as e6, ZONE_CATALOG as e7, ZoneInformationResource as e8, clampPageSize as e9, collectAll as ea, fieldKey as eb, isCredentialHeaderName as ec, paginate as ed, paginateItems as ee, readTtlFor as ef, redactRecord as eg, resolveBaseUrl as eh, toArray as ei, totalPagesFor as ej, zoneUrl as ek, AppointmentsResource as f, AuthenticateResource as h, BillingItemApprovalLevelsResource as j, BillingItemsResource as l, CREDENTIAL_HEADER_NAMES as n, ChangeRequestLinksResource as o, ChecklistLibrariesResource as q, ChecklistLibraryChecklistItemsResource as s, ClassificationIconsResource as u, CompaniesResource as w, CompanyAlertsResource as y };
9415
- export type { AutotaskConfig as A, CreateIfNotExistsResult as C, CompanyLocationsResourceQueryParams as E, CompanyNotesResourceQueryParams as G, CompanySiteConfigurationsResourceQueryParams as I, CompanyWebhooksResourceQueryParams as K, ConfigProfile as L, ConfigurationItemBillingProductAssociationsResourceQueryParams as N, ConfigurationItemCategoriesResourceQueryParams as P, ResolvedAutotaskConfig as R, ConfigurationItemCategoryUdfAssociationsResourceQueryParams as S, ConfigurationItemDnsRecordsResourceQueryParams as V, ConfigurationItemNotesResourceQueryParams as X, ZoneName as Z, ConfigurationItemRelatedItemsResourceQueryParams as _, ConfigurationItemSslSubjectAlternativeNamesResourceQueryParams as a0, ConfigurationItemTypesResourceQueryParams as a2, ConfigurationItemWebhooksResourceQueryParams as a4, ConfigurationItemsResourceQueryParams as a6, ContactGroupContactsResourceQueryParams as a8, ContractNotesResourceQueryParams as aA, ContractRatesResourceQueryParams as aC, ContractRetainersResourceQueryParams as aE, ContractRoleCostsResourceQueryParams as aG, ContractServiceAdjustmentsResourceQueryParams as aI, ContractServiceBundleAdjustmentsResourceQueryParams as aK, ContractServiceBundleUnitsResourceQueryParams as aM, ContractServiceBundlesResourceQueryParams as aO, ContractServiceUnitsResourceQueryParams as aQ, ContractServicesResourceQueryParams as aS, ContractTicketPurchasesResourceQueryParams as aU, ContractsProfitabilityResult as aV, ContractsResourceQueryParams as aX, CostRateResolution as aY, CountriesResourceQueryParams as a_, ContactGroupsResourceQueryParams as aa, ContactWebhooksResourceQueryParams as ac, ContactsResourceQueryParams as ae, ContractBillingRulesResourceQueryParams as ag, ContractBlockHourFactorsResourceQueryParams as ai, ContractBlocksResourceQueryParams as ak, ContractChargesResourceQueryParams as am, ContractExclusionBillingCodesResourceQueryParams as ao, ContractExclusionRolesResourceQueryParams as aq, ContractExclusionSetExcludedRolesResourceQueryParams as as, ContractExclusionSetExcludedWorkTypesResourceQueryParams as au, ContractExclusionSetsResourceQueryParams as aw, ContractMilestonesResourceQueryParams as ay, RequestOptions as b, ProfitabilityPartDigest as b$, CurrenciesResourceQueryParams as b0, DepartmentsResourceQueryParams as b3, DomainRegistrarsResourceQueryParams as b5, ExpenseItemAttachmentsResourceQueryParams as b8, OpportunityAttachmentsResourceQueryParams as bA, OpportunityCategoriesResourceQueryParams as bC, OrganizationalLevel1sResourceQueryParams as bE, OrganizationalLevel2sResourceQueryParams as bG, OrganizationalLevelAssociationsResourceQueryParams as bI, PageFetcher as bJ, PaginateOptions as bK, PhasesResourceQueryParams as bM, ProductVendorsResourceQueryParams as bO, ProductsResourceQueryParams as bQ, ProfitRateSource as bR, ProfitabilityActivityCategory as bS, ProfitabilityDataQualityWarning as bT, ProfitabilityHighestCostTicket as bU, ProfitabilityLabourCostMethod as bV, ProfitabilityMiscoding as bW, ProfitabilityMonthlyRow as bX, ProfitabilityOpenRenewalItem as bY, ProfitabilityOptions as bZ, ProfitabilityPart as b_, ExpenseItemsResourceQueryParams as ba, ExpenseReportsResourceQueryParams as bc, FieldCacheKind as be, HolidaySetsResourceQueryParams as bg, HolidaysResourceQueryParams as bi, InventoryProductsResourceQueryParams as bm, InvoiceTemplatesResourceQueryParams as bo, InvoicesResourceQueryParams as bq, Logger as br, NotificationHistoryResourceQueryParams as bw, OpportunitiesResourceQueryParams as by, TicketChangeStatusResult as c, ProfitabilityRevenueByType as c0, ProjectChargesResourceQueryParams as c2, ProjectNotesResourceQueryParams as c4, ProjectsResourceQueryParams as c6, PurchaseApprovalsResourceQueryParams as c8, ResourceTimeOffApproversResourceQueryParams as cA, ResourceTimeOffBalancesResourceQueryParams as cC, ResourcesResourceQueryParams as cE, RolesResourceQueryParams as cG, SalesOrdersResourceQueryParams as cI, ServiceCallTaskResourcesResourceQueryParams as cK, ServiceCallTasksResourceQueryParams as cM, ServiceCallTicketResourcesResourceQueryParams as cO, ServiceCallTicketsResourceQueryParams as cQ, ServiceCallsResourceQueryParams as cS, ServiceLevelAgreementResultsResourceQueryParams as cU, ServicesResourceQueryParams as cW, SkillsResourceQueryParams as cY, SubscriptionPeriodsResourceQueryParams as c_, PurchaseOrderItemReceivingResourceQueryParams as ca, PurchaseOrderItemsResourceQueryParams as cc, PurchaseOrdersResourceQueryParams as ce, QuoteItemsResourceQueryParams as cg, QuoteLocationsResourceQueryParams as ci, QuoteTemplatesResourceQueryParams as ck, QuotesResourceQueryParams as cm, ResourceRoleQueuesResourceQueryParams as cs, ResourceRolesResourceQueryParams as cu, ResourceSkillsResourceQueryParams as cw, ResourceTimeOffAdditionalResourceQueryParams as cy, TicketChangeStatusNoChange as d, SubscriptionsResourceQueryParams as d0, SurveyResultsResourceQueryParams as d2, SurveysResourceQueryParams as d4, TagAliasesResourceQueryParams as d6, TagGroupsResourceQueryParams as d8, TicketChecklistLibrariesResourceQueryParams as dA, TicketHistoryResourceQueryParams as dC, TicketNoteAttachmentsResourceQueryParams as dE, TicketNoteWebhooksResourceQueryParams as dG, TicketNotesResourceQueryParams as dI, TicketSecondaryResourcesResourceQueryParams as dK, TicketWebhooksResourceQueryParams as dM, TicketsResourceQueryParams as dO, TimeEntriesPostedCountResult as dP, TimeEntriesPostedPagingOptions as dQ, TimeEntriesPostedStateResult as dR, TimeEntriesPostedWindowCountOptions as dS, TimeEntriesPostedWindowListOptions as dT, TimeEntriesPostedWindowOptions as dU, TimeEntriesPostedWindowResult as dV, TimeEntriesResourceQueryParams as dX, TimeEntriesStatusCountOptions as dY, TimeEntriesStatusListOptions as dZ, TimeEntriesStatusOptions as d_, TagsResourceQueryParams as da, TaskSecondaryResourcesResourceQueryParams as dc, TasksResourceQueryParams as de, TaxRegionsResourceQueryParams as dg, TicketAdditionalConfigurationItemsResourceQueryParams as dj, TicketAdditionalContactsResourceQueryParams as dl, TicketAttachmentsResourceQueryParams as dn, TicketCategoriesResourceQueryParams as dq, TicketCategoryFieldDefaultsResourceQueryParams as ds, TicketChangeRequestApprovalsResourceQueryParams as du, TicketChargesResourceQueryParams as dw, TicketChecklistItemsResourceQueryParams as dy, TimeEntryAttachmentsResourceQueryParams as e0, TimeOffRequestsResourceQueryParams as e2, TtlCacheOptions as e3, RowNamesSummary as el, BlindSurfaceInfo as em, RelationshipResource as en, BlindSurfaceInventory as eo, BlindSurfaceRow as ep, CreateGuidanceValueRequirement as eq, CreateGuidanceRow as er, CreateBlockerKind as es, CreateGuidanceReport as et, AppointmentsResourceQueryParams as g, BillingCodesResourceQueryParams as i, BillingItemApprovalLevelsResourceQueryParams as k, BillingItemsResourceQueryParams as m, ChangeRequestLinksResourceQueryParams as p, ChecklistLibrariesResourceQueryParams as r, ChecklistLibraryChecklistItemsResourceQueryParams as t, ClassificationIconsResourceQueryParams as v, CompaniesResourceQueryParams as x, CompanyAlertsResourceQueryParams as z };
9193
+ export { ConfigurationItemCategoryUdfAssociationsResource as $, ClassificationIconsResource as E, CompaniesResource as H, CompanyAlertsResource as J, CompanyLocationsResource as L, CompanyNotesResource as N, CompanySiteConfigurationsResource as P, CompanyWebhooksResource as S, TtlCache as T, ConfigurationItemBillingProductAssociationsResource as W, ConfigurationItemCategoriesResource as Y, AutotaskClient as a, ContractTicketPurchasesResource as a$, ConfigurationItemDnsRecordsResource as a1, ConfigurationItemNotesResource as a3, ConfigurationItemRelatedItemsResource as a5, ConfigurationItemSslSubjectAlternativeNamesResource as a7, ConfigurationItemTypesResource as a9, ContractExclusionSetExcludedWorkTypesResource as aB, ContractExclusionSetsResource as aD, ContractMilestonesResource as aF, ContractNotesResource as aH, ContractRatesResource as aJ, ContractRetainersResource as aL, ContractRoleCostsResource as aN, ContractServiceAdjustmentsResource as aP, ContractServiceBundleAdjustmentsResource as aR, ContractServiceBundleUnitsResource as aT, ContractServiceBundlesResource as aV, ContractServiceUnitsResource as aX, ContractServicesResource as aZ, ConfigurationItemWebhooksResource as ab, ConfigurationItemsResource as ad, ContactGroupContactsResource as af, ContactGroupsResource as ah, ContactWebhooksResource as aj, ContactsResource as al, ContractBillingRulesResource as an, ContractBlockHourFactorsResource as ap, ContractBlocksResource as ar, ContractChargesResource as at, ContractExclusionBillingCodesResource as av, ContractExclusionRolesResource as ax, ContractExclusionSetExcludedRolesResource as az, ContractsResource as b2, CountriesResource as b5, CurrenciesResource as b7, DEFAULT_ZONE as b9, NoopLogger as bA, NotificationHistoryResource as bB, OpportunitiesResource as bD, OpportunityAttachmentsResource as bF, OpportunityCategoriesResource as bH, OrganizationalLevel1sResource as bJ, OrganizationalLevel2sResource as bL, OrganizationalLevelAssociationsResource as bN, PhasesResource as bR, ProductVendorsResource as bT, ProductsResource as bV, DepartmentsResource as ba, DomainRegistrarsResource as bc, EntityInformationResource as be, ExpenseItemAttachmentsResource as bf, ExpenseItemsResource as bh, ExpenseReportsResource as bj, HolidaySetsResource as bl, HolidaysResource as bn, HttpClient as bp, IDEMPOTENT_METHODS as bq, InventoryProductsResource as br, InvoiceTemplatesResource as bt, InvoicesResource as bv, MAX_PAGES as by, ModulesResource as bz, ServicesResource as c$, ProjectChargesResource as c7, ProjectNotesResource as c9, ResourceSkillsResource as cB, ResourceTimeOffAdditionalResource as cD, ResourceTimeOffApproversResource as cF, ResourceTimeOffBalancesResource as cH, ResourcesResource as cJ, RolesResource as cL, SalesOrdersResource as cN, ServiceCallTaskResourcesResource as cP, ServiceCallTasksResource as cR, ServiceCallTicketResourcesResource as cT, ServiceCallTicketsResource as cV, ServiceCallsResource as cX, ServiceLevelAgreementResultsResource as cZ, ProjectsResource as cb, PurchaseApprovalsResource as cd, PurchaseOrderItemReceivingResource as cf, PurchaseOrderItemsResource as ch, PurchaseOrdersResource as cj, QuoteItemsResource as cl, QuoteLocationsResource as cn, QuoteTemplatesResource as cp, QuotesResource as cr, READ_CACHE_MAX_ENTRIES as ct, REDACTED as cu, REFERENCE_ENTITIES as cv, REFERENCE_TTL_MS as cw, ResourceRoleQueuesResource as cx, ResourceRolesResource as cz, TimeEntriesResource as d$, SkillsResource as d1, SubscriptionPeriodsResource as d3, SubscriptionsResource as d5, SurveyResultsResource as d7, SurveysResource as d9, TicketChargesResource as dB, TicketChecklistItemsResource as dD, TicketChecklistLibrariesResource as dF, TicketHistoryResource as dH, TicketNoteAttachmentsResource as dJ, TicketNoteWebhooksResource as dL, TicketNotesResource as dN, TicketSecondaryResourcesResource as dP, TicketWebhooksResource as dR, TicketsResource as dT, TagAliasesResource as db, TagGroupsResource as dd, TagsResource as df, TaskSecondaryResourcesResource as dh, TasksResource as dj, TaxRegionsResource as dl, ThresholdInformationResource as dn, TicketAdditionalConfigurationItemsResource as dp, TicketAdditionalContactsResource as dr, TicketAttachmentsResource as dt, TicketCategoriesResource as dv, TicketCategoryFieldDefaultsResource as dx, TicketChangeRequestApprovalsResource as dz, TimeEntryAttachmentsResource as e1, TimeOffRequestsResource as e3, VersionInformationResource as e6, VersionResource as e7, ZONES as e8, ZONE_CATALOG as e9, ZoneInformationResource as ea, clampPageSize as eb, collectAll as ec, fieldKey as ed, isCredentialHeaderName as ee, paginate as ef, paginateItems as eg, readTtlFor as eh, redactRecord as ei, resolveBaseUrl as ej, toArray as ek, totalPagesFor as el, zoneUrl as em, FIELD_CACHE_KINDS as f, AGENT_PROFILE as k, AppointmentsResource as l, AuthenticateResource as n, BillingCodesResource as o, BillingItemApprovalLevelsResource as q, BillingItemsResource as s, CREDENTIAL_HEADER_NAMES as u, ChangeRequestLinksResource as v, ChecklistLibrariesResource as x, ChecklistLibraryChecklistItemsResource as z };
9194
+ export type { AutotaskConfig as A, BlindSurfaceInfo as B, CreateGuidanceValueRequirement as C, ChecklistLibraryChecklistItemsResourceQueryParams as D, FieldCacheKind as F, ClassificationIconsResourceQueryParams as G, CompaniesResourceQueryParams as I, CompanyAlertsResourceQueryParams as K, CompanyLocationsResourceQueryParams as M, CompanyNotesResourceQueryParams as O, CompanySiteConfigurationsResourceQueryParams as Q, RowNamesSummary as R, CompanyWebhooksResourceQueryParams as U, ConfigProfile as V, ConfigurationItemBillingProductAssociationsResourceQueryParams as X, ZoneName as Z, ConfigurationItemCategoriesResourceQueryParams as _, ConfigurationItemCategoryUdfAssociationsResourceQueryParams as a0, ConfigurationItemDnsRecordsResourceQueryParams as a2, ConfigurationItemNotesResourceQueryParams as a4, ConfigurationItemRelatedItemsResourceQueryParams as a6, ConfigurationItemSslSubjectAlternativeNamesResourceQueryParams as a8, ContractExclusionSetExcludedRolesResourceQueryParams as aA, ContractExclusionSetExcludedWorkTypesResourceQueryParams as aC, ContractExclusionSetsResourceQueryParams as aE, ContractMilestonesResourceQueryParams as aG, ContractNotesResourceQueryParams as aI, ContractRatesResourceQueryParams as aK, ContractRetainersResourceQueryParams as aM, ContractRoleCostsResourceQueryParams as aO, ContractServiceAdjustmentsResourceQueryParams as aQ, ContractServiceBundleAdjustmentsResourceQueryParams as aS, ContractServiceBundleUnitsResourceQueryParams as aU, ContractServiceBundlesResourceQueryParams as aW, ContractServiceUnitsResourceQueryParams as aY, ContractServicesResourceQueryParams as a_, ConfigurationItemTypesResourceQueryParams as aa, ConfigurationItemWebhooksResourceQueryParams as ac, ConfigurationItemsResourceQueryParams as ae, ContactGroupContactsResourceQueryParams as ag, ContactGroupsResourceQueryParams as ai, ContactWebhooksResourceQueryParams as ak, ContactsResourceQueryParams as am, ContractBillingRulesResourceQueryParams as ao, ContractBlockHourFactorsResourceQueryParams as aq, ContractBlocksResourceQueryParams as as, ContractChargesResourceQueryParams as au, ContractExclusionBillingCodesResourceQueryParams as aw, ContractExclusionRolesResourceQueryParams as ay, RelationshipResource as b, ProfitabilityLabourCostMethod as b$, ContractTicketPurchasesResourceQueryParams as b0, ContractsProfitabilityResult as b1, ContractsResourceQueryParams as b3, CostRateResolution as b4, CountriesResourceQueryParams as b6, CurrenciesResourceQueryParams as b8, NotificationHistoryResourceQueryParams as bC, OpportunitiesResourceQueryParams as bE, OpportunityAttachmentsResourceQueryParams as bG, OpportunityCategoriesResourceQueryParams as bI, OrganizationalLevel1sResourceQueryParams as bK, OrganizationalLevel2sResourceQueryParams as bM, OrganizationalLevelAssociationsResourceQueryParams as bO, PageFetcher as bP, PaginateOptions as bQ, PhasesResourceQueryParams as bS, ProductVendorsResourceQueryParams as bU, ProductsResourceQueryParams as bW, ProfitRateSource as bX, ProfitabilityActivityCategory as bY, ProfitabilityDataQualityWarning as bZ, ProfitabilityHighestCostTicket as b_, DepartmentsResourceQueryParams as bb, DomainRegistrarsResourceQueryParams as bd, ExpenseItemAttachmentsResourceQueryParams as bg, ExpenseItemsResourceQueryParams as bi, ExpenseReportsResourceQueryParams as bk, HolidaySetsResourceQueryParams as bm, HolidaysResourceQueryParams as bo, InventoryProductsResourceQueryParams as bs, InvoiceTemplatesResourceQueryParams as bu, InvoicesResourceQueryParams as bw, Logger as bx, CreateGuidanceRow as c, ProfitabilityMiscoding as c0, ProfitabilityMonthlyRow as c1, ProfitabilityOpenRenewalItem as c2, ProfitabilityOptions as c3, ProfitabilityPart as c4, ProfitabilityPartDigest as c5, ProfitabilityRevenueByType as c6, ProjectChargesResourceQueryParams as c8, ResourceRolesResourceQueryParams as cA, ResourceSkillsResourceQueryParams as cC, ResourceTimeOffAdditionalResourceQueryParams as cE, ResourceTimeOffApproversResourceQueryParams as cG, ResourceTimeOffBalancesResourceQueryParams as cI, ResourcesResourceQueryParams as cK, RolesResourceQueryParams as cM, SalesOrdersResourceQueryParams as cO, ServiceCallTaskResourcesResourceQueryParams as cQ, ServiceCallTasksResourceQueryParams as cS, ServiceCallTicketResourcesResourceQueryParams as cU, ServiceCallTicketsResourceQueryParams as cW, ServiceCallsResourceQueryParams as cY, ServiceLevelAgreementResultsResourceQueryParams as c_, ProjectNotesResourceQueryParams as ca, ProjectsResourceQueryParams as cc, PurchaseApprovalsResourceQueryParams as ce, PurchaseOrderItemReceivingResourceQueryParams as cg, PurchaseOrderItemsResourceQueryParams as ci, PurchaseOrdersResourceQueryParams as ck, QuoteItemsResourceQueryParams as cm, QuoteLocationsResourceQueryParams as co, QuoteTemplatesResourceQueryParams as cq, QuotesResourceQueryParams as cs, ResourceRoleQueuesResourceQueryParams as cy, CreateBlockerKind as d, ServicesResourceQueryParams as d0, SkillsResourceQueryParams as d2, SubscriptionPeriodsResourceQueryParams as d4, SubscriptionsResourceQueryParams as d6, SurveyResultsResourceQueryParams as d8, TicketChangeRequestApprovalsResourceQueryParams as dA, TicketChargesResourceQueryParams as dC, TicketChecklistItemsResourceQueryParams as dE, TicketChecklistLibrariesResourceQueryParams as dG, TicketHistoryResourceQueryParams as dI, TicketNoteAttachmentsResourceQueryParams as dK, TicketNoteWebhooksResourceQueryParams as dM, TicketNotesResourceQueryParams as dO, TicketSecondaryResourcesResourceQueryParams as dQ, TicketWebhooksResourceQueryParams as dS, TicketsResourceQueryParams as dU, TimeEntriesPostedCountResult as dV, TimeEntriesPostedPagingOptions as dW, TimeEntriesPostedWindowCountOptions as dX, TimeEntriesPostedWindowListOptions as dY, TimeEntriesPostedWindowOptions as dZ, TimeEntriesPostedWindowResult as d_, SurveysResourceQueryParams as da, TagAliasesResourceQueryParams as dc, TagGroupsResourceQueryParams as de, TagsResourceQueryParams as dg, TaskSecondaryResourcesResourceQueryParams as di, TasksResourceQueryParams as dk, TaxRegionsResourceQueryParams as dm, TicketAdditionalConfigurationItemsResourceQueryParams as dq, TicketAdditionalContactsResourceQueryParams as ds, TicketAttachmentsResourceQueryParams as du, TicketCategoriesResourceQueryParams as dw, TicketCategoryFieldDefaultsResourceQueryParams as dy, CreateGuidanceReport as e, TimeEntriesResourceQueryParams as e0, TimeEntryAttachmentsResourceQueryParams as e2, TimeOffRequestsResourceQueryParams as e4, TtlCacheOptions as e5, ResolvedAutotaskConfig as g, RequestOptions as h, TicketChangeStatusResult as i, TicketChangeStatusNoChange as j, AppointmentsResourceQueryParams as m, BillingCodesResourceQueryParams as p, BillingItemApprovalLevelsResourceQueryParams as r, BillingItemsResourceQueryParams as t, ChangeRequestLinksResourceQueryParams as w, ChecklistLibrariesResourceQueryParams as y };