@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
|
@@ -8,20 +8,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
12
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
13
|
-
import * as
|
|
14
|
-
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
14
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
import * as AthenaIntelligence from "../../../../../index.mjs";
|
|
17
|
+
export class GeneralClient {
|
|
18
|
+
constructor(options) {
|
|
19
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Coming soon! Call the general agent with batched requests and return the results.
|
|
22
23
|
*
|
|
23
24
|
* @param {AthenaIntelligence.GeneralAgentRequest[]} request
|
|
24
|
-
* @param {
|
|
25
|
+
* @param {GeneralClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
26
|
*
|
|
26
27
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
27
28
|
*
|
|
@@ -41,8 +42,9 @@ export class General {
|
|
|
41
42
|
}
|
|
42
43
|
__batch(request, requestOptions) {
|
|
43
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
45
|
-
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
47
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
46
48
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
47
49
|
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/agents/general/batch"),
|
|
48
50
|
method: "POST",
|
|
@@ -54,6 +56,8 @@ export class General {
|
|
|
54
56
|
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,
|
|
55
57
|
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,
|
|
56
58
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
59
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
60
|
+
logging: this._options.logging,
|
|
57
61
|
});
|
|
58
62
|
if (_response.ok) {
|
|
59
63
|
return {
|
|
@@ -80,6 +84,11 @@ export class General {
|
|
|
80
84
|
body: _response.error.rawBody,
|
|
81
85
|
rawResponse: _response.rawResponse,
|
|
82
86
|
});
|
|
87
|
+
case "body-is-null":
|
|
88
|
+
throw new errors.AthenaIntelligenceError({
|
|
89
|
+
statusCode: _response.error.statusCode,
|
|
90
|
+
rawResponse: _response.rawResponse,
|
|
91
|
+
});
|
|
83
92
|
case "timeout":
|
|
84
93
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/agents/general/batch.");
|
|
85
94
|
case "unknown":
|
|
@@ -97,7 +106,7 @@ export class General {
|
|
|
97
106
|
* and return the result.
|
|
98
107
|
*
|
|
99
108
|
* @param {AthenaIntelligence.GeneralAgentRequest} request
|
|
100
|
-
* @param {
|
|
109
|
+
* @param {GeneralClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
110
|
*
|
|
102
111
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
103
112
|
*
|
|
@@ -117,8 +126,9 @@ export class General {
|
|
|
117
126
|
}
|
|
118
127
|
__invoke(request, requestOptions) {
|
|
119
128
|
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
121
|
-
|
|
129
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
130
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
131
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
122
132
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
123
133
|
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/agents/general/invoke"),
|
|
124
134
|
method: "POST",
|
|
@@ -130,6 +140,8 @@ export class General {
|
|
|
130
140
|
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,
|
|
131
141
|
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,
|
|
132
142
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
143
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
144
|
+
logging: this._options.logging,
|
|
133
145
|
});
|
|
134
146
|
if (_response.ok) {
|
|
135
147
|
return {
|
|
@@ -156,6 +168,11 @@ export class General {
|
|
|
156
168
|
body: _response.error.rawBody,
|
|
157
169
|
rawResponse: _response.rawResponse,
|
|
158
170
|
});
|
|
171
|
+
case "body-is-null":
|
|
172
|
+
throw new errors.AthenaIntelligenceError({
|
|
173
|
+
statusCode: _response.error.statusCode,
|
|
174
|
+
rawResponse: _response.rawResponse,
|
|
175
|
+
});
|
|
159
176
|
case "timeout":
|
|
160
177
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/agents/general/invoke.");
|
|
161
178
|
case "unknown":
|
|
@@ -170,7 +187,7 @@ export class General {
|
|
|
170
187
|
* Coming soon! Call the general agent and stream events for real-time chat applications.
|
|
171
188
|
*
|
|
172
189
|
* @param {AthenaIntelligence.GeneralAgentRequest} request
|
|
173
|
-
* @param {
|
|
190
|
+
* @param {GeneralClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
174
191
|
*
|
|
175
192
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
176
193
|
*
|
|
@@ -190,8 +207,9 @@ export class General {
|
|
|
190
207
|
}
|
|
191
208
|
__streamEvents(request, requestOptions) {
|
|
192
209
|
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
194
|
-
|
|
210
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
211
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
212
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
195
213
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
196
214
|
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/agents/general/stream_events"),
|
|
197
215
|
method: "POST",
|
|
@@ -203,6 +221,8 @@ export class General {
|
|
|
203
221
|
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,
|
|
204
222
|
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,
|
|
205
223
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
224
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
225
|
+
logging: this._options.logging,
|
|
206
226
|
});
|
|
207
227
|
if (_response.ok) {
|
|
208
228
|
return {
|
|
@@ -229,6 +249,11 @@ export class General {
|
|
|
229
249
|
body: _response.error.rawBody,
|
|
230
250
|
rawResponse: _response.rawResponse,
|
|
231
251
|
});
|
|
252
|
+
case "body-is-null":
|
|
253
|
+
throw new errors.AthenaIntelligenceError({
|
|
254
|
+
statusCode: _response.error.statusCode,
|
|
255
|
+
rawResponse: _response.rawResponse,
|
|
256
|
+
});
|
|
232
257
|
case "timeout":
|
|
233
258
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/agents/general/stream_events.");
|
|
234
259
|
case "unknown":
|
|
@@ -239,10 +264,4 @@ export class General {
|
|
|
239
264
|
}
|
|
240
265
|
});
|
|
241
266
|
}
|
|
242
|
-
_getCustomAuthorizationHeaders() {
|
|
243
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
244
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
245
|
-
return { "X-API-KEY": apiKeyValue };
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
267
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
export * from "./drive/client/requests/index.mjs";
|
|
1
2
|
export * as drive from "./drive/index.mjs";
|
|
2
3
|
export * as general from "./general/index.mjs";
|
|
3
|
-
export * as research from "./research/index.mjs";
|
|
4
|
-
export * as sql from "./sql/index.mjs";
|
|
5
|
-
export * from "./drive/client/requests/index.mjs";
|
|
6
4
|
export * from "./research/client/requests/index.mjs";
|
|
5
|
+
export * as research from "./research/index.mjs";
|
|
7
6
|
export * from "./sql/client/requests/index.mjs";
|
|
7
|
+
export * as sql from "./sql/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
export * from "./drive/client/requests/index.mjs";
|
|
1
2
|
export * as drive from "./drive/index.mjs";
|
|
2
3
|
export * as general from "./general/index.mjs";
|
|
3
|
-
export * as research from "./research/index.mjs";
|
|
4
|
-
export * as sql from "./sql/index.mjs";
|
|
5
|
-
export * from "./drive/client/requests/index.mjs";
|
|
6
4
|
export * from "./research/client/requests/index.mjs";
|
|
5
|
+
export * as research from "./research/index.mjs";
|
|
7
6
|
export * from "./sql/client/requests/index.mjs";
|
|
7
|
+
export * as sql from "./sql/index.mjs";
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
2
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
3
4
|
import * as AthenaIntelligence from "../../../../../index.mjs";
|
|
4
|
-
export declare namespace
|
|
5
|
+
export declare namespace ResearchClient {
|
|
5
6
|
interface Options extends BaseClientOptions {
|
|
6
7
|
}
|
|
7
8
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
protected readonly _options:
|
|
12
|
-
constructor(
|
|
11
|
+
export declare class ResearchClient {
|
|
12
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ResearchClient.Options>;
|
|
13
|
+
constructor(options: ResearchClient.Options);
|
|
13
14
|
/**
|
|
14
15
|
* Coming soon! Conduct research using web and other sources.
|
|
15
16
|
*
|
|
16
17
|
* @param {AthenaIntelligence.agents.ResearchAgentRequest} request
|
|
17
|
-
* @param {
|
|
18
|
+
* @param {ResearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
19
|
*
|
|
19
20
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
20
21
|
*
|
|
@@ -28,7 +29,6 @@ export declare class Research {
|
|
|
28
29
|
* }]
|
|
29
30
|
* })
|
|
30
31
|
*/
|
|
31
|
-
invoke(request: AthenaIntelligence.agents.ResearchAgentRequest, requestOptions?:
|
|
32
|
+
invoke(request: AthenaIntelligence.agents.ResearchAgentRequest, requestOptions?: ResearchClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ResearchAgentResponse>;
|
|
32
33
|
private __invoke;
|
|
33
|
-
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
34
34
|
}
|
|
@@ -8,20 +8,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
12
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
13
|
-
import * as
|
|
14
|
-
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
14
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
import * as AthenaIntelligence from "../../../../../index.mjs";
|
|
17
|
+
export class ResearchClient {
|
|
18
|
+
constructor(options) {
|
|
19
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Coming soon! Conduct research using web and other sources.
|
|
22
23
|
*
|
|
23
24
|
* @param {AthenaIntelligence.agents.ResearchAgentRequest} request
|
|
24
|
-
* @param {
|
|
25
|
+
* @param {ResearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
26
|
*
|
|
26
27
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
27
28
|
*
|
|
@@ -40,8 +41,9 @@ export class Research {
|
|
|
40
41
|
}
|
|
41
42
|
__invoke(request, requestOptions) {
|
|
42
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
44
|
-
|
|
44
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
45
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
46
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
45
47
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
46
48
|
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/agents/research/invoke"),
|
|
47
49
|
method: "POST",
|
|
@@ -53,6 +55,8 @@ export class Research {
|
|
|
53
55
|
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,
|
|
54
56
|
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,
|
|
55
57
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
58
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
59
|
+
logging: this._options.logging,
|
|
56
60
|
});
|
|
57
61
|
if (_response.ok) {
|
|
58
62
|
return {
|
|
@@ -79,6 +83,11 @@ export class Research {
|
|
|
79
83
|
body: _response.error.rawBody,
|
|
80
84
|
rawResponse: _response.rawResponse,
|
|
81
85
|
});
|
|
86
|
+
case "body-is-null":
|
|
87
|
+
throw new errors.AthenaIntelligenceError({
|
|
88
|
+
statusCode: _response.error.statusCode,
|
|
89
|
+
rawResponse: _response.rawResponse,
|
|
90
|
+
});
|
|
82
91
|
case "timeout":
|
|
83
92
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/agents/research/invoke.");
|
|
84
93
|
case "unknown":
|
|
@@ -89,10 +98,4 @@ export class Research {
|
|
|
89
98
|
}
|
|
90
99
|
});
|
|
91
100
|
}
|
|
92
|
-
_getCustomAuthorizationHeaders() {
|
|
93
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
95
|
-
return { "X-API-KEY": apiKeyValue };
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { ResearchAgentRequest } from "./ResearchAgentRequest.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {}
|
|
1
|
+
export {};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
2
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
3
4
|
import * as AthenaIntelligence from "../../../../../index.mjs";
|
|
4
|
-
export declare namespace
|
|
5
|
+
export declare namespace SqlClient {
|
|
5
6
|
interface Options extends BaseClientOptions {
|
|
6
7
|
}
|
|
7
8
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
protected readonly _options:
|
|
12
|
-
constructor(
|
|
11
|
+
export declare class SqlClient {
|
|
12
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<SqlClient.Options>;
|
|
13
|
+
constructor(options: SqlClient.Options);
|
|
13
14
|
/**
|
|
14
15
|
* Coming soon! Generate, execute, and test SQL queries. Returns an asset ID for the query object.
|
|
15
16
|
*
|
|
16
17
|
* @param {AthenaIntelligence.agents.SqlAgentRequest} request
|
|
17
|
-
* @param {
|
|
18
|
+
* @param {SqlClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
19
|
*
|
|
19
20
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
20
21
|
*
|
|
@@ -28,7 +29,6 @@ export declare class Sql {
|
|
|
28
29
|
* }]
|
|
29
30
|
* })
|
|
30
31
|
*/
|
|
31
|
-
invoke(request: AthenaIntelligence.agents.SqlAgentRequest, requestOptions?:
|
|
32
|
+
invoke(request: AthenaIntelligence.agents.SqlAgentRequest, requestOptions?: SqlClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.SqlAgentResponse>;
|
|
32
33
|
private __invoke;
|
|
33
|
-
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
34
34
|
}
|
|
@@ -8,20 +8,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
12
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
13
|
-
import * as
|
|
14
|
-
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
14
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
import * as AthenaIntelligence from "../../../../../index.mjs";
|
|
17
|
+
export class SqlClient {
|
|
18
|
+
constructor(options) {
|
|
19
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Coming soon! Generate, execute, and test SQL queries. Returns an asset ID for the query object.
|
|
22
23
|
*
|
|
23
24
|
* @param {AthenaIntelligence.agents.SqlAgentRequest} request
|
|
24
|
-
* @param {
|
|
25
|
+
* @param {SqlClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
26
|
*
|
|
26
27
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
27
28
|
*
|
|
@@ -40,8 +41,9 @@ export class Sql {
|
|
|
40
41
|
}
|
|
41
42
|
__invoke(request, requestOptions) {
|
|
42
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
44
|
-
|
|
44
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
45
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
46
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
45
47
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
46
48
|
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/agents/sql/invoke"),
|
|
47
49
|
method: "POST",
|
|
@@ -53,6 +55,8 @@ export class Sql {
|
|
|
53
55
|
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,
|
|
54
56
|
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,
|
|
55
57
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
58
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
59
|
+
logging: this._options.logging,
|
|
56
60
|
});
|
|
57
61
|
if (_response.ok) {
|
|
58
62
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -76,6 +80,11 @@ export class Sql {
|
|
|
76
80
|
body: _response.error.rawBody,
|
|
77
81
|
rawResponse: _response.rawResponse,
|
|
78
82
|
});
|
|
83
|
+
case "body-is-null":
|
|
84
|
+
throw new errors.AthenaIntelligenceError({
|
|
85
|
+
statusCode: _response.error.statusCode,
|
|
86
|
+
rawResponse: _response.rawResponse,
|
|
87
|
+
});
|
|
79
88
|
case "timeout":
|
|
80
89
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/agents/sql/invoke.");
|
|
81
90
|
case "unknown":
|
|
@@ -86,10 +95,4 @@ export class Sql {
|
|
|
86
95
|
}
|
|
87
96
|
});
|
|
88
97
|
}
|
|
89
|
-
_getCustomAuthorizationHeaders() {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
92
|
-
return { "X-API-KEY": apiKeyValue };
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { SqlAgentRequest } from "./SqlAgentRequest.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {}
|
|
1
|
+
export {};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
2
3
|
import * as core from "../../../../core/index.mjs";
|
|
3
4
|
import * as AthenaIntelligence from "../../../index.mjs";
|
|
4
|
-
export declare namespace
|
|
5
|
+
export declare namespace AopClient {
|
|
5
6
|
interface Options extends BaseClientOptions {
|
|
6
7
|
}
|
|
7
8
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
protected readonly _options:
|
|
12
|
-
constructor(
|
|
11
|
+
export declare class AopClient {
|
|
12
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<AopClient.Options>;
|
|
13
|
+
constructor(options: AopClient.Options);
|
|
13
14
|
/**
|
|
14
15
|
* DEPRECATED: This endpoint is deprecated. Please use /aop/execute-async instead for better performance and reliability. Execute an existing Agent Operating Procedure (AOP) asset with optional user inputs. AOPs are pre-configured AI workflows that can perform complex tasks like research, analysis, and content generation.
|
|
15
16
|
*
|
|
16
17
|
* @param {AthenaIntelligence.AopExecuteRequestIn} request
|
|
17
|
-
* @param {
|
|
18
|
+
* @param {AopClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
19
|
*
|
|
19
20
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
20
21
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
@@ -31,13 +32,13 @@ export declare class Aop {
|
|
|
31
32
|
* }
|
|
32
33
|
* })
|
|
33
34
|
*/
|
|
34
|
-
execute(request: AthenaIntelligence.AopExecuteRequestIn, requestOptions?:
|
|
35
|
+
execute(request: AthenaIntelligence.AopExecuteRequestIn, requestOptions?: AopClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.AopExecuteResponseOut>;
|
|
35
36
|
private __execute;
|
|
36
37
|
/**
|
|
37
38
|
* Start execution of an Agent Operating Procedure (AOP) asset asynchronously. Returns immediately with a thread_id for tracking execution progress without waiting for completion.
|
|
38
39
|
*
|
|
39
40
|
* @param {AthenaIntelligence.AopExecuteRequestIn} request
|
|
40
|
-
* @param {
|
|
41
|
+
* @param {AopClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
42
|
*
|
|
42
43
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
43
44
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
@@ -54,7 +55,6 @@ export declare class Aop {
|
|
|
54
55
|
* }
|
|
55
56
|
* })
|
|
56
57
|
*/
|
|
57
|
-
executeAsync(request: AthenaIntelligence.AopExecuteRequestIn, requestOptions?:
|
|
58
|
+
executeAsync(request: AthenaIntelligence.AopExecuteRequestIn, requestOptions?: AopClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.AopAsyncExecuteResponseOut>;
|
|
58
59
|
private __executeAsync;
|
|
59
|
-
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
60
60
|
}
|
|
@@ -8,20 +8,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
13
|
import * as core from "../../../../core/index.mjs";
|
|
13
|
-
import * as
|
|
14
|
-
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
14
|
+
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import * as errors from "../../../../errors/index.mjs";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
import * as AthenaIntelligence from "../../../index.mjs";
|
|
17
|
+
export class AopClient {
|
|
18
|
+
constructor(options) {
|
|
19
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* DEPRECATED: This endpoint is deprecated. Please use /aop/execute-async instead for better performance and reliability. Execute an existing Agent Operating Procedure (AOP) asset with optional user inputs. AOPs are pre-configured AI workflows that can perform complex tasks like research, analysis, and content generation.
|
|
22
23
|
*
|
|
23
24
|
* @param {AthenaIntelligence.AopExecuteRequestIn} request
|
|
24
|
-
* @param {
|
|
25
|
+
* @param {AopClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
26
|
*
|
|
26
27
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
27
28
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
@@ -43,8 +44,9 @@ export class Aop {
|
|
|
43
44
|
}
|
|
44
45
|
__execute(request, requestOptions) {
|
|
45
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
47
|
-
|
|
47
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
48
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
49
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
48
50
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
49
51
|
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/aop/execute"),
|
|
50
52
|
method: "POST",
|
|
@@ -56,6 +58,8 @@ export class Aop {
|
|
|
56
58
|
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,
|
|
57
59
|
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,
|
|
58
60
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
61
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
62
|
+
logging: this._options.logging,
|
|
59
63
|
});
|
|
60
64
|
if (_response.ok) {
|
|
61
65
|
return {
|
|
@@ -90,6 +94,11 @@ export class Aop {
|
|
|
90
94
|
body: _response.error.rawBody,
|
|
91
95
|
rawResponse: _response.rawResponse,
|
|
92
96
|
});
|
|
97
|
+
case "body-is-null":
|
|
98
|
+
throw new errors.AthenaIntelligenceError({
|
|
99
|
+
statusCode: _response.error.statusCode,
|
|
100
|
+
rawResponse: _response.rawResponse,
|
|
101
|
+
});
|
|
93
102
|
case "timeout":
|
|
94
103
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/aop/execute.");
|
|
95
104
|
case "unknown":
|
|
@@ -104,7 +113,7 @@ export class Aop {
|
|
|
104
113
|
* Start execution of an Agent Operating Procedure (AOP) asset asynchronously. Returns immediately with a thread_id for tracking execution progress without waiting for completion.
|
|
105
114
|
*
|
|
106
115
|
* @param {AthenaIntelligence.AopExecuteRequestIn} request
|
|
107
|
-
* @param {
|
|
116
|
+
* @param {AopClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
108
117
|
*
|
|
109
118
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
110
119
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
@@ -126,8 +135,9 @@ export class Aop {
|
|
|
126
135
|
}
|
|
127
136
|
__executeAsync(request, requestOptions) {
|
|
128
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
130
|
-
|
|
138
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
139
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
140
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
131
141
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
132
142
|
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/aop/execute-async"),
|
|
133
143
|
method: "POST",
|
|
@@ -139,6 +149,8 @@ export class Aop {
|
|
|
139
149
|
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,
|
|
140
150
|
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,
|
|
141
151
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
152
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
153
|
+
logging: this._options.logging,
|
|
142
154
|
});
|
|
143
155
|
if (_response.ok) {
|
|
144
156
|
return {
|
|
@@ -173,6 +185,11 @@ export class Aop {
|
|
|
173
185
|
body: _response.error.rawBody,
|
|
174
186
|
rawResponse: _response.rawResponse,
|
|
175
187
|
});
|
|
188
|
+
case "body-is-null":
|
|
189
|
+
throw new errors.AthenaIntelligenceError({
|
|
190
|
+
statusCode: _response.error.statusCode,
|
|
191
|
+
rawResponse: _response.rawResponse,
|
|
192
|
+
});
|
|
176
193
|
case "timeout":
|
|
177
194
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/aop/execute-async.");
|
|
178
195
|
case "unknown":
|
|
@@ -183,10 +200,4 @@ export class Aop {
|
|
|
183
200
|
}
|
|
184
201
|
});
|
|
185
202
|
}
|
|
186
|
-
_getCustomAuthorizationHeaders() {
|
|
187
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
189
|
-
return { "X-API-KEY": apiKeyValue };
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
203
|
}
|