@athenaintel/sdk 4.3.309 → 4.3.310
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/README.md +117 -9
- package/dist/cjs/BaseClient.d.ts +14 -1
- package/dist/cjs/BaseClient.js +59 -0
- package/dist/cjs/Client.d.ts +24 -23
- package/dist/cjs/Client.js +10 -51
- package/dist/cjs/api/errors/BadRequestError.d.ts +1 -1
- package/dist/cjs/api/errors/ContentTooLargeError.d.ts +2 -2
- package/dist/cjs/api/errors/ForbiddenError.d.ts +1 -1
- package/dist/cjs/api/errors/InternalServerError.d.ts +1 -1
- package/dist/cjs/api/errors/NotFoundError.d.ts +1 -1
- package/dist/cjs/api/errors/NotImplementedError.d.ts +1 -1
- package/dist/cjs/api/errors/ServiceUnavailableError.d.ts +1 -1
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +1 -1
- package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -1
- package/dist/cjs/api/errors/UnsupportedMediaTypeError.d.ts +2 -2
- package/dist/cjs/api/errors/index.d.ts +5 -5
- package/dist/cjs/api/errors/index.js +5 -5
- package/dist/cjs/api/index.d.ts +1 -1
- package/dist/cjs/api/index.js +1 -1
- package/dist/cjs/api/resources/agents/client/Client.d.ts +20 -20
- package/dist/cjs/api/resources/agents/client/Client.js +29 -26
- package/dist/cjs/api/resources/agents/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/agents/resources/drive/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/agents/resources/drive/client/Client.js +20 -17
- package/dist/cjs/api/resources/agents/resources/drive/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/drive/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/agents/resources/general/client/Client.d.ts +11 -11
- package/dist/cjs/api/resources/agents/resources/general/client/Client.js +42 -23
- package/dist/cjs/api/resources/agents/resources/index.d.ts +3 -3
- package/dist/cjs/api/resources/agents/resources/index.js +6 -6
- package/dist/cjs/api/resources/agents/resources/research/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/agents/resources/research/client/Client.js +20 -17
- package/dist/cjs/api/resources/agents/resources/research/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/research/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/agents/resources/sql/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/agents/resources/sql/client/Client.js +20 -17
- package/dist/cjs/api/resources/agents/resources/sql/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/sql/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/aop/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/aop/client/Client.js +31 -20
- package/dist/cjs/api/resources/assets/client/Client.d.ts +14 -14
- package/dist/cjs/api/resources/assets/client/Client.js +62 -35
- package/dist/cjs/api/resources/assets/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/assets/client/requests/CreateAssetRequestIn.d.ts +1 -1
- package/dist/cjs/api/resources/assets/client/requests/index.d.ts +3 -3
- package/dist/cjs/api/resources/databases/client/Client.d.ts +28 -28
- package/dist/cjs/api/resources/databases/client/Client.js +118 -75
- package/dist/cjs/api/resources/databases/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/databases/client/requests/DatabasesDeleteRequest.d.ts +1 -1
- package/dist/cjs/api/resources/databases/client/requests/index.d.ts +4 -4
- package/dist/cjs/api/resources/index.d.ts +8 -8
- package/dist/cjs/api/resources/index.js +12 -12
- package/dist/cjs/api/resources/query/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/query/client/Client.js +34 -23
- package/dist/cjs/api/resources/query/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/query/client/requests/QueryExecuteRequest.d.ts +1 -1
- package/dist/cjs/api/resources/query/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/query/index.d.ts +1 -1
- package/dist/cjs/api/resources/query/index.js +1 -1
- package/dist/cjs/api/resources/threads/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/threads/client/Client.js +25 -22
- package/dist/cjs/api/resources/tools/client/Client.d.ts +33 -33
- package/dist/cjs/api/resources/tools/client/Client.js +106 -55
- package/dist/cjs/api/resources/tools/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/tools/client/requests/BodySaveAssetApiV0ToolsFileSavePost.d.ts +2 -2
- package/dist/cjs/api/resources/tools/client/requests/ToolsDataFrameRequest.d.ts +1 -1
- package/dist/cjs/api/resources/tools/client/requests/index.d.ts +7 -7
- package/dist/cjs/api/resources/tools/index.d.ts +1 -1
- package/dist/cjs/api/resources/tools/index.js +1 -1
- package/dist/cjs/api/resources/tools/resources/calendar/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/tools/resources/calendar/client/Client.js +30 -19
- package/dist/cjs/api/resources/tools/resources/email/client/Client.d.ts +11 -11
- package/dist/cjs/api/resources/tools/resources/email/client/Client.js +41 -22
- package/dist/cjs/api/resources/tools/resources/index.d.ts +3 -3
- package/dist/cjs/api/resources/tools/resources/index.js +3 -3
- package/dist/cjs/api/resources/tools/resources/sheets/client/Client.d.ts +39 -39
- package/dist/cjs/api/resources/tools/resources/sheets/client/Client.js +196 -65
- package/dist/cjs/api/resources/tools/resources/sheets/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/tools/resources/sheets/client/requests/CreateNewSheetTabRequest.d.ts +1 -1
- package/dist/cjs/api/resources/tools/resources/sheets/client/requests/FormatSheetRangeRequest.d.ts +1 -1
- package/dist/cjs/api/resources/tools/resources/sheets/client/requests/InsertTableRowRequest.d.ts +1 -1
- package/dist/cjs/api/resources/tools/resources/sheets/client/requests/UpdateSheetRangeRequest.d.ts +1 -1
- package/dist/cjs/api/resources/tools/resources/sheets/client/requests/index.d.ts +17 -17
- package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/Client.js +20 -17
- package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/requests/StructuredDataExtractorRequest.d.ts +1 -1
- package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/tools/resources/tasks/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/tools/resources/tasks/client/Client.js +20 -17
- package/dist/cjs/api/resources/tools/resources/tasks/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/tools/resources/tasks/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/types/AopExecuteResponseOut.d.ts +1 -1
- package/dist/cjs/api/types/AssetNode.d.ts +1 -1
- package/dist/cjs/api/types/BorderModel.d.ts +1 -1
- package/dist/cjs/api/types/BordersModel.d.ts +1 -1
- package/dist/cjs/api/types/CellFormat.d.ts +1 -1
- package/dist/cjs/api/types/Chunk.d.ts +1 -1
- package/dist/cjs/api/types/ChunkContentItem.d.ts +1 -1
- package/dist/cjs/api/types/ConversationAssetInfo.d.ts +1 -1
- package/dist/cjs/api/types/ConversationMessage.d.ts +1 -1
- package/dist/cjs/api/types/ConversationResult.d.ts +1 -1
- package/dist/cjs/api/types/DatabaseTableSchemaResponse.d.ts +1 -1
- package/dist/cjs/api/types/DatabaseTablesResponse.d.ts +1 -1
- package/dist/cjs/api/types/FolderResponse.d.ts +1 -1
- package/dist/cjs/api/types/GeneralAgentRequest.d.ts +1 -1
- package/dist/cjs/api/types/GeneralAgentResponse.d.ts +1 -1
- package/dist/cjs/api/types/GeneralAgentResponseMessage.d.ts +1 -1
- package/dist/cjs/api/types/GeneralAgentResponseMessageKwargs.d.ts +1 -1
- package/dist/cjs/api/types/InputMessage.d.ts +1 -1
- package/dist/cjs/api/types/InputMessageContentItem.d.ts +1 -1
- package/dist/cjs/api/types/NumberFormatModel.d.ts +1 -1
- package/dist/cjs/api/types/PaginatedAssetsOut.d.ts +1 -1
- package/dist/cjs/api/types/Sheet.d.ts +1 -1
- package/dist/cjs/api/types/StructuredDataExtractorResponse.d.ts +1 -1
- package/dist/cjs/api/types/TextFormatModel.d.ts +1 -1
- package/dist/cjs/api/types/ThreadStatusResponseOut.d.ts +1 -1
- package/dist/cjs/api/types/index.d.ts +5 -5
- package/dist/cjs/api/types/index.js +5 -5
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +14 -0
- package/dist/cjs/auth/HeaderAuthProvider.js +71 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +27 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
- package/dist/cjs/core/auth/BearerToken.js +16 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +5 -0
- package/dist/cjs/core/auth/index.js +9 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/exports.d.ts +1 -0
- package/dist/cjs/core/exports.js +1 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +1 -1
- package/dist/cjs/core/fetcher/Fetcher.d.ts +9 -2
- package/dist/cjs/core/fetcher/Fetcher.js +204 -9
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +2 -1
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
- package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +21 -7
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/cjs/core/fetcher/makeRequest.js +2 -4
- package/dist/cjs/core/fetcher/requestWithRetries.js +3 -12
- package/dist/cjs/core/fetcher/signals.d.ts +1 -7
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/file/file.d.ts +5 -0
- package/dist/cjs/core/file/file.js +25 -7
- package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +2 -3
- package/dist/cjs/core/form-data-utils/FormDataWrapper.js +62 -85
- package/dist/cjs/core/headers.js +6 -4
- package/dist/cjs/core/index.d.ts +5 -2
- package/dist/cjs/core/index.js +6 -3
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/runtime/runtime.js +11 -10
- package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
- package/dist/cjs/core/url/encodePathParam.js +21 -0
- package/dist/cjs/core/url/index.d.ts +1 -0
- package/dist/cjs/core/url/index.js +3 -1
- package/dist/cjs/core/url/join.js +3 -4
- package/dist/cjs/errors/AthenaIntelligenceError.d.ts +1 -1
- package/dist/cjs/errors/AthenaIntelligenceError.js +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +14 -1
- package/dist/esm/BaseClient.mjs +23 -1
- package/dist/esm/Client.d.mts +24 -23
- package/dist/esm/Client.mjs +17 -26
- package/dist/esm/api/errors/BadRequestError.d.mts +1 -1
- package/dist/esm/api/errors/BadRequestError.mjs +0 -1
- package/dist/esm/api/errors/ContentTooLargeError.d.mts +2 -2
- package/dist/esm/api/errors/ContentTooLargeError.mjs +0 -2
- package/dist/esm/api/errors/ForbiddenError.d.mts +1 -1
- package/dist/esm/api/errors/ForbiddenError.mjs +0 -1
- package/dist/esm/api/errors/InternalServerError.d.mts +1 -1
- package/dist/esm/api/errors/InternalServerError.mjs +0 -1
- package/dist/esm/api/errors/NotFoundError.d.mts +1 -1
- package/dist/esm/api/errors/NotFoundError.mjs +0 -1
- package/dist/esm/api/errors/NotImplementedError.d.mts +1 -1
- package/dist/esm/api/errors/NotImplementedError.mjs +0 -1
- package/dist/esm/api/errors/ServiceUnavailableError.d.mts +1 -1
- package/dist/esm/api/errors/ServiceUnavailableError.mjs +0 -1
- package/dist/esm/api/errors/UnauthorizedError.d.mts +1 -1
- package/dist/esm/api/errors/UnauthorizedError.mjs +0 -1
- package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -1
- package/dist/esm/api/errors/UnprocessableEntityError.mjs +0 -1
- package/dist/esm/api/errors/UnsupportedMediaTypeError.d.mts +2 -2
- package/dist/esm/api/errors/UnsupportedMediaTypeError.mjs +0 -2
- package/dist/esm/api/errors/index.d.mts +5 -5
- package/dist/esm/api/errors/index.mjs +5 -5
- package/dist/esm/api/index.d.mts +1 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/resources/agents/client/Client.d.mts +20 -20
- package/dist/esm/api/resources/agents/client/Client.mjs +31 -28
- package/dist/esm/api/resources/agents/client/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/client/index.mjs +0 -1
- package/dist/esm/api/resources/agents/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/agents/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/agents/resources/drive/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/agents/resources/drive/client/Client.mjs +18 -15
- package/dist/esm/api/resources/agents/resources/drive/client/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/resources/drive/client/index.mjs +0 -1
- package/dist/esm/api/resources/agents/resources/drive/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/agents/resources/drive/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/agents/resources/general/client/Client.d.mts +11 -11
- package/dist/esm/api/resources/agents/resources/general/client/Client.mjs +40 -21
- package/dist/esm/api/resources/agents/resources/index.d.mts +3 -3
- package/dist/esm/api/resources/agents/resources/index.mjs +3 -3
- package/dist/esm/api/resources/agents/resources/research/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/agents/resources/research/client/Client.mjs +18 -15
- package/dist/esm/api/resources/agents/resources/research/client/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/resources/research/client/index.mjs +0 -1
- package/dist/esm/api/resources/agents/resources/research/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/agents/resources/research/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/agents/resources/sql/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/agents/resources/sql/client/Client.mjs +18 -15
- package/dist/esm/api/resources/agents/resources/sql/client/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/resources/sql/client/index.mjs +0 -1
- package/dist/esm/api/resources/agents/resources/sql/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/agents/resources/sql/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/aop/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/aop/client/Client.mjs +29 -18
- package/dist/esm/api/resources/assets/client/Client.d.mts +14 -14
- package/dist/esm/api/resources/assets/client/Client.mjs +60 -33
- package/dist/esm/api/resources/assets/client/index.d.mts +0 -1
- package/dist/esm/api/resources/assets/client/index.mjs +0 -1
- package/dist/esm/api/resources/assets/client/requests/CreateAssetRequestIn.d.mts +1 -1
- package/dist/esm/api/resources/assets/client/requests/CreateAssetRequestIn.mjs +1 -1
- package/dist/esm/api/resources/assets/client/requests/index.d.mts +3 -3
- package/dist/esm/api/resources/assets/client/requests/index.mjs +1 -3
- package/dist/esm/api/resources/databases/client/Client.d.mts +28 -28
- package/dist/esm/api/resources/databases/client/Client.mjs +116 -73
- package/dist/esm/api/resources/databases/client/index.d.mts +0 -1
- package/dist/esm/api/resources/databases/client/index.mjs +0 -1
- package/dist/esm/api/resources/databases/client/requests/DatabasesDeleteRequest.d.mts +1 -1
- package/dist/esm/api/resources/databases/client/requests/DatabasesDeleteRequest.mjs +1 -1
- package/dist/esm/api/resources/databases/client/requests/index.d.mts +4 -4
- package/dist/esm/api/resources/databases/client/requests/index.mjs +1 -4
- package/dist/esm/api/resources/index.d.mts +8 -8
- package/dist/esm/api/resources/index.mjs +8 -8
- package/dist/esm/api/resources/query/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/query/client/Client.mjs +32 -21
- package/dist/esm/api/resources/query/client/index.d.mts +0 -1
- package/dist/esm/api/resources/query/client/index.mjs +0 -1
- package/dist/esm/api/resources/query/client/requests/QueryExecuteRequest.d.mts +1 -1
- package/dist/esm/api/resources/query/client/requests/QueryExecuteRequest.mjs +1 -1
- package/dist/esm/api/resources/query/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/query/client/requests/index.mjs +1 -2
- package/dist/esm/api/resources/query/index.d.mts +1 -1
- package/dist/esm/api/resources/query/index.mjs +1 -1
- package/dist/esm/api/resources/threads/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/threads/client/Client.mjs +23 -20
- package/dist/esm/api/resources/tools/client/Client.d.mts +33 -33
- package/dist/esm/api/resources/tools/client/Client.mjs +109 -59
- package/dist/esm/api/resources/tools/client/index.d.mts +0 -1
- package/dist/esm/api/resources/tools/client/index.mjs +0 -1
- package/dist/esm/api/resources/tools/client/requests/BodySaveAssetApiV0ToolsFileSavePost.d.mts +2 -2
- package/dist/esm/api/resources/tools/client/requests/BodySaveAssetApiV0ToolsFileSavePost.mjs +1 -2
- package/dist/esm/api/resources/tools/client/requests/ToolsDataFrameRequest.d.mts +1 -1
- package/dist/esm/api/resources/tools/client/requests/ToolsDataFrameRequest.mjs +1 -1
- package/dist/esm/api/resources/tools/client/requests/index.d.mts +7 -7
- package/dist/esm/api/resources/tools/client/requests/index.mjs +1 -7
- package/dist/esm/api/resources/tools/index.d.mts +1 -1
- package/dist/esm/api/resources/tools/index.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/calendar/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/tools/resources/calendar/client/Client.mjs +28 -17
- package/dist/esm/api/resources/tools/resources/email/client/Client.d.mts +11 -11
- package/dist/esm/api/resources/tools/resources/email/client/Client.mjs +39 -20
- package/dist/esm/api/resources/tools/resources/index.d.mts +3 -3
- package/dist/esm/api/resources/tools/resources/index.mjs +3 -3
- package/dist/esm/api/resources/tools/resources/sheets/client/Client.d.mts +39 -39
- package/dist/esm/api/resources/tools/resources/sheets/client/Client.mjs +194 -63
- package/dist/esm/api/resources/tools/resources/sheets/client/index.d.mts +0 -1
- package/dist/esm/api/resources/tools/resources/sheets/client/index.mjs +0 -1
- package/dist/esm/api/resources/tools/resources/sheets/client/requests/CreateNewSheetTabRequest.d.mts +1 -1
- package/dist/esm/api/resources/tools/resources/sheets/client/requests/CreateNewSheetTabRequest.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/sheets/client/requests/FormatSheetRangeRequest.d.mts +1 -1
- package/dist/esm/api/resources/tools/resources/sheets/client/requests/FormatSheetRangeRequest.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/sheets/client/requests/InsertTableRowRequest.d.mts +1 -1
- package/dist/esm/api/resources/tools/resources/sheets/client/requests/InsertTableRowRequest.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/sheets/client/requests/UpdateSheetRangeRequest.d.mts +1 -1
- package/dist/esm/api/resources/tools/resources/sheets/client/requests/UpdateSheetRangeRequest.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/sheets/client/requests/index.d.mts +17 -17
- package/dist/esm/api/resources/tools/resources/sheets/client/requests/index.mjs +1 -17
- package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/Client.mjs +18 -15
- package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/index.d.mts +0 -1
- package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/index.mjs +0 -1
- package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/requests/StructuredDataExtractorRequest.d.mts +1 -1
- package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/requests/StructuredDataExtractorRequest.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/tasks/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/tools/resources/tasks/client/Client.mjs +18 -15
- package/dist/esm/api/resources/tools/resources/tasks/client/index.d.mts +0 -1
- package/dist/esm/api/resources/tools/resources/tasks/client/index.mjs +0 -1
- package/dist/esm/api/resources/tools/resources/tasks/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/tools/resources/tasks/client/requests/index.mjs +1 -1
- package/dist/esm/api/types/AopExecuteResponseOut.d.mts +1 -1
- package/dist/esm/api/types/AopExecuteResponseOut.mjs +1 -1
- package/dist/esm/api/types/AssetNode.d.mts +1 -1
- package/dist/esm/api/types/AssetNode.mjs +1 -1
- package/dist/esm/api/types/BorderModel.d.mts +1 -1
- package/dist/esm/api/types/BorderModel.mjs +1 -1
- package/dist/esm/api/types/BordersModel.d.mts +1 -1
- package/dist/esm/api/types/BordersModel.mjs +1 -1
- package/dist/esm/api/types/CellFormat.d.mts +1 -1
- package/dist/esm/api/types/CellFormat.mjs +0 -1
- package/dist/esm/api/types/Chunk.d.mts +1 -1
- package/dist/esm/api/types/Chunk.mjs +1 -1
- package/dist/esm/api/types/ChunkContentItem.d.mts +1 -1
- package/dist/esm/api/types/ChunkContentItem.mjs +1 -1
- package/dist/esm/api/types/ConversationAssetInfo.d.mts +1 -1
- package/dist/esm/api/types/ConversationAssetInfo.mjs +1 -1
- package/dist/esm/api/types/ConversationMessage.d.mts +1 -1
- package/dist/esm/api/types/ConversationMessage.mjs +1 -1
- package/dist/esm/api/types/ConversationResult.d.mts +1 -1
- package/dist/esm/api/types/ConversationResult.mjs +1 -1
- package/dist/esm/api/types/DatabaseTableSchemaResponse.d.mts +1 -1
- package/dist/esm/api/types/DatabaseTableSchemaResponse.mjs +1 -1
- package/dist/esm/api/types/DatabaseTablesResponse.d.mts +1 -1
- package/dist/esm/api/types/DatabaseTablesResponse.mjs +1 -1
- package/dist/esm/api/types/FolderResponse.d.mts +1 -1
- package/dist/esm/api/types/FolderResponse.mjs +1 -1
- package/dist/esm/api/types/GeneralAgentRequest.d.mts +1 -1
- package/dist/esm/api/types/GeneralAgentRequest.mjs +1 -1
- package/dist/esm/api/types/GeneralAgentResponse.d.mts +1 -1
- package/dist/esm/api/types/GeneralAgentResponse.mjs +1 -1
- package/dist/esm/api/types/GeneralAgentResponseMessage.d.mts +1 -1
- package/dist/esm/api/types/GeneralAgentResponseMessage.mjs +1 -1
- package/dist/esm/api/types/GeneralAgentResponseMessageKwargs.d.mts +1 -1
- package/dist/esm/api/types/GeneralAgentResponseMessageKwargs.mjs +1 -1
- package/dist/esm/api/types/InputMessage.d.mts +1 -1
- package/dist/esm/api/types/InputMessage.mjs +1 -1
- package/dist/esm/api/types/InputMessageContentItem.d.mts +1 -1
- package/dist/esm/api/types/InputMessageContentItem.mjs +1 -1
- package/dist/esm/api/types/NumberFormatModel.d.mts +1 -1
- package/dist/esm/api/types/NumberFormatModel.mjs +1 -1
- package/dist/esm/api/types/PaginatedAssetsOut.d.mts +1 -1
- package/dist/esm/api/types/PaginatedAssetsOut.mjs +1 -1
- package/dist/esm/api/types/Sheet.d.mts +1 -1
- package/dist/esm/api/types/Sheet.mjs +1 -1
- package/dist/esm/api/types/StructuredDataExtractorResponse.d.mts +1 -1
- package/dist/esm/api/types/StructuredDataExtractorResponse.mjs +1 -1
- package/dist/esm/api/types/TextFormatModel.d.mts +1 -1
- package/dist/esm/api/types/TextFormatModel.mjs +1 -1
- package/dist/esm/api/types/ThreadStatusResponseOut.d.mts +1 -1
- package/dist/esm/api/types/ThreadStatusResponseOut.mjs +1 -1
- package/dist/esm/api/types/index.d.mts +5 -5
- package/dist/esm/api/types/index.mjs +5 -5
- package/dist/esm/auth/HeaderAuthProvider.d.mts +14 -0
- package/dist/esm/auth/HeaderAuthProvider.mjs +34 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +24 -0
- package/dist/esm/core/auth/BearerToken.d.mts +7 -0
- package/dist/esm/core/auth/BearerToken.mjs +13 -0
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +5 -0
- package/dist/esm/core/auth/index.mjs +3 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/exports.d.mts +1 -0
- package/dist/esm/core/exports.mjs +1 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +1 -1
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +0 -1
- package/dist/esm/core/fetcher/Fetcher.d.mts +9 -2
- package/dist/esm/core/fetcher/Fetcher.mjs +204 -9
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +2 -1
- package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
- package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +21 -7
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +2 -4
- package/dist/esm/core/fetcher/requestWithRetries.mjs +3 -12
- package/dist/esm/core/fetcher/signals.d.mts +1 -7
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/file/file.d.mts +5 -0
- package/dist/esm/core/file/file.mjs +24 -7
- package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +2 -3
- package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +59 -82
- package/dist/esm/core/headers.mjs +6 -4
- package/dist/esm/core/index.d.mts +5 -2
- package/dist/esm/core/index.mjs +5 -2
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/runtime/runtime.mjs +11 -10
- package/dist/esm/core/url/encodePathParam.d.mts +1 -0
- package/dist/esm/core/url/encodePathParam.mjs +18 -0
- package/dist/esm/core/url/index.d.mts +1 -0
- package/dist/esm/core/url/index.mjs +1 -0
- package/dist/esm/core/url/join.mjs +3 -4
- package/dist/esm/errors/AthenaIntelligenceError.d.mts +1 -1
- package/dist/esm/errors/AthenaIntelligenceError.mjs +1 -2
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +11 -5
- package/reference.md +450 -490
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
- package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
package/README.md
CHANGED
|
@@ -43,17 +43,15 @@ import { AthenaIntelligenceClient } from "@athenaintel/sdk";
|
|
|
43
43
|
const client = new AthenaIntelligenceClient({ apiKey: "YOUR_API_KEY" });
|
|
44
44
|
await client.agents.invokeById("agent_id", {
|
|
45
45
|
config: {
|
|
46
|
-
key: "value"
|
|
46
|
+
"key": "value"
|
|
47
47
|
},
|
|
48
|
-
messages: [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
],
|
|
48
|
+
messages: [{
|
|
49
|
+
"key": "value"
|
|
50
|
+
}]
|
|
53
51
|
});
|
|
54
52
|
```
|
|
55
53
|
|
|
56
|
-
## Request
|
|
54
|
+
## Request And Response Types
|
|
57
55
|
|
|
58
56
|
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
|
|
59
57
|
following namespace:
|
|
@@ -86,6 +84,51 @@ try {
|
|
|
86
84
|
}
|
|
87
85
|
```
|
|
88
86
|
|
|
87
|
+
## File Uploads
|
|
88
|
+
|
|
89
|
+
You can upload files using the client:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
import { createReadStream } from "fs";
|
|
93
|
+
import { AthenaIntelligenceClient } from "@athenaintel/sdk";
|
|
94
|
+
import * as fs from "fs";
|
|
95
|
+
|
|
96
|
+
const client = new AthenaIntelligenceClient({ apiKey: "YOUR_API_KEY" });
|
|
97
|
+
await client.tools.saveAsset({
|
|
98
|
+
file: fs.createReadStream("/path/to/your/file"),
|
|
99
|
+
parent_folder_id: "parent_folder_id"
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
The client accepts a variety of types for file upload parameters:
|
|
103
|
+
* Stream types: `fs.ReadStream`, `stream.Readable`, and `ReadableStream`
|
|
104
|
+
* Buffered types: `Buffer`, `Blob`, `File`, `ArrayBuffer`, `ArrayBufferView`, and `Uint8Array`
|
|
105
|
+
|
|
106
|
+
### Metadata
|
|
107
|
+
|
|
108
|
+
You can configure metadata when uploading a file:
|
|
109
|
+
```typescript
|
|
110
|
+
const file: Uploadable.WithMetadata = {
|
|
111
|
+
data: createReadStream("path/to/file"),
|
|
112
|
+
filename: "my-file", // optional
|
|
113
|
+
contentType: "audio/mpeg", // optional
|
|
114
|
+
contentLength: 1949, // optional
|
|
115
|
+
};
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Alternatively, you can upload a file directly from a file path:
|
|
119
|
+
```typescript
|
|
120
|
+
const file : Uploadable.FromPath = {
|
|
121
|
+
path: "path/to/file",
|
|
122
|
+
filename: "my-file", // optional
|
|
123
|
+
contentType: "audio/mpeg", // optional
|
|
124
|
+
contentLength: 1949, // optional
|
|
125
|
+
};
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The metadata is used to set the `Content-Length`, `Content-Type`, and `Content-Disposition` headers. If not provided, the client will attempt to determine them automatically.
|
|
129
|
+
For example, `fs.ReadStream` has a `path` property which the SDK uses to retrieve the file size from the filesystem without loading it into memory.
|
|
130
|
+
|
|
131
|
+
|
|
89
132
|
## Binary Response
|
|
90
133
|
|
|
91
134
|
You can consume binary data from endpoints using the `BinaryResponse` type which lets you choose how to consume the data:
|
|
@@ -100,7 +143,6 @@ const stream: ReadableStream<Uint8Array> = response.stream();
|
|
|
100
143
|
// If you want to check if the response body has been used, you can use the following property.
|
|
101
144
|
const bodyUsed = response.bodyUsed;
|
|
102
145
|
```
|
|
103
|
-
|
|
104
146
|
<details>
|
|
105
147
|
<summary>Save binary response to a file</summary>
|
|
106
148
|
|
|
@@ -556,10 +598,76 @@ console.log(data);
|
|
|
556
598
|
console.log(rawResponse.headers['X-My-Header']);
|
|
557
599
|
```
|
|
558
600
|
|
|
601
|
+
### Logging
|
|
602
|
+
|
|
603
|
+
The SDK supports logging. You can configure the logger by passing in a `logging` object to the client options.
|
|
604
|
+
|
|
605
|
+
```typescript
|
|
606
|
+
import { AthenaIntelligenceClient, logging } from "@athenaintel/sdk";
|
|
607
|
+
|
|
608
|
+
const client = new AthenaIntelligenceClient({
|
|
609
|
+
...
|
|
610
|
+
logging: {
|
|
611
|
+
level: logging.LogLevel.Debug, // defaults to logging.LogLevel.Info
|
|
612
|
+
logger: new logging.ConsoleLogger(), // defaults to ConsoleLogger
|
|
613
|
+
silent: false, // defaults to true, set to false to enable logging
|
|
614
|
+
}
|
|
615
|
+
});
|
|
616
|
+
```
|
|
617
|
+
The `logging` object can have the following properties:
|
|
618
|
+
- `level`: The log level to use. Defaults to `logging.LogLevel.Info`.
|
|
619
|
+
- `logger`: The logger to use. Defaults to a `logging.ConsoleLogger`.
|
|
620
|
+
- `silent`: Whether to silence the logger. Defaults to `true`.
|
|
621
|
+
|
|
622
|
+
The `level` property can be one of the following values:
|
|
623
|
+
- `logging.LogLevel.Debug`
|
|
624
|
+
- `logging.LogLevel.Info`
|
|
625
|
+
- `logging.LogLevel.Warn`
|
|
626
|
+
- `logging.LogLevel.Error`
|
|
627
|
+
|
|
628
|
+
To provide a custom logger, you can pass in an object that implements the `logging.ILogger` interface.
|
|
629
|
+
|
|
630
|
+
<details>
|
|
631
|
+
<summary>Custom logger examples</summary>
|
|
632
|
+
|
|
633
|
+
Here's an example using the popular `winston` logging library.
|
|
634
|
+
```ts
|
|
635
|
+
import winston from 'winston';
|
|
636
|
+
|
|
637
|
+
const winstonLogger = winston.createLogger({...});
|
|
638
|
+
|
|
639
|
+
const logger: logging.ILogger = {
|
|
640
|
+
debug: (msg, ...args) => winstonLogger.debug(msg, ...args),
|
|
641
|
+
info: (msg, ...args) => winstonLogger.info(msg, ...args),
|
|
642
|
+
warn: (msg, ...args) => winstonLogger.warn(msg, ...args),
|
|
643
|
+
error: (msg, ...args) => winstonLogger.error(msg, ...args),
|
|
644
|
+
};
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
Here's an example using the popular `pino` logging library.
|
|
648
|
+
|
|
649
|
+
```ts
|
|
650
|
+
import pino from 'pino';
|
|
651
|
+
|
|
652
|
+
const pinoLogger = pino({...});
|
|
653
|
+
|
|
654
|
+
const logger: logging.ILogger = {
|
|
655
|
+
debug: (msg, ...args) => pinoLogger.debug(args, msg),
|
|
656
|
+
info: (msg, ...args) => pinoLogger.info(args, msg),
|
|
657
|
+
warn: (msg, ...args) => pinoLogger.warn(args, msg),
|
|
658
|
+
error: (msg, ...args) => pinoLogger.error(args, msg),
|
|
659
|
+
};
|
|
660
|
+
```
|
|
661
|
+
</details>
|
|
662
|
+
|
|
663
|
+
|
|
559
664
|
### Runtime Compatibility
|
|
560
665
|
|
|
666
|
+
|
|
561
667
|
The SDK works in the following runtimes:
|
|
562
668
|
|
|
669
|
+
|
|
670
|
+
|
|
563
671
|
- Node.js 18+
|
|
564
672
|
- Vercel
|
|
565
673
|
- Cloudflare Workers
|
|
@@ -589,4 +697,4 @@ otherwise they would be overwritten upon the next generated release. Feel free t
|
|
|
589
697
|
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
|
|
590
698
|
an issue first to discuss with us!
|
|
591
699
|
|
|
592
|
-
On the other hand, contributions to the README are always very welcome!
|
|
700
|
+
On the other hand, contributions to the README are always very welcome!
|
package/dist/cjs/BaseClient.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as environments from "./environments.js";
|
|
2
1
|
import * as core from "./core/index.js";
|
|
2
|
+
import type * as environments from "./environments.js";
|
|
3
3
|
export interface BaseClientOptions {
|
|
4
4
|
environment?: core.Supplier<environments.AthenaIntelligenceEnvironment | string>;
|
|
5
5
|
/** Specify a custom URL to connect the client to. */
|
|
@@ -11,7 +11,11 @@ export interface BaseClientOptions {
|
|
|
11
11
|
timeoutInSeconds?: number;
|
|
12
12
|
/** The default number of times to retry the request. Defaults to 2. */
|
|
13
13
|
maxRetries?: number;
|
|
14
|
+
/** Provide a custom fetch implementation. Useful for platforms that don't have a built-in fetch or need a custom implementation. */
|
|
15
|
+
fetch?: typeof fetch;
|
|
14
16
|
fetcher?: core.FetchFunction;
|
|
17
|
+
/** Configure logging for the client. */
|
|
18
|
+
logging?: core.logging.LogConfig | core.logging.Logger;
|
|
15
19
|
}
|
|
16
20
|
export interface BaseRequestOptions {
|
|
17
21
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -25,3 +29,12 @@ export interface BaseRequestOptions {
|
|
|
25
29
|
/** Additional headers to include in the request. */
|
|
26
30
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
31
|
}
|
|
32
|
+
export type NormalizedClientOptions<T extends BaseClientOptions> = T & {
|
|
33
|
+
logging: core.logging.Logger;
|
|
34
|
+
authProvider?: core.AuthProvider;
|
|
35
|
+
};
|
|
36
|
+
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions> = NormalizedClientOptions<T> & {
|
|
37
|
+
authProvider: core.AuthProvider;
|
|
38
|
+
};
|
|
39
|
+
export declare function normalizeClientOptions<T extends BaseClientOptions>(options: T): NormalizedClientOptions<T>;
|
|
40
|
+
export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
|
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -1,3 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
3
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.normalizeClientOptions = normalizeClientOptions;
|
|
38
|
+
exports.normalizeClientOptionsWithAuth = normalizeClientOptionsWithAuth;
|
|
39
|
+
const HeaderAuthProvider_js_1 = require("./auth/HeaderAuthProvider.js");
|
|
40
|
+
const headers_js_1 = require("./core/headers.js");
|
|
41
|
+
const core = __importStar(require("./core/index.js"));
|
|
42
|
+
function normalizeClientOptions(options) {
|
|
43
|
+
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
|
+
"X-Fern-Language": "JavaScript",
|
|
45
|
+
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
46
|
+
"X-Fern-SDK-Version": "4.3.310",
|
|
47
|
+
"User-Agent": "@athenaintel/sdk/4.3.310",
|
|
48
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
|
+
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
51
|
+
return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
|
|
52
|
+
}
|
|
53
|
+
function normalizeClientOptionsWithAuth(options) {
|
|
54
|
+
var _a;
|
|
55
|
+
const normalized = normalizeClientOptions(options);
|
|
56
|
+
const normalizedWithNoOpAuthProvider = withNoOpAuthProvider(normalized);
|
|
57
|
+
(_a = normalized.authProvider) !== null && _a !== void 0 ? _a : (normalized.authProvider = new HeaderAuthProvider_js_1.HeaderAuthProvider(normalizedWithNoOpAuthProvider));
|
|
58
|
+
return normalized;
|
|
59
|
+
}
|
|
60
|
+
function withNoOpAuthProvider(options) {
|
|
61
|
+
return Object.assign(Object.assign({}, options), { authProvider: new core.NoOpAuthProvider() });
|
|
62
|
+
}
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { AgentsClient } from "./api/resources/agents/client/Client.js";
|
|
2
|
+
import { AopClient } from "./api/resources/aop/client/Client.js";
|
|
3
|
+
import { AssetsClient } from "./api/resources/assets/client/Client.js";
|
|
4
|
+
import { DatabasesClient } from "./api/resources/databases/client/Client.js";
|
|
5
|
+
import { QueryClient } from "./api/resources/query/client/Client.js";
|
|
6
|
+
import { ThreadsClient } from "./api/resources/threads/client/Client.js";
|
|
7
|
+
import { ToolsClient } from "./api/resources/tools/client/Client.js";
|
|
1
8
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
2
|
-
import {
|
|
3
|
-
import { Aop } from "./api/resources/aop/client/Client.js";
|
|
4
|
-
import { Assets } from "./api/resources/assets/client/Client.js";
|
|
5
|
-
import { Databases } from "./api/resources/databases/client/Client.js";
|
|
6
|
-
import { Query } from "./api/resources/query/client/Client.js";
|
|
7
|
-
import { Threads } from "./api/resources/threads/client/Client.js";
|
|
8
|
-
import { Tools } from "./api/resources/tools/client/Client.js";
|
|
9
|
+
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
|
|
9
10
|
export declare namespace AthenaIntelligenceClient {
|
|
10
11
|
interface Options extends BaseClientOptions {
|
|
11
12
|
}
|
|
@@ -13,20 +14,20 @@ export declare namespace AthenaIntelligenceClient {
|
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
export declare class AthenaIntelligenceClient {
|
|
16
|
-
protected readonly _options: AthenaIntelligenceClient.Options
|
|
17
|
-
protected _agents:
|
|
18
|
-
protected _aop:
|
|
19
|
-
protected _assets:
|
|
20
|
-
protected _databases:
|
|
21
|
-
protected _query:
|
|
22
|
-
protected _threads:
|
|
23
|
-
protected _tools:
|
|
24
|
-
constructor(
|
|
25
|
-
get agents():
|
|
26
|
-
get aop():
|
|
27
|
-
get assets():
|
|
28
|
-
get databases():
|
|
29
|
-
get query():
|
|
30
|
-
get threads():
|
|
31
|
-
get tools():
|
|
17
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<AthenaIntelligenceClient.Options>;
|
|
18
|
+
protected _agents: AgentsClient | undefined;
|
|
19
|
+
protected _aop: AopClient | undefined;
|
|
20
|
+
protected _assets: AssetsClient | undefined;
|
|
21
|
+
protected _databases: DatabasesClient | undefined;
|
|
22
|
+
protected _query: QueryClient | undefined;
|
|
23
|
+
protected _threads: ThreadsClient | undefined;
|
|
24
|
+
protected _tools: ToolsClient | undefined;
|
|
25
|
+
constructor(options: AthenaIntelligenceClient.Options);
|
|
26
|
+
get agents(): AgentsClient;
|
|
27
|
+
get aop(): AopClient;
|
|
28
|
+
get assets(): AssetsClient;
|
|
29
|
+
get databases(): DatabasesClient;
|
|
30
|
+
get query(): QueryClient;
|
|
31
|
+
get threads(): ThreadsClient;
|
|
32
|
+
get tools(): ToolsClient;
|
|
32
33
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -1,42 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
4
|
exports.AthenaIntelligenceClient = void 0;
|
|
38
|
-
const core = __importStar(require("./core/index.js"));
|
|
39
|
-
const headers_js_1 = require("./core/headers.js");
|
|
40
5
|
const Client_js_1 = require("./api/resources/agents/client/Client.js");
|
|
41
6
|
const Client_js_2 = require("./api/resources/aop/client/Client.js");
|
|
42
7
|
const Client_js_3 = require("./api/resources/assets/client/Client.js");
|
|
@@ -44,44 +9,38 @@ const Client_js_4 = require("./api/resources/databases/client/Client.js");
|
|
|
44
9
|
const Client_js_5 = require("./api/resources/query/client/Client.js");
|
|
45
10
|
const Client_js_6 = require("./api/resources/threads/client/Client.js");
|
|
46
11
|
const Client_js_7 = require("./api/resources/tools/client/Client.js");
|
|
12
|
+
const BaseClient_js_1 = require("./BaseClient.js");
|
|
47
13
|
class AthenaIntelligenceClient {
|
|
48
|
-
constructor(
|
|
49
|
-
this._options =
|
|
50
|
-
"X-Fern-Language": "JavaScript",
|
|
51
|
-
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
52
|
-
"X-Fern-SDK-Version": "4.3.309",
|
|
53
|
-
"User-Agent": "@athenaintel/sdk/4.3.309",
|
|
54
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
55
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
56
|
-
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
14
|
+
constructor(options) {
|
|
15
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
16
|
}
|
|
58
17
|
get agents() {
|
|
59
18
|
var _a;
|
|
60
|
-
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_js_1.
|
|
19
|
+
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_js_1.AgentsClient(this._options)));
|
|
61
20
|
}
|
|
62
21
|
get aop() {
|
|
63
22
|
var _a;
|
|
64
|
-
return ((_a = this._aop) !== null && _a !== void 0 ? _a : (this._aop = new Client_js_2.
|
|
23
|
+
return ((_a = this._aop) !== null && _a !== void 0 ? _a : (this._aop = new Client_js_2.AopClient(this._options)));
|
|
65
24
|
}
|
|
66
25
|
get assets() {
|
|
67
26
|
var _a;
|
|
68
|
-
return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new Client_js_3.
|
|
27
|
+
return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new Client_js_3.AssetsClient(this._options)));
|
|
69
28
|
}
|
|
70
29
|
get databases() {
|
|
71
30
|
var _a;
|
|
72
|
-
return ((_a = this._databases) !== null && _a !== void 0 ? _a : (this._databases = new Client_js_4.
|
|
31
|
+
return ((_a = this._databases) !== null && _a !== void 0 ? _a : (this._databases = new Client_js_4.DatabasesClient(this._options)));
|
|
73
32
|
}
|
|
74
33
|
get query() {
|
|
75
34
|
var _a;
|
|
76
|
-
return ((_a = this._query) !== null && _a !== void 0 ? _a : (this._query = new Client_js_5.
|
|
35
|
+
return ((_a = this._query) !== null && _a !== void 0 ? _a : (this._query = new Client_js_5.QueryClient(this._options)));
|
|
77
36
|
}
|
|
78
37
|
get threads() {
|
|
79
38
|
var _a;
|
|
80
|
-
return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new Client_js_6.
|
|
39
|
+
return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new Client_js_6.ThreadsClient(this._options)));
|
|
81
40
|
}
|
|
82
41
|
get tools() {
|
|
83
42
|
var _a;
|
|
84
|
-
return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_7.
|
|
43
|
+
return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_7.ToolsClient(this._options)));
|
|
85
44
|
}
|
|
86
45
|
}
|
|
87
46
|
exports.AthenaIntelligenceClient = AthenaIntelligenceClient;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
1
2
|
import * as errors from "../../errors/index.js";
|
|
2
|
-
import * as core from "../../core/index.js";
|
|
3
3
|
export declare class BadRequestError extends errors.AthenaIntelligenceError {
|
|
4
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
1
2
|
import * as errors from "../../errors/index.js";
|
|
2
|
-
import * as AthenaIntelligence from "../index.js";
|
|
3
|
-
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as AthenaIntelligence from "../index.js";
|
|
4
4
|
export declare class ContentTooLargeError extends errors.AthenaIntelligenceError {
|
|
5
5
|
constructor(body: AthenaIntelligence.FileTooLargeError, rawResponse?: core.RawResponse);
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
1
2
|
import * as errors from "../../errors/index.js";
|
|
2
|
-
import * as core from "../../core/index.js";
|
|
3
3
|
export declare class ForbiddenError extends errors.AthenaIntelligenceError {
|
|
4
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
1
2
|
import * as errors from "../../errors/index.js";
|
|
2
|
-
import * as core from "../../core/index.js";
|
|
3
3
|
export declare class InternalServerError extends errors.AthenaIntelligenceError {
|
|
4
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
1
2
|
import * as errors from "../../errors/index.js";
|
|
2
|
-
import * as core from "../../core/index.js";
|
|
3
3
|
export declare class NotFoundError extends errors.AthenaIntelligenceError {
|
|
4
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
1
2
|
import * as errors from "../../errors/index.js";
|
|
2
|
-
import * as core from "../../core/index.js";
|
|
3
3
|
export declare class NotImplementedError extends errors.AthenaIntelligenceError {
|
|
4
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
1
2
|
import * as errors from "../../errors/index.js";
|
|
2
|
-
import * as core from "../../core/index.js";
|
|
3
3
|
export declare class ServiceUnavailableError extends errors.AthenaIntelligenceError {
|
|
4
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
1
2
|
import * as errors from "../../errors/index.js";
|
|
2
|
-
import * as core from "../../core/index.js";
|
|
3
3
|
export declare class UnauthorizedError extends errors.AthenaIntelligenceError {
|
|
4
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
1
2
|
import * as errors from "../../errors/index.js";
|
|
2
|
-
import * as core from "../../core/index.js";
|
|
3
3
|
export declare class UnprocessableEntityError extends errors.AthenaIntelligenceError {
|
|
4
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
1
2
|
import * as errors from "../../errors/index.js";
|
|
2
|
-
import * as AthenaIntelligence from "../index.js";
|
|
3
|
-
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as AthenaIntelligence from "../index.js";
|
|
4
4
|
export declare class UnsupportedMediaTypeError extends errors.AthenaIntelligenceError {
|
|
5
5
|
constructor(body: AthenaIntelligence.DataFrameUnknownFormatError, rawResponse?: core.RawResponse);
|
|
6
6
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "./UnprocessableEntityError.js";
|
|
2
1
|
export * from "./BadRequestError.js";
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./NotFoundError.js";
|
|
5
|
-
export * from "./InternalServerError.js";
|
|
2
|
+
export * from "./ContentTooLargeError.js";
|
|
6
3
|
export * from "./ForbiddenError.js";
|
|
4
|
+
export * from "./InternalServerError.js";
|
|
5
|
+
export * from "./NotFoundError.js";
|
|
7
6
|
export * from "./NotImplementedError.js";
|
|
8
7
|
export * from "./ServiceUnavailableError.js";
|
|
8
|
+
export * from "./UnauthorizedError.js";
|
|
9
|
+
export * from "./UnprocessableEntityError.js";
|
|
9
10
|
export * from "./UnsupportedMediaTypeError.js";
|
|
10
|
-
export * from "./ContentTooLargeError.js";
|
|
@@ -14,13 +14,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./UnprocessableEntityError.js"), exports);
|
|
18
17
|
__exportStar(require("./BadRequestError.js"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./NotFoundError.js"), exports);
|
|
21
|
-
__exportStar(require("./InternalServerError.js"), exports);
|
|
18
|
+
__exportStar(require("./ContentTooLargeError.js"), exports);
|
|
22
19
|
__exportStar(require("./ForbiddenError.js"), exports);
|
|
20
|
+
__exportStar(require("./InternalServerError.js"), exports);
|
|
21
|
+
__exportStar(require("./NotFoundError.js"), exports);
|
|
23
22
|
__exportStar(require("./NotImplementedError.js"), exports);
|
|
24
23
|
__exportStar(require("./ServiceUnavailableError.js"), exports);
|
|
24
|
+
__exportStar(require("./UnauthorizedError.js"), exports);
|
|
25
|
+
__exportStar(require("./UnprocessableEntityError.js"), exports);
|
|
25
26
|
__exportStar(require("./UnsupportedMediaTypeError.js"), exports);
|
|
26
|
-
__exportStar(require("./ContentTooLargeError.js"), exports);
|
package/dist/cjs/api/index.d.ts
CHANGED
package/dist/cjs/api/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./errors/index.js"), exports);
|
|
17
18
|
__exportStar(require("./resources/index.js"), exports);
|
|
18
19
|
__exportStar(require("./types/index.js"), exports);
|
|
19
|
-
__exportStar(require("./errors/index.js"), exports);
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
2
3
|
import * as core from "../../../../core/index.js";
|
|
3
4
|
import * as AthenaIntelligence from "../../../index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
export declare namespace
|
|
5
|
+
import { DriveClient } from "../resources/drive/client/Client.js";
|
|
6
|
+
import { GeneralClient } from "../resources/general/client/Client.js";
|
|
7
|
+
import { ResearchClient } from "../resources/research/client/Client.js";
|
|
8
|
+
import { SqlClient } from "../resources/sql/client/Client.js";
|
|
9
|
+
export declare namespace AgentsClient {
|
|
9
10
|
interface Options extends BaseClientOptions {
|
|
10
11
|
}
|
|
11
12
|
interface RequestOptions extends BaseRequestOptions {
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
|
-
export declare class
|
|
15
|
-
protected readonly _options:
|
|
16
|
-
protected _drive:
|
|
17
|
-
protected _general:
|
|
18
|
-
protected _research:
|
|
19
|
-
protected _sql:
|
|
20
|
-
constructor(
|
|
21
|
-
get drive():
|
|
22
|
-
get general():
|
|
23
|
-
get research():
|
|
24
|
-
get sql():
|
|
15
|
+
export declare class AgentsClient {
|
|
16
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<AgentsClient.Options>;
|
|
17
|
+
protected _drive: DriveClient | undefined;
|
|
18
|
+
protected _general: GeneralClient | undefined;
|
|
19
|
+
protected _research: ResearchClient | undefined;
|
|
20
|
+
protected _sql: SqlClient | undefined;
|
|
21
|
+
constructor(options: AgentsClient.Options);
|
|
22
|
+
get drive(): DriveClient;
|
|
23
|
+
get general(): GeneralClient;
|
|
24
|
+
get research(): ResearchClient;
|
|
25
|
+
get sql(): SqlClient;
|
|
25
26
|
/**
|
|
26
27
|
* Coming soon!
|
|
27
28
|
*
|
|
@@ -31,9 +32,9 @@ export declare class Agents {
|
|
|
31
32
|
* Refer to the specific agent's documentation for details on configuration options
|
|
32
33
|
* and expected responses.
|
|
33
34
|
*
|
|
34
|
-
* @param {string}
|
|
35
|
+
* @param {string} agent_id - The ID of the custom agent to invoke. Create custom agents in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
|
|
35
36
|
* @param {AthenaIntelligence.CustomAgentRequest} request
|
|
36
|
-
* @param {
|
|
37
|
+
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
38
|
*
|
|
38
39
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
39
40
|
*
|
|
@@ -47,7 +48,6 @@ export declare class Agents {
|
|
|
47
48
|
* }]
|
|
48
49
|
* })
|
|
49
50
|
*/
|
|
50
|
-
invokeById(
|
|
51
|
+
invokeById(agent_id: string, request: AthenaIntelligence.CustomAgentRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CustomAgentResponse>;
|
|
51
52
|
private __invokeById;
|
|
52
|
-
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
53
53
|
}
|