kb-cloud-client-typescript 2.3.0-alpha.127 → 2.3.0-alpha.129

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.
Files changed (51) hide show
  1. package/dist/adminapi/apis/diagnostics-api.d.ts +80 -0
  2. package/dist/adminapi/apis/diagnostics-api.d.ts.map +1 -1
  3. package/dist/adminapi/apis/diagnostics-api.js +84 -0
  4. package/dist/adminapi/apis/diagnostics-api.js.map +1 -1
  5. package/dist/adminapi/models/dms-session.d.ts +8 -2
  6. package/dist/adminapi/models/dms-session.d.ts.map +1 -1
  7. package/dist/adminapi/models/index.d.ts +2 -0
  8. package/dist/adminapi/models/index.d.ts.map +1 -1
  9. package/dist/adminapi/models/index.js +2 -0
  10. package/dist/adminapi/models/index.js.map +1 -1
  11. package/dist/adminapi/models/postgresql-sqlanalysis.d.ts +80 -0
  12. package/dist/adminapi/models/postgresql-sqlanalysis.d.ts.map +1 -0
  13. package/dist/adminapi/models/postgresql-sqlanalysis.js +16 -0
  14. package/dist/adminapi/models/postgresql-sqlanalysis.js.map +1 -0
  15. package/dist/adminapi/models/postgresql-sqlfingerprint.d.ts +79 -0
  16. package/dist/adminapi/models/postgresql-sqlfingerprint.d.ts.map +1 -0
  17. package/dist/adminapi/models/postgresql-sqlfingerprint.js +16 -0
  18. package/dist/adminapi/models/postgresql-sqlfingerprint.js.map +1 -0
  19. package/dist/openapi/apis/diagnostics-api.d.ts +80 -0
  20. package/dist/openapi/apis/diagnostics-api.d.ts.map +1 -1
  21. package/dist/openapi/apis/diagnostics-api.js +84 -0
  22. package/dist/openapi/apis/diagnostics-api.js.map +1 -1
  23. package/dist/openapi/models/dms-session.d.ts +8 -2
  24. package/dist/openapi/models/dms-session.d.ts.map +1 -1
  25. package/dist/openapi/models/index.d.ts +2 -0
  26. package/dist/openapi/models/index.d.ts.map +1 -1
  27. package/dist/openapi/models/index.js +2 -0
  28. package/dist/openapi/models/index.js.map +1 -1
  29. package/dist/openapi/models/postgresql-sqlanalysis.d.ts +80 -0
  30. package/dist/openapi/models/postgresql-sqlanalysis.d.ts.map +1 -0
  31. package/dist/openapi/models/postgresql-sqlanalysis.js +16 -0
  32. package/dist/openapi/models/postgresql-sqlanalysis.js.map +1 -0
  33. package/dist/openapi/models/postgresql-sqlfingerprint.d.ts +79 -0
  34. package/dist/openapi/models/postgresql-sqlfingerprint.d.ts.map +1 -0
  35. package/dist/openapi/models/postgresql-sqlfingerprint.js +16 -0
  36. package/dist/openapi/models/postgresql-sqlfingerprint.js.map +1 -0
  37. package/package.json +1 -1
  38. package/src/adminapi/.openapi-generator/FILES +2 -0
  39. package/src/adminapi/apis/diagnostics-api.ts +140 -0
  40. package/src/adminapi/models/dms-session.ts +8 -2
  41. package/src/adminapi/models/index.ts +2 -0
  42. package/src/adminapi/models/postgresql-sqlanalysis.ts +87 -0
  43. package/src/adminapi/models/postgresql-sqlfingerprint.ts +84 -0
  44. package/src/adminapi.yaml +152 -2
  45. package/src/openapi/.openapi-generator/FILES +2 -0
  46. package/src/openapi/apis/diagnostics-api.ts +140 -0
  47. package/src/openapi/models/dms-session.ts +8 -2
  48. package/src/openapi/models/index.ts +2 -0
  49. package/src/openapi/models/postgresql-sqlanalysis.ts +87 -0
  50. package/src/openapi/models/postgresql-sqlfingerprint.ts +84 -0
  51. package/src/openapi.yaml +152 -2
package/src/adminapi.yaml CHANGED
@@ -19903,6 +19903,56 @@ paths:
19903
19903
  $ref: '#/components/responses/404'
19904
19904
  '500':
19905
19905
  $ref: '#/components/responses/500'
19906
+ /admin/v1/organizations/{orgName}/clusters/{clusterName}/diagnostics/postgresql/sqlAnalysis:
19907
+ get:
19908
+ tags:
19909
+ - diagnostics
19910
+ summary: Get PostgreSQL SQL analysis
19911
+ description: 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.
19912
+ operationId: getDiagnosticsPostgresqlSQLAnalysis
19913
+ parameters:
19914
+ - name: orgName
19915
+ in: path
19916
+ description: Organization name
19917
+ required: true
19918
+ schema:
19919
+ type: string
19920
+ - name: clusterName
19921
+ in: path
19922
+ description: Cluster name
19923
+ required: true
19924
+ schema:
19925
+ type: string
19926
+ - name: limit
19927
+ in: query
19928
+ description: Maximum number of SQL fingerprints to return. The backend applies its own upper bound.
19929
+ required: false
19930
+ schema:
19931
+ type: integer
19932
+ format: int64
19933
+ - name: orderBy
19934
+ in: query
19935
+ description: Sort key. Allowed values are totalTime, meanTime, maxTime, and calls. Defaults to totalTime.
19936
+ required: false
19937
+ schema:
19938
+ type: string
19939
+ responses:
19940
+ '200':
19941
+ description: OK
19942
+ content:
19943
+ application/json:
19944
+ schema:
19945
+ $ref: '#/components/schemas/postgresqlSQLAnalysis'
19946
+ '400':
19947
+ $ref: '#/components/responses/400'
19948
+ '401':
19949
+ $ref: '#/components/responses/401'
19950
+ '403':
19951
+ $ref: '#/components/responses/403'
19952
+ '404':
19953
+ $ref: '#/components/responses/404'
19954
+ '500':
19955
+ $ref: '#/components/responses/500'
19906
19956
  /admin/v1/organizations/{orgName}/clusters/{clusterName}/diagnostics/postgresql/sessions/{pid}/lockAnalysis:
19907
19957
  get:
19908
19958
  tags:
@@ -27022,14 +27072,18 @@ components:
27022
27072
  DmsSession:
27023
27073
  type: object
27024
27074
  required:
27025
- - id
27026
27075
  - user
27027
27076
  - host
27028
27077
  properties:
27029
27078
  id:
27030
27079
  type: integer
27031
- description: session ID
27080
+ description: numeric session ID, when the database exposes one that fits in int64
27032
27081
  format: int64
27082
+ nullable: true
27083
+ sessionId:
27084
+ type: string
27085
+ description: native session ID used by the terminate API
27086
+ nullable: true
27033
27087
  user:
27034
27088
  type: string
27035
27089
  description: user name
@@ -37319,6 +37373,102 @@ components:
37319
37373
  collectedAt:
37320
37374
  type: string
37321
37375
  description: Backend collection timestamp in UTC.
37376
+ postgresqlSQLFingerprint:
37377
+ type: object
37378
+ required:
37379
+ - queryID
37380
+ - fingerprint
37381
+ - querySummary
37382
+ - calls
37383
+ - totalTimeMs
37384
+ - meanTimeMs
37385
+ - maxTimeMs
37386
+ - rows
37387
+ - database
37388
+ - user
37389
+ properties:
37390
+ queryID:
37391
+ type: string
37392
+ description: PostgreSQL pg_stat_statements queryid represented as a string.
37393
+ fingerprint:
37394
+ type: string
37395
+ description: Stable SQL fingerprint identifier for UI grouping. M1 uses queryID.
37396
+ querySummary:
37397
+ type: string
37398
+ description: Redacted SQL summary. Full raw SQL is intentionally not returned.
37399
+ calls:
37400
+ type: integer
37401
+ format: int64
37402
+ description: Number of executions accumulated by pg_stat_statements since statsReset.
37403
+ totalTimeMs:
37404
+ type: number
37405
+ format: double
37406
+ description: Total execution time in milliseconds accumulated by pg_stat_statements since statsReset.
37407
+ meanTimeMs:
37408
+ type: number
37409
+ format: double
37410
+ description: Mean execution time in milliseconds.
37411
+ maxTimeMs:
37412
+ type: number
37413
+ format: double
37414
+ description: Max execution time in milliseconds.
37415
+ rows:
37416
+ type: integer
37417
+ format: int64
37418
+ description: Rows returned or affected by the fingerprint, as reported by pg_stat_statements.
37419
+ database:
37420
+ type: string
37421
+ description: Database name resolved from pg_stat_statements.dbid when visible.
37422
+ user:
37423
+ type: string
37424
+ description: Database user name resolved from pg_stat_statements.userid when visible.
37425
+ postgresqlSQLAnalysis:
37426
+ type: object
37427
+ required:
37428
+ - source
37429
+ - status
37430
+ - collectedAt
37431
+ - limit
37432
+ - orderBy
37433
+ - items
37434
+ properties:
37435
+ source:
37436
+ type: string
37437
+ description: Data source. M1 uses pg_stat_statements only.
37438
+ status:
37439
+ type: string
37440
+ description: Source status. Expected values are available or unavailable.
37441
+ unavailableReason:
37442
+ type: string
37443
+ description: Reason when status is unavailable, such as extension_disabled, permission_denied, or query_failed.
37444
+ statsReset:
37445
+ type: string
37446
+ description: UTC timestamp reported by pg_stat_statements_info.stats_reset when available. Empty means the source did not expose this timestamp.
37447
+ collectedAt:
37448
+ type: string
37449
+ description: Backend collection timestamp in UTC. It is not a sampling-window end time.
37450
+ limit:
37451
+ type: integer
37452
+ format: int64
37453
+ description: Effective row limit after backend normalization.
37454
+ orderBy:
37455
+ type: string
37456
+ description: Effective sort key. Expected values are totalTime, meanTime, maxTime, or calls.
37457
+ totalTimeMsAll:
37458
+ type: number
37459
+ format: double
37460
+ x-nullable: true
37461
+ description: 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.
37462
+ callsAll:
37463
+ type: integer
37464
+ format: int64
37465
+ x-nullable: true
37466
+ description: 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.
37467
+ items:
37468
+ type: array
37469
+ description: SQL fingerprint ranking rows from pg_stat_statements. The list may be empty when no statement statistics exist.
37470
+ items:
37471
+ $ref: '#/components/schemas/postgresqlSQLFingerprint'
37322
37472
  postgresqlLockRow:
37323
37473
  type: object
37324
37474
  required:
@@ -666,6 +666,8 @@ models/postgresql-session.ts
666
666
  models/postgresql-space-analysis.ts
667
667
  models/postgresql-space-source.ts
668
668
  models/postgresql-space-summary.ts
669
+ models/postgresql-sqlanalysis.ts
670
+ models/postgresql-sqlfingerprint.ts
669
671
  models/postgresql-storage-instance-usage.ts
670
672
  models/postgresql-storage-overview.ts
671
673
  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 = `/api/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
@@ -21,11 +21,17 @@
21
21
  */
22
22
  export interface DmsSession {
23
23
  /**
24
- * session ID
24
+ * numeric session ID, when the database exposes one that fits in int64
25
25
  * @type {number}
26
26
  * @memberof DmsSession
27
27
  */
28
- 'id': number;
28
+ 'id'?: number | null;
29
+ /**
30
+ * native session ID used by the terminate API
31
+ * @type {string}
32
+ * @memberof DmsSession
33
+ */
34
+ 'sessionId'?: string | null;
29
35
  /**
30
36
  * user name
31
37
  * @type {string}
@@ -575,6 +575,8 @@ export * from './postgresql-deadlock-evidence';
575
575
  export * from './postgresql-index-space';
576
576
  export * from './postgresql-lock-analysis';
577
577
  export * from './postgresql-lock-row';
578
+ export * from './postgresql-sqlanalysis';
579
+ export * from './postgresql-sqlfingerprint';
578
580
  export * from './postgresql-session';
579
581
  export * from './postgresql-space-analysis';
580
582
  export * from './postgresql-space-source';
@@ -0,0 +1,87 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KubeBlocks Cloud API
5
+ * 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.
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
+ * KubeBlocks Cloud API
5
+ * 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.
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
+