@harnessio/react-dbops-service-client 0.9.0 → 0.11.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.
@@ -0,0 +1,45 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { DbInstanceListResponseResponse } from '../responses/DbInstanceListResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { DbInstanceListRequestRequestBody } from '../requestBodies/DbInstanceListRequestRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface V2ListProjDbInstancesMutationPathParams {
8
+ org: string;
9
+ project: string;
10
+ }
11
+ export interface V2ListProjDbInstancesMutationQueryParams {
12
+ /**
13
+ * @format int64
14
+ * @default 0
15
+ */
16
+ page?: number;
17
+ /**
18
+ * @default 10
19
+ */
20
+ limit?: number;
21
+ search_term?: string;
22
+ /**
23
+ * @default "DESC"
24
+ */
25
+ order?: 'ASC' | 'DESC';
26
+ /**
27
+ * @default "created"
28
+ */
29
+ sort?: 'created' | 'name' | 'updated';
30
+ }
31
+ export interface V2ListProjDbInstancesMutationHeaderParams {
32
+ 'Harness-Account'?: string;
33
+ }
34
+ export type V2ListProjDbInstancesRequestBody = DbInstanceListRequestRequestBody;
35
+ export type V2ListProjDbInstancesOkResponse = ResponseWithPagination<DbInstanceListResponseResponse>;
36
+ export type V2ListProjDbInstancesErrorResponse = ErrorResponseResponse;
37
+ export interface V2ListProjDbInstancesProps extends V2ListProjDbInstancesMutationPathParams, Omit<FetcherOptions<V2ListProjDbInstancesMutationQueryParams, V2ListProjDbInstancesRequestBody, V2ListProjDbInstancesMutationHeaderParams>, 'url'> {
38
+ queryParams: V2ListProjDbInstancesMutationQueryParams;
39
+ body: V2ListProjDbInstancesRequestBody;
40
+ }
41
+ export declare function v2ListProjDbInstances(props: V2ListProjDbInstancesProps): Promise<V2ListProjDbInstancesOkResponse>;
42
+ /**
43
+ * List database instances
44
+ */
45
+ export declare function useV2ListProjDbInstancesMutation(options?: Omit<UseMutationOptions<V2ListProjDbInstancesOkResponse, V2ListProjDbInstancesErrorResponse, V2ListProjDbInstancesProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<V2ListProjDbInstancesOkResponse, import("..").Error, V2ListProjDbInstancesProps, unknown>;
@@ -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 { useMutation } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function v2ListProjDbInstances(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/dbinstancelist`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * List database instances
11
+ */
12
+ export function useV2ListProjDbInstancesMutation(options) {
13
+ return useMutation((mutateProps) => v2ListProjDbInstances(mutateProps), options);
14
+ }
@@ -0,0 +1,45 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { DbSchemaListResponseResponse } from '../responses/DbSchemaListResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { DbSchemaFilterRequestRequestBody } from '../requestBodies/DbSchemaFilterRequestRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface V2ListProjDbSchemaMutationPathParams {
8
+ org: string;
9
+ project: string;
10
+ }
11
+ export interface V2ListProjDbSchemaMutationQueryParams {
12
+ /**
13
+ * @format int64
14
+ * @default 0
15
+ */
16
+ page?: number;
17
+ /**
18
+ * @default 10
19
+ */
20
+ limit?: number;
21
+ search_term?: string;
22
+ /**
23
+ * @default "DESC"
24
+ */
25
+ order?: 'ASC' | 'DESC';
26
+ /**
27
+ * @default "created"
28
+ */
29
+ sort?: 'created' | 'name' | 'updated';
30
+ }
31
+ export interface V2ListProjDbSchemaMutationHeaderParams {
32
+ 'Harness-Account'?: string;
33
+ }
34
+ export type V2ListProjDbSchemaRequestBody = DbSchemaFilterRequestRequestBody;
35
+ export type V2ListProjDbSchemaOkResponse = ResponseWithPagination<DbSchemaListResponseResponse>;
36
+ export type V2ListProjDbSchemaErrorResponse = ErrorResponseResponse;
37
+ export interface V2ListProjDbSchemaProps extends V2ListProjDbSchemaMutationPathParams, Omit<FetcherOptions<V2ListProjDbSchemaMutationQueryParams, V2ListProjDbSchemaRequestBody, V2ListProjDbSchemaMutationHeaderParams>, 'url'> {
38
+ queryParams: V2ListProjDbSchemaMutationQueryParams;
39
+ body: V2ListProjDbSchemaRequestBody;
40
+ }
41
+ export declare function v2ListProjDbSchema(props: V2ListProjDbSchemaProps): Promise<V2ListProjDbSchemaOkResponse>;
42
+ /**
43
+ * List database schemas
44
+ */
45
+ export declare function useV2ListProjDbSchemaMutation(options?: Omit<UseMutationOptions<V2ListProjDbSchemaOkResponse, V2ListProjDbSchemaErrorResponse, V2ListProjDbSchemaProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<V2ListProjDbSchemaOkResponse, import("..").Error, V2ListProjDbSchemaProps, unknown>;
@@ -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 { useMutation } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function v2ListProjDbSchema(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/dbschemalist`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * List database schemas
11
+ */
12
+ export function useV2ListProjDbSchemaMutation(options) {
13
+ return useMutation((mutateProps) => v2ListProjDbSchema(mutateProps), options);
14
+ }
@@ -33,11 +33,17 @@ export type { V1UpdateProjDbSchemaInstanceErrorResponse, V1UpdateProjDbSchemaIns
33
33
  export { useV1UpdateProjDbSchemaInstanceMutation, v1UpdateProjDbSchemaInstance, } from './hooks/useV1UpdateProjDbSchemaInstanceMutation';
34
34
  export type { V1UpdateProjDbSchemaErrorResponse, V1UpdateProjDbSchemaMutationPathParams, V1UpdateProjDbSchemaOkResponse, V1UpdateProjDbSchemaProps, V1UpdateProjDbSchemaRequestBody, } from './hooks/useV1UpdateProjDbSchemaMutation';
35
35
  export { useV1UpdateProjDbSchemaMutation, v1UpdateProjDbSchema, } from './hooks/useV1UpdateProjDbSchemaMutation';
36
+ export type { V2ListProjDbInstancesErrorResponse, V2ListProjDbInstancesMutationPathParams, V2ListProjDbInstancesMutationQueryParams, V2ListProjDbInstancesOkResponse, V2ListProjDbInstancesProps, V2ListProjDbInstancesRequestBody, } from './hooks/useV2ListProjDbInstancesMutation';
37
+ export { useV2ListProjDbInstancesMutation, v2ListProjDbInstances, } from './hooks/useV2ListProjDbInstancesMutation';
38
+ export type { V2ListProjDbSchemaErrorResponse, V2ListProjDbSchemaMutationPathParams, V2ListProjDbSchemaMutationQueryParams, V2ListProjDbSchemaOkResponse, V2ListProjDbSchemaProps, V2ListProjDbSchemaRequestBody, } from './hooks/useV2ListProjDbSchemaMutation';
39
+ export { useV2ListProjDbSchemaMutation, v2ListProjDbSchema, } from './hooks/useV2ListProjDbSchemaMutation';
36
40
  export type { ConsumePluginRespRequestRequestBody } from './requestBodies/ConsumePluginRespRequestRequestBody';
37
41
  export type { DbInstanceCreateRequestRequestBody } from './requestBodies/DbInstanceCreateRequestRequestBody';
38
42
  export type { DbInstanceFilterRequestRequestBody } from './requestBodies/DbInstanceFilterRequestRequestBody';
43
+ export type { DbInstanceListRequestRequestBody } from './requestBodies/DbInstanceListRequestRequestBody';
39
44
  export type { DbInstanceUpdateRequestRequestBody } from './requestBodies/DbInstanceUpdateRequestRequestBody';
40
45
  export type { DbSchemaCreateRequestRequestBody } from './requestBodies/DbSchemaCreateRequestRequestBody';
46
+ export type { DbSchemaFilterRequestRequestBody } from './requestBodies/DbSchemaFilterRequestRequestBody';
41
47
  export type { DbSchemaUpdateRequestRequestBody } from './requestBodies/DbSchemaUpdateRequestRequestBody';
42
48
  export type { LogIngestRequestRequestBody } from './requestBodies/LogIngestRequestRequestBody';
43
49
  export type { MigrationStateGetRequestRequestBody } from './requestBodies/MigrationStateGetRequestRequestBody';
@@ -57,7 +63,9 @@ export type { Command } from './schemas/Command';
57
63
  export type { CommandExecutionStatus } from './schemas/CommandExecutionStatus';
58
64
  export type { DbInstanceFilterIn } from './schemas/DbInstanceFilterIn';
59
65
  export type { DbInstanceIn } from './schemas/DbInstanceIn';
66
+ export type { DbInstanceListInput } from './schemas/DbInstanceListInput';
60
67
  export type { DbInstanceOut } from './schemas/DbInstanceOut';
68
+ export type { DbSchemaFilterIn } from './schemas/DbSchemaFilterIn';
61
69
  export type { DbSchemaIn } from './schemas/DbSchemaIn';
62
70
  export type { DbSchemaOut } from './schemas/DbSchemaOut';
63
71
  export type { DbStepType } from './schemas/DbStepType';
@@ -15,3 +15,5 @@ export { useV1ListProjDbSchemaQuery, v1ListProjDbSchema } from './hooks/useV1Lis
15
15
  export { useV1MigrationStateProjDbSchemaMutation, v1MigrationStateProjDbSchema, } from './hooks/useV1MigrationStateProjDbSchemaMutation';
16
16
  export { useV1UpdateProjDbSchemaInstanceMutation, v1UpdateProjDbSchemaInstance, } from './hooks/useV1UpdateProjDbSchemaInstanceMutation';
17
17
  export { useV1UpdateProjDbSchemaMutation, v1UpdateProjDbSchema, } from './hooks/useV1UpdateProjDbSchemaMutation';
18
+ export { useV2ListProjDbInstancesMutation, v2ListProjDbInstances, } from './hooks/useV2ListProjDbInstancesMutation';
19
+ export { useV2ListProjDbSchemaMutation, v2ListProjDbSchema, } from './hooks/useV2ListProjDbSchemaMutation';
@@ -0,0 +1,2 @@
1
+ import type { DbInstanceListInput } from '../schemas/DbInstanceListInput';
2
+ export type DbInstanceListRequestRequestBody = DbInstanceListInput;
@@ -0,0 +1,2 @@
1
+ import type { DbSchemaFilterIn } from '../schemas/DbSchemaFilterIn';
2
+ export type DbSchemaFilterRequestRequestBody = DbSchemaFilterIn;
@@ -23,6 +23,10 @@ export interface PluginStepInputsRequestRequestBody {
23
23
  */
24
24
  dbSchema: string;
25
25
  directory?: string;
26
+ /**
27
+ * if changeLogFile is required or not for LiquibaseCommand step. If true, then dbops-clone will not happen and changeLog is not passed in the settings.
28
+ */
29
+ excludeChangeLogFile?: boolean;
26
30
  pipelineExecutionMetadata?: {
27
31
  pipeline: string;
28
32
  planExecutionId: string;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Input for filtering instances in list API
3
+ */
4
+ export interface DbInstanceListInput {
5
+ /**
6
+ * list of '-' separated values of schema identifier and instance identifiers
7
+ */
8
+ instanceFQNs?: string[];
9
+ /**
10
+ * list of schema identifiers to filter instances
11
+ */
12
+ schemaIdentifiers?: string[];
13
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -35,6 +35,8 @@ export interface DbInstanceOut {
35
35
  * name of the database instance
36
36
  */
37
37
  name: string;
38
+ schemaId?: string;
39
+ schemaIdentifier?: string;
38
40
  /**
39
41
  * tags attached to the database instance
40
42
  */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * List schema body input
3
+ */
4
+ export interface DbSchemaFilterIn {
5
+ /**
6
+ * list of schema identifiers
7
+ */
8
+ identifiers?: string[];
9
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -8,6 +8,9 @@ export interface MigrationStateInstance {
8
8
  * Identfier of the instance
9
9
  */
10
10
  instance: string;
11
+ pipeline: string;
12
+ planExecutionId: string;
13
+ stageExecutionId: string;
11
14
  status: ChangeSetDeploymentStatus;
12
15
  /**
13
16
  * Time of last Change Set Deployment/Rollback attempt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-dbops-service-client",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "Harness React DB Devops service client - DB Devops APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",