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,203 @@
|
|
|
1
|
+
import { getCompanyFields, getCompanyCustomFields, discoverCompanyAttributes, getCompanyAttributes, } from '../../../objects/companies/index.js';
|
|
2
|
+
// Company attribute tool configurations
|
|
3
|
+
export const attributeToolConfigs = {
|
|
4
|
+
fields: {
|
|
5
|
+
name: 'get-company-fields',
|
|
6
|
+
handler: getCompanyFields,
|
|
7
|
+
formatResult: (company) => {
|
|
8
|
+
const name = company.values?.name?.[0]?.value || 'Unknown';
|
|
9
|
+
const id = company.id?.record_id || 'Unknown';
|
|
10
|
+
const fieldCount = Object.keys(company.values || {}).length;
|
|
11
|
+
const fields = Object.keys(company.values || {});
|
|
12
|
+
// Create a simplified version of the values for display
|
|
13
|
+
const simplifiedValues = {};
|
|
14
|
+
for (const [key, value] of Object.entries(company.values || {})) {
|
|
15
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
16
|
+
// Extract just the actual value from the array structure
|
|
17
|
+
const firstItem = value[0];
|
|
18
|
+
if (firstItem && firstItem.value !== undefined) {
|
|
19
|
+
simplifiedValues[key] = firstItem.value;
|
|
20
|
+
}
|
|
21
|
+
else if (firstItem && firstItem.target_record_id) {
|
|
22
|
+
// Handle reference fields
|
|
23
|
+
simplifiedValues[key] = `Reference: ${firstItem.target_record_id}`;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
simplifiedValues[key] = firstItem;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
simplifiedValues[key] = value;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return `Company: ${name} (ID: ${id})
|
|
34
|
+
Fields retrieved: ${fieldCount} (${fields.join(', ')})
|
|
35
|
+
|
|
36
|
+
${JSON.stringify(simplifiedValues, null, 2)}`;
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
customFields: {
|
|
40
|
+
name: 'get-company-custom-fields',
|
|
41
|
+
handler: async (companyId, customFieldNames) => {
|
|
42
|
+
// Support both array of field names and comma-separated string
|
|
43
|
+
let fields;
|
|
44
|
+
if (customFieldNames) {
|
|
45
|
+
if (typeof customFieldNames === 'string') {
|
|
46
|
+
fields = customFieldNames.split(',').map((f) => f.trim());
|
|
47
|
+
}
|
|
48
|
+
else if (Array.isArray(customFieldNames)) {
|
|
49
|
+
fields = customFieldNames;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return await getCompanyCustomFields(companyId, fields);
|
|
53
|
+
},
|
|
54
|
+
formatResult: (company) => {
|
|
55
|
+
const name = company.values?.name?.[0]?.value || 'Unknown';
|
|
56
|
+
const id = company.id?.record_id || 'Unknown';
|
|
57
|
+
const customFields = { ...company.values };
|
|
58
|
+
delete customFields.name;
|
|
59
|
+
const fieldCount = Object.keys(customFields).length;
|
|
60
|
+
return `Company: ${name} (ID: ${id})
|
|
61
|
+
Custom fields: ${fieldCount}
|
|
62
|
+
|
|
63
|
+
${fieldCount > 0
|
|
64
|
+
? JSON.stringify(customFields, null, 2)
|
|
65
|
+
: 'No custom fields found'}`;
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
discoverAttributes: {
|
|
69
|
+
name: 'discover-company-attributes',
|
|
70
|
+
handler: discoverCompanyAttributes,
|
|
71
|
+
formatResult: (result) => {
|
|
72
|
+
// Sanity check for empty or invalid results
|
|
73
|
+
if (!result ||
|
|
74
|
+
(!result?.all?.length &&
|
|
75
|
+
!result?.standard?.length &&
|
|
76
|
+
!result?.custom?.length)) {
|
|
77
|
+
return 'No company attributes found. This may occur if there are no companies in the workspace.';
|
|
78
|
+
}
|
|
79
|
+
let output = `Company Attributes Discovery\n`;
|
|
80
|
+
output += `Total attributes: ${result?.all?.length || 0}\n`;
|
|
81
|
+
output += `Standard fields: ${result?.standard?.length || 0}\n`;
|
|
82
|
+
output += `Custom fields: ${result?.custom?.length || 0}\n\n`;
|
|
83
|
+
output += `STANDARD FIELDS:\n`;
|
|
84
|
+
if (result?.standard?.length > 0) {
|
|
85
|
+
result.standard.forEach((field) => {
|
|
86
|
+
output += ` - ${field}\n`;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
output += ' None found\n';
|
|
91
|
+
}
|
|
92
|
+
output += `\nCUSTOM FIELDS:\n`;
|
|
93
|
+
if (result.custom?.length > 0) {
|
|
94
|
+
result.custom.forEach((field) => {
|
|
95
|
+
const fieldInfo = result.all.find((f) => f.name === field);
|
|
96
|
+
output += ` - ${field} (${fieldInfo?.type || 'unknown'})\n`;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
output += ' None found\n';
|
|
101
|
+
}
|
|
102
|
+
return output;
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
getAttributes: {
|
|
106
|
+
name: 'get-company-attributes',
|
|
107
|
+
handler: getCompanyAttributes,
|
|
108
|
+
formatResult: (result) => {
|
|
109
|
+
// Enhanced error handling for unexpected result structure
|
|
110
|
+
if (!result || typeof result !== 'object') {
|
|
111
|
+
return `Error: Unable to process the response. Received: ${JSON.stringify(result)}`;
|
|
112
|
+
}
|
|
113
|
+
// Handle case where the result contains an error object
|
|
114
|
+
if (result.error) {
|
|
115
|
+
return `Error retrieving attribute: ${result.error.message || JSON.stringify(result.error)}`;
|
|
116
|
+
}
|
|
117
|
+
if (result.value !== undefined) {
|
|
118
|
+
// Return specific attribute value
|
|
119
|
+
return `Company: ${result.company}\nAttribute value: ${typeof result.value === 'object'
|
|
120
|
+
? JSON.stringify(result.value, null, 2)
|
|
121
|
+
: result.value}`;
|
|
122
|
+
}
|
|
123
|
+
else if (result.attributes) {
|
|
124
|
+
// Return list of attributes
|
|
125
|
+
return `Company: ${result.company}\nAvailable attributes (${result.attributes.length}):\n${result.attributes
|
|
126
|
+
.map((attr) => ` - ${attr}`)
|
|
127
|
+
.join('\n')}`;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
// Fallback for unexpected result structure
|
|
131
|
+
return `Unexpected result format. Received: ${JSON.stringify(result)}`;
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
// Attribute tool definitions
|
|
137
|
+
export const attributeToolDefinitions = [
|
|
138
|
+
{
|
|
139
|
+
name: 'get-company-fields',
|
|
140
|
+
description: 'Get specific fields from a company by field names',
|
|
141
|
+
inputSchema: {
|
|
142
|
+
type: 'object',
|
|
143
|
+
properties: {
|
|
144
|
+
companyId: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
description: 'ID of the company',
|
|
147
|
+
},
|
|
148
|
+
fields: {
|
|
149
|
+
type: 'array',
|
|
150
|
+
items: { type: 'string' },
|
|
151
|
+
description: 'Array of field names to retrieve',
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
required: ['companyId', 'fields'],
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'get-company-custom-fields',
|
|
159
|
+
description: 'Get custom fields for a company',
|
|
160
|
+
inputSchema: {
|
|
161
|
+
type: 'object',
|
|
162
|
+
properties: {
|
|
163
|
+
companyId: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
description: 'ID of the company',
|
|
166
|
+
},
|
|
167
|
+
customFieldNames: {
|
|
168
|
+
type: ['string', 'array'],
|
|
169
|
+
items: { type: 'string' },
|
|
170
|
+
description: 'Optional: specific custom field names to retrieve (comma-separated string or array). If omitted, returns all custom fields.',
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
required: ['companyId'],
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: 'discover-company-attributes',
|
|
178
|
+
description: 'Discover all available company attributes in the workspace',
|
|
179
|
+
inputSchema: {
|
|
180
|
+
type: 'object',
|
|
181
|
+
properties: {},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'get-company-attributes',
|
|
186
|
+
description: 'Get all available attributes for a company or the value of a specific attribute',
|
|
187
|
+
inputSchema: {
|
|
188
|
+
type: 'object',
|
|
189
|
+
properties: {
|
|
190
|
+
companyId: {
|
|
191
|
+
type: 'string',
|
|
192
|
+
description: 'ID of the company',
|
|
193
|
+
},
|
|
194
|
+
attributeName: {
|
|
195
|
+
type: 'string',
|
|
196
|
+
description: 'Optional name of specific attribute to retrieve (if not provided, lists all attributes)',
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
required: ['companyId'],
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
];
|
|
203
|
+
//# sourceMappingURL=attributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../../../src/handlers/tool-configs/companies/attributes.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EAAE,mBAAmB;iBACjC;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;oBACzB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EACT,6HAA6H;iBAChI;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,WAAW,EAAE,4DAA4D;QACzE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACT,iFAAiF;QACnF,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mBAAmB;iBACjC;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,yFAAyF;iBAC5F;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { ToolConfig } from '../../tool-types.js';
|
|
2
|
+
export declare const batchToolConfigs: {
|
|
3
|
+
batchCreate: ToolConfig;
|
|
4
|
+
batchUpdate: ToolConfig;
|
|
5
|
+
batchDelete: ToolConfig;
|
|
6
|
+
batchSearch: ToolConfig;
|
|
7
|
+
batchGetDetails: ToolConfig;
|
|
8
|
+
};
|
|
9
|
+
export declare const batchToolDefinitions: ({
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: string;
|
|
14
|
+
properties: {
|
|
15
|
+
companies: {
|
|
16
|
+
type: string;
|
|
17
|
+
description: string;
|
|
18
|
+
items: {
|
|
19
|
+
type: string;
|
|
20
|
+
properties: {
|
|
21
|
+
name: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
website: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
description: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
industry: {
|
|
34
|
+
type: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
required: string[];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
config: {
|
|
42
|
+
type: string;
|
|
43
|
+
description: string;
|
|
44
|
+
properties: {
|
|
45
|
+
maxBatchSize: {
|
|
46
|
+
type: string;
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
continueOnError: {
|
|
50
|
+
type: string;
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
updates?: undefined;
|
|
56
|
+
companyIds?: undefined;
|
|
57
|
+
queries?: undefined;
|
|
58
|
+
};
|
|
59
|
+
required: string[];
|
|
60
|
+
};
|
|
61
|
+
} | {
|
|
62
|
+
name: string;
|
|
63
|
+
description: string;
|
|
64
|
+
inputSchema: {
|
|
65
|
+
type: string;
|
|
66
|
+
properties: {
|
|
67
|
+
updates: {
|
|
68
|
+
type: string;
|
|
69
|
+
description: string;
|
|
70
|
+
items: {
|
|
71
|
+
type: string;
|
|
72
|
+
properties: {
|
|
73
|
+
id: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
attributes: {
|
|
78
|
+
type: string;
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
required: string[];
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
config: {
|
|
86
|
+
type: string;
|
|
87
|
+
description: string;
|
|
88
|
+
properties?: undefined;
|
|
89
|
+
};
|
|
90
|
+
companies?: undefined;
|
|
91
|
+
companyIds?: undefined;
|
|
92
|
+
queries?: undefined;
|
|
93
|
+
};
|
|
94
|
+
required: string[];
|
|
95
|
+
};
|
|
96
|
+
} | {
|
|
97
|
+
name: string;
|
|
98
|
+
description: string;
|
|
99
|
+
inputSchema: {
|
|
100
|
+
type: string;
|
|
101
|
+
properties: {
|
|
102
|
+
companyIds: {
|
|
103
|
+
type: string;
|
|
104
|
+
description: string;
|
|
105
|
+
items: {
|
|
106
|
+
type: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
config: {
|
|
110
|
+
type: string;
|
|
111
|
+
description: string;
|
|
112
|
+
properties?: undefined;
|
|
113
|
+
};
|
|
114
|
+
companies?: undefined;
|
|
115
|
+
updates?: undefined;
|
|
116
|
+
queries?: undefined;
|
|
117
|
+
};
|
|
118
|
+
required: string[];
|
|
119
|
+
};
|
|
120
|
+
} | {
|
|
121
|
+
name: string;
|
|
122
|
+
description: string;
|
|
123
|
+
inputSchema: {
|
|
124
|
+
type: string;
|
|
125
|
+
properties: {
|
|
126
|
+
queries: {
|
|
127
|
+
type: string;
|
|
128
|
+
description: string;
|
|
129
|
+
items: {
|
|
130
|
+
type: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
config: {
|
|
134
|
+
type: string;
|
|
135
|
+
description: string;
|
|
136
|
+
properties?: undefined;
|
|
137
|
+
};
|
|
138
|
+
companies?: undefined;
|
|
139
|
+
updates?: undefined;
|
|
140
|
+
companyIds?: undefined;
|
|
141
|
+
};
|
|
142
|
+
required: string[];
|
|
143
|
+
};
|
|
144
|
+
})[];
|
|
145
|
+
//# sourceMappingURL=batch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../../src/handlers/tool-configs/companies/batch.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,eAAO,MAAM,gBAAgB;iBAoBtB,UAAU;iBAqBV,UAAU;iBAqBV,UAAU;iBA2BV,UAAU;qBA+BV,UAAU;CAChB,CAAC;AAGF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoJhC,CAAC"}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Batch operation tool configurations for companies
|
|
3
|
+
*/
|
|
4
|
+
import { batchCreateCompanies, batchUpdateCompanies, batchDeleteCompanies, batchSearchCompanies, batchGetCompanyDetails, } from '../../../objects/batch-companies.js';
|
|
5
|
+
// Company batch tool configurations
|
|
6
|
+
export const batchToolConfigs = {
|
|
7
|
+
batchCreate: {
|
|
8
|
+
name: 'batch-create-companies',
|
|
9
|
+
handler: batchCreateCompanies,
|
|
10
|
+
formatResult: (result) => {
|
|
11
|
+
const { results, summary } = result;
|
|
12
|
+
let output = `Batch Create Summary: ${summary.succeeded}/${summary.total} succeeded\n`;
|
|
13
|
+
results.forEach((item) => {
|
|
14
|
+
if (item.success) {
|
|
15
|
+
output += `✓ Created: ${item.data.values?.name?.[0]?.value || 'Unknown'} (ID: ${item.data.id?.record_id})\n`;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
output += `✗ Failed: ${item.error?.message || 'Unknown error'}\n`;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return output;
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
batchUpdate: {
|
|
25
|
+
name: 'batch-update-companies',
|
|
26
|
+
handler: batchUpdateCompanies,
|
|
27
|
+
formatResult: (result) => {
|
|
28
|
+
const { results, summary } = result;
|
|
29
|
+
let output = `Batch Update Summary: ${summary.succeeded}/${summary.total} succeeded\n`;
|
|
30
|
+
results.forEach((item) => {
|
|
31
|
+
if (item.success) {
|
|
32
|
+
output += `✓ Updated: ${item.data.values?.name?.[0]?.value || 'Unknown'} (ID: ${item.data.id?.record_id})\n`;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
output += `✗ Failed: ${item.error?.message || 'Unknown error'}\n`;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return output;
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
batchDelete: {
|
|
42
|
+
name: 'batch-delete-companies',
|
|
43
|
+
handler: batchDeleteCompanies,
|
|
44
|
+
formatResult: (result) => {
|
|
45
|
+
const { results, summary } = result;
|
|
46
|
+
let output = `Batch Delete Summary: ${summary.succeeded}/${summary.total} succeeded\n`;
|
|
47
|
+
results.forEach((item) => {
|
|
48
|
+
if (item.success) {
|
|
49
|
+
output += `✓ Deleted: ${item.id}\n`;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
output += `✗ Failed: ${item.id} - ${item.error?.message || 'Unknown error'}\n`;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return output;
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
batchSearch: {
|
|
59
|
+
name: 'batch-search-companies',
|
|
60
|
+
handler: batchSearchCompanies,
|
|
61
|
+
formatResult: (result) => {
|
|
62
|
+
const { results, summary } = result;
|
|
63
|
+
let output = `Batch Search Summary: ${summary.succeeded}/${summary.total} succeeded\n\n`;
|
|
64
|
+
results.forEach((item, index) => {
|
|
65
|
+
if (item.success) {
|
|
66
|
+
output += `Query ${index + 1}: Found ${item.data.length} companies\n`;
|
|
67
|
+
item.data.forEach((company) => {
|
|
68
|
+
output += ` - ${company.values?.name?.[0]?.value || 'Unknown'} (ID: ${company.id?.record_id})\n`;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
output += `Query ${index + 1}: Failed - ${item.error?.message || 'Unknown error'}\n`;
|
|
73
|
+
}
|
|
74
|
+
output += '\n';
|
|
75
|
+
});
|
|
76
|
+
return output;
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
batchGetDetails: {
|
|
80
|
+
name: 'batch-get-company-details',
|
|
81
|
+
handler: batchGetCompanyDetails,
|
|
82
|
+
formatResult: (result) => {
|
|
83
|
+
const { results, summary } = result;
|
|
84
|
+
let output = `Batch Get Details Summary: ${summary.succeeded}/${summary.total} succeeded\n\n`;
|
|
85
|
+
results.forEach((item) => {
|
|
86
|
+
if (item.success) {
|
|
87
|
+
const company = item.data;
|
|
88
|
+
output += `✓ ${company.values?.name?.[0]?.value || 'Unknown'} (ID: ${company.id?.record_id})\n`;
|
|
89
|
+
output += ` Website: ${company.values?.website?.[0]?.value || 'N/A'}\n`;
|
|
90
|
+
output += ` Industry: ${company.values?.industry?.[0]?.value || 'N/A'}\n`;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
output += `✗ Failed: ${item.id} - ${item.error?.message || 'Unknown error'}\n`;
|
|
94
|
+
}
|
|
95
|
+
output += '\n';
|
|
96
|
+
});
|
|
97
|
+
return output;
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
// Batch tool definitions
|
|
102
|
+
export const batchToolDefinitions = [
|
|
103
|
+
{
|
|
104
|
+
name: 'batch-create-companies',
|
|
105
|
+
description: 'Create multiple companies in a single batch operation',
|
|
106
|
+
inputSchema: {
|
|
107
|
+
type: 'object',
|
|
108
|
+
properties: {
|
|
109
|
+
companies: {
|
|
110
|
+
type: 'array',
|
|
111
|
+
description: 'Array of company data to create',
|
|
112
|
+
items: {
|
|
113
|
+
type: 'object',
|
|
114
|
+
properties: {
|
|
115
|
+
name: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
description: 'Company name (required)',
|
|
118
|
+
},
|
|
119
|
+
website: {
|
|
120
|
+
type: 'string',
|
|
121
|
+
description: 'Company website URL',
|
|
122
|
+
},
|
|
123
|
+
description: {
|
|
124
|
+
type: 'string',
|
|
125
|
+
description: 'Company description',
|
|
126
|
+
},
|
|
127
|
+
industry: {
|
|
128
|
+
type: 'string',
|
|
129
|
+
description: 'Industry classification',
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
required: ['name'],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
config: {
|
|
136
|
+
type: 'object',
|
|
137
|
+
description: 'Optional batch configuration',
|
|
138
|
+
properties: {
|
|
139
|
+
maxBatchSize: {
|
|
140
|
+
type: 'number',
|
|
141
|
+
description: 'Maximum items per batch (default: 10)',
|
|
142
|
+
},
|
|
143
|
+
continueOnError: {
|
|
144
|
+
type: 'boolean',
|
|
145
|
+
description: 'Continue processing on errors (default: true)',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
required: ['companies'],
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'batch-update-companies',
|
|
155
|
+
description: 'Update multiple companies in a single batch operation',
|
|
156
|
+
inputSchema: {
|
|
157
|
+
type: 'object',
|
|
158
|
+
properties: {
|
|
159
|
+
updates: {
|
|
160
|
+
type: 'array',
|
|
161
|
+
description: 'Array of company updates',
|
|
162
|
+
items: {
|
|
163
|
+
type: 'object',
|
|
164
|
+
properties: {
|
|
165
|
+
id: {
|
|
166
|
+
type: 'string',
|
|
167
|
+
description: 'Company ID to update',
|
|
168
|
+
},
|
|
169
|
+
attributes: {
|
|
170
|
+
type: 'object',
|
|
171
|
+
description: 'Attributes to update',
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
required: ['id', 'attributes'],
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
config: {
|
|
178
|
+
type: 'object',
|
|
179
|
+
description: 'Optional batch configuration',
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
required: ['updates'],
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'batch-delete-companies',
|
|
187
|
+
description: 'Delete multiple companies in a single batch operation',
|
|
188
|
+
inputSchema: {
|
|
189
|
+
type: 'object',
|
|
190
|
+
properties: {
|
|
191
|
+
companyIds: {
|
|
192
|
+
type: 'array',
|
|
193
|
+
description: 'Array of company IDs to delete',
|
|
194
|
+
items: {
|
|
195
|
+
type: 'string',
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
config: {
|
|
199
|
+
type: 'object',
|
|
200
|
+
description: 'Optional batch configuration',
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
required: ['companyIds'],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: 'batch-search-companies',
|
|
208
|
+
description: 'Perform multiple company searches in a single batch operation',
|
|
209
|
+
inputSchema: {
|
|
210
|
+
type: 'object',
|
|
211
|
+
properties: {
|
|
212
|
+
queries: {
|
|
213
|
+
type: 'array',
|
|
214
|
+
description: 'Array of search queries',
|
|
215
|
+
items: {
|
|
216
|
+
type: 'string',
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
config: {
|
|
220
|
+
type: 'object',
|
|
221
|
+
description: 'Optional batch configuration',
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
required: ['queries'],
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: 'batch-get-company-details',
|
|
229
|
+
description: 'Get details for multiple companies in a single batch operation',
|
|
230
|
+
inputSchema: {
|
|
231
|
+
type: 'object',
|
|
232
|
+
properties: {
|
|
233
|
+
companyIds: {
|
|
234
|
+
type: 'array',
|
|
235
|
+
description: 'Array of company IDs to get details for',
|
|
236
|
+
items: {
|
|
237
|
+
type: 'string',
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
config: {
|
|
241
|
+
type: 'object',
|
|
242
|
+
description: 'Optional batch configuration',
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
required: ['companyIds'],
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
];
|
|
249
|
+
//# sourceMappingURL=batch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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