@harnessio/react-dbops-service-client 0.6.0 → 0.7.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/useV1GetDeployedStateMutation.d.ts +38 -0
- package/dist/dbops-service/src/services/hooks/useV1GetDeployedStateMutation.js +14 -0
- package/dist/dbops-service/src/services/index.d.ts +6 -0
- package/dist/dbops-service/src/services/index.js +1 -0
- package/dist/dbops-service/src/services/schemas/DbStepType.d.ts +1 -0
- package/dist/dbops-service/src/services/schemas/DbStepType.js +4 -0
- package/dist/dbops-service/src/services/schemas/DeployedStateInput.d.ts +13 -0
- package/dist/dbops-service/src/services/schemas/DeployedStateInput.js +1 -0
- package/dist/dbops-service/src/services/schemas/DeployedStateOutput.d.ts +23 -0
- package/dist/dbops-service/src/services/schemas/DeployedStateOutput.js +1 -0
- package/dist/dbops-service/src/services/schemas/ExecutionMetadata.d.ts +8 -0
- package/dist/dbops-service/src/services/schemas/ExecutionMetadata.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { DeployedStateOutput } from '../schemas/DeployedStateOutput';
|
|
3
|
+
import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
|
|
4
|
+
import type { DeployedStateInput } from '../schemas/DeployedStateInput';
|
|
5
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
+
export interface V1GetDeployedStateMutationPathParams {
|
|
8
|
+
org: string;
|
|
9
|
+
project: string;
|
|
10
|
+
dbschema: string;
|
|
11
|
+
dbinstance: string;
|
|
12
|
+
}
|
|
13
|
+
export interface V1GetDeployedStateMutationQueryParams {
|
|
14
|
+
/**
|
|
15
|
+
* @format int64
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
page?: number;
|
|
19
|
+
/**
|
|
20
|
+
* @default 10
|
|
21
|
+
*/
|
|
22
|
+
limit?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface V1GetDeployedStateMutationHeaderParams {
|
|
25
|
+
'Harness-Account'?: string;
|
|
26
|
+
}
|
|
27
|
+
export type V1GetDeployedStateRequestBody = DeployedStateInput;
|
|
28
|
+
export type V1GetDeployedStateOkResponse = ResponseWithPagination<DeployedStateOutput[]>;
|
|
29
|
+
export type V1GetDeployedStateErrorResponse = ErrorResponseResponse;
|
|
30
|
+
export interface V1GetDeployedStateProps extends V1GetDeployedStateMutationPathParams, Omit<FetcherOptions<V1GetDeployedStateMutationQueryParams, V1GetDeployedStateRequestBody, V1GetDeployedStateMutationHeaderParams>, 'url'> {
|
|
31
|
+
queryParams: V1GetDeployedStateMutationQueryParams;
|
|
32
|
+
body: V1GetDeployedStateRequestBody;
|
|
33
|
+
}
|
|
34
|
+
export declare function v1GetDeployedState(props: V1GetDeployedStateProps): Promise<V1GetDeployedStateOkResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Status of changeset deployment as part of execution with comparison to earlier state.
|
|
37
|
+
*/
|
|
38
|
+
export declare function useV1GetDeployedStateMutation(options?: Omit<UseMutationOptions<V1GetDeployedStateOkResponse, V1GetDeployedStateErrorResponse, V1GetDeployedStateProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<V1GetDeployedStateOkResponse, import("..").Error, V1GetDeployedStateProps, 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 v1GetDeployedState(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/dbschema/${props.dbschema}/instance/${props.dbinstance}/deployedState`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Status of changeset deployment as part of execution with comparison to earlier state.
|
|
11
|
+
*/
|
|
12
|
+
export function useV1GetDeployedStateMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => v1GetDeployedState(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -15,6 +15,8 @@ export type { V1GetDbOverviewErrorResponse, V1GetDbOverviewOkResponse, V1GetDbOv
|
|
|
15
15
|
export { useV1GetDbOverviewQuery, v1GetDbOverview } from './hooks/useV1GetDbOverviewQuery';
|
|
16
16
|
export type { V1GetDbinstanceLogErrorResponse, V1GetDbinstanceLogOkResponse, V1GetDbinstanceLogProps, V1GetDbinstanceLogQueryPathParams, } from './hooks/useV1GetDbinstanceLogQuery';
|
|
17
17
|
export { useV1GetDbinstanceLogQuery, v1GetDbinstanceLog } from './hooks/useV1GetDbinstanceLogQuery';
|
|
18
|
+
export type { V1GetDeployedStateErrorResponse, V1GetDeployedStateMutationPathParams, V1GetDeployedStateMutationQueryParams, V1GetDeployedStateOkResponse, V1GetDeployedStateProps, V1GetDeployedStateRequestBody, } from './hooks/useV1GetDeployedStateMutation';
|
|
19
|
+
export { useV1GetDeployedStateMutation, v1GetDeployedState, } from './hooks/useV1GetDeployedStateMutation';
|
|
18
20
|
export type { V1GetProjDbSchemaInstanceErrorResponse, V1GetProjDbSchemaInstanceOkResponse, V1GetProjDbSchemaInstanceProps, V1GetProjDbSchemaInstanceQueryPathParams, } from './hooks/useV1GetProjDbSchemaInstanceQuery';
|
|
19
21
|
export { useV1GetProjDbSchemaInstanceQuery, v1GetProjDbSchemaInstance, } from './hooks/useV1GetProjDbSchemaInstanceQuery';
|
|
20
22
|
export type { V1GetProjDbSchemaErrorResponse, V1GetProjDbSchemaOkResponse, V1GetProjDbSchemaProps, V1GetProjDbSchemaQueryPathParams, } from './hooks/useV1GetProjDbSchemaQuery';
|
|
@@ -58,7 +60,11 @@ export type { DbInstanceIn } from './schemas/DbInstanceIn';
|
|
|
58
60
|
export type { DbInstanceOut } from './schemas/DbInstanceOut';
|
|
59
61
|
export type { DbSchemaIn } from './schemas/DbSchemaIn';
|
|
60
62
|
export type { DbSchemaOut } from './schemas/DbSchemaOut';
|
|
63
|
+
export type { DbStepType } from './schemas/DbStepType';
|
|
64
|
+
export type { DeployedStateInput } from './schemas/DeployedStateInput';
|
|
65
|
+
export type { DeployedStateOutput } from './schemas/DeployedStateOutput';
|
|
61
66
|
export type { Error } from './schemas/Error';
|
|
67
|
+
export type { ExecutionMetadata } from './schemas/ExecutionMetadata';
|
|
62
68
|
export type { InstanceDetail } from './schemas/InstanceDetail';
|
|
63
69
|
export type { MigrationStateChangeSet } from './schemas/MigrationStateChangeSet';
|
|
64
70
|
export type { MigrationStateIn } from './schemas/MigrationStateIn';
|
|
@@ -6,6 +6,7 @@ export { useV1DeleteProjDbSchemaInstanceMutation, v1DeleteProjDbSchemaInstance,
|
|
|
6
6
|
export { useV1DeleteProjDbSchemaMutation, v1DeleteProjDbSchema, } from './hooks/useV1DeleteProjDbSchemaMutation';
|
|
7
7
|
export { useV1GetDbOverviewQuery, v1GetDbOverview } from './hooks/useV1GetDbOverviewQuery';
|
|
8
8
|
export { useV1GetDbinstanceLogQuery, v1GetDbinstanceLog } from './hooks/useV1GetDbinstanceLogQuery';
|
|
9
|
+
export { useV1GetDeployedStateMutation, v1GetDeployedState, } from './hooks/useV1GetDeployedStateMutation';
|
|
9
10
|
export { useV1GetProjDbSchemaInstanceQuery, v1GetProjDbSchemaInstance, } from './hooks/useV1GetProjDbSchemaInstanceQuery';
|
|
10
11
|
export { useV1GetProjDbSchemaQuery, v1GetProjDbSchema } from './hooks/useV1GetProjDbSchemaQuery';
|
|
11
12
|
export { useV1IngestLogsMutation, v1IngestLogs } from './hooks/useV1IngestLogsMutation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DbStepType = 'DBSchemaApply';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DbStepType } from '../schemas/DbStepType';
|
|
2
|
+
/**
|
|
3
|
+
* Input for getting execution deployed states
|
|
4
|
+
*/
|
|
5
|
+
export interface DeployedStateInput {
|
|
6
|
+
/**
|
|
7
|
+
* identifier of the pipeline
|
|
8
|
+
*/
|
|
9
|
+
pipeline: string;
|
|
10
|
+
planExecutionId: string;
|
|
11
|
+
stageExecutionId: string;
|
|
12
|
+
stepType: DbStepType;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Command } from '../schemas/Command';
|
|
2
|
+
import type { ExecutionMetadata } from '../schemas/ExecutionMetadata';
|
|
3
|
+
import type { CommandExecutionStatus } from '../schemas/CommandExecutionStatus';
|
|
4
|
+
/**
|
|
5
|
+
* The status of changeset deployment
|
|
6
|
+
*/
|
|
7
|
+
export interface DeployedStateOutput {
|
|
8
|
+
author: string;
|
|
9
|
+
changeSetId: string;
|
|
10
|
+
command: Command;
|
|
11
|
+
/**
|
|
12
|
+
* @format int64
|
|
13
|
+
*/
|
|
14
|
+
deployedAt?: number;
|
|
15
|
+
/**
|
|
16
|
+
* if changeset run as part of current step execution
|
|
17
|
+
*/
|
|
18
|
+
deployedInCurrentExecution: boolean;
|
|
19
|
+
fileName: string;
|
|
20
|
+
metadata: ExecutionMetadata;
|
|
21
|
+
status: CommandExecutionStatus;
|
|
22
|
+
tag?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED