@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
|
@@ -43,47 +43,48 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
47
|
-
const
|
|
48
|
-
const core = __importStar(require("../../../../core/index.js"));
|
|
49
|
-
const AthenaIntelligence = __importStar(require("../../../index.js"));
|
|
46
|
+
exports.ToolsClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
50
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
51
|
-
const
|
|
49
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
52
50
|
const json_js_1 = require("../../../../core/json.js");
|
|
51
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
52
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
+
const AthenaIntelligence = __importStar(require("../../../index.js"));
|
|
53
54
|
const Client_js_1 = require("../resources/calendar/client/Client.js");
|
|
54
55
|
const Client_js_2 = require("../resources/email/client/Client.js");
|
|
55
56
|
const Client_js_3 = require("../resources/sheets/client/Client.js");
|
|
56
57
|
const Client_js_4 = require("../resources/structuredDataExtractor/client/Client.js");
|
|
57
58
|
const Client_js_5 = require("../resources/tasks/client/Client.js");
|
|
58
|
-
class
|
|
59
|
-
constructor(
|
|
60
|
-
this._options =
|
|
59
|
+
class ToolsClient {
|
|
60
|
+
constructor(options) {
|
|
61
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
61
62
|
}
|
|
62
63
|
get calendar() {
|
|
63
64
|
var _a;
|
|
64
|
-
return ((_a = this._calendar) !== null && _a !== void 0 ? _a : (this._calendar = new Client_js_1.
|
|
65
|
+
return ((_a = this._calendar) !== null && _a !== void 0 ? _a : (this._calendar = new Client_js_1.CalendarClient(this._options)));
|
|
65
66
|
}
|
|
66
67
|
get email() {
|
|
67
68
|
var _a;
|
|
68
|
-
return ((_a = this._email) !== null && _a !== void 0 ? _a : (this._email = new Client_js_2.
|
|
69
|
+
return ((_a = this._email) !== null && _a !== void 0 ? _a : (this._email = new Client_js_2.EmailClient(this._options)));
|
|
69
70
|
}
|
|
70
71
|
get sheets() {
|
|
71
72
|
var _a;
|
|
72
|
-
return ((_a = this._sheets) !== null && _a !== void 0 ? _a : (this._sheets = new Client_js_3.
|
|
73
|
+
return ((_a = this._sheets) !== null && _a !== void 0 ? _a : (this._sheets = new Client_js_3.SheetsClient(this._options)));
|
|
73
74
|
}
|
|
74
75
|
get structuredDataExtractor() {
|
|
75
76
|
var _a;
|
|
76
|
-
return ((_a = this._structuredDataExtractor) !== null && _a !== void 0 ? _a : (this._structuredDataExtractor = new Client_js_4.
|
|
77
|
+
return ((_a = this._structuredDataExtractor) !== null && _a !== void 0 ? _a : (this._structuredDataExtractor = new Client_js_4.StructuredDataExtractorClient(this._options)));
|
|
77
78
|
}
|
|
78
79
|
get tasks() {
|
|
79
80
|
var _a;
|
|
80
|
-
return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new Client_js_5.
|
|
81
|
+
return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new Client_js_5.TasksClient(this._options)));
|
|
81
82
|
}
|
|
82
83
|
/**
|
|
83
84
|
* Get the chunks of a file.
|
|
84
85
|
*
|
|
85
86
|
* @param {AthenaIntelligence.FileChunkRequestIn} request
|
|
86
|
-
* @param {
|
|
87
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
88
|
*
|
|
88
89
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
89
90
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -99,8 +100,9 @@ class Tools {
|
|
|
99
100
|
}
|
|
100
101
|
__getAssetChunks(request, requestOptions) {
|
|
101
102
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
103
|
-
|
|
103
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
104
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
105
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
104
106
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
105
107
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/asset/chunks"),
|
|
106
108
|
method: "POST",
|
|
@@ -112,6 +114,8 @@ class Tools {
|
|
|
112
114
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
113
115
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
114
116
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
117
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
118
|
+
logging: this._options.logging,
|
|
115
119
|
});
|
|
116
120
|
if (_response.ok) {
|
|
117
121
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -139,6 +143,11 @@ class Tools {
|
|
|
139
143
|
body: _response.error.rawBody,
|
|
140
144
|
rawResponse: _response.rawResponse,
|
|
141
145
|
});
|
|
146
|
+
case "body-is-null":
|
|
147
|
+
throw new errors.AthenaIntelligenceError({
|
|
148
|
+
statusCode: _response.error.statusCode,
|
|
149
|
+
rawResponse: _response.rawResponse,
|
|
150
|
+
});
|
|
142
151
|
case "timeout":
|
|
143
152
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/asset/chunks.");
|
|
144
153
|
case "unknown":
|
|
@@ -153,7 +162,7 @@ class Tools {
|
|
|
153
162
|
* Get the content of an asset.
|
|
154
163
|
*
|
|
155
164
|
* @param {AthenaIntelligence.ToolsGetAssetContentRequest} request
|
|
156
|
-
* @param {
|
|
165
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
157
166
|
*
|
|
158
167
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
159
168
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -169,11 +178,12 @@ class Tools {
|
|
|
169
178
|
}
|
|
170
179
|
__getAssetContent(request, requestOptions) {
|
|
171
180
|
return __awaiter(this, void 0, void 0, function* () {
|
|
172
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
181
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
173
182
|
const { asset_id: assetId } = request;
|
|
174
183
|
const _queryParams = {};
|
|
175
|
-
_queryParams
|
|
176
|
-
|
|
184
|
+
_queryParams.asset_id = assetId;
|
|
185
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
186
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
177
187
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
178
188
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/asset/content"),
|
|
179
189
|
method: "GET",
|
|
@@ -182,6 +192,8 @@ class Tools {
|
|
|
182
192
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
183
193
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
184
194
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
195
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
196
|
+
logging: this._options.logging,
|
|
185
197
|
});
|
|
186
198
|
if (_response.ok) {
|
|
187
199
|
return {
|
|
@@ -212,6 +224,11 @@ class Tools {
|
|
|
212
224
|
body: _response.error.rawBody,
|
|
213
225
|
rawResponse: _response.rawResponse,
|
|
214
226
|
});
|
|
227
|
+
case "body-is-null":
|
|
228
|
+
throw new errors.AthenaIntelligenceError({
|
|
229
|
+
statusCode: _response.error.statusCode,
|
|
230
|
+
rawResponse: _response.rawResponse,
|
|
231
|
+
});
|
|
215
232
|
case "timeout":
|
|
216
233
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/tools/asset/content.");
|
|
217
234
|
case "unknown":
|
|
@@ -226,7 +243,7 @@ class Tools {
|
|
|
226
243
|
* Get a screenshot of a specific page from an asset.
|
|
227
244
|
*
|
|
228
245
|
* @param {AthenaIntelligence.ToolsGetAssetScreenshotRequest} request
|
|
229
|
-
* @param {
|
|
246
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
230
247
|
*
|
|
231
248
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
232
249
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -244,14 +261,15 @@ class Tools {
|
|
|
244
261
|
}
|
|
245
262
|
__getAssetScreenshot(request, requestOptions) {
|
|
246
263
|
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
264
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
248
265
|
const { asset_id: assetId, page_number: pageNumber } = request;
|
|
249
266
|
const _queryParams = {};
|
|
250
|
-
_queryParams
|
|
267
|
+
_queryParams.asset_id = assetId;
|
|
251
268
|
if (pageNumber != null) {
|
|
252
|
-
_queryParams
|
|
269
|
+
_queryParams.page_number = pageNumber.toString();
|
|
253
270
|
}
|
|
254
|
-
|
|
271
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
272
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
255
273
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
256
274
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/asset/screenshot"),
|
|
257
275
|
method: "GET",
|
|
@@ -260,6 +278,8 @@ class Tools {
|
|
|
260
278
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
261
279
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
262
280
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
281
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
282
|
+
logging: this._options.logging,
|
|
263
283
|
});
|
|
264
284
|
if (_response.ok) {
|
|
265
285
|
return {
|
|
@@ -292,6 +312,11 @@ class Tools {
|
|
|
292
312
|
body: _response.error.rawBody,
|
|
293
313
|
rawResponse: _response.rawResponse,
|
|
294
314
|
});
|
|
315
|
+
case "body-is-null":
|
|
316
|
+
throw new errors.AthenaIntelligenceError({
|
|
317
|
+
statusCode: _response.error.statusCode,
|
|
318
|
+
rawResponse: _response.rawResponse,
|
|
319
|
+
});
|
|
295
320
|
case "timeout":
|
|
296
321
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/tools/asset/screenshot.");
|
|
297
322
|
case "unknown":
|
|
@@ -306,7 +331,7 @@ class Tools {
|
|
|
306
331
|
* List contents of an asset (Folder, Collection, Project) or entire workspace in a tree structure.
|
|
307
332
|
*
|
|
308
333
|
* @param {AthenaIntelligence.ToolsListContentsRequest} request
|
|
309
|
-
* @param {
|
|
334
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
310
335
|
*
|
|
311
336
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
312
337
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
@@ -325,19 +350,20 @@ class Tools {
|
|
|
325
350
|
}
|
|
326
351
|
__listContents() {
|
|
327
352
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
328
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
353
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
329
354
|
const { asset_id: assetId, include_asset_details: includeAssetDetails, include_system_files: includeSystemFiles, } = request;
|
|
330
355
|
const _queryParams = {};
|
|
331
356
|
if (assetId != null) {
|
|
332
|
-
_queryParams
|
|
357
|
+
_queryParams.asset_id = assetId;
|
|
333
358
|
}
|
|
334
359
|
if (includeAssetDetails != null) {
|
|
335
|
-
_queryParams
|
|
360
|
+
_queryParams.include_asset_details = includeAssetDetails.toString();
|
|
336
361
|
}
|
|
337
362
|
if (includeSystemFiles != null) {
|
|
338
|
-
_queryParams
|
|
363
|
+
_queryParams.include_system_files = includeSystemFiles.toString();
|
|
339
364
|
}
|
|
340
|
-
|
|
365
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
366
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
341
367
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
342
368
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/contents"),
|
|
343
369
|
method: "GET",
|
|
@@ -346,6 +372,8 @@ class Tools {
|
|
|
346
372
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
347
373
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
348
374
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
375
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
376
|
+
logging: this._options.logging,
|
|
349
377
|
});
|
|
350
378
|
if (_response.ok) {
|
|
351
379
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -375,6 +403,11 @@ class Tools {
|
|
|
375
403
|
body: _response.error.rawBody,
|
|
376
404
|
rawResponse: _response.rawResponse,
|
|
377
405
|
});
|
|
406
|
+
case "body-is-null":
|
|
407
|
+
throw new errors.AthenaIntelligenceError({
|
|
408
|
+
statusCode: _response.error.statusCode,
|
|
409
|
+
rawResponse: _response.rawResponse,
|
|
410
|
+
});
|
|
378
411
|
case "timeout":
|
|
379
412
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/tools/contents.");
|
|
380
413
|
case "unknown":
|
|
@@ -387,7 +420,7 @@ class Tools {
|
|
|
387
420
|
}
|
|
388
421
|
/**
|
|
389
422
|
* @param {AthenaIntelligence.ToolsDataFrameRequest} request
|
|
390
|
-
* @param {
|
|
423
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
391
424
|
*
|
|
392
425
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
393
426
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -409,31 +442,32 @@ class Tools {
|
|
|
409
442
|
}
|
|
410
443
|
__dataFrame(request, requestOptions) {
|
|
411
444
|
return __awaiter(this, void 0, void 0, function* () {
|
|
412
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
445
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
413
446
|
const { asset_id: assetId, row_limit: rowLimit, index_column: indexColumn, columns, sheet_name: sheetName, separator, } = request;
|
|
414
447
|
const _queryParams = {};
|
|
415
|
-
_queryParams
|
|
448
|
+
_queryParams.asset_id = assetId;
|
|
416
449
|
if (rowLimit != null) {
|
|
417
|
-
_queryParams
|
|
450
|
+
_queryParams.row_limit = rowLimit.toString();
|
|
418
451
|
}
|
|
419
452
|
if (indexColumn != null) {
|
|
420
|
-
_queryParams
|
|
453
|
+
_queryParams.index_column = indexColumn.toString();
|
|
421
454
|
}
|
|
422
455
|
if (columns != null) {
|
|
423
456
|
if (Array.isArray(columns)) {
|
|
424
|
-
_queryParams
|
|
457
|
+
_queryParams.columns = columns.map((item) => (typeof item === "string" ? item : (0, json_js_1.toJson)(item)));
|
|
425
458
|
}
|
|
426
459
|
else {
|
|
427
|
-
_queryParams
|
|
460
|
+
_queryParams.columns = typeof columns === "string" ? columns : (0, json_js_1.toJson)(columns);
|
|
428
461
|
}
|
|
429
462
|
}
|
|
430
463
|
if (sheetName != null) {
|
|
431
|
-
_queryParams
|
|
464
|
+
_queryParams.sheet_name = sheetName;
|
|
432
465
|
}
|
|
433
466
|
if (separator != null) {
|
|
434
|
-
_queryParams
|
|
467
|
+
_queryParams.separator = separator;
|
|
435
468
|
}
|
|
436
|
-
|
|
469
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
470
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
437
471
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
438
472
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/file/data-frame"),
|
|
439
473
|
method: "GET",
|
|
@@ -442,6 +476,8 @@ class Tools {
|
|
|
442
476
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
443
477
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
444
478
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
479
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
480
|
+
logging: this._options.logging,
|
|
445
481
|
});
|
|
446
482
|
if (_response.ok) {
|
|
447
483
|
return {
|
|
@@ -476,6 +512,11 @@ class Tools {
|
|
|
476
512
|
body: _response.error.rawBody,
|
|
477
513
|
rawResponse: _response.rawResponse,
|
|
478
514
|
});
|
|
515
|
+
case "body-is-null":
|
|
516
|
+
throw new errors.AthenaIntelligenceError({
|
|
517
|
+
statusCode: _response.error.statusCode,
|
|
518
|
+
rawResponse: _response.rawResponse,
|
|
519
|
+
});
|
|
479
520
|
case "timeout":
|
|
480
521
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/tools/file/data-frame.");
|
|
481
522
|
case "unknown":
|
|
@@ -498,11 +539,12 @@ class Tools {
|
|
|
498
539
|
}
|
|
499
540
|
__rawData(request, requestOptions) {
|
|
500
541
|
return __awaiter(this, void 0, void 0, function* () {
|
|
501
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
542
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
502
543
|
const { asset_id: assetId } = request;
|
|
503
544
|
const _queryParams = {};
|
|
504
|
-
_queryParams
|
|
505
|
-
|
|
545
|
+
_queryParams.asset_id = assetId;
|
|
546
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
547
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
506
548
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
507
549
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/file/raw-data"),
|
|
508
550
|
method: "GET",
|
|
@@ -512,6 +554,8 @@ class Tools {
|
|
|
512
554
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
513
555
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
514
556
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
557
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
558
|
+
logging: this._options.logging,
|
|
515
559
|
});
|
|
516
560
|
if (_response.ok) {
|
|
517
561
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -541,6 +585,11 @@ class Tools {
|
|
|
541
585
|
body: _response.error.rawBody,
|
|
542
586
|
rawResponse: _response.rawResponse,
|
|
543
587
|
});
|
|
588
|
+
case "body-is-null":
|
|
589
|
+
throw new errors.AthenaIntelligenceError({
|
|
590
|
+
statusCode: _response.error.statusCode,
|
|
591
|
+
rawResponse: _response.rawResponse,
|
|
592
|
+
});
|
|
544
593
|
case "timeout":
|
|
545
594
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/tools/file/raw-data.");
|
|
546
595
|
case "unknown":
|
|
@@ -555,7 +604,7 @@ class Tools {
|
|
|
555
604
|
* Save a file as an asset in the user's workspace.
|
|
556
605
|
*
|
|
557
606
|
* @param {AthenaIntelligence.BodySaveAssetApiV0ToolsFileSavePost} request
|
|
558
|
-
* @param {
|
|
607
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
559
608
|
*
|
|
560
609
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
561
610
|
* @throws {@link AthenaIntelligence.ContentTooLargeError}
|
|
@@ -573,15 +622,16 @@ class Tools {
|
|
|
573
622
|
}
|
|
574
623
|
__saveAsset(request, requestOptions) {
|
|
575
624
|
return __awaiter(this, void 0, void 0, function* () {
|
|
576
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
625
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
577
626
|
const _queryParams = {};
|
|
578
627
|
if (request.parent_folder_id != null) {
|
|
579
|
-
_queryParams
|
|
628
|
+
_queryParams.parent_folder_id = request.parent_folder_id;
|
|
580
629
|
}
|
|
581
630
|
const _request = yield core.newFormData();
|
|
582
631
|
yield _request.appendFile("file", request.file);
|
|
583
632
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
584
|
-
|
|
633
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
634
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
585
635
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
586
636
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/file/save"),
|
|
587
637
|
method: "POST",
|
|
@@ -593,6 +643,8 @@ class Tools {
|
|
|
593
643
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
594
644
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
595
645
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
646
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
647
|
+
logging: this._options.logging,
|
|
596
648
|
});
|
|
597
649
|
if (_response.ok) {
|
|
598
650
|
return {
|
|
@@ -623,6 +675,11 @@ class Tools {
|
|
|
623
675
|
body: _response.error.rawBody,
|
|
624
676
|
rawResponse: _response.rawResponse,
|
|
625
677
|
});
|
|
678
|
+
case "body-is-null":
|
|
679
|
+
throw new errors.AthenaIntelligenceError({
|
|
680
|
+
statusCode: _response.error.statusCode,
|
|
681
|
+
rawResponse: _response.rawResponse,
|
|
682
|
+
});
|
|
626
683
|
case "timeout":
|
|
627
684
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/file/save.");
|
|
628
685
|
case "unknown":
|
|
@@ -633,11 +690,5 @@ class Tools {
|
|
|
633
690
|
}
|
|
634
691
|
});
|
|
635
692
|
}
|
|
636
|
-
_getCustomAuthorizationHeaders() {
|
|
637
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
638
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
639
|
-
return { "X-API-KEY": apiKeyValue };
|
|
640
|
-
});
|
|
641
|
-
}
|
|
642
693
|
}
|
|
643
|
-
exports.
|
|
694
|
+
exports.ToolsClient = ToolsClient;
|
package/dist/cjs/api/resources/tools/client/requests/BodySaveAssetApiV0ToolsFileSavePost.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as core from "../../../../../core/index.js";
|
|
1
|
+
import type * as core from "../../../../../core/index.js";
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
@@ -9,5 +9,5 @@ import * as core from "../../../../../core/index.js";
|
|
|
9
9
|
export interface BodySaveAssetApiV0ToolsFileSavePost {
|
|
10
10
|
/** Identifier of the folder into which the asset should be saved */
|
|
11
11
|
parent_folder_id?: string;
|
|
12
|
-
file: core.file.Uploadable
|
|
12
|
+
file: core.file.Uploadable;
|
|
13
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
1
|
+
export type { BodySaveAssetApiV0ToolsFileSavePost } from "./BodySaveAssetApiV0ToolsFileSavePost.js";
|
|
2
|
+
export type { FileChunkRequestIn } from "./FileChunkRequestIn.js";
|
|
3
|
+
export type { ToolsDataFrameRequest } from "./ToolsDataFrameRequest.js";
|
|
4
|
+
export type { ToolsGetAssetContentRequest } from "./ToolsGetAssetContentRequest.js";
|
|
5
|
+
export type { ToolsGetAssetScreenshotRequest } from "./ToolsGetAssetScreenshotRequest.js";
|
|
6
|
+
export type { ToolsListContentsRequest } from "./ToolsListContentsRequest.js";
|
|
7
|
+
export type { ToolsRawDataRequest } from "./ToolsRawDataRequest.js";
|
|
@@ -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("./types/index.js"), exports);
|
|
18
17
|
__exportStar(require("./client/index.js"), exports);
|
|
19
18
|
__exportStar(require("./resources/index.js"), exports);
|
|
19
|
+
__exportStar(require("./types/index.js"), exports);
|
|
@@ -1,33 +1,33 @@
|
|
|
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
|
-
export declare namespace
|
|
4
|
+
export declare namespace CalendarClient {
|
|
4
5
|
interface Options extends BaseClientOptions {
|
|
5
6
|
}
|
|
6
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
|
-
export declare class
|
|
10
|
-
protected readonly _options:
|
|
11
|
-
constructor(
|
|
10
|
+
export declare class CalendarClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<CalendarClient.Options>;
|
|
12
|
+
constructor(options: CalendarClient.Options);
|
|
12
13
|
/**
|
|
13
14
|
* Coming soon! List calendar events with optional filtering.
|
|
14
15
|
*
|
|
15
|
-
* @param {
|
|
16
|
+
* @param {CalendarClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
17
|
*
|
|
17
18
|
* @example
|
|
18
19
|
* await client.tools.calendar.listEvents()
|
|
19
20
|
*/
|
|
20
|
-
listEvents(requestOptions?:
|
|
21
|
+
listEvents(requestOptions?: CalendarClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
21
22
|
private __listEvents;
|
|
22
23
|
/**
|
|
23
24
|
* Coming soon! Create new calendar events.
|
|
24
25
|
*
|
|
25
|
-
* @param {
|
|
26
|
+
* @param {CalendarClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
27
|
*
|
|
27
28
|
* @example
|
|
28
29
|
* await client.tools.calendar.createEvent()
|
|
29
30
|
*/
|
|
30
|
-
createEvent(requestOptions?:
|
|
31
|
+
createEvent(requestOptions?: CalendarClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
31
32
|
private __createEvent;
|
|
32
|
-
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
33
33
|
}
|