@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
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { ResearchAgentRequest } from "./ResearchAgentRequest.js";
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
2
3
|
import * as core from "../../../../../../core/index.js";
|
|
3
4
|
import * as AthenaIntelligence from "../../../../../index.js";
|
|
4
|
-
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
|
}
|
|
@@ -43,21 +43,22 @@ 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.SqlClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
50
48
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../../../environments.js"));
|
|
51
51
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
const AthenaIntelligence = __importStar(require("../../../../../index.js"));
|
|
53
|
+
class SqlClient {
|
|
54
|
+
constructor(options) {
|
|
55
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
58
|
* Coming soon! Generate, execute, and test SQL queries. Returns an asset ID for the query object.
|
|
58
59
|
*
|
|
59
60
|
* @param {AthenaIntelligence.agents.SqlAgentRequest} request
|
|
60
|
-
* @param {
|
|
61
|
+
* @param {SqlClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
62
|
*
|
|
62
63
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
63
64
|
*
|
|
@@ -76,8 +77,9 @@ class Sql {
|
|
|
76
77
|
}
|
|
77
78
|
__invoke(request, requestOptions) {
|
|
78
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
80
|
-
|
|
80
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
81
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
82
|
+
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);
|
|
81
83
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
82
84
|
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"),
|
|
83
85
|
method: "POST",
|
|
@@ -89,6 +91,8 @@ class Sql {
|
|
|
89
91
|
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,
|
|
90
92
|
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,
|
|
91
93
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
94
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
95
|
+
logging: this._options.logging,
|
|
92
96
|
});
|
|
93
97
|
if (_response.ok) {
|
|
94
98
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -112,6 +116,11 @@ class Sql {
|
|
|
112
116
|
body: _response.error.rawBody,
|
|
113
117
|
rawResponse: _response.rawResponse,
|
|
114
118
|
});
|
|
119
|
+
case "body-is-null":
|
|
120
|
+
throw new errors.AthenaIntelligenceError({
|
|
121
|
+
statusCode: _response.error.statusCode,
|
|
122
|
+
rawResponse: _response.rawResponse,
|
|
123
|
+
});
|
|
115
124
|
case "timeout":
|
|
116
125
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/agents/sql/invoke.");
|
|
117
126
|
case "unknown":
|
|
@@ -122,11 +131,5 @@ class Sql {
|
|
|
122
131
|
}
|
|
123
132
|
});
|
|
124
133
|
}
|
|
125
|
-
_getCustomAuthorizationHeaders() {
|
|
126
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
128
|
-
return { "X-API-KEY": apiKeyValue };
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
134
|
}
|
|
132
|
-
exports.
|
|
135
|
+
exports.SqlClient = SqlClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { SqlAgentRequest } from "./SqlAgentRequest.js";
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
2
3
|
import * as core from "../../../../core/index.js";
|
|
3
4
|
import * as AthenaIntelligence from "../../../index.js";
|
|
4
|
-
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
|
}
|
|
@@ -43,21 +43,22 @@ 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.AopClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
50
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
51
51
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
const AthenaIntelligence = __importStar(require("../../../index.js"));
|
|
53
|
+
class AopClient {
|
|
54
|
+
constructor(options) {
|
|
55
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
58
|
* 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.
|
|
58
59
|
*
|
|
59
60
|
* @param {AthenaIntelligence.AopExecuteRequestIn} request
|
|
60
|
-
* @param {
|
|
61
|
+
* @param {AopClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
62
|
*
|
|
62
63
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
63
64
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
@@ -79,8 +80,9 @@ class Aop {
|
|
|
79
80
|
}
|
|
80
81
|
__execute(request, requestOptions) {
|
|
81
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
83
|
-
|
|
83
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
84
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
85
|
+
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);
|
|
84
86
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
85
87
|
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"),
|
|
86
88
|
method: "POST",
|
|
@@ -92,6 +94,8 @@ class Aop {
|
|
|
92
94
|
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,
|
|
93
95
|
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,
|
|
94
96
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
97
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
98
|
+
logging: this._options.logging,
|
|
95
99
|
});
|
|
96
100
|
if (_response.ok) {
|
|
97
101
|
return {
|
|
@@ -126,6 +130,11 @@ class Aop {
|
|
|
126
130
|
body: _response.error.rawBody,
|
|
127
131
|
rawResponse: _response.rawResponse,
|
|
128
132
|
});
|
|
133
|
+
case "body-is-null":
|
|
134
|
+
throw new errors.AthenaIntelligenceError({
|
|
135
|
+
statusCode: _response.error.statusCode,
|
|
136
|
+
rawResponse: _response.rawResponse,
|
|
137
|
+
});
|
|
129
138
|
case "timeout":
|
|
130
139
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/aop/execute.");
|
|
131
140
|
case "unknown":
|
|
@@ -140,7 +149,7 @@ class Aop {
|
|
|
140
149
|
* Start execution of an Agent Operating Procedure (AOP) asset asynchronously. Returns immediately with a thread_id for tracking execution progress without waiting for completion.
|
|
141
150
|
*
|
|
142
151
|
* @param {AthenaIntelligence.AopExecuteRequestIn} request
|
|
143
|
-
* @param {
|
|
152
|
+
* @param {AopClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
144
153
|
*
|
|
145
154
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
146
155
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
@@ -162,8 +171,9 @@ class Aop {
|
|
|
162
171
|
}
|
|
163
172
|
__executeAsync(request, requestOptions) {
|
|
164
173
|
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
166
|
-
|
|
174
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
175
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
176
|
+
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);
|
|
167
177
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
168
178
|
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"),
|
|
169
179
|
method: "POST",
|
|
@@ -175,6 +185,8 @@ class Aop {
|
|
|
175
185
|
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,
|
|
176
186
|
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,
|
|
177
187
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
188
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
189
|
+
logging: this._options.logging,
|
|
178
190
|
});
|
|
179
191
|
if (_response.ok) {
|
|
180
192
|
return {
|
|
@@ -209,6 +221,11 @@ class Aop {
|
|
|
209
221
|
body: _response.error.rawBody,
|
|
210
222
|
rawResponse: _response.rawResponse,
|
|
211
223
|
});
|
|
224
|
+
case "body-is-null":
|
|
225
|
+
throw new errors.AthenaIntelligenceError({
|
|
226
|
+
statusCode: _response.error.statusCode,
|
|
227
|
+
rawResponse: _response.rawResponse,
|
|
228
|
+
});
|
|
212
229
|
case "timeout":
|
|
213
230
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/aop/execute-async.");
|
|
214
231
|
case "unknown":
|
|
@@ -219,11 +236,5 @@ class Aop {
|
|
|
219
236
|
}
|
|
220
237
|
});
|
|
221
238
|
}
|
|
222
|
-
_getCustomAuthorizationHeaders() {
|
|
223
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
225
|
-
return { "X-API-KEY": apiKeyValue };
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
239
|
}
|
|
229
|
-
exports.
|
|
240
|
+
exports.AopClient = AopClient;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
2
3
|
import * as core from "../../../../core/index.js";
|
|
3
4
|
import * as AthenaIntelligence from "../../../index.js";
|
|
4
|
-
export declare namespace
|
|
5
|
+
export declare namespace AssetsClient {
|
|
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 AssetsClient {
|
|
12
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<AssetsClient.Options>;
|
|
13
|
+
constructor(options: AssetsClient.Options);
|
|
13
14
|
/**
|
|
14
15
|
* Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence.
|
|
15
16
|
*
|
|
16
17
|
* @param {AthenaIntelligence.AssetsListRequest} request
|
|
17
|
-
* @param {
|
|
18
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
19
|
*
|
|
19
20
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
20
21
|
*
|
|
@@ -26,13 +27,13 @@ export declare class Assets {
|
|
|
26
27
|
* sort: "sort"
|
|
27
28
|
* })
|
|
28
29
|
*/
|
|
29
|
-
list(request?: AthenaIntelligence.AssetsListRequest, requestOptions?:
|
|
30
|
+
list(request?: AthenaIntelligence.AssetsListRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.PaginatedAssetsOut>;
|
|
30
31
|
private __list;
|
|
31
32
|
/**
|
|
32
33
|
* Create a new asset such as a spreadsheet, document, or folder in your workspace. This endpoint uses internal GraphQL mutations to create assets with proper permissions and workspace integration.
|
|
33
34
|
*
|
|
34
35
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
35
|
-
* @param {
|
|
36
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
37
|
*
|
|
37
38
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
38
39
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
@@ -45,13 +46,13 @@ export declare class Assets {
|
|
|
45
46
|
* title: "My New Spreadsheet"
|
|
46
47
|
* })
|
|
47
48
|
*/
|
|
48
|
-
create(request: AthenaIntelligence.CreateAssetRequestIn, requestOptions?:
|
|
49
|
+
create(request: AthenaIntelligence.CreateAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CreateAssetResponseOut>;
|
|
49
50
|
private __create;
|
|
50
51
|
/**
|
|
51
52
|
* Create a new project with custom metadata. Projects can be typed (e.g., 'candidate', 'user', 'company') and include flexible custom metadata for storing additional information.
|
|
52
53
|
*
|
|
53
54
|
* @param {AthenaIntelligence.CreateProjectRequestIn} request
|
|
54
|
-
* @param {
|
|
55
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
56
|
*
|
|
56
57
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
57
58
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
@@ -73,13 +74,13 @@ export declare class Assets {
|
|
|
73
74
|
* title: "John Doe - Software Engineer"
|
|
74
75
|
* })
|
|
75
76
|
*/
|
|
76
|
-
createProject(request: AthenaIntelligence.CreateProjectRequestIn, requestOptions?:
|
|
77
|
+
createProject(request: AthenaIntelligence.CreateProjectRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CreateProjectResponseOut>;
|
|
77
78
|
private __createProject;
|
|
78
79
|
/**
|
|
79
80
|
* Retrieve a single asset by its ID. Returns comprehensive metadata including creation info, tags, timestamps, media type, and AI-generated summary.
|
|
80
81
|
*
|
|
81
|
-
* @param {string}
|
|
82
|
-
* @param {
|
|
82
|
+
* @param {string} asset_id
|
|
83
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
83
84
|
*
|
|
84
85
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
85
86
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -88,7 +89,6 @@ export declare class Assets {
|
|
|
88
89
|
* @example
|
|
89
90
|
* await client.assets.get("asset_id")
|
|
90
91
|
*/
|
|
91
|
-
get(
|
|
92
|
+
get(asset_id: string, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.PublicAssetOut>;
|
|
92
93
|
private __get;
|
|
93
|
-
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
94
94
|
}
|
|
@@ -43,21 +43,22 @@ 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.AssetsClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
50
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
51
51
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
const AthenaIntelligence = __importStar(require("../../../index.js"));
|
|
53
|
+
class AssetsClient {
|
|
54
|
+
constructor(options) {
|
|
55
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
58
|
* Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence.
|
|
58
59
|
*
|
|
59
60
|
* @param {AthenaIntelligence.AssetsListRequest} request
|
|
60
|
-
* @param {
|
|
61
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
62
|
*
|
|
62
63
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
63
64
|
*
|
|
@@ -74,22 +75,23 @@ class Assets {
|
|
|
74
75
|
}
|
|
75
76
|
__list() {
|
|
76
77
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
77
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
78
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
78
79
|
const { limit, offset, filters, sort } = request;
|
|
79
80
|
const _queryParams = {};
|
|
80
81
|
if (limit != null) {
|
|
81
|
-
_queryParams
|
|
82
|
+
_queryParams.limit = limit.toString();
|
|
82
83
|
}
|
|
83
84
|
if (offset != null) {
|
|
84
|
-
_queryParams
|
|
85
|
+
_queryParams.offset = offset.toString();
|
|
85
86
|
}
|
|
86
87
|
if (filters != null) {
|
|
87
|
-
_queryParams
|
|
88
|
+
_queryParams.filters = filters;
|
|
88
89
|
}
|
|
89
90
|
if (sort != null) {
|
|
90
|
-
_queryParams
|
|
91
|
+
_queryParams.sort = sort;
|
|
91
92
|
}
|
|
92
|
-
|
|
93
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
94
|
+
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);
|
|
93
95
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
94
96
|
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/assets"),
|
|
95
97
|
method: "GET",
|
|
@@ -98,6 +100,8 @@ class Assets {
|
|
|
98
100
|
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,
|
|
99
101
|
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,
|
|
100
102
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
103
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
104
|
+
logging: this._options.logging,
|
|
101
105
|
});
|
|
102
106
|
if (_response.ok) {
|
|
103
107
|
return {
|
|
@@ -124,6 +128,11 @@ class Assets {
|
|
|
124
128
|
body: _response.error.rawBody,
|
|
125
129
|
rawResponse: _response.rawResponse,
|
|
126
130
|
});
|
|
131
|
+
case "body-is-null":
|
|
132
|
+
throw new errors.AthenaIntelligenceError({
|
|
133
|
+
statusCode: _response.error.statusCode,
|
|
134
|
+
rawResponse: _response.rawResponse,
|
|
135
|
+
});
|
|
127
136
|
case "timeout":
|
|
128
137
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/assets.");
|
|
129
138
|
case "unknown":
|
|
@@ -138,7 +147,7 @@ class Assets {
|
|
|
138
147
|
* Create a new asset such as a spreadsheet, document, or folder in your workspace. This endpoint uses internal GraphQL mutations to create assets with proper permissions and workspace integration.
|
|
139
148
|
*
|
|
140
149
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
141
|
-
* @param {
|
|
150
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
142
151
|
*
|
|
143
152
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
144
153
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
@@ -156,8 +165,9 @@ class Assets {
|
|
|
156
165
|
}
|
|
157
166
|
__create(request, requestOptions) {
|
|
158
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
160
|
-
|
|
168
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
169
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
170
|
+
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);
|
|
161
171
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
162
172
|
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/assets/create"),
|
|
163
173
|
method: "POST",
|
|
@@ -169,6 +179,8 @@ class Assets {
|
|
|
169
179
|
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,
|
|
170
180
|
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,
|
|
171
181
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
182
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
183
|
+
logging: this._options.logging,
|
|
172
184
|
});
|
|
173
185
|
if (_response.ok) {
|
|
174
186
|
return {
|
|
@@ -199,6 +211,11 @@ class Assets {
|
|
|
199
211
|
body: _response.error.rawBody,
|
|
200
212
|
rawResponse: _response.rawResponse,
|
|
201
213
|
});
|
|
214
|
+
case "body-is-null":
|
|
215
|
+
throw new errors.AthenaIntelligenceError({
|
|
216
|
+
statusCode: _response.error.statusCode,
|
|
217
|
+
rawResponse: _response.rawResponse,
|
|
218
|
+
});
|
|
202
219
|
case "timeout":
|
|
203
220
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/assets/create.");
|
|
204
221
|
case "unknown":
|
|
@@ -213,7 +230,7 @@ class Assets {
|
|
|
213
230
|
* Create a new project with custom metadata. Projects can be typed (e.g., 'candidate', 'user', 'company') and include flexible custom metadata for storing additional information.
|
|
214
231
|
*
|
|
215
232
|
* @param {AthenaIntelligence.CreateProjectRequestIn} request
|
|
216
|
-
* @param {
|
|
233
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
217
234
|
*
|
|
218
235
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
219
236
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
@@ -240,8 +257,9 @@ class Assets {
|
|
|
240
257
|
}
|
|
241
258
|
__createProject(request, requestOptions) {
|
|
242
259
|
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
244
|
-
|
|
260
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
261
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
262
|
+
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);
|
|
245
263
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
246
264
|
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/assets/create_project"),
|
|
247
265
|
method: "POST",
|
|
@@ -253,6 +271,8 @@ class Assets {
|
|
|
253
271
|
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,
|
|
254
272
|
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,
|
|
255
273
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
274
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
275
|
+
logging: this._options.logging,
|
|
256
276
|
});
|
|
257
277
|
if (_response.ok) {
|
|
258
278
|
return {
|
|
@@ -283,6 +303,11 @@ class Assets {
|
|
|
283
303
|
body: _response.error.rawBody,
|
|
284
304
|
rawResponse: _response.rawResponse,
|
|
285
305
|
});
|
|
306
|
+
case "body-is-null":
|
|
307
|
+
throw new errors.AthenaIntelligenceError({
|
|
308
|
+
statusCode: _response.error.statusCode,
|
|
309
|
+
rawResponse: _response.rawResponse,
|
|
310
|
+
});
|
|
286
311
|
case "timeout":
|
|
287
312
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/assets/create_project.");
|
|
288
313
|
case "unknown":
|
|
@@ -296,8 +321,8 @@ class Assets {
|
|
|
296
321
|
/**
|
|
297
322
|
* Retrieve a single asset by its ID. Returns comprehensive metadata including creation info, tags, timestamps, media type, and AI-generated summary.
|
|
298
323
|
*
|
|
299
|
-
* @param {string}
|
|
300
|
-
* @param {
|
|
324
|
+
* @param {string} asset_id
|
|
325
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
301
326
|
*
|
|
302
327
|
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
303
328
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -306,21 +331,24 @@ class Assets {
|
|
|
306
331
|
* @example
|
|
307
332
|
* await client.assets.get("asset_id")
|
|
308
333
|
*/
|
|
309
|
-
get(
|
|
310
|
-
return core.HttpResponsePromise.fromPromise(this.__get(
|
|
334
|
+
get(asset_id, requestOptions) {
|
|
335
|
+
return core.HttpResponsePromise.fromPromise(this.__get(asset_id, requestOptions));
|
|
311
336
|
}
|
|
312
|
-
__get(
|
|
337
|
+
__get(asset_id, requestOptions) {
|
|
313
338
|
return __awaiter(this, void 0, void 0, function* () {
|
|
314
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
315
|
-
|
|
339
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
340
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
341
|
+
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);
|
|
316
342
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
317
|
-
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/assets/${
|
|
343
|
+
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/assets/${core.url.encodePathParam(asset_id)}`),
|
|
318
344
|
method: "GET",
|
|
319
345
|
headers: _headers,
|
|
320
346
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
321
347
|
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,
|
|
322
348
|
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,
|
|
323
349
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
350
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
351
|
+
logging: this._options.logging,
|
|
324
352
|
});
|
|
325
353
|
if (_response.ok) {
|
|
326
354
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -348,6 +376,11 @@ class Assets {
|
|
|
348
376
|
body: _response.error.rawBody,
|
|
349
377
|
rawResponse: _response.rawResponse,
|
|
350
378
|
});
|
|
379
|
+
case "body-is-null":
|
|
380
|
+
throw new errors.AthenaIntelligenceError({
|
|
381
|
+
statusCode: _response.error.statusCode,
|
|
382
|
+
rawResponse: _response.rawResponse,
|
|
383
|
+
});
|
|
351
384
|
case "timeout":
|
|
352
385
|
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/assets/{asset_id}.");
|
|
353
386
|
case "unknown":
|
|
@@ -358,11 +391,5 @@ class Assets {
|
|
|
358
391
|
}
|
|
359
392
|
});
|
|
360
393
|
}
|
|
361
|
-
_getCustomAuthorizationHeaders() {
|
|
362
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
363
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
364
|
-
return { "X-API-KEY": apiKeyValue };
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
394
|
}
|
|
368
|
-
exports.
|
|
395
|
+
exports.AssetsClient = AssetsClient;
|