@harnessio/react-dbops-service-client 0.26.0 → 0.28.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,19 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
3
+ import type { DbSnapshotMetadataCreateRequestRequestBody } from '../requestBodies/DbSnapshotMetadataCreateRequestRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface PostV1DbopsDbSnapshotMetadataMutationHeaderParams {
7
+ 'Harness-Account'?: string;
8
+ }
9
+ export type PostV1DbopsDbSnapshotMetadataRequestBody = DbSnapshotMetadataCreateRequestRequestBody;
10
+ export type PostV1DbopsDbSnapshotMetadataOkResponse = ResponseWithPagination<unknown>;
11
+ export type PostV1DbopsDbSnapshotMetadataErrorResponse = ErrorResponseResponse;
12
+ export interface PostV1DbopsDbSnapshotMetadataProps extends Omit<FetcherOptions<unknown, PostV1DbopsDbSnapshotMetadataRequestBody, PostV1DbopsDbSnapshotMetadataMutationHeaderParams>, 'url'> {
13
+ body: PostV1DbopsDbSnapshotMetadataRequestBody;
14
+ }
15
+ export declare function postV1DbopsDbSnapshotMetadata(props: PostV1DbopsDbSnapshotMetadataProps): Promise<PostV1DbopsDbSnapshotMetadataOkResponse>;
16
+ /**
17
+ * Sending DB snapshot metadata from plugin to capture current state
18
+ */
19
+ export declare function usePostV1DbopsDbSnapshotMetadataMutation(options?: Omit<UseMutationOptions<PostV1DbopsDbSnapshotMetadataOkResponse, PostV1DbopsDbSnapshotMetadataErrorResponse, PostV1DbopsDbSnapshotMetadataProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PostV1DbopsDbSnapshotMetadataOkResponse, import("..").Error, PostV1DbopsDbSnapshotMetadataProps, 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 postV1DbopsDbSnapshotMetadata(props) {
7
+ return fetcher(Object.assign({ url: `/v1/dbops/db-metadata`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Sending DB snapshot metadata from plugin to capture current state
11
+ */
12
+ export function usePostV1DbopsDbSnapshotMetadataMutation(options) {
13
+ return useMutation((mutateProps) => postV1DbopsDbSnapshotMetadata(mutateProps), options);
14
+ }
@@ -26,6 +26,7 @@ export interface V1ListProjDbSchemaQueryQueryParams {
26
26
  * @default "DESC"
27
27
  */
28
28
  order?: 'ASC' | 'DESC';
29
+ migrationType?: 'Flyway' | 'Liquibase';
29
30
  }
30
31
  export interface V1ListProjDbSchemaQueryHeaderParams {
31
32
  'Harness-Account'?: string;
@@ -11,6 +11,8 @@ export type { GetV1CustomOperationsErrorResponse, GetV1CustomOperationsOkRespons
11
11
  export { getV1CustomOperations, useGetV1CustomOperationsMutation, } from './hooks/useGetV1CustomOperationsMutation';
12
12
  export type { GetV1SchemaInstanceMetadataErrorResponse, GetV1SchemaInstanceMetadataOkResponse, GetV1SchemaInstanceMetadataProps, GetV1SchemaInstanceMetadataRequestBody, } from './hooks/useGetV1SchemaInstanceMetadataMutation';
13
13
  export { getV1SchemaInstanceMetadata, useGetV1SchemaInstanceMetadataMutation, } from './hooks/useGetV1SchemaInstanceMetadataMutation';
14
+ export type { PostV1DbopsDbSnapshotMetadataErrorResponse, PostV1DbopsDbSnapshotMetadataOkResponse, PostV1DbopsDbSnapshotMetadataProps, PostV1DbopsDbSnapshotMetadataRequestBody, } from './hooks/usePostV1DbopsDbSnapshotMetadataMutation';
15
+ export { postV1DbopsDbSnapshotMetadata, usePostV1DbopsDbSnapshotMetadataMutation, } from './hooks/usePostV1DbopsDbSnapshotMetadataMutation';
14
16
  export type { V1ChangesetYamlProjDbInstanceErrorResponse, V1ChangesetYamlProjDbInstanceOkResponse, V1ChangesetYamlProjDbInstanceProps, V1ChangesetYamlProjDbInstanceQueryPathParams, V1ChangesetYamlProjDbInstanceQueryQueryParams, } from './hooks/useV1ChangesetYamlProjDbInstanceQuery';
15
17
  export { useV1ChangesetYamlProjDbInstanceQuery, v1ChangesetYamlProjDbInstance, } from './hooks/useV1ChangesetYamlProjDbInstanceQuery';
16
18
  export type { V1ChangesetmetadataProjDbInstanceErrorResponse, V1ChangesetmetadataProjDbInstanceOkResponse, V1ChangesetmetadataProjDbInstanceProps, V1ChangesetmetadataProjDbInstanceQueryPathParams, V1ChangesetmetadataProjDbInstanceQueryQueryParams, } from './hooks/useV1ChangesetmetadataProjDbInstanceQuery';
@@ -79,6 +81,7 @@ export type { DbInstanceUpdateRequestRequestBody } from './requestBodies/DbInsta
79
81
  export type { DbSchemaCreateRequestRequestBody } from './requestBodies/DbSchemaCreateRequestRequestBody';
80
82
  export type { DbSchemaFilterRequestRequestBody } from './requestBodies/DbSchemaFilterRequestRequestBody';
81
83
  export type { DbSchemaUpdateRequestRequestBody } from './requestBodies/DbSchemaUpdateRequestRequestBody';
84
+ export type { DbSnapshotMetadataCreateRequestRequestBody } from './requestBodies/DbSnapshotMetadataCreateRequestRequestBody';
82
85
  export type { ExecutionConfigUpdateRequestRequestBody } from './requestBodies/ExecutionConfigUpdateRequestRequestBody';
83
86
  export type { FailureInterruptRequestRequestBody } from './requestBodies/FailureInterruptRequestRequestBody';
84
87
  export type { FetchSqlStatementRequestRequestBody } from './requestBodies/FetchSqlStatementRequestRequestBody';
@@ -122,6 +125,7 @@ export type { DbSchemaFilterIn } from './schemas/DbSchemaFilterIn';
122
125
  export type { DbSchemaIn } from './schemas/DbSchemaIn';
123
126
  export type { DbSchemaOut } from './schemas/DbSchemaOut';
124
127
  export type { DbSchemaType } from './schemas/DbSchemaType';
128
+ export type { DbSnapshotMetadataIn } from './schemas/DbSnapshotMetadataIn';
125
129
  export type { DbStepType } from './schemas/DbStepType';
126
130
  export type { DeployedChangeSets } from './schemas/DeployedChangeSets';
127
131
  export type { DeployedChangesetSqlOutput } from './schemas/DeployedChangesetSqlOutput';
@@ -4,6 +4,7 @@ export { consumeV1StepPluginResponse, useConsumeV1StepPluginResponseMutation, }
4
4
  export { createV1StepPluginInputs, useCreateV1StepPluginInputsMutation, } from './hooks/useCreateV1StepPluginInputsMutation';
5
5
  export { getV1CustomOperations, useGetV1CustomOperationsMutation, } from './hooks/useGetV1CustomOperationsMutation';
6
6
  export { getV1SchemaInstanceMetadata, useGetV1SchemaInstanceMetadataMutation, } from './hooks/useGetV1SchemaInstanceMetadataMutation';
7
+ export { postV1DbopsDbSnapshotMetadata, usePostV1DbopsDbSnapshotMetadataMutation, } from './hooks/usePostV1DbopsDbSnapshotMetadataMutation';
7
8
  export { useV1ChangesetYamlProjDbInstanceQuery, v1ChangesetYamlProjDbInstance, } from './hooks/useV1ChangesetYamlProjDbInstanceQuery';
8
9
  export { useV1ChangesetmetadataProjDbInstanceQuery, v1ChangesetmetadataProjDbInstance, } from './hooks/useV1ChangesetmetadataProjDbInstanceQuery';
9
10
  export { useV1CreateProjDbSchemaInstanceMutation, v1CreateProjDbSchemaInstance, } from './hooks/useV1CreateProjDbSchemaInstanceMutation';
@@ -11,17 +11,17 @@ export interface DbInstanceUpdateRequestRequestBody {
11
11
  * Liquibase context
12
12
  */
13
13
  context?: string;
14
- /**
15
- * properties to substitute in liquibase changelog
16
- */
17
- liquibaseSubstituteProperties?: {
18
- [key: string]: string;
19
- };
20
14
  /**
21
15
  * name of the database instance
22
16
  *
23
17
  */
24
18
  name?: string;
19
+ /**
20
+ * Placeholder replacement in migration scripts.
21
+ */
22
+ substituteProperties?: {
23
+ [key: string]: string;
24
+ };
25
25
  /**
26
26
  * Database instance tags
27
27
  */
@@ -0,0 +1,2 @@
1
+ import type { DbSnapshotMetadataIn } from '../schemas/DbSnapshotMetadataIn';
2
+ export type DbSnapshotMetadataCreateRequestRequestBody = DbSnapshotMetadataIn[];
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Type of the plugin command to run
3
3
  */
4
- export type Command = 'Clone' | 'Custom' | 'DBOPSRollbackCountSQL' | 'DBOPSRollbackSQL' | 'DBOPSUpdateSQL' | 'History' | 'MarkNextChangesetRan' | 'ParentWrapper' | 'Rollback' | 'RollbackCount' | 'RollbackCountSQL' | 'RollbackSQL' | 'Status' | 'Tag' | 'Update' | 'UpdateSQL' | 'Validate';
4
+ export type Command = 'Clone' | 'Custom' | 'DBOPSRollbackCountSQL' | 'DBOPSRollbackSQL' | 'DBOPSUpdateSQL' | 'History' | 'MarkNextChangesetRan' | 'ParentWrapper' | 'Rollback' | 'RollbackCount' | 'RollbackCountSQL' | 'RollbackSQL' | 'Snapshot' | 'Status' | 'Tag' | 'Update' | 'UpdateSQL' | 'Validate';
@@ -21,16 +21,16 @@ export interface DbInstanceIn {
21
21
  * identifier of the database instance
22
22
  */
23
23
  identifier: string;
24
- /**
25
- * properties to substitute in liquibase changelog
26
- */
27
- liquibaseSubstituteProperties?: {
28
- [key: string]: string;
29
- };
30
24
  /**
31
25
  * name of the database instance
32
26
  */
33
27
  name?: string;
28
+ /**
29
+ * Placeholder replacement in migration scripts.
30
+ */
31
+ substituteProperties?: {
32
+ [key: string]: string;
33
+ };
34
34
  /**
35
35
  * tags attached to the database instance
36
36
  */
@@ -31,18 +31,18 @@ export interface DbInstanceOut {
31
31
  * Tag on last deployed changeSet
32
32
  */
33
33
  lastDeployedChangeSetTag: string;
34
- /**
35
- * properties to substitute in liquibase changelog
36
- */
37
- liquibaseSubstituteProperties?: {
38
- [key: string]: string;
39
- };
40
34
  /**
41
35
  * name of the database instance
42
36
  */
43
37
  name: string;
44
38
  schemaId?: string;
45
39
  schemaIdentifier?: string;
40
+ /**
41
+ * Placeholder replacement in migration scripts.
42
+ */
43
+ substituteProperties?: {
44
+ [key: string]: string;
45
+ };
46
46
  /**
47
47
  * tags attached to the database instance
48
48
  */
@@ -0,0 +1,25 @@
1
+ import type { Command } from '../schemas/Command';
2
+ export interface DbSnapshotMetadataIn {
3
+ command: string;
4
+ harnessCommand: Command;
5
+ instanceIdentifier: string;
6
+ /**
7
+ * Name for the object, example - Customers for table objectType
8
+ */
9
+ objectName: string;
10
+ /**
11
+ * type for the object for the metadata, example- Table
12
+ */
13
+ objectType: string;
14
+ /**
15
+ * json value of the object
16
+ */
17
+ objectValue: string;
18
+ parentId: string;
19
+ pipelineExecutionId: string;
20
+ pipelineIdentifier: string;
21
+ schemaIdentifier: string;
22
+ snapshotId: string;
23
+ snapshotObjectId?: string;
24
+ stageExecutionId: string;
25
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-dbops-service-client",
3
- "version": "0.26.0",
3
+ "version": "0.28.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",