node-autotask 0.11.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/MCP_TOOL_CATALOG.json +26 -8
  2. package/MCP_TOOL_MANIFEST.md +12 -11
  3. package/N8N_MCP_MANIFEST.json +3 -3
  4. package/N8N_MCP_MANIFEST.md +4 -4
  5. package/README.md +1 -1
  6. package/capabilities.json +1352 -1233
  7. package/dist/capabilities.cjs +2 -2
  8. package/dist/capabilities.js +1 -1
  9. package/dist/{chunk-QAX222R6.cjs → chunk-36PG2IU2.cjs} +1647 -394
  10. package/dist/{chunk-T5FLSJOD.cjs → chunk-CSRCMBZ2.cjs} +1351 -1232
  11. package/dist/{chunk-YKEX4SK7.cjs → chunk-IHRXVIUU.cjs} +519 -39
  12. package/dist/{chunk-7L23FDQW.js → chunk-NACI2NDF.js} +1351 -1232
  13. package/dist/{chunk-CJONZQ7E.js → chunk-P35GFG2H.js} +1259 -6
  14. package/dist/{chunk-25ZUKHS4.cjs → chunk-PGQIGE63.cjs} +135 -135
  15. package/dist/{chunk-SXHPUQMB.js → chunk-PPTAMCFA.js} +2 -2
  16. package/dist/{chunk-LNRN45XS.js → chunk-ZOA5HUFX.js} +498 -18
  17. package/dist/{index-B_xToSpq.d.ts → index-DZfd9Gt7.d.cts} +251 -2
  18. package/dist/{index-Dv_GSZaN.d.cts → index-UilX3PFL.d.ts} +251 -2
  19. package/dist/index.cjs +20 -20
  20. package/dist/index.d.cts +4 -4
  21. package/dist/index.d.ts +4 -4
  22. package/dist/index.js +5 -5
  23. package/dist/operations/index.cjs +123 -588
  24. package/dist/operations/index.d.cts +4 -4
  25. package/dist/operations/index.d.ts +4 -4
  26. package/dist/operations/index.js +10 -475
  27. package/dist/pool.cjs +8 -8
  28. package/dist/pool.d.cts +2 -2
  29. package/dist/pool.d.ts +2 -2
  30. package/dist/pool.js +4 -4
  31. package/dist/resources/index.cjs +4 -4
  32. package/dist/resources/index.d.cts +2 -2
  33. package/dist/resources/index.d.ts +2 -2
  34. package/dist/resources/index.js +3 -3
  35. package/dist/types/index.d.cts +1 -1
  36. package/dist/types/index.d.ts +1 -1
  37. package/docs/API.md +301 -2
  38. package/docs/N8N-ADAPTER.md +1 -1
  39. package/package.json +1 -1
  40. package/dist/{index-cQ6CRexR.d.cts → index-BXtKN1M5.d.cts} +201 -201
  41. package/dist/{index-cQ6CRexR.d.ts → index-BXtKN1M5.d.ts} +201 -201
@@ -1,4 +1,4 @@
1
- import { I as Identifier, g as AuditEvent, ez as ResolutionCaps, Q as QueryParams, dD as PagingModel, dn as OperationResult, dC as Page, cE as EmptyReasonInfo, cG as EntityInformationModel, cW as FieldInformationModel, cU as Field, a as FilterCondition, cD as DryRunResult, ey as Resolution, c as Appointment, d as AppointmentCreate, f as AppointmentUpdate, e as AppointmentSummary, h as AuthTokenResultModel, B as BillingCode, j as BillingCodeCreate, l as BillingCodeUpdate, k as BillingCodeSummary, m as BillingItems, n as BillingItemsCreate, p as BillingItemsUpdate, o as BillingItemsSummary, C as ChangeRequestLink, q as ChangeRequestLinkCreate, s as ChangeRequestLinkUpdate, r as ChangeRequestLinkSummary, t as ChecklistLibrary, y as ChecklistLibraryCreate, D as ChecklistLibraryUpdate, z as ChecklistLibrarySummary, u as ChecklistLibraryChecklistItem, v as ChecklistLibraryChecklistItemCreate, x as ChecklistLibraryChecklistItemUpdate, w as ChecklistLibraryChecklistItemSummary, E as ClassificationIcon, G as ClassificationIconCreate, J as ClassificationIconUpdate, H as ClassificationIconSummary, K as Company, S as CompanyLocation, aN as Contact, W as CompanyNote, g9 as Ticket, dR as Project, hq as CompositeNamesSection, ha as TimeEntry, R as CompanyCreate, a3 as CompanyUpdate, a2 as CompanySummary, P as CompanyContext, L as CompanyAlert, M as CompanyAlertCreate, O as CompanyAlertUpdate, N as CompanyAlertSummary, T as CompanyLocationCreate, V as CompanyLocationUpdate, U as CompanyLocationSummary, X as CompanyNoteCreate, Z as CompanyNoteUpdate, Y as CompanyNoteSummary, _ as CompanySiteConfigurations, $ as CompanySiteConfigurationsCreate, a1 as CompanySiteConfigurationsUpdate, a0 as CompanySiteConfigurationsSummary, a4 as CompanyWebhook, a5 as CompanyWebhookCreate, a7 as CompanyWebhookUpdate, a6 as CompanyWebhookSummary, a9 as ConfigurationItemBillingProductAssociations, aa as ConfigurationItemBillingProductAssociationsCreate, ac as ConfigurationItemBillingProductAssociationsUpdate, ab as ConfigurationItemBillingProductAssociationsSummary, ad as ConfigurationItemCategory, ae as ConfigurationItemCategoryCreate, ak as ConfigurationItemCategoryUpdate, af as ConfigurationItemCategorySummary, ag as ConfigurationItemCategoryUdfAssociation, ah as ConfigurationItemCategoryUdfAssociationCreate, aj as ConfigurationItemCategoryUdfAssociationUpdate, ai as ConfigurationItemCategoryUdfAssociationSummary, an as ConfigurationItemDnsRecord, ao as ConfigurationItemDnsRecordCreate, aq as ConfigurationItemDnsRecordUpdate, ap as ConfigurationItemDnsRecordSummary, ar as ConfigurationItemNote, as as ConfigurationItemNoteCreate, au as ConfigurationItemNoteUpdate, at as ConfigurationItemNoteSummary, av as ConfigurationItemRelatedItem, aw as ConfigurationItemRelatedItemCreate, ay as ConfigurationItemRelatedItemUpdate, ax as ConfigurationItemRelatedItemSummary, a8 as ConfigurationItem, aE as ConfigurationItemType, am as ConfigurationItemCreate, aI as ConfigurationItemUpdate, aD as ConfigurationItemSummary, al as ConfigurationItemContext, az as ConfigurationItemSslSubjectAlternativeName, aA as ConfigurationItemSslSubjectAlternativeNameCreate, aC as ConfigurationItemSslSubjectAlternativeNameUpdate, aB as ConfigurationItemSslSubjectAlternativeNameSummary, aF as ConfigurationItemTypeCreate, aH as ConfigurationItemTypeUpdate, aG as ConfigurationItemTypeSummary, aJ as ConfigurationItemWebhook, aK as ConfigurationItemWebhookCreate, aM as ConfigurationItemWebhookUpdate, aL as ConfigurationItemWebhookSummary, aQ as ContactGroupContacts, aR as ContactGroupContactsCreate, aT as ContactGroupContactsUpdate, aS as ContactGroupContactsSummary, aU as ContactGroups, aV as ContactGroupsCreate, aX as ContactGroupsUpdate, aW as ContactGroupsSummary, aY as ContactSummary, aP as ContactCreate, aZ as ContactUpdate, aO as ContactContext, a_ as ContactWebhook, a$ as ContactWebhookCreate, b1 as ContactWebhookUpdate, b0 as ContactWebhookSummary, b3 as ContractBillingRule, b4 as ContractBillingRuleCreate, b6 as ContractBillingRuleUpdate, b5 as ContractBillingRuleSummary, b9 as ContractBlockHourFactor, ba as ContractBlockHourFactorCreate, bc as ContractBlockHourFactorUpdate, bb as ContractBlockHourFactorSummary, b7 as ContractBlock, b8 as ContractBlockCreate, be as ContractBlockUpdate, bd as ContractBlockSummary, bf as ContractCharge, bg as ContractChargeCreate, bi as ContractChargeUpdate, bh as ContractChargeSummary, bk as ContractExclusionBillingCode, bl as ContractExclusionBillingCodeCreate, bn as ContractExclusionBillingCodeUpdate, bm as ContractExclusionBillingCodeSummary, bo as ContractExclusionRoles, bp as ContractExclusionRolesCreate, br as ContractExclusionRolesUpdate, bq as ContractExclusionRolesSummary, bs as ContractExclusionSetExcludedRoles, bt as ContractExclusionSetExcludedRolesCreate, bv as ContractExclusionSetExcludedRolesUpdate, bu as ContractExclusionSetExcludedRolesSummary, bw as ContractExclusionSetExcludedWorkTypes, bx as ContractExclusionSetExcludedWorkTypesCreate, bz as ContractExclusionSetExcludedWorkTypesUpdate, by as ContractExclusionSetExcludedWorkTypesSummary, bA as ContractExclusionSets, bB as ContractExclusionSetsCreate, bD as ContractExclusionSetsUpdate, bC as ContractExclusionSetsSummary, bE as ContractMilestone, bF as ContractMilestoneCreate, bH as ContractMilestoneUpdate, bG as ContractMilestoneSummary, bI as ContractNote, bJ as ContractNoteCreate, bL as ContractNoteUpdate, bK as ContractNoteSummary, bM as ContractRate, bN as ContractRateCreate, bP as ContractRateUpdate, bO as ContractRateSummary, bQ as ContractRetainers, bR as ContractRetainersCreate, bT as ContractRetainersUpdate, bS as ContractRetainersSummary, bU as ContractRoleCosts, bV as ContractRoleCostsCreate, bX as ContractRoleCostsUpdate, bW as ContractRoleCostsSummary, bZ as ContractServiceAdjustment, b_ as ContractServiceAdjustmentCreate, c0 as ContractServiceAdjustmentUpdate, b$ as ContractServiceAdjustmentSummary, c2 as ContractServiceBundleAdjustment, c3 as ContractServiceBundleAdjustmentCreate, c5 as ContractServiceBundleAdjustmentUpdate, c4 as ContractServiceBundleAdjustmentSummary, c1 as ContractServiceBundle, c6 as ContractServiceBundleCreate, cc as ContractServiceBundleUpdate, c7 as ContractServiceBundleSummary, c8 as ContractServiceBundleUnit, c9 as ContractServiceBundleUnitCreate, cb as ContractServiceBundleUnitUpdate, ca as ContractServiceBundleUnitSummary, bY as ContractService, cd as ContractServiceCreate, cj as ContractServiceUpdate, ce as ContractServiceSummary, cf as ContractServiceUnit, cg as ContractServiceUnitCreate, ci as ContractServiceUnitUpdate, ch as ContractServiceUnitSummary, b2 as Contract, bj as ContractCreate, cp as ContractUpdate, ck as ContractSummary, cl as ContractTicketPurchases, cm as ContractTicketPurchasesCreate, co as ContractTicketPurchasesUpdate, cn as ContractTicketPurchasesSummary, cq as Country, cr as CountryCreate, ct as CountryUpdate, cs as CountrySummary, cu as Department, cv as DepartmentCreate, cx as DepartmentUpdate, cw as DepartmentSummary, cz as DomainRegistrar, cA as DomainRegistrarCreate, cC as DomainRegistrarUpdate, cB as DomainRegistrarSummary, cY as GlobalEntityInformationResultModel, cJ as ExpenseItemAttachment, cK as ExpenseItemAttachmentCreate, cM as ExpenseItemAttachmentUpdate, cL as ExpenseItemAttachmentSummary, cI as ExpenseItem, cN as ExpenseItemCreate, cP as ExpenseItemUpdate, cO as ExpenseItemSummary, cQ as ExpenseReport, cR as ExpenseReportCreate, cT as ExpenseReportUpdate, cS as ExpenseReportSummary, c$ as HolidaySet, d0 as HolidaySetCreate, d2 as HolidaySetUpdate, d1 as HolidaySetSummary, cZ as Holiday, c_ as HolidayCreate, d4 as HolidayUpdate, d3 as HolidaySummary, d5 as InventoryProduct, d6 as InventoryProductCreate, d8 as InventoryProductUpdate, d7 as InventoryProductSummary, d9 as InventoryStockedItemAdd, da as InventoryStockedItemRemove, db as InventoryStockedItemTransfer, dc as Invoice, dd as InvoiceCreate, df as InvoiceUpdate, de as InvoiceSummary, dh as ModuleAccessResultModel, di as NotificationHistory, dj as NotificationHistoryCreate, dl as NotificationHistoryUpdate, dk as NotificationHistorySummary, dq as Opportunity, dz as OpportunityCreate, dB as OpportunityUpdate, dA as OpportunitySummary, dr as OpportunityAttachment, ds as OpportunityAttachmentCreate, du as OpportunityAttachmentUpdate, dt as OpportunityAttachmentSummary, dv as OpportunityCategory, dw as OpportunityCategoryCreate, dy as OpportunityCategoryUpdate, dx as OpportunityCategorySummary, dE as Phase, dF as PhaseCreate, dH as PhaseUpdate, dG as PhaseSummary, dJ as Product, dK as ProductCreate, dM as ProductUpdate, dL as ProductSummary, dN as ProductVendors, dO as ProductVendorsCreate, dQ as ProductVendorsUpdate, dP as ProductVendorsSummary, dS as ProjectCharge, dT as ProjectChargeCreate, dV as ProjectChargeUpdate, dU as ProjectChargeSummary, dY as ProjectNote, dZ as ProjectNoteCreate, d$ as ProjectNoteUpdate, d_ as ProjectNoteSummary, dX as ProjectCreate, e1 as ProjectUpdate, e0 as ProjectSummary, hr as CompositeContextOptions, dW as ProjectContext, e2 as PurchaseApprovals, e3 as PurchaseApprovalsCreate, e5 as PurchaseApprovalsUpdate, e4 as PurchaseApprovalsSummary, e6 as PurchaseOrderItemReceiving, e7 as PurchaseOrderItemReceivingCreate, e9 as PurchaseOrderItemReceivingUpdate, e8 as PurchaseOrderItemReceivingSummary, ea as PurchaseOrderItems, eb as PurchaseOrderItemsCreate, ed as PurchaseOrderItemsUpdate, ec as PurchaseOrderItemsSummary, ee as PurchaseOrders, ef as PurchaseOrdersCreate, eh as PurchaseOrdersUpdate, eg as PurchaseOrdersSummary, ek as QuoteItem, el as QuoteItemCreate, en as QuoteItemUpdate, em as QuoteItemSummary, eo as QuoteLocation, ep as QuoteLocationCreate, er as QuoteLocationUpdate, eq as QuoteLocationSummary, ei as Quote, ej as QuoteCreate, ex as QuoteUpdate, es as QuoteSummary, et as QuoteTemplate, eu as QuoteTemplateCreate, ew as QuoteTemplateUpdate, ev as QuoteTemplateSummary, eE as ResourceRoleQueue, eF as ResourceRoleQueueCreate, eH as ResourceRoleQueueUpdate, eG as ResourceRoleQueueSummary, eC as ResourceRole, eD as ResourceRoleCreate, eJ as ResourceRoleUpdate, eI as ResourceRoleSummary, eK as ResourceSkill, eL as ResourceSkillCreate, eN as ResourceSkillUpdate, eM as ResourceSkillSummary, eA as Resource, eB as ResourceCreate, e$ as ResourceUpdate, eO as ResourceSummary, eP as ResourceTimeOffAdditional, eQ as ResourceTimeOffAdditionalCreate, eS as ResourceTimeOffAdditionalUpdate, eR as ResourceTimeOffAdditionalSummary, eT as ResourceTimeOffApprover, eU as ResourceTimeOffApproverCreate, eW as ResourceTimeOffApproverUpdate, eV as ResourceTimeOffApproverSummary, eX as ResourceTimeOffBalance, eY as ResourceTimeOffBalanceCreate, e_ as ResourceTimeOffBalanceUpdate, eZ as ResourceTimeOffBalanceSummary, f0 as Role, f1 as RoleCreate, f3 as RoleUpdate, f2 as RoleSummary, f5 as ServiceCall, f6 as ServiceCallCreate, fo as ServiceCallUpdate, f7 as ServiceCallSummary, fa as ServiceCallTaskResource, fb as ServiceCallTaskResourceCreate, fd as ServiceCallTaskResourceUpdate, fc as ServiceCallTaskResourceSummary, f8 as ServiceCallTask, f9 as ServiceCallTaskCreate, ff as ServiceCallTaskUpdate, fe as ServiceCallTaskSummary, fi as ServiceCallTicketResource, fj as ServiceCallTicketResourceCreate, fl as ServiceCallTicketResourceUpdate, fk as ServiceCallTicketResourceSummary, fg as ServiceCallTicket, fh as ServiceCallTicketCreate, fn as ServiceCallTicketUpdate, fm as ServiceCallTicketSummary, fq as ServiceLevelAgreementResults, fr as ServiceLevelAgreementResultsCreate, ft as ServiceLevelAgreementResultsUpdate, fs as ServiceLevelAgreementResultsSummary, f4 as Service, fp as ServiceCreate, fv as ServiceUpdate, fu as ServiceSummary, fw as Skill, fx as SkillCreate, fz as SkillUpdate, fy as SkillSummary, fC as SubscriptionPeriod, fD as SubscriptionPeriodCreate, fF as SubscriptionPeriodUpdate, fE as SubscriptionPeriodSummary, fA as Subscription, fB as SubscriptionCreate, fH as SubscriptionUpdate, fG as SubscriptionSummary, fK as SurveyResults, fL as SurveyResultsCreate, fN as SurveyResultsUpdate, fM as SurveyResultsSummary, fI as Survey, fJ as SurveyCreate, fP as SurveyUpdate, fO as SurveySummary, fR as TagAlias, fS as TagAliasCreate, fU as TagAliasUpdate, fT as TagAliasSummary, fW as TagGroup, fX as TagGroupCreate, fZ as TagGroupUpdate, fY as TagGroupSummary, fQ as Tag, fV as TagCreate, f$ as TagUpdate, f_ as TagSummary, g2 as TaskSecondaryResource, g3 as TaskSecondaryResourceCreate, g5 as TaskSecondaryResourceUpdate, g4 as TaskSecondaryResourceSummary, g0 as Task, g1 as TaskCreate, g7 as TaskUpdate, g6 as TaskSummary, g8 as ThresholdStatusResultModel, ga as TicketAdditionalConfigurationItem, gb as TicketAdditionalConfigurationItemCreate, gd as TicketAdditionalConfigurationItemUpdate, gc as TicketAdditionalConfigurationItemSummary, ge as TicketAdditionalContact, gf as TicketAdditionalContactCreate, gh as TicketAdditionalContactUpdate, gg as TicketAdditionalContactSummary, gi as TicketAttachment, gj as TicketAttachmentCreate, gl as TicketAttachmentUpdate, gk as TicketAttachmentSummary, gm as TicketCategory, gn as TicketCategoryCreate, gt as TicketCategoryUpdate, gs as TicketCategorySummary, go as TicketCategoryFieldDefault, gp as TicketCategoryFieldDefaultCreate, gr as TicketCategoryFieldDefaultUpdate, gq as TicketCategoryFieldDefaultSummary, gu as TicketChangeRequestApproval, gv as TicketChangeRequestApprovalCreate, gx as TicketChangeRequestApprovalUpdate, gw as TicketChangeRequestApprovalSummary, gy as TicketCharge, gz as TicketChargeCreate, gB as TicketChargeUpdate, gA as TicketChargeSummary, gC as TicketChecklistItem, gD as TicketChecklistItemCreate, gF as TicketChecklistItemUpdate, gE as TicketChecklistItemSummary, gG as TicketChecklistLibrary, gH as TicketChecklistLibraryCreate, gJ as TicketChecklistLibraryUpdate, gI as TicketChecklistLibrarySummary, gM as TicketHistory, gN as TicketHistoryCreate, gP as TicketHistoryUpdate, gO as TicketHistorySummary, gR as TicketNoteAttachment, gS as TicketNoteAttachmentCreate, gU as TicketNoteAttachmentUpdate, gT as TicketNoteAttachmentSummary, gQ as TicketNote, gV as TicketNoteCreate, gX as TicketNoteUpdate, gW as TicketNoteSummary, gY as TicketNoteWebhook, gZ as TicketNoteWebhookCreate, g$ as TicketNoteWebhookUpdate, g_ as TicketNoteWebhookSummary, h0 as TicketSecondaryResource, h1 as TicketSecondaryResourceCreate, h3 as TicketSecondaryResourceUpdate, h2 as TicketSecondaryResourceSummary, gL as TicketCreate, h5 as TicketUpdate, h4 as TicketSummary, gK as TicketContext, h6 as TicketWebhook, h7 as TicketWebhookCreate, h9 as TicketWebhookUpdate, h8 as TicketWebhookSummary, hf as TimeEntryCreate, hh as TimeEntryUpdate, hg as TimeEntrySummary, hb as TimeEntryAttachment, hc as TimeEntryAttachmentCreate, he as TimeEntryAttachmentUpdate, hd as TimeEntryAttachmentSummary, hi as TimeOffRequest, hj as TimeOffRequestCreate, hm as TimeOffRequestUpdate, hl as TimeOffRequestSummary, A as ApiVersionResultModel, i as AutotaskVersionResultModel, ho as ZoneInformationResultModel } from './index-cQ6CRexR.js';
1
+ import { I as Identifier, g as AuditEvent, ez as ResolutionCaps, Q as QueryParams, dD as PagingModel, dn as OperationResult, dC as Page, cE as EmptyReasonInfo, cG as EntityInformationModel, cW as FieldInformationModel, cU as Field, a as FilterCondition, cD as DryRunResult, ey as Resolution, c as Appointment, d as AppointmentCreate, f as AppointmentUpdate, e as AppointmentSummary, h as AuthTokenResultModel, B as BillingCode, j as BillingCodeCreate, l as BillingCodeUpdate, k as BillingCodeSummary, m as BillingItems, n as BillingItemsCreate, p as BillingItemsUpdate, o as BillingItemsSummary, C as ChangeRequestLink, q as ChangeRequestLinkCreate, s as ChangeRequestLinkUpdate, r as ChangeRequestLinkSummary, t as ChecklistLibrary, y as ChecklistLibraryCreate, D as ChecklistLibraryUpdate, z as ChecklistLibrarySummary, u as ChecklistLibraryChecklistItem, v as ChecklistLibraryChecklistItemCreate, x as ChecklistLibraryChecklistItemUpdate, w as ChecklistLibraryChecklistItemSummary, E as ClassificationIcon, G as ClassificationIconCreate, J as ClassificationIconUpdate, H as ClassificationIconSummary, K as Company, S as CompanyLocation, aN as Contact, W as CompanyNote, g9 as Ticket, dR as Project, hq as CompositeNamesSection, ha as TimeEntry, R as CompanyCreate, a3 as CompanyUpdate, a2 as CompanySummary, P as CompanyContext, L as CompanyAlert, M as CompanyAlertCreate, O as CompanyAlertUpdate, N as CompanyAlertSummary, T as CompanyLocationCreate, V as CompanyLocationUpdate, U as CompanyLocationSummary, X as CompanyNoteCreate, Z as CompanyNoteUpdate, Y as CompanyNoteSummary, _ as CompanySiteConfigurations, $ as CompanySiteConfigurationsCreate, a1 as CompanySiteConfigurationsUpdate, a0 as CompanySiteConfigurationsSummary, a4 as CompanyWebhook, a5 as CompanyWebhookCreate, a7 as CompanyWebhookUpdate, a6 as CompanyWebhookSummary, a9 as ConfigurationItemBillingProductAssociations, aa as ConfigurationItemBillingProductAssociationsCreate, ac as ConfigurationItemBillingProductAssociationsUpdate, ab as ConfigurationItemBillingProductAssociationsSummary, ad as ConfigurationItemCategory, ae as ConfigurationItemCategoryCreate, ak as ConfigurationItemCategoryUpdate, af as ConfigurationItemCategorySummary, ag as ConfigurationItemCategoryUdfAssociation, ah as ConfigurationItemCategoryUdfAssociationCreate, aj as ConfigurationItemCategoryUdfAssociationUpdate, ai as ConfigurationItemCategoryUdfAssociationSummary, an as ConfigurationItemDnsRecord, ao as ConfigurationItemDnsRecordCreate, aq as ConfigurationItemDnsRecordUpdate, ap as ConfigurationItemDnsRecordSummary, ar as ConfigurationItemNote, as as ConfigurationItemNoteCreate, au as ConfigurationItemNoteUpdate, at as ConfigurationItemNoteSummary, av as ConfigurationItemRelatedItem, aw as ConfigurationItemRelatedItemCreate, ay as ConfigurationItemRelatedItemUpdate, ax as ConfigurationItemRelatedItemSummary, a8 as ConfigurationItem, aE as ConfigurationItemType, am as ConfigurationItemCreate, aI as ConfigurationItemUpdate, aD as ConfigurationItemSummary, al as ConfigurationItemContext, az as ConfigurationItemSslSubjectAlternativeName, aA as ConfigurationItemSslSubjectAlternativeNameCreate, aC as ConfigurationItemSslSubjectAlternativeNameUpdate, aB as ConfigurationItemSslSubjectAlternativeNameSummary, aF as ConfigurationItemTypeCreate, aH as ConfigurationItemTypeUpdate, aG as ConfigurationItemTypeSummary, aJ as ConfigurationItemWebhook, aK as ConfigurationItemWebhookCreate, aM as ConfigurationItemWebhookUpdate, aL as ConfigurationItemWebhookSummary, aQ as ContactGroupContacts, aR as ContactGroupContactsCreate, aT as ContactGroupContactsUpdate, aS as ContactGroupContactsSummary, aU as ContactGroups, aV as ContactGroupsCreate, aX as ContactGroupsUpdate, aW as ContactGroupsSummary, aY as ContactSummary, aP as ContactCreate, aZ as ContactUpdate, aO as ContactContext, a_ as ContactWebhook, a$ as ContactWebhookCreate, b1 as ContactWebhookUpdate, b0 as ContactWebhookSummary, b3 as ContractBillingRule, b4 as ContractBillingRuleCreate, b6 as ContractBillingRuleUpdate, b5 as ContractBillingRuleSummary, b9 as ContractBlockHourFactor, ba as ContractBlockHourFactorCreate, bc as ContractBlockHourFactorUpdate, bb as ContractBlockHourFactorSummary, b7 as ContractBlock, b8 as ContractBlockCreate, be as ContractBlockUpdate, bd as ContractBlockSummary, bf as ContractCharge, bg as ContractChargeCreate, bi as ContractChargeUpdate, bh as ContractChargeSummary, bk as ContractExclusionBillingCode, bl as ContractExclusionBillingCodeCreate, bn as ContractExclusionBillingCodeUpdate, bm as ContractExclusionBillingCodeSummary, bo as ContractExclusionRoles, bp as ContractExclusionRolesCreate, br as ContractExclusionRolesUpdate, bq as ContractExclusionRolesSummary, bs as ContractExclusionSetExcludedRoles, bt as ContractExclusionSetExcludedRolesCreate, bv as ContractExclusionSetExcludedRolesUpdate, bu as ContractExclusionSetExcludedRolesSummary, bw as ContractExclusionSetExcludedWorkTypes, bx as ContractExclusionSetExcludedWorkTypesCreate, bz as ContractExclusionSetExcludedWorkTypesUpdate, by as ContractExclusionSetExcludedWorkTypesSummary, bA as ContractExclusionSets, bB as ContractExclusionSetsCreate, bD as ContractExclusionSetsUpdate, bC as ContractExclusionSetsSummary, bE as ContractMilestone, bF as ContractMilestoneCreate, bH as ContractMilestoneUpdate, bG as ContractMilestoneSummary, bI as ContractNote, bJ as ContractNoteCreate, bL as ContractNoteUpdate, bK as ContractNoteSummary, bM as ContractRate, bN as ContractRateCreate, bP as ContractRateUpdate, bO as ContractRateSummary, bQ as ContractRetainers, bR as ContractRetainersCreate, bT as ContractRetainersUpdate, bS as ContractRetainersSummary, bU as ContractRoleCosts, bV as ContractRoleCostsCreate, bX as ContractRoleCostsUpdate, bW as ContractRoleCostsSummary, bZ as ContractServiceAdjustment, b_ as ContractServiceAdjustmentCreate, c0 as ContractServiceAdjustmentUpdate, b$ as ContractServiceAdjustmentSummary, c2 as ContractServiceBundleAdjustment, c3 as ContractServiceBundleAdjustmentCreate, c5 as ContractServiceBundleAdjustmentUpdate, c4 as ContractServiceBundleAdjustmentSummary, c1 as ContractServiceBundle, c6 as ContractServiceBundleCreate, cc as ContractServiceBundleUpdate, c7 as ContractServiceBundleSummary, c8 as ContractServiceBundleUnit, c9 as ContractServiceBundleUnitCreate, cb as ContractServiceBundleUnitUpdate, ca as ContractServiceBundleUnitSummary, bY as ContractService, cd as ContractServiceCreate, cj as ContractServiceUpdate, ce as ContractServiceSummary, cf as ContractServiceUnit, cg as ContractServiceUnitCreate, ci as ContractServiceUnitUpdate, ch as ContractServiceUnitSummary, b2 as Contract, dc as Invoice, eA as Resource, cI as ExpenseItem, fA as Subscription, bj as ContractCreate, cp as ContractUpdate, ck as ContractSummary, cl as ContractTicketPurchases, cm as ContractTicketPurchasesCreate, co as ContractTicketPurchasesUpdate, cn as ContractTicketPurchasesSummary, cq as Country, cr as CountryCreate, ct as CountryUpdate, cs as CountrySummary, cu as Department, cv as DepartmentCreate, cx as DepartmentUpdate, cw as DepartmentSummary, cz as DomainRegistrar, cA as DomainRegistrarCreate, cC as DomainRegistrarUpdate, cB as DomainRegistrarSummary, cY as GlobalEntityInformationResultModel, cJ as ExpenseItemAttachment, cK as ExpenseItemAttachmentCreate, cM as ExpenseItemAttachmentUpdate, cL as ExpenseItemAttachmentSummary, cN as ExpenseItemCreate, cP as ExpenseItemUpdate, cO as ExpenseItemSummary, cQ as ExpenseReport, cR as ExpenseReportCreate, cT as ExpenseReportUpdate, cS as ExpenseReportSummary, c$ as HolidaySet, d0 as HolidaySetCreate, d2 as HolidaySetUpdate, d1 as HolidaySetSummary, cZ as Holiday, c_ as HolidayCreate, d4 as HolidayUpdate, d3 as HolidaySummary, d5 as InventoryProduct, d6 as InventoryProductCreate, d8 as InventoryProductUpdate, d7 as InventoryProductSummary, d9 as InventoryStockedItemAdd, da as InventoryStockedItemRemove, db as InventoryStockedItemTransfer, dd as InvoiceCreate, df as InvoiceUpdate, de as InvoiceSummary, dh as ModuleAccessResultModel, di as NotificationHistory, dj as NotificationHistoryCreate, dl as NotificationHistoryUpdate, dk as NotificationHistorySummary, dq as Opportunity, dz as OpportunityCreate, dB as OpportunityUpdate, dA as OpportunitySummary, dr as OpportunityAttachment, ds as OpportunityAttachmentCreate, du as OpportunityAttachmentUpdate, dt as OpportunityAttachmentSummary, dv as OpportunityCategory, dw as OpportunityCategoryCreate, dy as OpportunityCategoryUpdate, dx as OpportunityCategorySummary, dE as Phase, dF as PhaseCreate, dH as PhaseUpdate, dG as PhaseSummary, dJ as Product, dK as ProductCreate, dM as ProductUpdate, dL as ProductSummary, dN as ProductVendors, dO as ProductVendorsCreate, dQ as ProductVendorsUpdate, dP as ProductVendorsSummary, dS as ProjectCharge, dT as ProjectChargeCreate, dV as ProjectChargeUpdate, dU as ProjectChargeSummary, dY as ProjectNote, dZ as ProjectNoteCreate, d$ as ProjectNoteUpdate, d_ as ProjectNoteSummary, dX as ProjectCreate, e1 as ProjectUpdate, e0 as ProjectSummary, hr as CompositeContextOptions, dW as ProjectContext, e2 as PurchaseApprovals, e3 as PurchaseApprovalsCreate, e5 as PurchaseApprovalsUpdate, e4 as PurchaseApprovalsSummary, e6 as PurchaseOrderItemReceiving, e7 as PurchaseOrderItemReceivingCreate, e9 as PurchaseOrderItemReceivingUpdate, e8 as PurchaseOrderItemReceivingSummary, ea as PurchaseOrderItems, eb as PurchaseOrderItemsCreate, ed as PurchaseOrderItemsUpdate, ec as PurchaseOrderItemsSummary, ee as PurchaseOrders, ef as PurchaseOrdersCreate, eh as PurchaseOrdersUpdate, eg as PurchaseOrdersSummary, ek as QuoteItem, el as QuoteItemCreate, en as QuoteItemUpdate, em as QuoteItemSummary, eo as QuoteLocation, ep as QuoteLocationCreate, er as QuoteLocationUpdate, eq as QuoteLocationSummary, ei as Quote, ej as QuoteCreate, ex as QuoteUpdate, es as QuoteSummary, et as QuoteTemplate, eu as QuoteTemplateCreate, ew as QuoteTemplateUpdate, ev as QuoteTemplateSummary, eE as ResourceRoleQueue, eF as ResourceRoleQueueCreate, eH as ResourceRoleQueueUpdate, eG as ResourceRoleQueueSummary, eC as ResourceRole, eD as ResourceRoleCreate, eJ as ResourceRoleUpdate, eI as ResourceRoleSummary, eK as ResourceSkill, eL as ResourceSkillCreate, eN as ResourceSkillUpdate, eM as ResourceSkillSummary, eB as ResourceCreate, e$ as ResourceUpdate, eO as ResourceSummary, eP as ResourceTimeOffAdditional, eQ as ResourceTimeOffAdditionalCreate, eS as ResourceTimeOffAdditionalUpdate, eR as ResourceTimeOffAdditionalSummary, eT as ResourceTimeOffApprover, eU as ResourceTimeOffApproverCreate, eW as ResourceTimeOffApproverUpdate, eV as ResourceTimeOffApproverSummary, eX as ResourceTimeOffBalance, eY as ResourceTimeOffBalanceCreate, e_ as ResourceTimeOffBalanceUpdate, eZ as ResourceTimeOffBalanceSummary, f0 as Role, f1 as RoleCreate, f3 as RoleUpdate, f2 as RoleSummary, f5 as ServiceCall, f6 as ServiceCallCreate, fo as ServiceCallUpdate, f7 as ServiceCallSummary, fa as ServiceCallTaskResource, fb as ServiceCallTaskResourceCreate, fd as ServiceCallTaskResourceUpdate, fc as ServiceCallTaskResourceSummary, f8 as ServiceCallTask, f9 as ServiceCallTaskCreate, ff as ServiceCallTaskUpdate, fe as ServiceCallTaskSummary, fi as ServiceCallTicketResource, fj as ServiceCallTicketResourceCreate, fl as ServiceCallTicketResourceUpdate, fk as ServiceCallTicketResourceSummary, fg as ServiceCallTicket, fh as ServiceCallTicketCreate, fn as ServiceCallTicketUpdate, fm as ServiceCallTicketSummary, fq as ServiceLevelAgreementResults, fr as ServiceLevelAgreementResultsCreate, ft as ServiceLevelAgreementResultsUpdate, fs as ServiceLevelAgreementResultsSummary, f4 as Service, fp as ServiceCreate, fv as ServiceUpdate, fu as ServiceSummary, fw as Skill, fx as SkillCreate, fz as SkillUpdate, fy as SkillSummary, fC as SubscriptionPeriod, fD as SubscriptionPeriodCreate, fF as SubscriptionPeriodUpdate, fE as SubscriptionPeriodSummary, fB as SubscriptionCreate, fH as SubscriptionUpdate, fG as SubscriptionSummary, fK as SurveyResults, fL as SurveyResultsCreate, fN as SurveyResultsUpdate, fM as SurveyResultsSummary, fI as Survey, fJ as SurveyCreate, fP as SurveyUpdate, fO as SurveySummary, fR as TagAlias, fS as TagAliasCreate, fU as TagAliasUpdate, fT as TagAliasSummary, fW as TagGroup, fX as TagGroupCreate, fZ as TagGroupUpdate, fY as TagGroupSummary, fQ as Tag, fV as TagCreate, f$ as TagUpdate, f_ as TagSummary, g2 as TaskSecondaryResource, g3 as TaskSecondaryResourceCreate, g5 as TaskSecondaryResourceUpdate, g4 as TaskSecondaryResourceSummary, g0 as Task, g1 as TaskCreate, g7 as TaskUpdate, g6 as TaskSummary, g8 as ThresholdStatusResultModel, ga as TicketAdditionalConfigurationItem, gb as TicketAdditionalConfigurationItemCreate, gd as TicketAdditionalConfigurationItemUpdate, gc as TicketAdditionalConfigurationItemSummary, ge as TicketAdditionalContact, gf as TicketAdditionalContactCreate, gh as TicketAdditionalContactUpdate, gg as TicketAdditionalContactSummary, gi as TicketAttachment, gj as TicketAttachmentCreate, gl as TicketAttachmentUpdate, gk as TicketAttachmentSummary, gm as TicketCategory, gn as TicketCategoryCreate, gt as TicketCategoryUpdate, gs as TicketCategorySummary, go as TicketCategoryFieldDefault, gp as TicketCategoryFieldDefaultCreate, gr as TicketCategoryFieldDefaultUpdate, gq as TicketCategoryFieldDefaultSummary, gu as TicketChangeRequestApproval, gv as TicketChangeRequestApprovalCreate, gx as TicketChangeRequestApprovalUpdate, gw as TicketChangeRequestApprovalSummary, gy as TicketCharge, gz as TicketChargeCreate, gB as TicketChargeUpdate, gA as TicketChargeSummary, gC as TicketChecklistItem, gD as TicketChecklistItemCreate, gF as TicketChecklistItemUpdate, gE as TicketChecklistItemSummary, gG as TicketChecklistLibrary, gH as TicketChecklistLibraryCreate, gJ as TicketChecklistLibraryUpdate, gI as TicketChecklistLibrarySummary, gM as TicketHistory, gN as TicketHistoryCreate, gP as TicketHistoryUpdate, gO as TicketHistorySummary, gR as TicketNoteAttachment, gS as TicketNoteAttachmentCreate, gU as TicketNoteAttachmentUpdate, gT as TicketNoteAttachmentSummary, gQ as TicketNote, gV as TicketNoteCreate, gX as TicketNoteUpdate, gW as TicketNoteSummary, gY as TicketNoteWebhook, gZ as TicketNoteWebhookCreate, g$ as TicketNoteWebhookUpdate, g_ as TicketNoteWebhookSummary, h0 as TicketSecondaryResource, h1 as TicketSecondaryResourceCreate, h3 as TicketSecondaryResourceUpdate, h2 as TicketSecondaryResourceSummary, gL as TicketCreate, h5 as TicketUpdate, h4 as TicketSummary, gK as TicketContext, h6 as TicketWebhook, h7 as TicketWebhookCreate, h9 as TicketWebhookUpdate, h8 as TicketWebhookSummary, hf as TimeEntryCreate, hh as TimeEntryUpdate, hg as TimeEntrySummary, hb as TimeEntryAttachment, hc as TimeEntryAttachmentCreate, he as TimeEntryAttachmentUpdate, hd as TimeEntryAttachmentSummary, hi as TimeOffRequest, hj as TimeOffRequestCreate, hm as TimeOffRequestUpdate, hl as TimeOffRequestSummary, A as ApiVersionResultModel, i as AutotaskVersionResultModel, ho as ZoneInformationResultModel } from './index-BXtKN1M5.cjs';
2
2
 
3
3
  /**
4
4
  * A read-through TTL cache (lazy purge on read; expiry is `Date.now()`
@@ -1532,7 +1532,7 @@ declare function toArray<T>(iter: AsyncIterable<T>): Promise<T[]>;
1532
1532
  * queryBounded noteChars free-text cap (issue #61 — response-side only);
1533
1533
  * - docs/API.md §11.7/§11.8/§11.9/§11.10/§11.11/§11.12 render the same facts.
1534
1534
  *
1535
- * planHash: 6547153895b65c577ef59ced6c06361d0763d1299d6048531b8ffa94f77821d3
1535
+ * planHash: e4cf4228d5bad71cf762e31d4379ea9337633ededab68450b85f56bf3bc95fb9
1536
1536
  */
1537
1537
 
1538
1538
  /** One pinned blind-surface stamp (the result-time sentinel object). */
@@ -4994,6 +4994,253 @@ declare class ContractServiceUnitsResource extends BaseResource<ContractServiceU
4994
4994
  }): Promise<ContractServiceUnitSummary | null>;
4995
4995
  }
4996
4996
 
4997
+ /** The closed labour-cost-method set (the ladder rung a row STARTS from). */
4998
+ type ProfitabilityLabourCostMethod = 'billing_item_our_cost' | 'contract_role_cost' | 'resource_internal_cost' | 'provided';
4999
+ /** A ladder rung that actually carried rows (plus 'missing'). */
5000
+ type ProfitRateSource = 'billing_item.ourCost' | 'contract_role_costs.rate' | 'resource.internalCost' | 'provided' | 'missing';
5001
+ interface ProfitabilityOptions {
5002
+ /** Window start, YYYY-MM-DD (REQUIRED). */
5003
+ dateFrom: string;
5004
+ /** Window end, YYYY-MM-DD, >= dateFrom (REQUIRED). */
5005
+ dateTo: string;
5006
+ /** The ladder rung rows start from (default 'billing_item_our_cost'; row-level fallback walks down). */
5007
+ labourCostMethod?: ProfitabilityLabourCostMethod;
5008
+ /** The caller-supplied labour rate; REQUIRED when labourCostMethod is 'provided'; optional final-rung catch-all otherwise. */
5009
+ labourRatePerHour?: number;
5010
+ /** Include contract_charges + contract_service_units.cost (default true). */
5011
+ includeRecurringCosts?: boolean;
5012
+ /** Include the expected-unbilled revenue section (default true). */
5013
+ includeUnbilledRevenue?: boolean;
5014
+ /** Caller-supplied per-month tooling costs, indexed by month from dateFrom (NOT vendor data — stamped). */
5015
+ externalMonthlyCosts?: number[];
5016
+ /** Fold tickets by ticketCategory into activity_categories (default true). */
5017
+ groupByActivity?: boolean;
5018
+ /** Check-10 staleness horizon in days (default 30). */
5019
+ staleAfterDays?: number;
5020
+ /** The ticket-id join-set cap for the in-filter parts — the expenses/probe join AND the time-referenced ticket ids (default 500, the in-filter cap). */
5021
+ maxTicketsForJoin?: number;
5022
+ /** Per-part page cap AND capped-list cap (default 50, clamped 1..500). */
5023
+ limit?: number;
5024
+ }
5025
+ /** One bounded part (the unbilledWork envelope, same status vocabulary). */
5026
+ interface ProfitabilityPart<TItem> {
5027
+ items: TItem[];
5028
+ /** True when the page came back FULL (the cap rows) — more may exist. */
5029
+ capped: boolean;
5030
+ /** The part's hasMore (a live next cursor at the full page, or a still-full month window). */
5031
+ hasMore: boolean;
5032
+ /** Honest note: skipped reason / join-set truncation / blind-list quirk / true-zero / per-item misses. */
5033
+ note?: string;
5034
+ /** The S12-C sentinel — present exactly when the filter-aware predicate stamps the empty answer. */
5035
+ blindSurface?: BlindSurfaceInfo;
5036
+ /** The base layer's 0-row stamp (the pinned tenant-empty-for-user class rides here where attached). */
5037
+ emptyReason?: EmptyReasonInfo;
5038
+ /** status 'absent' only: the typed error code of the read that faulted (the part degraded, the call did not). */
5039
+ absent?: string;
5040
+ status: 'ok' | 'blind' | 'skipped' | 'absent';
5041
+ }
5042
+ /** Invoiced revenue by billing-line kind (classified by the line's FK: service/bundle → recurring, timeEntryID → labour, charge FKs → charges, expenseItemID → expenses). */
5043
+ interface ProfitabilityRevenueByType {
5044
+ recurring: number;
5045
+ labour: number;
5046
+ charges: number;
5047
+ expenses: number;
5048
+ other: number;
5049
+ }
5050
+ interface ProfitabilityMonthlyRow {
5051
+ month: string;
5052
+ revenue_invoiced: number;
5053
+ revenue_by_type: ProfitabilityRevenueByType;
5054
+ revenue_voided_excluded: number;
5055
+ /** Σ the month's posted billing items with no invoice yet. */
5056
+ revenue_posted_uninvoiced: number;
5057
+ /** Σ the month's billing items whose invoice could not be read (or was beyond the join cap) — not recognized revenue; the count rides coverage_gaps. */
5058
+ revenue_unresolved_invoice: number;
5059
+ /** Σ the period price of the service units starting in the month (null without a services/units basis). */
5060
+ revenue_expected: number | null;
5061
+ /** max(0, expected − the month's invoiced SERVICE lines). */
5062
+ revenue_expected_unbilled: number;
5063
+ /** Billable time with no billing item yet (not approved+posted). `value` is priced at the contract role rate on Time & Materials contracts only. */
5064
+ unposted_time: {
5065
+ entries: number;
5066
+ hours: number;
5067
+ value: number | null;
5068
+ absent?: 'CONTRACT_TYPE_UNKNOWN' | 'NOT_TIME_AND_MATERIALS_CONTRACT' | 'NO_CONTRACT_RATE';
5069
+ };
5070
+ labour_hours: number;
5071
+ labour_cost: {
5072
+ total: number;
5073
+ unresolvedHours: number;
5074
+ rateSources: {
5075
+ [K in ProfitRateSource]?: {
5076
+ entries: number;
5077
+ hours: number;
5078
+ cost: number;
5079
+ };
5080
+ } & {
5081
+ missing: {
5082
+ entries: number;
5083
+ hours: number;
5084
+ cost: number;
5085
+ };
5086
+ };
5087
+ };
5088
+ tooling_cost: {
5089
+ /** Σ the monthly share (periodType-prorated) of the subscriptions on this contract's CIs — REPORTED, never folded into total_cost (subscriptions bill outside the contract). */
5090
+ vendor: number | null;
5091
+ caller_supplied: number;
5092
+ };
5093
+ /** Σ contract charge COST (extendedCost, else unitCost × unitQuantity) + the cost of the service units starting in the month. */
5094
+ recurring_cost: number;
5095
+ expense_cost: number;
5096
+ /** labour + caller-supplied tooling + recurring + expenses (vendor subscriptions excluded). */
5097
+ total_cost: number;
5098
+ profit: number;
5099
+ margin: number | null;
5100
+ /** The labour hours the month's invoiced revenue absorbs at the average resolved cost rate before profit hits zero: (revenue − non-labour cost) / rate; 0 when non-labour cost already exceeds revenue; null with no resolved hours or a zero rate. */
5101
+ break_even_hours: number | null;
5102
+ /** Why the month's figures may be incomplete: `<part>: absent (<code>)`, `<part>: truncated at limit N`, `<part>: capped at limit N`. Empty = complete. */
5103
+ coverage_gaps: string[];
5104
+ }
5105
+ interface ProfitabilityActivityCategory {
5106
+ ticketCategory: number | null;
5107
+ ticketCount: number;
5108
+ entryCount: number;
5109
+ hours: number;
5110
+ cost: number;
5111
+ sample_ticketNumbers: number[];
5112
+ }
5113
+ interface ProfitabilityHighestCostTicket {
5114
+ ticketId: number;
5115
+ ticketNumber: number | null;
5116
+ title: string;
5117
+ status: number | null;
5118
+ hours: number;
5119
+ cost: number;
5120
+ lastActivityDate: string | null;
5121
+ }
5122
+ interface ProfitabilityMiscoding {
5123
+ entryId: number;
5124
+ reason: 'no_contract_on_entry' | 'ticket_of_other_contract' | 'ticket_not_in_fetched_set';
5125
+ ticketId: number | null;
5126
+ contractId: number | null;
5127
+ hours: number;
5128
+ }
5129
+ interface ProfitabilityOpenRenewalItem {
5130
+ kind: 'ticket' | 'subscription' | 'contract_end' | 'included_hours_burn';
5131
+ id: number | null;
5132
+ label: string;
5133
+ date: string | null;
5134
+ detail: string;
5135
+ }
5136
+ interface ProfitabilityDataQualityWarning {
5137
+ code: 'miscoded_time_out' | 'cross_contract_ticket_time' | 'duplicate_entries' | 'zero_negative_hours' | 'time_outside_ticket_period' | 'missing_cost_rate' | 'recurring_cost_drift' | 'expected_unbilled_revenue' | 'cross_contract_tickets' | 'open_stale_tickets' | 'estimate_vs_actual';
5138
+ count: number;
5139
+ sample_ids: Array<number | string>;
5140
+ /** Check 11 only: the window-prorated deviation detail (the uniform {code, count, sample_ids} core is unchanged). */
5141
+ note?: string;
5142
+ }
5143
+ interface CostRateResolution {
5144
+ method: ProfitabilityLabourCostMethod;
5145
+ sources: {
5146
+ [K in ProfitRateSource]?: {
5147
+ entries: number;
5148
+ hours: number;
5149
+ cost: number;
5150
+ };
5151
+ } & {
5152
+ missing: {
5153
+ entries: number;
5154
+ hours: number;
5155
+ cost: number;
5156
+ };
5157
+ };
5158
+ unresolvedHours: number;
5159
+ notes: string[];
5160
+ }
5161
+ interface ContractsProfitabilityResult {
5162
+ contract: Contract;
5163
+ customer: Company | null;
5164
+ /** parts.customer 'absent' only: the typed code of the customer-read fault (a 404 is the plain null/skipped). */
5165
+ customerAbsent?: string;
5166
+ /** The raw contractType id + its tenant picklist label (the folds branch on the label); CONTRACT_TYPE_UNKNOWN when the id is absent/0 or the label is unresolvable. */
5167
+ contract_type: {
5168
+ id: number | null;
5169
+ label: string | null;
5170
+ absent?: 'CONTRACT_TYPE_UNKNOWN';
5171
+ };
5172
+ /** Block Hours contracts only (contract_blocks hours vs hoursApproved); otherwise null + the typed reason (NOT_BLOCK_HOURS_CONTRACT / CONTRACT_TYPE_UNKNOWN / the blocks read's fault code). Service units are never read as hours. */
5173
+ included_hours: {
5174
+ value: {
5175
+ purchased: number;
5176
+ approved: number;
5177
+ remaining: number;
5178
+ } | null;
5179
+ absent?: string;
5180
+ };
5181
+ period: {
5182
+ dateFrom: string;
5183
+ dateTo: string;
5184
+ months: string[];
5185
+ asOf: string;
5186
+ };
5187
+ currency: {
5188
+ companyCurrencyID: number | null;
5189
+ note: string;
5190
+ };
5191
+ monthly: ProfitabilityMonthlyRow[];
5192
+ activity_categories: ProfitabilityActivityCategory[];
5193
+ highest_cost_tickets: ProfitabilityHighestCostTicket[];
5194
+ possible_miscoding: ProfitabilityMiscoding[];
5195
+ open_renewal_items: ProfitabilityOpenRenewalItem[];
5196
+ data_quality_warnings: ProfitabilityDataQualityWarning[];
5197
+ costRateResolution: CostRateResolution;
5198
+ /** The per-part containers (the typed rows + stamps; the status map below is the digest). */
5199
+ contractServices: ProfitabilityPart<ContractService>;
5200
+ contractServiceUnits: ProfitabilityPart<ContractServiceUnit>;
5201
+ contractCharges: ProfitabilityPart<ContractCharge>;
5202
+ contractRoleCosts: ProfitabilityPart<ContractRoleCosts>;
5203
+ contractRates: ProfitabilityPart<ContractRate>;
5204
+ contractBlocks: ProfitabilityPart<ContractBlock>;
5205
+ billingItems: ProfitabilityPart<BillingItems>;
5206
+ invoices: ProfitabilityPart<Invoice>;
5207
+ timeEntries: ProfitabilityPart<TimeEntry>;
5208
+ ticketsActivity: ProfitabilityPart<Ticket>;
5209
+ ticketsOpen: ProfitabilityPart<Ticket>;
5210
+ resources: ProfitabilityPart<Resource>;
5211
+ expenses: ProfitabilityPart<ExpenseItem>;
5212
+ miscodingProbe: ProfitabilityPart<TimeEntry>;
5213
+ configurationItems: ProfitabilityPart<ConfigurationItem>;
5214
+ subscriptions: ProfitabilityPart<Subscription>;
5215
+ parts: {
5216
+ contract: 'ok';
5217
+ customer: 'ok' | 'skipped' | 'absent';
5218
+ contractServices: 'ok' | 'blind' | 'absent';
5219
+ contractServiceUnits: 'ok' | 'blind' | 'absent';
5220
+ contractCharges: 'ok' | 'blind' | 'skipped' | 'absent';
5221
+ contractRoleCosts: 'ok' | 'blind' | 'absent';
5222
+ contractRates: 'ok' | 'blind' | 'absent';
5223
+ contractBlocks: 'ok' | 'blind' | 'skipped' | 'absent';
5224
+ billingItems: 'ok' | 'blind' | 'absent';
5225
+ invoices: 'ok' | 'skipped';
5226
+ timeEntries: 'ok' | 'blind' | 'absent';
5227
+ ticketsActivity: 'ok' | 'blind' | 'absent';
5228
+ ticketsOpen: 'ok' | 'blind' | 'skipped' | 'absent';
5229
+ resources: 'ok' | 'skipped';
5230
+ expenses: 'ok' | 'blind' | 'skipped' | 'absent';
5231
+ miscodingProbe: 'ok' | 'blind' | 'skipped' | 'absent';
5232
+ configurationItems: 'ok' | 'blind' | 'skipped' | 'absent';
5233
+ subscriptions: 'ok' | 'blind' | 'skipped' | 'absent';
5234
+ };
5235
+ /** issued = logical part reads (a fetch-by-ids part counts once); requests = raw HTTP requests (its chunk + per-id gets counted individually). */
5236
+ wires: {
5237
+ issued: number;
5238
+ requests: number;
5239
+ budget: number;
5240
+ note?: string;
5241
+ };
5242
+ }
5243
+
4997
5244
  /**
4998
5245
  * ContractsResource — Contract resource (G4 batch A, plan key 'contracts').
4999
5246
  * GENERATED by scripts/generate-batch.mjs from capabilities.plan.json + api-docs.json.
@@ -5041,6 +5288,8 @@ declare class ContractsResource extends BaseResource<Contract, ContractCreate, C
5041
5288
  search(query: string, opts?: {
5042
5289
  limit?: number;
5043
5290
  }): Promise<ContractSummary[]>;
5291
+ /** Node-parity special op (hand-written in src/resources/special/contracts.ts). */
5292
+ profitability(id: Identifier, opts?: ProfitabilityOptions): Promise<ContractsProfitabilityResult>;
5044
5293
  }
5045
5294
 
5046
5295
  /**