kb-cloud-client-typescript 2.3.0-alpha.128 → 2.3.0-alpha.130
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/adminapi/apis/diagnostics-api.d.ts +80 -0
- package/dist/adminapi/apis/diagnostics-api.d.ts.map +1 -1
- package/dist/adminapi/apis/diagnostics-api.js +84 -0
- package/dist/adminapi/apis/diagnostics-api.js.map +1 -1
- package/dist/adminapi/models/index.d.ts +2 -0
- package/dist/adminapi/models/index.d.ts.map +1 -1
- package/dist/adminapi/models/index.js +2 -0
- package/dist/adminapi/models/index.js.map +1 -1
- package/dist/adminapi/models/postgresql-sqlanalysis.d.ts +80 -0
- package/dist/adminapi/models/postgresql-sqlanalysis.d.ts.map +1 -0
- package/dist/adminapi/models/postgresql-sqlanalysis.js +16 -0
- package/dist/adminapi/models/postgresql-sqlanalysis.js.map +1 -0
- package/dist/adminapi/models/postgresql-sqlfingerprint.d.ts +79 -0
- package/dist/adminapi/models/postgresql-sqlfingerprint.d.ts.map +1 -0
- package/dist/adminapi/models/postgresql-sqlfingerprint.js +16 -0
- package/dist/adminapi/models/postgresql-sqlfingerprint.js.map +1 -0
- package/dist/openapi/apis/diagnostics-api.d.ts +80 -0
- package/dist/openapi/apis/diagnostics-api.d.ts.map +1 -1
- package/dist/openapi/apis/diagnostics-api.js +84 -0
- package/dist/openapi/apis/diagnostics-api.js.map +1 -1
- package/dist/openapi/models/index.d.ts +2 -0
- package/dist/openapi/models/index.d.ts.map +1 -1
- package/dist/openapi/models/index.js +2 -0
- package/dist/openapi/models/index.js.map +1 -1
- package/dist/openapi/models/postgresql-sqlanalysis.d.ts +80 -0
- package/dist/openapi/models/postgresql-sqlanalysis.d.ts.map +1 -0
- package/dist/openapi/models/postgresql-sqlanalysis.js +16 -0
- package/dist/openapi/models/postgresql-sqlanalysis.js.map +1 -0
- package/dist/openapi/models/postgresql-sqlfingerprint.d.ts +79 -0
- package/dist/openapi/models/postgresql-sqlfingerprint.d.ts.map +1 -0
- package/dist/openapi/models/postgresql-sqlfingerprint.js +16 -0
- package/dist/openapi/models/postgresql-sqlfingerprint.js.map +1 -0
- package/package.json +1 -1
- package/src/adminapi/.openapi-generator/FILES +2 -0
- package/src/adminapi/apis/diagnostics-api.ts +140 -0
- package/src/adminapi/models/index.ts +2 -0
- package/src/adminapi/models/postgresql-sqlanalysis.ts +87 -0
- package/src/adminapi/models/postgresql-sqlfingerprint.ts +84 -0
- package/src/adminapi.yaml +146 -0
- package/src/openapi/.openapi-generator/FILES +2 -0
- package/src/openapi/apis/diagnostics-api.ts +140 -0
- package/src/openapi/models/index.ts +2 -0
- package/src/openapi/models/postgresql-sqlanalysis.ts +87 -0
- package/src/openapi/models/postgresql-sqlfingerprint.ts +84 -0
- package/src/openapi.yaml +146 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KubeBlocks Cloud API
|
|
3
|
+
* KubeBlocks Cloud API is a RESTful API for managing KubeBlocks Cloud resources. The API is organized around REST. Our API has predictable resource-oriented URLs, accepts `JSON-encoded` request bodies, returns `JSON-encoded` responses, and uses standard HTTP response codes, authentication, and verbs. We use standard HTTP authentication and provide API keys to identify who you are. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@apecloud.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { PostgresqlSQLFingerprint } from './postgresql-sqlfingerprint';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PostgresqlSQLAnalysis
|
|
17
|
+
*/
|
|
18
|
+
export interface PostgresqlSQLAnalysis {
|
|
19
|
+
/**
|
|
20
|
+
* Data source. M1 uses pg_stat_statements only.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof PostgresqlSQLAnalysis
|
|
23
|
+
*/
|
|
24
|
+
'source': string;
|
|
25
|
+
/**
|
|
26
|
+
* Source status. Expected values are available or unavailable.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof PostgresqlSQLAnalysis
|
|
29
|
+
*/
|
|
30
|
+
'status': string;
|
|
31
|
+
/**
|
|
32
|
+
* Reason when status is unavailable, such as extension_disabled, permission_denied, or query_failed.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof PostgresqlSQLAnalysis
|
|
35
|
+
*/
|
|
36
|
+
'unavailableReason'?: string;
|
|
37
|
+
/**
|
|
38
|
+
* UTC timestamp reported by pg_stat_statements_info.stats_reset when available. Empty means the source did not expose this timestamp.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof PostgresqlSQLAnalysis
|
|
41
|
+
*/
|
|
42
|
+
'statsReset'?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Backend collection timestamp in UTC. It is not a sampling-window end time.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof PostgresqlSQLAnalysis
|
|
47
|
+
*/
|
|
48
|
+
'collectedAt': string;
|
|
49
|
+
/**
|
|
50
|
+
* Effective row limit after backend normalization.
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof PostgresqlSQLAnalysis
|
|
53
|
+
*/
|
|
54
|
+
'limit': number;
|
|
55
|
+
/**
|
|
56
|
+
* Effective sort key. Expected values are totalTime, meanTime, maxTime, or calls.
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof PostgresqlSQLAnalysis
|
|
59
|
+
*/
|
|
60
|
+
'orderBy': string;
|
|
61
|
+
/**
|
|
62
|
+
* Total execution time in milliseconds across all visible pg_stat_statements rows, not limited to the returned top-N items. Present only when the source is available.
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof PostgresqlSQLAnalysis
|
|
65
|
+
*/
|
|
66
|
+
'totalTimeMsAll'?: number | null;
|
|
67
|
+
/**
|
|
68
|
+
* Total execution count across all visible pg_stat_statements rows, not limited to the returned top-N items. Present only when the source is available.
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof PostgresqlSQLAnalysis
|
|
71
|
+
*/
|
|
72
|
+
'callsAll'?: number | null;
|
|
73
|
+
/**
|
|
74
|
+
* SQL fingerprint ranking rows from pg_stat_statements. The list may be empty when no statement statistics exist.
|
|
75
|
+
* @type {Array<PostgresqlSQLFingerprint>}
|
|
76
|
+
* @memberof PostgresqlSQLAnalysis
|
|
77
|
+
*/
|
|
78
|
+
'items': Array<PostgresqlSQLFingerprint>;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=postgresql-sqlanalysis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgresql-sqlanalysis.d.ts","sourceRoot":"","sources":["../../../src/openapi/models/postgresql-sqlanalysis.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE5E;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;OAIG;IACH,OAAO,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;CAC5C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* KubeBlocks Cloud API
|
|
6
|
+
* KubeBlocks Cloud API is a RESTful API for managing KubeBlocks Cloud resources. The API is organized around REST. Our API has predictable resource-oriented URLs, accepts `JSON-encoded` request bodies, returns `JSON-encoded` responses, and uses standard HTTP response codes, authentication, and verbs. We use standard HTTP authentication and provide API keys to identify who you are. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@apecloud.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
//# sourceMappingURL=postgresql-sqlanalysis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgresql-sqlanalysis.js","sourceRoot":"","sources":["../../../src/openapi/models/postgresql-sqlanalysis.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KubeBlocks Cloud API
|
|
3
|
+
* KubeBlocks Cloud API is a RESTful API for managing KubeBlocks Cloud resources. The API is organized around REST. Our API has predictable resource-oriented URLs, accepts `JSON-encoded` request bodies, returns `JSON-encoded` responses, and uses standard HTTP response codes, authentication, and verbs. We use standard HTTP authentication and provide API keys to identify who you are. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@apecloud.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface PostgresqlSQLFingerprint
|
|
16
|
+
*/
|
|
17
|
+
export interface PostgresqlSQLFingerprint {
|
|
18
|
+
/**
|
|
19
|
+
* PostgreSQL pg_stat_statements queryid represented as a string.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof PostgresqlSQLFingerprint
|
|
22
|
+
*/
|
|
23
|
+
'queryID': string;
|
|
24
|
+
/**
|
|
25
|
+
* Stable SQL fingerprint identifier for UI grouping. M1 uses queryID.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof PostgresqlSQLFingerprint
|
|
28
|
+
*/
|
|
29
|
+
'fingerprint': string;
|
|
30
|
+
/**
|
|
31
|
+
* Redacted SQL summary. Full raw SQL is intentionally not returned.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof PostgresqlSQLFingerprint
|
|
34
|
+
*/
|
|
35
|
+
'querySummary': string;
|
|
36
|
+
/**
|
|
37
|
+
* Number of executions accumulated by pg_stat_statements since statsReset.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PostgresqlSQLFingerprint
|
|
40
|
+
*/
|
|
41
|
+
'calls': number;
|
|
42
|
+
/**
|
|
43
|
+
* Total execution time in milliseconds accumulated by pg_stat_statements since statsReset.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof PostgresqlSQLFingerprint
|
|
46
|
+
*/
|
|
47
|
+
'totalTimeMs': number;
|
|
48
|
+
/**
|
|
49
|
+
* Mean execution time in milliseconds.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof PostgresqlSQLFingerprint
|
|
52
|
+
*/
|
|
53
|
+
'meanTimeMs': number;
|
|
54
|
+
/**
|
|
55
|
+
* Max execution time in milliseconds.
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof PostgresqlSQLFingerprint
|
|
58
|
+
*/
|
|
59
|
+
'maxTimeMs': number;
|
|
60
|
+
/**
|
|
61
|
+
* Rows returned or affected by the fingerprint, as reported by pg_stat_statements.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof PostgresqlSQLFingerprint
|
|
64
|
+
*/
|
|
65
|
+
'rows': number;
|
|
66
|
+
/**
|
|
67
|
+
* Database name resolved from pg_stat_statements.dbid when visible.
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof PostgresqlSQLFingerprint
|
|
70
|
+
*/
|
|
71
|
+
'database': string;
|
|
72
|
+
/**
|
|
73
|
+
* Database user name resolved from pg_stat_statements.userid when visible.
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof PostgresqlSQLFingerprint
|
|
76
|
+
*/
|
|
77
|
+
'user': string;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=postgresql-sqlfingerprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgresql-sqlfingerprint.d.ts","sourceRoot":"","sources":["../../../src/openapi/models/postgresql-sqlfingerprint.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAIH;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACrC;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* KubeBlocks Cloud API
|
|
6
|
+
* KubeBlocks Cloud API is a RESTful API for managing KubeBlocks Cloud resources. The API is organized around REST. Our API has predictable resource-oriented URLs, accepts `JSON-encoded` request bodies, returns `JSON-encoded` responses, and uses standard HTTP response codes, authentication, and verbs. We use standard HTTP authentication and provide API keys to identify who you are. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@apecloud.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
//# sourceMappingURL=postgresql-sqlfingerprint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgresql-sqlfingerprint.js","sourceRoot":"","sources":["../../../src/openapi/models/postgresql-sqlfingerprint.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG"}
|
package/package.json
CHANGED
|
@@ -734,6 +734,8 @@ models/postgresql-session.ts
|
|
|
734
734
|
models/postgresql-space-analysis.ts
|
|
735
735
|
models/postgresql-space-source.ts
|
|
736
736
|
models/postgresql-space-summary.ts
|
|
737
|
+
models/postgresql-sqlanalysis.ts
|
|
738
|
+
models/postgresql-sqlfingerprint.ts
|
|
737
739
|
models/postgresql-storage-instance-usage.ts
|
|
738
740
|
models/postgresql-storage-overview.ts
|
|
739
741
|
models/postgresql-table-space.ts
|
|
@@ -26,6 +26,8 @@ import type { APIErrorResponse } from '../models';
|
|
|
26
26
|
// @ts-ignore
|
|
27
27
|
import type { PostgresqlLockAnalysis } from '../models';
|
|
28
28
|
// @ts-ignore
|
|
29
|
+
import type { PostgresqlSQLAnalysis } from '../models';
|
|
30
|
+
// @ts-ignore
|
|
29
31
|
import type { PostgresqlSession } from '../models';
|
|
30
32
|
// @ts-ignore
|
|
31
33
|
import type { PostgresqlSpaceAnalysis } from '../models';
|
|
@@ -35,6 +37,61 @@ import type { PostgresqlSpaceAnalysis } from '../models';
|
|
|
35
37
|
*/
|
|
36
38
|
export const DiagnosticsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
37
39
|
return {
|
|
40
|
+
/**
|
|
41
|
+
* Get a read-only PostgreSQL SQL fingerprint ranking from pg_stat_statements. The response does not expose full SQL text, time-window aggregation, summary cards, slow-log relation, execution plans, or remediation actions.
|
|
42
|
+
* @summary Get PostgreSQL SQL analysis
|
|
43
|
+
* @param {string} orgName Organization name
|
|
44
|
+
* @param {string} clusterName Cluster name
|
|
45
|
+
* @param {number} [limit] Maximum number of SQL fingerprints to return. The backend applies its own upper bound.
|
|
46
|
+
* @param {string} [orderBy] Sort key. Allowed values are totalTime, meanTime, maxTime, and calls. Defaults to totalTime.
|
|
47
|
+
* @param {*} [options] Override http request option.
|
|
48
|
+
* @throws {RequiredError}
|
|
49
|
+
*/
|
|
50
|
+
getDiagnosticsPostgresqlSQLAnalysis: async (orgName: string, clusterName: string, limit?: number, orderBy?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
51
|
+
// verify required parameter 'orgName' is not null or undefined
|
|
52
|
+
assertParamExists('getDiagnosticsPostgresqlSQLAnalysis', 'orgName', orgName)
|
|
53
|
+
// verify required parameter 'clusterName' is not null or undefined
|
|
54
|
+
assertParamExists('getDiagnosticsPostgresqlSQLAnalysis', 'clusterName', clusterName)
|
|
55
|
+
const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/diagnostics/postgresql/sqlAnalysis`
|
|
56
|
+
.replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
|
|
57
|
+
.replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
|
|
58
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
59
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
60
|
+
let baseOptions;
|
|
61
|
+
if (configuration) {
|
|
62
|
+
baseOptions = configuration.baseOptions;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
66
|
+
const localVarHeaderParameter = {} as any;
|
|
67
|
+
const localVarQueryParameter = {} as any;
|
|
68
|
+
|
|
69
|
+
// authentication BearerToken required
|
|
70
|
+
// http bearer authentication required
|
|
71
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
72
|
+
|
|
73
|
+
// authentication DigestAuth required
|
|
74
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
75
|
+
|
|
76
|
+
if (limit !== undefined) {
|
|
77
|
+
localVarQueryParameter['limit'] = limit;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (orderBy !== undefined) {
|
|
81
|
+
localVarQueryParameter['orderBy'] = orderBy;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
87
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
88
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
url: toPathString(localVarUrlObj),
|
|
92
|
+
options: localVarRequestOptions,
|
|
93
|
+
};
|
|
94
|
+
},
|
|
38
95
|
/**
|
|
39
96
|
* Get one PostgreSQL session basic diagnostics record by backend pid.
|
|
40
97
|
* @summary Get PostgreSQL session basic diagnostics
|
|
@@ -243,6 +300,22 @@ export const DiagnosticsApiAxiosParamCreator = function (configuration?: Configu
|
|
|
243
300
|
export const DiagnosticsApiFp = function(configuration?: Configuration) {
|
|
244
301
|
const localVarAxiosParamCreator = DiagnosticsApiAxiosParamCreator(configuration)
|
|
245
302
|
return {
|
|
303
|
+
/**
|
|
304
|
+
* Get a read-only PostgreSQL SQL fingerprint ranking from pg_stat_statements. The response does not expose full SQL text, time-window aggregation, summary cards, slow-log relation, execution plans, or remediation actions.
|
|
305
|
+
* @summary Get PostgreSQL SQL analysis
|
|
306
|
+
* @param {string} orgName Organization name
|
|
307
|
+
* @param {string} clusterName Cluster name
|
|
308
|
+
* @param {number} [limit] Maximum number of SQL fingerprints to return. The backend applies its own upper bound.
|
|
309
|
+
* @param {string} [orderBy] Sort key. Allowed values are totalTime, meanTime, maxTime, and calls. Defaults to totalTime.
|
|
310
|
+
* @param {*} [options] Override http request option.
|
|
311
|
+
* @throws {RequiredError}
|
|
312
|
+
*/
|
|
313
|
+
async getDiagnosticsPostgresqlSQLAnalysis(orgName: string, clusterName: string, limit?: number, orderBy?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostgresqlSQLAnalysis>> {
|
|
314
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getDiagnosticsPostgresqlSQLAnalysis(orgName, clusterName, limit, orderBy, options);
|
|
315
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
316
|
+
const localVarOperationServerBasePath = operationServerMap['DiagnosticsApi.getDiagnosticsPostgresqlSQLAnalysis']?.[localVarOperationServerIndex]?.url;
|
|
317
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
318
|
+
},
|
|
246
319
|
/**
|
|
247
320
|
* Get one PostgreSQL session basic diagnostics record by backend pid.
|
|
248
321
|
* @summary Get PostgreSQL session basic diagnostics
|
|
@@ -313,6 +386,16 @@ export const DiagnosticsApiFp = function(configuration?: Configuration) {
|
|
|
313
386
|
export const DiagnosticsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
314
387
|
const localVarFp = DiagnosticsApiFp(configuration)
|
|
315
388
|
return {
|
|
389
|
+
/**
|
|
390
|
+
* Get a read-only PostgreSQL SQL fingerprint ranking from pg_stat_statements. The response does not expose full SQL text, time-window aggregation, summary cards, slow-log relation, execution plans, or remediation actions.
|
|
391
|
+
* @summary Get PostgreSQL SQL analysis
|
|
392
|
+
* @param {DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysisRequest} requestParameters Request parameters.
|
|
393
|
+
* @param {*} [options] Override http request option.
|
|
394
|
+
* @throws {RequiredError}
|
|
395
|
+
*/
|
|
396
|
+
getDiagnosticsPostgresqlSQLAnalysis(requestParameters: DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysisRequest, options?: RawAxiosRequestConfig): AxiosPromise<PostgresqlSQLAnalysis> {
|
|
397
|
+
return localVarFp.getDiagnosticsPostgresqlSQLAnalysis(requestParameters.orgName, requestParameters.clusterName, requestParameters.limit, requestParameters.orderBy, options).then((request) => request(axios, basePath));
|
|
398
|
+
},
|
|
316
399
|
/**
|
|
317
400
|
* Get one PostgreSQL session basic diagnostics record by backend pid.
|
|
318
401
|
* @summary Get PostgreSQL session basic diagnostics
|
|
@@ -362,6 +445,16 @@ export const DiagnosticsApiFactory = function (configuration?: Configuration, ba
|
|
|
362
445
|
* @interface DiagnosticsApi
|
|
363
446
|
*/
|
|
364
447
|
export interface DiagnosticsApiInterface {
|
|
448
|
+
/**
|
|
449
|
+
* Get a read-only PostgreSQL SQL fingerprint ranking from pg_stat_statements. The response does not expose full SQL text, time-window aggregation, summary cards, slow-log relation, execution plans, or remediation actions.
|
|
450
|
+
* @summary Get PostgreSQL SQL analysis
|
|
451
|
+
* @param {DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysisRequest} requestParameters Request parameters.
|
|
452
|
+
* @param {*} [options] Override http request option.
|
|
453
|
+
* @throws {RequiredError}
|
|
454
|
+
* @memberof DiagnosticsApiInterface
|
|
455
|
+
*/
|
|
456
|
+
getDiagnosticsPostgresqlSQLAnalysis(requestParameters: DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysisRequest, options?: RawAxiosRequestConfig): AxiosPromise<PostgresqlSQLAnalysis>;
|
|
457
|
+
|
|
365
458
|
/**
|
|
366
459
|
* Get one PostgreSQL session basic diagnostics record by backend pid.
|
|
367
460
|
* @summary Get PostgreSQL session basic diagnostics
|
|
@@ -404,6 +497,41 @@ export interface DiagnosticsApiInterface {
|
|
|
404
497
|
|
|
405
498
|
}
|
|
406
499
|
|
|
500
|
+
/**
|
|
501
|
+
* Request parameters for getDiagnosticsPostgresqlSQLAnalysis operation in DiagnosticsApi.
|
|
502
|
+
* @export
|
|
503
|
+
* @interface DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysisRequest
|
|
504
|
+
*/
|
|
505
|
+
export interface DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysisRequest {
|
|
506
|
+
/**
|
|
507
|
+
* Organization name
|
|
508
|
+
* @type {string}
|
|
509
|
+
* @memberof DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysis
|
|
510
|
+
*/
|
|
511
|
+
readonly orgName: string
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Cluster name
|
|
515
|
+
* @type {string}
|
|
516
|
+
* @memberof DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysis
|
|
517
|
+
*/
|
|
518
|
+
readonly clusterName: string
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Maximum number of SQL fingerprints to return. The backend applies its own upper bound.
|
|
522
|
+
* @type {number}
|
|
523
|
+
* @memberof DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysis
|
|
524
|
+
*/
|
|
525
|
+
readonly limit?: number
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Sort key. Allowed values are totalTime, meanTime, maxTime, and calls. Defaults to totalTime.
|
|
529
|
+
* @type {string}
|
|
530
|
+
* @memberof DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysis
|
|
531
|
+
*/
|
|
532
|
+
readonly orderBy?: string
|
|
533
|
+
}
|
|
534
|
+
|
|
407
535
|
/**
|
|
408
536
|
* Request parameters for getDiagnosticsPostgresqlSession operation in DiagnosticsApi.
|
|
409
537
|
* @export
|
|
@@ -523,6 +651,18 @@ export interface DiagnosticsApiListDiagnosticsPostgresqlSessionsRequest {
|
|
|
523
651
|
* @extends {BaseAPI}
|
|
524
652
|
*/
|
|
525
653
|
export class DiagnosticsApi extends BaseAPI implements DiagnosticsApiInterface {
|
|
654
|
+
/**
|
|
655
|
+
* Get a read-only PostgreSQL SQL fingerprint ranking from pg_stat_statements. The response does not expose full SQL text, time-window aggregation, summary cards, slow-log relation, execution plans, or remediation actions.
|
|
656
|
+
* @summary Get PostgreSQL SQL analysis
|
|
657
|
+
* @param {DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysisRequest} requestParameters Request parameters.
|
|
658
|
+
* @param {*} [options] Override http request option.
|
|
659
|
+
* @throws {RequiredError}
|
|
660
|
+
* @memberof DiagnosticsApi
|
|
661
|
+
*/
|
|
662
|
+
public getDiagnosticsPostgresqlSQLAnalysis(requestParameters: DiagnosticsApiGetDiagnosticsPostgresqlSQLAnalysisRequest, options?: RawAxiosRequestConfig) {
|
|
663
|
+
return DiagnosticsApiFp(this.configuration).getDiagnosticsPostgresqlSQLAnalysis(requestParameters.orgName, requestParameters.clusterName, requestParameters.limit, requestParameters.orderBy, options).then((request) => request(this.axios, this.basePath));
|
|
664
|
+
}
|
|
665
|
+
|
|
526
666
|
/**
|
|
527
667
|
* Get one PostgreSQL session basic diagnostics record by backend pid.
|
|
528
668
|
* @summary Get PostgreSQL session basic diagnostics
|
|
@@ -632,6 +632,8 @@ export * from './postgresql-deadlock-evidence';
|
|
|
632
632
|
export * from './postgresql-index-space';
|
|
633
633
|
export * from './postgresql-lock-analysis';
|
|
634
634
|
export * from './postgresql-lock-row';
|
|
635
|
+
export * from './postgresql-sqlanalysis';
|
|
636
|
+
export * from './postgresql-sqlfingerprint';
|
|
635
637
|
export * from './postgresql-session';
|
|
636
638
|
export * from './postgresql-space-analysis';
|
|
637
639
|
export * from './postgresql-space-source';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Admin API
|
|
5
|
+
* The Admin API is used to manage the ApeCloud platform.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@apecloud.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// May contain unused imports in some cases
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import type { PostgresqlSQLFingerprint } from './postgresql-sqlfingerprint';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @export
|
|
23
|
+
* @interface PostgresqlSQLAnalysis
|
|
24
|
+
*/
|
|
25
|
+
export interface PostgresqlSQLAnalysis {
|
|
26
|
+
/**
|
|
27
|
+
* Data source. M1 uses pg_stat_statements only.
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof PostgresqlSQLAnalysis
|
|
30
|
+
*/
|
|
31
|
+
'source': string;
|
|
32
|
+
/**
|
|
33
|
+
* Source status. Expected values are available or unavailable.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof PostgresqlSQLAnalysis
|
|
36
|
+
*/
|
|
37
|
+
'status': string;
|
|
38
|
+
/**
|
|
39
|
+
* Reason when status is unavailable, such as extension_disabled, permission_denied, or query_failed.
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof PostgresqlSQLAnalysis
|
|
42
|
+
*/
|
|
43
|
+
'unavailableReason'?: string;
|
|
44
|
+
/**
|
|
45
|
+
* UTC timestamp reported by pg_stat_statements_info.stats_reset when available. Empty means the source did not expose this timestamp.
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof PostgresqlSQLAnalysis
|
|
48
|
+
*/
|
|
49
|
+
'statsReset'?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Backend collection timestamp in UTC. It is not a sampling-window end time.
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof PostgresqlSQLAnalysis
|
|
54
|
+
*/
|
|
55
|
+
'collectedAt': string;
|
|
56
|
+
/**
|
|
57
|
+
* Effective row limit after backend normalization.
|
|
58
|
+
* @type {number}
|
|
59
|
+
* @memberof PostgresqlSQLAnalysis
|
|
60
|
+
*/
|
|
61
|
+
'limit': number;
|
|
62
|
+
/**
|
|
63
|
+
* Effective sort key. Expected values are totalTime, meanTime, maxTime, or calls.
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @memberof PostgresqlSQLAnalysis
|
|
66
|
+
*/
|
|
67
|
+
'orderBy': string;
|
|
68
|
+
/**
|
|
69
|
+
* Total execution time in milliseconds across all visible pg_stat_statements rows, not limited to the returned top-N items. Present only when the source is available.
|
|
70
|
+
* @type {number}
|
|
71
|
+
* @memberof PostgresqlSQLAnalysis
|
|
72
|
+
*/
|
|
73
|
+
'totalTimeMsAll'?: number | null;
|
|
74
|
+
/**
|
|
75
|
+
* Total execution count across all visible pg_stat_statements rows, not limited to the returned top-N items. Present only when the source is available.
|
|
76
|
+
* @type {number}
|
|
77
|
+
* @memberof PostgresqlSQLAnalysis
|
|
78
|
+
*/
|
|
79
|
+
'callsAll'?: number | null;
|
|
80
|
+
/**
|
|
81
|
+
* SQL fingerprint ranking rows from pg_stat_statements. The list may be empty when no statement statistics exist.
|
|
82
|
+
* @type {Array<PostgresqlSQLFingerprint>}
|
|
83
|
+
* @memberof PostgresqlSQLAnalysis
|
|
84
|
+
*/
|
|
85
|
+
'items': Array<PostgresqlSQLFingerprint>;
|
|
86
|
+
}
|
|
87
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Admin API
|
|
5
|
+
* The Admin API is used to manage the ApeCloud platform.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@apecloud.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface PostgresqlSQLFingerprint
|
|
21
|
+
*/
|
|
22
|
+
export interface PostgresqlSQLFingerprint {
|
|
23
|
+
/**
|
|
24
|
+
* PostgreSQL pg_stat_statements queryid represented as a string.
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof PostgresqlSQLFingerprint
|
|
27
|
+
*/
|
|
28
|
+
'queryID': string;
|
|
29
|
+
/**
|
|
30
|
+
* Stable SQL fingerprint identifier for UI grouping. M1 uses queryID.
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof PostgresqlSQLFingerprint
|
|
33
|
+
*/
|
|
34
|
+
'fingerprint': string;
|
|
35
|
+
/**
|
|
36
|
+
* Redacted SQL summary. Full raw SQL is intentionally not returned.
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof PostgresqlSQLFingerprint
|
|
39
|
+
*/
|
|
40
|
+
'querySummary': string;
|
|
41
|
+
/**
|
|
42
|
+
* Number of executions accumulated by pg_stat_statements since statsReset.
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof PostgresqlSQLFingerprint
|
|
45
|
+
*/
|
|
46
|
+
'calls': number;
|
|
47
|
+
/**
|
|
48
|
+
* Total execution time in milliseconds accumulated by pg_stat_statements since statsReset.
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof PostgresqlSQLFingerprint
|
|
51
|
+
*/
|
|
52
|
+
'totalTimeMs': number;
|
|
53
|
+
/**
|
|
54
|
+
* Mean execution time in milliseconds.
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof PostgresqlSQLFingerprint
|
|
57
|
+
*/
|
|
58
|
+
'meanTimeMs': number;
|
|
59
|
+
/**
|
|
60
|
+
* Max execution time in milliseconds.
|
|
61
|
+
* @type {number}
|
|
62
|
+
* @memberof PostgresqlSQLFingerprint
|
|
63
|
+
*/
|
|
64
|
+
'maxTimeMs': number;
|
|
65
|
+
/**
|
|
66
|
+
* Rows returned or affected by the fingerprint, as reported by pg_stat_statements.
|
|
67
|
+
* @type {number}
|
|
68
|
+
* @memberof PostgresqlSQLFingerprint
|
|
69
|
+
*/
|
|
70
|
+
'rows': number;
|
|
71
|
+
/**
|
|
72
|
+
* Database name resolved from pg_stat_statements.dbid when visible.
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof PostgresqlSQLFingerprint
|
|
75
|
+
*/
|
|
76
|
+
'database': string;
|
|
77
|
+
/**
|
|
78
|
+
* Database user name resolved from pg_stat_statements.userid when visible.
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof PostgresqlSQLFingerprint
|
|
81
|
+
*/
|
|
82
|
+
'user': string;
|
|
83
|
+
}
|
|
84
|
+
|