Package Exports
- attio-js
- attio-js/core
- attio-js/core.js
- attio-js/funcs/attributesGetV2TargetIdentifierAttributes
- attio-js/funcs/attributesGetV2TargetIdentifierAttributes.js
- attio-js/funcs/attributesGetV2TargetIdentifierAttributesAttribute
- attio-js/funcs/attributesGetV2TargetIdentifierAttributesAttribute.js
- attio-js/funcs/attributesGetV2TargetIdentifierAttributesAttributeOptions
- attio-js/funcs/attributesGetV2TargetIdentifierAttributesAttributeOptions.js
- attio-js/funcs/attributesGetV2TargetIdentifierAttributesAttributeStatuses
- attio-js/funcs/attributesGetV2TargetIdentifierAttributesAttributeStatuses.js
- attio-js/funcs/attributesPatchV2TargetIdentifierAttributesAttribute
- attio-js/funcs/attributesPatchV2TargetIdentifierAttributesAttribute.js
- attio-js/funcs/attributesPatchV2TargetIdentifierAttributesAttributeOptionsOption
- attio-js/funcs/attributesPatchV2TargetIdentifierAttributesAttributeOptionsOption.js
- attio-js/funcs/attributesPatchV2TargetIdentifierAttributesAttributeStatusesStatus
- attio-js/funcs/attributesPatchV2TargetIdentifierAttributesAttributeStatusesStatus.js
- attio-js/funcs/attributesPostV2TargetIdentifierAttributes
- attio-js/funcs/attributesPostV2TargetIdentifierAttributes.js
- attio-js/funcs/attributesPostV2TargetIdentifierAttributesAttributeOptions
- attio-js/funcs/attributesPostV2TargetIdentifierAttributesAttributeOptions.js
- attio-js/funcs/attributesPostV2TargetIdentifierAttributesAttributeStatuses
- attio-js/funcs/attributesPostV2TargetIdentifierAttributesAttributeStatuses.js
- attio-js/funcs/commentsDeleteV2CommentsCommentId
- attio-js/funcs/commentsDeleteV2CommentsCommentId.js
- attio-js/funcs/commentsGetV2CommentsCommentId
- attio-js/funcs/commentsGetV2CommentsCommentId.js
- attio-js/funcs/commentsPostV2Comments
- attio-js/funcs/commentsPostV2Comments.js
- attio-js/funcs/entriesDeleteV2ListsListEntriesEntryId
- attio-js/funcs/entriesDeleteV2ListsListEntriesEntryId.js
- attio-js/funcs/entriesGetV2ListsListEntriesEntryId
- attio-js/funcs/entriesGetV2ListsListEntriesEntryId.js
- attio-js/funcs/entriesGetV2ListsListEntriesEntryIdAttributesAttributeValues
- attio-js/funcs/entriesGetV2ListsListEntriesEntryIdAttributesAttributeValues.js
- attio-js/funcs/entriesPatchV2ListsListEntriesEntryId
- attio-js/funcs/entriesPatchV2ListsListEntriesEntryId.js
- attio-js/funcs/entriesPostV2ListsListEntries
- attio-js/funcs/entriesPostV2ListsListEntries.js
- attio-js/funcs/entriesPostV2ListsListEntriesQuery
- attio-js/funcs/entriesPostV2ListsListEntriesQuery.js
- attio-js/funcs/entriesPutV2ListsListEntries
- attio-js/funcs/entriesPutV2ListsListEntries.js
- attio-js/funcs/entriesPutV2ListsListEntriesEntryId
- attio-js/funcs/entriesPutV2ListsListEntriesEntryId.js
- attio-js/funcs/listsGetV2Lists
- attio-js/funcs/listsGetV2Lists.js
- attio-js/funcs/listsGetV2ListsList
- attio-js/funcs/listsGetV2ListsList.js
- attio-js/funcs/listsPatchV2ListsList
- attio-js/funcs/listsPatchV2ListsList.js
- attio-js/funcs/listsPostV2Lists
- attio-js/funcs/listsPostV2Lists.js
- attio-js/funcs/metaGetV2Self
- attio-js/funcs/metaGetV2Self.js
- attio-js/funcs/notesDeleteV2NotesNoteId
- attio-js/funcs/notesDeleteV2NotesNoteId.js
- attio-js/funcs/notesGetV2Notes
- attio-js/funcs/notesGetV2Notes.js
- attio-js/funcs/notesGetV2NotesNoteId
- attio-js/funcs/notesGetV2NotesNoteId.js
- attio-js/funcs/notesPostV2Notes
- attio-js/funcs/notesPostV2Notes.js
- attio-js/funcs/objectsGetV2Objects
- attio-js/funcs/objectsGetV2Objects.js
- attio-js/funcs/objectsGetV2ObjectsObject
- attio-js/funcs/objectsGetV2ObjectsObject.js
- attio-js/funcs/objectsPatchV2ObjectsObject
- attio-js/funcs/objectsPatchV2ObjectsObject.js
- attio-js/funcs/objectsPostV2Objects
- attio-js/funcs/objectsPostV2Objects.js
- attio-js/funcs/recordsDeleteV2ObjectsObjectRecordsRecordId
- attio-js/funcs/recordsDeleteV2ObjectsObjectRecordsRecordId.js
- attio-js/funcs/recordsGetV2ObjectsObjectRecordsRecordId
- attio-js/funcs/recordsGetV2ObjectsObjectRecordsRecordId.js
- attio-js/funcs/recordsGetV2ObjectsObjectRecordsRecordIdAttributesAttributeValues
- attio-js/funcs/recordsGetV2ObjectsObjectRecordsRecordIdAttributesAttributeValues.js
- attio-js/funcs/recordsGetV2ObjectsObjectRecordsRecordIdEntries
- attio-js/funcs/recordsGetV2ObjectsObjectRecordsRecordIdEntries.js
- attio-js/funcs/recordsPatchV2ObjectsObjectRecordsRecordId
- attio-js/funcs/recordsPatchV2ObjectsObjectRecordsRecordId.js
- attio-js/funcs/recordsPostV2ObjectsObjectRecords
- attio-js/funcs/recordsPostV2ObjectsObjectRecords.js
- attio-js/funcs/recordsPostV2ObjectsObjectRecordsQuery
- attio-js/funcs/recordsPostV2ObjectsObjectRecordsQuery.js
- attio-js/funcs/recordsPutV2ObjectsObjectRecords
- attio-js/funcs/recordsPutV2ObjectsObjectRecords.js
- attio-js/funcs/recordsPutV2ObjectsObjectRecordsRecordId
- attio-js/funcs/recordsPutV2ObjectsObjectRecordsRecordId.js
- attio-js/funcs/tasksDeleteV2TasksTaskId
- attio-js/funcs/tasksDeleteV2TasksTaskId.js
- attio-js/funcs/tasksGetV2Tasks
- attio-js/funcs/tasksGetV2Tasks.js
- attio-js/funcs/tasksGetV2TasksTaskId
- attio-js/funcs/tasksGetV2TasksTaskId.js
- attio-js/funcs/tasksPatchV2TasksTaskId
- attio-js/funcs/tasksPatchV2TasksTaskId.js
- attio-js/funcs/tasksPostV2Tasks
- attio-js/funcs/tasksPostV2Tasks.js
- attio-js/funcs/threadsGetV2Threads
- attio-js/funcs/threadsGetV2Threads.js
- attio-js/funcs/threadsGetV2ThreadsThreadId
- attio-js/funcs/threadsGetV2ThreadsThreadId.js
- attio-js/funcs/webhooksDeleteV2WebhooksWebhookId
- attio-js/funcs/webhooksDeleteV2WebhooksWebhookId.js
- attio-js/funcs/webhooksGetV2Webhooks
- attio-js/funcs/webhooksGetV2Webhooks.js
- attio-js/funcs/webhooksGetV2WebhooksWebhookId
- attio-js/funcs/webhooksGetV2WebhooksWebhookId.js
- attio-js/funcs/webhooksPatchV2WebhooksWebhookId
- attio-js/funcs/webhooksPatchV2WebhooksWebhookId.js
- attio-js/funcs/webhooksPostV2Webhooks
- attio-js/funcs/webhooksPostV2Webhooks.js
- attio-js/funcs/workspaceMembersGetV2WorkspaceMembers
- attio-js/funcs/workspaceMembersGetV2WorkspaceMembers.js
- attio-js/funcs/workspaceMembersGetV2WorkspaceMembersWorkspaceMemberId
- attio-js/funcs/workspaceMembersGetV2WorkspaceMembersWorkspaceMemberId.js
- attio-js/hooks/hooks
- attio-js/hooks/hooks.js
- attio-js/hooks/index
- attio-js/hooks/index.js
- attio-js/hooks/registration
- attio-js/hooks/registration.js
- attio-js/hooks/types
- attio-js/hooks/types.js
- attio-js/index
- attio-js/index.js
- attio-js/lib/base64
- attio-js/lib/base64.js
- attio-js/lib/config
- attio-js/lib/config.js
- attio-js/lib/dlv
- attio-js/lib/dlv.js
- attio-js/lib/encodings
- attio-js/lib/encodings.js
- attio-js/lib/env
- attio-js/lib/env.js
- attio-js/lib/files
- attio-js/lib/files.js
- attio-js/lib/http
- attio-js/lib/http.js
- attio-js/lib/is-plain-object
- attio-js/lib/is-plain-object.js
- attio-js/lib/logger
- attio-js/lib/logger.js
- attio-js/lib/matchers
- attio-js/lib/matchers.js
- attio-js/lib/primitives
- attio-js/lib/primitives.js
- attio-js/lib/retries
- attio-js/lib/retries.js
- attio-js/lib/schemas
- attio-js/lib/schemas.js
- attio-js/lib/sdks
- attio-js/lib/sdks.js
- attio-js/lib/security
- attio-js/lib/security.js
- attio-js/lib/url
- attio-js/lib/url.js
- attio-js/mcp-server/cli
- attio-js/mcp-server/cli.js
- attio-js/mcp-server/cli/start/command
- attio-js/mcp-server/cli/start/command.js
- attio-js/mcp-server/cli/start/impl
- attio-js/mcp-server/cli/start/impl.js
- attio-js/mcp-server/console-logger
- attio-js/mcp-server/console-logger.js
- attio-js/mcp-server/extensions
- attio-js/mcp-server/extensions.js
- attio-js/mcp-server/mcp-server
- attio-js/mcp-server/mcp-server.js
- attio-js/mcp-server/prompts
- attio-js/mcp-server/prompts.js
- attio-js/mcp-server/resources
- attio-js/mcp-server/resources.js
- attio-js/mcp-server/scopes
- attio-js/mcp-server/scopes.js
- attio-js/mcp-server/server
- attio-js/mcp-server/server.js
- attio-js/mcp-server/shared
- attio-js/mcp-server/shared.js
- attio-js/mcp-server/tools
- attio-js/mcp-server/tools.js
- attio-js/mcp-server/tools/attributesGetV2TargetIdentifierAttributes
- attio-js/mcp-server/tools/attributesGetV2TargetIdentifierAttributes.js
- attio-js/mcp-server/tools/attributesGetV2TargetIdentifierAttributesAttribute
- attio-js/mcp-server/tools/attributesGetV2TargetIdentifierAttributesAttribute.js
- attio-js/mcp-server/tools/attributesGetV2TargetIdentifierAttributesAttributeOptions
- attio-js/mcp-server/tools/attributesGetV2TargetIdentifierAttributesAttributeOptions.js
- attio-js/mcp-server/tools/attributesGetV2TargetIdentifierAttributesAttributeStatuses
- attio-js/mcp-server/tools/attributesGetV2TargetIdentifierAttributesAttributeStatuses.js
- attio-js/mcp-server/tools/attributesPatchV2TargetIdentifierAttributesAttribute
- attio-js/mcp-server/tools/attributesPatchV2TargetIdentifierAttributesAttribute.js
- attio-js/mcp-server/tools/attributesPatchV2TargetIdentifierAttributesAttributeOptionsOption
- attio-js/mcp-server/tools/attributesPatchV2TargetIdentifierAttributesAttributeOptionsOption.js
- attio-js/mcp-server/tools/attributesPatchV2TargetIdentifierAttributesAttributeStatusesStatus
- attio-js/mcp-server/tools/attributesPatchV2TargetIdentifierAttributesAttributeStatusesStatus.js
- attio-js/mcp-server/tools/attributesPostV2TargetIdentifierAttributes
- attio-js/mcp-server/tools/attributesPostV2TargetIdentifierAttributes.js
- attio-js/mcp-server/tools/attributesPostV2TargetIdentifierAttributesAttributeOptions
- attio-js/mcp-server/tools/attributesPostV2TargetIdentifierAttributesAttributeOptions.js
- attio-js/mcp-server/tools/attributesPostV2TargetIdentifierAttributesAttributeStatuses
- attio-js/mcp-server/tools/attributesPostV2TargetIdentifierAttributesAttributeStatuses.js
- attio-js/mcp-server/tools/commentsDeleteV2CommentsCommentId
- attio-js/mcp-server/tools/commentsDeleteV2CommentsCommentId.js
- attio-js/mcp-server/tools/commentsGetV2CommentsCommentId
- attio-js/mcp-server/tools/commentsGetV2CommentsCommentId.js
- attio-js/mcp-server/tools/commentsPostV2Comments
- attio-js/mcp-server/tools/commentsPostV2Comments.js
- attio-js/mcp-server/tools/entriesDeleteV2ListsListEntriesEntryId
- attio-js/mcp-server/tools/entriesDeleteV2ListsListEntriesEntryId.js
- attio-js/mcp-server/tools/entriesGetV2ListsListEntriesEntryId
- attio-js/mcp-server/tools/entriesGetV2ListsListEntriesEntryId.js
- attio-js/mcp-server/tools/entriesGetV2ListsListEntriesEntryIdAttributesAttributeValues
- attio-js/mcp-server/tools/entriesGetV2ListsListEntriesEntryIdAttributesAttributeValues.js
- attio-js/mcp-server/tools/entriesPatchV2ListsListEntriesEntryId
- attio-js/mcp-server/tools/entriesPatchV2ListsListEntriesEntryId.js
- attio-js/mcp-server/tools/entriesPostV2ListsListEntries
- attio-js/mcp-server/tools/entriesPostV2ListsListEntries.js
- attio-js/mcp-server/tools/entriesPostV2ListsListEntriesQuery
- attio-js/mcp-server/tools/entriesPostV2ListsListEntriesQuery.js
- attio-js/mcp-server/tools/entriesPutV2ListsListEntries
- attio-js/mcp-server/tools/entriesPutV2ListsListEntries.js
- attio-js/mcp-server/tools/entriesPutV2ListsListEntriesEntryId
- attio-js/mcp-server/tools/entriesPutV2ListsListEntriesEntryId.js
- attio-js/mcp-server/tools/listsGetV2Lists
- attio-js/mcp-server/tools/listsGetV2Lists.js
- attio-js/mcp-server/tools/listsGetV2ListsList
- attio-js/mcp-server/tools/listsGetV2ListsList.js
- attio-js/mcp-server/tools/listsPatchV2ListsList
- attio-js/mcp-server/tools/listsPatchV2ListsList.js
- attio-js/mcp-server/tools/listsPostV2Lists
- attio-js/mcp-server/tools/listsPostV2Lists.js
- attio-js/mcp-server/tools/metaGetV2Self
- attio-js/mcp-server/tools/metaGetV2Self.js
- attio-js/mcp-server/tools/notesDeleteV2NotesNoteId
- attio-js/mcp-server/tools/notesDeleteV2NotesNoteId.js
- attio-js/mcp-server/tools/notesGetV2Notes
- attio-js/mcp-server/tools/notesGetV2Notes.js
- attio-js/mcp-server/tools/notesGetV2NotesNoteId
- attio-js/mcp-server/tools/notesGetV2NotesNoteId.js
- attio-js/mcp-server/tools/notesPostV2Notes
- attio-js/mcp-server/tools/notesPostV2Notes.js
- attio-js/mcp-server/tools/objectsGetV2Objects
- attio-js/mcp-server/tools/objectsGetV2Objects.js
- attio-js/mcp-server/tools/objectsGetV2ObjectsObject
- attio-js/mcp-server/tools/objectsGetV2ObjectsObject.js
- attio-js/mcp-server/tools/objectsPatchV2ObjectsObject
- attio-js/mcp-server/tools/objectsPatchV2ObjectsObject.js
- attio-js/mcp-server/tools/objectsPostV2Objects
- attio-js/mcp-server/tools/objectsPostV2Objects.js
- attio-js/mcp-server/tools/recordsDeleteV2ObjectsObjectRecordsRecordId
- attio-js/mcp-server/tools/recordsDeleteV2ObjectsObjectRecordsRecordId.js
- attio-js/mcp-server/tools/recordsGetV2ObjectsObjectRecordsRecordId
- attio-js/mcp-server/tools/recordsGetV2ObjectsObjectRecordsRecordId.js
- attio-js/mcp-server/tools/recordsGetV2ObjectsObjectRecordsRecordIdAttributesAttributeValues
- attio-js/mcp-server/tools/recordsGetV2ObjectsObjectRecordsRecordIdAttributesAttributeValues.js
- attio-js/mcp-server/tools/recordsGetV2ObjectsObjectRecordsRecordIdEntries
- attio-js/mcp-server/tools/recordsGetV2ObjectsObjectRecordsRecordIdEntries.js
- attio-js/mcp-server/tools/recordsPatchV2ObjectsObjectRecordsRecordId
- attio-js/mcp-server/tools/recordsPatchV2ObjectsObjectRecordsRecordId.js
- attio-js/mcp-server/tools/recordsPostV2ObjectsObjectRecords
- attio-js/mcp-server/tools/recordsPostV2ObjectsObjectRecords.js
- attio-js/mcp-server/tools/recordsPostV2ObjectsObjectRecordsQuery
- attio-js/mcp-server/tools/recordsPostV2ObjectsObjectRecordsQuery.js
- attio-js/mcp-server/tools/recordsPutV2ObjectsObjectRecords
- attio-js/mcp-server/tools/recordsPutV2ObjectsObjectRecords.js
- attio-js/mcp-server/tools/recordsPutV2ObjectsObjectRecordsRecordId
- attio-js/mcp-server/tools/recordsPutV2ObjectsObjectRecordsRecordId.js
- attio-js/mcp-server/tools/tasksDeleteV2TasksTaskId
- attio-js/mcp-server/tools/tasksDeleteV2TasksTaskId.js
- attio-js/mcp-server/tools/tasksGetV2Tasks
- attio-js/mcp-server/tools/tasksGetV2Tasks.js
- attio-js/mcp-server/tools/tasksGetV2TasksTaskId
- attio-js/mcp-server/tools/tasksGetV2TasksTaskId.js
- attio-js/mcp-server/tools/tasksPatchV2TasksTaskId
- attio-js/mcp-server/tools/tasksPatchV2TasksTaskId.js
- attio-js/mcp-server/tools/tasksPostV2Tasks
- attio-js/mcp-server/tools/tasksPostV2Tasks.js
- attio-js/mcp-server/tools/threadsGetV2Threads
- attio-js/mcp-server/tools/threadsGetV2Threads.js
- attio-js/mcp-server/tools/threadsGetV2ThreadsThreadId
- attio-js/mcp-server/tools/threadsGetV2ThreadsThreadId.js
- attio-js/mcp-server/tools/webhooksDeleteV2WebhooksWebhookId
- attio-js/mcp-server/tools/webhooksDeleteV2WebhooksWebhookId.js
- attio-js/mcp-server/tools/webhooksGetV2Webhooks
- attio-js/mcp-server/tools/webhooksGetV2Webhooks.js
- attio-js/mcp-server/tools/webhooksGetV2WebhooksWebhookId
- attio-js/mcp-server/tools/webhooksGetV2WebhooksWebhookId.js
- attio-js/mcp-server/tools/webhooksPatchV2WebhooksWebhookId
- attio-js/mcp-server/tools/webhooksPatchV2WebhooksWebhookId.js
- attio-js/mcp-server/tools/webhooksPostV2Webhooks
- attio-js/mcp-server/tools/webhooksPostV2Webhooks.js
- attio-js/mcp-server/tools/workspaceMembersGetV2WorkspaceMembers
- attio-js/mcp-server/tools/workspaceMembersGetV2WorkspaceMembers.js
- attio-js/mcp-server/tools/workspaceMembersGetV2WorkspaceMembersWorkspaceMemberId
- attio-js/mcp-server/tools/workspaceMembersGetV2WorkspaceMembersWorkspaceMemberId.js
- attio-js/models/components
- attio-js/models/components/attribute
- attio-js/models/components/attribute.js
- attio-js/models/components/comment
- attio-js/models/components/comment.js
- attio-js/models/components/index
- attio-js/models/components/index.js
- attio-js/models/components/inputvalue
- attio-js/models/components/inputvalue.js
- attio-js/models/components/list
- attio-js/models/components/list.js
- attio-js/models/components/note
- attio-js/models/components/note.js
- attio-js/models/components/object
- attio-js/models/components/object.js
- attio-js/models/components/outputvalue
- attio-js/models/components/outputvalue.js
- attio-js/models/components/security
- attio-js/models/components/security.js
- attio-js/models/components/selectoption
- attio-js/models/components/selectoption.js
- attio-js/models/components/status
- attio-js/models/components/status.js
- attio-js/models/components/task
- attio-js/models/components/task.js
- attio-js/models/components/thread
- attio-js/models/components/thread.js
- attio-js/models/components/workspacemember
- attio-js/models/components/workspacemember.js
- attio-js/models/errors
- attio-js/models/errors/apierror
- attio-js/models/errors/apierror.js
- attio-js/models/errors/deletev2commentscommentid
- attio-js/models/errors/deletev2commentscommentid.js
- attio-js/models/errors/deletev2listslistentriesentryid
- attio-js/models/errors/deletev2listslistentriesentryid.js
- attio-js/models/errors/deletev2notesnoteid
- attio-js/models/errors/deletev2notesnoteid.js
- attio-js/models/errors/deletev2objectsobjectrecordsrecordid
- attio-js/models/errors/deletev2objectsobjectrecordsrecordid.js
- attio-js/models/errors/deletev2taskstaskid
- attio-js/models/errors/deletev2taskstaskid.js
- attio-js/models/errors/deletev2webhookswebhookid
- attio-js/models/errors/deletev2webhookswebhookid.js
- attio-js/models/errors/getv2commentscommentid
- attio-js/models/errors/getv2commentscommentid.js
- attio-js/models/errors/getv2listslist
- attio-js/models/errors/getv2listslist.js
- attio-js/models/errors/getv2listslistentriesentryid
- attio-js/models/errors/getv2listslistentriesentryid.js
- attio-js/models/errors/getv2listslistentriesentryidattributesattributevalues
- attio-js/models/errors/getv2listslistentriesentryidattributesattributevalues.js
- attio-js/models/errors/getv2notes
- attio-js/models/errors/getv2notes.js
- attio-js/models/errors/getv2notesnoteid
- attio-js/models/errors/getv2notesnoteid.js
- attio-js/models/errors/getv2objectsobject
- attio-js/models/errors/getv2objectsobject.js
- attio-js/models/errors/getv2objectsobjectrecordsrecordid
- attio-js/models/errors/getv2objectsobjectrecordsrecordid.js
- attio-js/models/errors/getv2objectsobjectrecordsrecordidattributesattributevalues
- attio-js/models/errors/getv2objectsobjectrecordsrecordidattributesattributevalues.js
- attio-js/models/errors/getv2targetidentifierattributesattribute
- attio-js/models/errors/getv2targetidentifierattributesattribute.js
- attio-js/models/errors/getv2targetidentifierattributesattributeoptions
- attio-js/models/errors/getv2targetidentifierattributesattributeoptions.js
- attio-js/models/errors/getv2targetidentifierattributesattributestatuses
- attio-js/models/errors/getv2targetidentifierattributesattributestatuses.js
- attio-js/models/errors/getv2taskstaskid
- attio-js/models/errors/getv2taskstaskid.js
- attio-js/models/errors/getv2threadsthreadid
- attio-js/models/errors/getv2threadsthreadid.js
- attio-js/models/errors/getv2webhookswebhookid
- attio-js/models/errors/getv2webhookswebhookid.js
- attio-js/models/errors/getv2workspacemembersworkspacememberid
- attio-js/models/errors/getv2workspacemembersworkspacememberid.js
- attio-js/models/errors/httpclienterrors
- attio-js/models/errors/httpclienterrors.js
- attio-js/models/errors/index
- attio-js/models/errors/index.js
- attio-js/models/errors/patchv2listslist
- attio-js/models/errors/patchv2listslist.js
- attio-js/models/errors/patchv2listslistentriesentryid
- attio-js/models/errors/patchv2listslistentriesentryid.js
- attio-js/models/errors/patchv2objectsobject
- attio-js/models/errors/patchv2objectsobject.js
- attio-js/models/errors/patchv2objectsobjectrecordsrecordid
- attio-js/models/errors/patchv2objectsobjectrecordsrecordid.js
- attio-js/models/errors/patchv2targetidentifierattributesattribute
- attio-js/models/errors/patchv2targetidentifierattributesattribute.js
- attio-js/models/errors/patchv2targetidentifierattributesattributeoptionsoption
- attio-js/models/errors/patchv2targetidentifierattributesattributeoptionsoption.js
- attio-js/models/errors/patchv2targetidentifierattributesattributestatusesstatus
- attio-js/models/errors/patchv2targetidentifierattributesattributestatusesstatus.js
- attio-js/models/errors/patchv2taskstaskid
- attio-js/models/errors/patchv2taskstaskid.js
- attio-js/models/errors/patchv2webhookswebhookid
- attio-js/models/errors/patchv2webhookswebhookid.js
- attio-js/models/errors/postv2comments
- attio-js/models/errors/postv2comments.js
- attio-js/models/errors/postv2lists
- attio-js/models/errors/postv2lists.js
- attio-js/models/errors/postv2listslistentries
- attio-js/models/errors/postv2listslistentries.js
- attio-js/models/errors/postv2listslistentriesquery
- attio-js/models/errors/postv2listslistentriesquery.js
- attio-js/models/errors/postv2notes
- attio-js/models/errors/postv2notes.js
- attio-js/models/errors/postv2objects
- attio-js/models/errors/postv2objects.js
- attio-js/models/errors/postv2objectsobjectrecords
- attio-js/models/errors/postv2objectsobjectrecords.js
- attio-js/models/errors/postv2objectsobjectrecordsquery
- attio-js/models/errors/postv2objectsobjectrecordsquery.js
- attio-js/models/errors/postv2targetidentifierattributes
- attio-js/models/errors/postv2targetidentifierattributes.js
- attio-js/models/errors/postv2targetidentifierattributesattributeoptions
- attio-js/models/errors/postv2targetidentifierattributesattributeoptions.js
- attio-js/models/errors/postv2targetidentifierattributesattributestatuses
- attio-js/models/errors/postv2targetidentifierattributesattributestatuses.js
- attio-js/models/errors/postv2tasks
- attio-js/models/errors/postv2tasks.js
- attio-js/models/errors/postv2webhooks
- attio-js/models/errors/postv2webhooks.js
- attio-js/models/errors/putv2listslistentries
- attio-js/models/errors/putv2listslistentries.js
- attio-js/models/errors/putv2listslistentriesentryid
- attio-js/models/errors/putv2listslistentriesentryid.js
- attio-js/models/errors/putv2objectsobjectrecords
- attio-js/models/errors/putv2objectsobjectrecords.js
- attio-js/models/errors/putv2objectsobjectrecordsrecordid
- attio-js/models/errors/putv2objectsobjectrecordsrecordid.js
- attio-js/models/errors/sdkvalidationerror
- attio-js/models/errors/sdkvalidationerror.js
- attio-js/models/operations
- attio-js/models/operations/deletev2commentscommentid
- attio-js/models/operations/deletev2commentscommentid.js
- attio-js/models/operations/deletev2listslistentriesentryid
- attio-js/models/operations/deletev2listslistentriesentryid.js
- attio-js/models/operations/deletev2notesnoteid
- attio-js/models/operations/deletev2notesnoteid.js
- attio-js/models/operations/deletev2objectsobjectrecordsrecordid
- attio-js/models/operations/deletev2objectsobjectrecordsrecordid.js
- attio-js/models/operations/deletev2taskstaskid
- attio-js/models/operations/deletev2taskstaskid.js
- attio-js/models/operations/deletev2webhookswebhookid
- attio-js/models/operations/deletev2webhookswebhookid.js
- attio-js/models/operations/getv2commentscommentid
- attio-js/models/operations/getv2commentscommentid.js
- attio-js/models/operations/getv2lists
- attio-js/models/operations/getv2lists.js
- attio-js/models/operations/getv2listslist
- attio-js/models/operations/getv2listslist.js
- attio-js/models/operations/getv2listslistentriesentryid
- attio-js/models/operations/getv2listslistentriesentryid.js
- attio-js/models/operations/getv2listslistentriesentryidattributesattributevalues
- attio-js/models/operations/getv2listslistentriesentryidattributesattributevalues.js
- attio-js/models/operations/getv2notes
- attio-js/models/operations/getv2notes.js
- attio-js/models/operations/getv2notesnoteid
- attio-js/models/operations/getv2notesnoteid.js
- attio-js/models/operations/getv2objects
- attio-js/models/operations/getv2objects.js
- attio-js/models/operations/getv2objectsobject
- attio-js/models/operations/getv2objectsobject.js
- attio-js/models/operations/getv2objectsobjectrecordsrecordid
- attio-js/models/operations/getv2objectsobjectrecordsrecordid.js
- attio-js/models/operations/getv2objectsobjectrecordsrecordidattributesattributevalues
- attio-js/models/operations/getv2objectsobjectrecordsrecordidattributesattributevalues.js
- attio-js/models/operations/getv2objectsobjectrecordsrecordidentries
- attio-js/models/operations/getv2objectsobjectrecordsrecordidentries.js
- attio-js/models/operations/getv2self
- attio-js/models/operations/getv2self.js
- attio-js/models/operations/getv2targetidentifierattributes
- attio-js/models/operations/getv2targetidentifierattributes.js
- attio-js/models/operations/getv2targetidentifierattributesattribute
- attio-js/models/operations/getv2targetidentifierattributesattribute.js
- attio-js/models/operations/getv2targetidentifierattributesattributeoptions
- attio-js/models/operations/getv2targetidentifierattributesattributeoptions.js
- attio-js/models/operations/getv2targetidentifierattributesattributestatuses
- attio-js/models/operations/getv2targetidentifierattributesattributestatuses.js
- attio-js/models/operations/getv2tasks
- attio-js/models/operations/getv2tasks.js
- attio-js/models/operations/getv2taskstaskid
- attio-js/models/operations/getv2taskstaskid.js
- attio-js/models/operations/getv2threads
- attio-js/models/operations/getv2threads.js
- attio-js/models/operations/getv2threadsthreadid
- attio-js/models/operations/getv2threadsthreadid.js
- attio-js/models/operations/getv2webhooks
- attio-js/models/operations/getv2webhooks.js
- attio-js/models/operations/getv2webhookswebhookid
- attio-js/models/operations/getv2webhookswebhookid.js
- attio-js/models/operations/getv2workspacemembers
- attio-js/models/operations/getv2workspacemembers.js
- attio-js/models/operations/getv2workspacemembersworkspacememberid
- attio-js/models/operations/getv2workspacemembersworkspacememberid.js
- attio-js/models/operations/index
- attio-js/models/operations/index.js
- attio-js/models/operations/patchv2listslist
- attio-js/models/operations/patchv2listslist.js
- attio-js/models/operations/patchv2listslistentriesentryid
- attio-js/models/operations/patchv2listslistentriesentryid.js
- attio-js/models/operations/patchv2objectsobject
- attio-js/models/operations/patchv2objectsobject.js
- attio-js/models/operations/patchv2objectsobjectrecordsrecordid
- attio-js/models/operations/patchv2objectsobjectrecordsrecordid.js
- attio-js/models/operations/patchv2targetidentifierattributesattribute
- attio-js/models/operations/patchv2targetidentifierattributesattribute.js
- attio-js/models/operations/patchv2targetidentifierattributesattributeoptionsoption
- attio-js/models/operations/patchv2targetidentifierattributesattributeoptionsoption.js
- attio-js/models/operations/patchv2targetidentifierattributesattributestatusesstatus
- attio-js/models/operations/patchv2targetidentifierattributesattributestatusesstatus.js
- attio-js/models/operations/patchv2taskstaskid
- attio-js/models/operations/patchv2taskstaskid.js
- attio-js/models/operations/patchv2webhookswebhookid
- attio-js/models/operations/patchv2webhookswebhookid.js
- attio-js/models/operations/postv2comments
- attio-js/models/operations/postv2comments.js
- attio-js/models/operations/postv2lists
- attio-js/models/operations/postv2lists.js
- attio-js/models/operations/postv2listslistentries
- attio-js/models/operations/postv2listslistentries.js
- attio-js/models/operations/postv2listslistentriesquery
- attio-js/models/operations/postv2listslistentriesquery.js
- attio-js/models/operations/postv2notes
- attio-js/models/operations/postv2notes.js
- attio-js/models/operations/postv2objects
- attio-js/models/operations/postv2objects.js
- attio-js/models/operations/postv2objectsobjectrecords
- attio-js/models/operations/postv2objectsobjectrecords.js
- attio-js/models/operations/postv2objectsobjectrecordsquery
- attio-js/models/operations/postv2objectsobjectrecordsquery.js
- attio-js/models/operations/postv2targetidentifierattributes
- attio-js/models/operations/postv2targetidentifierattributes.js
- attio-js/models/operations/postv2targetidentifierattributesattributeoptions
- attio-js/models/operations/postv2targetidentifierattributesattributeoptions.js
- attio-js/models/operations/postv2targetidentifierattributesattributestatuses
- attio-js/models/operations/postv2targetidentifierattributesattributestatuses.js
- attio-js/models/operations/postv2tasks
- attio-js/models/operations/postv2tasks.js
- attio-js/models/operations/postv2webhooks
- attio-js/models/operations/postv2webhooks.js
- attio-js/models/operations/putv2listslistentries
- attio-js/models/operations/putv2listslistentries.js
- attio-js/models/operations/putv2listslistentriesentryid
- attio-js/models/operations/putv2listslistentriesentryid.js
- attio-js/models/operations/putv2objectsobjectrecords
- attio-js/models/operations/putv2objectsobjectrecords.js
- attio-js/models/operations/putv2objectsobjectrecordsrecordid
- attio-js/models/operations/putv2objectsobjectrecordsrecordid.js
- attio-js/package.json
- attio-js/sdk/attributes
- attio-js/sdk/attributes.js
- attio-js/sdk/comments
- attio-js/sdk/comments.js
- attio-js/sdk/entries
- attio-js/sdk/entries.js
- attio-js/sdk/index
- attio-js/sdk/index.js
- attio-js/sdk/lists
- attio-js/sdk/lists.js
- attio-js/sdk/meta
- attio-js/sdk/meta.js
- attio-js/sdk/notes
- attio-js/sdk/notes.js
- attio-js/sdk/objects
- attio-js/sdk/objects.js
- attio-js/sdk/records
- attio-js/sdk/records.js
- attio-js/sdk/sdk
- attio-js/sdk/sdk.js
- attio-js/sdk/tasks
- attio-js/sdk/tasks.js
- attio-js/sdk/threads
- attio-js/sdk/threads.js
- attio-js/sdk/webhooks
- attio-js/sdk/webhooks.js
- attio-js/sdk/workspacemembers
- attio-js/sdk/workspacemembers.js
- attio-js/types
- attio-js/types/async
- attio-js/types/async.js
- attio-js/types/blobs
- attio-js/types/blobs.js
- attio-js/types/constdatetime
- attio-js/types/constdatetime.js
- attio-js/types/enums
- attio-js/types/enums.js
- attio-js/types/fp
- attio-js/types/fp.js
- attio-js/types/index
- attio-js/types/index.js
- attio-js/types/operations
- attio-js/types/operations.js
- attio-js/types/rfcdate
- attio-js/types/rfcdate.js
- attio-js/types/streams
- attio-js/types/streams.js
Readme
Javascript & Typescript SDK for Attio
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
Summary
Attio is a CRM platform which is highly customisable, incredibly powerful and data-driven. The public API allows you to manipulate records, lists, notes, tasks and more. You can find more information about the Attio API in the official docs.
Unfortunately, an official JavaScript or TypeScript SDK has not been released yet. In the meantime, we maintain this unofficial SDK to bridge the gap until an official SDK becomes available.
Table of Contents
SDK Installation
The SDK can be installed with either npm, pnpm, bun or yarn package managers.
NPM
npm add <UNSET>PNPM
pnpm add <UNSET>Bun
bun add <UNSET>Yarn
yarn add <UNSET> zod
# Note that Yarn does not install peer dependencies automatically. You will need
# to install zod as shown above.[!NOTE] This package is published with CommonJS and ES Modules (ESM) support.
Model Context Protocol (MCP) Server
This SDK is also an installable MCP server where the various SDK methods are exposed as tools that can be invoked by AI applications.
Node.js v20 or greater is required to run the MCP server from npm.
Claude installation steps
Add the following server definition to your claude_desktop_config.json file:
{
"mcpServers": {
"Attio": {
"command": "npx",
"args": [
"-y", "--package", "attio-js",
"--",
"mcp", "start",
"--oauth2", "..."
]
}
}
}Cursor installation steps
Create a .cursor/mcp.json file in your project root with the following content:
{
"mcpServers": {
"Attio": {
"command": "npx",
"args": [
"-y", "--package", "attio-js",
"--",
"mcp", "start",
"--oauth2", "..."
]
}
}
}You can also run MCP servers as a standalone binary with no additional dependencies. You must pull these binaries from available Github releases:
curl -L -o mcp-server \
https://github.com/{org}/{repo}/releases/download/{tag}/mcp-server-bun-darwin-arm64 && \
chmod +x mcp-serverIf the repo is a private repo you must add your Github PAT to download a release -H "Authorization: Bearer {GITHUB_PAT}".
{
"mcpServers": {
"Todos": {
"command": "./DOWNLOAD/PATH/mcp-server",
"args": [
"start"
]
}
}
}For a full list of server arguments, run:
npx -y --package attio-js -- mcp start --helpRequirements
For supported JavaScript runtimes, please consult RUNTIMES.md.
SDK Example Usage
Example
import { Attio } from "attio-js";
const attio = new Attio({
oauth2: process.env["ATTIO_OAUTH2"] ?? "",
});
async function run() {
const result = await attio.objects.getV2Objects();
// Handle the result
console.log(result);
}
run();
Authentication
Per-Client Security Schemes
This SDK supports the following security scheme globally:
| Name | Type | Scheme | Environment Variable |
|---|---|---|---|
oauth2 |
oauth2 | OAuth2 token | ATTIO_OAUTH2 |
To authenticate with the API the oauth2 parameter must be set when initializing the SDK client instance. For example:
import { Attio } from "attio-js";
const attio = new Attio({
oauth2: process.env["ATTIO_OAUTH2"] ?? "",
});
async function run() {
const result = await attio.objects.getV2Objects();
// Handle the result
console.log(result);
}
run();
Available Resources and Operations
Available methods
attributes
- getV2TargetIdentifierAttributes - List attributes
- postV2TargetIdentifierAttributes - Create an attribute
- getV2TargetIdentifierAttributesAttribute - Get an attribute
- patchV2TargetIdentifierAttributesAttribute - Update an attribute
- getV2TargetIdentifierAttributesAttributeOptions - List select options
- postV2TargetIdentifierAttributesAttributeOptions - Create a select option
- patchV2TargetIdentifierAttributesAttributeOptionsOption - Update a select option
- getV2TargetIdentifierAttributesAttributeStatuses - List statuses
- postV2TargetIdentifierAttributesAttributeStatuses - Create a status
- patchV2TargetIdentifierAttributesAttributeStatusesStatus - Update a status
comments
- postV2Comments - Create a comment
- getV2CommentsCommentId - Get a comment
- deleteV2CommentsCommentId - Delete a comment
entries
- postV2ListsListEntriesQuery - List entries
- postV2ListsListEntries - Create an entry (add record to list)
- putV2ListsListEntries - Assert a list entry by parent
- getV2ListsListEntriesEntryId - Get a list entry
- patchV2ListsListEntriesEntryId - Update a list entry (append multiselect values)
- putV2ListsListEntriesEntryId - Update a list entry (overwrite multiselect values)
- deleteV2ListsListEntriesEntryId - Delete a list entry
- getV2ListsListEntriesEntryIdAttributesAttributeValues - List attribute values for a list entry
lists
- getV2Lists - List all lists
- postV2Lists - Create a list
- getV2ListsList - Get a list
- patchV2ListsList - Update a list
meta
- getV2Self - Identify
notes
- getV2Notes - List notes
- postV2Notes - Create a note
- getV2NotesNoteId - Get a note
- deleteV2NotesNoteId - Delete a note
objects
- getV2Objects - List objects
- postV2Objects - Create an object
- getV2ObjectsObject - Get an object
- patchV2ObjectsObject - Update an object
records
- postV2ObjectsObjectRecordsQuery - List records
- postV2ObjectsObjectRecords - Create a record
- putV2ObjectsObjectRecords - Assert a record
- getV2ObjectsObjectRecordsRecordId - Get a record
- patchV2ObjectsObjectRecordsRecordId - Update a record (append multiselect values)
- putV2ObjectsObjectRecordsRecordId - Update a record (overwrite multiselect values)
- deleteV2ObjectsObjectRecordsRecordId - Delete a record
- getV2ObjectsObjectRecordsRecordIdAttributesAttributeValues - List record attribute values
- getV2ObjectsObjectRecordsRecordIdEntries - List record entries
tasks
- getV2Tasks - List tasks
- postV2Tasks - Create a task
- getV2TasksTaskId - Get a task
- patchV2TasksTaskId - Update a task
- deleteV2TasksTaskId - Delete a task
threads
- getV2Threads - List threads
- getV2ThreadsThreadId - Get a thread
webhooks
- getV2Webhooks - List webhooks
- postV2Webhooks - Create a webhook
- getV2WebhooksWebhookId - Get a webhook
- patchV2WebhooksWebhookId - Update a webhook
- deleteV2WebhooksWebhookId - Delete a webhook
workspaceMembers
- getV2WorkspaceMembers - List workspace members
- getV2WorkspaceMembersWorkspaceMemberId - Get a workspace member
Standalone functions
All the methods listed above are available as standalone functions. These functions are ideal for use in applications running in the browser, serverless runtimes or other environments where application bundle size is a primary concern. When using a bundler to build your application, all unused functionality will be either excluded from the final bundle or tree-shaken away.
To read more about standalone functions, check FUNCTIONS.md.
Available standalone functions
attributesGetV2TargetIdentifierAttributes- List attributesattributesGetV2TargetIdentifierAttributesAttribute- Get an attributeattributesGetV2TargetIdentifierAttributesAttributeOptions- List select optionsattributesGetV2TargetIdentifierAttributesAttributeStatuses- List statusesattributesPatchV2TargetIdentifierAttributesAttribute- Update an attributeattributesPatchV2TargetIdentifierAttributesAttributeOptionsOption- Update a select optionattributesPatchV2TargetIdentifierAttributesAttributeStatusesStatus- Update a statusattributesPostV2TargetIdentifierAttributes- Create an attributeattributesPostV2TargetIdentifierAttributesAttributeOptions- Create a select optionattributesPostV2TargetIdentifierAttributesAttributeStatuses- Create a statuscommentsDeleteV2CommentsCommentId- Delete a commentcommentsGetV2CommentsCommentId- Get a commentcommentsPostV2Comments- Create a commententriesDeleteV2ListsListEntriesEntryId- Delete a list entryentriesGetV2ListsListEntriesEntryId- Get a list entryentriesGetV2ListsListEntriesEntryIdAttributesAttributeValues- List attribute values for a list entryentriesPatchV2ListsListEntriesEntryId- Update a list entry (append multiselect values)entriesPostV2ListsListEntries- Create an entry (add record to list)entriesPostV2ListsListEntriesQuery- List entriesentriesPutV2ListsListEntries- Assert a list entry by parententriesPutV2ListsListEntriesEntryId- Update a list entry (overwrite multiselect values)listsGetV2Lists- List all listslistsGetV2ListsList- Get a listlistsPatchV2ListsList- Update a listlistsPostV2Lists- Create a listmetaGetV2Self- IdentifynotesDeleteV2NotesNoteId- Delete a notenotesGetV2Notes- List notesnotesGetV2NotesNoteId- Get a notenotesPostV2Notes- Create a noteobjectsGetV2Objects- List objectsobjectsGetV2ObjectsObject- Get an objectobjectsPatchV2ObjectsObject- Update an objectobjectsPostV2Objects- Create an objectrecordsDeleteV2ObjectsObjectRecordsRecordId- Delete a recordrecordsGetV2ObjectsObjectRecordsRecordId- Get a recordrecordsGetV2ObjectsObjectRecordsRecordIdAttributesAttributeValues- List record attribute valuesrecordsGetV2ObjectsObjectRecordsRecordIdEntries- List record entriesrecordsPatchV2ObjectsObjectRecordsRecordId- Update a record (append multiselect values)recordsPostV2ObjectsObjectRecords- Create a recordrecordsPostV2ObjectsObjectRecordsQuery- List recordsrecordsPutV2ObjectsObjectRecords- Assert a recordrecordsPutV2ObjectsObjectRecordsRecordId- Update a record (overwrite multiselect values)tasksDeleteV2TasksTaskId- Delete a tasktasksGetV2Tasks- List taskstasksGetV2TasksTaskId- Get a tasktasksPatchV2TasksTaskId- Update a tasktasksPostV2Tasks- Create a taskthreadsGetV2Threads- List threadsthreadsGetV2ThreadsThreadId- Get a threadwebhooksDeleteV2WebhooksWebhookId- Delete a webhookwebhooksGetV2Webhooks- List webhookswebhooksGetV2WebhooksWebhookId- Get a webhookwebhooksPatchV2WebhooksWebhookId- Update a webhookwebhooksPostV2Webhooks- Create a webhookworkspaceMembersGetV2WorkspaceMembers- List workspace membersworkspaceMembersGetV2WorkspaceMembersWorkspaceMemberId- Get a workspace member
Retries
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
import { Attio } from "attio-js";
const attio = new Attio({
oauth2: process.env["ATTIO_OAUTH2"] ?? "",
});
async function run() {
const result = await attio.objects.getV2Objects({
retries: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
});
// Handle the result
console.log(result);
}
run();
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
import { Attio } from "attio-js";
const attio = new Attio({
retryConfig: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
oauth2: process.env["ATTIO_OAUTH2"] ?? "",
});
async function run() {
const result = await attio.objects.getV2Objects();
// Handle the result
console.log(result);
}
run();
Error Handling
Some methods specify known errors which can be thrown. All the known errors are enumerated in the models/errors/errors.ts module. The known errors for a method are documented under the Errors tables in SDK docs. For example, the postV2Objects method may throw the following errors:
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.PostV2ObjectsResponseBody | 409 | application/json |
| errors.APIError | 4XX, 5XX | */* |
If the method throws an error and it is not captured by the known errors, it will default to throwing a APIError.
import { Attio } from "attio-js";
import {
PostV2ObjectsResponseBody,
SDKValidationError,
} from "attio-js/models/errors";
const attio = new Attio({
oauth2: process.env["ATTIO_OAUTH2"] ?? "",
});
async function run() {
let result;
try {
result = await attio.objects.postV2Objects({
data: {
apiSlug: "people",
singularNoun: "Person",
pluralNoun: "People",
},
});
// Handle the result
console.log(result);
} catch (err) {
switch (true) {
// The server response does not match the expected SDK schema
case (err instanceof SDKValidationError): {
// Pretty-print will provide a human-readable multi-line error message
console.error(err.pretty());
// Raw value may also be inspected
console.error(err.rawValue);
return;
}
case (err instanceof PostV2ObjectsResponseBody): {
// Handle err.data$: PostV2ObjectsResponseBodyData
console.error(err);
return;
}
default: {
// Other errors such as network errors, see HTTPClientErrors for more details
throw err;
}
}
}
}
run();
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The SDKValidationError that is thrown as a result will capture the raw value that failed validation in an attribute called rawValue. Additionally, a pretty() method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.
In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the models/errors/httpclienterrors.ts module:
| HTTP Client Error | Description |
|---|---|
| RequestAbortedError | HTTP request was aborted by the client |
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
| ConnectionError | HTTP client was unable to make a request to a server |
| InvalidRequestError | Any input used to create a request is invalid |
| UnexpectedClientError | Unrecognised or unexpected error |
Server Selection
Override Server URL Per-Client
The default server can be overridden globally by passing a URL to the serverURL: string optional parameter when initializing the SDK client instance. For example:
import { Attio } from "attio-js";
const attio = new Attio({
serverURL: "https://api.attio.com",
oauth2: process.env["ATTIO_OAUTH2"] ?? "",
});
async function run() {
const result = await attio.objects.getV2Objects();
// Handle the result
console.log(result);
}
run();
Custom HTTP Client
The TypeScript SDK makes API calls using an HTTPClient that wraps the native
Fetch API. This
client is a thin wrapper around fetch and provides the ability to attach hooks
around the request lifecycle that can be used to modify the request or handle
errors and response.
The HTTPClient constructor takes an optional fetcher argument that can be
used to integrate a third-party HTTP client or when writing tests to mock out
the HTTP client and feed in fixtures.
The following example shows how to use the "beforeRequest" hook to to add a
custom header and a timeout to requests and how to use the "requestError" hook
to log errors:
import { Attio } from "attio-js";
import { HTTPClient } from "attio-js/lib/http";
const httpClient = new HTTPClient({
// fetcher takes a function that has the same signature as native `fetch`.
fetcher: (request) => {
return fetch(request);
}
});
httpClient.addHook("beforeRequest", (request) => {
const nextRequest = new Request(request, {
signal: request.signal || AbortSignal.timeout(5000)
});
nextRequest.headers.set("x-custom-header", "custom value");
return nextRequest;
});
httpClient.addHook("requestError", (error, request) => {
console.group("Request Error");
console.log("Reason:", `${error}`);
console.log("Endpoint:", `${request.method} ${request.url}`);
console.groupEnd();
});
const sdk = new Attio({ httpClient });Debugging
You can setup your SDK to emit debug logs for SDK requests and responses.
You can pass a logger that matches console's interface as an SDK option.
[!WARNING] Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
import { Attio } from "attio-js";
const sdk = new Attio({ debugLogger: console });You can also enable a default debug logger by setting an environment variable ATTIO_DEBUG to true.
Development
Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
Contributions
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.