@harnessio/react-dbops-service-client 0.23.0 → 0.24.0
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/dbops-service/src/services/hooks/useV1ListDatabaseSchemaQuery.d.ts +40 -0
- package/dist/dbops-service/src/services/hooks/useV1ListDatabaseSchemaQuery.js +14 -0
- package/dist/dbops-service/src/services/index.d.ts +2 -0
- package/dist/dbops-service/src/services/index.js +1 -0
- package/dist/dbops-service/src/services/requestBodies/DbSchemaUpdateRequestRequestBody.d.ts +4 -0
- package/dist/dbops-service/src/services/schemas/Command.d.ts +1 -1
- package/dist/dbops-service/src/services/schemas/DbSchemaOut.d.ts +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { DbSchemaOut } from '../schemas/DbSchemaOut';
|
|
3
|
+
import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface V1ListDatabaseSchemaQueryQueryParams {
|
|
7
|
+
/**
|
|
8
|
+
* @format int64
|
|
9
|
+
* @default 0
|
|
10
|
+
*/
|
|
11
|
+
page?: number;
|
|
12
|
+
/**
|
|
13
|
+
* @default 10
|
|
14
|
+
*/
|
|
15
|
+
limit?: number;
|
|
16
|
+
search_term?: string;
|
|
17
|
+
/**
|
|
18
|
+
* @default "created"
|
|
19
|
+
*/
|
|
20
|
+
sort?: 'created' | 'name' | 'updated';
|
|
21
|
+
/**
|
|
22
|
+
* @default "DESC"
|
|
23
|
+
*/
|
|
24
|
+
order?: 'ASC' | 'DESC';
|
|
25
|
+
orgIdentifier?: string;
|
|
26
|
+
projectIdentifier?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface V1ListDatabaseSchemaQueryHeaderParams {
|
|
29
|
+
'Harness-Account': string;
|
|
30
|
+
}
|
|
31
|
+
export type V1ListDatabaseSchemaOkResponse = ResponseWithPagination<DbSchemaOut[]>;
|
|
32
|
+
export type V1ListDatabaseSchemaErrorResponse = ErrorResponseResponse;
|
|
33
|
+
export interface V1ListDatabaseSchemaProps extends Omit<FetcherOptions<V1ListDatabaseSchemaQueryQueryParams, unknown, V1ListDatabaseSchemaQueryHeaderParams>, 'url'> {
|
|
34
|
+
queryParams: V1ListDatabaseSchemaQueryQueryParams;
|
|
35
|
+
}
|
|
36
|
+
export declare function v1ListDatabaseSchema(props: V1ListDatabaseSchemaProps): Promise<V1ListDatabaseSchemaOkResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* List database schemas for an account
|
|
39
|
+
*/
|
|
40
|
+
export declare function useV1ListDatabaseSchemaQuery(props: V1ListDatabaseSchemaProps, options?: Omit<UseQueryOptions<V1ListDatabaseSchemaOkResponse, V1ListDatabaseSchemaErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<V1ListDatabaseSchemaOkResponse, import("..").Error>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useQuery } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function v1ListDatabaseSchema(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/dbops/dbschema`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* List database schemas for an account
|
|
11
|
+
*/
|
|
12
|
+
export function useV1ListDatabaseSchemaQuery(props, options) {
|
|
13
|
+
return useQuery(['v1-list-database-schema', props.queryParams], ({ signal }) => v1ListDatabaseSchema(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -41,6 +41,8 @@ export type { V1GetProjDbSchemaErrorResponse, V1GetProjDbSchemaOkResponse, V1Get
|
|
|
41
41
|
export { useV1GetProjDbSchemaQuery, v1GetProjDbSchema } from './hooks/useV1GetProjDbSchemaQuery';
|
|
42
42
|
export type { V1IngestLogsErrorResponse, V1IngestLogsMutationPathParams, V1IngestLogsOkResponse, V1IngestLogsProps, V1IngestLogsRequestBody, } from './hooks/useV1IngestLogsMutation';
|
|
43
43
|
export { useV1IngestLogsMutation, v1IngestLogs } from './hooks/useV1IngestLogsMutation';
|
|
44
|
+
export type { V1ListDatabaseSchemaErrorResponse, V1ListDatabaseSchemaOkResponse, V1ListDatabaseSchemaProps, V1ListDatabaseSchemaQueryQueryParams, } from './hooks/useV1ListDatabaseSchemaQuery';
|
|
45
|
+
export { useV1ListDatabaseSchemaQuery, v1ListDatabaseSchema, } from './hooks/useV1ListDatabaseSchemaQuery';
|
|
44
46
|
export type { V1ListProjDbSchemaInstanceErrorResponse, V1ListProjDbSchemaInstanceMutationPathParams, V1ListProjDbSchemaInstanceMutationQueryParams, V1ListProjDbSchemaInstanceOkResponse, V1ListProjDbSchemaInstanceProps, V1ListProjDbSchemaInstanceRequestBody, } from './hooks/useV1ListProjDbSchemaInstanceMutation';
|
|
45
47
|
export { useV1ListProjDbSchemaInstanceMutation, v1ListProjDbSchemaInstance, } from './hooks/useV1ListProjDbSchemaInstanceMutation';
|
|
46
48
|
export type { V1ListProjDbSchemaErrorResponse, V1ListProjDbSchemaOkResponse, V1ListProjDbSchemaProps, V1ListProjDbSchemaQueryPathParams, V1ListProjDbSchemaQueryQueryParams, } from './hooks/useV1ListProjDbSchemaQuery';
|
|
@@ -19,6 +19,7 @@ export { useV1GetDeployedStateMutation, v1GetDeployedState, } from './hooks/useV
|
|
|
19
19
|
export { useV1GetProjDbSchemaInstanceQuery, v1GetProjDbSchemaInstance, } from './hooks/useV1GetProjDbSchemaInstanceQuery';
|
|
20
20
|
export { useV1GetProjDbSchemaQuery, v1GetProjDbSchema } from './hooks/useV1GetProjDbSchemaQuery';
|
|
21
21
|
export { useV1IngestLogsMutation, v1IngestLogs } from './hooks/useV1IngestLogsMutation';
|
|
22
|
+
export { useV1ListDatabaseSchemaQuery, v1ListDatabaseSchema, } from './hooks/useV1ListDatabaseSchemaQuery';
|
|
22
23
|
export { useV1ListProjDbSchemaInstanceMutation, v1ListProjDbSchemaInstance, } from './hooks/useV1ListProjDbSchemaInstanceMutation';
|
|
23
24
|
export { useV1ListProjDbSchemaQuery, v1ListProjDbSchema } from './hooks/useV1ListProjDbSchemaQuery';
|
|
24
25
|
export { useV1MigrationStateProjDbInstanceQuery, v1MigrationStateProjDbInstance, } from './hooks/useV1MigrationStateProjDbInstanceQuery';
|
|
@@ -54,6 +54,10 @@ export interface DbSchemaUpdateRequestRequestBody {
|
|
|
54
54
|
*
|
|
55
55
|
*/
|
|
56
56
|
name?: string;
|
|
57
|
+
/**
|
|
58
|
+
* This is the primary db instance identifier for advanced feature like LLM Authoring etc.
|
|
59
|
+
*/
|
|
60
|
+
primaryDbInstanceId?: string;
|
|
57
61
|
/**
|
|
58
62
|
* harness service corresponding to database schema
|
|
59
63
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Type of the plugin command to run
|
|
3
3
|
*/
|
|
4
|
-
export type Command = 'Clone' | 'Custom' | 'History' | 'ParentWrapper' | 'Rollback' | 'RollbackCount' | 'RollbackCountSQL' | 'RollbackSQL' | 'Status' | 'Tag' | 'Update' | 'UpdateSQL' | 'Validate';
|
|
4
|
+
export type Command = 'Clone' | 'Custom' | 'History' | 'MarkNextChangesetRan' | 'ParentWrapper' | 'Rollback' | 'RollbackCount' | 'RollbackCountSQL' | 'RollbackSQL' | 'Status' | 'Tag' | 'Update' | 'UpdateSQL' | 'Validate';
|
|
@@ -25,6 +25,14 @@ export interface DbSchemaOut {
|
|
|
25
25
|
* name of the database schema
|
|
26
26
|
*/
|
|
27
27
|
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* parentUniqueId for scope schema belongs to
|
|
30
|
+
*/
|
|
31
|
+
parentId: string;
|
|
32
|
+
/**
|
|
33
|
+
* Identifier for the primary dbInstance used for advanced feature like LLM Authoring etc.
|
|
34
|
+
*/
|
|
35
|
+
primaryDbInstanceId?: string;
|
|
28
36
|
schemaSourceType?: 'Artifactory' | 'Custom' | 'Git';
|
|
29
37
|
/**
|
|
30
38
|
* harness service corresponding to database schema
|
package/package.json
CHANGED