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,242 @@
|
|
|
1
|
+
import { ResourceType, FilterConditionType, RelationshipType, } from '../types/attio.js';
|
|
2
|
+
// Re-export RelationshipType for convenience
|
|
3
|
+
export { RelationshipType };
|
|
4
|
+
import { FilterValidationError, RelationshipFilterError, ListRelationshipError, } from '../errors/api-errors.js';
|
|
5
|
+
import { createEqualsFilter } from './filters/index.js';
|
|
6
|
+
import { isValidListId } from './validation.js';
|
|
7
|
+
/**
|
|
8
|
+
* Creates a filter for people based on their associated company attributes
|
|
9
|
+
*
|
|
10
|
+
* @param companyFilter - Filters to apply to the related companies
|
|
11
|
+
* @returns Filter for finding people based on company attributes
|
|
12
|
+
*/
|
|
13
|
+
export function createPeopleByCompanyFilter(companyFilter) {
|
|
14
|
+
try {
|
|
15
|
+
// Validate company filters
|
|
16
|
+
if (!companyFilter ||
|
|
17
|
+
!companyFilter.filters ||
|
|
18
|
+
companyFilter.filters.length === 0) {
|
|
19
|
+
throw new RelationshipFilterError('Company filter must contain at least one valid filter condition', ResourceType.PEOPLE.toString(), ResourceType.COMPANIES.toString(), RelationshipType.WORKS_AT);
|
|
20
|
+
}
|
|
21
|
+
// Create a relationship filter configuration
|
|
22
|
+
const relationshipConfig = {
|
|
23
|
+
sourceType: ResourceType.PEOPLE,
|
|
24
|
+
targetType: ResourceType.COMPANIES,
|
|
25
|
+
relationshipType: RelationshipType.WORKS_AT,
|
|
26
|
+
targetFilters: companyFilter,
|
|
27
|
+
};
|
|
28
|
+
// Convert to an Attio API compatible filter
|
|
29
|
+
return createRelationshipFilter(relationshipConfig);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
// Check if it's already a specialized error
|
|
33
|
+
if (error instanceof RelationshipFilterError) {
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
// Otherwise, wrap in a FilterValidationError
|
|
37
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
38
|
+
throw new FilterValidationError(`Failed to create people-by-company filter: ${errorMessage}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Creates a filter for companies based on their associated people attributes
|
|
43
|
+
*
|
|
44
|
+
* @param peopleFilter - Filters to apply to the related people
|
|
45
|
+
* @returns Filter for finding companies based on people attributes
|
|
46
|
+
*/
|
|
47
|
+
export function createCompaniesByPeopleFilter(peopleFilter) {
|
|
48
|
+
try {
|
|
49
|
+
// Validate people filters
|
|
50
|
+
if (!peopleFilter ||
|
|
51
|
+
!peopleFilter.filters ||
|
|
52
|
+
peopleFilter.filters.length === 0) {
|
|
53
|
+
throw new RelationshipFilterError('People filter must contain at least one valid filter condition', ResourceType.COMPANIES.toString(), ResourceType.PEOPLE.toString(), RelationshipType.EMPLOYS);
|
|
54
|
+
}
|
|
55
|
+
// Create a relationship filter configuration
|
|
56
|
+
const relationshipConfig = {
|
|
57
|
+
sourceType: ResourceType.COMPANIES,
|
|
58
|
+
targetType: ResourceType.PEOPLE,
|
|
59
|
+
relationshipType: RelationshipType.EMPLOYS,
|
|
60
|
+
targetFilters: peopleFilter,
|
|
61
|
+
};
|
|
62
|
+
// Convert to an Attio API compatible filter
|
|
63
|
+
return createRelationshipFilter(relationshipConfig);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
// Check if it's already a specialized error
|
|
67
|
+
if (error instanceof RelationshipFilterError) {
|
|
68
|
+
throw error;
|
|
69
|
+
}
|
|
70
|
+
// Otherwise, wrap in a FilterValidationError
|
|
71
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
72
|
+
throw new FilterValidationError(`Failed to create companies-by-people filter: ${errorMessage}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Creates a filter for records that belong to a specific list
|
|
77
|
+
*
|
|
78
|
+
* @param resourceType - The type of records to filter (people or companies)
|
|
79
|
+
* @param listId - The ID of the list to filter by
|
|
80
|
+
* @returns Filter for finding records that belong to the list
|
|
81
|
+
*/
|
|
82
|
+
export function createRecordsByListFilter(resourceType, listId) {
|
|
83
|
+
try {
|
|
84
|
+
// Validate list ID format and security
|
|
85
|
+
if (!listId || !isValidListId(listId)) {
|
|
86
|
+
throw new ListRelationshipError('Invalid list ID format. Expected format: list_[alphanumeric]', resourceType.toString(), listId);
|
|
87
|
+
}
|
|
88
|
+
// Create a relationship filter configuration
|
|
89
|
+
const relationshipConfig = {
|
|
90
|
+
sourceType: resourceType,
|
|
91
|
+
targetType: ResourceType.LISTS,
|
|
92
|
+
relationshipType: RelationshipType.BELONGS_TO_LIST,
|
|
93
|
+
targetFilters: createEqualsFilter('list_id', listId),
|
|
94
|
+
};
|
|
95
|
+
// Convert to an Attio API compatible filter
|
|
96
|
+
return createRelationshipFilter(relationshipConfig);
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
// Check if it's already a specialized error
|
|
100
|
+
if (error instanceof ListRelationshipError ||
|
|
101
|
+
error instanceof RelationshipFilterError) {
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
// Otherwise, wrap in a FilterValidationError
|
|
105
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
106
|
+
throw new FilterValidationError(`Failed to create records-by-list filter: ${errorMessage}`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Creates a filter for finding people who work at companies in a specific list
|
|
111
|
+
*
|
|
112
|
+
* @param listId - The ID of the list that contains companies
|
|
113
|
+
* @returns Filter for finding people who work at companies in the specified list
|
|
114
|
+
*/
|
|
115
|
+
export function createPeopleByCompanyListFilter(listId) {
|
|
116
|
+
try {
|
|
117
|
+
// Validate list ID format and security
|
|
118
|
+
if (!listId || !isValidListId(listId)) {
|
|
119
|
+
throw new Error('Invalid list ID format. Expected format: list_[alphanumeric]');
|
|
120
|
+
}
|
|
121
|
+
// First, create a filter for companies in the list
|
|
122
|
+
const companiesInListFilter = createRecordsByListFilter(ResourceType.COMPANIES, listId);
|
|
123
|
+
// Then, create a filter for people who work at those companies
|
|
124
|
+
return createPeopleByCompanyFilter(companiesInListFilter);
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
128
|
+
throw new FilterValidationError(`Failed to create people-by-company-list filter: ${errorMessage}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Creates a filter for finding companies that have people in a specific list
|
|
133
|
+
*
|
|
134
|
+
* @param listId - The ID of the list that contains people
|
|
135
|
+
* @returns Filter for finding companies that have people in the specified list
|
|
136
|
+
*/
|
|
137
|
+
export function createCompaniesByPeopleListFilter(listId) {
|
|
138
|
+
try {
|
|
139
|
+
// Validate list ID format and security
|
|
140
|
+
if (!listId || !isValidListId(listId)) {
|
|
141
|
+
throw new Error('Invalid list ID format. Expected format: list_[alphanumeric]');
|
|
142
|
+
}
|
|
143
|
+
// First, create a filter for people in the list
|
|
144
|
+
const peopleInListFilter = createRecordsByListFilter(ResourceType.PEOPLE, listId);
|
|
145
|
+
// Then, create a filter for companies that have those people
|
|
146
|
+
return createCompaniesByPeopleFilter(peopleInListFilter);
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
150
|
+
throw new FilterValidationError(`Failed to create companies-by-people-list filter: ${errorMessage}`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Creates a filter for records that have associated notes matching criteria
|
|
155
|
+
*
|
|
156
|
+
* @param resourceType - The type of records to filter (people or companies)
|
|
157
|
+
* @param textSearch - Text to search for in the notes
|
|
158
|
+
* @returns Filter for finding records with matching notes
|
|
159
|
+
*/
|
|
160
|
+
export function createRecordsByNotesFilter(resourceType, textSearch) {
|
|
161
|
+
try {
|
|
162
|
+
if (!textSearch || textSearch.trim() === '') {
|
|
163
|
+
throw new Error('Text search query must be provided');
|
|
164
|
+
}
|
|
165
|
+
// Create a relationship filter configuration
|
|
166
|
+
const relationshipConfig = {
|
|
167
|
+
sourceType: resourceType,
|
|
168
|
+
targetType: ResourceType.LISTS, // Notes don't have a ResourceType, using LISTS as a placeholder
|
|
169
|
+
relationshipType: RelationshipType.HAS_NOTE,
|
|
170
|
+
targetFilters: {
|
|
171
|
+
filters: [
|
|
172
|
+
{
|
|
173
|
+
attribute: { slug: 'note_content' },
|
|
174
|
+
condition: FilterConditionType.CONTAINS,
|
|
175
|
+
value: textSearch,
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
matchAny: false,
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
// Convert to an Attio API compatible filter
|
|
182
|
+
return createRelationshipFilter(relationshipConfig);
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
186
|
+
throw new FilterValidationError(`Failed to create records-by-notes filter: ${errorMessage}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Core function to create relationship-based filters
|
|
191
|
+
* This translates our internal representation to the format expected by the Attio API
|
|
192
|
+
*
|
|
193
|
+
* @param config - Relationship filter configuration
|
|
194
|
+
* @returns Filter in the format expected by Attio API
|
|
195
|
+
*/
|
|
196
|
+
function createRelationshipFilter(config) {
|
|
197
|
+
// The structure we're aiming for in the Attio API format:
|
|
198
|
+
// {
|
|
199
|
+
// "$relationship": {
|
|
200
|
+
// "type": "works_at",
|
|
201
|
+
// "target": {
|
|
202
|
+
// "object": "companies",
|
|
203
|
+
// "filter": { /* target filters */ }
|
|
204
|
+
// }
|
|
205
|
+
// }
|
|
206
|
+
// }
|
|
207
|
+
// Map our ResourceType to Attio API object names
|
|
208
|
+
const getObjectName = (type) => {
|
|
209
|
+
switch (type) {
|
|
210
|
+
case ResourceType.PEOPLE:
|
|
211
|
+
return 'people';
|
|
212
|
+
case ResourceType.COMPANIES:
|
|
213
|
+
return 'companies';
|
|
214
|
+
case ResourceType.LISTS:
|
|
215
|
+
return 'lists';
|
|
216
|
+
case ResourceType.RECORDS:
|
|
217
|
+
return 'records';
|
|
218
|
+
default:
|
|
219
|
+
throw new Error(`Unsupported resource type: ${type}`);
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
// The relationship field should be a custom attribute in the filter
|
|
223
|
+
return {
|
|
224
|
+
filters: [
|
|
225
|
+
{
|
|
226
|
+
attribute: {
|
|
227
|
+
slug: '$relationship',
|
|
228
|
+
},
|
|
229
|
+
condition: FilterConditionType.EQUALS,
|
|
230
|
+
value: {
|
|
231
|
+
type: config.relationshipType,
|
|
232
|
+
target: {
|
|
233
|
+
object: getObjectName(config.targetType),
|
|
234
|
+
filter: config.targetFilters,
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
],
|
|
239
|
+
matchAny: false,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=relationship-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationship-utils.js","sourceRoot":"","sources":["../../src/utils/relationship-utils.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B,6CAA6C;AAC7C,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAmBhD;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CACzC,aAA+B;IAE/B,IAAI,CAAC;QACH,2BAA2B;QAC3B,IACE,CAAC,aAAa;YACd,CAAC,aAAa,CAAC,OAAO;YACtB,aAAa,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAClC,CAAC;YACD,MAAM,IAAI,uBAAuB,CAC/B,iEAAiE,EACjE,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE,EAC9B,YAAY,CAAC,SAAS,CAAC,QAAQ,EAAE,EACjC,gBAAgB,CAAC,QAAQ,CAC1B,CAAC;QACJ,CAAC;QAED,6CAA6C;QAC7C,MAAM,kBAAkB,GAA6B;YACnD,UAAU,EAAE,YAAY,CAAC,MAAM;YAC/B,UAAU,EAAE,YAAY,CAAC,SAAS;YAClC,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ;YAC3C,aAAa,EAAE,aAAa;SAC7B,CAAC;QAEF,4CAA4C;QAC5C,OAAO,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;IAC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AAY,CAAC,KAAK;gBACrB,OAAO,OAAO,CAAC;YACjB,KAAK,YAAY,CAAC,OAAO;gBACvB,OAAO,SAAS,CAAC;YACnB;gBACE,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,EAAE,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC,CAAC;IAEF,oEAAoE;IACpE,OAAO;QACL,OAAO,EAAE;YACP;gBACE,SAAS,EAAE;oBACT,IAAI,EAAE,eAAe;iBACtB;gBACD,SAAS,EAAE,mBAAmB,CAAC,MAAM;gBACrC,KAAK,EAAE;oBACL,IAAI,EAAE,MAAM,CAAC,gBAAgB;oBAC7B,MAAM,EAAE;wBACN,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;wBACxC,MAAM,EAAE,MAAM,CAAC,aAAa;qBAC7B;iBACF;aACF;SACF;QACD,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for a simple text content item
|
|
3
|
+
*/
|
|
4
|
+
export interface TextContent {
|
|
5
|
+
type: 'text';
|
|
6
|
+
text: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Interface for a markdown content item
|
|
10
|
+
*/
|
|
11
|
+
export interface MarkdownContent {
|
|
12
|
+
type: 'markdown';
|
|
13
|
+
text: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Content types that can be included in responses
|
|
17
|
+
*/
|
|
18
|
+
export type ResponseContent = TextContent | MarkdownContent;
|
|
19
|
+
/**
|
|
20
|
+
* Base interface for all tool responses
|
|
21
|
+
*/
|
|
22
|
+
export interface ToolResponse {
|
|
23
|
+
content: ResponseContent[];
|
|
24
|
+
isError: boolean;
|
|
25
|
+
error?: {
|
|
26
|
+
code: number;
|
|
27
|
+
message: string;
|
|
28
|
+
type?: string;
|
|
29
|
+
details?: unknown;
|
|
30
|
+
};
|
|
31
|
+
metadata?: Record<string, unknown>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Base interface for list responses
|
|
35
|
+
*/
|
|
36
|
+
export interface ListResponse<T> {
|
|
37
|
+
items: T[];
|
|
38
|
+
pagination?: {
|
|
39
|
+
total?: number;
|
|
40
|
+
hasMore?: boolean;
|
|
41
|
+
nextCursor?: string;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Format a simple success response with a text message
|
|
46
|
+
*
|
|
47
|
+
* @param message - Success message text
|
|
48
|
+
* @param metadata - Optional metadata to include
|
|
49
|
+
* @returns Formatted tool response
|
|
50
|
+
*/
|
|
51
|
+
export declare function formatSuccessResponse(message: string, metadata?: Record<string, unknown>): ToolResponse;
|
|
52
|
+
/**
|
|
53
|
+
* Format a list response with items
|
|
54
|
+
*
|
|
55
|
+
* @param title - Title for the list
|
|
56
|
+
* @param items - Array of items to format
|
|
57
|
+
* @param formatter - Function to format each item to a string
|
|
58
|
+
* @param pagination - Optional pagination information
|
|
59
|
+
* @param metadata - Optional metadata to include
|
|
60
|
+
* @returns Formatted tool response
|
|
61
|
+
*/
|
|
62
|
+
export declare function formatListResponse<T>(title: string, items: T[], formatter: (item: T) => string, pagination?: {
|
|
63
|
+
total?: number;
|
|
64
|
+
hasMore?: boolean;
|
|
65
|
+
nextCursor?: string;
|
|
66
|
+
}, metadata?: Record<string, unknown>): ToolResponse;
|
|
67
|
+
/**
|
|
68
|
+
* Format a single record response
|
|
69
|
+
*
|
|
70
|
+
* @param title - Title for the record
|
|
71
|
+
* @param record - The record to format
|
|
72
|
+
* @param formatter - Function to format the record to a string
|
|
73
|
+
* @param metadata - Optional metadata to include
|
|
74
|
+
* @returns Formatted tool response
|
|
75
|
+
*/
|
|
76
|
+
export declare function formatRecordResponse<T>(title: string, record: T, formatter: (record: T) => string, metadata?: Record<string, unknown>): ToolResponse;
|
|
77
|
+
/**
|
|
78
|
+
* Format a response with a detailed JSON view
|
|
79
|
+
*
|
|
80
|
+
* @param title - Title for the JSON data
|
|
81
|
+
* @param data - The data to format as JSON
|
|
82
|
+
* @param metadata - Optional metadata to include
|
|
83
|
+
* @returns Formatted tool response
|
|
84
|
+
*/
|
|
85
|
+
export declare function formatJsonResponse(title: string, data: unknown, metadata?: Record<string, unknown>): ToolResponse;
|
|
86
|
+
/**
|
|
87
|
+
* Format a response with markdown content
|
|
88
|
+
*
|
|
89
|
+
* @param title - Title for the markdown content
|
|
90
|
+
* @param markdown - The markdown content
|
|
91
|
+
* @param metadata - Optional metadata to include
|
|
92
|
+
* @returns Formatted tool response
|
|
93
|
+
*/
|
|
94
|
+
export declare function formatMarkdownResponse(title: string, markdown: string, metadata?: Record<string, unknown>): ToolResponse;
|
|
95
|
+
/**
|
|
96
|
+
* Format a multi-part response with different content types
|
|
97
|
+
*
|
|
98
|
+
* @param title - Title for the response
|
|
99
|
+
* @param parts - Array of content parts to include
|
|
100
|
+
* @param metadata - Optional metadata to include
|
|
101
|
+
* @returns Formatted tool response
|
|
102
|
+
*/
|
|
103
|
+
export declare function formatMultiPartResponse(title: string, parts: ResponseContent[], metadata?: Record<string, unknown>): ToolResponse;
|
|
104
|
+
/**
|
|
105
|
+
* Format an empty response (no content)
|
|
106
|
+
*
|
|
107
|
+
* @param metadata - Optional metadata to include
|
|
108
|
+
* @returns Formatted tool response
|
|
109
|
+
*/
|
|
110
|
+
export declare function formatEmptyResponse(metadata?: Record<string, unknown>): ToolResponse;
|
|
111
|
+
/**
|
|
112
|
+
* Format a standardized error response
|
|
113
|
+
*
|
|
114
|
+
* @param message - Error message
|
|
115
|
+
* @param code - Error code (HTTP status code or custom code)
|
|
116
|
+
* @param type - Error type (e.g., validation_error, not_found, etc.)
|
|
117
|
+
* @param details - Optional error details
|
|
118
|
+
* @returns Formatted error response
|
|
119
|
+
*/
|
|
120
|
+
export declare function formatErrorResponse(message: string, code?: number, type?: string, details?: unknown): ToolResponse;
|
|
121
|
+
//# sourceMappingURL=response-formatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-formatter.d.ts","sourceRoot":"","sources":["../../src/utils/response-formatter.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,eAAe,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,UAAU,CAAC,EAAE;QACX,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,YAAY,CAWd;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,CAAC,EAAE,EACV,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC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,GAChB,YAAY,CAsBd"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response formatting utilities for standardizing MCP tool responses
|
|
3
|
+
*/
|
|
4
|
+
import { safeJsonStringify, sanitizeMcpResponse } from './json-serializer.js';
|
|
5
|
+
/**
|
|
6
|
+
* Format a simple success response with a text message
|
|
7
|
+
*
|
|
8
|
+
* @param message - Success message text
|
|
9
|
+
* @param metadata - Optional metadata to include
|
|
10
|
+
* @returns Formatted tool response
|
|
11
|
+
*/
|
|
12
|
+
export function formatSuccessResponse(message, metadata) {
|
|
13
|
+
return {
|
|
14
|
+
content: [
|
|
15
|
+
{
|
|
16
|
+
type: 'text',
|
|
17
|
+
text: message,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
isError: false,
|
|
21
|
+
metadata,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Format a list response with items
|
|
26
|
+
*
|
|
27
|
+
* @param title - Title for the list
|
|
28
|
+
* @param items - Array of items to format
|
|
29
|
+
* @param formatter - Function to format each item to a string
|
|
30
|
+
* @param pagination - Optional pagination information
|
|
31
|
+
* @param metadata - Optional metadata to include
|
|
32
|
+
* @returns Formatted tool response
|
|
33
|
+
*/
|
|
34
|
+
export function formatListResponse(title, items, formatter, pagination, metadata) {
|
|
35
|
+
const itemsText = items.length > 0 ? items.map(formatter).join('\n') : 'No items found';
|
|
36
|
+
const countText = pagination?.total !== undefined
|
|
37
|
+
? `${items.length} of ${pagination.total} total`
|
|
38
|
+
: `${items.length}`;
|
|
39
|
+
const paginationText = pagination?.hasMore
|
|
40
|
+
? `\n\nShowing ${countText} items. More items available.`
|
|
41
|
+
: `\n\nShowing ${countText} items.`;
|
|
42
|
+
return {
|
|
43
|
+
content: [
|
|
44
|
+
{
|
|
45
|
+
type: 'text',
|
|
46
|
+
text: `${title}:\n${itemsText}\n\nShowing ${countText} items${pagination?.hasMore ? '. More items available.' : '.'}`,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
isError: false,
|
|
50
|
+
metadata: {
|
|
51
|
+
items,
|
|
52
|
+
pagination,
|
|
53
|
+
...metadata,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Format a single record response
|
|
59
|
+
*
|
|
60
|
+
* @param title - Title for the record
|
|
61
|
+
* @param record - The record to format
|
|
62
|
+
* @param formatter - Function to format the record to a string
|
|
63
|
+
* @param metadata - Optional metadata to include
|
|
64
|
+
* @returns Formatted tool response
|
|
65
|
+
*/
|
|
66
|
+
export function formatRecordResponse(title, record, formatter, metadata) {
|
|
67
|
+
return {
|
|
68
|
+
content: [
|
|
69
|
+
{
|
|
70
|
+
type: 'text',
|
|
71
|
+
text: `${title}:\n${formatter(record)}`,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
isError: false,
|
|
75
|
+
metadata: {
|
|
76
|
+
record,
|
|
77
|
+
...metadata,
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Format a response with a detailed JSON view
|
|
83
|
+
*
|
|
84
|
+
* @param title - Title for the JSON data
|
|
85
|
+
* @param data - The data to format as JSON
|
|
86
|
+
* @param metadata - Optional metadata to include
|
|
87
|
+
* @returns Formatted tool response
|
|
88
|
+
*/
|
|
89
|
+
export function formatJsonResponse(title, data, metadata) {
|
|
90
|
+
const response = {
|
|
91
|
+
content: [
|
|
92
|
+
{
|
|
93
|
+
type: 'text',
|
|
94
|
+
text: `${title}:\n${safeJsonStringify(data, { maxDepth: 8 })}`,
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
isError: false,
|
|
98
|
+
metadata: {
|
|
99
|
+
data,
|
|
100
|
+
...metadata,
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
return sanitizeMcpResponse(response);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Format a response with markdown content
|
|
107
|
+
*
|
|
108
|
+
* @param title - Title for the markdown content
|
|
109
|
+
* @param markdown - The markdown content
|
|
110
|
+
* @param metadata - Optional metadata to include
|
|
111
|
+
* @returns Formatted tool response
|
|
112
|
+
*/
|
|
113
|
+
export function formatMarkdownResponse(title, markdown, metadata) {
|
|
114
|
+
return {
|
|
115
|
+
content: [
|
|
116
|
+
{
|
|
117
|
+
type: 'markdown',
|
|
118
|
+
text: `# ${title}\n\n${markdown}`,
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
isError: false,
|
|
122
|
+
metadata,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Format a multi-part response with different content types
|
|
127
|
+
*
|
|
128
|
+
* @param title - Title for the response
|
|
129
|
+
* @param parts - Array of content parts to include
|
|
130
|
+
* @param metadata - Optional metadata to include
|
|
131
|
+
* @returns Formatted tool response
|
|
132
|
+
*/
|
|
133
|
+
export function formatMultiPartResponse(title, parts, metadata) {
|
|
134
|
+
return {
|
|
135
|
+
content: [
|
|
136
|
+
{
|
|
137
|
+
type: 'text',
|
|
138
|
+
text: title,
|
|
139
|
+
},
|
|
140
|
+
...parts,
|
|
141
|
+
],
|
|
142
|
+
isError: false,
|
|
143
|
+
metadata,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Format an empty response (no content)
|
|
148
|
+
*
|
|
149
|
+
* @param metadata - Optional metadata to include
|
|
150
|
+
* @returns Formatted tool response
|
|
151
|
+
*/
|
|
152
|
+
export function formatEmptyResponse(metadata) {
|
|
153
|
+
return {
|
|
154
|
+
content: [],
|
|
155
|
+
isError: false,
|
|
156
|
+
metadata,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Format a standardized error response
|
|
161
|
+
*
|
|
162
|
+
* @param message - Error message
|
|
163
|
+
* @param code - Error code (HTTP status code or custom code)
|
|
164
|
+
* @param type - Error type (e.g., validation_error, not_found, etc.)
|
|
165
|
+
* @param details - Optional error details
|
|
166
|
+
* @returns Formatted error response
|
|
167
|
+
*/
|
|
168
|
+
export function formatErrorResponse(message, code = 500, type = 'unknown_error', details) {
|
|
169
|
+
const response = {
|
|
170
|
+
content: [
|
|
171
|
+
{
|
|
172
|
+
type: 'text',
|
|
173
|
+
text: `ERROR [${type}]: ${message}${details
|
|
174
|
+
? '\n\nDetails: ' + safeJsonStringify(details, { maxDepth: 5 })
|
|
175
|
+
: ''}`,
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
isError: true,
|
|
179
|
+
error: {
|
|
180
|
+
code,
|
|
181
|
+
message,
|
|
182
|
+
type,
|
|
183
|
+
details,
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
return sanitizeMcpResponse(response);
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=response-formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-formatter.js","sourceRoot":"","sources":["../../src/utils/response-formatter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAkD9E;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAe,EACf,QAAkC;IAElC,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,OAAO;aACd;SACF;QACD,OAAO,EAAE,KAAK;QACd,QAAQ;KACT,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAAa,EACb,KAAU,EACV,SAA8B,EAC9B,UAAuE,EACvE,QAAkC;IAElC,MAAM,SAAS,GACb,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC;IAExE,MAAM,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,CAAC;IAEF,OAAO,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ResourceType } from '../types/attio.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parse an Attio resource URI into resource type and ID
|
|
4
|
+
*
|
|
5
|
+
* @param uri - The URI to parse (format: attio://{type}/{id})
|
|
6
|
+
* @returns Tuple of [resourceType, resourceId]
|
|
7
|
+
* @throws Error if URI format is invalid
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseResourceUri(uri: string): [ResourceType, string];
|
|
10
|
+
/**
|
|
11
|
+
* Creates an Attio resource URI from a type and ID
|
|
12
|
+
*
|
|
13
|
+
* @param type - The resource type
|
|
14
|
+
* @param id - The resource ID
|
|
15
|
+
* @returns Formatted URI
|
|
16
|
+
*/
|
|
17
|
+
export declare function formatResourceUri(type: ResourceType, id: string): string;
|
|
18
|
+
//# sourceMappingURL=uri-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uri-parser.d.ts","sourceRoot":"","sources":["../../src/utils/uri-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,CAepE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAExE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ResourceType } from '../types/attio.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parse an Attio resource URI into resource type and ID
|
|
4
|
+
*
|
|
5
|
+
* @param uri - The URI to parse (format: attio://{type}/{id})
|
|
6
|
+
* @returns Tuple of [resourceType, resourceId]
|
|
7
|
+
* @throws Error if URI format is invalid
|
|
8
|
+
*/
|
|
9
|
+
export function parseResourceUri(uri) {
|
|
10
|
+
const match = uri.match(/^attio:\/\/([^\/]+)\/(.+)$/);
|
|
11
|
+
if (!match) {
|
|
12
|
+
throw new Error(`Invalid resource URI format: ${uri}`);
|
|
13
|
+
}
|
|
14
|
+
const [, typeStr, id] = match;
|
|
15
|
+
// Validate resource type
|
|
16
|
+
if (!Object.values(ResourceType).includes(typeStr)) {
|
|
17
|
+
throw new Error(`Unsupported resource type: ${typeStr}`);
|
|
18
|
+
}
|
|
19
|
+
return [typeStr, id];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Creates an Attio resource URI from a type and ID
|
|
23
|
+
*
|
|
24
|
+
* @param type - The resource type
|
|
25
|
+
* @param id - The resource ID
|
|
26
|
+
* @returns Formatted URI
|
|
27
|
+
*/
|
|
28
|
+
export function formatResourceUri(type, id) {
|
|
29
|
+
return `attio://${type}/${id}`;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=uri-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uri-parser.js","sourceRoot":"","sources":["../../src/utils/uri-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAEtD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC;IAE9B,yBAAyB;IACzB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,OAAuB,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,CAAC,OAAuB,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAkB,EAAE,EAAU;IAC9D,OAAO,WAAW,IAAI,IAAI,EAAE,EAAE,CAAC;AACjC,CAAC"}
|