attio-mcp 0.1.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 (644) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/LICENSE +236 -0
  3. package/README.md +105 -0
  4. package/dist/api/attio-client.d.ts +25 -0
  5. package/dist/api/attio-client.d.ts.map +1 -0
  6. package/dist/api/attio-client.js +64 -0
  7. package/dist/api/attio-client.js.map +1 -0
  8. package/dist/api/attribute-types.d.ts +119 -0
  9. package/dist/api/attribute-types.d.ts.map +1 -0
  10. package/dist/api/attribute-types.js +320 -0
  11. package/dist/api/attribute-types.js.map +1 -0
  12. package/dist/api/client.d.ts +3 -0
  13. package/dist/api/client.d.ts.map +1 -0
  14. package/dist/api/client.js +61 -0
  15. package/dist/api/client.js.map +1 -0
  16. package/dist/api/operations/batch.d.ts +55 -0
  17. package/dist/api/operations/batch.d.ts.map +1 -0
  18. package/dist/api/operations/batch.js +176 -0
  19. package/dist/api/operations/batch.js.map +1 -0
  20. package/dist/api/operations/crud.d.ts +61 -0
  21. package/dist/api/operations/crud.d.ts.map +1 -0
  22. package/dist/api/operations/crud.js +192 -0
  23. package/dist/api/operations/crud.js.map +1 -0
  24. package/dist/api/operations/index.d.ts +14 -0
  25. package/dist/api/operations/index.d.ts.map +1 -0
  26. package/dist/api/operations/index.js +18 -0
  27. package/dist/api/operations/index.js.map +1 -0
  28. package/dist/api/operations/lists.d.ts +66 -0
  29. package/dist/api/operations/lists.d.ts.map +1 -0
  30. package/dist/api/operations/lists.js +300 -0
  31. package/dist/api/operations/lists.js.map +1 -0
  32. package/dist/api/operations/notes.d.ts +29 -0
  33. package/dist/api/operations/notes.d.ts.map +1 -0
  34. package/dist/api/operations/notes.js +63 -0
  35. package/dist/api/operations/notes.js.map +1 -0
  36. package/dist/api/operations/retry.d.ts +48 -0
  37. package/dist/api/operations/retry.d.ts.map +1 -0
  38. package/dist/api/operations/retry.js +98 -0
  39. package/dist/api/operations/retry.js.map +1 -0
  40. package/dist/api/operations/search.d.ts +37 -0
  41. package/dist/api/operations/search.d.ts.map +1 -0
  42. package/dist/api/operations/search.js +186 -0
  43. package/dist/api/operations/search.js.map +1 -0
  44. package/dist/api/operations/tasks.d.ts +20 -0
  45. package/dist/api/operations/tasks.d.ts.map +1 -0
  46. package/dist/api/operations/tasks.js +87 -0
  47. package/dist/api/operations/tasks.js.map +1 -0
  48. package/dist/api/operations/types.d.ts +61 -0
  49. package/dist/api/operations/types.d.ts.map +1 -0
  50. package/dist/api/operations/types.js +10 -0
  51. package/dist/api/operations/types.js.map +1 -0
  52. package/dist/cli/commands/attributes.d.ts +34 -0
  53. package/dist/cli/commands/attributes.d.ts.map +1 -0
  54. package/dist/cli/commands/attributes.js +171 -0
  55. package/dist/cli/commands/attributes.js.map +1 -0
  56. package/dist/cli/discover.d.ts +3 -0
  57. package/dist/cli/discover.d.ts.map +1 -0
  58. package/dist/cli/discover.js +72 -0
  59. package/dist/cli/discover.js.map +1 -0
  60. package/dist/errors/api-errors.d.ts +191 -0
  61. package/dist/errors/api-errors.d.ts.map +1 -0
  62. package/dist/errors/api-errors.js +305 -0
  63. package/dist/errors/api-errors.js.map +1 -0
  64. package/dist/errors/company-errors.d.ts +40 -0
  65. package/dist/errors/company-errors.d.ts.map +1 -0
  66. package/dist/errors/company-errors.js +62 -0
  67. package/dist/errors/company-errors.js.map +1 -0
  68. package/dist/errors/value-match-error.d.ts +15 -0
  69. package/dist/errors/value-match-error.d.ts.map +1 -0
  70. package/dist/errors/value-match-error.js +40 -0
  71. package/dist/errors/value-match-error.js.map +1 -0
  72. package/dist/handlers/error-interceptor.d.ts +6 -0
  73. package/dist/handlers/error-interceptor.d.ts.map +1 -0
  74. package/dist/handlers/error-interceptor.js +17 -0
  75. package/dist/handlers/error-interceptor.js.map +1 -0
  76. package/dist/handlers/rate-limited-handler.d.ts +17 -0
  77. package/dist/handlers/rate-limited-handler.d.ts.map +1 -0
  78. package/dist/handlers/rate-limited-handler.js +126 -0
  79. package/dist/handlers/rate-limited-handler.js.map +1 -0
  80. package/dist/handlers/resources.d.ts +11 -0
  81. package/dist/handlers/resources.d.ts.map +1 -0
  82. package/dist/handlers/resources.js +109 -0
  83. package/dist/handlers/resources.js.map +1 -0
  84. package/dist/handlers/tool-configs/companies/attributes.d.ts +85 -0
  85. package/dist/handlers/tool-configs/companies/attributes.d.ts.map +1 -0
  86. package/dist/handlers/tool-configs/companies/attributes.js +203 -0
  87. package/dist/handlers/tool-configs/companies/attributes.js.map +1 -0
  88. package/dist/handlers/tool-configs/companies/batch.d.ts +145 -0
  89. package/dist/handlers/tool-configs/companies/batch.d.ts.map +1 -0
  90. package/dist/handlers/tool-configs/companies/batch.js +249 -0
  91. package/dist/handlers/tool-configs/companies/batch.js.map +1 -0
  92. package/dist/handlers/tool-configs/companies/crud.d.ts +103 -0
  93. package/dist/handlers/tool-configs/companies/crud.d.ts.map +1 -0
  94. package/dist/handlers/tool-configs/companies/crud.js +157 -0
  95. package/dist/handlers/tool-configs/companies/crud.js.map +1 -0
  96. package/dist/handlers/tool-configs/companies/definitions.d.ts +5 -0
  97. package/dist/handlers/tool-configs/companies/definitions.d.ts.map +1 -0
  98. package/dist/handlers/tool-configs/companies/definitions.js +9 -0
  99. package/dist/handlers/tool-configs/companies/definitions.js.map +1 -0
  100. package/dist/handlers/tool-configs/companies/formatters.d.ts +42 -0
  101. package/dist/handlers/tool-configs/companies/formatters.d.ts.map +1 -0
  102. package/dist/handlers/tool-configs/companies/formatters.js +324 -0
  103. package/dist/handlers/tool-configs/companies/formatters.js.map +1 -0
  104. package/dist/handlers/tool-configs/companies/index.d.ts +642 -0
  105. package/dist/handlers/tool-configs/companies/index.d.ts.map +1 -0
  106. package/dist/handlers/tool-configs/companies/index.js +86 -0
  107. package/dist/handlers/tool-configs/companies/index.js.map +1 -0
  108. package/dist/handlers/tool-configs/companies/notes.d.ts +61 -0
  109. package/dist/handlers/tool-configs/companies/notes.d.ts.map +1 -0
  110. package/dist/handlers/tool-configs/companies/notes.js +109 -0
  111. package/dist/handlers/tool-configs/companies/notes.js.map +1 -0
  112. package/dist/handlers/tool-configs/companies/relationships.d.ts +137 -0
  113. package/dist/handlers/tool-configs/companies/relationships.d.ts.map +1 -0
  114. package/dist/handlers/tool-configs/companies/relationships.js +163 -0
  115. package/dist/handlers/tool-configs/companies/relationships.js.map +1 -0
  116. package/dist/handlers/tool-configs/companies/search.d.ts +101 -0
  117. package/dist/handlers/tool-configs/companies/search.d.ts.map +1 -0
  118. package/dist/handlers/tool-configs/companies/search.js +163 -0
  119. package/dist/handlers/tool-configs/companies/search.js.map +1 -0
  120. package/dist/handlers/tool-configs/companies/types.d.ts +6 -0
  121. package/dist/handlers/tool-configs/companies/types.d.ts.map +1 -0
  122. package/dist/handlers/tool-configs/companies/types.js +2 -0
  123. package/dist/handlers/tool-configs/companies/types.js.map +1 -0
  124. package/dist/handlers/tool-configs/index.d.ts +12 -0
  125. package/dist/handlers/tool-configs/index.d.ts.map +1 -0
  126. package/dist/handlers/tool-configs/index.js +12 -0
  127. package/dist/handlers/tool-configs/index.js.map +1 -0
  128. package/dist/handlers/tool-configs/lists.d.ts +459 -0
  129. package/dist/handlers/tool-configs/lists.d.ts.map +1 -0
  130. package/dist/handlers/tool-configs/lists.js +597 -0
  131. package/dist/handlers/tool-configs/lists.js.map +1 -0
  132. package/dist/handlers/tool-configs/paginated-people.d.ts +197 -0
  133. package/dist/handlers/tool-configs/paginated-people.d.ts.map +1 -0
  134. package/dist/handlers/tool-configs/paginated-people.js +256 -0
  135. package/dist/handlers/tool-configs/paginated-people.js.map +1 -0
  136. package/dist/handlers/tool-configs/people/activity-search.d.ts +98 -0
  137. package/dist/handlers/tool-configs/people/activity-search.d.ts.map +1 -0
  138. package/dist/handlers/tool-configs/people/activity-search.js +113 -0
  139. package/dist/handlers/tool-configs/people/activity-search.js.map +1 -0
  140. package/dist/handlers/tool-configs/people/advanced-search.d.ts +62 -0
  141. package/dist/handlers/tool-configs/people/advanced-search.d.ts.map +1 -0
  142. package/dist/handlers/tool-configs/people/advanced-search.js +74 -0
  143. package/dist/handlers/tool-configs/people/advanced-search.js.map +1 -0
  144. package/dist/handlers/tool-configs/people/crud.d.ts +63 -0
  145. package/dist/handlers/tool-configs/people/crud.d.ts.map +1 -0
  146. package/dist/handlers/tool-configs/people/crud.js +71 -0
  147. package/dist/handlers/tool-configs/people/crud.js.map +1 -0
  148. package/dist/handlers/tool-configs/people/date-search.d.ts +42 -0
  149. package/dist/handlers/tool-configs/people/date-search.d.ts.map +1 -0
  150. package/dist/handlers/tool-configs/people/date-search.js +93 -0
  151. package/dist/handlers/tool-configs/people/date-search.js.map +1 -0
  152. package/dist/handlers/tool-configs/people/formatters.d.ts +19 -0
  153. package/dist/handlers/tool-configs/people/formatters.d.ts.map +1 -0
  154. package/dist/handlers/tool-configs/people/formatters.js +98 -0
  155. package/dist/handlers/tool-configs/people/formatters.js.map +1 -0
  156. package/dist/handlers/tool-configs/people/index.d.ts +407 -0
  157. package/dist/handlers/tool-configs/people/index.d.ts.map +1 -0
  158. package/dist/handlers/tool-configs/people/index.js +30 -0
  159. package/dist/handlers/tool-configs/people/index.js.map +1 -0
  160. package/dist/handlers/tool-configs/people/notes.d.ts +38 -0
  161. package/dist/handlers/tool-configs/people/notes.d.ts.map +1 -0
  162. package/dist/handlers/tool-configs/people/notes.js +57 -0
  163. package/dist/handlers/tool-configs/people/notes.js.map +1 -0
  164. package/dist/handlers/tool-configs/people/relationships.d.ts +112 -0
  165. package/dist/handlers/tool-configs/people/relationships.d.ts.map +1 -0
  166. package/dist/handlers/tool-configs/people/relationships.js +173 -0
  167. package/dist/handlers/tool-configs/people/relationships.js.map +1 -0
  168. package/dist/handlers/tool-configs/people/search.d.ts +53 -0
  169. package/dist/handlers/tool-configs/people/search.d.ts.map +1 -0
  170. package/dist/handlers/tool-configs/people/search.js +61 -0
  171. package/dist/handlers/tool-configs/people/search.js.map +1 -0
  172. package/dist/handlers/tool-configs/people-fix-complete.d.ts +6 -0
  173. package/dist/handlers/tool-configs/people-fix-complete.d.ts.map +1 -0
  174. package/dist/handlers/tool-configs/people-fix-complete.js +76 -0
  175. package/dist/handlers/tool-configs/people-fix-complete.js.map +1 -0
  176. package/dist/handlers/tool-configs/people-fixed.d.ts +12 -0
  177. package/dist/handlers/tool-configs/people-fixed.d.ts.map +1 -0
  178. package/dist/handlers/tool-configs/people-fixed.js +58 -0
  179. package/dist/handlers/tool-configs/people-fixed.js.map +1 -0
  180. package/dist/handlers/tool-configs/people-types.d.ts +32 -0
  181. package/dist/handlers/tool-configs/people-types.d.ts.map +1 -0
  182. package/dist/handlers/tool-configs/people-types.js +5 -0
  183. package/dist/handlers/tool-configs/people-types.js.map +1 -0
  184. package/dist/handlers/tool-configs/people.d.ts +599 -0
  185. package/dist/handlers/tool-configs/people.d.ts.map +1 -0
  186. package/dist/handlers/tool-configs/people.js +817 -0
  187. package/dist/handlers/tool-configs/people.js.map +1 -0
  188. package/dist/handlers/tool-configs/prompts.d.ts +69 -0
  189. package/dist/handlers/tool-configs/prompts.d.ts.map +1 -0
  190. package/dist/handlers/tool-configs/prompts.js +90 -0
  191. package/dist/handlers/tool-configs/prompts.js.map +1 -0
  192. package/dist/handlers/tool-configs/rate-limited-people.d.ts +203 -0
  193. package/dist/handlers/tool-configs/rate-limited-people.d.ts.map +1 -0
  194. package/dist/handlers/tool-configs/rate-limited-people.js +44 -0
  195. package/dist/handlers/tool-configs/rate-limited-people.js.map +1 -0
  196. package/dist/handlers/tool-configs/records/index.d.ts +282 -0
  197. package/dist/handlers/tool-configs/records/index.d.ts.map +1 -0
  198. package/dist/handlers/tool-configs/records/index.js +277 -0
  199. package/dist/handlers/tool-configs/records/index.js.map +1 -0
  200. package/dist/handlers/tool-configs/records.d.ts +282 -0
  201. package/dist/handlers/tool-configs/records.d.ts.map +1 -0
  202. package/dist/handlers/tool-configs/records.js +277 -0
  203. package/dist/handlers/tool-configs/records.js.map +1 -0
  204. package/dist/handlers/tool-configs/resource-specific-tools.d.ts +15 -0
  205. package/dist/handlers/tool-configs/resource-specific-tools.d.ts.map +1 -0
  206. package/dist/handlers/tool-configs/resource-specific-tools.js +33 -0
  207. package/dist/handlers/tool-configs/resource-specific-tools.js.map +1 -0
  208. package/dist/handlers/tool-configs/tasks.d.ts +127 -0
  209. package/dist/handlers/tool-configs/tasks.d.ts.map +1 -0
  210. package/dist/handlers/tool-configs/tasks.js +95 -0
  211. package/dist/handlers/tool-configs/tasks.js.map +1 -0
  212. package/dist/handlers/tool-types.d.ts +47 -0
  213. package/dist/handlers/tool-types.d.ts.map +1 -0
  214. package/dist/handlers/tool-types.js +2 -0
  215. package/dist/handlers/tool-types.js.map +1 -0
  216. package/dist/handlers/tools/config-verifier.d.ts +27 -0
  217. package/dist/handlers/tools/config-verifier.d.ts.map +1 -0
  218. package/dist/handlers/tools/config-verifier.js +108 -0
  219. package/dist/handlers/tools/config-verifier.js.map +1 -0
  220. package/dist/handlers/tools/dispatcher/core.d.ts +12 -0
  221. package/dist/handlers/tools/dispatcher/core.d.ts.map +1 -0
  222. package/dist/handlers/tools/dispatcher/core.js +276 -0
  223. package/dist/handlers/tools/dispatcher/core.js.map +1 -0
  224. package/dist/handlers/tools/dispatcher/formatting.d.ts +17 -0
  225. package/dist/handlers/tools/dispatcher/formatting.d.ts.map +1 -0
  226. package/dist/handlers/tools/dispatcher/formatting.js +25 -0
  227. package/dist/handlers/tools/dispatcher/formatting.js.map +1 -0
  228. package/dist/handlers/tools/dispatcher/logging.d.ts +63 -0
  229. package/dist/handlers/tools/dispatcher/logging.d.ts.map +1 -0
  230. package/dist/handlers/tools/dispatcher/logging.js +108 -0
  231. package/dist/handlers/tools/dispatcher/logging.js.map +1 -0
  232. package/dist/handlers/tools/dispatcher/operations/batch.d.ts +29 -0
  233. package/dist/handlers/tools/dispatcher/operations/batch.d.ts.map +1 -0
  234. package/dist/handlers/tools/dispatcher/operations/batch.js +137 -0
  235. package/dist/handlers/tools/dispatcher/operations/batch.js.map +1 -0
  236. package/dist/handlers/tools/dispatcher/operations/crud.d.ts +25 -0
  237. package/dist/handlers/tools/dispatcher/operations/crud.d.ts.map +1 -0
  238. package/dist/handlers/tools/dispatcher/operations/crud.js +110 -0
  239. package/dist/handlers/tools/dispatcher/operations/crud.js.map +1 -0
  240. package/dist/handlers/tools/dispatcher/operations/details.d.ts +13 -0
  241. package/dist/handlers/tools/dispatcher/operations/details.d.ts.map +1 -0
  242. package/dist/handlers/tools/dispatcher/operations/details.js +52 -0
  243. package/dist/handlers/tools/dispatcher/operations/details.js.map +1 -0
  244. package/dist/handlers/tools/dispatcher/operations/info.d.ts +25 -0
  245. package/dist/handlers/tools/dispatcher/operations/info.d.ts.map +1 -0
  246. package/dist/handlers/tools/dispatcher/operations/info.js +82 -0
  247. package/dist/handlers/tools/dispatcher/operations/info.js.map +1 -0
  248. package/dist/handlers/tools/dispatcher/operations/lists.d.ts +62 -0
  249. package/dist/handlers/tools/dispatcher/operations/lists.d.ts.map +1 -0
  250. package/dist/handlers/tools/dispatcher/operations/lists.js +283 -0
  251. package/dist/handlers/tools/dispatcher/operations/lists.js.map +1 -0
  252. package/dist/handlers/tools/dispatcher/operations/notes.d.ts +17 -0
  253. package/dist/handlers/tools/dispatcher/operations/notes.d.ts.map +1 -0
  254. package/dist/handlers/tools/dispatcher/operations/notes.js +102 -0
  255. package/dist/handlers/tools/dispatcher/operations/notes.js.map +1 -0
  256. package/dist/handlers/tools/dispatcher/operations/search.d.ts +43 -0
  257. package/dist/handlers/tools/dispatcher/operations/search.d.ts.map +1 -0
  258. package/dist/handlers/tools/dispatcher/operations/search.js +190 -0
  259. package/dist/handlers/tools/dispatcher/operations/search.js.map +1 -0
  260. package/dist/handlers/tools/dispatcher/validation.d.ts +27 -0
  261. package/dist/handlers/tools/dispatcher/validation.d.ts.map +1 -0
  262. package/dist/handlers/tools/dispatcher/validation.js +47 -0
  263. package/dist/handlers/tools/dispatcher/validation.js.map +1 -0
  264. package/dist/handlers/tools/dispatcher.d.ts +11 -0
  265. package/dist/handlers/tools/dispatcher.d.ts.map +1 -0
  266. package/dist/handlers/tools/dispatcher.js +15 -0
  267. package/dist/handlers/tools/dispatcher.js.map +1 -0
  268. package/dist/handlers/tools/error-types.d.ts +33 -0
  269. package/dist/handlers/tools/error-types.d.ts.map +1 -0
  270. package/dist/handlers/tools/error-types.js +21 -0
  271. package/dist/handlers/tools/error-types.js.map +1 -0
  272. package/dist/handlers/tools/formatters.d.ts +43 -0
  273. package/dist/handlers/tools/formatters.d.ts.map +1 -0
  274. package/dist/handlers/tools/formatters.js +170 -0
  275. package/dist/handlers/tools/formatters.js.map +1 -0
  276. package/dist/handlers/tools/index.d.ts +15 -0
  277. package/dist/handlers/tools/index.d.ts.map +1 -0
  278. package/dist/handlers/tools/index.js +34 -0
  279. package/dist/handlers/tools/index.js.map +1 -0
  280. package/dist/handlers/tools/registry.d.ts +1874 -0
  281. package/dist/handlers/tools/registry.d.ts.map +1 -0
  282. package/dist/handlers/tools/registry.js +103 -0
  283. package/dist/handlers/tools/registry.js.map +1 -0
  284. package/dist/health/http-server.d.ts +24 -0
  285. package/dist/health/http-server.d.ts.map +1 -0
  286. package/dist/health/http-server.js +106 -0
  287. package/dist/health/http-server.js.map +1 -0
  288. package/dist/index.d.ts +3 -0
  289. package/dist/index.d.ts.map +1 -0
  290. package/dist/index.js +238 -0
  291. package/dist/index.js.map +1 -0
  292. package/dist/objects/base-operations.d.ts +41 -0
  293. package/dist/objects/base-operations.d.ts.map +1 -0
  294. package/dist/objects/base-operations.js +116 -0
  295. package/dist/objects/base-operations.js.map +1 -0
  296. package/dist/objects/batch-companies.d.ts +112 -0
  297. package/dist/objects/batch-companies.d.ts.map +1 -0
  298. package/dist/objects/batch-companies.js +347 -0
  299. package/dist/objects/batch-companies.js.map +1 -0
  300. package/dist/objects/companies/attributes.d.ts +83 -0
  301. package/dist/objects/companies/attributes.d.ts.map +1 -0
  302. package/dist/objects/companies/attributes.js +426 -0
  303. package/dist/objects/companies/attributes.js.map +1 -0
  304. package/dist/objects/companies/basic.d.ts +117 -0
  305. package/dist/objects/companies/basic.d.ts.map +1 -0
  306. package/dist/objects/companies/basic.js +367 -0
  307. package/dist/objects/companies/basic.js.map +1 -0
  308. package/dist/objects/companies/batch.d.ts +6 -0
  309. package/dist/objects/companies/batch.d.ts.map +1 -0
  310. package/dist/objects/companies/batch.js +6 -0
  311. package/dist/objects/companies/batch.js.map +1 -0
  312. package/dist/objects/companies/index.d.ts +13 -0
  313. package/dist/objects/companies/index.d.ts.map +1 -0
  314. package/dist/objects/companies/index.js +17 -0
  315. package/dist/objects/companies/index.js.map +1 -0
  316. package/dist/objects/companies/notes.d.ts +26 -0
  317. package/dist/objects/companies/notes.d.ts.map +1 -0
  318. package/dist/objects/companies/notes.js +199 -0
  319. package/dist/objects/companies/notes.js.map +1 -0
  320. package/dist/objects/companies/relationships.d.ts +41 -0
  321. package/dist/objects/companies/relationships.d.ts.map +1 -0
  322. package/dist/objects/companies/relationships.js +142 -0
  323. package/dist/objects/companies/relationships.js.map +1 -0
  324. package/dist/objects/companies/search.d.ts +158 -0
  325. package/dist/objects/companies/search.d.ts.map +1 -0
  326. package/dist/objects/companies/search.js +463 -0
  327. package/dist/objects/companies/search.js.map +1 -0
  328. package/dist/objects/companies/types.d.ts +27 -0
  329. package/dist/objects/companies/types.d.ts.map +1 -0
  330. package/dist/objects/companies/types.js +3 -0
  331. package/dist/objects/companies/types.js.map +1 -0
  332. package/dist/objects/lists.d.ts +148 -0
  333. package/dist/objects/lists.d.ts.map +1 -0
  334. package/dist/objects/lists.js +586 -0
  335. package/dist/objects/lists.js.map +1 -0
  336. package/dist/objects/paginated-people.d.ts +50 -0
  337. package/dist/objects/paginated-people.d.ts.map +1 -0
  338. package/dist/objects/paginated-people.js +171 -0
  339. package/dist/objects/paginated-people.js.map +1 -0
  340. package/dist/objects/people/basic.d.ts +90 -0
  341. package/dist/objects/people/basic.d.ts.map +1 -0
  342. package/dist/objects/people/basic.js +157 -0
  343. package/dist/objects/people/basic.js.map +1 -0
  344. package/dist/objects/people/batch.d.ts +24 -0
  345. package/dist/objects/people/batch.d.ts.map +1 -0
  346. package/dist/objects/people/batch.js +145 -0
  347. package/dist/objects/people/batch.js.map +1 -0
  348. package/dist/objects/people/index.d.ts +11 -0
  349. package/dist/objects/people/index.d.ts.map +1 -0
  350. package/dist/objects/people/index.js +17 -0
  351. package/dist/objects/people/index.js.map +1 -0
  352. package/dist/objects/people/notes.d.ts +20 -0
  353. package/dist/objects/people/notes.d.ts.map +1 -0
  354. package/dist/objects/people/notes.js +60 -0
  355. package/dist/objects/people/notes.js.map +1 -0
  356. package/dist/objects/people/relationships.d.ts +23 -0
  357. package/dist/objects/people/relationships.d.ts.map +1 -0
  358. package/dist/objects/people/relationships.js +116 -0
  359. package/dist/objects/people/relationships.js.map +1 -0
  360. package/dist/objects/people/search.d.ts +83 -0
  361. package/dist/objects/people/search.d.ts.map +1 -0
  362. package/dist/objects/people/search.js +286 -0
  363. package/dist/objects/people/search.js.map +1 -0
  364. package/dist/objects/people/types.d.ts +37 -0
  365. package/dist/objects/people/types.d.ts.map +1 -0
  366. package/dist/objects/people/types.js +71 -0
  367. package/dist/objects/people/types.js.map +1 -0
  368. package/dist/objects/people-write.d.ts +71 -0
  369. package/dist/objects/people-write.d.ts.map +1 -0
  370. package/dist/objects/people-write.js +261 -0
  371. package/dist/objects/people-write.js.map +1 -0
  372. package/dist/objects/records/formatters.d.ts +20 -0
  373. package/dist/objects/records/formatters.d.ts.map +1 -0
  374. package/dist/objects/records/formatters.js +47 -0
  375. package/dist/objects/records/formatters.js.map +1 -0
  376. package/dist/objects/records/index.d.ts +74 -0
  377. package/dist/objects/records/index.d.ts.map +1 -0
  378. package/dist/objects/records/index.js +374 -0
  379. package/dist/objects/records/index.js.map +1 -0
  380. package/dist/objects/records.d.ts +88 -0
  381. package/dist/objects/records.d.ts.map +1 -0
  382. package/dist/objects/records.js +432 -0
  383. package/dist/objects/records.js.map +1 -0
  384. package/dist/objects/tasks.d.ts +19 -0
  385. package/dist/objects/tasks.d.ts.map +1 -0
  386. package/dist/objects/tasks.js +23 -0
  387. package/dist/objects/tasks.js.map +1 -0
  388. package/dist/prompts/error-handler.d.ts +28 -0
  389. package/dist/prompts/error-handler.d.ts.map +1 -0
  390. package/dist/prompts/error-handler.js +47 -0
  391. package/dist/prompts/error-handler.js.map +1 -0
  392. package/dist/prompts/handlers.d.ts +49 -0
  393. package/dist/prompts/handlers.d.ts.map +1 -0
  394. package/dist/prompts/handlers.js +353 -0
  395. package/dist/prompts/handlers.js.map +1 -0
  396. package/dist/prompts/index.d.ts +11 -0
  397. package/dist/prompts/index.d.ts.map +1 -0
  398. package/dist/prompts/index.js +15 -0
  399. package/dist/prompts/index.js.map +1 -0
  400. package/dist/prompts/templates/companies.d.ts +10 -0
  401. package/dist/prompts/templates/companies.d.ts.map +1 -0
  402. package/dist/prompts/templates/companies.js +128 -0
  403. package/dist/prompts/templates/companies.js.map +1 -0
  404. package/dist/prompts/templates/index.d.ts +42 -0
  405. package/dist/prompts/templates/index.d.ts.map +1 -0
  406. package/dist/prompts/templates/index.js +58 -0
  407. package/dist/prompts/templates/index.js.map +1 -0
  408. package/dist/prompts/templates/lists.d.ts +10 -0
  409. package/dist/prompts/templates/lists.d.ts.map +1 -0
  410. package/dist/prompts/templates/lists.js +127 -0
  411. package/dist/prompts/templates/lists.js.map +1 -0
  412. package/dist/prompts/templates/notes.d.ts +10 -0
  413. package/dist/prompts/templates/notes.d.ts.map +1 -0
  414. package/dist/prompts/templates/notes.js +119 -0
  415. package/dist/prompts/templates/notes.js.map +1 -0
  416. package/dist/prompts/templates/people.d.ts +10 -0
  417. package/dist/prompts/templates/people.d.ts.map +1 -0
  418. package/dist/prompts/templates/people.js +127 -0
  419. package/dist/prompts/templates/people.js.map +1 -0
  420. package/dist/prompts/types.d.ts +52 -0
  421. package/dist/prompts/types.d.ts.map +1 -0
  422. package/dist/prompts/types.js +5 -0
  423. package/dist/prompts/types.js.map +1 -0
  424. package/dist/types/attio.d.ts +424 -0
  425. package/dist/types/attio.d.ts.map +1 -0
  426. package/dist/types/attio.js +116 -0
  427. package/dist/types/attio.js.map +1 -0
  428. package/dist/types/company-types.d.ts +52 -0
  429. package/dist/types/company-types.d.ts.map +1 -0
  430. package/dist/types/company-types.js +5 -0
  431. package/dist/types/company-types.js.map +1 -0
  432. package/dist/types/tool-types.d.ts +262 -0
  433. package/dist/types/tool-types.d.ts.map +1 -0
  434. package/dist/types/tool-types.js +6 -0
  435. package/dist/types/tool-types.js.map +1 -0
  436. package/dist/utils/api-fallback.d.ts +39 -0
  437. package/dist/utils/api-fallback.d.ts.map +1 -0
  438. package/dist/utils/api-fallback.js +94 -0
  439. package/dist/utils/api-fallback.js.map +1 -0
  440. package/dist/utils/attribute-mapping/attribute-mappers.d.ts +39 -0
  441. package/dist/utils/attribute-mapping/attribute-mappers.d.ts.map +1 -0
  442. package/dist/utils/attribute-mapping/attribute-mappers.js +394 -0
  443. package/dist/utils/attribute-mapping/attribute-mappers.js.map +1 -0
  444. package/dist/utils/attribute-mapping/filter-translator.d.ts +9 -0
  445. package/dist/utils/attribute-mapping/filter-translator.d.ts.map +1 -0
  446. package/dist/utils/attribute-mapping/filter-translator.js +104 -0
  447. package/dist/utils/attribute-mapping/filter-translator.js.map +1 -0
  448. package/dist/utils/attribute-mapping/index.d.ts +10 -0
  449. package/dist/utils/attribute-mapping/index.d.ts.map +1 -0
  450. package/dist/utils/attribute-mapping/index.js +12 -0
  451. package/dist/utils/attribute-mapping/index.js.map +1 -0
  452. package/dist/utils/attribute-mapping/legacy-maps.d.ts +11 -0
  453. package/dist/utils/attribute-mapping/legacy-maps.d.ts.map +1 -0
  454. package/dist/utils/attribute-mapping/legacy-maps.js +54 -0
  455. package/dist/utils/attribute-mapping/legacy-maps.js.map +1 -0
  456. package/dist/utils/attribute-mapping/mapping-utils.d.ts +90 -0
  457. package/dist/utils/attribute-mapping/mapping-utils.d.ts.map +1 -0
  458. package/dist/utils/attribute-mapping/mapping-utils.js +145 -0
  459. package/dist/utils/attribute-mapping/mapping-utils.js.map +1 -0
  460. package/dist/utils/auto-discovery.d.ts +22 -0
  461. package/dist/utils/auto-discovery.d.ts.map +1 -0
  462. package/dist/utils/auto-discovery.js +143 -0
  463. package/dist/utils/auto-discovery.js.map +1 -0
  464. package/dist/utils/cli-colors.d.ts +36 -0
  465. package/dist/utils/cli-colors.d.ts.map +1 -0
  466. package/dist/utils/cli-colors.js +35 -0
  467. package/dist/utils/cli-colors.js.map +1 -0
  468. package/dist/utils/config-loader.d.ts +41 -0
  469. package/dist/utils/config-loader.d.ts.map +1 -0
  470. package/dist/utils/config-loader.js +167 -0
  471. package/dist/utils/config-loader.js.map +1 -0
  472. package/dist/utils/config-migration.d.ts +140 -0
  473. package/dist/utils/config-migration.d.ts.map +1 -0
  474. package/dist/utils/config-migration.js +310 -0
  475. package/dist/utils/config-migration.js.map +1 -0
  476. package/dist/utils/date-utils.d.ts +63 -0
  477. package/dist/utils/date-utils.d.ts.map +1 -0
  478. package/dist/utils/date-utils.js +329 -0
  479. package/dist/utils/date-utils.js.map +1 -0
  480. package/dist/utils/debug-b2b-segment.d.ts +2 -0
  481. package/dist/utils/debug-b2b-segment.d.ts.map +1 -0
  482. package/dist/utils/debug-b2b-segment.js +67 -0
  483. package/dist/utils/debug-b2b-segment.js.map +1 -0
  484. package/dist/utils/domain-utils.d.ts +46 -0
  485. package/dist/utils/domain-utils.d.ts.map +1 -0
  486. package/dist/utils/domain-utils.js +143 -0
  487. package/dist/utils/domain-utils.js.map +1 -0
  488. package/dist/utils/dynamic-import.d.ts +33 -0
  489. package/dist/utils/dynamic-import.d.ts.map +1 -0
  490. package/dist/utils/dynamic-import.js +41 -0
  491. package/dist/utils/dynamic-import.js.map +1 -0
  492. package/dist/utils/error-enhancer.d.ts +23 -0
  493. package/dist/utils/error-enhancer.d.ts.map +1 -0
  494. package/dist/utils/error-enhancer.js +188 -0
  495. package/dist/utils/error-enhancer.js.map +1 -0
  496. package/dist/utils/error-handler.d.ts +89 -0
  497. package/dist/utils/error-handler.d.ts.map +1 -0
  498. package/dist/utils/error-handler.js +336 -0
  499. package/dist/utils/error-handler.js.map +1 -0
  500. package/dist/utils/filters/builders/activity.d.ts +13 -0
  501. package/dist/utils/filters/builders/activity.d.ts.map +1 -0
  502. package/dist/utils/filters/builders/activity.js +65 -0
  503. package/dist/utils/filters/builders/activity.js.map +1 -0
  504. package/dist/utils/filters/builders/basic.d.ts +13 -0
  505. package/dist/utils/filters/builders/basic.d.ts.map +1 -0
  506. package/dist/utils/filters/builders/basic.js +36 -0
  507. package/dist/utils/filters/builders/basic.js.map +1 -0
  508. package/dist/utils/filters/builders/complex.d.ts +31 -0
  509. package/dist/utils/filters/builders/complex.d.ts.map +1 -0
  510. package/dist/utils/filters/builders/complex.js +92 -0
  511. package/dist/utils/filters/builders/complex.js.map +1 -0
  512. package/dist/utils/filters/builders/date.d.ts +17 -0
  513. package/dist/utils/filters/builders/date.d.ts.map +1 -0
  514. package/dist/utils/filters/builders/date.js +51 -0
  515. package/dist/utils/filters/builders/date.js.map +1 -0
  516. package/dist/utils/filters/builders/index.d.ts +8 -0
  517. package/dist/utils/filters/builders/index.d.ts.map +1 -0
  518. package/dist/utils/filters/builders/index.js +8 -0
  519. package/dist/utils/filters/builders/index.js.map +1 -0
  520. package/dist/utils/filters/builders/numeric.d.ts +17 -0
  521. package/dist/utils/filters/builders/numeric.d.ts.map +1 -0
  522. package/dist/utils/filters/builders/numeric.js +61 -0
  523. package/dist/utils/filters/builders/numeric.js.map +1 -0
  524. package/dist/utils/filters/builders/text.d.ts +17 -0
  525. package/dist/utils/filters/builders/text.d.ts.map +1 -0
  526. package/dist/utils/filters/builders/text.js +47 -0
  527. package/dist/utils/filters/builders/text.js.map +1 -0
  528. package/dist/utils/filters/builders/types.d.ts +2 -0
  529. package/dist/utils/filters/builders/types.d.ts.map +1 -0
  530. package/dist/utils/filters/builders/types.js +2 -0
  531. package/dist/utils/filters/builders/types.js.map +1 -0
  532. package/dist/utils/filters/builders.d.ts +2 -0
  533. package/dist/utils/filters/builders.d.ts.map +1 -0
  534. package/dist/utils/filters/builders.js +2 -0
  535. package/dist/utils/filters/builders.js.map +1 -0
  536. package/dist/utils/filters/cache.d.ts +80 -0
  537. package/dist/utils/filters/cache.d.ts.map +1 -0
  538. package/dist/utils/filters/cache.js +212 -0
  539. package/dist/utils/filters/cache.js.map +1 -0
  540. package/dist/utils/filters/index.d.ts +51 -0
  541. package/dist/utils/filters/index.d.ts.map +1 -0
  542. package/dist/utils/filters/index.js +67 -0
  543. package/dist/utils/filters/index.js.map +1 -0
  544. package/dist/utils/filters/operators.d.ts +65 -0
  545. package/dist/utils/filters/operators.d.ts.map +1 -0
  546. package/dist/utils/filters/operators.js +214 -0
  547. package/dist/utils/filters/operators.js.map +1 -0
  548. package/dist/utils/filters/relationship.d.ts +81 -0
  549. package/dist/utils/filters/relationship.d.ts.map +1 -0
  550. package/dist/utils/filters/relationship.js +393 -0
  551. package/dist/utils/filters/relationship.js.map +1 -0
  552. package/dist/utils/filters/translators.d.ts +120 -0
  553. package/dist/utils/filters/translators.d.ts.map +1 -0
  554. package/dist/utils/filters/translators.js +397 -0
  555. package/dist/utils/filters/translators.js.map +1 -0
  556. package/dist/utils/filters/types.d.ts +77 -0
  557. package/dist/utils/filters/types.d.ts.map +1 -0
  558. package/dist/utils/filters/types.js +85 -0
  559. package/dist/utils/filters/types.js.map +1 -0
  560. package/dist/utils/filters/utils.d.ts +86 -0
  561. package/dist/utils/filters/utils.d.ts.map +1 -0
  562. package/dist/utils/filters/utils.js +142 -0
  563. package/dist/utils/filters/utils.js.map +1 -0
  564. package/dist/utils/filters/validation-utils.d.ts +123 -0
  565. package/dist/utils/filters/validation-utils.d.ts.map +1 -0
  566. package/dist/utils/filters/validation-utils.js +282 -0
  567. package/dist/utils/filters/validation-utils.js.map +1 -0
  568. package/dist/utils/filters/validators.d.ts +73 -0
  569. package/dist/utils/filters/validators.d.ts.map +1 -0
  570. package/dist/utils/filters/validators.js +311 -0
  571. package/dist/utils/filters/validators.js.map +1 -0
  572. package/dist/utils/json-serializer.d.ts +68 -0
  573. package/dist/utils/json-serializer.d.ts.map +1 -0
  574. package/dist/utils/json-serializer.js +235 -0
  575. package/dist/utils/json-serializer.js.map +1 -0
  576. package/dist/utils/logger.d.ts +226 -0
  577. package/dist/utils/logger.d.ts.map +1 -0
  578. package/dist/utils/logger.js +323 -0
  579. package/dist/utils/logger.js.map +1 -0
  580. package/dist/utils/numeric-utils.d.ts +27 -0
  581. package/dist/utils/numeric-utils.d.ts.map +1 -0
  582. package/dist/utils/numeric-utils.js +83 -0
  583. package/dist/utils/numeric-utils.js.map +1 -0
  584. package/dist/utils/pagination.d.ts +85 -0
  585. package/dist/utils/pagination.d.ts.map +1 -0
  586. package/dist/utils/pagination.js +169 -0
  587. package/dist/utils/pagination.js.map +1 -0
  588. package/dist/utils/person-lookup.d.ts +35 -0
  589. package/dist/utils/person-lookup.d.ts.map +1 -0
  590. package/dist/utils/person-lookup.js +67 -0
  591. package/dist/utils/person-lookup.js.map +1 -0
  592. package/dist/utils/rate-limiter.d.ts +82 -0
  593. package/dist/utils/rate-limiter.d.ts.map +1 -0
  594. package/dist/utils/rate-limiter.js +159 -0
  595. package/dist/utils/rate-limiter.js.map +1 -0
  596. package/dist/utils/record-utils.d.ts +74 -0
  597. package/dist/utils/record-utils.d.ts.map +1 -0
  598. package/dist/utils/record-utils.js +312 -0
  599. package/dist/utils/record-utils.js.map +1 -0
  600. package/dist/utils/relationship-utils.d.ts +61 -0
  601. package/dist/utils/relationship-utils.d.ts.map +1 -0
  602. package/dist/utils/relationship-utils.js +242 -0
  603. package/dist/utils/relationship-utils.js.map +1 -0
  604. package/dist/utils/response-formatter.d.ts +121 -0
  605. package/dist/utils/response-formatter.d.ts.map +1 -0
  606. package/dist/utils/response-formatter.js +188 -0
  607. package/dist/utils/response-formatter.js.map +1 -0
  608. package/dist/utils/uri-parser.d.ts +18 -0
  609. package/dist/utils/uri-parser.d.ts.map +1 -0
  610. package/dist/utils/uri-parser.js +31 -0
  611. package/dist/utils/uri-parser.js.map +1 -0
  612. package/dist/utils/validation.d.ts +59 -0
  613. package/dist/utils/validation.d.ts.map +1 -0
  614. package/dist/utils/validation.js +264 -0
  615. package/dist/utils/validation.js.map +1 -0
  616. package/dist/utils/value-matcher.d.ts +58 -0
  617. package/dist/utils/value-matcher.d.ts.map +1 -0
  618. package/dist/utils/value-matcher.js +131 -0
  619. package/dist/utils/value-matcher.js.map +1 -0
  620. package/dist/validators/attribute-validator.d.ts +59 -0
  621. package/dist/validators/attribute-validator.d.ts.map +1 -0
  622. package/dist/validators/attribute-validator.js +531 -0
  623. package/dist/validators/attribute-validator.js.map +1 -0
  624. package/dist/validators/company/field_detector.d.ts +5 -0
  625. package/dist/validators/company/field_detector.d.ts.map +1 -0
  626. package/dist/validators/company/field_detector.js +95 -0
  627. package/dist/validators/company/field_detector.js.map +1 -0
  628. package/dist/validators/company/index.d.ts +26 -0
  629. package/dist/validators/company/index.d.ts.map +1 -0
  630. package/dist/validators/company/index.js +433 -0
  631. package/dist/validators/company/index.js.map +1 -0
  632. package/dist/validators/company/type_cache.d.ts +14 -0
  633. package/dist/validators/company/type_cache.d.ts.map +1 -0
  634. package/dist/validators/company/type_cache.js +28 -0
  635. package/dist/validators/company/type_cache.js.map +1 -0
  636. package/dist/validators/company/types.d.ts +8 -0
  637. package/dist/validators/company/types.d.ts.map +1 -0
  638. package/dist/validators/company/types.js +2 -0
  639. package/dist/validators/company/types.js.map +1 -0
  640. package/dist/validators/company-validator.d.ts +2 -0
  641. package/dist/validators/company-validator.d.ts.map +1 -0
  642. package/dist/validators/company-validator.js +2 -0
  643. package/dist/validators/company-validator.js.map +1 -0
  644. package/package.json +167 -0
@@ -0,0 +1,17 @@
1
+ /**
2
+ * People module - Central export point
3
+ * Maintains backward compatibility while organizing people operations into focused modules
4
+ */
5
+ // Export all types
6
+ export * from './types.js';
7
+ // Export basic CRUD operations
8
+ export { createPerson, updatePerson, updatePersonAttribute, deletePerson, getPersonDetails, listPeople, } from './basic.js';
9
+ // Export search functionality
10
+ export { searchPeople, searchPeopleByQuery, searchPeopleByEmail, searchPeopleByPhone, getPersonByEmail, advancedSearchPeople, searchPeopleByCreationDate, searchPeopleByModificationDate, searchPeopleByLastInteraction, searchPeopleByActivity, } from './search.js';
11
+ // Export relationship queries
12
+ export { searchPeopleByCompany, searchPeopleByCompanyList, searchPeopleByNotes, } from './relationships.js';
13
+ // Export batch operations
14
+ export { batchSearchPeople, batchGetPeopleDetails } from './batch.js';
15
+ // Export note operations
16
+ export { getPersonNotes, createPersonNote } from './notes.js';
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/objects/people/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mBAAmB;AACnB,cAAc,YAAY,CAAC;AAE3B,+BAA+B;AAC/B,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,UAAU,GACX,MAAM,YAAY,CAAC;AAEpB,8BAA8B;AAC9B,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,EAC7B,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAErB,8BAA8B;AAC9B,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,0BAA0B;AAC1B,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEtE,yBAAyB;AACzB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { AttioNote } from '../../types/attio.js';
2
+ /**
3
+ * Gets notes for a specific person
4
+ *
5
+ * @param personId - ID of the person
6
+ * @param limit - Maximum number of notes to return (default: 10)
7
+ * @param offset - Offset for pagination (default: 0)
8
+ * @returns Array of notes
9
+ */
10
+ export declare function getPersonNotes(personId: string, limit?: number, offset?: number): Promise<AttioNote[]>;
11
+ /**
12
+ * Creates a note for a person
13
+ *
14
+ * @param personId - ID of the person
15
+ * @param title - Title of the note
16
+ * @param content - Content of the note
17
+ * @returns Created note
18
+ */
19
+ export declare function createPersonNote(personId: string, title: string, content: string): Promise<AttioNote>;
20
+ //# sourceMappingURL=notes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../../src/objects/people/notes.ts"],"names":[],"mappings":"AAOA,OAAO,EAAgB,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAI/D;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,MAAW,EAClB,MAAM,GAAE,MAAU,GACjB,OAAO,CAAC,SAAS,EAAE,CAAC,CAgBtB;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,SAAS,CAAC,CA6BpB"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Note operations for People
3
+ */
4
+ import { getObjectNotes, createObjectNote, } from '../../api/operations/index.js';
5
+ import { ResourceType } from '../../types/attio.js';
6
+ import { FilterValidationError } from '../../errors/api-errors.js';
7
+ import { isValidId } from '../../utils/validation.js';
8
+ /**
9
+ * Gets notes for a specific person
10
+ *
11
+ * @param personId - ID of the person
12
+ * @param limit - Maximum number of notes to return (default: 10)
13
+ * @param offset - Offset for pagination (default: 0)
14
+ * @returns Array of notes
15
+ */
16
+ export async function getPersonNotes(personId, limit = 10, offset = 0) {
17
+ try {
18
+ if (!isValidId(personId)) {
19
+ throw new FilterValidationError(`Invalid person ID: ${personId}`);
20
+ }
21
+ return await getObjectNotes(ResourceType.PEOPLE, personId, limit, offset);
22
+ }
23
+ catch (error) {
24
+ const errorMessage = error instanceof Error ? error.message : String(error);
25
+ if (errorMessage.includes('validation')) {
26
+ throw new FilterValidationError(`Note retrieval validation failed: ${errorMessage}`);
27
+ }
28
+ throw new Error(`Failed to get person notes: ${errorMessage}`);
29
+ }
30
+ }
31
+ /**
32
+ * Creates a note for a person
33
+ *
34
+ * @param personId - ID of the person
35
+ * @param title - Title of the note
36
+ * @param content - Content of the note
37
+ * @returns Created note
38
+ */
39
+ export async function createPersonNote(personId, title, content) {
40
+ try {
41
+ if (!isValidId(personId)) {
42
+ throw new FilterValidationError(`Invalid person ID: ${personId}`);
43
+ }
44
+ if (!title || title.trim().length === 0) {
45
+ throw new FilterValidationError('Note title cannot be empty');
46
+ }
47
+ if (!content || content.trim().length === 0) {
48
+ throw new FilterValidationError('Note content cannot be empty');
49
+ }
50
+ return await createObjectNote(ResourceType.PEOPLE, personId, title, content);
51
+ }
52
+ catch (error) {
53
+ const errorMessage = error instanceof Error ? error.message : String(error);
54
+ if (errorMessage.includes('validation')) {
55
+ throw new FilterValidationError(`Note creation validation failed: ${errorMessage}`);
56
+ }
57
+ throw new Error(`Failed to create person note: ${errorMessage}`);
58
+ }
59
+ }
60
+ //# sourceMappingURL=notes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notes.js","sourceRoot":"","sources":["../../../src/objects/people/notes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,cAAc,EACd,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,YAAY,EAAa,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cA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C;QAClE,CAAC;QAED,OAAO,MAAM,gBAAgB,CAC3B,YAAY,CAAC,MAAM,EACnB,QAAQ,EACR,KAAK,EACL,OAAO,CACR,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,IAAI,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,qBAAqB,CAC7B,oCAAoC,YAAY,EAAE,CACnD,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,iCAAiC,YAAY,EAAE,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { Person } from '../../types/attio.js';
2
+ /**
3
+ * Searches for people associated with a specific company
4
+ *
5
+ * @param companyId - ID of the company to search for
6
+ * @returns Array of people associated with the company
7
+ */
8
+ export declare function searchPeopleByCompany(companyId: string): Promise<Person[]>;
9
+ /**
10
+ * Searches for people in specific company lists
11
+ *
12
+ * @param listIds - Array of list IDs to search within
13
+ * @returns Array of people in the specified lists
14
+ */
15
+ export declare function searchPeopleByCompanyList(listIds: string[]): Promise<Person[]>;
16
+ /**
17
+ * Searches for people with notes containing specific text
18
+ *
19
+ * @param searchText - Text to search for in notes
20
+ * @returns Array of people with matching notes
21
+ */
22
+ export declare function searchPeopleByNotes(searchText: string): Promise<Person[]>;
23
+ //# sourceMappingURL=relationships.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../../src/objects/people/relationships.ts"],"names":[],"mappings":"AAQA,OAAO,EAAgB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAQ5D;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,EAAE,CAAC,CAoCnB;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,MAAM,EAAE,CAAC,CAiDnB;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,EAAE,CAAC,CAsBnB"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Relationship queries for People
3
+ */
4
+ import { getAttioClient } from '../../api/attio-client.js';
5
+ import { advancedSearchObject, } from '../../api/operations/index.js';
6
+ import { ResourceType } from '../../types/attio.js';
7
+ import { isValidId, isValidListId } from '../../utils/validation.js';
8
+ import { createPeopleByCompanyListFilter, createRecordsByNotesFilter, } from '../../utils/relationship-utils.js';
9
+ import { FilterValidationError } from '../../errors/api-errors.js';
10
+ /**
11
+ * Searches for people associated with a specific company
12
+ *
13
+ * @param companyId - ID of the company to search for
14
+ * @returns Array of people associated with the company
15
+ */
16
+ export async function searchPeopleByCompany(companyId) {
17
+ try {
18
+ if (!isValidId(companyId)) {
19
+ throw new FilterValidationError(`Invalid company ID: ${companyId}`);
20
+ }
21
+ // Use direct API call with correct Attio filter structure for record references
22
+ // Attio expects company.target_record_id.$eq format for filtering people by company
23
+ const api = getAttioClient();
24
+ const filter = {
25
+ company: {
26
+ target_record_id: {
27
+ $eq: companyId,
28
+ },
29
+ },
30
+ };
31
+ const response = await api.post('/objects/people/records/query', {
32
+ filter,
33
+ limit: 50,
34
+ });
35
+ return response.data.data || [];
36
+ }
37
+ catch (error) {
38
+ const errorMessage = error instanceof Error ? error.message : String(error);
39
+ if (errorMessage.includes('validation')) {
40
+ throw new FilterValidationError(`Company relationship validation failed: ${errorMessage}`);
41
+ }
42
+ throw new Error(`Failed to search people by company: ${errorMessage}`);
43
+ }
44
+ }
45
+ /**
46
+ * Searches for people in specific company lists
47
+ *
48
+ * @param listIds - Array of list IDs to search within
49
+ * @returns Array of people in the specified lists
50
+ */
51
+ export async function searchPeopleByCompanyList(listIds) {
52
+ try {
53
+ if (!Array.isArray(listIds) || listIds.length === 0) {
54
+ throw new FilterValidationError('Must provide at least one list ID');
55
+ }
56
+ // Validate list IDs
57
+ for (const listId of listIds) {
58
+ if (!isValidListId(listId)) {
59
+ throw new FilterValidationError(`Invalid list ID '${listId}'`);
60
+ }
61
+ }
62
+ // Handle multiple lists by combining filters
63
+ let filters;
64
+ if (listIds.length === 1) {
65
+ filters = createPeopleByCompanyListFilter(listIds[0]);
66
+ }
67
+ else {
68
+ // Create OR filter for multiple lists
69
+ const listFilters = listIds.map((listId) => createPeopleByCompanyListFilter(listId));
70
+ filters = {
71
+ filters: [],
72
+ matchAny: true,
73
+ ...listFilters[0],
74
+ };
75
+ // Merge all filters
76
+ for (const filter of listFilters) {
77
+ if (filter.filters) {
78
+ filters.filters.push(...filter.filters);
79
+ }
80
+ }
81
+ }
82
+ const response = await advancedSearchObject(ResourceType.PEOPLE, filters);
83
+ return response;
84
+ }
85
+ catch (error) {
86
+ const errorMessage = error instanceof Error ? error.message : String(error);
87
+ if (errorMessage.includes('validation')) {
88
+ throw new FilterValidationError(`List relationship validation failed: ${errorMessage}`);
89
+ }
90
+ throw new Error(`Failed to search people by company list: ${errorMessage}`);
91
+ }
92
+ }
93
+ /**
94
+ * Searches for people with notes containing specific text
95
+ *
96
+ * @param searchText - Text to search for in notes
97
+ * @returns Array of people with matching notes
98
+ */
99
+ export async function searchPeopleByNotes(searchText) {
100
+ try {
101
+ if (!searchText || searchText.trim().length === 0) {
102
+ throw new FilterValidationError('Search text cannot be empty');
103
+ }
104
+ const filters = createRecordsByNotesFilter(ResourceType.PEOPLE, searchText);
105
+ const response = await advancedSearchObject(ResourceType.PEOPLE, filters);
106
+ return response;
107
+ }
108
+ catch (error) {
109
+ const errorMessage = error instanceof Error ? error.message : String(error);
110
+ if (errorMessage.includes('validation')) {
111
+ throw new FilterValidationError(`Notes search validation failed: ${errorMessage}`);
112
+ }
113
+ throw new Error(`Failed to search people by notes: ${errorMessage}`);
114
+ }
115
+ }
116
+ //# sourceMappingURL=relationships.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationships.js","sourceRoot":"","sources":["../../../src/objects/people/relationships.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACL,oBAAoB,GAErB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,YAAY,EAAU,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,SAAiB;IAEjB,IAAI,CAAC;QACH,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,qBAAqB,CAAC,uBAAuB,SAAS,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,gFAAgF;QAChF,oFAAoF;QACpF,MAAM,GAAG,GAAG,cAAc,EAAE,CAAC;QAE7B,MAAM,MAAM,GAAG;YACb,OAAO,EAAE;gBACP,gBAAgB,EAAE;oBAChB,GAAG,EAAE,SAAS;iBACf;aACF;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,IAAI,CAC7B,+BAA+B,EAC/B;YACE,MAAM;YACN,KAAK,EAAE,EAAE;SACV,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IAClC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,C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QAC5E,IAAI,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,qBAAqB,CAC7B,mCAAmC,YAAY,EAAE,CAClD,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,qCAAqC,YAAY,EAAE,CAAC,CAAC;IACvE,CAAC;AACH,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { ListEntryFilters } from '../../api/operations/index.js';
2
+ import { Person, DateRange, InteractionType, ActivityFilter } from '../../types/attio.js';
3
+ import { PaginatedResponse } from '../../utils/pagination.js';
4
+ /**
5
+ * Searches for people by name, email, or phone number
6
+ *
7
+ * @param query - Search query string
8
+ * @returns Array of person results
9
+ */
10
+ export declare function searchPeople(query: string): Promise<Person[]>;
11
+ /**
12
+ * Searches for people using query (alias for searchPeople)
13
+ *
14
+ * @param query - Search query string
15
+ * @returns Array of person results
16
+ */
17
+ export declare function searchPeopleByQuery(query: string): Promise<Person[]>;
18
+ /**
19
+ * Searches for people by email address
20
+ *
21
+ * @param email - Email address to search for
22
+ * @returns Array of person results
23
+ */
24
+ export declare function searchPeopleByEmail(email: string): Promise<Person[]>;
25
+ /**
26
+ * Searches for people by phone number
27
+ *
28
+ * @param phone - Phone number to search for
29
+ * @returns Array of person results
30
+ */
31
+ export declare function searchPeopleByPhone(phone: string): Promise<Person[]>;
32
+ /**
33
+ * getPersonByEmail (alias for searchPeopleByEmail)
34
+ *
35
+ * @param email - Email address to search for
36
+ * @returns Array of person results
37
+ */
38
+ export declare function getPersonByEmail(email: string): Promise<Person[]>;
39
+ /**
40
+ * Searches people using advanced filter criteria
41
+ *
42
+ * @param filters - Filter criteria including attribute filters, date ranges, etc.
43
+ * @param options - Optional search configuration including pagination
44
+ * @returns Array of person results
45
+ */
46
+ export declare function advancedSearchPeople(filters: ListEntryFilters, options?: {
47
+ limit?: number;
48
+ offset?: number;
49
+ sorts?: {
50
+ attribute: string;
51
+ direction: 'asc' | 'desc';
52
+ }[];
53
+ }): Promise<PaginatedResponse<Person>>;
54
+ /**
55
+ * Searches for people created within a date range
56
+ *
57
+ * @param dateRange - Date range for creation date
58
+ * @returns Array of people created within the specified range
59
+ */
60
+ export declare function searchPeopleByCreationDate(dateRange: DateRange): Promise<Person[]>;
61
+ /**
62
+ * Searches for people modified within a date range
63
+ *
64
+ * @param dateRange - Date range for modification date
65
+ * @returns Array of people modified within the specified range
66
+ */
67
+ export declare function searchPeopleByModificationDate(dateRange: DateRange): Promise<Person[]>;
68
+ /**
69
+ * Searches for people by last interaction date
70
+ *
71
+ * @param dateRange - Date range for last interaction
72
+ * @param interactionType - Optional type of interaction to filter by
73
+ * @returns Array of people with interactions in the specified range
74
+ */
75
+ export declare function searchPeopleByLastInteraction(dateRange: DateRange, interactionType?: InteractionType): Promise<Person[]>;
76
+ /**
77
+ * Searches for people by activity (meetings, emails, calls)
78
+ *
79
+ * @param activityFilter - Activity type and optional date range
80
+ * @returns Array of people with the specified activity
81
+ */
82
+ export declare function searchPeopleByActivity(activityFilter: ActivityFilter): Promise<Person[]>;
83
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/objects/people/search.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,MAAM,EACN,SAAS,EACT,eAAe,EACf,cAAc,EACf,MAAM,sBAAsB,CAAC;AAa9B,OAAO,EACL,iBAAiB,EAElB,MAAM,2BAA2B,CAAC;AAEnC;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAoCnE;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAqB1E;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAsB1E;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAY1E;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAEvE;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE;IACR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAA;KAAE,EAAE,CAAC;CAC5D,GACA,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CA2DpC;AAED;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,MAAM,EAAE,CAAC,CAcnB;AAED;;;;;GAKG;AACH,wBAAsB,8BAA8B,CAClD,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,MAAM,EAAE,CAAC,CAcnB;AAED;;;;;;GAMG;AACH,wBAAsB,6BAA6B,CACjD,SAAS,EAAE,SAAS,EACpB,eAAe,CAAC,EAAE,eAAe,GAChC,OAAO,CAAC,MAAM,EAAE,CAAC,CA4BnB;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,MAAM,EAAE,CAAC,CA0BnB"}
@@ -0,0 +1,286 @@
1
+ /**
2
+ * Search functionality for People
3
+ */
4
+ import { getAttioClient } from '../../api/attio-client.js';
5
+ import { searchObject, advancedSearchObject, } from '../../api/operations/index.js';
6
+ import { ResourceType, } from '../../types/attio.js';
7
+ import { createCreatedDateFilter, createModifiedDateFilter, createLastInteractionFilter, createActivityFilter, } from '../../utils/filters/index.js';
8
+ import { FilterValidationError } from '../../errors/api-errors.js';
9
+ import { validateDateRange, validateActivityFilter, validateNumericParam, } from '../../utils/filters/index.js';
10
+ import { createPaginatedResponse, } from '../../utils/pagination.js';
11
+ /**
12
+ * Searches for people by name, email, or phone number
13
+ *
14
+ * @param query - Search query string
15
+ * @returns Array of person results
16
+ */
17
+ export async function searchPeople(query) {
18
+ try {
19
+ if (!query || query.trim().length === 0) {
20
+ throw new FilterValidationError('Search query cannot be empty');
21
+ }
22
+ if (query.length > 1000) {
23
+ throw new FilterValidationError('Search query too long');
24
+ }
25
+ // Use the API directly to avoid the phone field issue
26
+ const api = getAttioClient();
27
+ const path = `/objects/people/records/query`;
28
+ // Search only by name and email, not phone
29
+ const filter = {
30
+ $or: [
31
+ { name: { $contains: query } },
32
+ { email_addresses: { $contains: query } },
33
+ ],
34
+ };
35
+ const response = await api.post(path, {
36
+ filter,
37
+ limit: 50,
38
+ });
39
+ return response.data.data || [];
40
+ }
41
+ catch (error) {
42
+ const errorMessage = error instanceof Error ? error.message : String(error);
43
+ if (errorMessage.includes('validation')) {
44
+ throw new FilterValidationError(`Search validation failed: ${errorMessage}`);
45
+ }
46
+ throw new Error(`Failed to search people: ${errorMessage}`);
47
+ }
48
+ }
49
+ /**
50
+ * Searches for people using query (alias for searchPeople)
51
+ *
52
+ * @param query - Search query string
53
+ * @returns Array of person results
54
+ */
55
+ export async function searchPeopleByQuery(query) {
56
+ try {
57
+ if (!query || query.trim().length === 0) {
58
+ throw new FilterValidationError('Search query cannot be empty');
59
+ }
60
+ if (query.length > 1000) {
61
+ throw new FilterValidationError('Search query too long');
62
+ }
63
+ const response = await searchObject(ResourceType.PEOPLE, query);
64
+ return response;
65
+ }
66
+ catch (error) {
67
+ const errorMessage = error instanceof Error ? error.message : String(error);
68
+ if (errorMessage.includes('validation')) {
69
+ throw new FilterValidationError(`Search validation failed: ${errorMessage}`);
70
+ }
71
+ throw new Error(`Failed to search people by query: ${errorMessage}`);
72
+ }
73
+ }
74
+ /**
75
+ * Searches for people by email address
76
+ *
77
+ * @param email - Email address to search for
78
+ * @returns Array of person results
79
+ */
80
+ export async function searchPeopleByEmail(email) {
81
+ try {
82
+ if (!email || email.trim().length === 0) {
83
+ throw new FilterValidationError('Email cannot be empty');
84
+ }
85
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
86
+ if (!emailRegex.test(email)) {
87
+ throw new FilterValidationError(`Invalid email format: ${email}`);
88
+ }
89
+ const response = await searchObject(ResourceType.PEOPLE, email);
90
+ return response;
91
+ }
92
+ catch (error) {
93
+ const errorMessage = error instanceof Error ? error.message : String(error);
94
+ if (errorMessage.includes('validation')) {
95
+ throw new FilterValidationError(`Email search validation failed: ${errorMessage}`);
96
+ }
97
+ throw new Error(`Failed to search people by email: ${errorMessage}`);
98
+ }
99
+ }
100
+ /**
101
+ * Searches for people by phone number
102
+ *
103
+ * @param phone - Phone number to search for
104
+ * @returns Array of person results
105
+ */
106
+ export async function searchPeopleByPhone(phone) {
107
+ try {
108
+ // Format the phone number for search
109
+ const cleanedPhone = phone.replace(/\D/g, '');
110
+ const response = await searchObject(ResourceType.PEOPLE, phone);
111
+ return response;
112
+ }
113
+ catch (error) {
114
+ const errorMessage = error instanceof Error ? error.message : String(error);
115
+ throw new Error(`Failed to search people by phone: ${errorMessage}`);
116
+ }
117
+ }
118
+ /**
119
+ * getPersonByEmail (alias for searchPeopleByEmail)
120
+ *
121
+ * @param email - Email address to search for
122
+ * @returns Array of person results
123
+ */
124
+ export async function getPersonByEmail(email) {
125
+ return searchPeopleByEmail(email);
126
+ }
127
+ /**
128
+ * Searches people using advanced filter criteria
129
+ *
130
+ * @param filters - Filter criteria including attribute filters, date ranges, etc.
131
+ * @param options - Optional search configuration including pagination
132
+ * @returns Array of person results
133
+ */
134
+ export async function advancedSearchPeople(filters, options) {
135
+ try {
136
+ // Validate pagination parameters
137
+ if (options?.limit) {
138
+ try {
139
+ const validatedLimit = validateNumericParam(options.limit, 'limit');
140
+ if (validatedLimit < 0 || validatedLimit > 500) {
141
+ throw new FilterValidationError('limit must be between 0 and 500');
142
+ }
143
+ }
144
+ catch (error) {
145
+ if (error instanceof FilterValidationError) {
146
+ throw error;
147
+ }
148
+ throw new FilterValidationError(`Invalid limit: ${error}`);
149
+ }
150
+ }
151
+ if (options?.offset) {
152
+ try {
153
+ const validatedOffset = validateNumericParam(options.offset, 'offset');
154
+ if (validatedOffset < 0) {
155
+ throw new FilterValidationError('offset cannot be negative');
156
+ }
157
+ }
158
+ catch (error) {
159
+ if (error instanceof FilterValidationError) {
160
+ throw error;
161
+ }
162
+ throw new FilterValidationError(`Invalid offset: ${error}`);
163
+ }
164
+ }
165
+ const searchParams = {
166
+ ...filters,
167
+ sorts: options?.sorts,
168
+ };
169
+ const response = await advancedSearchObject(ResourceType.PEOPLE, searchParams, options?.limit || 100, options?.offset || 0);
170
+ const offset = options?.offset || 0;
171
+ const limit = options?.limit || 100;
172
+ const page = Math.floor(offset / limit) + 1;
173
+ return createPaginatedResponse(response, response.length, page, limit);
174
+ }
175
+ catch (error) {
176
+ const errorMessage = error instanceof Error ? error.message : String(error);
177
+ if (errorMessage.includes('validation')) {
178
+ throw new FilterValidationError(`Advanced search validation failed: ${errorMessage}`);
179
+ }
180
+ throw new Error(`Failed to perform advanced people search: ${errorMessage}`);
181
+ }
182
+ }
183
+ /**
184
+ * Searches for people created within a date range
185
+ *
186
+ * @param dateRange - Date range for creation date
187
+ * @returns Array of people created within the specified range
188
+ */
189
+ export async function searchPeopleByCreationDate(dateRange) {
190
+ try {
191
+ validateDateRange(dateRange);
192
+ }
193
+ catch (error) {
194
+ if (error instanceof FilterValidationError) {
195
+ throw error;
196
+ }
197
+ throw new FilterValidationError(`Invalid date range: ${error}`);
198
+ }
199
+ const filters = createCreatedDateFilter(dateRange);
200
+ const response = await advancedSearchPeople(filters);
201
+ return response.results;
202
+ }
203
+ /**
204
+ * Searches for people modified within a date range
205
+ *
206
+ * @param dateRange - Date range for modification date
207
+ * @returns Array of people modified within the specified range
208
+ */
209
+ export async function searchPeopleByModificationDate(dateRange) {
210
+ try {
211
+ validateDateRange(dateRange);
212
+ }
213
+ catch (error) {
214
+ if (error instanceof FilterValidationError) {
215
+ throw error;
216
+ }
217
+ throw new FilterValidationError(`Invalid date range: ${error}`);
218
+ }
219
+ const filters = createModifiedDateFilter(dateRange);
220
+ const response = await advancedSearchPeople(filters);
221
+ return response.results;
222
+ }
223
+ /**
224
+ * Searches for people by last interaction date
225
+ *
226
+ * @param dateRange - Date range for last interaction
227
+ * @param interactionType - Optional type of interaction to filter by
228
+ * @returns Array of people with interactions in the specified range
229
+ */
230
+ export async function searchPeopleByLastInteraction(dateRange, interactionType) {
231
+ try {
232
+ try {
233
+ validateDateRange(dateRange);
234
+ }
235
+ catch (error) {
236
+ if (error instanceof FilterValidationError) {
237
+ throw error;
238
+ }
239
+ throw new FilterValidationError(`Invalid date range: ${error}`);
240
+ }
241
+ const filters = createLastInteractionFilter(dateRange, interactionType);
242
+ const response = await advancedSearchPeople(filters.filter, {
243
+ ...(filters.sorts && { sorts: filters.sorts }),
244
+ });
245
+ return response.results;
246
+ }
247
+ catch (error) {
248
+ const errorMessage = error instanceof Error ? error.message : String(error);
249
+ if (errorMessage.includes('validation')) {
250
+ throw new FilterValidationError(`Last interaction search validation failed: ${errorMessage}`);
251
+ }
252
+ throw new Error(`Failed to search people by last interaction: ${errorMessage}`);
253
+ }
254
+ }
255
+ /**
256
+ * Searches for people by activity (meetings, emails, calls)
257
+ *
258
+ * @param activityFilter - Activity type and optional date range
259
+ * @returns Array of people with the specified activity
260
+ */
261
+ export async function searchPeopleByActivity(activityFilter) {
262
+ try {
263
+ try {
264
+ validateActivityFilter(activityFilter);
265
+ }
266
+ catch (error) {
267
+ if (error instanceof FilterValidationError) {
268
+ throw error;
269
+ }
270
+ throw new FilterValidationError(`Invalid activity filter: ${error}`);
271
+ }
272
+ const filters = createActivityFilter(activityFilter);
273
+ const response = await advancedSearchPeople(filters.filter, {
274
+ ...(filters.sorts && { sorts: filters.sorts }),
275
+ });
276
+ return response.results;
277
+ }
278
+ catch (error) {
279
+ const errorMessage = error instanceof Error ? error.message : String(error);
280
+ if (errorMessage.includes('validation')) {
281
+ throw new FilterValidationError(`Activity search validation failed: ${errorMessage}`);
282
+ }
283
+ throw new Error(`Failed to search people by activity: ${errorMessage}`);
284
+ }
285
+ }
286
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/objects/people/search.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,oBAAoB,GAErB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,YAAY,GAKb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,KAAa;IAC9C,IAAI,CAAC;QACH,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,qBAAqB,CAAC,8BAA8B,CAAC,CAAC;QAClE,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,GAAG,IAAI,EAAE,CAAC;YACxB,MAAM,IAAI,qBAAqB,CAAC,uBAAuB,CAAC,CAAC;QAC3D,CAAC;QAED,sDAAsD;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