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.
- package/CHANGELOG.md +62 -0
- package/LICENSE +236 -0
- package/README.md +105 -0
- package/dist/api/attio-client.d.ts +25 -0
- package/dist/api/attio-client.d.ts.map +1 -0
- package/dist/api/attio-client.js +64 -0
- package/dist/api/attio-client.js.map +1 -0
- package/dist/api/attribute-types.d.ts +119 -0
- package/dist/api/attribute-types.d.ts.map +1 -0
- package/dist/api/attribute-types.js +320 -0
- package/dist/api/attribute-types.js.map +1 -0
- package/dist/api/client.d.ts +3 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +61 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/operations/batch.d.ts +55 -0
- package/dist/api/operations/batch.d.ts.map +1 -0
- package/dist/api/operations/batch.js +176 -0
- package/dist/api/operations/batch.js.map +1 -0
- package/dist/api/operations/crud.d.ts +61 -0
- package/dist/api/operations/crud.d.ts.map +1 -0
- package/dist/api/operations/crud.js +192 -0
- package/dist/api/operations/crud.js.map +1 -0
- package/dist/api/operations/index.d.ts +14 -0
- package/dist/api/operations/index.d.ts.map +1 -0
- package/dist/api/operations/index.js +18 -0
- package/dist/api/operations/index.js.map +1 -0
- package/dist/api/operations/lists.d.ts +66 -0
- package/dist/api/operations/lists.d.ts.map +1 -0
- package/dist/api/operations/lists.js +300 -0
- package/dist/api/operations/lists.js.map +1 -0
- package/dist/api/operations/notes.d.ts +29 -0
- package/dist/api/operations/notes.d.ts.map +1 -0
- package/dist/api/operations/notes.js +63 -0
- package/dist/api/operations/notes.js.map +1 -0
- package/dist/api/operations/retry.d.ts +48 -0
- package/dist/api/operations/retry.d.ts.map +1 -0
- package/dist/api/operations/retry.js +98 -0
- package/dist/api/operations/retry.js.map +1 -0
- package/dist/api/operations/search.d.ts +37 -0
- package/dist/api/operations/search.d.ts.map +1 -0
- package/dist/api/operations/search.js +186 -0
- package/dist/api/operations/search.js.map +1 -0
- package/dist/api/operations/tasks.d.ts +20 -0
- package/dist/api/operations/tasks.d.ts.map +1 -0
- package/dist/api/operations/tasks.js +87 -0
- package/dist/api/operations/tasks.js.map +1 -0
- package/dist/api/operations/types.d.ts +61 -0
- package/dist/api/operations/types.d.ts.map +1 -0
- package/dist/api/operations/types.js +10 -0
- package/dist/api/operations/types.js.map +1 -0
- package/dist/cli/commands/attributes.d.ts +34 -0
- package/dist/cli/commands/attributes.d.ts.map +1 -0
- package/dist/cli/commands/attributes.js +171 -0
- package/dist/cli/commands/attributes.js.map +1 -0
- package/dist/cli/discover.d.ts +3 -0
- package/dist/cli/discover.d.ts.map +1 -0
- package/dist/cli/discover.js +72 -0
- package/dist/cli/discover.js.map +1 -0
- package/dist/errors/api-errors.d.ts +191 -0
- package/dist/errors/api-errors.d.ts.map +1 -0
- package/dist/errors/api-errors.js +305 -0
- package/dist/errors/api-errors.js.map +1 -0
- package/dist/errors/company-errors.d.ts +40 -0
- package/dist/errors/company-errors.d.ts.map +1 -0
- package/dist/errors/company-errors.js +62 -0
- package/dist/errors/company-errors.js.map +1 -0
- package/dist/errors/value-match-error.d.ts +15 -0
- package/dist/errors/value-match-error.d.ts.map +1 -0
- package/dist/errors/value-match-error.js +40 -0
- package/dist/errors/value-match-error.js.map +1 -0
- package/dist/handlers/error-interceptor.d.ts +6 -0
- package/dist/handlers/error-interceptor.d.ts.map +1 -0
- package/dist/handlers/error-interceptor.js +17 -0
- package/dist/handlers/error-interceptor.js.map +1 -0
- package/dist/handlers/rate-limited-handler.d.ts +17 -0
- package/dist/handlers/rate-limited-handler.d.ts.map +1 -0
- package/dist/handlers/rate-limited-handler.js +126 -0
- package/dist/handlers/rate-limited-handler.js.map +1 -0
- package/dist/handlers/resources.d.ts +11 -0
- package/dist/handlers/resources.d.ts.map +1 -0
- package/dist/handlers/resources.js +109 -0
- package/dist/handlers/resources.js.map +1 -0
- package/dist/handlers/tool-configs/companies/attributes.d.ts +85 -0
- package/dist/handlers/tool-configs/companies/attributes.d.ts.map +1 -0
- package/dist/handlers/tool-configs/companies/attributes.js +203 -0
- package/dist/handlers/tool-configs/companies/attributes.js.map +1 -0
- package/dist/handlers/tool-configs/companies/batch.d.ts +145 -0
- package/dist/handlers/tool-configs/companies/batch.d.ts.map +1 -0
- package/dist/handlers/tool-configs/companies/batch.js +249 -0
- package/dist/handlers/tool-configs/companies/batch.js.map +1 -0
- package/dist/handlers/tool-configs/companies/crud.d.ts +103 -0
- package/dist/handlers/tool-configs/companies/crud.d.ts.map +1 -0
- package/dist/handlers/tool-configs/companies/crud.js +157 -0
- package/dist/handlers/tool-configs/companies/crud.js.map +1 -0
- package/dist/handlers/tool-configs/companies/definitions.d.ts +5 -0
- package/dist/handlers/tool-configs/companies/definitions.d.ts.map +1 -0
- package/dist/handlers/tool-configs/companies/definitions.js +9 -0
- package/dist/handlers/tool-configs/companies/definitions.js.map +1 -0
- package/dist/handlers/tool-configs/companies/formatters.d.ts +42 -0
- package/dist/handlers/tool-configs/companies/formatters.d.ts.map +1 -0
- package/dist/handlers/tool-configs/companies/formatters.js +324 -0
- package/dist/handlers/tool-configs/companies/formatters.js.map +1 -0
- package/dist/handlers/tool-configs/companies/index.d.ts +642 -0
- package/dist/handlers/tool-configs/companies/index.d.ts.map +1 -0
- package/dist/handlers/tool-configs/companies/index.js +86 -0
- package/dist/handlers/tool-configs/companies/index.js.map +1 -0
- package/dist/handlers/tool-configs/companies/notes.d.ts +61 -0
- package/dist/handlers/tool-configs/companies/notes.d.ts.map +1 -0
- package/dist/handlers/tool-configs/companies/notes.js +109 -0
- package/dist/handlers/tool-configs/companies/notes.js.map +1 -0
- package/dist/handlers/tool-configs/companies/relationships.d.ts +137 -0
- package/dist/handlers/tool-configs/companies/relationships.d.ts.map +1 -0
- package/dist/handlers/tool-configs/companies/relationships.js +163 -0
- package/dist/handlers/tool-configs/companies/relationships.js.map +1 -0
- package/dist/handlers/tool-configs/companies/search.d.ts +101 -0
- package/dist/handlers/tool-configs/companies/search.d.ts.map +1 -0
- package/dist/handlers/tool-configs/companies/search.js +163 -0
- package/dist/handlers/tool-configs/companies/search.js.map +1 -0
- package/dist/handlers/tool-configs/companies/types.d.ts +6 -0
- package/dist/handlers/tool-configs/companies/types.d.ts.map +1 -0
- package/dist/handlers/tool-configs/companies/types.js +2 -0
- package/dist/handlers/tool-configs/companies/types.js.map +1 -0
- package/dist/handlers/tool-configs/index.d.ts +12 -0
- package/dist/handlers/tool-configs/index.d.ts.map +1 -0
- package/dist/handlers/tool-configs/index.js +12 -0
- package/dist/handlers/tool-configs/index.js.map +1 -0
- package/dist/handlers/tool-configs/lists.d.ts +459 -0
- package/dist/handlers/tool-configs/lists.d.ts.map +1 -0
- package/dist/handlers/tool-configs/lists.js +597 -0
- package/dist/handlers/tool-configs/lists.js.map +1 -0
- package/dist/handlers/tool-configs/paginated-people.d.ts +197 -0
- package/dist/handlers/tool-configs/paginated-people.d.ts.map +1 -0
- package/dist/handlers/tool-configs/paginated-people.js +256 -0
- package/dist/handlers/tool-configs/paginated-people.js.map +1 -0
- package/dist/handlers/tool-configs/people/activity-search.d.ts +98 -0
- package/dist/handlers/tool-configs/people/activity-search.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people/activity-search.js +113 -0
- package/dist/handlers/tool-configs/people/activity-search.js.map +1 -0
- package/dist/handlers/tool-configs/people/advanced-search.d.ts +62 -0
- package/dist/handlers/tool-configs/people/advanced-search.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people/advanced-search.js +74 -0
- package/dist/handlers/tool-configs/people/advanced-search.js.map +1 -0
- package/dist/handlers/tool-configs/people/crud.d.ts +63 -0
- package/dist/handlers/tool-configs/people/crud.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people/crud.js +71 -0
- package/dist/handlers/tool-configs/people/crud.js.map +1 -0
- package/dist/handlers/tool-configs/people/date-search.d.ts +42 -0
- package/dist/handlers/tool-configs/people/date-search.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people/date-search.js +93 -0
- package/dist/handlers/tool-configs/people/date-search.js.map +1 -0
- package/dist/handlers/tool-configs/people/formatters.d.ts +19 -0
- package/dist/handlers/tool-configs/people/formatters.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people/formatters.js +98 -0
- package/dist/handlers/tool-configs/people/formatters.js.map +1 -0
- package/dist/handlers/tool-configs/people/index.d.ts +407 -0
- package/dist/handlers/tool-configs/people/index.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people/index.js +30 -0
- package/dist/handlers/tool-configs/people/index.js.map +1 -0
- package/dist/handlers/tool-configs/people/notes.d.ts +38 -0
- package/dist/handlers/tool-configs/people/notes.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people/notes.js +57 -0
- package/dist/handlers/tool-configs/people/notes.js.map +1 -0
- package/dist/handlers/tool-configs/people/relationships.d.ts +112 -0
- package/dist/handlers/tool-configs/people/relationships.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people/relationships.js +173 -0
- package/dist/handlers/tool-configs/people/relationships.js.map +1 -0
- package/dist/handlers/tool-configs/people/search.d.ts +53 -0
- package/dist/handlers/tool-configs/people/search.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people/search.js +61 -0
- package/dist/handlers/tool-configs/people/search.js.map +1 -0
- package/dist/handlers/tool-configs/people-fix-complete.d.ts +6 -0
- package/dist/handlers/tool-configs/people-fix-complete.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people-fix-complete.js +76 -0
- package/dist/handlers/tool-configs/people-fix-complete.js.map +1 -0
- package/dist/handlers/tool-configs/people-fixed.d.ts +12 -0
- package/dist/handlers/tool-configs/people-fixed.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people-fixed.js +58 -0
- package/dist/handlers/tool-configs/people-fixed.js.map +1 -0
- package/dist/handlers/tool-configs/people-types.d.ts +32 -0
- package/dist/handlers/tool-configs/people-types.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people-types.js +5 -0
- package/dist/handlers/tool-configs/people-types.js.map +1 -0
- package/dist/handlers/tool-configs/people.d.ts +599 -0
- package/dist/handlers/tool-configs/people.d.ts.map +1 -0
- package/dist/handlers/tool-configs/people.js +817 -0
- package/dist/handlers/tool-configs/people.js.map +1 -0
- package/dist/handlers/tool-configs/prompts.d.ts +69 -0
- package/dist/handlers/tool-configs/prompts.d.ts.map +1 -0
- package/dist/handlers/tool-configs/prompts.js +90 -0
- package/dist/handlers/tool-configs/prompts.js.map +1 -0
- package/dist/handlers/tool-configs/rate-limited-people.d.ts +203 -0
- package/dist/handlers/tool-configs/rate-limited-people.d.ts.map +1 -0
- package/dist/handlers/tool-configs/rate-limited-people.js +44 -0
- package/dist/handlers/tool-configs/rate-limited-people.js.map +1 -0
- package/dist/handlers/tool-configs/records/index.d.ts +282 -0
- package/dist/handlers/tool-configs/records/index.d.ts.map +1 -0
- package/dist/handlers/tool-configs/records/index.js +277 -0
- package/dist/handlers/tool-configs/records/index.js.map +1 -0
- package/dist/handlers/tool-configs/records.d.ts +282 -0
- package/dist/handlers/tool-configs/records.d.ts.map +1 -0
- package/dist/handlers/tool-configs/records.js +277 -0
- package/dist/handlers/tool-configs/records.js.map +1 -0
- package/dist/handlers/tool-configs/resource-specific-tools.d.ts +15 -0
- package/dist/handlers/tool-configs/resource-specific-tools.d.ts.map +1 -0
- package/dist/handlers/tool-configs/resource-specific-tools.js +33 -0
- package/dist/handlers/tool-configs/resource-specific-tools.js.map +1 -0
- package/dist/handlers/tool-configs/tasks.d.ts +127 -0
- package/dist/handlers/tool-configs/tasks.d.ts.map +1 -0
- package/dist/handlers/tool-configs/tasks.js +95 -0
- package/dist/handlers/tool-configs/tasks.js.map +1 -0
- package/dist/handlers/tool-types.d.ts +47 -0
- package/dist/handlers/tool-types.d.ts.map +1 -0
- package/dist/handlers/tool-types.js +2 -0
- package/dist/handlers/tool-types.js.map +1 -0
- package/dist/handlers/tools/config-verifier.d.ts +27 -0
- package/dist/handlers/tools/config-verifier.d.ts.map +1 -0
- package/dist/handlers/tools/config-verifier.js +108 -0
- package/dist/handlers/tools/config-verifier.js.map +1 -0
- package/dist/handlers/tools/dispatcher/core.d.ts +12 -0
- package/dist/handlers/tools/dispatcher/core.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher/core.js +276 -0
- package/dist/handlers/tools/dispatcher/core.js.map +1 -0
- package/dist/handlers/tools/dispatcher/formatting.d.ts +17 -0
- package/dist/handlers/tools/dispatcher/formatting.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher/formatting.js +25 -0
- package/dist/handlers/tools/dispatcher/formatting.js.map +1 -0
- package/dist/handlers/tools/dispatcher/logging.d.ts +63 -0
- package/dist/handlers/tools/dispatcher/logging.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher/logging.js +108 -0
- package/dist/handlers/tools/dispatcher/logging.js.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/batch.d.ts +29 -0
- package/dist/handlers/tools/dispatcher/operations/batch.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/batch.js +137 -0
- package/dist/handlers/tools/dispatcher/operations/batch.js.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/crud.d.ts +25 -0
- package/dist/handlers/tools/dispatcher/operations/crud.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/crud.js +110 -0
- package/dist/handlers/tools/dispatcher/operations/crud.js.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/details.d.ts +13 -0
- package/dist/handlers/tools/dispatcher/operations/details.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/details.js +52 -0
- package/dist/handlers/tools/dispatcher/operations/details.js.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/info.d.ts +25 -0
- package/dist/handlers/tools/dispatcher/operations/info.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/info.js +82 -0
- package/dist/handlers/tools/dispatcher/operations/info.js.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/lists.d.ts +62 -0
- package/dist/handlers/tools/dispatcher/operations/lists.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/lists.js +283 -0
- package/dist/handlers/tools/dispatcher/operations/lists.js.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/notes.d.ts +17 -0
- package/dist/handlers/tools/dispatcher/operations/notes.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/notes.js +102 -0
- package/dist/handlers/tools/dispatcher/operations/notes.js.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/search.d.ts +43 -0
- package/dist/handlers/tools/dispatcher/operations/search.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher/operations/search.js +190 -0
- package/dist/handlers/tools/dispatcher/operations/search.js.map +1 -0
- package/dist/handlers/tools/dispatcher/validation.d.ts +27 -0
- package/dist/handlers/tools/dispatcher/validation.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher/validation.js +47 -0
- package/dist/handlers/tools/dispatcher/validation.js.map +1 -0
- package/dist/handlers/tools/dispatcher.d.ts +11 -0
- package/dist/handlers/tools/dispatcher.d.ts.map +1 -0
- package/dist/handlers/tools/dispatcher.js +15 -0
- package/dist/handlers/tools/dispatcher.js.map +1 -0
- package/dist/handlers/tools/error-types.d.ts +33 -0
- package/dist/handlers/tools/error-types.d.ts.map +1 -0
- package/dist/handlers/tools/error-types.js +21 -0
- package/dist/handlers/tools/error-types.js.map +1 -0
- package/dist/handlers/tools/formatters.d.ts +43 -0
- package/dist/handlers/tools/formatters.d.ts.map +1 -0
- package/dist/handlers/tools/formatters.js +170 -0
- package/dist/handlers/tools/formatters.js.map +1 -0
- package/dist/handlers/tools/index.d.ts +15 -0
- package/dist/handlers/tools/index.d.ts.map +1 -0
- package/dist/handlers/tools/index.js +34 -0
- package/dist/handlers/tools/index.js.map +1 -0
- package/dist/handlers/tools/registry.d.ts +1874 -0
- package/dist/handlers/tools/registry.d.ts.map +1 -0
- package/dist/handlers/tools/registry.js +103 -0
- package/dist/handlers/tools/registry.js.map +1 -0
- package/dist/health/http-server.d.ts +24 -0
- package/dist/health/http-server.d.ts.map +1 -0
- package/dist/health/http-server.js +106 -0
- package/dist/health/http-server.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +238 -0
- package/dist/index.js.map +1 -0
- package/dist/objects/base-operations.d.ts +41 -0
- package/dist/objects/base-operations.d.ts.map +1 -0
- package/dist/objects/base-operations.js +116 -0
- package/dist/objects/base-operations.js.map +1 -0
- package/dist/objects/batch-companies.d.ts +112 -0
- package/dist/objects/batch-companies.d.ts.map +1 -0
- package/dist/objects/batch-companies.js +347 -0
- package/dist/objects/batch-companies.js.map +1 -0
- package/dist/objects/companies/attributes.d.ts +83 -0
- package/dist/objects/companies/attributes.d.ts.map +1 -0
- package/dist/objects/companies/attributes.js +426 -0
- package/dist/objects/companies/attributes.js.map +1 -0
- package/dist/objects/companies/basic.d.ts +117 -0
- package/dist/objects/companies/basic.d.ts.map +1 -0
- package/dist/objects/companies/basic.js +367 -0
- package/dist/objects/companies/basic.js.map +1 -0
- package/dist/objects/companies/batch.d.ts +6 -0
- package/dist/objects/companies/batch.d.ts.map +1 -0
- package/dist/objects/companies/batch.js +6 -0
- package/dist/objects/companies/batch.js.map +1 -0
- package/dist/objects/companies/index.d.ts +13 -0
- package/dist/objects/companies/index.d.ts.map +1 -0
- package/dist/objects/companies/index.js +17 -0
- package/dist/objects/companies/index.js.map +1 -0
- package/dist/objects/companies/notes.d.ts +26 -0
- package/dist/objects/companies/notes.d.ts.map +1 -0
- package/dist/objects/companies/notes.js +199 -0
- package/dist/objects/companies/notes.js.map +1 -0
- package/dist/objects/companies/relationships.d.ts +41 -0
- package/dist/objects/companies/relationships.d.ts.map +1 -0
- package/dist/objects/companies/relationships.js +142 -0
- package/dist/objects/companies/relationships.js.map +1 -0
- package/dist/objects/companies/search.d.ts +158 -0
- package/dist/objects/companies/search.d.ts.map +1 -0
- package/dist/objects/companies/search.js +463 -0
- package/dist/objects/companies/search.js.map +1 -0
- package/dist/objects/companies/types.d.ts +27 -0
- package/dist/objects/companies/types.d.ts.map +1 -0
- package/dist/objects/companies/types.js +3 -0
- package/dist/objects/companies/types.js.map +1 -0
- package/dist/objects/lists.d.ts +148 -0
- package/dist/objects/lists.d.ts.map +1 -0
- package/dist/objects/lists.js +586 -0
- package/dist/objects/lists.js.map +1 -0
- package/dist/objects/paginated-people.d.ts +50 -0
- package/dist/objects/paginated-people.d.ts.map +1 -0
- package/dist/objects/paginated-people.js +171 -0
- package/dist/objects/paginated-people.js.map +1 -0
- package/dist/objects/people/basic.d.ts +90 -0
- package/dist/objects/people/basic.d.ts.map +1 -0
- package/dist/objects/people/basic.js +157 -0
- package/dist/objects/people/basic.js.map +1 -0
- package/dist/objects/people/batch.d.ts +24 -0
- package/dist/objects/people/batch.d.ts.map +1 -0
- package/dist/objects/people/batch.js +145 -0
- package/dist/objects/people/batch.js.map +1 -0
- package/dist/objects/people/index.d.ts +11 -0
- package/dist/objects/people/index.d.ts.map +1 -0
- package/dist/objects/people/index.js +17 -0
- package/dist/objects/people/index.js.map +1 -0
- package/dist/objects/people/notes.d.ts +20 -0
- package/dist/objects/people/notes.d.ts.map +1 -0
- package/dist/objects/people/notes.js +60 -0
- package/dist/objects/people/notes.js.map +1 -0
- package/dist/objects/people/relationships.d.ts +23 -0
- package/dist/objects/people/relationships.d.ts.map +1 -0
- package/dist/objects/people/relationships.js +116 -0
- package/dist/objects/people/relationships.js.map +1 -0
- package/dist/objects/people/search.d.ts +83 -0
- package/dist/objects/people/search.d.ts.map +1 -0
- package/dist/objects/people/search.js +286 -0
- package/dist/objects/people/search.js.map +1 -0
- package/dist/objects/people/types.d.ts +37 -0
- package/dist/objects/people/types.d.ts.map +1 -0
- package/dist/objects/people/types.js +71 -0
- package/dist/objects/people/types.js.map +1 -0
- package/dist/objects/people-write.d.ts +71 -0
- package/dist/objects/people-write.d.ts.map +1 -0
- package/dist/objects/people-write.js +261 -0
- package/dist/objects/people-write.js.map +1 -0
- package/dist/objects/records/formatters.d.ts +20 -0
- package/dist/objects/records/formatters.d.ts.map +1 -0
- package/dist/objects/records/formatters.js +47 -0
- package/dist/objects/records/formatters.js.map +1 -0
- package/dist/objects/records/index.d.ts +74 -0
- package/dist/objects/records/index.d.ts.map +1 -0
- package/dist/objects/records/index.js +374 -0
- package/dist/objects/records/index.js.map +1 -0
- package/dist/objects/records.d.ts +88 -0
- package/dist/objects/records.d.ts.map +1 -0
- package/dist/objects/records.js +432 -0
- package/dist/objects/records.js.map +1 -0
- package/dist/objects/tasks.d.ts +19 -0
- package/dist/objects/tasks.d.ts.map +1 -0
- package/dist/objects/tasks.js +23 -0
- package/dist/objects/tasks.js.map +1 -0
- package/dist/prompts/error-handler.d.ts +28 -0
- package/dist/prompts/error-handler.d.ts.map +1 -0
- package/dist/prompts/error-handler.js +47 -0
- package/dist/prompts/error-handler.js.map +1 -0
- package/dist/prompts/handlers.d.ts +49 -0
- package/dist/prompts/handlers.d.ts.map +1 -0
- package/dist/prompts/handlers.js +353 -0
- package/dist/prompts/handlers.js.map +1 -0
- package/dist/prompts/index.d.ts +11 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +15 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/templates/companies.d.ts +10 -0
- package/dist/prompts/templates/companies.d.ts.map +1 -0
- package/dist/prompts/templates/companies.js +128 -0
- package/dist/prompts/templates/companies.js.map +1 -0
- package/dist/prompts/templates/index.d.ts +42 -0
- package/dist/prompts/templates/index.d.ts.map +1 -0
- package/dist/prompts/templates/index.js +58 -0
- package/dist/prompts/templates/index.js.map +1 -0
- package/dist/prompts/templates/lists.d.ts +10 -0
- package/dist/prompts/templates/lists.d.ts.map +1 -0
- package/dist/prompts/templates/lists.js +127 -0
- package/dist/prompts/templates/lists.js.map +1 -0
- package/dist/prompts/templates/notes.d.ts +10 -0
- package/dist/prompts/templates/notes.d.ts.map +1 -0
- package/dist/prompts/templates/notes.js +119 -0
- package/dist/prompts/templates/notes.js.map +1 -0
- package/dist/prompts/templates/people.d.ts +10 -0
- package/dist/prompts/templates/people.d.ts.map +1 -0
- package/dist/prompts/templates/people.js +127 -0
- package/dist/prompts/templates/people.js.map +1 -0
- package/dist/prompts/types.d.ts +52 -0
- package/dist/prompts/types.d.ts.map +1 -0
- package/dist/prompts/types.js +5 -0
- package/dist/prompts/types.js.map +1 -0
- package/dist/types/attio.d.ts +424 -0
- package/dist/types/attio.d.ts.map +1 -0
- package/dist/types/attio.js +116 -0
- package/dist/types/attio.js.map +1 -0
- package/dist/types/company-types.d.ts +52 -0
- package/dist/types/company-types.d.ts.map +1 -0
- package/dist/types/company-types.js +5 -0
- package/dist/types/company-types.js.map +1 -0
- package/dist/types/tool-types.d.ts +262 -0
- package/dist/types/tool-types.d.ts.map +1 -0
- package/dist/types/tool-types.js +6 -0
- package/dist/types/tool-types.js.map +1 -0
- package/dist/utils/api-fallback.d.ts +39 -0
- package/dist/utils/api-fallback.d.ts.map +1 -0
- package/dist/utils/api-fallback.js +94 -0
- package/dist/utils/api-fallback.js.map +1 -0
- package/dist/utils/attribute-mapping/attribute-mappers.d.ts +39 -0
- package/dist/utils/attribute-mapping/attribute-mappers.d.ts.map +1 -0
- package/dist/utils/attribute-mapping/attribute-mappers.js +394 -0
- package/dist/utils/attribute-mapping/attribute-mappers.js.map +1 -0
- package/dist/utils/attribute-mapping/filter-translator.d.ts +9 -0
- package/dist/utils/attribute-mapping/filter-translator.d.ts.map +1 -0
- package/dist/utils/attribute-mapping/filter-translator.js +104 -0
- package/dist/utils/attribute-mapping/filter-translator.js.map +1 -0
- package/dist/utils/attribute-mapping/index.d.ts +10 -0
- package/dist/utils/attribute-mapping/index.d.ts.map +1 -0
- package/dist/utils/attribute-mapping/index.js +12 -0
- package/dist/utils/attribute-mapping/index.js.map +1 -0
- package/dist/utils/attribute-mapping/legacy-maps.d.ts +11 -0
- package/dist/utils/attribute-mapping/legacy-maps.d.ts.map +1 -0
- package/dist/utils/attribute-mapping/legacy-maps.js +54 -0
- package/dist/utils/attribute-mapping/legacy-maps.js.map +1 -0
- package/dist/utils/attribute-mapping/mapping-utils.d.ts +90 -0
- package/dist/utils/attribute-mapping/mapping-utils.d.ts.map +1 -0
- package/dist/utils/attribute-mapping/mapping-utils.js +145 -0
- package/dist/utils/attribute-mapping/mapping-utils.js.map +1 -0
- package/dist/utils/auto-discovery.d.ts +22 -0
- package/dist/utils/auto-discovery.d.ts.map +1 -0
- package/dist/utils/auto-discovery.js +143 -0
- package/dist/utils/auto-discovery.js.map +1 -0
- package/dist/utils/cli-colors.d.ts +36 -0
- package/dist/utils/cli-colors.d.ts.map +1 -0
- package/dist/utils/cli-colors.js +35 -0
- package/dist/utils/cli-colors.js.map +1 -0
- package/dist/utils/config-loader.d.ts +41 -0
- package/dist/utils/config-loader.d.ts.map +1 -0
- package/dist/utils/config-loader.js +167 -0
- package/dist/utils/config-loader.js.map +1 -0
- package/dist/utils/config-migration.d.ts +140 -0
- package/dist/utils/config-migration.d.ts.map +1 -0
- package/dist/utils/config-migration.js +310 -0
- package/dist/utils/config-migration.js.map +1 -0
- package/dist/utils/date-utils.d.ts +63 -0
- package/dist/utils/date-utils.d.ts.map +1 -0
- package/dist/utils/date-utils.js +329 -0
- package/dist/utils/date-utils.js.map +1 -0
- package/dist/utils/debug-b2b-segment.d.ts +2 -0
- package/dist/utils/debug-b2b-segment.d.ts.map +1 -0
- package/dist/utils/debug-b2b-segment.js +67 -0
- package/dist/utils/debug-b2b-segment.js.map +1 -0
- package/dist/utils/domain-utils.d.ts +46 -0
- package/dist/utils/domain-utils.d.ts.map +1 -0
- package/dist/utils/domain-utils.js +143 -0
- package/dist/utils/domain-utils.js.map +1 -0
- package/dist/utils/dynamic-import.d.ts +33 -0
- package/dist/utils/dynamic-import.d.ts.map +1 -0
- package/dist/utils/dynamic-import.js +41 -0
- package/dist/utils/dynamic-import.js.map +1 -0
- package/dist/utils/error-enhancer.d.ts +23 -0
- package/dist/utils/error-enhancer.d.ts.map +1 -0
- package/dist/utils/error-enhancer.js +188 -0
- package/dist/utils/error-enhancer.js.map +1 -0
- package/dist/utils/error-handler.d.ts +89 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +336 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/filters/builders/activity.d.ts +13 -0
- package/dist/utils/filters/builders/activity.d.ts.map +1 -0
- package/dist/utils/filters/builders/activity.js +65 -0
- package/dist/utils/filters/builders/activity.js.map +1 -0
- package/dist/utils/filters/builders/basic.d.ts +13 -0
- package/dist/utils/filters/builders/basic.d.ts.map +1 -0
- package/dist/utils/filters/builders/basic.js +36 -0
- package/dist/utils/filters/builders/basic.js.map +1 -0
- package/dist/utils/filters/builders/complex.d.ts +31 -0
- package/dist/utils/filters/builders/complex.d.ts.map +1 -0
- package/dist/utils/filters/builders/complex.js +92 -0
- package/dist/utils/filters/builders/complex.js.map +1 -0
- package/dist/utils/filters/builders/date.d.ts +17 -0
- package/dist/utils/filters/builders/date.d.ts.map +1 -0
- package/dist/utils/filters/builders/date.js +51 -0
- package/dist/utils/filters/builders/date.js.map +1 -0
- package/dist/utils/filters/builders/index.d.ts +8 -0
- package/dist/utils/filters/builders/index.d.ts.map +1 -0
- package/dist/utils/filters/builders/index.js +8 -0
- package/dist/utils/filters/builders/index.js.map +1 -0
- package/dist/utils/filters/builders/numeric.d.ts +17 -0
- package/dist/utils/filters/builders/numeric.d.ts.map +1 -0
- package/dist/utils/filters/builders/numeric.js +61 -0
- package/dist/utils/filters/builders/numeric.js.map +1 -0
- package/dist/utils/filters/builders/text.d.ts +17 -0
- package/dist/utils/filters/builders/text.d.ts.map +1 -0
- package/dist/utils/filters/builders/text.js +47 -0
- package/dist/utils/filters/builders/text.js.map +1 -0
- package/dist/utils/filters/builders/types.d.ts +2 -0
- package/dist/utils/filters/builders/types.d.ts.map +1 -0
- package/dist/utils/filters/builders/types.js +2 -0
- package/dist/utils/filters/builders/types.js.map +1 -0
- package/dist/utils/filters/builders.d.ts +2 -0
- package/dist/utils/filters/builders.d.ts.map +1 -0
- package/dist/utils/filters/builders.js +2 -0
- package/dist/utils/filters/builders.js.map +1 -0
- package/dist/utils/filters/cache.d.ts +80 -0
- package/dist/utils/filters/cache.d.ts.map +1 -0
- package/dist/utils/filters/cache.js +212 -0
- package/dist/utils/filters/cache.js.map +1 -0
- package/dist/utils/filters/index.d.ts +51 -0
- package/dist/utils/filters/index.d.ts.map +1 -0
- package/dist/utils/filters/index.js +67 -0
- package/dist/utils/filters/index.js.map +1 -0
- package/dist/utils/filters/operators.d.ts +65 -0
- package/dist/utils/filters/operators.d.ts.map +1 -0
- package/dist/utils/filters/operators.js +214 -0
- package/dist/utils/filters/operators.js.map +1 -0
- package/dist/utils/filters/relationship.d.ts +81 -0
- package/dist/utils/filters/relationship.d.ts.map +1 -0
- package/dist/utils/filters/relationship.js +393 -0
- package/dist/utils/filters/relationship.js.map +1 -0
- package/dist/utils/filters/translators.d.ts +120 -0
- package/dist/utils/filters/translators.d.ts.map +1 -0
- package/dist/utils/filters/translators.js +397 -0
- package/dist/utils/filters/translators.js.map +1 -0
- package/dist/utils/filters/types.d.ts +77 -0
- package/dist/utils/filters/types.d.ts.map +1 -0
- package/dist/utils/filters/types.js +85 -0
- package/dist/utils/filters/types.js.map +1 -0
- package/dist/utils/filters/utils.d.ts +86 -0
- package/dist/utils/filters/utils.d.ts.map +1 -0
- package/dist/utils/filters/utils.js +142 -0
- package/dist/utils/filters/utils.js.map +1 -0
- package/dist/utils/filters/validation-utils.d.ts +123 -0
- package/dist/utils/filters/validation-utils.d.ts.map +1 -0
- package/dist/utils/filters/validation-utils.js +282 -0
- package/dist/utils/filters/validation-utils.js.map +1 -0
- package/dist/utils/filters/validators.d.ts +73 -0
- package/dist/utils/filters/validators.d.ts.map +1 -0
- package/dist/utils/filters/validators.js +311 -0
- package/dist/utils/filters/validators.js.map +1 -0
- package/dist/utils/json-serializer.d.ts +68 -0
- package/dist/utils/json-serializer.d.ts.map +1 -0
- package/dist/utils/json-serializer.js +235 -0
- package/dist/utils/json-serializer.js.map +1 -0
- package/dist/utils/logger.d.ts +226 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +323 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/numeric-utils.d.ts +27 -0
- package/dist/utils/numeric-utils.d.ts.map +1 -0
- package/dist/utils/numeric-utils.js +83 -0
- package/dist/utils/numeric-utils.js.map +1 -0
- package/dist/utils/pagination.d.ts +85 -0
- package/dist/utils/pagination.d.ts.map +1 -0
- package/dist/utils/pagination.js +169 -0
- package/dist/utils/pagination.js.map +1 -0
- package/dist/utils/person-lookup.d.ts +35 -0
- package/dist/utils/person-lookup.d.ts.map +1 -0
- package/dist/utils/person-lookup.js +67 -0
- package/dist/utils/person-lookup.js.map +1 -0
- package/dist/utils/rate-limiter.d.ts +82 -0
- package/dist/utils/rate-limiter.d.ts.map +1 -0
- package/dist/utils/rate-limiter.js +159 -0
- package/dist/utils/rate-limiter.js.map +1 -0
- package/dist/utils/record-utils.d.ts +74 -0
- package/dist/utils/record-utils.d.ts.map +1 -0
- package/dist/utils/record-utils.js +312 -0
- package/dist/utils/record-utils.js.map +1 -0
- package/dist/utils/relationship-utils.d.ts +61 -0
- package/dist/utils/relationship-utils.d.ts.map +1 -0
- package/dist/utils/relationship-utils.js +242 -0
- package/dist/utils/relationship-utils.js.map +1 -0
- package/dist/utils/response-formatter.d.ts +121 -0
- package/dist/utils/response-formatter.d.ts.map +1 -0
- package/dist/utils/response-formatter.js +188 -0
- package/dist/utils/response-formatter.js.map +1 -0
- package/dist/utils/uri-parser.d.ts +18 -0
- package/dist/utils/uri-parser.d.ts.map +1 -0
- package/dist/utils/uri-parser.js +31 -0
- package/dist/utils/uri-parser.js.map +1 -0
- package/dist/utils/validation.d.ts +59 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +264 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/utils/value-matcher.d.ts +58 -0
- package/dist/utils/value-matcher.d.ts.map +1 -0
- package/dist/utils/value-matcher.js +131 -0
- package/dist/utils/value-matcher.js.map +1 -0
- package/dist/validators/attribute-validator.d.ts +59 -0
- package/dist/validators/attribute-validator.d.ts.map +1 -0
- package/dist/validators/attribute-validator.js +531 -0
- package/dist/validators/attribute-validator.js.map +1 -0
- package/dist/validators/company/field_detector.d.ts +5 -0
- package/dist/validators/company/field_detector.d.ts.map +1 -0
- package/dist/validators/company/field_detector.js +95 -0
- package/dist/validators/company/field_detector.js.map +1 -0
- package/dist/validators/company/index.d.ts +26 -0
- package/dist/validators/company/index.d.ts.map +1 -0
- package/dist/validators/company/index.js +433 -0
- package/dist/validators/company/index.js.map +1 -0
- package/dist/validators/company/type_cache.d.ts +14 -0
- package/dist/validators/company/type_cache.d.ts.map +1 -0
- package/dist/validators/company/type_cache.js +28 -0
- package/dist/validators/company/type_cache.js.map +1 -0
- package/dist/validators/company/types.d.ts +8 -0
- package/dist/validators/company/types.d.ts.map +1 -0
- package/dist/validators/company/types.js +2 -0
- package/dist/validators/company/types.js.map +1 -0
- package/dist/validators/company-validator.d.ts +2 -0
- package/dist/validators/company-validator.d.ts.map +1 -0
- package/dist/validators/company-validator.js +2 -0
- package/dist/validators/company-validator.js.map +1 -0
- 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,cAAc,CAClC,QAAgB,EAChB,QAAgB,EAAE,EAClB,SAAiB,CAAC;IAElB,IAAI,CAAC;QACH,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,qBAAqB,CAAC,sBAAsB,QAAQ,EAAE,CAAC,CAAC;QACpE,CAAC;QAED,OAAO,MAAM,cAAc,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC5E,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,qCAAqC,YAAY,EAAE,CACpD,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,+BAA+B,YAAY,EAAE,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,QAAgB,EAChB,KAAa,EACb,OAAe;IAEf,IAAI,CAAC;QACH,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,qBAAqB,CAAC,sBAAsB,QAAQ,EAAE,CAAC,CAAC;QACpE,CAAC;QAED,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,qBAAqB,CAAC,4BAA4B,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5C,MAAM,IAAI,qBAAqB,CAAC,8BAA8B,CAAC,CAAC;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,E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,GAAG,MAAM,oBAAoB,CACzC,YAAY,CAAC,MAAM,EACnB,OAAO,CACR,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,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,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,EAA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