node-autotask 0.37.1 → 0.39.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 (51) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/MCP_TOOL_CATALOG.json +127 -44
  3. package/MCP_TOOL_MANIFEST.md +9 -9
  4. package/N8N_MCP_MANIFEST.json +4 -4
  5. package/N8N_MCP_MANIFEST.md +5 -5
  6. package/README.md +3 -0
  7. package/capabilities.json +2500 -1713
  8. package/capabilities.schema.json +2 -1
  9. package/dist/capabilities.cjs +2 -2
  10. package/dist/capabilities.d.cts +4 -4
  11. package/dist/capabilities.d.ts +4 -4
  12. package/dist/capabilities.js +1 -1
  13. package/dist/{chunk-KQ6HMBB4.js → chunk-2KQS3RHQ.js} +2499 -1712
  14. package/dist/{chunk-TBFXRNNE.cjs → chunk-45PLS73K.cjs} +2452 -2065
  15. package/dist/chunk-5VHSLJMR.js +71 -0
  16. package/dist/{chunk-PFFW4DIK.cjs → chunk-6ROB5KXB.cjs} +285 -285
  17. package/dist/{chunk-7IADHNBZ.js → chunk-FV5PJLIZ.js} +2602 -2215
  18. package/dist/{chunk-25VGFT5M.cjs → chunk-KSNK6UEW.cjs} +143 -143
  19. package/dist/{chunk-PFJAMFUL.js → chunk-LD5UPSDB.js} +2 -2
  20. package/dist/chunk-MJTKK3QG.cjs +71 -0
  21. package/dist/{chunk-7WI7FBPB.js → chunk-OKFTECIE.js} +2 -2
  22. package/dist/{chunk-HBYKTXN3.cjs → chunk-RAZEXOLC.cjs} +2499 -1712
  23. package/dist/{index-m-7fOwFl.d.cts → index-BQVStxwi.d.cts} +15 -1
  24. package/dist/{index-m-7fOwFl.d.ts → index-BQVStxwi.d.ts} +15 -1
  25. package/dist/{index-CqepIQfp.d.cts → index-BVOOHPvr.d.cts} +28 -8
  26. package/dist/{index-BDqw377y.d.ts → index-Bmoiwhx2.d.ts} +28 -8
  27. package/dist/index.cjs +27 -22
  28. package/dist/index.d.cts +26 -5
  29. package/dist/index.d.ts +26 -5
  30. package/dist/index.js +9 -4
  31. package/dist/operations/index.cjs +249 -227
  32. package/dist/operations/index.d.cts +76 -15
  33. package/dist/operations/index.d.ts +76 -15
  34. package/dist/operations/index.js +60 -38
  35. package/dist/pool.cjs +10 -9
  36. package/dist/pool.d.cts +2 -2
  37. package/dist/pool.d.ts +2 -2
  38. package/dist/pool.js +5 -4
  39. package/dist/resources/index.cjs +5 -4
  40. package/dist/resources/index.d.cts +2 -2
  41. package/dist/resources/index.d.ts +2 -2
  42. package/dist/resources/index.js +4 -3
  43. package/dist/types/index.d.cts +1 -1
  44. package/dist/types/index.d.ts +1 -1
  45. package/dist/untrusted.cjs +24 -70
  46. package/dist/untrusted.js +12 -58
  47. package/docs/API.md +129 -3
  48. package/examples/mcp/manifest.ts +5 -0
  49. package/examples/mcp/rank.ts +62 -0
  50. package/examples/mcp/tools-meta.ts +6 -1
  51. package/package.json +1 -1
@@ -1 +1 @@
1
- export { A as ApiVersionResultModel, m as Appointment, n as AppointmentCreate, o as AppointmentSummary, p as AppointmentUpdate, s as AutotaskVersionResultModel, B as BillingCode, t as BillingCodeCreate, u as BillingCodeSummary, v as BillingCodeUpdate, w as BillingItemApprovalLevel, x as BillingItemApprovalLevelCreate, y as BillingItemApprovalLevelSummary, z as BillingItemApprovalLevelUpdate, D as BillingItems, G as BillingItemsCreate, J as BillingItemsSummary, K as BillingItemsUpdate, C as ChangeRequestLink, L as ChangeRequestLinkCreate, M as ChangeRequestLinkSummary, N as ChangeRequestLinkUpdate, R as ChecklistLibrary, S as ChecklistLibraryChecklistItem, U as ChecklistLibraryChecklistItemCreate, V as ChecklistLibraryChecklistItemSummary, W as ChecklistLibraryChecklistItemUpdate, X as ChecklistLibraryCreate, Y as ChecklistLibrarySummary, Z as ChecklistLibraryUpdate, _ as ClassificationIcon, $ as ClassificationIconCreate, a0 as ClassificationIconSummary, a1 as ClassificationIconUpdate, a2 as Company, a3 as CompanyAlert, a4 as CompanyAlertCreate, a5 as CompanyAlertSummary, a6 as CompanyAlertUpdate, a7 as CompanyContext, a8 as CompanyCreate, a9 as CompanyLocation, aa as CompanyLocationCreate, ab as CompanyLocationSummary, ac as CompanyLocationUpdate, ad as CompanyNote, ae as CompanyNoteCreate, af as CompanyNoteSummary, ag as CompanyNoteUpdate, ah as CompanySiteConfigurations, ai as CompanySiteConfigurationsCreate, aj as CompanySiteConfigurationsSummary, ak as CompanySiteConfigurationsUpdate, al as CompanySummary, am as CompanyUpdate, an as CompanyWebhook, ao as CompanyWebhookCreate, ap as CompanyWebhookSummary, aq as CompanyWebhookUpdate, c as ConfigurationItem, ar as ConfigurationItemBillingProductAssociations, as as ConfigurationItemBillingProductAssociationsCreate, at as ConfigurationItemBillingProductAssociationsSummary, au as ConfigurationItemBillingProductAssociationsUpdate, av as ConfigurationItemCategory, aw as ConfigurationItemCategoryCreate, ax as ConfigurationItemCategorySummary, ay as ConfigurationItemCategoryUdfAssociation, az as ConfigurationItemCategoryUdfAssociationCreate, aA as ConfigurationItemCategoryUdfAssociationSummary, aB as ConfigurationItemCategoryUdfAssociationUpdate, aC as ConfigurationItemCategoryUpdate, aD as ConfigurationItemContext, aE as ConfigurationItemCreate, aF as ConfigurationItemDnsRecord, aG as ConfigurationItemDnsRecordCreate, aH as ConfigurationItemDnsRecordSummary, aI as ConfigurationItemDnsRecordUpdate, aJ as ConfigurationItemNote, aK as ConfigurationItemNoteCreate, aL as ConfigurationItemNoteSummary, aM as ConfigurationItemNoteUpdate, aN as ConfigurationItemRelatedItem, aO as ConfigurationItemRelatedItemCreate, aP as ConfigurationItemRelatedItemSummary, aQ as ConfigurationItemRelatedItemUpdate, aR as ConfigurationItemSslSubjectAlternativeName, aS as ConfigurationItemSslSubjectAlternativeNameCreate, aT as ConfigurationItemSslSubjectAlternativeNameSummary, aU as ConfigurationItemSslSubjectAlternativeNameUpdate, aV as ConfigurationItemSummary, aW as ConfigurationItemType, aX as ConfigurationItemTypeCreate, aY as ConfigurationItemTypeSummary, aZ as ConfigurationItemTypeUpdate, a_ as ConfigurationItemUpdate, a$ as ConfigurationItemWebhook, b0 as ConfigurationItemWebhookCreate, b1 as ConfigurationItemWebhookSummary, b2 as ConfigurationItemWebhookUpdate, b3 as Contact, b4 as ContactContext, b5 as ContactCreate, b6 as ContactGroupContacts, b7 as ContactGroupContactsCreate, b8 as ContactGroupContactsSummary, b9 as ContactGroupContactsUpdate, ba as ContactGroups, bb as ContactGroupsCreate, bc as ContactGroupsSummary, bd as ContactGroupsUpdate, be as ContactSummary, bf as ContactUpdate, bg as ContactWebhook, bh as ContactWebhookCreate, bi as ContactWebhookSummary, bj as ContactWebhookUpdate, e as Contract, bk as ContractBillingRule, bl as ContractBillingRuleCreate, bm as ContractBillingRuleSummary, bn as ContractBillingRuleUpdate, bo as ContractBlock, bp as ContractBlockCreate, bq as ContractBlockHourFactor, br as ContractBlockHourFactorCreate, bs as ContractBlockHourFactorSummary, bt as ContractBlockHourFactorUpdate, bu as ContractBlockSummary, bv as ContractBlockUpdate, d as ContractCharge, bw as ContractChargeCreate, bx as ContractChargeSummary, by as ContractChargeUpdate, bz as ContractCreate, bA as ContractExclusionBillingCode, bB as ContractExclusionBillingCodeCreate, bC as ContractExclusionBillingCodeSummary, bD as ContractExclusionBillingCodeUpdate, bE as ContractExclusionRoles, bF as ContractExclusionRolesCreate, bG as ContractExclusionRolesSummary, bH as ContractExclusionRolesUpdate, bI as ContractExclusionSetExcludedRoles, bJ as ContractExclusionSetExcludedRolesCreate, bK as ContractExclusionSetExcludedRolesSummary, bL as ContractExclusionSetExcludedRolesUpdate, bM as ContractExclusionSetExcludedWorkTypes, bN as ContractExclusionSetExcludedWorkTypesCreate, bO as ContractExclusionSetExcludedWorkTypesSummary, bP as ContractExclusionSetExcludedWorkTypesUpdate, bQ as ContractExclusionSets, bR as ContractExclusionSetsCreate, bS as ContractExclusionSetsSummary, bT as ContractExclusionSetsUpdate, bU as ContractMilestone, bV as ContractMilestoneCreate, bW as ContractMilestoneSummary, bX as ContractMilestoneUpdate, bY as ContractNote, bZ as ContractNoteCreate, b_ as ContractNoteSummary, b$ as ContractNoteUpdate, c0 as ContractRate, c1 as ContractRateCreate, c2 as ContractRateSummary, c3 as ContractRateUpdate, c4 as ContractRetainers, c5 as ContractRetainersCreate, c6 as ContractRetainersSummary, c7 as ContractRetainersUpdate, c8 as ContractRoleCosts, c9 as ContractRoleCostsCreate, ca as ContractRoleCostsSummary, cb as ContractRoleCostsUpdate, f as ContractService, cc as ContractServiceAdjustment, cd as ContractServiceAdjustmentCreate, ce as ContractServiceAdjustmentSummary, cf as ContractServiceAdjustmentUpdate, cg as ContractServiceBundle, ch as ContractServiceBundleAdjustment, ci as ContractServiceBundleAdjustmentCreate, cj as ContractServiceBundleAdjustmentSummary, ck as ContractServiceBundleAdjustmentUpdate, cl as ContractServiceBundleCreate, cm as ContractServiceBundleSummary, cn as ContractServiceBundleUnit, co as ContractServiceBundleUnitCreate, cp as ContractServiceBundleUnitSummary, cq as ContractServiceBundleUnitUpdate, cr as ContractServiceBundleUpdate, cs as ContractServiceCreate, ct as ContractServiceSummary, cu as ContractServiceUnit, cv as ContractServiceUnitCreate, cw as ContractServiceUnitSummary, cx as ContractServiceUnitUpdate, cy as ContractServiceUpdate, cz as ContractSummary, cA as ContractTicketPurchases, cB as ContractTicketPurchasesCreate, cC as ContractTicketPurchasesSummary, cD as ContractTicketPurchasesUpdate, cE as ContractUpdate, cF as Country, cG as CountryCreate, cH as CountrySummary, cI as CountryUpdate, cJ as Currency, cK as CurrencyCreate, cL as CurrencySummary, cM as CurrencyUpdate, cN as Department, cO as DepartmentCreate, cP as DepartmentSummary, cQ as DepartmentUpdate, cR as DocumentChecklistLibrary, cS as DomainRegistrar, cT as DomainRegistrarCreate, cU as DomainRegistrarSummary, cV as DomainRegistrarUpdate, c_ as EntityInformationResultModel, E as ExpenseItem, c$ as ExpenseItemAttachment, d0 as ExpenseItemAttachmentCreate, d1 as ExpenseItemAttachmentSummary, d2 as ExpenseItemAttachmentUpdate, d3 as ExpenseItemCreate, d4 as ExpenseItemSummary, d5 as ExpenseItemUpdate, d6 as ExpenseReport, d7 as ExpenseReportCreate, d8 as ExpenseReportSummary, d9 as ExpenseReportUpdate, de as GlobalEntityInformationResultModel, H as Holiday, df as HolidayCreate, g as HolidaySet, dg as HolidaySetCreate, dh as HolidaySetSummary, di as HolidaySetUpdate, dj as HolidaySummary, dk as HolidayUpdate, dl as InventoryProduct, dm as InventoryProductCreate, dn as InventoryProductSummary, dp as InventoryProductUpdate, dq as InventoryStockedItemAdd, dr as InventoryStockedItemRemove, ds as InventoryStockedItemTransfer, dt as Invoice, du as InvoiceCreate, dv as InvoiceSummary, dw as InvoiceTemplate, dx as InvoiceTemplateCreate, dy as InvoiceTemplateSummary, dz as InvoiceTemplateUpdate, dA as InvoiceUpdate, dB as KeyValuePair, dC as ModuleAccessResultModel, dD as NotificationHistory, dE as NotificationHistoryCreate, dF as NotificationHistorySummary, dG as NotificationHistoryUpdate, h as Opportunity, dJ as OpportunityAttachment, dK as OpportunityAttachmentCreate, dL as OpportunityAttachmentSummary, dM as OpportunityAttachmentUpdate, dN as OpportunityCategory, dO as OpportunityCategoryCreate, dP as OpportunityCategorySummary, dQ as OpportunityCategoryUpdate, dR as OpportunityCreate, dS as OpportunitySummary, dT as OpportunityUpdate, dU as OrganizationalLevel1, dV as OrganizationalLevel1Create, dW as OrganizationalLevel1Summary, dX as OrganizationalLevel1Update, dY as OrganizationalLevel2, dZ as OrganizationalLevel2Create, d_ as OrganizationalLevel2Summary, d$ as OrganizationalLevel2Update, e0 as OrganizationalLevelAssociation, e1 as OrganizationalLevelAssociationCreate, e2 as OrganizationalLevelAssociationSummary, e3 as OrganizationalLevelAssociationUpdate, e5 as Phase, e6 as PhaseCreate, e7 as PhaseSummary, e8 as PhaseUpdate, ea as Product, eb as ProductCreate, ec as ProductSummary, ed as ProductUpdate, ee as ProductVendors, ef as ProductVendorsCreate, eg as ProductVendorsSummary, eh as ProductVendorsUpdate, ei as Project, i as ProjectCharge, ej as ProjectChargeCreate, ek as ProjectChargeSummary, el as ProjectChargeUpdate, em as ProjectContext, en as ProjectCreate, eo as ProjectNote, ep as ProjectNoteCreate, eq as ProjectNoteSummary, er as ProjectNoteUpdate, es as ProjectSummary, et as ProjectUpdate, eu as PurchaseApprovals, ev as PurchaseApprovalsCreate, ew as PurchaseApprovalsSummary, ex as PurchaseApprovalsUpdate, ey as PurchaseOrderItemReceiving, ez as PurchaseOrderItemReceivingCreate, eA as PurchaseOrderItemReceivingSummary, eB as PurchaseOrderItemReceivingUpdate, eC as PurchaseOrderItems, eD as PurchaseOrderItemsCreate, eE as PurchaseOrderItemsSummary, eF as PurchaseOrderItemsUpdate, eG as PurchaseOrders, eH as PurchaseOrdersCreate, eI as PurchaseOrdersSummary, eJ as PurchaseOrdersUpdate, eK as Quote, eL as QuoteCreate, eM as QuoteItem, eN as QuoteItemCreate, eO as QuoteItemSummary, eP as QuoteItemUpdate, eQ as QuoteLocation, eR as QuoteLocationCreate, eS as QuoteLocationSummary, eT as QuoteLocationUpdate, eU as QuoteSummary, eV as QuoteTemplate, eW as QuoteTemplateCreate, eX as QuoteTemplateSummary, eY as QuoteTemplateUpdate, eZ as QuoteUpdate, f0 as Resource, f1 as ResourceCreate, f2 as ResourceRole, f3 as ResourceRoleCreate, f4 as ResourceRoleQueue, f5 as ResourceRoleQueueCreate, f6 as ResourceRoleQueueSummary, f7 as ResourceRoleQueueUpdate, f8 as ResourceRoleSummary, f9 as ResourceRoleUpdate, fa as ResourceSkill, fb as ResourceSkillCreate, fc as ResourceSkillSummary, fd as ResourceSkillUpdate, fe as ResourceSummary, ff as ResourceTimeOffAdditional, fg as ResourceTimeOffAdditionalCreate, fh as ResourceTimeOffAdditionalSummary, fi as ResourceTimeOffAdditionalUpdate, fj as ResourceTimeOffApprover, fk as ResourceTimeOffApproverCreate, fl as ResourceTimeOffApproverSummary, fm as ResourceTimeOffApproverUpdate, fn as ResourceTimeOffBalance, fo as ResourceTimeOffBalanceCreate, fp as ResourceTimeOffBalanceSummary, fq as ResourceTimeOffBalanceUpdate, fr as ResourceUpdate, fs as Role, ft as RoleCreate, fu as RoleSummary, fv as RoleUpdate, fw as SalesOrder, fx as SalesOrderCreate, fy as SalesOrderSummary, fz as SalesOrderUpdate, fA as Service, fB as ServiceCall, fC as ServiceCallCreate, fD as ServiceCallSummary, fE as ServiceCallTask, fF as ServiceCallTaskCreate, fG as ServiceCallTaskResource, fH as ServiceCallTaskResourceCreate, fI as ServiceCallTaskResourceSummary, fJ as ServiceCallTaskResourceUpdate, fK as ServiceCallTaskSummary, fL as ServiceCallTaskUpdate, fM as ServiceCallTicket, fN as ServiceCallTicketCreate, fO as ServiceCallTicketResource, fP as ServiceCallTicketResourceCreate, fQ as ServiceCallTicketResourceSummary, fR as ServiceCallTicketResourceUpdate, fS as ServiceCallTicketSummary, fT as ServiceCallTicketUpdate, fU as ServiceCallUpdate, fV as ServiceCreate, fW as ServiceLevelAgreementResults, fX as ServiceLevelAgreementResultsCreate, fY as ServiceLevelAgreementResultsSummary, fZ as ServiceLevelAgreementResultsUpdate, f_ as ServiceSummary, f$ as ServiceUpdate, g0 as Skill, g1 as SkillCreate, g2 as SkillSummary, g3 as SkillUpdate, g4 as Subscription, g5 as SubscriptionCreate, g6 as SubscriptionPeriod, g7 as SubscriptionPeriodCreate, g8 as SubscriptionPeriodSummary, g9 as SubscriptionPeriodUpdate, ga as SubscriptionSummary, gb as SubscriptionUpdate, gc as Survey, gd as SurveyCreate, ge as SurveyResults, gf as SurveyResultsCreate, gg as SurveyResultsSummary, gh as SurveyResultsUpdate, gi as SurveySummary, gj as SurveyUpdate, gk as Tag, gl as TagAlias, gm as TagAliasCreate, gn as TagAliasSummary, go as TagAliasUpdate, gp as TagCreate, gq as TagGroup, gr as TagGroupCreate, gs as TagGroupSummary, gt as TagGroupUpdate, gu as TagSummary, gv as TagUpdate, gw as Task, gx as TaskCreate, gy as TaskSecondaryResource, gz as TaskSecondaryResourceCreate, gA as TaskSecondaryResourceSummary, gB as TaskSecondaryResourceUpdate, gC as TaskSummary, gD as TaskUpdate, gE as TaxRegion, gF as TaxRegionCreate, gG as TaxRegionSummary, gH as TaxRegionUpdate, gI as ThresholdStatusResultModel, gJ as Ticket, T as TicketAdditionalConfigurationItem, gK as TicketAdditionalConfigurationItemCreate, gL as TicketAdditionalConfigurationItemSummary, gM as TicketAdditionalConfigurationItemUpdate, j as TicketAdditionalContact, gN as TicketAdditionalContactCreate, gO as TicketAdditionalContactSummary, gP as TicketAdditionalContactUpdate, gQ as TicketAttachment, gR as TicketAttachmentCreate, gS as TicketAttachmentSummary, gT as TicketAttachmentUpdate, gU as TicketCategory, gV as TicketCategoryCreate, gW as TicketCategoryFieldDefault, gX as TicketCategoryFieldDefaultCreate, gY as TicketCategoryFieldDefaultSummary, gZ as TicketCategoryFieldDefaultUpdate, g_ as TicketCategorySummary, g$ as TicketCategoryUpdate, h0 as TicketChangeRequestApproval, h1 as TicketChangeRequestApprovalCreate, h2 as TicketChangeRequestApprovalSummary, h3 as TicketChangeRequestApprovalUpdate, k as TicketCharge, h4 as TicketChargeCreate, h5 as TicketChargeSummary, h6 as TicketChargeUpdate, h7 as TicketChecklistItem, h8 as TicketChecklistItemCreate, h9 as TicketChecklistItemSummary, ha as TicketChecklistItemUpdate, hb as TicketChecklistLibrary, hc as TicketChecklistLibraryCreate, hd as TicketChecklistLibrarySummary, he as TicketChecklistLibraryUpdate, hf as TicketContext, hg as TicketCreate, hh as TicketHistory, hi as TicketHistoryCreate, hj as TicketHistorySummary, hk as TicketHistoryUpdate, hl as TicketNote, hm as TicketNoteAttachment, hn as TicketNoteAttachmentCreate, ho as TicketNoteAttachmentSummary, hp as TicketNoteAttachmentUpdate, hq as TicketNoteCreate, hr as TicketNoteSummary, hs as TicketNoteUpdate, ht as TicketNoteWebhook, hu as TicketNoteWebhookCreate, hv as TicketNoteWebhookSummary, hw as TicketNoteWebhookUpdate, hx as TicketSecondaryResource, hy as TicketSecondaryResourceCreate, hz as TicketSecondaryResourceSummary, hA as TicketSecondaryResourceUpdate, hB as TicketSummary, hC as TicketUpdate, hD as TicketWebhook, hE as TicketWebhookCreate, hF as TicketWebhookSummary, hG as TicketWebhookUpdate, l as TimeEntry, hH as TimeEntryAttachment, hI as TimeEntryAttachmentCreate, hJ as TimeEntryAttachmentSummary, hK as TimeEntryAttachmentUpdate, hL as TimeEntryCreate, hM as TimeEntrySummary, hN as TimeEntryUpdate, hO as TimeOffRequest, hP as TimeOffRequestCreate, hQ as TimeOffRequestReject, hR as TimeOffRequestSummary, hS as TimeOffRequestUpdate, hU as ZoneInformationResultModel } from '../index-m-7fOwFl.js';
1
+ export { A as ApiVersionResultModel, m as Appointment, n as AppointmentCreate, o as AppointmentSummary, p as AppointmentUpdate, s as AutotaskVersionResultModel, B as BillingCode, t as BillingCodeCreate, u as BillingCodeSummary, v as BillingCodeUpdate, w as BillingItemApprovalLevel, x as BillingItemApprovalLevelCreate, y as BillingItemApprovalLevelSummary, z as BillingItemApprovalLevelUpdate, D as BillingItems, G as BillingItemsCreate, J as BillingItemsSummary, K as BillingItemsUpdate, C as ChangeRequestLink, L as ChangeRequestLinkCreate, M as ChangeRequestLinkSummary, N as ChangeRequestLinkUpdate, R as ChecklistLibrary, S as ChecklistLibraryChecklistItem, U as ChecklistLibraryChecklistItemCreate, V as ChecklistLibraryChecklistItemSummary, W as ChecklistLibraryChecklistItemUpdate, X as ChecklistLibraryCreate, Y as ChecklistLibrarySummary, Z as ChecklistLibraryUpdate, _ as ClassificationIcon, $ as ClassificationIconCreate, a0 as ClassificationIconSummary, a1 as ClassificationIconUpdate, a2 as Company, a3 as CompanyAlert, a4 as CompanyAlertCreate, a5 as CompanyAlertSummary, a6 as CompanyAlertUpdate, a7 as CompanyContext, a8 as CompanyCreate, a9 as CompanyLocation, aa as CompanyLocationCreate, ab as CompanyLocationSummary, ac as CompanyLocationUpdate, ad as CompanyNote, ae as CompanyNoteCreate, af as CompanyNoteSummary, ag as CompanyNoteUpdate, ah as CompanySiteConfigurations, ai as CompanySiteConfigurationsCreate, aj as CompanySiteConfigurationsSummary, ak as CompanySiteConfigurationsUpdate, al as CompanySummary, am as CompanyUpdate, an as CompanyWebhook, ao as CompanyWebhookCreate, ap as CompanyWebhookSummary, aq as CompanyWebhookUpdate, c as ConfigurationItem, ar as ConfigurationItemBillingProductAssociations, as as ConfigurationItemBillingProductAssociationsCreate, at as ConfigurationItemBillingProductAssociationsSummary, au as ConfigurationItemBillingProductAssociationsUpdate, av as ConfigurationItemCategory, aw as ConfigurationItemCategoryCreate, ax as ConfigurationItemCategorySummary, ay as ConfigurationItemCategoryUdfAssociation, az as ConfigurationItemCategoryUdfAssociationCreate, aA as ConfigurationItemCategoryUdfAssociationSummary, aB as ConfigurationItemCategoryUdfAssociationUpdate, aC as ConfigurationItemCategoryUpdate, aD as ConfigurationItemContext, aE as ConfigurationItemCreate, aF as ConfigurationItemDnsRecord, aG as ConfigurationItemDnsRecordCreate, aH as ConfigurationItemDnsRecordSummary, aI as ConfigurationItemDnsRecordUpdate, aJ as ConfigurationItemNote, aK as ConfigurationItemNoteCreate, aL as ConfigurationItemNoteSummary, aM as ConfigurationItemNoteUpdate, aN as ConfigurationItemRelatedItem, aO as ConfigurationItemRelatedItemCreate, aP as ConfigurationItemRelatedItemSummary, aQ as ConfigurationItemRelatedItemUpdate, aR as ConfigurationItemSslSubjectAlternativeName, aS as ConfigurationItemSslSubjectAlternativeNameCreate, aT as ConfigurationItemSslSubjectAlternativeNameSummary, aU as ConfigurationItemSslSubjectAlternativeNameUpdate, aV as ConfigurationItemSummary, aW as ConfigurationItemType, aX as ConfigurationItemTypeCreate, aY as ConfigurationItemTypeSummary, aZ as ConfigurationItemTypeUpdate, a_ as ConfigurationItemUpdate, a$ as ConfigurationItemWebhook, b0 as ConfigurationItemWebhookCreate, b1 as ConfigurationItemWebhookSummary, b2 as ConfigurationItemWebhookUpdate, b3 as Contact, b4 as ContactContext, b5 as ContactCreate, b6 as ContactGroupContacts, b7 as ContactGroupContactsCreate, b8 as ContactGroupContactsSummary, b9 as ContactGroupContactsUpdate, ba as ContactGroups, bb as ContactGroupsCreate, bc as ContactGroupsSummary, bd as ContactGroupsUpdate, be as ContactSummary, bf as ContactUpdate, bg as ContactWebhook, bh as ContactWebhookCreate, bi as ContactWebhookSummary, bj as ContactWebhookUpdate, e as Contract, bk as ContractBillingRule, bl as ContractBillingRuleCreate, bm as ContractBillingRuleSummary, bn as ContractBillingRuleUpdate, bo as ContractBlock, bp as ContractBlockCreate, bq as ContractBlockHourFactor, br as ContractBlockHourFactorCreate, bs as ContractBlockHourFactorSummary, bt as ContractBlockHourFactorUpdate, bu as ContractBlockSummary, bv as ContractBlockUpdate, d as ContractCharge, bw as ContractChargeCreate, bx as ContractChargeSummary, by as ContractChargeUpdate, bz as ContractCreate, bA as ContractExclusionBillingCode, bB as ContractExclusionBillingCodeCreate, bC as ContractExclusionBillingCodeSummary, bD as ContractExclusionBillingCodeUpdate, bE as ContractExclusionRoles, bF as ContractExclusionRolesCreate, bG as ContractExclusionRolesSummary, bH as ContractExclusionRolesUpdate, bI as ContractExclusionSetExcludedRoles, bJ as ContractExclusionSetExcludedRolesCreate, bK as ContractExclusionSetExcludedRolesSummary, bL as ContractExclusionSetExcludedRolesUpdate, bM as ContractExclusionSetExcludedWorkTypes, bN as ContractExclusionSetExcludedWorkTypesCreate, bO as ContractExclusionSetExcludedWorkTypesSummary, bP as ContractExclusionSetExcludedWorkTypesUpdate, bQ as ContractExclusionSets, bR as ContractExclusionSetsCreate, bS as ContractExclusionSetsSummary, bT as ContractExclusionSetsUpdate, bU as ContractMilestone, bV as ContractMilestoneCreate, bW as ContractMilestoneSummary, bX as ContractMilestoneUpdate, bY as ContractNote, bZ as ContractNoteCreate, b_ as ContractNoteSummary, b$ as ContractNoteUpdate, c0 as ContractRate, c1 as ContractRateCreate, c2 as ContractRateSummary, c3 as ContractRateUpdate, c4 as ContractRetainers, c5 as ContractRetainersCreate, c6 as ContractRetainersSummary, c7 as ContractRetainersUpdate, c8 as ContractRoleCosts, c9 as ContractRoleCostsCreate, ca as ContractRoleCostsSummary, cb as ContractRoleCostsUpdate, f as ContractService, cc as ContractServiceAdjustment, cd as ContractServiceAdjustmentCreate, ce as ContractServiceAdjustmentSummary, cf as ContractServiceAdjustmentUpdate, cg as ContractServiceBundle, ch as ContractServiceBundleAdjustment, ci as ContractServiceBundleAdjustmentCreate, cj as ContractServiceBundleAdjustmentSummary, ck as ContractServiceBundleAdjustmentUpdate, cl as ContractServiceBundleCreate, cm as ContractServiceBundleSummary, cn as ContractServiceBundleUnit, co as ContractServiceBundleUnitCreate, cp as ContractServiceBundleUnitSummary, cq as ContractServiceBundleUnitUpdate, cr as ContractServiceBundleUpdate, cs as ContractServiceCreate, ct as ContractServiceSummary, cu as ContractServiceUnit, cv as ContractServiceUnitCreate, cw as ContractServiceUnitSummary, cx as ContractServiceUnitUpdate, cy as ContractServiceUpdate, cz as ContractSummary, cA as ContractTicketPurchases, cB as ContractTicketPurchasesCreate, cC as ContractTicketPurchasesSummary, cD as ContractTicketPurchasesUpdate, cE as ContractUpdate, cF as Country, cG as CountryCreate, cH as CountrySummary, cI as CountryUpdate, cJ as Currency, cK as CurrencyCreate, cL as CurrencySummary, cM as CurrencyUpdate, cN as Department, cO as DepartmentCreate, cP as DepartmentSummary, cQ as DepartmentUpdate, cR as DocumentChecklistLibrary, cS as DomainRegistrar, cT as DomainRegistrarCreate, cU as DomainRegistrarSummary, cV as DomainRegistrarUpdate, c_ as EntityInformationResultModel, E as ExpenseItem, c$ as ExpenseItemAttachment, d0 as ExpenseItemAttachmentCreate, d1 as ExpenseItemAttachmentSummary, d2 as ExpenseItemAttachmentUpdate, d3 as ExpenseItemCreate, d4 as ExpenseItemSummary, d5 as ExpenseItemUpdate, d6 as ExpenseReport, d7 as ExpenseReportCreate, d8 as ExpenseReportSummary, d9 as ExpenseReportUpdate, de as GlobalEntityInformationResultModel, H as Holiday, df as HolidayCreate, g as HolidaySet, dg as HolidaySetCreate, dh as HolidaySetSummary, di as HolidaySetUpdate, dj as HolidaySummary, dk as HolidayUpdate, dl as InventoryProduct, dm as InventoryProductCreate, dn as InventoryProductSummary, dp as InventoryProductUpdate, dq as InventoryStockedItemAdd, dr as InventoryStockedItemRemove, ds as InventoryStockedItemTransfer, dt as Invoice, du as InvoiceCreate, dv as InvoiceSummary, dw as InvoiceTemplate, dx as InvoiceTemplateCreate, dy as InvoiceTemplateSummary, dz as InvoiceTemplateUpdate, dA as InvoiceUpdate, dB as KeyValuePair, dC as ModuleAccessResultModel, dD as NotificationHistory, dE as NotificationHistoryCreate, dF as NotificationHistorySummary, dG as NotificationHistoryUpdate, h as Opportunity, dJ as OpportunityAttachment, dK as OpportunityAttachmentCreate, dL as OpportunityAttachmentSummary, dM as OpportunityAttachmentUpdate, dN as OpportunityCategory, dO as OpportunityCategoryCreate, dP as OpportunityCategorySummary, dQ as OpportunityCategoryUpdate, dR as OpportunityCreate, dS as OpportunitySummary, dT as OpportunityUpdate, dU as OrganizationalLevel1, dV as OrganizationalLevel1Create, dW as OrganizationalLevel1Summary, dX as OrganizationalLevel1Update, dY as OrganizationalLevel2, dZ as OrganizationalLevel2Create, d_ as OrganizationalLevel2Summary, d$ as OrganizationalLevel2Update, e0 as OrganizationalLevelAssociation, e1 as OrganizationalLevelAssociationCreate, e2 as OrganizationalLevelAssociationSummary, e3 as OrganizationalLevelAssociationUpdate, e5 as Phase, e6 as PhaseCreate, e7 as PhaseSummary, e8 as PhaseUpdate, ea as Product, eb as ProductCreate, ec as ProductSummary, ed as ProductUpdate, ee as ProductVendors, ef as ProductVendorsCreate, eg as ProductVendorsSummary, eh as ProductVendorsUpdate, ei as Project, i as ProjectCharge, ej as ProjectChargeCreate, ek as ProjectChargeSummary, el as ProjectChargeUpdate, em as ProjectContext, en as ProjectCreate, eo as ProjectNote, ep as ProjectNoteCreate, eq as ProjectNoteSummary, er as ProjectNoteUpdate, es as ProjectSummary, et as ProjectUpdate, eu as PurchaseApprovals, ev as PurchaseApprovalsCreate, ew as PurchaseApprovalsSummary, ex as PurchaseApprovalsUpdate, ey as PurchaseOrderItemReceiving, ez as PurchaseOrderItemReceivingCreate, eA as PurchaseOrderItemReceivingSummary, eB as PurchaseOrderItemReceivingUpdate, eC as PurchaseOrderItems, eD as PurchaseOrderItemsCreate, eE as PurchaseOrderItemsSummary, eF as PurchaseOrderItemsUpdate, eG as PurchaseOrders, eH as PurchaseOrdersCreate, eI as PurchaseOrdersSummary, eJ as PurchaseOrdersUpdate, eK as Quote, eL as QuoteCreate, eM as QuoteItem, eN as QuoteItemCreate, eO as QuoteItemSummary, eP as QuoteItemUpdate, eQ as QuoteLocation, eR as QuoteLocationCreate, eS as QuoteLocationSummary, eT as QuoteLocationUpdate, eU as QuoteSummary, eV as QuoteTemplate, eW as QuoteTemplateCreate, eX as QuoteTemplateSummary, eY as QuoteTemplateUpdate, eZ as QuoteUpdate, f0 as Resource, f1 as ResourceCreate, f2 as ResourceRole, f3 as ResourceRoleCreate, f4 as ResourceRoleQueue, f5 as ResourceRoleQueueCreate, f6 as ResourceRoleQueueSummary, f7 as ResourceRoleQueueUpdate, f8 as ResourceRoleSummary, f9 as ResourceRoleUpdate, fa as ResourceSkill, fb as ResourceSkillCreate, fc as ResourceSkillSummary, fd as ResourceSkillUpdate, fe as ResourceSummary, ff as ResourceTimeOffAdditional, fg as ResourceTimeOffAdditionalCreate, fh as ResourceTimeOffAdditionalSummary, fi as ResourceTimeOffAdditionalUpdate, fj as ResourceTimeOffApprover, fk as ResourceTimeOffApproverCreate, fl as ResourceTimeOffApproverSummary, fm as ResourceTimeOffApproverUpdate, fn as ResourceTimeOffBalance, fo as ResourceTimeOffBalanceCreate, fp as ResourceTimeOffBalanceSummary, fq as ResourceTimeOffBalanceUpdate, fr as ResourceUpdate, fs as Role, ft as RoleCreate, fu as RoleSummary, fv as RoleUpdate, fw as SalesOrder, fx as SalesOrderCreate, fy as SalesOrderSummary, fz as SalesOrderUpdate, fA as Service, fB as ServiceCall, fC as ServiceCallCreate, fD as ServiceCallSummary, fE as ServiceCallTask, fF as ServiceCallTaskCreate, fG as ServiceCallTaskResource, fH as ServiceCallTaskResourceCreate, fI as ServiceCallTaskResourceSummary, fJ as ServiceCallTaskResourceUpdate, fK as ServiceCallTaskSummary, fL as ServiceCallTaskUpdate, fM as ServiceCallTicket, fN as ServiceCallTicketCreate, fO as ServiceCallTicketResource, fP as ServiceCallTicketResourceCreate, fQ as ServiceCallTicketResourceSummary, fR as ServiceCallTicketResourceUpdate, fS as ServiceCallTicketSummary, fT as ServiceCallTicketUpdate, fU as ServiceCallUpdate, fV as ServiceCreate, fW as ServiceLevelAgreementResults, fX as ServiceLevelAgreementResultsCreate, fY as ServiceLevelAgreementResultsSummary, fZ as ServiceLevelAgreementResultsUpdate, f_ as ServiceSummary, f$ as ServiceUpdate, g0 as Skill, g1 as SkillCreate, g2 as SkillSummary, g3 as SkillUpdate, g4 as Subscription, g5 as SubscriptionCreate, g6 as SubscriptionPeriod, g7 as SubscriptionPeriodCreate, g8 as SubscriptionPeriodSummary, g9 as SubscriptionPeriodUpdate, ga as SubscriptionSummary, gb as SubscriptionUpdate, gc as Survey, gd as SurveyCreate, ge as SurveyResults, gf as SurveyResultsCreate, gg as SurveyResultsSummary, gh as SurveyResultsUpdate, gi as SurveySummary, gj as SurveyUpdate, gk as Tag, gl as TagAlias, gm as TagAliasCreate, gn as TagAliasSummary, go as TagAliasUpdate, gp as TagCreate, gq as TagGroup, gr as TagGroupCreate, gs as TagGroupSummary, gt as TagGroupUpdate, gu as TagSummary, gv as TagUpdate, gw as Task, gx as TaskCreate, gy as TaskSecondaryResource, gz as TaskSecondaryResourceCreate, gA as TaskSecondaryResourceSummary, gB as TaskSecondaryResourceUpdate, gC as TaskSummary, gD as TaskUpdate, gE as TaxRegion, gF as TaxRegionCreate, gG as TaxRegionSummary, gH as TaxRegionUpdate, gI as ThresholdStatusResultModel, gJ as Ticket, T as TicketAdditionalConfigurationItem, gK as TicketAdditionalConfigurationItemCreate, gL as TicketAdditionalConfigurationItemSummary, gM as TicketAdditionalConfigurationItemUpdate, j as TicketAdditionalContact, gN as TicketAdditionalContactCreate, gO as TicketAdditionalContactSummary, gP as TicketAdditionalContactUpdate, gQ as TicketAttachment, gR as TicketAttachmentCreate, gS as TicketAttachmentSummary, gT as TicketAttachmentUpdate, gU as TicketCategory, gV as TicketCategoryCreate, gW as TicketCategoryFieldDefault, gX as TicketCategoryFieldDefaultCreate, gY as TicketCategoryFieldDefaultSummary, gZ as TicketCategoryFieldDefaultUpdate, g_ as TicketCategorySummary, g$ as TicketCategoryUpdate, h0 as TicketChangeRequestApproval, h1 as TicketChangeRequestApprovalCreate, h2 as TicketChangeRequestApprovalSummary, h3 as TicketChangeRequestApprovalUpdate, k as TicketCharge, h4 as TicketChargeCreate, h5 as TicketChargeSummary, h6 as TicketChargeUpdate, h7 as TicketChecklistItem, h8 as TicketChecklistItemCreate, h9 as TicketChecklistItemSummary, ha as TicketChecklistItemUpdate, hb as TicketChecklistLibrary, hc as TicketChecklistLibraryCreate, hd as TicketChecklistLibrarySummary, he as TicketChecklistLibraryUpdate, hf as TicketContext, hg as TicketCreate, hh as TicketHistory, hi as TicketHistoryCreate, hj as TicketHistorySummary, hk as TicketHistoryUpdate, hl as TicketNote, hm as TicketNoteAttachment, hn as TicketNoteAttachmentCreate, ho as TicketNoteAttachmentSummary, hp as TicketNoteAttachmentUpdate, hq as TicketNoteCreate, hr as TicketNoteSummary, hs as TicketNoteUpdate, ht as TicketNoteWebhook, hu as TicketNoteWebhookCreate, hv as TicketNoteWebhookSummary, hw as TicketNoteWebhookUpdate, hx as TicketSecondaryResource, hy as TicketSecondaryResourceCreate, hz as TicketSecondaryResourceSummary, hA as TicketSecondaryResourceUpdate, hB as TicketSummary, hC as TicketUpdate, hD as TicketWebhook, hE as TicketWebhookCreate, hF as TicketWebhookSummary, hG as TicketWebhookUpdate, l as TimeEntry, hH as TimeEntryAttachment, hI as TimeEntryAttachmentCreate, hJ as TimeEntryAttachmentSummary, hK as TimeEntryAttachmentUpdate, hL as TimeEntryCreate, hM as TimeEntrySummary, hN as TimeEntryUpdate, hO as TimeOffRequest, hP as TimeOffRequestCreate, hQ as TimeOffRequestReject, hR as TimeOffRequestSummary, hS as TimeOffRequestUpdate, hU as ZoneInformationResultModel } from '../index-BQVStxwi.js';
@@ -1,70 +1,24 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/untrusted.ts
2
- var UNTRUSTED_OPEN = "<untrusted_content>";
3
- var UNTRUSTED_CLOSE = "</untrusted_content>";
4
- var UNTRUSTED_OPEN_NEUTRALISED = "\\u003Cuntrusted_content\\u003E";
5
- var UNTRUSTED_CLOSE_NEUTRALISED = "\\u003C\\/untrusted_content\\u003E";
6
- var REDACTED_MARKER = "[REDACTED]";
7
- function isPlainRecord(value) {
8
- if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
9
- const proto = Object.getPrototypeOf(value);
10
- return proto === Object.prototype || proto === null;
11
- }
12
- function wrapUntrusted(value) {
13
- if (typeof value !== "string") return void 0;
14
- if (value === "") return void 0;
15
- if (value === REDACTED_MARKER) return void 0;
16
- if (value.startsWith(UNTRUSTED_OPEN) && value.endsWith(UNTRUSTED_CLOSE) && !value.slice(UNTRUSTED_OPEN.length, value.length - UNTRUSTED_CLOSE.length).includes(UNTRUSTED_OPEN) && !value.slice(UNTRUSTED_OPEN.length, value.length - UNTRUSTED_CLOSE.length).includes(UNTRUSTED_CLOSE)) {
17
- return value;
18
- }
19
- const inner = value.split(UNTRUSTED_OPEN).join(UNTRUSTED_OPEN_NEUTRALISED).split(UNTRUSTED_CLOSE).join(UNTRUSTED_CLOSE_NEUTRALISED);
20
- return `${UNTRUSTED_OPEN}${inner}${UNTRUSTED_CLOSE}`;
21
- }
22
- function markUntrusted(record, fields) {
23
- if (!isPlainRecord(record)) return record;
24
- const fieldSet = new Set(fields);
25
- const out = { ...record };
26
- for (const key of Object.keys(record)) {
27
- if (!fieldSet.has(key)) continue;
28
- const wrapped = wrapUntrusted(record[key]);
29
- if (wrapped !== void 0) out[key] = wrapped;
30
- }
31
- return out;
32
- }
33
- function deepMarkUntrusted(value, fields) {
34
- if (Array.isArray(value)) return value.map((entry) => deepMarkUntrusted(entry, fields));
35
- if (!isPlainRecord(value)) return value;
36
- const marked = markUntrusted(value, fields);
37
- const out = {};
38
- for (const [key, entry] of Object.entries(marked)) {
39
- out[key] = deepMarkUntrusted(entry, fields);
40
- }
41
- return out;
42
- }
43
- function stripUntrustedWrapper(value) {
44
- if (typeof value !== "string") return value;
45
- if (!value.startsWith(UNTRUSTED_OPEN) || !value.endsWith(UNTRUSTED_CLOSE)) return value;
46
- const inner = value.slice(UNTRUSTED_OPEN.length, value.length - UNTRUSTED_CLOSE.length);
47
- return inner;
48
- }
49
- function stripUntrustedDeep(value) {
50
- if (typeof value === "string") return stripUntrustedWrapper(value);
51
- if (Array.isArray(value)) return value.map((entry) => stripUntrustedDeep(entry));
52
- if (!isPlainRecord(value)) return value;
53
- const out = {};
54
- for (const [key, entry] of Object.entries(value)) {
55
- out[key] = stripUntrustedDeep(entry);
56
- }
57
- return out;
58
- }
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
- exports.REDACTED_MARKER = REDACTED_MARKER; exports.UNTRUSTED_CLOSE = UNTRUSTED_CLOSE; exports.UNTRUSTED_CLOSE_NEUTRALISED = UNTRUSTED_CLOSE_NEUTRALISED; exports.UNTRUSTED_OPEN = UNTRUSTED_OPEN; exports.UNTRUSTED_OPEN_NEUTRALISED = UNTRUSTED_OPEN_NEUTRALISED; exports.deepMarkUntrusted = deepMarkUntrusted; exports.markUntrusted = markUntrusted; exports.stripUntrustedDeep = stripUntrustedDeep; exports.stripUntrustedWrapper = stripUntrustedWrapper; exports.wrapUntrusted = wrapUntrusted;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+ var _chunkMJTKK3QGcjs = require('./chunk-MJTKK3QG.cjs');
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+ exports.REDACTED_MARKER = _chunkMJTKK3QGcjs.REDACTED_MARKER; exports.UNTRUSTED_CLOSE = _chunkMJTKK3QGcjs.UNTRUSTED_CLOSE; exports.UNTRUSTED_CLOSE_NEUTRALISED = _chunkMJTKK3QGcjs.UNTRUSTED_CLOSE_NEUTRALISED; exports.UNTRUSTED_OPEN = _chunkMJTKK3QGcjs.UNTRUSTED_OPEN; exports.UNTRUSTED_OPEN_NEUTRALISED = _chunkMJTKK3QGcjs.UNTRUSTED_OPEN_NEUTRALISED; exports.deepMarkUntrusted = _chunkMJTKK3QGcjs.deepMarkUntrusted; exports.markUntrusted = _chunkMJTKK3QGcjs.markUntrusted; exports.stripUntrustedDeep = _chunkMJTKK3QGcjs.stripUntrustedDeep; exports.stripUntrustedWrapper = _chunkMJTKK3QGcjs.stripUntrustedWrapper; exports.wrapUntrusted = _chunkMJTKK3QGcjs.wrapUntrusted;
package/dist/untrusted.js CHANGED
@@ -1,61 +1,15 @@
1
- // src/untrusted.ts
2
- var UNTRUSTED_OPEN = "<untrusted_content>";
3
- var UNTRUSTED_CLOSE = "</untrusted_content>";
4
- var UNTRUSTED_OPEN_NEUTRALISED = "\\u003Cuntrusted_content\\u003E";
5
- var UNTRUSTED_CLOSE_NEUTRALISED = "\\u003C\\/untrusted_content\\u003E";
6
- var REDACTED_MARKER = "[REDACTED]";
7
- function isPlainRecord(value) {
8
- if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
9
- const proto = Object.getPrototypeOf(value);
10
- return proto === Object.prototype || proto === null;
11
- }
12
- function wrapUntrusted(value) {
13
- if (typeof value !== "string") return void 0;
14
- if (value === "") return void 0;
15
- if (value === REDACTED_MARKER) return void 0;
16
- if (value.startsWith(UNTRUSTED_OPEN) && value.endsWith(UNTRUSTED_CLOSE) && !value.slice(UNTRUSTED_OPEN.length, value.length - UNTRUSTED_CLOSE.length).includes(UNTRUSTED_OPEN) && !value.slice(UNTRUSTED_OPEN.length, value.length - UNTRUSTED_CLOSE.length).includes(UNTRUSTED_CLOSE)) {
17
- return value;
18
- }
19
- const inner = value.split(UNTRUSTED_OPEN).join(UNTRUSTED_OPEN_NEUTRALISED).split(UNTRUSTED_CLOSE).join(UNTRUSTED_CLOSE_NEUTRALISED);
20
- return `${UNTRUSTED_OPEN}${inner}${UNTRUSTED_CLOSE}`;
21
- }
22
- function markUntrusted(record, fields) {
23
- if (!isPlainRecord(record)) return record;
24
- const fieldSet = new Set(fields);
25
- const out = { ...record };
26
- for (const key of Object.keys(record)) {
27
- if (!fieldSet.has(key)) continue;
28
- const wrapped = wrapUntrusted(record[key]);
29
- if (wrapped !== void 0) out[key] = wrapped;
30
- }
31
- return out;
32
- }
33
- function deepMarkUntrusted(value, fields) {
34
- if (Array.isArray(value)) return value.map((entry) => deepMarkUntrusted(entry, fields));
35
- if (!isPlainRecord(value)) return value;
36
- const marked = markUntrusted(value, fields);
37
- const out = {};
38
- for (const [key, entry] of Object.entries(marked)) {
39
- out[key] = deepMarkUntrusted(entry, fields);
40
- }
41
- return out;
42
- }
43
- function stripUntrustedWrapper(value) {
44
- if (typeof value !== "string") return value;
45
- if (!value.startsWith(UNTRUSTED_OPEN) || !value.endsWith(UNTRUSTED_CLOSE)) return value;
46
- const inner = value.slice(UNTRUSTED_OPEN.length, value.length - UNTRUSTED_CLOSE.length);
47
- return inner;
48
- }
49
- function stripUntrustedDeep(value) {
50
- if (typeof value === "string") return stripUntrustedWrapper(value);
51
- if (Array.isArray(value)) return value.map((entry) => stripUntrustedDeep(entry));
52
- if (!isPlainRecord(value)) return value;
53
- const out = {};
54
- for (const [key, entry] of Object.entries(value)) {
55
- out[key] = stripUntrustedDeep(entry);
56
- }
57
- return out;
58
- }
1
+ import {
2
+ REDACTED_MARKER,
3
+ UNTRUSTED_CLOSE,
4
+ UNTRUSTED_CLOSE_NEUTRALISED,
5
+ UNTRUSTED_OPEN,
6
+ UNTRUSTED_OPEN_NEUTRALISED,
7
+ deepMarkUntrusted,
8
+ markUntrusted,
9
+ stripUntrustedDeep,
10
+ stripUntrustedWrapper,
11
+ wrapUntrusted
12
+ } from "./chunk-5VHSLJMR.js";
59
13
  export {
60
14
  REDACTED_MARKER,
61
15
  UNTRUSTED_CLOSE,
package/docs/API.md CHANGED
@@ -858,6 +858,44 @@ Vendor filter structure (swagger `Filter`, recursive):
858
858
  contains, exist, notExist, in, notIn` + grouping `and`, `or`. **There is no
859
859
  `not` grouping operator** (G1 pinned): negation is expressed with
860
860
  `noteq`/`notExist`/`notIn`.
861
+ - **`in` / `notIn` value (issue #274):** an array (`[1, 2, 3]`) or a
862
+ comma-separated string (`"1,2,3"`). The string is split on commas, each
863
+ token trimmed and empty tokens dropped; a canonical number token becomes a
864
+ number (`"007"` stays a string; `udf: true` values stay strings). Both forms
865
+ produce the identical wire filter and share every cap. A string with no
866
+ tokens (`""`, `" , "`) is refused pre-request with a typed
867
+ `AutotaskConfigError` (never an empty `in` on the wire).
868
+ - **Relation filters (issue #275):** on a resource that carries a
869
+ `ticketID`, `taskID` or `projectID` foreign key (e.g. `time_entries`: ticket
870
+ and task), a leaf whose field is `ticket.<field>`, `task.<field>` or
871
+ `project.<field>` is resolved before the query: the parent entity is read
872
+ (`IncludeFields: ['id']`, at most 300 rows) with the relation's conditions,
873
+ and the leaves become `<relation>ID in [ids]`. Supported by `queryBounded`
874
+ (and the invoke `query` op), `count` and `operations.aggregate`; the raw
875
+ `query()`/`queryAll()` walks do not rewrite.
876
+ - Inside an `and` (and at the top level) all leaves of one relation share ONE
877
+ parent read; inside an `or` each relation leaf is its own read. Direct
878
+ conditions are untouched and may be mixed freely.
879
+ - No parent match: an `and` matches nothing; an `or` drops that branch. When
880
+ the whole filter matches nothing the child call is not issued: `queryBounded`
881
+ returns `{ items: [], fetched: 0, hasMore: false, pagesWalked: 0,
882
+ relationNote }`, `count` returns `0`, aggregate group/sum carries
883
+ `relationNote`.
884
+ - More than 300 matching parents: typed `AutotaskConfigError`, child call not
885
+ issued (a capped parent set would be vendor-ordered, so partial totals would
886
+ be biased). Narrow the relation conditions (e.g. a ticket date or status).
887
+ - Pre-request (zero wire): unknown relation, a parent field outside the
888
+ parent's vendored field set, multi-hop (`ticket.company.x`) and `udf: true`
889
+ relation leaves are refused. The invoke field-name check skips relation
890
+ leaves (they are checked against the parent instead).
891
+
892
+ ```ts
893
+ // company 123's time in October, hours per ticket: 2 calls (tickets ids, then the walk)
894
+ await aggregate(client, 'time_entries.query', [
895
+ { field: 'ticket.companyID', op: 'eq', value: 123 },
896
+ { field: 'dateWorked', op: 'gte', value: '2026-10-01' },
897
+ ], { groupBy: ['ticketID'], sum: ['hoursWorked'] });
898
+ ```
861
899
  - `gt` / `gte` / `in` on `id` are the SDK's own paging/threshold mechanism:
862
900
  the `queryBounded` `latest` opt-in (section 4) probes and walks `id gt` /
863
901
  `id gte` count windows, and the vendored spec's own `QueryModel` example is
@@ -1450,6 +1488,23 @@ notes cannot be deleted, so they never use create-then-delete.
1450
1488
  optionally scoped to one company (a `companyID eq` leaf and-joined server-side with the title match) and
1451
1489
  projected to the listed columns (`id` is always returned). `searchWithDetail` takes the same bag. Malformed
1452
1490
  `companyID` / `includeFields` are refused before any request. Other resources' `search` is unchanged.
1491
+ - **Deprecated (issue #278, since 0.38.0; removed in the next minor):** `time_entries.recentTickets` is a
1492
+ strict subset of an aggregate grouped by ticket now that relation filters (§5) and default labels (§11.27)
1493
+ exist. Replacement (1-2 calls instead of 2+):
1494
+
1495
+ ```ts
1496
+ const res = await aggregate(client, 'time_entries.query', [
1497
+ { field: 'resourceID', op: 'eq', value: 29682885 },
1498
+ { field: 'dateWorked', op: 'gte', value: '2026-10-01' },
1499
+ { field: 'dateWorked', op: 'lte', value: '2026-10-28' },
1500
+ { field: 'ticket.companyID', op: 'eq', value: 123 }, // optional: one company, resolved server-side
1501
+ ], { groupBy: ['ticketID'], sum: ['hoursWorked'] });
1502
+ // res.groups[i] = { key: { ticketID, ticketIDName: '<untrusted_content>T20261001.0001 Printer down</untrusted_content>' },
1503
+ // count, sums: { hoursWorked } }
1504
+ ```
1505
+
1506
+ For per-ticket status / assignee / company use `operations.fetchByIds` on the group ticket ids (labels
1507
+ included: `statusLabel`, `assignedResourceIDName`, `companyIDName`).
1453
1508
  - `time_entries.recentTickets(from, to, { resourceID, companyID?, tz?, limit? })` — the distinct tickets a
1454
1509
  resource logged time against in an inclusive `dateWorked` window (`YYYY-MM-DD`; UTC days, or the local days in
1455
1510
  `tz`). One bounded time-entry read (`dateWorked` + `resourceID`; `limit` 1-500, default 500, bounds the
@@ -2666,15 +2721,19 @@ metadata is (the `autotask_describe` channel, `capabilities.json`,
2666
2721
  `node-autotask/capabilities`). One row shape over a CLOSED kind set:
2667
2722
 
2668
2723
  ```ts
2669
- { kind: 'not-persisted'; fields?: string[]; note: string; remedyOp?: string }
2724
+ { kind: 'not-persisted' | 'field-semantics'; fields?: string[]; note: string; remedyOp?: string }
2670
2725
  ```
2671
2726
 
2672
2727
  - `not-persisted`: the op accepts the listed `fields` but the vendor does not
2673
2728
  store them. `fields` is required for this kind; `remedyOp` names the plan
2674
2729
  operation that does what this one cannot.
2730
+ - `field-semantics` (issue #282): the listed `fields` have meanings a caller
2731
+ must not conflate; `note` states them in a sentence a server can quote.
2732
+ `fields` is required for this kind too.
2675
2733
  - First rows: `time_entries.update` and `ticket_charges.update` declare
2676
2734
  `{ kind: 'not-persisted', fields: ['ticketID'], remedyOp:
2677
- '<resource>.moveToTicket' }`.
2735
+ '<resource>.moveToTicket' }`; `time_entries.query` and `time_entries.get`
2736
+ declare `{ kind: 'field-semantics', fields: ['hoursWorked', 'hoursToBill'] }`.
2678
2737
  - The kind set is closed at build time: `scripts/generate-capabilities.mjs`
2679
2738
  throws on an unknown kind or a malformed row, and gate clause 22 also checks
2680
2739
  that every named field exists on the resource model and every `remedyOp` is
@@ -2855,7 +2914,7 @@ record write says nothing about the field catalog and never invalidates;
2855
2914
  the TTL is the other expiry path.
2856
2915
 
2857
2916
  **The on-demand op:** `operations.fieldCatalog(client, opts?)`
2858
- (`{ resources?, include?, fields?, labels?, fresh? }` — `fields` filters the
2917
+ (`{ resources?, include?, fields?, labels?, fresh?, compact?, maxBytes? }` — `fields` filters the
2859
2918
  fields-kind rows to the named fields and reports `unmatchedFields`; a
2860
2919
  projected row is marked `projected: true` (issue #121 — the four derived
2861
2920
  lists then describe the PROJECTED set only, so a consumer can never read a
@@ -2875,6 +2934,22 @@ the field catalog; the seven integration singletons are refused typed —
2875
2934
  a known key without a catalog → `CONFIG_ERROR`, an unknown key → typed
2876
2935
  `RESOURCE_UNKNOWN` carrying the count + the `autotask_catalog` pointer).
2877
2936
 
2937
+ **Compact rows and the size cap (issue #282).** Measured live from the SDK,
2938
+ a `tickets` result is ~20 KB full, ~137 KB full with `labels: true` and
2939
+ ~11 KB with `compact: true` (`time_entries`: ~9 / ~11 / ~5 KB).
2940
+ `compact: true` serves each field row as `{ name, type, isPickList,
2941
+ isReference, udf }` (picklist values only with `labels: true` AND a `fields`
2942
+ filter; the row name lists stay). `maxBytes` (integer >= 4096) caps the UTF-8
2943
+ JSON size: over it, field rows are dropped from the end (udf rows, then
2944
+ fields rows, last resource first; the name lists only when the field rows
2945
+ alone cannot fit) and the result carries `truncated: true` and
2946
+ `truncation: { reason: 'maxBytes', maxBytes, fullBytes, omitted: [{ resource,
2947
+ kind, count }], note }`, so it is always valid JSON and never over the cap (a
2948
+ result whose envelope alone cannot fit, e.g. many resources under a small cap,
2949
+ is refused with `CONFIG_ERROR`). Both default off (the
2950
+ full rows, no cap); a model-facing server should pass `compact: true` and a
2951
+ `maxBytes`.
2952
+
2878
2953
  **Reference targets (issue #219 N1).** Every projected field row carries
2879
2954
  `targetResource: string | null` and `targetEnumerable: boolean`: the plan
2880
2955
  resource key the vendor `referenceEntityType` names, and whether that
@@ -4019,6 +4094,57 @@ returns the contract's reconciled P&L over a date window:
4019
4094
  catch-all/start, the provided-without-rate and fully-missing `missing`
4020
4095
  — never a silent zero — and `internalCost: 0` as a RESOLVED zero).
4021
4096
 
4097
+ ### 11.27 Default label siblings on query, aggregate and fetch (issue #276)
4098
+
4099
+ Rows served by the invoke `<resource>.query` op (the bounded query), the group
4100
+ keys of `operations.aggregate`, and the found records of `operations.fetchMany`
4101
+ / `operations.fetchByIds` carry label siblings **by default**, through the same
4102
+ `resolveCompositeNames` path the full-context composites use:
4103
+
4104
+ | field on the row | sibling | example |
4105
+ |---|---|---|
4106
+ | a picklist field of the resource (catalog `isPickList`) | `<field>Label` | `status: 5` -> `statusLabel: "Complete"` |
4107
+ | `companyID` / `contractID` / `roleID` / `billingCodeID` | `<field>Name` | `contractIDName: "Managed Services 2026"` |
4108
+ | `ticketID` | `ticketIDName` = `"<ticketNumber> <title>"` | `"T20261001.0001 Printer down"` |
4109
+ | `resourceID` and every `*ResourceID` | `<field>Name` (staff name) | `assignedResourceIDName: "Ada Lovelace"` |
4110
+
4111
+ - **Untrusted content:** every `*Name` value (and the alias) is vendor free text
4112
+ outside the untrusted field registry, so the SDK caps it at 200 chars (the
4113
+ noteChars marker `… [+N chars truncated]`) and wraps it in
4114
+ `<untrusted_content>…</untrusted_content>` (embedded tags neutralised, the
4115
+ same `wrapUntrusted` the projection applies to `title`). Picklist `*Label`
4116
+ values stay raw (picklists are outside the untrusted class by the registry
4117
+ rule). Example: `contractIDName: "<untrusted_content>Managed Services 2026</untrusted_content>"`.
4118
+ - `assignedResourceName` is also written (same value as `assignedResourceIDName`):
4119
+ a **deprecated alias**, still written in 0.39.0 (null with it, issue #282);
4120
+ its removal is deferred to a later minor.
4121
+ - Aggregate: `groups[].key.ticketIDName`, `groups[].key.statusLabel`, … (only the
4122
+ returned `top` groups are labelled).
4123
+ - A labelled field that is present in the row always gets its sibling (issue
4124
+ #282): a `null` or `0` value, an unknown id (the vendor's not-found) or a
4125
+ capped id gets `null`, never a missing key and never an error. Only a field
4126
+ absent from the row gets no sibling. Example: `{ contractID: null,
4127
+ contractIDName: null, assignedResourceID: null, assignedResourceIDName: null,
4128
+ assignedResourceName: null, status: null, statusLabel: null }`.
4129
+ - Opt out per call: `names: false` (query bag key, aggregate opts, fetchMany /
4130
+ fetchByIds opts). A non-boolean `names` is refused pre-request.
4131
+ - Caches: picklists ride the fieldCache, staff names the resource name cache,
4132
+ record names the ReadCache (all default-on; invalidated as documented in §3 —
4133
+ a write through the client clears the affected resource's entries, TTL
4134
+ otherwise). A warm call costs zero extra vendor calls; a cold one costs one
4135
+ field-metadata GET for the resource plus one GET per distinct uncached id.
4136
+ - Cold-read cap: at most `DEFAULT_MAX_NAME_READS` (20) uncached name reads per
4137
+ call (per resource for fetch batches). Ids over the cap get a `null` `*Name`
4138
+ and the result carries a `names` summary — never silently unlabelled:
4139
+ `names: { truncated: true, capped: N, note: "N id(s) left unlabelled (their *Name is null): the per-call cap of 20 uncached name reads was hit — …", reasons? }`.
4140
+ `names` is also present (with `truncated: false`) when a picklist label could
4141
+ not be resolved; `reasons` maps the field to the fieldCatalog honesty note.
4142
+ Absent `names` = every sibling was resolved.
4143
+ - Response size (worst case, every FK populated, full model, wrapped names): a
4144
+ tickets row grows ~50% (2.4 KB -> 3.6 KB, 19 siblings), a time_entries row
4145
+ ~77% (0.9 KB -> 1.7 KB, 9 siblings). Use `includeFields` or `names: false`
4146
+ when ids alone are enough.
4147
+
4022
4148
  ## 12. Untrusted-content projection (issue #1)
4023
4149
 
4024
4150
  The agent/MCP projection marks EXTERNALLY-SOURCED free text as untrusted,
@@ -31,6 +31,11 @@ export interface CatalogRow {
31
31
  reach: string | null;
32
32
  reachReason: string | null;
33
33
  boundedAlternative: string | null;
34
+ /** Issue #277: hidden from default catalog results (still callable by exact key). */
35
+ hidden?: true;
36
+ hiddenReason?: string;
37
+ /** Issue #278: deprecated (still callable; the purpose names the replacement). */
38
+ deprecated?: true;
34
39
  }
35
40
 
36
41
  export interface MetaToolSpec {
@@ -0,0 +1,62 @@
1
+ /**
2
+ * rank.ts — the reference catalog ranker (issue #277) for `autotask_catalog`'s
3
+ * `q`: deterministic BM25 over each row's key, tool name, purpose and
4
+ * preferredWhen, with three discovery rules on top of plain any-term recall:
5
+ *
6
+ * - coordination: the score is multiplied by (matched terms / query terms)²
7
+ * and a row matching fewer than half of the terms is dropped, so a row that
8
+ * repeats one common word ("time", "entry") cannot outrank one that matches
9
+ * the whole question;
10
+ * - tool-served rows (a dedicated MCP tool) score x1.5 over registry-only
11
+ * rows; a `deprecated` row scores x0.5;
12
+ * - `hidden` rows (the date-window helpers) are left out unless
13
+ * `includeHidden` is set; an exact key (or tool name) always resolves, hidden
14
+ * or not.
15
+ */
16
+ import type { CatalogRow } from './manifest.js';
17
+
18
+ const STOPWORDS = new Set(['by', 'the', 'and', 'for', 'of', 'in', 'on', 'to', 'with', 'per', 'an', 'all', 'my', 'me', 'get', 'show', 'list']);
19
+
20
+ /** Lower-case word tokens; camelCase and snake_case split; a crude plural fold. */
21
+ export function tokenize(text: string): string[] {
22
+ return text
23
+ .replace(/([a-z])([A-Z])/g, '$1 $2')
24
+ .toLowerCase()
25
+ .split(/[^a-z0-9]+/)
26
+ .filter((t) => t.length > 1 && !STOPWORDS.has(t))
27
+ .map((t) => (t.length > 4 && t.endsWith('ies') ? `${t.slice(0, -3)}y` : t.length > 3 && t.endsWith('s') && !t.endsWith('ss') ? t.slice(0, -1) : t));
28
+ }
29
+
30
+ const docOf = (r: CatalogRow): string => [r.operation, r.tool ?? '', r.purpose ?? '', r.preferredWhen ?? ''].join(' ');
31
+
32
+ export function rankCatalog(rows: readonly CatalogRow[], q: string, opts: { includeHidden?: boolean } = {}): CatalogRow[] {
33
+ const key = q.trim();
34
+ const exact = rows.filter((r) => r.operation === key || r.tool === key);
35
+ if (exact.length > 0) return exact; // an exact key always resolves (hidden rows included)
36
+ const pool = opts.includeHidden === true ? rows : rows.filter((r) => r.hidden !== true);
37
+ const terms = [...new Set(tokenize(q))];
38
+ if (terms.length === 0) return [...pool];
39
+ const toks = pool.map((r) => tokenize(docOf(r)));
40
+ const avg = toks.reduce((n, t) => n + t.length, 0) / Math.max(toks.length, 1);
41
+ const df = new Map<string, number>();
42
+ for (const t of toks) for (const term of new Set(t)) df.set(term, (df.get(term) ?? 0) + 1);
43
+ const scored = toks.map((t, i) => {
44
+ let score = 0;
45
+ let matched = 0;
46
+ for (const term of terms) {
47
+ const tf = t.filter((x) => x === term).length;
48
+ if (tf === 0) continue;
49
+ matched += 1;
50
+ const n = df.get(term) ?? 0;
51
+ const idf = Math.log(1 + (toks.length - n + 0.5) / (n + 0.5));
52
+ score += idf * ((tf * 2.2) / (tf + 1.2 * (0.25 + (0.75 * t.length) / avg)));
53
+ }
54
+ const coverage = matched / terms.length;
55
+ const boost = (pool[i]!.tool !== null ? 1.5 : 1) * (pool[i]!.deprecated === true ? 0.5 : 1);
56
+ return { i, matched, score: score * coverage * coverage * boost };
57
+ });
58
+ return scored
59
+ .filter((s) => s.score > 0 && s.matched * 2 >= terms.length)
60
+ .sort((a, b) => b.score - a.score || a.i - b.i)
61
+ .map((s) => pool[s.i]!);
62
+ }
@@ -6,6 +6,7 @@
6
6
  import * as z from 'zod/v4';
7
7
  import { AutotaskConfigError } from 'node-autotask';
8
8
  import { CATALOG, RECORD_BY_ID } from './manifest.js';
9
+ import { rankCatalog } from './rank.js';
9
10
  import { CATALOG_OUTPUT, DESCRIBE_OUTPUT, closedInput } from './schemas.js';
10
11
  import { closedArgsError, errorContent, ok } from './errors.js';
11
12
  import type { ToolContext } from './types.js';
@@ -25,6 +26,8 @@ export function registerMetaTools({ server, untrustedWrap }: ToolContext): void
25
26
  offset: z.number().int().min(0).default(0).describe(`Row offset — how to page past the limit (${CATALOG.catalog.length} rows; the catalog is the only discovery path for the long tail).`),
26
27
  tier: z.enum(['core', 'extended', 'advanced']).optional().describe('Filter rows by plan tier.'),
27
28
  effect: z.enum(['read', 'write', 'destructive']).optional().describe('Filter rows by effect.'),
29
+ q: z.string().min(1).optional().describe('Search text: rows ranked best first (most query words matched; tool-served rows first). An exact operation key or tool name returns that row.'),
30
+ includeHidden: z.boolean().default(false).describe('Include the hidden date-window helper rows (default false; an exact key always resolves).'),
28
31
  }),
29
32
  );
30
33
 
@@ -41,7 +44,9 @@ export function registerMetaTools({ server, untrustedWrap }: ToolContext): void
41
44
  async (args) => {
42
45
  const closedErr = closedArgsError(args, catalogInput.validKeys);
43
46
  if (closedErr !== null) return closedErr;
44
- const rows = CATALOG.catalog.filter(
47
+ // Issue #277: `q` ranks (rank.ts); without it the hidden window helpers are left out unless includeHidden.
48
+ const base = args.q !== undefined ? rankCatalog(CATALOG.catalog, args.q, { includeHidden: args.includeHidden }) : CATALOG.catalog.filter((r) => args.includeHidden || r.hidden !== true);
49
+ const rows = base.filter(
45
50
  (r) => (args.tier === undefined || r.tier === args.tier) && (args.effect === undefined || r.effect === args.effect),
46
51
  );
47
52
  const page = rows.slice(args.offset, args.offset + args.limit);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-autotask",
3
- "version": "0.37.1",
3
+ "version": "0.39.0",
4
4
  "description": "Fully-typed TypeScript SDK for the Autotask (Datto) PSA REST API. Zero runtime dependencies. Built for building MCP servers and integrations.",
5
5
  "type": "module",
6
6
  "sideEffects": false,