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,463 @@
1
+ /**
2
+ * Search functionality for companies
3
+ */
4
+ import { getAttioClient } from '../../api/attio-client.js';
5
+ import { searchObject, advancedSearchObject, } from '../../api/operations/index.js';
6
+ import { ResourceType, FilterConditionType, } from '../../types/attio.js';
7
+ import { FilterValidationError } from '../../errors/api-errors.js';
8
+ import { extractDomain, normalizeDomain, extractAllDomains, } from '../../utils/domain-utils.js';
9
+ /**
10
+ * Simple LRU cache for company search results
11
+ * Reduces API calls for frequently looked-up companies
12
+ */
13
+ class CompanySearchCache {
14
+ cache = new Map();
15
+ maxSize;
16
+ ttlMs;
17
+ constructor(maxSize = 100, ttlMs = 5 * 60 * 1000) {
18
+ // Default: 100 entries, 5 minutes TTL
19
+ this.maxSize = maxSize;
20
+ this.ttlMs = ttlMs;
21
+ }
22
+ isExpired(timestamp) {
23
+ return Date.now() - timestamp > this.ttlMs;
24
+ }
25
+ cleanup() {
26
+ const now = Date.now();
27
+ for (const [key, entry] of this.cache.entries()) {
28
+ if (this.isExpired(entry.timestamp)) {
29
+ this.cache.delete(key);
30
+ }
31
+ }
32
+ }
33
+ get(key) {
34
+ const entry = this.cache.get(key);
35
+ if (!entry || this.isExpired(entry.timestamp)) {
36
+ if (entry) {
37
+ this.cache.delete(key);
38
+ }
39
+ return null;
40
+ }
41
+ // Move to end (LRU behavior)
42
+ this.cache.delete(key);
43
+ this.cache.set(key, entry);
44
+ return entry.data;
45
+ }
46
+ set(key, data) {
47
+ // Remove oldest entries if at capacity
48
+ if (this.cache.size >= this.maxSize) {
49
+ const firstKey = this.cache.keys().next().value;
50
+ if (firstKey) {
51
+ this.cache.delete(firstKey);
52
+ }
53
+ }
54
+ this.cache.set(key, { data, timestamp: Date.now() });
55
+ // Periodic cleanup
56
+ if (Math.random() < 0.1) {
57
+ // 10% chance to trigger cleanup
58
+ this.cleanup();
59
+ }
60
+ }
61
+ clear() {
62
+ this.cache.clear();
63
+ }
64
+ size() {
65
+ return this.cache.size;
66
+ }
67
+ }
68
+ // Global cache instance
69
+ const companySearchCache = new CompanySearchCache();
70
+ /**
71
+ * Cache management functions for testing and administration
72
+ */
73
+ export const companyCache = {
74
+ clear: () => companySearchCache.clear(),
75
+ size: () => companySearchCache.size(),
76
+ };
77
+ /**
78
+ * Searches for companies with domain prioritization when available
79
+ *
80
+ * @param query - Search query string to match against company names or domains
81
+ * @param options - Optional search configuration
82
+ * @returns Array of matching company objects, prioritized by domain matches
83
+ * @example
84
+ * ```typescript
85
+ * const companies = await searchCompanies("acme.com");
86
+ * // Returns companies with domain "acme.com" first, then name matches
87
+ *
88
+ * const companies = await searchCompanies("acme");
89
+ * // Returns companies with names containing "acme"
90
+ *
91
+ * const companies = await searchCompanies("acme.com", { prioritizeDomains: false });
92
+ * // Disables domain prioritization, uses name-based search only
93
+ * ```
94
+ */
95
+ export async function searchCompanies(query, options = {}) {
96
+ // Early return for empty or whitespace-only queries
97
+ if (!query || !query.trim()) {
98
+ return [];
99
+ }
100
+ // Extract default options
101
+ const { prioritizeDomains = true, maxResults, debug = process.env.NODE_ENV === 'development' || process.env.DEBUG, } = options;
102
+ // Check if query contains domain indicators (only if prioritization is enabled)
103
+ const extractedDomain = prioritizeDomains ? extractDomain(query) : null;
104
+ // Debug logging for domain extraction
105
+ if (debug) {
106
+ if (extractedDomain) {
107
+ console.debug(`[searchCompanies] Extracted domain: "${extractedDomain}" from query: "${query}"`);
108
+ }
109
+ else if (prioritizeDomains) {
110
+ console.debug(`[searchCompanies] No domain detected in query: "${query}", using name-based search`);
111
+ }
112
+ else {
113
+ console.debug(`[searchCompanies] Domain prioritization disabled, using name-based search for: "${query}"`);
114
+ }
115
+ }
116
+ if (extractedDomain && prioritizeDomains) {
117
+ // Priority search by domain first
118
+ try {
119
+ const domainResults = await searchCompaniesByDomain(extractedDomain);
120
+ // If we found exact domain matches, return them first
121
+ if (domainResults.length > 0) {
122
+ // Also search by name to include potential additional matches
123
+ const nameResults = await searchCompaniesByName(query);
124
+ // Combine results, prioritizing domain matches
125
+ const combinedResults = [...domainResults];
126
+ // Add name-based results that aren't already included
127
+ for (const nameResult of nameResults) {
128
+ const isDuplicate = domainResults.some((domainResult) => domainResult.id?.record_id === nameResult.id?.record_id);
129
+ if (!isDuplicate) {
130
+ combinedResults.push(nameResult);
131
+ }
132
+ }
133
+ // Apply maxResults limit if specified
134
+ const finalResults = maxResults
135
+ ? combinedResults.slice(0, maxResults)
136
+ : combinedResults;
137
+ return finalResults;
138
+ }
139
+ }
140
+ catch (error) {
141
+ // If domain search fails, fall back to name search
142
+ console.warn(`Domain search failed for "${extractedDomain}", falling back to name search:`, error);
143
+ }
144
+ }
145
+ // Fallback to name-based search
146
+ const nameResults = await searchCompaniesByName(query);
147
+ // Apply maxResults limit if specified
148
+ return maxResults ? nameResults.slice(0, maxResults) : nameResults;
149
+ }
150
+ /**
151
+ * Searches for companies by domain/website
152
+ *
153
+ * @param domain - Domain to search for
154
+ * @returns Array of matching company objects
155
+ */
156
+ export async function searchCompaniesByDomain(domain) {
157
+ // Early return for empty domain
158
+ if (!domain || !domain.trim()) {
159
+ return [];
160
+ }
161
+ const normalizedDomain = normalizeDomain(domain);
162
+ // Debug logging for domain search
163
+ if (process.env.NODE_ENV === 'development' || process.env.DEBUG) {
164
+ console.debug(`[searchCompaniesByDomain] Searching for domain: "${normalizedDomain}" (original: "${domain}")`);
165
+ }
166
+ // Create filters for domain search - FIXED: Use 'domains' field instead of 'website'
167
+ const filters = {
168
+ filters: [
169
+ {
170
+ attribute: { slug: 'domains' },
171
+ condition: FilterConditionType.CONTAINS,
172
+ value: normalizedDomain,
173
+ },
174
+ ],
175
+ };
176
+ try {
177
+ return await advancedSearchCompanies(filters);
178
+ }
179
+ catch (error) {
180
+ // Fallback to direct API call - FIXED: Use 'domains' field instead of 'website'
181
+ const api = getAttioClient();
182
+ const path = '/objects/companies/records/query';
183
+ const response = await api.post(path, {
184
+ filter: {
185
+ domains: { $contains: normalizedDomain },
186
+ },
187
+ });
188
+ return response.data.data || [];
189
+ }
190
+ }
191
+ /**
192
+ * Searches for companies by name only
193
+ *
194
+ * @param query - Search query string to match against company names
195
+ * @returns Array of matching company objects
196
+ */
197
+ export async function searchCompaniesByName(query) {
198
+ // Early return for empty query
199
+ if (!query || !query.trim()) {
200
+ return [];
201
+ }
202
+ // Create cache key (normalize query for better cache hits)
203
+ const cacheKey = `name:${query.trim().toLowerCase()}`;
204
+ // Check cache first
205
+ const cachedResult = companySearchCache.get(cacheKey);
206
+ if (cachedResult) {
207
+ if (process.env.NODE_ENV === 'development' || process.env.DEBUG) {
208
+ console.debug(`[searchCompaniesByName] Cache hit for: "${query}" (${cachedResult.length} results)`);
209
+ }
210
+ return cachedResult;
211
+ }
212
+ // Debug logging for name search
213
+ if (process.env.NODE_ENV === 'development' || process.env.DEBUG) {
214
+ console.debug(`[searchCompaniesByName] Searching by name: "${query}"`);
215
+ }
216
+ // Use the unified operation if available, with fallback to direct implementation
217
+ let results;
218
+ try {
219
+ results = await searchObject(ResourceType.COMPANIES, query);
220
+ }
221
+ catch (error) {
222
+ // Fallback implementation
223
+ const api = getAttioClient();
224
+ const path = '/objects/companies/records/query';
225
+ const response = await api.post(path, {
226
+ filter: {
227
+ name: { $contains: query },
228
+ },
229
+ });
230
+ results = response.data.data || [];
231
+ }
232
+ // Cache the results
233
+ companySearchCache.set(cacheKey, results);
234
+ if (process.env.NODE_ENV === 'development' || process.env.DEBUG) {
235
+ console.debug(`[searchCompaniesByName] Cached ${results.length} results for: "${query}"`);
236
+ }
237
+ return results;
238
+ }
239
+ /**
240
+ * Performs advanced search with custom filters
241
+ *
242
+ * @param filters - List of filters to apply
243
+ * @param limit - Maximum number of results to return (default: 20)
244
+ * @param offset - Number of results to skip (default: 0)
245
+ * @returns Array of company results
246
+ * @throws Error if the search encounters any issues
247
+ * @example
248
+ * ```typescript
249
+ * // Search for companies with names containing "Tech"
250
+ * const filters = {
251
+ * filters: [
252
+ * {
253
+ * attribute: { slug: 'name' },
254
+ * condition: 'contains',
255
+ * value: 'Tech'
256
+ * }
257
+ * ]
258
+ * };
259
+ * const companies = await advancedSearchCompanies(filters);
260
+ *
261
+ * // Search with multiple conditions using OR logic
262
+ * const orFilters = {
263
+ * filters: [
264
+ * {
265
+ * attribute: { slug: 'name' },
266
+ * condition: 'contains',
267
+ * value: 'Tech'
268
+ * },
269
+ * {
270
+ * attribute: { slug: 'industry' },
271
+ * condition: 'equals',
272
+ * value: 'Software'
273
+ * }
274
+ * ],
275
+ * matchAny: true // Use OR logic between conditions
276
+ * };
277
+ *
278
+ * // Complex search with nested conditions
279
+ * const complexFilters = {
280
+ * filters: [
281
+ * // Company name condition
282
+ * {
283
+ * attribute: { slug: 'name' },
284
+ * condition: 'contains',
285
+ * value: 'Tech'
286
+ * },
287
+ * // Revenue condition - find companies with annual revenue > $10M
288
+ * {
289
+ * attribute: { slug: 'annual_revenue' },
290
+ * condition: 'greater_than',
291
+ * value: 10000000
292
+ * },
293
+ * // Industry condition
294
+ * {
295
+ * attribute: { slug: 'industry' },
296
+ * condition: 'equals',
297
+ * value: 'Software'
298
+ * }
299
+ * ]
300
+ * };
301
+ * ```
302
+ */
303
+ export async function advancedSearchCompanies(filters, limit, offset) {
304
+ try {
305
+ // Import validation utilities only when needed to avoid circular dependencies
306
+ // This is a dynamic import that won't affect the module dependency graph
307
+ const { validateFilters, ERROR_MESSAGES } = await import('../../utils/filters/validation-utils.js');
308
+ // Use standardized validation with consistent error messages
309
+ validateFilters(filters);
310
+ // Proceed with the search operation
311
+ return await advancedSearchObject(ResourceType.COMPANIES, filters, limit, offset);
312
+ }
313
+ catch (error) {
314
+ // For FilterValidationError, add more context specific to companies
315
+ if (error instanceof FilterValidationError) {
316
+ // Enhance with company-specific context but keep the original message and category
317
+ throw new FilterValidationError(`Advanced company search filter invalid: ${error.message}`, error.category);
318
+ }
319
+ // For other errors, provide clear context
320
+ if (error instanceof Error) {
321
+ // Log the error in development mode
322
+ if (process.env.NODE_ENV === 'development') {
323
+ console.error('[advancedSearchCompanies] Error details:', {
324
+ message: error.message,
325
+ stack: error.stack,
326
+ });
327
+ }
328
+ // Throw with enhanced context
329
+ throw new Error(`Error in advanced company search: ${error.message}`);
330
+ }
331
+ // If we reach here, it's an unexpected error
332
+ throw new Error(`Failed to search companies with advanced filters: ${String(error)}`);
333
+ }
334
+ }
335
+ /**
336
+ * Helper function to create filters for searching companies by name
337
+ *
338
+ * @param name - Name to search for
339
+ * @param condition - Condition type (default: CONTAINS)
340
+ * @returns ListEntryFilters object configured for name search
341
+ */
342
+ export function createNameFilter(name, condition = FilterConditionType.CONTAINS) {
343
+ return {
344
+ filters: [
345
+ {
346
+ attribute: { slug: 'name' },
347
+ condition: condition,
348
+ value: name,
349
+ },
350
+ ],
351
+ };
352
+ }
353
+ /**
354
+ * Helper function to create filters for searching companies by website
355
+ *
356
+ * @param website - Website to search for
357
+ * @param condition - Condition type (default: CONTAINS)
358
+ * @returns ListEntryFilters object configured for website search
359
+ */
360
+ export function createWebsiteFilter(website, condition = FilterConditionType.CONTAINS) {
361
+ return {
362
+ filters: [
363
+ {
364
+ attribute: { slug: 'website' },
365
+ condition: condition,
366
+ value: website,
367
+ },
368
+ ],
369
+ };
370
+ }
371
+ /**
372
+ * Helper function to create filters for searching companies by industry
373
+ *
374
+ * @param industry - Industry to search for
375
+ * @param condition - Condition type (default: CONTAINS)
376
+ * @returns ListEntryFilters object configured for industry search
377
+ */
378
+ export function createIndustryFilter(industry, condition = FilterConditionType.CONTAINS) {
379
+ return {
380
+ filters: [
381
+ {
382
+ attribute: { slug: 'industry' },
383
+ condition: condition,
384
+ value: industry,
385
+ },
386
+ ],
387
+ };
388
+ }
389
+ /**
390
+ * Helper function to create filters for searching companies by domain
391
+ *
392
+ * @param domain - Domain to search for
393
+ * @param condition - Condition type (default: CONTAINS)
394
+ * @returns ListEntryFilters object configured for domain search
395
+ */
396
+ export function createDomainFilter(domain, condition = FilterConditionType.CONTAINS) {
397
+ const normalizedDomain = normalizeDomain(domain);
398
+ return {
399
+ filters: [
400
+ {
401
+ attribute: { slug: 'domains' },
402
+ condition: condition,
403
+ value: normalizedDomain,
404
+ },
405
+ ],
406
+ };
407
+ }
408
+ /**
409
+ * Smart search that automatically determines search strategy based on query content
410
+ *
411
+ * @param query - Search query that may contain domain, email, URL, or company name
412
+ * @returns Array of matching company objects with domain matches prioritized
413
+ */
414
+ export async function smartSearchCompanies(query) {
415
+ // Early return for empty query
416
+ if (!query || !query.trim()) {
417
+ return [];
418
+ }
419
+ const domains = extractAllDomains(query);
420
+ // Debug logging for smart search
421
+ if (process.env.NODE_ENV === 'development' || process.env.DEBUG) {
422
+ console.debug(`[smartSearchCompanies] Smart search for: "${query}", extracted domains: [${domains.join(', ')}]`);
423
+ }
424
+ if (domains.length > 0) {
425
+ // Multi-domain search with prioritization
426
+ const allResults = [];
427
+ const seenIds = new Set();
428
+ // Search by each domain first
429
+ for (const domain of domains) {
430
+ try {
431
+ const domainResults = await searchCompaniesByDomain(domain);
432
+ for (const result of domainResults) {
433
+ const id = result.id?.record_id;
434
+ if (id && !seenIds.has(id)) {
435
+ seenIds.add(id);
436
+ allResults.push(result);
437
+ }
438
+ }
439
+ }
440
+ catch (error) {
441
+ console.warn(`Domain search failed for "${domain}":`, error);
442
+ }
443
+ }
444
+ // Add name-based results if we have room
445
+ try {
446
+ const nameResults = await searchCompaniesByName(query);
447
+ for (const result of nameResults) {
448
+ const id = result.id?.record_id;
449
+ if (id && !seenIds.has(id)) {
450
+ seenIds.add(id);
451
+ allResults.push(result);
452
+ }
453
+ }
454
+ }
455
+ catch (error) {
456
+ console.warn(`Name search failed for "${query}":`, error);
457
+ }
458
+ return allResults;
459
+ }
460
+ // No domains found, use regular name search
461
+ return await searchCompaniesByName(query);
462
+ }
463
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/objects/companies/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,EAEZ,mBAAm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,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;oBAC3B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBAChB,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC1B,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,2BAA2B,KAAK,IAAI,EAAE,KAAK,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,4CAA4C;IAC5C,OAAO,MAAM,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Shared types for company modules
3
+ */
4
+ export type { Company, AttioNote, FilterConditionType, RecordAttributes, } from '../../types/attio.js';
5
+ export type { CompanyCreateInput, CompanyUpdateInput, CompanyAttributeUpdate, } from '../../types/company-types.js';
6
+ export interface CompanyAttributes {
7
+ name?: string;
8
+ website?: string;
9
+ industry?: string;
10
+ domains?: string[];
11
+ description?: string;
12
+ type?: string;
13
+ type_persona?: string;
14
+ services?: string[];
15
+ categories?: string[];
16
+ estimated_arr_usd?: number;
17
+ funding_raised_usd?: number;
18
+ employee_range?: string;
19
+ foundation_date?: string;
20
+ primary_location?: string;
21
+ [key: string]: any;
22
+ }
23
+ export interface CompanyFieldUpdate {
24
+ name: string;
25
+ values: any[];
26
+ }
27
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/objects/companies/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EACV,OAAO,EACP,SAAS,EACT,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AAGtC,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,GAAG,EAAE,CAAC;CACf"}
@@ -0,0 +1,3 @@
1
+ export {};
2
+ // Re-export any company-specific types as needed
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/objects/companies/types.ts"],"names":[],"mappings":";AAwCA,iDAAiD"}
@@ -0,0 +1,148 @@
1
+ import { BatchConfig, BatchResponse, ListEntryFilters } from '../api/operations/index.js';
2
+ import { AttioList, AttioListEntry } from '../types/attio.js';
3
+ /**
4
+ * Represents a list membership entry for a record
5
+ */
6
+ export interface ListMembership {
7
+ listId: string;
8
+ listName: string;
9
+ entryId: string;
10
+ entryValues?: Record<string, any>;
11
+ }
12
+ /**
13
+ * Gets all lists in the workspace
14
+ *
15
+ * @param objectSlug - Optional object type to filter lists by (e.g., 'companies', 'people')
16
+ * @param limit - Maximum number of lists to fetch (default: 20)
17
+ * @returns Array of list objects
18
+ */
19
+ export declare function getLists(objectSlug?: string, limit?: number): Promise<AttioList[]>;
20
+ /**
21
+ * Gets details for a specific list
22
+ *
23
+ * @param listId - The ID of the list
24
+ * @returns List details
25
+ */
26
+ export declare function getListDetails(listId: string): Promise<AttioList>;
27
+ /**
28
+ * Gets entries for a specific list
29
+ *
30
+ * @param listId - The ID of the list
31
+ * @param limit - Maximum number of entries to fetch (default: 20)
32
+ * @param offset - Number of entries to skip (default: 0)
33
+ * @param filters - Optional filters to apply to the list entries
34
+ * @returns Array of list entries
35
+ */
36
+ export declare function getListEntries(listId: string, limit?: number, offset?: number, filters?: ListEntryFilters): Promise<AttioListEntry[]>;
37
+ /**
38
+ * Adds a record to a list
39
+ *
40
+ * @param listId - The ID of the list
41
+ * @param recordId - The ID of the record to add
42
+ * @param objectType - Optional object type ('companies', 'people', etc.)
43
+ * @param initialValues - Optional initial values for the list entry (e.g., stage)
44
+ * @returns The created list entry
45
+ */
46
+ export declare function addRecordToList(listId: string, recordId: string, objectType?: string, initialValues?: Record<string, any>): Promise<AttioListEntry>;
47
+ /**
48
+ * Updates a list entry (e.g., changing stage)
49
+ *
50
+ * @param listId - The ID of the list
51
+ * @param entryId - The ID of the list entry to update
52
+ * @param attributes - The attributes to update (e.g., { stage: "Demo Scheduling" })
53
+ * @returns The updated list entry
54
+ */
55
+ export declare function updateListEntry(listId: string, entryId: string, attributes: Record<string, any>): Promise<AttioListEntry>;
56
+ /**
57
+ * Removes a record from a list
58
+ *
59
+ * @param listId - The ID of the list
60
+ * @param entryId - The ID of the list entry to remove
61
+ * @returns True if successful
62
+ */
63
+ export declare function removeRecordFromList(listId: string, entryId: string): Promise<boolean>;
64
+ /**
65
+ * Gets details for multiple lists in batch
66
+ *
67
+ * @param listIds - Array of list IDs to fetch
68
+ * @param batchConfig - Optional batch configuration
69
+ * @returns Batch response with list details for each ID
70
+ */
71
+ export declare function batchGetListsDetails(listIds: string[], batchConfig?: Partial<BatchConfig>): Promise<BatchResponse<AttioList>>;
72
+ /**
73
+ * Gets entries for multiple lists in batch
74
+ *
75
+ * @param listConfigs - Array of list configurations with ID, limit, and offset
76
+ * @param batchConfig - Optional batch configuration
77
+ * @returns Batch response with list entries for each configuration
78
+ */
79
+ export declare function batchGetListsEntries(listConfigs: Array<{
80
+ listId: string;
81
+ limit?: number;
82
+ offset?: number;
83
+ }>, batchConfig?: Partial<BatchConfig>): Promise<BatchResponse<AttioListEntry[]>>;
84
+ /**
85
+ * Finds all lists that contain a specific record
86
+ *
87
+ * @param recordId - The ID of the record to find in lists
88
+ * @param objectType - Optional record type ('companies', 'people', etc.)
89
+ * @param includeEntryValues - Whether to include entry values in the result (default: false)
90
+ * @returns Array of list memberships
91
+ */
92
+ /**
93
+ * Finds all lists that contain a specific record
94
+ *
95
+ * @param recordId - The ID of the record to find in lists
96
+ * @param objectType - Optional record type ('companies', 'people', etc.)
97
+ * @param includeEntryValues - Whether to include entry values in the result (default: false)
98
+ * @param batchSize - Number of lists to process in parallel (default: 5)
99
+ * @returns Array of list memberships
100
+ *
101
+ * @example
102
+ * // Find all lists containing a company record
103
+ * const memberships = await getRecordListMemberships('company-123', 'companies');
104
+ *
105
+ * // Find all lists containing a person record with entry values
106
+ * const membershipsWithValues = await getRecordListMemberships('person-456', 'people', true);
107
+ */
108
+ export declare function getRecordListMemberships(recordId: string, objectType?: string, includeEntryValues?: boolean, batchSize?: number): Promise<ListMembership[]>;
109
+ /**
110
+ * Filters list entries based on parent record properties using path-based filtering
111
+ *
112
+ * This function allows filtering list entries based on properties of their parent records,
113
+ * such as company name, email domain, or any other attribute of the parent record.
114
+ *
115
+ * @param listId - The ID of the list to filter entries from
116
+ * @param parentObjectType - The type of parent record (e.g., 'companies', 'people')
117
+ * @param parentAttributeSlug - The attribute of the parent record to filter by
118
+ * @param condition - The filter condition to apply
119
+ * @param value - The value to filter by
120
+ * @param limit - Maximum number of entries to fetch (default: 20)
121
+ * @param offset - Number of entries to skip (default: 0)
122
+ * @returns Array of filtered list entries
123
+ *
124
+ * @example
125
+ * // Get list entries for companies that have "Tech" in their industry
126
+ * const entries = await filterListEntriesByParent(
127
+ * 'list_12345',
128
+ * 'companies',
129
+ * 'industry',
130
+ * 'contains',
131
+ * 'Tech'
132
+ * );
133
+ */
134
+ export declare function filterListEntriesByParent(listId: string, parentObjectType: string, parentAttributeSlug: string, condition: string, value: any, limit?: number, offset?: number): Promise<AttioListEntry[]>;
135
+ /**
136
+ * Filters list entries by parent record ID
137
+ *
138
+ * This is a specialized version of filterListEntriesByParent that specifically
139
+ * filters by the record ID of the parent record, which is a common use case.
140
+ *
141
+ * @param listId - The ID of the list to filter entries from
142
+ * @param recordId - The ID of the parent record to filter by
143
+ * @param limit - Maximum number of entries to fetch (default: 20)
144
+ * @param offset - Number of entries to skip (default: 0)
145
+ * @returns Array of filtered list entries
146
+ */
147
+ export declare function filterListEntriesByParentId(listId: string, recordId: string, limit?: number, offset?: number): Promise<AttioListEntry[]>;
148
+ //# sourceMappingURL=lists.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/objects/lists.ts"],"names":[],"mappings":"AAIA,OAAO,EAOL,WAAW,EACX,aAAa,EAGb,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAgB,MAAM,mBAAmB,CAAC;AAO5E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC;AAED;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAC5B,UAAU,CAAC,EAAE,MAAM,EACnB,KAAK,GAAE,MAAW,GACjB,OAAO,CAAC,SAAS,EAAE,CAAC,CAqBtB;AAED;;;;;GAKG;AACH,wBAAsB,cA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