@athenaintel/sdk 4.3.308 → 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 +36 -32
- package/dist/cjs/api/resources/databases/client/Client.js +149 -81
- package/dist/cjs/api/resources/databases/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/databases/client/requests/DatabasesDeleteRequest.d.ts +15 -0
- package/dist/cjs/api/resources/databases/client/requests/DatabasesDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/databases/client/requests/UpdateDataRequest.d.ts +3 -0
- package/dist/cjs/api/resources/databases/client/requests/index.d.ts +4 -3
- 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 +36 -32
- package/dist/esm/api/resources/databases/client/Client.mjs +147 -79
- 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 +15 -0
- package/dist/esm/api/resources/databases/client/requests/DatabasesDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/databases/client/requests/UpdateDataRequest.d.mts +3 -0
- package/dist/esm/api/resources/databases/client/requests/index.d.mts +4 -3
- package/dist/esm/api/resources/databases/client/requests/index.mjs +1 -3
- 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 +455 -491
- 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
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export declare const LogLevel: {
|
|
2
|
+
readonly Debug: "debug";
|
|
3
|
+
readonly Info: "info";
|
|
4
|
+
readonly Warn: "warn";
|
|
5
|
+
readonly Error: "error";
|
|
6
|
+
};
|
|
7
|
+
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
8
|
+
export interface ILogger {
|
|
9
|
+
/**
|
|
10
|
+
* Logs a debug message.
|
|
11
|
+
* @param message - The message to log
|
|
12
|
+
* @param args - Additional arguments to log
|
|
13
|
+
*/
|
|
14
|
+
debug(message: string, ...args: unknown[]): void;
|
|
15
|
+
/**
|
|
16
|
+
* Logs an info message.
|
|
17
|
+
* @param message - The message to log
|
|
18
|
+
* @param args - Additional arguments to log
|
|
19
|
+
*/
|
|
20
|
+
info(message: string, ...args: unknown[]): void;
|
|
21
|
+
/**
|
|
22
|
+
* Logs a warning message.
|
|
23
|
+
* @param message - The message to log
|
|
24
|
+
* @param args - Additional arguments to log
|
|
25
|
+
*/
|
|
26
|
+
warn(message: string, ...args: unknown[]): void;
|
|
27
|
+
/**
|
|
28
|
+
* Logs an error message.
|
|
29
|
+
* @param message - The message to log
|
|
30
|
+
* @param args - Additional arguments to log
|
|
31
|
+
*/
|
|
32
|
+
error(message: string, ...args: unknown[]): void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Configuration for logger initialization.
|
|
36
|
+
*/
|
|
37
|
+
export interface LogConfig {
|
|
38
|
+
/**
|
|
39
|
+
* Minimum log level to output.
|
|
40
|
+
* @default LogLevel.Info
|
|
41
|
+
*/
|
|
42
|
+
level?: LogLevel;
|
|
43
|
+
/**
|
|
44
|
+
* Logger implementation to use.
|
|
45
|
+
* @default new ConsoleLogger()
|
|
46
|
+
*/
|
|
47
|
+
logger?: ILogger;
|
|
48
|
+
/**
|
|
49
|
+
* Whether logging should be silenced.
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
silent?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Default console-based logger implementation.
|
|
56
|
+
*/
|
|
57
|
+
export declare class ConsoleLogger implements ILogger {
|
|
58
|
+
debug(message: string, ...args: unknown[]): void;
|
|
59
|
+
info(message: string, ...args: unknown[]): void;
|
|
60
|
+
warn(message: string, ...args: unknown[]): void;
|
|
61
|
+
error(message: string, ...args: unknown[]): void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Logger class that provides level-based logging functionality.
|
|
65
|
+
*/
|
|
66
|
+
export declare class Logger {
|
|
67
|
+
private readonly level;
|
|
68
|
+
private readonly logger;
|
|
69
|
+
private readonly silent;
|
|
70
|
+
/**
|
|
71
|
+
* Creates a new logger instance.
|
|
72
|
+
* @param config - Logger configuration
|
|
73
|
+
*/
|
|
74
|
+
constructor(config: Required<LogConfig>);
|
|
75
|
+
/**
|
|
76
|
+
* Checks if a log level should be output based on configuration.
|
|
77
|
+
* @param level - The log level to check
|
|
78
|
+
* @returns True if the level should be logged
|
|
79
|
+
*/
|
|
80
|
+
shouldLog(level: LogLevel): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Checks if debug logging is enabled.
|
|
83
|
+
* @returns True if debug logs should be output
|
|
84
|
+
*/
|
|
85
|
+
isDebug(): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Logs a debug message if debug logging is enabled.
|
|
88
|
+
* @param message - The message to log
|
|
89
|
+
* @param args - Additional arguments to log
|
|
90
|
+
*/
|
|
91
|
+
debug(message: string, ...args: unknown[]): void;
|
|
92
|
+
/**
|
|
93
|
+
* Checks if info logging is enabled.
|
|
94
|
+
* @returns True if info logs should be output
|
|
95
|
+
*/
|
|
96
|
+
isInfo(): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Logs an info message if info logging is enabled.
|
|
99
|
+
* @param message - The message to log
|
|
100
|
+
* @param args - Additional arguments to log
|
|
101
|
+
*/
|
|
102
|
+
info(message: string, ...args: unknown[]): void;
|
|
103
|
+
/**
|
|
104
|
+
* Checks if warning logging is enabled.
|
|
105
|
+
* @returns True if warning logs should be output
|
|
106
|
+
*/
|
|
107
|
+
isWarn(): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Logs a warning message if warning logging is enabled.
|
|
110
|
+
* @param message - The message to log
|
|
111
|
+
* @param args - Additional arguments to log
|
|
112
|
+
*/
|
|
113
|
+
warn(message: string, ...args: unknown[]): void;
|
|
114
|
+
/**
|
|
115
|
+
* Checks if error logging is enabled.
|
|
116
|
+
* @returns True if error logs should be output
|
|
117
|
+
*/
|
|
118
|
+
isError(): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Logs an error message if error logging is enabled.
|
|
121
|
+
* @param message - The message to log
|
|
122
|
+
* @param args - Additional arguments to log
|
|
123
|
+
*/
|
|
124
|
+
error(message: string, ...args: unknown[]): void;
|
|
125
|
+
}
|
|
126
|
+
export declare function createLogger(config?: LogConfig | Logger): Logger;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Logger = exports.ConsoleLogger = exports.LogLevel = void 0;
|
|
4
|
+
exports.createLogger = createLogger;
|
|
5
|
+
exports.LogLevel = {
|
|
6
|
+
Debug: "debug",
|
|
7
|
+
Info: "info",
|
|
8
|
+
Warn: "warn",
|
|
9
|
+
Error: "error",
|
|
10
|
+
};
|
|
11
|
+
const logLevelMap = {
|
|
12
|
+
[exports.LogLevel.Debug]: 1,
|
|
13
|
+
[exports.LogLevel.Info]: 2,
|
|
14
|
+
[exports.LogLevel.Warn]: 3,
|
|
15
|
+
[exports.LogLevel.Error]: 4,
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Default console-based logger implementation.
|
|
19
|
+
*/
|
|
20
|
+
class ConsoleLogger {
|
|
21
|
+
debug(message, ...args) {
|
|
22
|
+
console.debug(message, ...args);
|
|
23
|
+
}
|
|
24
|
+
info(message, ...args) {
|
|
25
|
+
console.info(message, ...args);
|
|
26
|
+
}
|
|
27
|
+
warn(message, ...args) {
|
|
28
|
+
console.warn(message, ...args);
|
|
29
|
+
}
|
|
30
|
+
error(message, ...args) {
|
|
31
|
+
console.error(message, ...args);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.ConsoleLogger = ConsoleLogger;
|
|
35
|
+
/**
|
|
36
|
+
* Logger class that provides level-based logging functionality.
|
|
37
|
+
*/
|
|
38
|
+
class Logger {
|
|
39
|
+
/**
|
|
40
|
+
* Creates a new logger instance.
|
|
41
|
+
* @param config - Logger configuration
|
|
42
|
+
*/
|
|
43
|
+
constructor(config) {
|
|
44
|
+
this.level = logLevelMap[config.level];
|
|
45
|
+
this.logger = config.logger;
|
|
46
|
+
this.silent = config.silent;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Checks if a log level should be output based on configuration.
|
|
50
|
+
* @param level - The log level to check
|
|
51
|
+
* @returns True if the level should be logged
|
|
52
|
+
*/
|
|
53
|
+
shouldLog(level) {
|
|
54
|
+
return !this.silent && this.level <= logLevelMap[level];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Checks if debug logging is enabled.
|
|
58
|
+
* @returns True if debug logs should be output
|
|
59
|
+
*/
|
|
60
|
+
isDebug() {
|
|
61
|
+
return this.shouldLog(exports.LogLevel.Debug);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Logs a debug message if debug logging is enabled.
|
|
65
|
+
* @param message - The message to log
|
|
66
|
+
* @param args - Additional arguments to log
|
|
67
|
+
*/
|
|
68
|
+
debug(message, ...args) {
|
|
69
|
+
if (this.isDebug()) {
|
|
70
|
+
this.logger.debug(message, ...args);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Checks if info logging is enabled.
|
|
75
|
+
* @returns True if info logs should be output
|
|
76
|
+
*/
|
|
77
|
+
isInfo() {
|
|
78
|
+
return this.shouldLog(exports.LogLevel.Info);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Logs an info message if info logging is enabled.
|
|
82
|
+
* @param message - The message to log
|
|
83
|
+
* @param args - Additional arguments to log
|
|
84
|
+
*/
|
|
85
|
+
info(message, ...args) {
|
|
86
|
+
if (this.isInfo()) {
|
|
87
|
+
this.logger.info(message, ...args);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Checks if warning logging is enabled.
|
|
92
|
+
* @returns True if warning logs should be output
|
|
93
|
+
*/
|
|
94
|
+
isWarn() {
|
|
95
|
+
return this.shouldLog(exports.LogLevel.Warn);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Logs a warning message if warning logging is enabled.
|
|
99
|
+
* @param message - The message to log
|
|
100
|
+
* @param args - Additional arguments to log
|
|
101
|
+
*/
|
|
102
|
+
warn(message, ...args) {
|
|
103
|
+
if (this.isWarn()) {
|
|
104
|
+
this.logger.warn(message, ...args);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Checks if error logging is enabled.
|
|
109
|
+
* @returns True if error logs should be output
|
|
110
|
+
*/
|
|
111
|
+
isError() {
|
|
112
|
+
return this.shouldLog(exports.LogLevel.Error);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Logs an error message if error logging is enabled.
|
|
116
|
+
* @param message - The message to log
|
|
117
|
+
* @param args - Additional arguments to log
|
|
118
|
+
*/
|
|
119
|
+
error(message, ...args) {
|
|
120
|
+
if (this.isError()) {
|
|
121
|
+
this.logger.error(message, ...args);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.Logger = Logger;
|
|
126
|
+
function createLogger(config) {
|
|
127
|
+
var _a, _b, _c;
|
|
128
|
+
if (config == null) {
|
|
129
|
+
return defaultLogger;
|
|
130
|
+
}
|
|
131
|
+
if (config instanceof Logger) {
|
|
132
|
+
return config;
|
|
133
|
+
}
|
|
134
|
+
config = config !== null && config !== void 0 ? config : {};
|
|
135
|
+
(_a = config.level) !== null && _a !== void 0 ? _a : (config.level = exports.LogLevel.Info);
|
|
136
|
+
(_b = config.logger) !== null && _b !== void 0 ? _b : (config.logger = new ConsoleLogger());
|
|
137
|
+
(_c = config.silent) !== null && _c !== void 0 ? _c : (config.silent = true);
|
|
138
|
+
return new Logger(config);
|
|
139
|
+
}
|
|
140
|
+
const defaultLogger = new Logger({
|
|
141
|
+
level: exports.LogLevel.Info,
|
|
142
|
+
logger: new ConsoleLogger(),
|
|
143
|
+
silent: true,
|
|
144
|
+
});
|
|
@@ -71,6 +71,17 @@ function evaluateRuntime() {
|
|
|
71
71
|
version: Bun.version,
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* A constant that indicates whether the environment the code is running is in React-Native.
|
|
76
|
+
* This check should come before Node.js detection since React Native may have a process polyfill.
|
|
77
|
+
* https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
|
|
78
|
+
*/
|
|
79
|
+
const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
|
|
80
|
+
if (isReactNative) {
|
|
81
|
+
return {
|
|
82
|
+
type: "react-native",
|
|
83
|
+
};
|
|
84
|
+
}
|
|
74
85
|
/**
|
|
75
86
|
* A constant that indicates whether the environment the code is running is Node.JS.
|
|
76
87
|
*/
|
|
@@ -86,16 +97,6 @@ function evaluateRuntime() {
|
|
|
86
97
|
parsedVersion: Number(process.versions.node.split(".")[0]),
|
|
87
98
|
};
|
|
88
99
|
}
|
|
89
|
-
/**
|
|
90
|
-
* A constant that indicates whether the environment the code is running is in React-Native.
|
|
91
|
-
* https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
|
|
92
|
-
*/
|
|
93
|
-
const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
|
|
94
|
-
if (isReactNative) {
|
|
95
|
-
return {
|
|
96
|
-
type: "react-native",
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
100
|
return {
|
|
100
101
|
type: "unknown",
|
|
101
102
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function encodePathParam(param: unknown): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.encodePathParam = encodePathParam;
|
|
4
|
+
function encodePathParam(param) {
|
|
5
|
+
if (param === null) {
|
|
6
|
+
return "null";
|
|
7
|
+
}
|
|
8
|
+
const typeofParam = typeof param;
|
|
9
|
+
switch (typeofParam) {
|
|
10
|
+
case "undefined":
|
|
11
|
+
return "undefined";
|
|
12
|
+
case "string":
|
|
13
|
+
case "number":
|
|
14
|
+
case "boolean":
|
|
15
|
+
break;
|
|
16
|
+
default:
|
|
17
|
+
param = String(param);
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
return encodeURIComponent(param);
|
|
21
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toQueryString = exports.join = void 0;
|
|
3
|
+
exports.toQueryString = exports.join = exports.encodePathParam = void 0;
|
|
4
|
+
var encodePathParam_js_1 = require("./encodePathParam.js");
|
|
5
|
+
Object.defineProperty(exports, "encodePathParam", { enumerable: true, get: function () { return encodePathParam_js_1.encodePathParam; } });
|
|
4
6
|
var join_js_1 = require("./join.js");
|
|
5
7
|
Object.defineProperty(exports, "join", { enumerable: true, get: function () { return join_js_1.join; } });
|
|
6
8
|
var qs_js_1 = require("./qs.js");
|
|
@@ -14,11 +14,10 @@ function join(base, ...segments) {
|
|
|
14
14
|
url = new URL(base);
|
|
15
15
|
}
|
|
16
16
|
catch (_a) {
|
|
17
|
-
// Fallback to path joining if URL is malformed
|
|
18
17
|
return joinPath(base, ...segments);
|
|
19
18
|
}
|
|
20
19
|
const lastSegment = segments[segments.length - 1];
|
|
21
|
-
const shouldPreserveTrailingSlash = lastSegment
|
|
20
|
+
const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith("/");
|
|
22
21
|
for (const segment of segments) {
|
|
23
22
|
const cleanSegment = trimSlashes(segment);
|
|
24
23
|
if (cleanSegment) {
|
|
@@ -38,7 +37,7 @@ function joinPath(base, ...segments) {
|
|
|
38
37
|
}
|
|
39
38
|
let result = base;
|
|
40
39
|
const lastSegment = segments[segments.length - 1];
|
|
41
|
-
const shouldPreserveTrailingSlash = lastSegment
|
|
40
|
+
const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith("/");
|
|
42
41
|
for (const segment of segments) {
|
|
43
42
|
const cleanSegment = trimSlashes(segment);
|
|
44
43
|
if (cleanSegment) {
|
|
@@ -54,7 +53,7 @@ function joinPathSegments(left, right) {
|
|
|
54
53
|
if (left.endsWith("/")) {
|
|
55
54
|
return left + right;
|
|
56
55
|
}
|
|
57
|
-
return left
|
|
56
|
+
return `${left}/${right}`;
|
|
58
57
|
}
|
|
59
58
|
function trimSlashes(str) {
|
|
60
59
|
if (!str)
|
|
@@ -14,7 +14,7 @@ class AthenaIntelligenceError extends Error {
|
|
|
14
14
|
}
|
|
15
15
|
exports.AthenaIntelligenceError = AthenaIntelligenceError;
|
|
16
16
|
function buildMessage({ message, statusCode, body, }) {
|
|
17
|
-
|
|
17
|
+
const lines = [];
|
|
18
18
|
if (message != null) {
|
|
19
19
|
lines.push(message);
|
|
20
20
|
}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as AthenaIntelligence from "./api/index.js";
|
|
2
|
-
export {
|
|
3
|
-
export { type BaseClientOptions, type BaseRequestOptions } from "./BaseClient.js";
|
|
2
|
+
export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
4
3
|
export { AthenaIntelligenceClient } from "./Client.js";
|
|
5
4
|
export { AthenaIntelligenceEnvironment } from "./environments.js";
|
|
5
|
+
export { AthenaIntelligenceError, AthenaIntelligenceTimeoutError } from "./errors/index.js";
|
|
6
6
|
export * from "./exports.js";
|
package/dist/cjs/index.js
CHANGED
|
@@ -36,13 +36,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.AthenaIntelligenceTimeoutError = exports.AthenaIntelligenceError = exports.AthenaIntelligenceEnvironment = exports.AthenaIntelligenceClient = exports.AthenaIntelligence = void 0;
|
|
40
40
|
exports.AthenaIntelligence = __importStar(require("./api/index.js"));
|
|
41
|
-
var index_js_1 = require("./errors/index.js");
|
|
42
|
-
Object.defineProperty(exports, "AthenaIntelligenceError", { enumerable: true, get: function () { return index_js_1.AthenaIntelligenceError; } });
|
|
43
|
-
Object.defineProperty(exports, "AthenaIntelligenceTimeoutError", { enumerable: true, get: function () { return index_js_1.AthenaIntelligenceTimeoutError; } });
|
|
44
41
|
var Client_js_1 = require("./Client.js");
|
|
45
42
|
Object.defineProperty(exports, "AthenaIntelligenceClient", { enumerable: true, get: function () { return Client_js_1.AthenaIntelligenceClient; } });
|
|
46
43
|
var environments_js_1 = require("./environments.js");
|
|
47
44
|
Object.defineProperty(exports, "AthenaIntelligenceEnvironment", { enumerable: true, get: function () { return environments_js_1.AthenaIntelligenceEnvironment; } });
|
|
45
|
+
var index_js_1 = require("./errors/index.js");
|
|
46
|
+
Object.defineProperty(exports, "AthenaIntelligenceError", { enumerable: true, get: function () { return index_js_1.AthenaIntelligenceError; } });
|
|
47
|
+
Object.defineProperty(exports, "AthenaIntelligenceTimeoutError", { enumerable: true, get: function () { return index_js_1.AthenaIntelligenceTimeoutError; } });
|
|
48
48
|
__exportStar(require("./exports.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.3.
|
|
1
|
+
export declare const SDK_VERSION = "4.3.310";
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as environments from "./environments.mjs";
|
|
2
1
|
import * as core from "./core/index.mjs";
|
|
2
|
+
import type * as environments from "./environments.mjs";
|
|
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/esm/BaseClient.mjs
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
import
|
|
2
|
+
import { HeaderAuthProvider } from "./auth/HeaderAuthProvider.mjs";
|
|
3
|
+
import { mergeHeaders } from "./core/headers.mjs";
|
|
3
4
|
import * as core from "./core/index.mjs";
|
|
5
|
+
export function normalizeClientOptions(options) {
|
|
6
|
+
const headers = mergeHeaders({
|
|
7
|
+
"X-Fern-Language": "JavaScript",
|
|
8
|
+
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
9
|
+
"X-Fern-SDK-Version": "4.3.310",
|
|
10
|
+
"User-Agent": "@athenaintel/sdk/4.3.310",
|
|
11
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
|
+
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
14
|
+
return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
|
|
15
|
+
}
|
|
16
|
+
export function normalizeClientOptionsWithAuth(options) {
|
|
17
|
+
var _a;
|
|
18
|
+
const normalized = normalizeClientOptions(options);
|
|
19
|
+
const normalizedWithNoOpAuthProvider = withNoOpAuthProvider(normalized);
|
|
20
|
+
(_a = normalized.authProvider) !== null && _a !== void 0 ? _a : (normalized.authProvider = new HeaderAuthProvider(normalizedWithNoOpAuthProvider));
|
|
21
|
+
return normalized;
|
|
22
|
+
}
|
|
23
|
+
function withNoOpAuthProvider(options) {
|
|
24
|
+
return Object.assign(Object.assign({}, options), { authProvider: new core.NoOpAuthProvider() });
|
|
25
|
+
}
|
package/dist/esm/Client.d.mts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { AgentsClient } from "./api/resources/agents/client/Client.mjs";
|
|
2
|
+
import { AopClient } from "./api/resources/aop/client/Client.mjs";
|
|
3
|
+
import { AssetsClient } from "./api/resources/assets/client/Client.mjs";
|
|
4
|
+
import { DatabasesClient } from "./api/resources/databases/client/Client.mjs";
|
|
5
|
+
import { QueryClient } from "./api/resources/query/client/Client.mjs";
|
|
6
|
+
import { ThreadsClient } from "./api/resources/threads/client/Client.mjs";
|
|
7
|
+
import { ToolsClient } from "./api/resources/tools/client/Client.mjs";
|
|
1
8
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { Aop } from "./api/resources/aop/client/Client.mjs";
|
|
4
|
-
import { Assets } from "./api/resources/assets/client/Client.mjs";
|
|
5
|
-
import { Databases } from "./api/resources/databases/client/Client.mjs";
|
|
6
|
-
import { Query } from "./api/resources/query/client/Client.mjs";
|
|
7
|
-
import { Threads } from "./api/resources/threads/client/Client.mjs";
|
|
8
|
-
import { Tools } from "./api/resources/tools/client/Client.mjs";
|
|
9
|
+
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.mjs";
|
|
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/esm/Client.mjs
CHANGED
|
@@ -1,51 +1,42 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { Threads } from "./api/resources/threads/client/Client.mjs";
|
|
11
|
-
import { Tools } from "./api/resources/tools/client/Client.mjs";
|
|
2
|
+
import { AgentsClient } from "./api/resources/agents/client/Client.mjs";
|
|
3
|
+
import { AopClient } from "./api/resources/aop/client/Client.mjs";
|
|
4
|
+
import { AssetsClient } from "./api/resources/assets/client/Client.mjs";
|
|
5
|
+
import { DatabasesClient } from "./api/resources/databases/client/Client.mjs";
|
|
6
|
+
import { QueryClient } from "./api/resources/query/client/Client.mjs";
|
|
7
|
+
import { ThreadsClient } from "./api/resources/threads/client/Client.mjs";
|
|
8
|
+
import { ToolsClient } from "./api/resources/tools/client/Client.mjs";
|
|
9
|
+
import { normalizeClientOptionsWithAuth } from "./BaseClient.mjs";
|
|
12
10
|
export class AthenaIntelligenceClient {
|
|
13
|
-
constructor(
|
|
14
|
-
this._options =
|
|
15
|
-
"X-Fern-Language": "JavaScript",
|
|
16
|
-
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
17
|
-
"X-Fern-SDK-Version": "4.3.308",
|
|
18
|
-
"User-Agent": "@athenaintel/sdk/4.3.308",
|
|
19
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
20
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
21
|
-
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
11
|
+
constructor(options) {
|
|
12
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
22
13
|
}
|
|
23
14
|
get agents() {
|
|
24
15
|
var _a;
|
|
25
|
-
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new
|
|
16
|
+
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new AgentsClient(this._options)));
|
|
26
17
|
}
|
|
27
18
|
get aop() {
|
|
28
19
|
var _a;
|
|
29
|
-
return ((_a = this._aop) !== null && _a !== void 0 ? _a : (this._aop = new
|
|
20
|
+
return ((_a = this._aop) !== null && _a !== void 0 ? _a : (this._aop = new AopClient(this._options)));
|
|
30
21
|
}
|
|
31
22
|
get assets() {
|
|
32
23
|
var _a;
|
|
33
|
-
return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new
|
|
24
|
+
return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new AssetsClient(this._options)));
|
|
34
25
|
}
|
|
35
26
|
get databases() {
|
|
36
27
|
var _a;
|
|
37
|
-
return ((_a = this._databases) !== null && _a !== void 0 ? _a : (this._databases = new
|
|
28
|
+
return ((_a = this._databases) !== null && _a !== void 0 ? _a : (this._databases = new DatabasesClient(this._options)));
|
|
38
29
|
}
|
|
39
30
|
get query() {
|
|
40
31
|
var _a;
|
|
41
|
-
return ((_a = this._query) !== null && _a !== void 0 ? _a : (this._query = new
|
|
32
|
+
return ((_a = this._query) !== null && _a !== void 0 ? _a : (this._query = new QueryClient(this._options)));
|
|
42
33
|
}
|
|
43
34
|
get threads() {
|
|
44
35
|
var _a;
|
|
45
|
-
return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new
|
|
36
|
+
return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new ThreadsClient(this._options)));
|
|
46
37
|
}
|
|
47
38
|
get tools() {
|
|
48
39
|
var _a;
|
|
49
|
-
return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new
|
|
40
|
+
return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new ToolsClient(this._options)));
|
|
50
41
|
}
|
|
51
42
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type * as core from "../../core/index.mjs";
|
|
1
2
|
import * as errors from "../../errors/index.mjs";
|
|
2
|
-
import * as core from "../../core/index.mjs";
|
|
3
3
|
export declare class BadRequestError extends errors.AthenaIntelligenceError {
|
|
4
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
5
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import * as core from "../../core/index.mjs";
|
|
4
3
|
export class BadRequestError extends errors.AthenaIntelligenceError {
|
|
5
4
|
constructor(body, rawResponse) {
|
|
6
5
|
super({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.mjs";
|
|
1
2
|
import * as errors from "../../errors/index.mjs";
|
|
2
|
-
import * as AthenaIntelligence from "../index.mjs";
|
|
3
|
-
import * as core from "../../core/index.mjs";
|
|
3
|
+
import type * as AthenaIntelligence from "../index.mjs";
|
|
4
4
|
export declare class ContentTooLargeError extends errors.AthenaIntelligenceError {
|
|
5
5
|
constructor(body: AthenaIntelligence.FileTooLargeError, rawResponse?: core.RawResponse);
|
|
6
6
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import * as AthenaIntelligence from "../index.mjs";
|
|
4
|
-
import * as core from "../../core/index.mjs";
|
|
5
3
|
export class ContentTooLargeError extends errors.AthenaIntelligenceError {
|
|
6
4
|
constructor(body, rawResponse) {
|
|
7
5
|
super({
|