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,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for attribute mapping
|
|
3
|
+
* This file contains helper functions used by the attribute mapping system
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Creates a case-insensitive lookup map for faster lookups
|
|
7
|
+
*
|
|
8
|
+
* @param mappings - Original mapping object with string keys
|
|
9
|
+
* @returns A Map with lowercase keys for case-insensitive lookups
|
|
10
|
+
*/
|
|
11
|
+
export declare function createCaseInsensitiveMap<T>(mappings: Record<string, T>): Map<string, {
|
|
12
|
+
original: string;
|
|
13
|
+
value: T;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Lookup a value in a case-insensitive map
|
|
17
|
+
*
|
|
18
|
+
* @param map - The case-insensitive map to search in
|
|
19
|
+
* @param key - The key to look up (will be converted to lowercase)
|
|
20
|
+
* @returns The value if found, or undefined if not found
|
|
21
|
+
*/
|
|
22
|
+
export declare function lookupCaseInsensitive<T>(map: Map<string, {
|
|
23
|
+
original: string;
|
|
24
|
+
value: T;
|
|
25
|
+
}>, key: string): T | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Normalizes a string by removing spaces and converting to lowercase
|
|
28
|
+
*
|
|
29
|
+
* @param input - The string to normalize
|
|
30
|
+
* @returns The normalized string
|
|
31
|
+
*/
|
|
32
|
+
export declare function normalizeString(input: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* More aggressive normalization that removes all non-alphanumeric characters
|
|
35
|
+
*
|
|
36
|
+
* @param input - The string to normalize
|
|
37
|
+
* @returns The normalized string
|
|
38
|
+
*/
|
|
39
|
+
export declare function aggressiveNormalizeString(input: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Creates a normalized lookup map for fuzzy matching
|
|
42
|
+
*
|
|
43
|
+
* @param mappings - Original mapping object with string keys
|
|
44
|
+
* @returns A Map with normalized keys (lowercase, no spaces) for fuzzy lookups
|
|
45
|
+
*/
|
|
46
|
+
export declare function createNormalizedMap<T>(mappings: Record<string, T>): Map<string, {
|
|
47
|
+
original: string;
|
|
48
|
+
value: T;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a more aggressively normalized lookup map for fuzzy matching
|
|
52
|
+
* Removes all non-alphanumeric characters
|
|
53
|
+
*
|
|
54
|
+
* @param mappings - Original mapping object with string keys
|
|
55
|
+
* @returns A Map with aggressively normalized keys for fuzzy lookups
|
|
56
|
+
*/
|
|
57
|
+
export declare function createAggressiveNormalizedMap<T>(mappings: Record<string, T>): Map<string, {
|
|
58
|
+
original: string;
|
|
59
|
+
value: T;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Lookup a value in a normalized map (removes spaces, case-insensitive)
|
|
63
|
+
*
|
|
64
|
+
* @param map - The normalized map to search in
|
|
65
|
+
* @param key - The key to look up (will be normalized)
|
|
66
|
+
* @returns The value if found, or undefined if not found
|
|
67
|
+
*/
|
|
68
|
+
export declare function lookupNormalized<T>(map: Map<string, {
|
|
69
|
+
original: string;
|
|
70
|
+
value: T;
|
|
71
|
+
}>, key: string): T | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Lookup a value in an aggressively normalized map
|
|
74
|
+
*
|
|
75
|
+
* @param map - The aggressively normalized map to search in
|
|
76
|
+
* @param key - The key to look up (will be aggressively normalized)
|
|
77
|
+
* @returns The value if found, or undefined if not found
|
|
78
|
+
*/
|
|
79
|
+
export declare function lookupAggressiveNormalized<T>(map: Map<string, {
|
|
80
|
+
original: string;
|
|
81
|
+
value: T;
|
|
82
|
+
}>, key: string): T | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Special case handling for common problematic attribute names
|
|
85
|
+
*
|
|
86
|
+
* @param key - The attribute name to check
|
|
87
|
+
* @returns The mapped value if it's a special case, or undefined
|
|
88
|
+
*/
|
|
89
|
+
export declare function handleSpecialCases(key: string): string | undefined;
|
|
90
|
+
//# sourceMappingURL=mapping-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/attribute-mapping/mapping-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAC1B,GAAG,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC,CAS7C;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,MAA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|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for attribute mapping
|
|
3
|
+
* This file contains helper functions used by the attribute mapping system
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Creates a case-insensitive lookup map for faster lookups
|
|
7
|
+
*
|
|
8
|
+
* @param mappings - Original mapping object with string keys
|
|
9
|
+
* @returns A Map with lowercase keys for case-insensitive lookups
|
|
10
|
+
*/
|
|
11
|
+
export function createCaseInsensitiveMap(mappings) {
|
|
12
|
+
const map = new Map();
|
|
13
|
+
// Pre-process all keys to lowercase for faster lookups
|
|
14
|
+
for (const [key, value] of Object.entries(mappings)) {
|
|
15
|
+
map.set(key.toLowerCase(), { original: key, value });
|
|
16
|
+
}
|
|
17
|
+
return map;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Lookup a value in a case-insensitive map
|
|
21
|
+
*
|
|
22
|
+
* @param map - The case-insensitive map to search in
|
|
23
|
+
* @param key - The key to look up (will be converted to lowercase)
|
|
24
|
+
* @returns The value if found, or undefined if not found
|
|
25
|
+
*/
|
|
26
|
+
export function lookupCaseInsensitive(map, key) {
|
|
27
|
+
const entry = map.get(key.toLowerCase());
|
|
28
|
+
return entry ? entry.value : undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Normalizes a string by removing spaces and converting to lowercase
|
|
32
|
+
*
|
|
33
|
+
* @param input - The string to normalize
|
|
34
|
+
* @returns The normalized string
|
|
35
|
+
*/
|
|
36
|
+
export function normalizeString(input) {
|
|
37
|
+
return input.toLowerCase().replace(/\s+/g, '');
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* More aggressive normalization that removes all non-alphanumeric characters
|
|
41
|
+
*
|
|
42
|
+
* @param input - The string to normalize
|
|
43
|
+
* @returns The normalized string
|
|
44
|
+
*/
|
|
45
|
+
export function aggressiveNormalizeString(input) {
|
|
46
|
+
return input.toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Creates a normalized lookup map for fuzzy matching
|
|
50
|
+
*
|
|
51
|
+
* @param mappings - Original mapping object with string keys
|
|
52
|
+
* @returns A Map with normalized keys (lowercase, no spaces) for fuzzy lookups
|
|
53
|
+
*/
|
|
54
|
+
export function createNormalizedMap(mappings) {
|
|
55
|
+
const map = new Map();
|
|
56
|
+
// Pre-process all keys to normalized form for faster lookups
|
|
57
|
+
for (const [key, value] of Object.entries(mappings)) {
|
|
58
|
+
map.set(normalizeString(key), { original: key, value });
|
|
59
|
+
}
|
|
60
|
+
return map;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Creates a more aggressively normalized lookup map for fuzzy matching
|
|
64
|
+
* Removes all non-alphanumeric characters
|
|
65
|
+
*
|
|
66
|
+
* @param mappings - Original mapping object with string keys
|
|
67
|
+
* @returns A Map with aggressively normalized keys for fuzzy lookups
|
|
68
|
+
*/
|
|
69
|
+
export function createAggressiveNormalizedMap(mappings) {
|
|
70
|
+
const map = new Map();
|
|
71
|
+
// Pre-process all keys to normalized form for faster lookups
|
|
72
|
+
for (const [key, value] of Object.entries(mappings)) {
|
|
73
|
+
map.set(aggressiveNormalizeString(key), { original: key, value });
|
|
74
|
+
}
|
|
75
|
+
return map;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Lookup a value in a normalized map (removes spaces, case-insensitive)
|
|
79
|
+
*
|
|
80
|
+
* @param map - The normalized map to search in
|
|
81
|
+
* @param key - The key to look up (will be normalized)
|
|
82
|
+
* @returns The value if found, or undefined if not found
|
|
83
|
+
*/
|
|
84
|
+
export function lookupNormalized(map, key) {
|
|
85
|
+
const entry = map.get(normalizeString(key));
|
|
86
|
+
return entry ? entry.value : undefined;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Lookup a value in an aggressively normalized map
|
|
90
|
+
*
|
|
91
|
+
* @param map - The aggressively normalized map to search in
|
|
92
|
+
* @param key - The key to look up (will be aggressively normalized)
|
|
93
|
+
* @returns The value if found, or undefined if not found
|
|
94
|
+
*/
|
|
95
|
+
export function lookupAggressiveNormalized(map, key) {
|
|
96
|
+
const entry = map.get(aggressiveNormalizeString(key));
|
|
97
|
+
return entry ? entry.value : undefined;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Special case handling for common problematic attribute names
|
|
101
|
+
*
|
|
102
|
+
* @param key - The attribute name to check
|
|
103
|
+
* @returns The mapped value if it's a special case, or undefined
|
|
104
|
+
*/
|
|
105
|
+
export function handleSpecialCases(key) {
|
|
106
|
+
// Convert to lowercase for consistency
|
|
107
|
+
const lowerKey = key.toLowerCase();
|
|
108
|
+
// Map of special cases with their mappings
|
|
109
|
+
const specialCases = {
|
|
110
|
+
// B2B segment mappings
|
|
111
|
+
b2b_segment: 'type_persona',
|
|
112
|
+
'b2b segment': 'type_persona',
|
|
113
|
+
b2bsegment: 'type_persona',
|
|
114
|
+
b2b: 'type_persona',
|
|
115
|
+
segment: 'type_persona',
|
|
116
|
+
'business segment': 'type_persona',
|
|
117
|
+
'business type': 'type_persona',
|
|
118
|
+
'company segment': 'type_persona',
|
|
119
|
+
'client segment': 'type_persona',
|
|
120
|
+
'customer segment': 'type_persona',
|
|
121
|
+
company_segment: 'type_persona',
|
|
122
|
+
client_segment: 'type_persona',
|
|
123
|
+
customer_segment: 'type_persona',
|
|
124
|
+
// Industry mappings
|
|
125
|
+
// Note: In Attio's API, the concept of 'industry' is represented through the 'categories' field.
|
|
126
|
+
// This mapping ensures compatibility between MCP tools that use 'industry' and the Attio API
|
|
127
|
+
// which uses 'categories' for industry classification. (Issue #176)
|
|
128
|
+
industry: 'categories',
|
|
129
|
+
'industry type': 'categories',
|
|
130
|
+
};
|
|
131
|
+
// Check for exact matches in the special cases
|
|
132
|
+
if (specialCases[lowerKey]) {
|
|
133
|
+
return specialCases[lowerKey];
|
|
134
|
+
}
|
|
135
|
+
// Check for normalized matches
|
|
136
|
+
const normalizedKey = normalizeString(lowerKey);
|
|
137
|
+
for (const [specialKey, value] of Object.entries(specialCases)) {
|
|
138
|
+
if (normalizeString(specialKey) === normalizedKey) {
|
|
139
|
+
return value;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// No special case found
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=mapping-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping-utils.js","sourceRoot":"","sources":["../../../src/utils/attribute-mapping/mapping-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,QAA2B;IAE3B,MAAM,GAAG,GAAG,IAAI,GAAG,EAA0C,CAAC;IAE9D,uDAAuD;IACvD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,GAAgD,EAChD,GAAW;IAEX,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;IACzC,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACzC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACjD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAa;IACrD,OAAO,KAAK,CAAC,W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
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for auto-discovery
|
|
3
|
+
*/
|
|
4
|
+
export interface AutoDiscoveryConfig {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
runOnStartup: boolean;
|
|
7
|
+
intervalMinutes?: number;
|
|
8
|
+
outputPath?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Run attribute discovery for all objects
|
|
12
|
+
*/
|
|
13
|
+
export declare function runDiscovery(apiKey: string, outputPath?: string): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Start automatic discovery with optional periodic updates
|
|
16
|
+
*/
|
|
17
|
+
export declare function startAutoDiscovery(apiKey: string, config?: Partial<AutoDiscoveryConfig>): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Stop automatic discovery
|
|
20
|
+
*/
|
|
21
|
+
export declare function stopAutoDiscovery(): void;
|
|
22
|
+
//# sourceMappingURL=auto-discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-discovery.d.ts","sourceRoot":"","sources":["../../src/utils/auto-discovery.ts"],"names":[],"mappings":"AA0BA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAcD;;GAEG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAwEf;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,OAAO,CAAC,mBAAmB,CAAM,GACxC,OAAO,CAAC,IAAI,CAAC,CAmCf;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAMxC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-discovery module for automatic attribute mapping updates
|
|
3
|
+
*/
|
|
4
|
+
import { getObjectAttributes, getAvailableObjects, } from '../cli/commands/attributes.js';
|
|
5
|
+
import { loadMappingConfig, writeMappingConfig, } from './config-loader.js';
|
|
6
|
+
// Simple logging for auto-discovery - disabled for MCP protocol compatibility
|
|
7
|
+
const log = {
|
|
8
|
+
info: (_msg) => {
|
|
9
|
+
/* Silent for MCP protocol compatibility */
|
|
10
|
+
},
|
|
11
|
+
warn: (_msg) => {
|
|
12
|
+
/* Silent for MCP protocol compatibility */
|
|
13
|
+
},
|
|
14
|
+
error: (_msg, _error) => {
|
|
15
|
+
/* Silent for MCP protocol compatibility */
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Default configuration for auto-discovery
|
|
20
|
+
*/
|
|
21
|
+
const DEFAULT_CONFIG = {
|
|
22
|
+
enabled: true,
|
|
23
|
+
runOnStartup: true,
|
|
24
|
+
intervalMinutes: 60, // Run every hour by default
|
|
25
|
+
outputPath: 'config/mappings/user.json',
|
|
26
|
+
};
|
|
27
|
+
let discoveryInterval = null;
|
|
28
|
+
/**
|
|
29
|
+
* Run attribute discovery for all objects
|
|
30
|
+
*/
|
|
31
|
+
export async function runDiscovery(apiKey, outputPath) {
|
|
32
|
+
log.info('Starting automatic attribute discovery...');
|
|
33
|
+
try {
|
|
34
|
+
// Load existing config or create new one
|
|
35
|
+
let config;
|
|
36
|
+
try {
|
|
37
|
+
config = loadMappingConfig();
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
log.warn('Failed to load existing configuration, creating new one...');
|
|
41
|
+
config = {
|
|
42
|
+
version: '1.0',
|
|
43
|
+
metadata: {
|
|
44
|
+
generated: new Date().toISOString(),
|
|
45
|
+
description: 'Generated by automatic discovery',
|
|
46
|
+
},
|
|
47
|
+
mappings: {
|
|
48
|
+
attributes: {
|
|
49
|
+
common: {},
|
|
50
|
+
objects: {},
|
|
51
|
+
custom: {},
|
|
52
|
+
},
|
|
53
|
+
objects: {},
|
|
54
|
+
lists: {},
|
|
55
|
+
relationships: {},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
// Get all available objects
|
|
60
|
+
const objects = await getAvailableObjects(apiKey);
|
|
61
|
+
log.info(`Found ${objects.length} objects in Attio workspace`);
|
|
62
|
+
// Process each object
|
|
63
|
+
for (const objectSlug of objects) {
|
|
64
|
+
try {
|
|
65
|
+
const attributeMappings = await getObjectAttributes(objectSlug, apiKey);
|
|
66
|
+
const attributeCount = Object.keys(attributeMappings).length;
|
|
67
|
+
if (attributeCount > 0) {
|
|
68
|
+
if (!config.mappings.attributes.objects[objectSlug]) {
|
|
69
|
+
config.mappings.attributes.objects[objectSlug] = {};
|
|
70
|
+
}
|
|
71
|
+
// Merge with existing mappings
|
|
72
|
+
config.mappings.attributes.objects[objectSlug] = {
|
|
73
|
+
...config.mappings.attributes.objects[objectSlug],
|
|
74
|
+
...attributeMappings,
|
|
75
|
+
};
|
|
76
|
+
log.info(`Discovered ${attributeCount} attributes for ${objectSlug}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
log.error(`Error discovering attributes for ${objectSlug}:`, error);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
// Update metadata
|
|
84
|
+
config.metadata = {
|
|
85
|
+
...config.metadata,
|
|
86
|
+
generated: new Date().toISOString(),
|
|
87
|
+
lastDiscovery: new Date().toISOString(),
|
|
88
|
+
autoDiscovery: true,
|
|
89
|
+
};
|
|
90
|
+
// Write the updated config
|
|
91
|
+
await writeMappingConfig(config, outputPath || DEFAULT_CONFIG.outputPath);
|
|
92
|
+
log.info('Automatic attribute discovery completed successfully');
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
log.error('Failed to complete automatic discovery:', error);
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Start automatic discovery with optional periodic updates
|
|
101
|
+
*/
|
|
102
|
+
export async function startAutoDiscovery(apiKey, config = {}) {
|
|
103
|
+
const settings = { ...DEFAULT_CONFIG, ...config };
|
|
104
|
+
if (!settings.enabled) {
|
|
105
|
+
log.info('Auto-discovery is disabled');
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
// Run on startup if configured
|
|
109
|
+
if (settings.runOnStartup) {
|
|
110
|
+
try {
|
|
111
|
+
await runDiscovery(apiKey, settings.outputPath);
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
log.error('Failed to run discovery on startup:', error);
|
|
115
|
+
// Don't fail the server startup, just log the error
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// Set up periodic discovery if configured
|
|
119
|
+
if (settings.intervalMinutes && settings.intervalMinutes > 0) {
|
|
120
|
+
const intervalMs = settings.intervalMinutes * 60 * 1000;
|
|
121
|
+
discoveryInterval = setInterval(async () => {
|
|
122
|
+
log.info('Running scheduled attribute discovery...');
|
|
123
|
+
try {
|
|
124
|
+
await runDiscovery(apiKey, settings.outputPath);
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
log.error('Failed to run scheduled discovery:', error);
|
|
128
|
+
}
|
|
129
|
+
}, intervalMs);
|
|
130
|
+
log.info(`Scheduled attribute discovery every ${settings.intervalMinutes} minutes`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Stop automatic discovery
|
|
135
|
+
*/
|
|
136
|
+
export function stopAutoDiscovery() {
|
|
137
|
+
if (discoveryInterval) {
|
|
138
|
+
clearInterval(discoveryInterval);
|
|
139
|
+
discoveryInterval = null;
|
|
140
|
+
log.info('Stopped automatic attribute discovery');
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=auto-discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-discovery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G,WAAW,CAAC,KAAK,IAAI,EAAE;YACzC,GAAG,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;YACrD,IAAI,CAAC;gBACH,MAAM,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;YAClD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,GAAG,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;YACzD,CAAC;QACH,CAAC,EAAE,UAAU,CAAC,CAAC;QAEf,GAAG,CAAC,IAAI,CACN,uCAAuC,QAAQ,CAAC,eAAe,UAAU,CAC1E,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,IAAI,iBAAiB,EAAE,CAAC;QACtB,aAAa,CAAC,iBAAiB,CAAC,CAAC;QACjC,iBAAiB,GAAG,IAAI,CAAC;QACzB,GAAG,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;IACpD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI color utilities for consistent console output formatting
|
|
3
|
+
*/
|
|
4
|
+
declare const colors: {
|
|
5
|
+
readonly red: "\u001B[31m";
|
|
6
|
+
readonly green: "\u001B[32m";
|
|
7
|
+
readonly yellow: "\u001B[33m";
|
|
8
|
+
readonly blue: "\u001B[34m";
|
|
9
|
+
readonly cyan: "\u001B[36m";
|
|
10
|
+
readonly white: "\u001B[37m";
|
|
11
|
+
readonly reset: "\u001B[0m";
|
|
12
|
+
readonly bold: "\u001B[1m";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Applies ANSI color codes to text for terminal display
|
|
16
|
+
*
|
|
17
|
+
* @param text The text to colorize
|
|
18
|
+
* @param color The color to apply
|
|
19
|
+
* @returns Colored text with reset codes
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* console.log(colorize('Success!', 'green'));
|
|
24
|
+
* console.log(colorize('Warning', 'yellow'));
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function colorize(text: string, color: keyof typeof colors): string;
|
|
28
|
+
/**
|
|
29
|
+
* Available color options for the colorize function
|
|
30
|
+
*/
|
|
31
|
+
export type ColorName = keyof typeof colors;
|
|
32
|
+
/**
|
|
33
|
+
* Raw ANSI color codes (exported for direct use if needed)
|
|
34
|
+
*/
|
|
35
|
+
export { colors };
|
|
36
|
+
//# sourceMappingURL=cli-colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-colors.d.ts","sourceRoot":"","sources":["../../src/utils/cli-colors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,QAAA,MAAM,MAAM;;;;;;;;;CASF,CAAC;AAEX;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,OAAO,MAAM,GAAG,MAAM,CAEzE;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,MAAM,CAAC;AAE5C;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI color utilities for consistent console output formatting
|
|
3
|
+
*/
|
|
4
|
+
// ANSI color codes for console output
|
|
5
|
+
const colors = {
|
|
6
|
+
red: '\x1b[31m',
|
|
7
|
+
green: '\x1b[32m',
|
|
8
|
+
yellow: '\x1b[33m',
|
|
9
|
+
blue: '\x1b[34m',
|
|
10
|
+
cyan: '\x1b[36m',
|
|
11
|
+
white: '\x1b[37m',
|
|
12
|
+
reset: '\x1b[0m',
|
|
13
|
+
bold: '\x1b[1m',
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Applies ANSI color codes to text for terminal display
|
|
17
|
+
*
|
|
18
|
+
* @param text The text to colorize
|
|
19
|
+
* @param color The color to apply
|
|
20
|
+
* @returns Colored text with reset codes
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* console.log(colorize('Success!', 'green'));
|
|
25
|
+
* console.log(colorize('Warning', 'yellow'));
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export function colorize(text, color) {
|
|
29
|
+
return `${colors[color]}${text}${colors.reset}`;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Raw ANSI color codes (exported for direct use if needed)
|
|
33
|
+
*/
|
|
34
|
+
export { colors };
|
|
35
|
+
//# sourceMappingURL=cli-colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-colors.js","sourceRoot":"","sources":["../../src/utils/cli-colors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,sCAAsC;AACtC,MAAM,MAAM,GAAG;IACb,GAAG,EAAE,UAAU;IACf,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;CACP,CAAC;AAEX;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,KAA0B;IAC/D,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;AAClD,CAAC;AAOD;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for mapping configuration
|
|
3
|
+
*/
|
|
4
|
+
export interface MappingConfig {
|
|
5
|
+
version: string;
|
|
6
|
+
metadata?: Record<string, any>;
|
|
7
|
+
mappings: {
|
|
8
|
+
attributes: {
|
|
9
|
+
common: Record<string, string>;
|
|
10
|
+
objects: Record<string, Record<string, string>>;
|
|
11
|
+
custom: Record<string, string>;
|
|
12
|
+
};
|
|
13
|
+
objects: Record<string, string>;
|
|
14
|
+
lists: Record<string, string>;
|
|
15
|
+
relationships: Record<string, string>;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Loads and merges the mapping configuration from default and user files
|
|
21
|
+
*
|
|
22
|
+
* @returns The merged mapping configuration
|
|
23
|
+
*/
|
|
24
|
+
export declare function loadMappingConfig(): MappingConfig;
|
|
25
|
+
/**
|
|
26
|
+
* Writes a mapping configuration to a file
|
|
27
|
+
*
|
|
28
|
+
* @param config - The configuration to write
|
|
29
|
+
* @param filePath - The file path to write to (defaults to user.json)
|
|
30
|
+
*/
|
|
31
|
+
export declare function writeMappingConfig(config: MappingConfig, filePath?: string): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Updates a specific section of the mapping configuration
|
|
34
|
+
*
|
|
35
|
+
* @param section - The section to update (e.g., 'attributes.common')
|
|
36
|
+
* @param mappings - The mappings to set or merge
|
|
37
|
+
* @param merge - Whether to merge with existing mappings (default: true)
|
|
38
|
+
* @param filePath - The file path to write to (defaults to user.json)
|
|
39
|
+
*/
|
|
40
|
+
export declare function updateMappingSection(section: string, mappings: Record<string, any>, merge?: boolean, filePath?: string): Promise<void>;
|
|
41
|
+
//# sourceMappingURL=config-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/utils/config-loader.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,QAAQ,EAAE;QACR,UAAU,EAAE;YACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;YAChD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SAChC,CAAC;QACF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AA2FD;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,aAAa,CAiBjD;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,aAAa,EACrB,QAAQ,GAAE,MAA0B,GACnC,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,KAAK,GAAE,OAAc,EACrB,QAAQ,GAAE,MAA0B,GACnC,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|