@athenaintel/sdk 4.3.310 → 4.3.312
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/databases/client/Client.d.ts +24 -0
- package/dist/cjs/api/resources/databases/client/Client.js +89 -0
- package/dist/cjs/api/types/DatabaseStatusResponse.d.ts +26 -0
- package/dist/cjs/api/types/DatabaseStatusResponse.js +14 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- 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/api/resources/databases/client/Client.d.mts +24 -0
- package/dist/esm/api/resources/databases/client/Client.mjs +89 -0
- package/dist/esm/api/types/DatabaseStatusResponse.d.mts +26 -0
- package/dist/esm/api/types/DatabaseStatusResponse.mjs +11 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +70 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "4.3.
|
|
47
|
-
"User-Agent": "@athenaintel/sdk/4.3.
|
|
46
|
+
"X-Fern-SDK-Version": "4.3.312",
|
|
47
|
+
"User-Agent": "@athenaintel/sdk/4.3.312",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -167,4 +167,28 @@ export declare class DatabasesClient {
|
|
|
167
167
|
*/
|
|
168
168
|
getTableSchema(asset_id: string, table_name: string, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DatabaseTableSchemaResponse>;
|
|
169
169
|
private __getTableSchema;
|
|
170
|
+
/**
|
|
171
|
+
* Check if a database is running, suspended, or starting up. Poll this endpoint to determine when a serverless database is ready.
|
|
172
|
+
*
|
|
173
|
+
* **Status Values:**
|
|
174
|
+
* - `running` - Database is active and accepting connections
|
|
175
|
+
* - `suspended` - Database is suspended (scale-to-zero), will auto-resume on first query
|
|
176
|
+
* - `starting` - Database is waking up
|
|
177
|
+
* - `failed` - Database failed to start
|
|
178
|
+
* - `unknown` - Status could not be determined
|
|
179
|
+
*
|
|
180
|
+
* @param {string} asset_id
|
|
181
|
+
* @param {DatabasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
182
|
+
*
|
|
183
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
184
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
185
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
186
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
187
|
+
* @throws {@link AthenaIntelligence.NotImplementedError}
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* await client.databases.getStatus("asset_id")
|
|
191
|
+
*/
|
|
192
|
+
getStatus(asset_id: string, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DatabaseStatusResponse>;
|
|
193
|
+
private __getStatus;
|
|
170
194
|
}
|
|
@@ -656,5 +656,94 @@ class DatabasesClient {
|
|
|
656
656
|
}
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
+
/**
|
|
660
|
+
* Check if a database is running, suspended, or starting up. Poll this endpoint to determine when a serverless database is ready.
|
|
661
|
+
*
|
|
662
|
+
* **Status Values:**
|
|
663
|
+
* - `running` - Database is active and accepting connections
|
|
664
|
+
* - `suspended` - Database is suspended (scale-to-zero), will auto-resume on first query
|
|
665
|
+
* - `starting` - Database is waking up
|
|
666
|
+
* - `failed` - Database failed to start
|
|
667
|
+
* - `unknown` - Status could not be determined
|
|
668
|
+
*
|
|
669
|
+
* @param {string} asset_id
|
|
670
|
+
* @param {DatabasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
671
|
+
*
|
|
672
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
673
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
674
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
675
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
676
|
+
* @throws {@link AthenaIntelligence.NotImplementedError}
|
|
677
|
+
*
|
|
678
|
+
* @example
|
|
679
|
+
* await client.databases.getStatus("asset_id")
|
|
680
|
+
*/
|
|
681
|
+
getStatus(asset_id, requestOptions) {
|
|
682
|
+
return core.HttpResponsePromise.fromPromise(this.__getStatus(asset_id, requestOptions));
|
|
683
|
+
}
|
|
684
|
+
__getStatus(asset_id, requestOptions) {
|
|
685
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
686
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
687
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
688
|
+
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);
|
|
689
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
690
|
+
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/databases/${core.url.encodePathParam(asset_id)}/status`),
|
|
691
|
+
method: "GET",
|
|
692
|
+
headers: _headers,
|
|
693
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
694
|
+
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,
|
|
695
|
+
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,
|
|
696
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
697
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
698
|
+
logging: this._options.logging,
|
|
699
|
+
});
|
|
700
|
+
if (_response.ok) {
|
|
701
|
+
return {
|
|
702
|
+
data: _response.body,
|
|
703
|
+
rawResponse: _response.rawResponse,
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
if (_response.error.reason === "status-code") {
|
|
707
|
+
switch (_response.error.statusCode) {
|
|
708
|
+
case 400:
|
|
709
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
710
|
+
case 403:
|
|
711
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
712
|
+
case 404:
|
|
713
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
714
|
+
case 422:
|
|
715
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
716
|
+
case 501:
|
|
717
|
+
throw new AthenaIntelligence.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
718
|
+
default:
|
|
719
|
+
throw new errors.AthenaIntelligenceError({
|
|
720
|
+
statusCode: _response.error.statusCode,
|
|
721
|
+
body: _response.error.body,
|
|
722
|
+
rawResponse: _response.rawResponse,
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
switch (_response.error.reason) {
|
|
727
|
+
case "non-json":
|
|
728
|
+
throw new errors.AthenaIntelligenceError({
|
|
729
|
+
statusCode: _response.error.statusCode,
|
|
730
|
+
body: _response.error.rawBody,
|
|
731
|
+
rawResponse: _response.rawResponse,
|
|
732
|
+
});
|
|
733
|
+
case "body-is-null":
|
|
734
|
+
throw new errors.AthenaIntelligenceError({
|
|
735
|
+
statusCode: _response.error.statusCode,
|
|
736
|
+
rawResponse: _response.rawResponse,
|
|
737
|
+
});
|
|
738
|
+
case "timeout":
|
|
739
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/databases/{asset_id}/status.");
|
|
740
|
+
case "unknown":
|
|
741
|
+
throw new errors.AthenaIntelligenceError({
|
|
742
|
+
message: _response.error.errorMessage,
|
|
743
|
+
rawResponse: _response.rawResponse,
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
}
|
|
659
748
|
}
|
|
660
749
|
exports.DatabasesClient = DatabasesClient;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response for database status check.
|
|
3
|
+
*
|
|
4
|
+
* Used to determine if a serverless database is running or suspended
|
|
5
|
+
* (scale-to-zero). Poll this endpoint to know when a database is ready.
|
|
6
|
+
*/
|
|
7
|
+
export interface DatabaseStatusResponse {
|
|
8
|
+
/** The database asset ID */
|
|
9
|
+
asset_id: string;
|
|
10
|
+
/** Optional status message or error details */
|
|
11
|
+
message?: string;
|
|
12
|
+
/** Database provider ('neon_cloud' or 'kronos') */
|
|
13
|
+
provider: string;
|
|
14
|
+
/** Standardized database status */
|
|
15
|
+
status: DatabaseStatusResponse.Status;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace DatabaseStatusResponse {
|
|
18
|
+
const Status: {
|
|
19
|
+
readonly Scheduled: "scheduled";
|
|
20
|
+
readonly Running: "running";
|
|
21
|
+
readonly Completed: "completed";
|
|
22
|
+
readonly Failed: "failed";
|
|
23
|
+
readonly Queued: "queued";
|
|
24
|
+
};
|
|
25
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
26
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DatabaseStatusResponse = void 0;
|
|
5
|
+
var DatabaseStatusResponse;
|
|
6
|
+
(function (DatabaseStatusResponse) {
|
|
7
|
+
DatabaseStatusResponse.Status = {
|
|
8
|
+
Scheduled: "scheduled",
|
|
9
|
+
Running: "running",
|
|
10
|
+
Completed: "completed",
|
|
11
|
+
Failed: "failed",
|
|
12
|
+
Queued: "queued",
|
|
13
|
+
};
|
|
14
|
+
})(DatabaseStatusResponse || (exports.DatabaseStatusResponse = DatabaseStatusResponse = {}));
|
|
@@ -22,6 +22,7 @@ export * from "./CustomAgentResponse.js";
|
|
|
22
22
|
export * from "./DatabaseColumnInfo.js";
|
|
23
23
|
export * from "./DatabaseDataResponse.js";
|
|
24
24
|
export * from "./DatabaseMutationResponse.js";
|
|
25
|
+
export * from "./DatabaseStatusResponse.js";
|
|
25
26
|
export * from "./DatabaseTableInfo.js";
|
|
26
27
|
export * from "./DatabaseTableSchemaResponse.js";
|
|
27
28
|
export * from "./DatabaseTablesResponse.js";
|
|
@@ -38,6 +38,7 @@ __exportStar(require("./CustomAgentResponse.js"), exports);
|
|
|
38
38
|
__exportStar(require("./DatabaseColumnInfo.js"), exports);
|
|
39
39
|
__exportStar(require("./DatabaseDataResponse.js"), exports);
|
|
40
40
|
__exportStar(require("./DatabaseMutationResponse.js"), exports);
|
|
41
|
+
__exportStar(require("./DatabaseStatusResponse.js"), exports);
|
|
41
42
|
__exportStar(require("./DatabaseTableInfo.js"), exports);
|
|
42
43
|
__exportStar(require("./DatabaseTableSchemaResponse.js"), exports);
|
|
43
44
|
__exportStar(require("./DatabaseTablesResponse.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.3.
|
|
1
|
+
export declare const SDK_VERSION = "4.3.312";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "4.3.
|
|
10
|
-
"User-Agent": "@athenaintel/sdk/4.3.
|
|
9
|
+
"X-Fern-SDK-Version": "4.3.312",
|
|
10
|
+
"User-Agent": "@athenaintel/sdk/4.3.312",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -167,4 +167,28 @@ export declare class DatabasesClient {
|
|
|
167
167
|
*/
|
|
168
168
|
getTableSchema(asset_id: string, table_name: string, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DatabaseTableSchemaResponse>;
|
|
169
169
|
private __getTableSchema;
|
|
170
|
+
/**
|
|
171
|
+
* Check if a database is running, suspended, or starting up. Poll this endpoint to determine when a serverless database is ready.
|
|
172
|
+
*
|
|
173
|
+
* **Status Values:**
|
|
174
|
+
* - `running` - Database is active and accepting connections
|
|
175
|
+
* - `suspended` - Database is suspended (scale-to-zero), will auto-resume on first query
|
|
176
|
+
* - `starting` - Database is waking up
|
|
177
|
+
* - `failed` - Database failed to start
|
|
178
|
+
* - `unknown` - Status could not be determined
|
|
179
|
+
*
|
|
180
|
+
* @param {string} asset_id
|
|
181
|
+
* @param {DatabasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
182
|
+
*
|
|
183
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
184
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
185
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
186
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
187
|
+
* @throws {@link AthenaIntelligence.NotImplementedError}
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* await client.databases.getStatus("asset_id")
|
|
191
|
+
*/
|
|
192
|
+
getStatus(asset_id: string, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DatabaseStatusResponse>;
|
|
193
|
+
private __getStatus;
|
|
170
194
|
}
|
|
@@ -620,4 +620,93 @@ export class DatabasesClient {
|
|
|
620
620
|
}
|
|
621
621
|
});
|
|
622
622
|
}
|
|
623
|
+
/**
|
|
624
|
+
* Check if a database is running, suspended, or starting up. Poll this endpoint to determine when a serverless database is ready.
|
|
625
|
+
*
|
|
626
|
+
* **Status Values:**
|
|
627
|
+
* - `running` - Database is active and accepting connections
|
|
628
|
+
* - `suspended` - Database is suspended (scale-to-zero), will auto-resume on first query
|
|
629
|
+
* - `starting` - Database is waking up
|
|
630
|
+
* - `failed` - Database failed to start
|
|
631
|
+
* - `unknown` - Status could not be determined
|
|
632
|
+
*
|
|
633
|
+
* @param {string} asset_id
|
|
634
|
+
* @param {DatabasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
635
|
+
*
|
|
636
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
637
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
638
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
639
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
640
|
+
* @throws {@link AthenaIntelligence.NotImplementedError}
|
|
641
|
+
*
|
|
642
|
+
* @example
|
|
643
|
+
* await client.databases.getStatus("asset_id")
|
|
644
|
+
*/
|
|
645
|
+
getStatus(asset_id, requestOptions) {
|
|
646
|
+
return core.HttpResponsePromise.fromPromise(this.__getStatus(asset_id, requestOptions));
|
|
647
|
+
}
|
|
648
|
+
__getStatus(asset_id, requestOptions) {
|
|
649
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
650
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
651
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
652
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
653
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
654
|
+
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/databases/${core.url.encodePathParam(asset_id)}/status`),
|
|
655
|
+
method: "GET",
|
|
656
|
+
headers: _headers,
|
|
657
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
658
|
+
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,
|
|
659
|
+
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,
|
|
660
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
661
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
662
|
+
logging: this._options.logging,
|
|
663
|
+
});
|
|
664
|
+
if (_response.ok) {
|
|
665
|
+
return {
|
|
666
|
+
data: _response.body,
|
|
667
|
+
rawResponse: _response.rawResponse,
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
if (_response.error.reason === "status-code") {
|
|
671
|
+
switch (_response.error.statusCode) {
|
|
672
|
+
case 400:
|
|
673
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
674
|
+
case 403:
|
|
675
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
676
|
+
case 404:
|
|
677
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
678
|
+
case 422:
|
|
679
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
680
|
+
case 501:
|
|
681
|
+
throw new AthenaIntelligence.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
682
|
+
default:
|
|
683
|
+
throw new errors.AthenaIntelligenceError({
|
|
684
|
+
statusCode: _response.error.statusCode,
|
|
685
|
+
body: _response.error.body,
|
|
686
|
+
rawResponse: _response.rawResponse,
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
switch (_response.error.reason) {
|
|
691
|
+
case "non-json":
|
|
692
|
+
throw new errors.AthenaIntelligenceError({
|
|
693
|
+
statusCode: _response.error.statusCode,
|
|
694
|
+
body: _response.error.rawBody,
|
|
695
|
+
rawResponse: _response.rawResponse,
|
|
696
|
+
});
|
|
697
|
+
case "body-is-null":
|
|
698
|
+
throw new errors.AthenaIntelligenceError({
|
|
699
|
+
statusCode: _response.error.statusCode,
|
|
700
|
+
rawResponse: _response.rawResponse,
|
|
701
|
+
});
|
|
702
|
+
case "timeout":
|
|
703
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/databases/{asset_id}/status.");
|
|
704
|
+
case "unknown":
|
|
705
|
+
throw new errors.AthenaIntelligenceError({
|
|
706
|
+
message: _response.error.errorMessage,
|
|
707
|
+
rawResponse: _response.rawResponse,
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
}
|
|
623
712
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response for database status check.
|
|
3
|
+
*
|
|
4
|
+
* Used to determine if a serverless database is running or suspended
|
|
5
|
+
* (scale-to-zero). Poll this endpoint to know when a database is ready.
|
|
6
|
+
*/
|
|
7
|
+
export interface DatabaseStatusResponse {
|
|
8
|
+
/** The database asset ID */
|
|
9
|
+
asset_id: string;
|
|
10
|
+
/** Optional status message or error details */
|
|
11
|
+
message?: string;
|
|
12
|
+
/** Database provider ('neon_cloud' or 'kronos') */
|
|
13
|
+
provider: string;
|
|
14
|
+
/** Standardized database status */
|
|
15
|
+
status: DatabaseStatusResponse.Status;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace DatabaseStatusResponse {
|
|
18
|
+
const Status: {
|
|
19
|
+
readonly Scheduled: "scheduled";
|
|
20
|
+
readonly Running: "running";
|
|
21
|
+
readonly Completed: "completed";
|
|
22
|
+
readonly Failed: "failed";
|
|
23
|
+
readonly Queued: "queued";
|
|
24
|
+
};
|
|
25
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var DatabaseStatusResponse;
|
|
3
|
+
(function (DatabaseStatusResponse) {
|
|
4
|
+
DatabaseStatusResponse.Status = {
|
|
5
|
+
Scheduled: "scheduled",
|
|
6
|
+
Running: "running",
|
|
7
|
+
Completed: "completed",
|
|
8
|
+
Failed: "failed",
|
|
9
|
+
Queued: "queued",
|
|
10
|
+
};
|
|
11
|
+
})(DatabaseStatusResponse || (DatabaseStatusResponse = {}));
|
|
@@ -22,6 +22,7 @@ export * from "./CustomAgentResponse.mjs";
|
|
|
22
22
|
export * from "./DatabaseColumnInfo.mjs";
|
|
23
23
|
export * from "./DatabaseDataResponse.mjs";
|
|
24
24
|
export * from "./DatabaseMutationResponse.mjs";
|
|
25
|
+
export * from "./DatabaseStatusResponse.mjs";
|
|
25
26
|
export * from "./DatabaseTableInfo.mjs";
|
|
26
27
|
export * from "./DatabaseTableSchemaResponse.mjs";
|
|
27
28
|
export * from "./DatabaseTablesResponse.mjs";
|
|
@@ -22,6 +22,7 @@ export * from "./CustomAgentResponse.mjs";
|
|
|
22
22
|
export * from "./DatabaseColumnInfo.mjs";
|
|
23
23
|
export * from "./DatabaseDataResponse.mjs";
|
|
24
24
|
export * from "./DatabaseMutationResponse.mjs";
|
|
25
|
+
export * from "./DatabaseStatusResponse.mjs";
|
|
25
26
|
export * from "./DatabaseTableInfo.mjs";
|
|
26
27
|
export * from "./DatabaseTableSchemaResponse.mjs";
|
|
27
28
|
export * from "./DatabaseTablesResponse.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.3.
|
|
1
|
+
export declare const SDK_VERSION = "4.3.312";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "4.3.
|
|
1
|
+
export const SDK_VERSION = "4.3.312";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -984,6 +984,76 @@ await client.databases.getTableSchema("asset_id", "table_name");
|
|
|
984
984
|
</dl>
|
|
985
985
|
|
|
986
986
|
|
|
987
|
+
</dd>
|
|
988
|
+
</dl>
|
|
989
|
+
</details>
|
|
990
|
+
|
|
991
|
+
<details><summary><code>client.databases.<a href="/src/api/resources/databases/client/Client.ts">getStatus</a>(asset_id) -> AthenaIntelligence.DatabaseStatusResponse</code></summary>
|
|
992
|
+
<dl>
|
|
993
|
+
<dd>
|
|
994
|
+
|
|
995
|
+
#### 📝 Description
|
|
996
|
+
|
|
997
|
+
<dl>
|
|
998
|
+
<dd>
|
|
999
|
+
|
|
1000
|
+
<dl>
|
|
1001
|
+
<dd>
|
|
1002
|
+
|
|
1003
|
+
Check if a database is running, suspended, or starting up. Poll this endpoint to determine when a serverless database is ready.
|
|
1004
|
+
|
|
1005
|
+
**Status Values:**
|
|
1006
|
+
- `running` - Database is active and accepting connections
|
|
1007
|
+
- `suspended` - Database is suspended (scale-to-zero), will auto-resume on first query
|
|
1008
|
+
- `starting` - Database is waking up
|
|
1009
|
+
- `failed` - Database failed to start
|
|
1010
|
+
- `unknown` - Status could not be determined
|
|
1011
|
+
</dd>
|
|
1012
|
+
</dl>
|
|
1013
|
+
</dd>
|
|
1014
|
+
</dl>
|
|
1015
|
+
|
|
1016
|
+
#### 🔌 Usage
|
|
1017
|
+
|
|
1018
|
+
<dl>
|
|
1019
|
+
<dd>
|
|
1020
|
+
|
|
1021
|
+
<dl>
|
|
1022
|
+
<dd>
|
|
1023
|
+
|
|
1024
|
+
```typescript
|
|
1025
|
+
await client.databases.getStatus("asset_id");
|
|
1026
|
+
|
|
1027
|
+
```
|
|
1028
|
+
</dd>
|
|
1029
|
+
</dl>
|
|
1030
|
+
</dd>
|
|
1031
|
+
</dl>
|
|
1032
|
+
|
|
1033
|
+
#### ⚙️ Parameters
|
|
1034
|
+
|
|
1035
|
+
<dl>
|
|
1036
|
+
<dd>
|
|
1037
|
+
|
|
1038
|
+
<dl>
|
|
1039
|
+
<dd>
|
|
1040
|
+
|
|
1041
|
+
**asset_id:** `string`
|
|
1042
|
+
|
|
1043
|
+
</dd>
|
|
1044
|
+
</dl>
|
|
1045
|
+
|
|
1046
|
+
<dl>
|
|
1047
|
+
<dd>
|
|
1048
|
+
|
|
1049
|
+
**requestOptions:** `DatabasesClient.RequestOptions`
|
|
1050
|
+
|
|
1051
|
+
</dd>
|
|
1052
|
+
</dl>
|
|
1053
|
+
</dd>
|
|
1054
|
+
</dl>
|
|
1055
|
+
|
|
1056
|
+
|
|
987
1057
|
</dd>
|
|
988
1058
|
</dl>
|
|
989
1059
|
</details>
|