@athenaintel/sdk 4.3.2159 → 4.3.2161
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 +17 -16
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +2 -2
- package/dist/cjs/Client.js +4 -4
- package/dist/cjs/api/resources/agents/client/Client.d.ts +1 -41
- package/dist/cjs/api/resources/agents/client/Client.js +2 -163
- package/dist/cjs/api/resources/agents/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/agents/client/index.js +0 -15
- package/dist/cjs/api/resources/agents/resources/general/client/Client.d.ts +2 -44
- package/dist/cjs/api/resources/agents/resources/general/client/Client.js +1 -163
- package/dist/cjs/api/resources/agents/resources/general/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/agents/resources/general/client/index.js +15 -0
- package/dist/cjs/api/{types → resources/agents/resources/general/client/requests}/GeneralAgentRequest.d.ts +11 -2
- package/dist/cjs/api/resources/agents/resources/general/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/agents/resources/index.d.ts +1 -6
- package/dist/cjs/api/resources/agents/resources/index.js +2 -7
- package/dist/cjs/api/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/index.js +3 -4
- package/dist/cjs/api/resources/tools/client/Client.d.ts +11 -0
- package/dist/cjs/api/resources/tools/client/Client.js +11 -0
- package/dist/cjs/api/types/index.d.ts +0 -5
- package/dist/cjs/api/types/index.js +0 -5
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +2 -2
- package/dist/esm/Client.mjs +4 -4
- package/dist/esm/api/resources/agents/client/Client.d.mts +1 -41
- package/dist/esm/api/resources/agents/client/Client.mjs +0 -128
- package/dist/esm/api/resources/agents/client/index.d.mts +1 -1
- package/dist/esm/api/resources/agents/client/index.mjs +1 -1
- package/dist/esm/api/resources/agents/resources/general/client/Client.d.mts +2 -44
- package/dist/esm/api/resources/agents/resources/general/client/Client.mjs +1 -163
- package/dist/esm/api/resources/agents/resources/general/client/index.d.mts +1 -1
- package/dist/esm/api/resources/agents/resources/general/client/index.mjs +1 -1
- package/dist/esm/api/{types → resources/agents/resources/general/client/requests}/GeneralAgentRequest.d.mts +11 -2
- package/dist/esm/api/resources/agents/resources/general/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/agents/resources/index.d.mts +1 -6
- package/dist/esm/api/resources/agents/resources/index.mjs +1 -6
- package/dist/esm/api/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/index.mjs +0 -1
- package/dist/esm/api/resources/tools/client/Client.d.mts +11 -0
- package/dist/esm/api/resources/tools/client/Client.mjs +11 -0
- package/dist/esm/api/types/index.d.mts +0 -5
- package/dist/esm/api/types/index.mjs +0 -5
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +24 -434
- package/dist/cjs/api/resources/agents/client/requests/CustomAgentRequest.d.ts +0 -20
- package/dist/cjs/api/resources/agents/client/requests/CustomAgentRequest.js +0 -3
- package/dist/cjs/api/resources/agents/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/drive/client/Client.d.ts +0 -34
- package/dist/cjs/api/resources/agents/resources/drive/client/Client.js +0 -138
- package/dist/cjs/api/resources/agents/resources/drive/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/drive/client/index.js +0 -17
- package/dist/cjs/api/resources/agents/resources/drive/client/requests/DriveAgentRequest.d.ts +0 -17
- package/dist/cjs/api/resources/agents/resources/drive/client/requests/DriveAgentRequest.js +0 -3
- package/dist/cjs/api/resources/agents/resources/drive/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/drive/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/agents/resources/drive/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/drive/index.js +0 -17
- package/dist/cjs/api/resources/agents/resources/research/client/Client.d.ts +0 -34
- package/dist/cjs/api/resources/agents/resources/research/client/Client.js +0 -138
- package/dist/cjs/api/resources/agents/resources/research/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/research/client/index.js +0 -17
- package/dist/cjs/api/resources/agents/resources/research/client/requests/ResearchAgentRequest.d.ts +0 -17
- package/dist/cjs/api/resources/agents/resources/research/client/requests/ResearchAgentRequest.js +0 -3
- package/dist/cjs/api/resources/agents/resources/research/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/research/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/agents/resources/research/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/research/index.js +0 -17
- package/dist/cjs/api/resources/agents/resources/sql/client/Client.d.ts +0 -34
- package/dist/cjs/api/resources/agents/resources/sql/client/Client.js +0 -135
- package/dist/cjs/api/resources/agents/resources/sql/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/sql/client/index.js +0 -17
- package/dist/cjs/api/resources/agents/resources/sql/client/requests/SqlAgentRequest.d.ts +0 -17
- package/dist/cjs/api/resources/agents/resources/sql/client/requests/SqlAgentRequest.js +0 -3
- package/dist/cjs/api/resources/agents/resources/sql/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/sql/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/agents/resources/sql/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/resources/sql/index.js +0 -17
- package/dist/cjs/api/types/CustomAgentResponse.d.ts +0 -4
- package/dist/cjs/api/types/CustomAgentResponse.js +0 -3
- package/dist/cjs/api/types/DriveAgentResponse.d.ts +0 -4
- package/dist/cjs/api/types/DriveAgentResponse.js +0 -3
- package/dist/cjs/api/types/ResearchAgentResponse.d.ts +0 -4
- package/dist/cjs/api/types/ResearchAgentResponse.js +0 -3
- package/dist/cjs/api/types/SqlAgentResponse.d.ts +0 -6
- package/dist/cjs/api/types/SqlAgentResponse.js +0 -3
- package/dist/esm/api/resources/agents/client/requests/CustomAgentRequest.d.mts +0 -20
- package/dist/esm/api/resources/agents/client/requests/CustomAgentRequest.mjs +0 -2
- package/dist/esm/api/resources/agents/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/resources/drive/client/Client.d.mts +0 -34
- package/dist/esm/api/resources/agents/resources/drive/client/Client.mjs +0 -101
- 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/DriveAgentRequest.d.mts +0 -17
- package/dist/esm/api/resources/agents/resources/drive/client/requests/DriveAgentRequest.mjs +0 -2
- package/dist/esm/api/resources/agents/resources/drive/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/resources/drive/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/agents/resources/drive/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/resources/drive/index.mjs +0 -1
- package/dist/esm/api/resources/agents/resources/research/client/Client.d.mts +0 -34
- package/dist/esm/api/resources/agents/resources/research/client/Client.mjs +0 -101
- 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/ResearchAgentRequest.d.mts +0 -17
- package/dist/esm/api/resources/agents/resources/research/client/requests/ResearchAgentRequest.mjs +0 -2
- package/dist/esm/api/resources/agents/resources/research/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/resources/research/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/agents/resources/research/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/resources/research/index.mjs +0 -1
- package/dist/esm/api/resources/agents/resources/sql/client/Client.d.mts +0 -34
- package/dist/esm/api/resources/agents/resources/sql/client/Client.mjs +0 -98
- 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/SqlAgentRequest.d.mts +0 -17
- package/dist/esm/api/resources/agents/resources/sql/client/requests/SqlAgentRequest.mjs +0 -2
- package/dist/esm/api/resources/agents/resources/sql/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/resources/sql/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/agents/resources/sql/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/resources/sql/index.mjs +0 -1
- package/dist/esm/api/types/CustomAgentResponse.d.mts +0 -4
- package/dist/esm/api/types/CustomAgentResponse.mjs +0 -2
- package/dist/esm/api/types/DriveAgentResponse.d.mts +0 -4
- package/dist/esm/api/types/DriveAgentResponse.mjs +0 -2
- package/dist/esm/api/types/ResearchAgentResponse.d.mts +0 -4
- package/dist/esm/api/types/ResearchAgentResponse.mjs +0 -2
- package/dist/esm/api/types/SqlAgentResponse.d.mts +0 -6
- package/dist/esm/api/types/SqlAgentResponse.mjs +0 -2
- /package/dist/cjs/api/{types → resources/agents/resources/general/client/requests}/GeneralAgentRequest.js +0 -0
- /package/dist/cjs/api/resources/agents/{client → resources/general/client}/requests/index.js +0 -0
- /package/dist/esm/api/{types → resources/agents/resources/general/client/requests}/GeneralAgentRequest.mjs +0 -0
- /package/dist/esm/api/resources/agents/{client → resources/general/client}/requests/index.mjs +0 -0
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./requests/index.js"), exports);
|
package/dist/cjs/api/resources/agents/resources/drive/client/requests/DriveAgentRequest.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* {
|
|
4
|
-
* config: {
|
|
5
|
-
* "key": "value"
|
|
6
|
-
* },
|
|
7
|
-
* messages: [{
|
|
8
|
-
* "key": "value"
|
|
9
|
-
* }]
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface DriveAgentRequest {
|
|
13
|
-
/** Configuration for the drive agent including folder paths and search parameters */
|
|
14
|
-
config: Record<string, unknown>;
|
|
15
|
-
/** The messages to send to the drive agent */
|
|
16
|
-
messages: Record<string, unknown>[];
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { DriveAgentRequest } from "./DriveAgentRequest.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client/index.js"), exports);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
-
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
|
-
import * as core from "../../../../../../core/index.js";
|
|
4
|
-
import * as AthenaIntelligence from "../../../../../index.js";
|
|
5
|
-
export declare namespace ResearchClient {
|
|
6
|
-
interface Options extends BaseClientOptions {
|
|
7
|
-
}
|
|
8
|
-
interface RequestOptions extends BaseRequestOptions {
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export declare class ResearchClient {
|
|
12
|
-
protected readonly _options: NormalizedClientOptionsWithAuth<ResearchClient.Options>;
|
|
13
|
-
constructor(options?: ResearchClient.Options);
|
|
14
|
-
/**
|
|
15
|
-
* Coming soon! Conduct research using web and other sources.
|
|
16
|
-
*
|
|
17
|
-
* @param {AthenaIntelligence.agents.ResearchAgentRequest} request
|
|
18
|
-
* @param {ResearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
|
-
*
|
|
20
|
-
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* await client.agents.research.invoke({
|
|
24
|
-
* config: {
|
|
25
|
-
* "key": "value"
|
|
26
|
-
* },
|
|
27
|
-
* messages: [{
|
|
28
|
-
* "key": "value"
|
|
29
|
-
* }]
|
|
30
|
-
* })
|
|
31
|
-
*/
|
|
32
|
-
invoke(request: AthenaIntelligence.agents.ResearchAgentRequest, requestOptions?: ResearchClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ResearchAgentResponse>;
|
|
33
|
-
private __invoke;
|
|
34
|
-
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.ResearchClient = void 0;
|
|
47
|
-
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
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
|
-
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
52
|
-
const AthenaIntelligence = __importStar(require("../../../../../index.js"));
|
|
53
|
-
class ResearchClient {
|
|
54
|
-
constructor(options = {}) {
|
|
55
|
-
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Coming soon! Conduct research using web and other sources.
|
|
59
|
-
*
|
|
60
|
-
* @param {AthenaIntelligence.agents.ResearchAgentRequest} request
|
|
61
|
-
* @param {ResearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
-
*
|
|
63
|
-
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* await client.agents.research.invoke({
|
|
67
|
-
* config: {
|
|
68
|
-
* "key": "value"
|
|
69
|
-
* },
|
|
70
|
-
* messages: [{
|
|
71
|
-
* "key": "value"
|
|
72
|
-
* }]
|
|
73
|
-
* })
|
|
74
|
-
*/
|
|
75
|
-
invoke(request, requestOptions) {
|
|
76
|
-
return core.HttpResponsePromise.fromPromise(this.__invoke(request, requestOptions));
|
|
77
|
-
}
|
|
78
|
-
__invoke(request, requestOptions) {
|
|
79
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
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);
|
|
83
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
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/research/invoke"),
|
|
85
|
-
method: "POST",
|
|
86
|
-
headers: _headers,
|
|
87
|
-
contentType: "application/json",
|
|
88
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
89
|
-
requestType: "json",
|
|
90
|
-
body: request,
|
|
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,
|
|
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,
|
|
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,
|
|
96
|
-
});
|
|
97
|
-
if (_response.ok) {
|
|
98
|
-
return {
|
|
99
|
-
data: _response.body,
|
|
100
|
-
rawResponse: _response.rawResponse,
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
if (_response.error.reason === "status-code") {
|
|
104
|
-
switch (_response.error.statusCode) {
|
|
105
|
-
case 422:
|
|
106
|
-
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
107
|
-
default:
|
|
108
|
-
throw new errors.AthenaIntelligenceError({
|
|
109
|
-
statusCode: _response.error.statusCode,
|
|
110
|
-
body: _response.error.body,
|
|
111
|
-
rawResponse: _response.rawResponse,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
switch (_response.error.reason) {
|
|
116
|
-
case "non-json":
|
|
117
|
-
throw new errors.AthenaIntelligenceError({
|
|
118
|
-
statusCode: _response.error.statusCode,
|
|
119
|
-
body: _response.error.rawBody,
|
|
120
|
-
rawResponse: _response.rawResponse,
|
|
121
|
-
});
|
|
122
|
-
case "body-is-null":
|
|
123
|
-
throw new errors.AthenaIntelligenceError({
|
|
124
|
-
statusCode: _response.error.statusCode,
|
|
125
|
-
rawResponse: _response.rawResponse,
|
|
126
|
-
});
|
|
127
|
-
case "timeout":
|
|
128
|
-
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/agents/research/invoke.");
|
|
129
|
-
case "unknown":
|
|
130
|
-
throw new errors.AthenaIntelligenceError({
|
|
131
|
-
message: _response.error.errorMessage,
|
|
132
|
-
rawResponse: _response.rawResponse,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
exports.ResearchClient = ResearchClient;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./requests/index.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./requests/index.js"), exports);
|
package/dist/cjs/api/resources/agents/resources/research/client/requests/ResearchAgentRequest.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* {
|
|
4
|
-
* config: {
|
|
5
|
-
* "key": "value"
|
|
6
|
-
* },
|
|
7
|
-
* messages: [{
|
|
8
|
-
* "key": "value"
|
|
9
|
-
* }]
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface ResearchAgentRequest {
|
|
13
|
-
/** Configuration for the research agent including search parameters and sources */
|
|
14
|
-
config: Record<string, unknown>;
|
|
15
|
-
/** The messages to send to the research agent */
|
|
16
|
-
messages: Record<string, unknown>[];
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { ResearchAgentRequest } from "./ResearchAgentRequest.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client/index.js"), exports);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
-
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
|
-
import * as core from "../../../../../../core/index.js";
|
|
4
|
-
import * as AthenaIntelligence from "../../../../../index.js";
|
|
5
|
-
export declare namespace SqlClient {
|
|
6
|
-
interface Options extends BaseClientOptions {
|
|
7
|
-
}
|
|
8
|
-
interface RequestOptions extends BaseRequestOptions {
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export declare class SqlClient {
|
|
12
|
-
protected readonly _options: NormalizedClientOptionsWithAuth<SqlClient.Options>;
|
|
13
|
-
constructor(options?: SqlClient.Options);
|
|
14
|
-
/**
|
|
15
|
-
* Coming soon! Generate, execute, and test SQL queries. Returns an asset ID for the query object.
|
|
16
|
-
*
|
|
17
|
-
* @param {AthenaIntelligence.agents.SqlAgentRequest} request
|
|
18
|
-
* @param {SqlClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
|
-
*
|
|
20
|
-
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* await client.agents.sql.invoke({
|
|
24
|
-
* config: {
|
|
25
|
-
* "key": "value"
|
|
26
|
-
* },
|
|
27
|
-
* messages: [{
|
|
28
|
-
* "key": "value"
|
|
29
|
-
* }]
|
|
30
|
-
* })
|
|
31
|
-
*/
|
|
32
|
-
invoke(request: AthenaIntelligence.agents.SqlAgentRequest, requestOptions?: SqlClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.SqlAgentResponse>;
|
|
33
|
-
private __invoke;
|
|
34
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.SqlClient = void 0;
|
|
47
|
-
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
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
|
-
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
52
|
-
const AthenaIntelligence = __importStar(require("../../../../../index.js"));
|
|
53
|
-
class SqlClient {
|
|
54
|
-
constructor(options = {}) {
|
|
55
|
-
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Coming soon! Generate, execute, and test SQL queries. Returns an asset ID for the query object.
|
|
59
|
-
*
|
|
60
|
-
* @param {AthenaIntelligence.agents.SqlAgentRequest} request
|
|
61
|
-
* @param {SqlClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
-
*
|
|
63
|
-
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* await client.agents.sql.invoke({
|
|
67
|
-
* config: {
|
|
68
|
-
* "key": "value"
|
|
69
|
-
* },
|
|
70
|
-
* messages: [{
|
|
71
|
-
* "key": "value"
|
|
72
|
-
* }]
|
|
73
|
-
* })
|
|
74
|
-
*/
|
|
75
|
-
invoke(request, requestOptions) {
|
|
76
|
-
return core.HttpResponsePromise.fromPromise(this.__invoke(request, requestOptions));
|
|
77
|
-
}
|
|
78
|
-
__invoke(request, requestOptions) {
|
|
79
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
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);
|
|
83
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
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"),
|
|
85
|
-
method: "POST",
|
|
86
|
-
headers: _headers,
|
|
87
|
-
contentType: "application/json",
|
|
88
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
89
|
-
requestType: "json",
|
|
90
|
-
body: request,
|
|
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,
|
|
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,
|
|
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,
|
|
96
|
-
});
|
|
97
|
-
if (_response.ok) {
|
|
98
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
99
|
-
}
|
|
100
|
-
if (_response.error.reason === "status-code") {
|
|
101
|
-
switch (_response.error.statusCode) {
|
|
102
|
-
case 422:
|
|
103
|
-
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
104
|
-
default:
|
|
105
|
-
throw new errors.AthenaIntelligenceError({
|
|
106
|
-
statusCode: _response.error.statusCode,
|
|
107
|
-
body: _response.error.body,
|
|
108
|
-
rawResponse: _response.rawResponse,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
switch (_response.error.reason) {
|
|
113
|
-
case "non-json":
|
|
114
|
-
throw new errors.AthenaIntelligenceError({
|
|
115
|
-
statusCode: _response.error.statusCode,
|
|
116
|
-
body: _response.error.rawBody,
|
|
117
|
-
rawResponse: _response.rawResponse,
|
|
118
|
-
});
|
|
119
|
-
case "body-is-null":
|
|
120
|
-
throw new errors.AthenaIntelligenceError({
|
|
121
|
-
statusCode: _response.error.statusCode,
|
|
122
|
-
rawResponse: _response.rawResponse,
|
|
123
|
-
});
|
|
124
|
-
case "timeout":
|
|
125
|
-
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/agents/sql/invoke.");
|
|
126
|
-
case "unknown":
|
|
127
|
-
throw new errors.AthenaIntelligenceError({
|
|
128
|
-
message: _response.error.errorMessage,
|
|
129
|
-
rawResponse: _response.rawResponse,
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
exports.SqlClient = SqlClient;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./requests/index.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* {
|
|
4
|
-
* config: {
|
|
5
|
-
* "key": "value"
|
|
6
|
-
* },
|
|
7
|
-
* messages: [{
|
|
8
|
-
* "key": "value"
|
|
9
|
-
* }]
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface SqlAgentRequest {
|
|
13
|
-
/** Configuration for the SQL agent including database connection details and query parameters */
|
|
14
|
-
config: Record<string, unknown>;
|
|
15
|
-
/** The messages to send to the SQL agent */
|
|
16
|
-
messages: Record<string, unknown>[];
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { SqlAgentRequest } from "./SqlAgentRequest.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client/index.js"), exports);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* {
|
|
4
|
-
* agent_id: "agent_id",
|
|
5
|
-
* config: {
|
|
6
|
-
* "key": "value"
|
|
7
|
-
* },
|
|
8
|
-
* messages: [{
|
|
9
|
-
* "key": "value"
|
|
10
|
-
* }]
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export interface CustomAgentRequest {
|
|
14
|
-
/** The ID of the custom agent to invoke. Create custom agents in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent). */
|
|
15
|
-
agent_id: string;
|
|
16
|
-
/** Configuration for the custom agent. See the agent's documentation for specific configuration options. */
|
|
17
|
-
config: Record<string, unknown>;
|
|
18
|
-
/** The messages to send to the custom agent */
|
|
19
|
-
messages: Record<string, unknown>[];
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { CustomAgentRequest } from "./CustomAgentRequest.mjs";
|