@harnessio/react-dbops-service-client 0.15.0 → 0.17.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,38 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ChangeSetDeploymentYamlResponseResponse } from '../responses/ChangeSetDeploymentYamlResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ChangeSetDeploymentYamlGetRequestRequestBody } from '../requestBodies/ChangeSetDeploymentYamlGetRequestRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface V1ChangesetYamlProjDbInstanceMutationPathParams {
8
+ org: string;
9
+ project: string;
10
+ dbschema: string;
11
+ dbinstance: string;
12
+ }
13
+ export interface V1ChangesetYamlProjDbInstanceMutationQueryParams {
14
+ /**
15
+ * @format int64
16
+ * @default 0
17
+ */
18
+ page?: number;
19
+ /**
20
+ * @default 10
21
+ */
22
+ limit?: number;
23
+ }
24
+ export interface V1ChangesetYamlProjDbInstanceMutationHeaderParams {
25
+ 'Harness-Account'?: string;
26
+ }
27
+ export type V1ChangesetYamlProjDbInstanceRequestBody = ChangeSetDeploymentYamlGetRequestRequestBody;
28
+ export type V1ChangesetYamlProjDbInstanceOkResponse = ResponseWithPagination<ChangeSetDeploymentYamlResponseResponse>;
29
+ export type V1ChangesetYamlProjDbInstanceErrorResponse = ErrorResponseResponse;
30
+ export interface V1ChangesetYamlProjDbInstanceProps extends V1ChangesetYamlProjDbInstanceMutationPathParams, Omit<FetcherOptions<V1ChangesetYamlProjDbInstanceMutationQueryParams, V1ChangesetYamlProjDbInstanceRequestBody, V1ChangesetYamlProjDbInstanceMutationHeaderParams>, 'url'> {
31
+ queryParams: V1ChangesetYamlProjDbInstanceMutationQueryParams;
32
+ body: V1ChangesetYamlProjDbInstanceRequestBody;
33
+ }
34
+ export declare function v1ChangesetYamlProjDbInstance(props: V1ChangesetYamlProjDbInstanceProps): Promise<V1ChangesetYamlProjDbInstanceOkResponse>;
35
+ /**
36
+ * ChangeSet deployment yaml for an instance
37
+ */
38
+ export declare function useV1ChangesetYamlProjDbInstanceMutation(options?: Omit<UseMutationOptions<V1ChangesetYamlProjDbInstanceOkResponse, V1ChangesetYamlProjDbInstanceErrorResponse, V1ChangesetYamlProjDbInstanceProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<V1ChangesetYamlProjDbInstanceOkResponse, import("..").Error, V1ChangesetYamlProjDbInstanceProps, 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 v1ChangesetYamlProjDbInstance(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/dbschema/${props.dbschema}/dbinstance/${props.dbinstance}/changeset/yaml`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * ChangeSet deployment yaml for an instance
11
+ */
12
+ export function useV1ChangesetYamlProjDbInstanceMutation(options) {
13
+ return useMutation((mutateProps) => v1ChangesetYamlProjDbInstance(mutateProps), options);
14
+ }
@@ -3,6 +3,8 @@ export type { ConsumeV1StepPluginResponseErrorResponse, ConsumeV1StepPluginRespo
3
3
  export { consumeV1StepPluginResponse, useConsumeV1StepPluginResponseMutation, } from './hooks/useConsumeV1StepPluginResponseMutation';
4
4
  export type { CreateV1StepPluginInputsErrorResponse, CreateV1StepPluginInputsOkResponse, CreateV1StepPluginInputsProps, CreateV1StepPluginInputsRequestBody, } from './hooks/useCreateV1StepPluginInputsMutation';
5
5
  export { createV1StepPluginInputs, useCreateV1StepPluginInputsMutation, } from './hooks/useCreateV1StepPluginInputsMutation';
6
+ export type { V1ChangesetYamlProjDbInstanceErrorResponse, V1ChangesetYamlProjDbInstanceMutationPathParams, V1ChangesetYamlProjDbInstanceMutationQueryParams, V1ChangesetYamlProjDbInstanceOkResponse, V1ChangesetYamlProjDbInstanceProps, V1ChangesetYamlProjDbInstanceRequestBody, } from './hooks/useV1ChangesetYamlProjDbInstanceMutation';
7
+ export { useV1ChangesetYamlProjDbInstanceMutation, v1ChangesetYamlProjDbInstance, } from './hooks/useV1ChangesetYamlProjDbInstanceMutation';
6
8
  export type { V1CreateProjDbSchemaInstanceErrorResponse, V1CreateProjDbSchemaInstanceMutationPathParams, V1CreateProjDbSchemaInstanceOkResponse, V1CreateProjDbSchemaInstanceProps, V1CreateProjDbSchemaInstanceRequestBody, } from './hooks/useV1CreateProjDbSchemaInstanceMutation';
7
9
  export { useV1CreateProjDbSchemaInstanceMutation, v1CreateProjDbSchemaInstance, } from './hooks/useV1CreateProjDbSchemaInstanceMutation';
8
10
  export type { V1CreateProjDbSchemaErrorResponse, V1CreateProjDbSchemaMutationPathParams, V1CreateProjDbSchemaOkResponse, V1CreateProjDbSchemaProps, V1CreateProjDbSchemaRequestBody, } from './hooks/useV1CreateProjDbSchemaMutation';
@@ -49,6 +51,7 @@ export type { V2ListProjDbInstancesErrorResponse, V2ListProjDbInstancesMutationP
49
51
  export { useV2ListProjDbInstancesMutation, v2ListProjDbInstances, } from './hooks/useV2ListProjDbInstancesMutation';
50
52
  export type { V2ListProjDbSchemaErrorResponse, V2ListProjDbSchemaMutationPathParams, V2ListProjDbSchemaMutationQueryParams, V2ListProjDbSchemaOkResponse, V2ListProjDbSchemaProps, V2ListProjDbSchemaRequestBody, } from './hooks/useV2ListProjDbSchemaMutation';
51
53
  export { useV2ListProjDbSchemaMutation, v2ListProjDbSchema, } from './hooks/useV2ListProjDbSchemaMutation';
54
+ export type { ChangeSetDeploymentYamlGetRequestRequestBody } from './requestBodies/ChangeSetDeploymentYamlGetRequestRequestBody';
52
55
  export type { ConsumePluginRespRequestRequestBody } from './requestBodies/ConsumePluginRespRequestRequestBody';
53
56
  export type { DbInstanceCreateRequestRequestBody } from './requestBodies/DbInstanceCreateRequestRequestBody';
54
57
  export type { DbInstanceFilterRequestRequestBody } from './requestBodies/DbInstanceFilterRequestRequestBody';
@@ -61,6 +64,7 @@ export type { ExecutionConfigUpdateRequestRequestBody } from './requestBodies/Ex
61
64
  export type { LogIngestRequestRequestBody } from './requestBodies/LogIngestRequestRequestBody';
62
65
  export type { MigrationStateGetRequestRequestBody } from './requestBodies/MigrationStateGetRequestRequestBody';
63
66
  export type { PluginStepInputsRequestRequestBody } from './requestBodies/PluginStepInputsRequestRequestBody';
67
+ export type { ChangeSetDeploymentYamlResponseResponse } from './responses/ChangeSetDeploymentYamlResponseResponse';
64
68
  export type { DbInstanceListResponseResponse } from './responses/DbInstanceListResponseResponse';
65
69
  export type { DbInstanceResponseResponse } from './responses/DbInstanceResponseResponse';
66
70
  export type { DbSchemaListResponseResponse } from './responses/DbSchemaListResponseResponse';
@@ -75,6 +79,8 @@ export type { ParsedLogResponseResponse } from './responses/ParsedLogResponseRes
75
79
  export type { PluginInputsResponseResponse } from './responses/PluginInputsResponseResponse';
76
80
  export type { ChangeLogScript } from './schemas/ChangeLogScript';
77
81
  export type { ChangeSetDeploymentStatus } from './schemas/ChangeSetDeploymentStatus';
82
+ export type { ChangeSetDeploymentYamlInput } from './schemas/ChangeSetDeploymentYamlInput';
83
+ export type { ChangeSetDeploymentYamlOutput } from './schemas/ChangeSetDeploymentYamlOutput';
78
84
  export type { Changelog } from './schemas/Changelog';
79
85
  export type { Command } from './schemas/Command';
80
86
  export type { CommandExecutionStatus } from './schemas/CommandExecutionStatus';
@@ -1,5 +1,6 @@
1
1
  export { consumeV1StepPluginResponse, useConsumeV1StepPluginResponseMutation, } from './hooks/useConsumeV1StepPluginResponseMutation';
2
2
  export { createV1StepPluginInputs, useCreateV1StepPluginInputsMutation, } from './hooks/useCreateV1StepPluginInputsMutation';
3
+ export { useV1ChangesetYamlProjDbInstanceMutation, v1ChangesetYamlProjDbInstance, } from './hooks/useV1ChangesetYamlProjDbInstanceMutation';
3
4
  export { useV1CreateProjDbSchemaInstanceMutation, v1CreateProjDbSchemaInstance, } from './hooks/useV1CreateProjDbSchemaInstanceMutation';
4
5
  export { useV1CreateProjDbSchemaMutation, v1CreateProjDbSchema, } from './hooks/useV1CreateProjDbSchemaMutation';
5
6
  export { useV1DeleteExecutionConfigMutation, v1DeleteExecutionConfig, } from './hooks/useV1DeleteExecutionConfigMutation';
@@ -0,0 +1,2 @@
1
+ import type { ChangeSetDeploymentYamlInput } from '../schemas/ChangeSetDeploymentYamlInput';
2
+ export type ChangeSetDeploymentYamlGetRequestRequestBody = ChangeSetDeploymentYamlInput;
@@ -2,6 +2,10 @@ import type { Command } from '../schemas/Command';
2
2
  import type { CommandExecutionStatus } from '../schemas/CommandExecutionStatus';
3
3
  export interface ConsumePluginRespRequestRequestBody {
4
4
  command: Command;
5
+ /**
6
+ * compressed step output
7
+ */
8
+ compressedStepOutput?: string;
5
9
  /**
6
10
  * Data associated with command execution
7
11
  */
@@ -0,0 +1,2 @@
1
+ import type { ChangeSetDeploymentYamlOutput } from '../schemas/ChangeSetDeploymentYamlOutput';
2
+ export type ChangeSetDeploymentYamlResponseResponse = ChangeSetDeploymentYamlOutput;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Get changeSet deployment yaml request input
3
+ */
4
+ export interface ChangeSetDeploymentYamlInput {
5
+ /**
6
+ * fqn of changeSet deployed
7
+ */
8
+ changeSetFQN: string;
9
+ /**
10
+ * identifier of the db instance
11
+ */
12
+ instanceIdentifier: string;
13
+ /**
14
+ * identifer of the db schema
15
+ */
16
+ schemaIdentifier: string;
17
+ }
@@ -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 {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * ChangeSet deployment yaml info for an instance
3
+ */
4
+ export interface ChangeSetDeploymentYamlOutput {
5
+ yaml?: string;
6
+ }
@@ -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 {};
@@ -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' | 'RollbackSQL' | 'Tag' | 'Update' | 'UpdateSQL' | 'Validate';
4
+ export type Command = 'Clone' | 'Custom' | 'History' | 'ParentWrapper' | 'Rollback' | 'RollbackSQL' | 'Status' | 'Tag' | 'Update' | 'UpdateSQL' | 'Validate';
@@ -8,6 +8,10 @@ export interface DeployedStateOutput {
8
8
  author: string;
9
9
  changeSetId: string;
10
10
  command: Command;
11
+ /**
12
+ * comment in changeset definition
13
+ */
14
+ comment?: string;
11
15
  /**
12
16
  * @format int64
13
17
  */
@@ -17,6 +21,10 @@ export interface DeployedStateOutput {
17
21
  */
18
22
  deployedInCurrentExecution: boolean;
19
23
  fileName: string;
24
+ /**
25
+ * label in changeset definition
26
+ */
27
+ label?: string;
20
28
  metadata: ExecutionMetadata;
21
29
  status: CommandExecutionStatus;
22
30
  tag?: string;
@@ -21,6 +21,9 @@ export interface InstanceMigrationStateChangeSet {
21
21
  * label defined in changeSet
22
22
  */
23
23
  label?: string;
24
+ pipeline: string;
25
+ planExecutionId: string;
26
+ stageExecutionId: string;
24
27
  status: ChangeSetDeploymentStatus;
25
28
  tag?: string;
26
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-dbops-service-client",
3
- "version": "0.15.0",
3
+ "version": "0.17.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",