@harnessio/react-dbops-service-client 0.3.0 → 0.4.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,25 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { CommandStatusOut } from '../schemas/CommandStatusOut';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { CommandStatusIn } from '../schemas/CommandStatusIn';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface V1GetCommandStatusMutationPathParams {
8
+ org: string;
9
+ project: string;
10
+ pipeline: string;
11
+ }
12
+ export interface V1GetCommandStatusMutationHeaderParams {
13
+ 'Harness-Account'?: string;
14
+ }
15
+ export type V1GetCommandStatusRequestBody = CommandStatusIn;
16
+ export type V1GetCommandStatusOkResponse = ResponseWithPagination<CommandStatusOut[]>;
17
+ export type V1GetCommandStatusErrorResponse = ErrorResponseResponse;
18
+ export interface V1GetCommandStatusProps extends V1GetCommandStatusMutationPathParams, Omit<FetcherOptions<unknown, V1GetCommandStatusRequestBody, V1GetCommandStatusMutationHeaderParams>, 'url'> {
19
+ body: V1GetCommandStatusRequestBody;
20
+ }
21
+ export declare function v1GetCommandStatus(props: V1GetCommandStatusProps): Promise<V1GetCommandStatusOkResponse>;
22
+ /**
23
+ * Status of changeset deployment as part of execution with comparison to earlier state.
24
+ */
25
+ export declare function useV1GetCommandStatusMutation(options?: Omit<UseMutationOptions<V1GetCommandStatusOkResponse, V1GetCommandStatusErrorResponse, V1GetCommandStatusProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<V1GetCommandStatusOkResponse, import("..").Error, V1GetCommandStatusProps, unknown>;
@@ -1,14 +1,14 @@
1
1
  /* eslint-disable */
2
2
  // This code is autogenerated using @harnessio/oats-cli.
3
3
  // Please do not modify this code directly.
4
- import { useQuery } from '@tanstack/react-query';
4
+ import { useMutation } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function v1GetCommandStatus(props) {
7
- return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/pipeline/${props.pipeline}/status`, method: 'GET' }, props));
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/pipeline/${props.pipeline}/deployedState`, method: 'POST' }, props));
8
8
  }
9
9
  /**
10
10
  * Status of changeset deployment as part of execution with comparison to earlier state.
11
11
  */
12
- export function useV1GetCommandStatusQuery(props, options) {
13
- return useQuery(['v1-get-command-status', props.org, props.project, props.pipeline], ({ signal }) => v1GetCommandStatus(Object.assign(Object.assign({}, props), { signal })), options);
12
+ export function useV1GetCommandStatusMutation(options) {
13
+ return useMutation((mutateProps) => v1GetCommandStatus(mutateProps), options);
14
14
  }
@@ -11,8 +11,8 @@ export type { V1DeleteProjDbSchemaInstanceErrorResponse, V1DeleteProjDbSchemaIns
11
11
  export { useV1DeleteProjDbSchemaInstanceMutation, v1DeleteProjDbSchemaInstance, } from './hooks/useV1DeleteProjDbSchemaInstanceMutation';
12
12
  export type { V1DeleteProjDbSchemaErrorResponse, V1DeleteProjDbSchemaMutationPathParams, V1DeleteProjDbSchemaOkResponse, V1DeleteProjDbSchemaProps, } from './hooks/useV1DeleteProjDbSchemaMutation';
13
13
  export { useV1DeleteProjDbSchemaMutation, v1DeleteProjDbSchema, } from './hooks/useV1DeleteProjDbSchemaMutation';
14
- export type { V1GetCommandStatusErrorResponse, V1GetCommandStatusOkResponse, V1GetCommandStatusProps, V1GetCommandStatusQueryPathParams, } from './hooks/useV1GetCommandStatusQuery';
15
- export { useV1GetCommandStatusQuery, v1GetCommandStatus } from './hooks/useV1GetCommandStatusQuery';
14
+ export type { V1GetCommandStatusErrorResponse, V1GetCommandStatusMutationPathParams, V1GetCommandStatusOkResponse, V1GetCommandStatusProps, V1GetCommandStatusRequestBody, } from './hooks/useV1GetCommandStatusMutation';
15
+ export { useV1GetCommandStatusMutation, v1GetCommandStatus, } from './hooks/useV1GetCommandStatusMutation';
16
16
  export type { V1GetDbOverviewErrorResponse, V1GetDbOverviewOkResponse, V1GetDbOverviewProps, V1GetDbOverviewQueryPathParams, } from './hooks/useV1GetDbOverviewQuery';
17
17
  export { useV1GetDbOverviewQuery, v1GetDbOverview } from './hooks/useV1GetDbOverviewQuery';
18
18
  export type { V1GetDbinstanceLogErrorResponse, V1GetDbinstanceLogOkResponse, V1GetDbinstanceLogProps, V1GetDbinstanceLogQueryPathParams, } from './hooks/useV1GetDbinstanceLogQuery';
@@ -35,6 +35,7 @@ export type { V1UpdateProjDbSchemaErrorResponse, V1UpdateProjDbSchemaMutationPat
35
35
  export { useV1UpdateProjDbSchemaMutation, v1UpdateProjDbSchema, } from './hooks/useV1UpdateProjDbSchemaMutation';
36
36
  export type { ConsumePluginRespRequestRequestBody } from './requestBodies/ConsumePluginRespRequestRequestBody';
37
37
  export type { DbInstanceCreateRequestRequestBody } from './requestBodies/DbInstanceCreateRequestRequestBody';
38
+ export type { DbInstanceFilterRequestRequestBody } from './requestBodies/DbInstanceFilterRequestRequestBody';
38
39
  export type { DbInstanceUpdateRequestRequestBody } from './requestBodies/DbInstanceUpdateRequestRequestBody';
39
40
  export type { DbSchemaCreateRequestRequestBody } from './requestBodies/DbSchemaCreateRequestRequestBody';
40
41
  export type { DbSchemaUpdateRequestRequestBody } from './requestBodies/DbSchemaUpdateRequestRequestBody';
@@ -56,14 +57,17 @@ export type { Command } from './schemas/Command';
56
57
  export type { CommandExecutionStatus } from './schemas/CommandExecutionStatus';
57
58
  export type { CommandStatusIn } from './schemas/CommandStatusIn';
58
59
  export type { CommandStatusOut } from './schemas/CommandStatusOut';
60
+ export type { DbInstanceFilterIn } from './schemas/DbInstanceFilterIn';
59
61
  export type { DbInstanceIn } from './schemas/DbInstanceIn';
60
62
  export type { DbInstanceOut } from './schemas/DbInstanceOut';
61
63
  export type { DbSchemaIn } from './schemas/DbSchemaIn';
62
64
  export type { DbSchemaOut } from './schemas/DbSchemaOut';
65
+ export type { DbStepType } from './schemas/DbStepType';
63
66
  export type { Error } from './schemas/Error';
64
67
  export type { MigrationStateChangeSet } from './schemas/MigrationStateChangeSet';
65
68
  export type { MigrationStateIn } from './schemas/MigrationStateIn';
66
69
  export type { MigrationStateInstance } from './schemas/MigrationStateInstance';
67
70
  export type { MigrationStateOut } from './schemas/MigrationStateOut';
71
+ export type { NgTag } from './schemas/NgTag';
68
72
  export type { OverviewOut } from './schemas/OverviewOut';
69
73
  export type { ParsedLogOut } from './schemas/ParsedLogOut';
@@ -4,7 +4,7 @@ export { useV1CreateProjDbSchemaInstanceMutation, v1CreateProjDbSchemaInstance,
4
4
  export { useV1CreateProjDbSchemaMutation, v1CreateProjDbSchema, } from './hooks/useV1CreateProjDbSchemaMutation';
5
5
  export { useV1DeleteProjDbSchemaInstanceMutation, v1DeleteProjDbSchemaInstance, } from './hooks/useV1DeleteProjDbSchemaInstanceMutation';
6
6
  export { useV1DeleteProjDbSchemaMutation, v1DeleteProjDbSchema, } from './hooks/useV1DeleteProjDbSchemaMutation';
7
- export { useV1GetCommandStatusQuery, v1GetCommandStatus } from './hooks/useV1GetCommandStatusQuery';
7
+ export { useV1GetCommandStatusMutation, v1GetCommandStatus, } from './hooks/useV1GetCommandStatusMutation';
8
8
  export { useV1GetDbOverviewQuery, v1GetDbOverview } from './hooks/useV1GetDbOverviewQuery';
9
9
  export { useV1GetDbinstanceLogQuery, v1GetDbinstanceLog } from './hooks/useV1GetDbinstanceLogQuery';
10
10
  export { useV1GetProjDbSchemaInstanceQuery, v1GetProjDbSchemaInstance, } from './hooks/useV1GetProjDbSchemaInstanceQuery';
@@ -0,0 +1,2 @@
1
+ import type { DbInstanceFilterIn } from '../schemas/DbInstanceFilterIn';
2
+ export type DbInstanceFilterRequestRequestBody = DbInstanceFilterIn;
@@ -1,8 +1,9 @@
1
+ import type { DbStepType } from '../schemas/DbStepType';
1
2
  /**
2
3
  * Input for getting command execution status
3
4
  */
4
5
  export interface CommandStatusIn {
5
6
  planExecutionId: string;
6
7
  stageExecutionId: string;
7
- stepExecutionId: string;
8
+ stepType: DbStepType;
8
9
  }
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -0,0 +1,15 @@
1
+ import type { NgTag } from '../schemas/NgTag';
2
+ /**
3
+ * DB Instance Filter Request
4
+ */
5
+ export interface DbInstanceFilterIn {
6
+ /**
7
+ * filter criteria type. Example: Equals, NotEquals
8
+ * @default "Equals"
9
+ */
10
+ filterType?: 'Equals' | 'NotEquals';
11
+ /**
12
+ * an array on db instance key value pairs used against the filter
13
+ */
14
+ instanceTags?: NgTag[];
15
+ }
@@ -0,0 +1 @@
1
+ export type DbStepType = 'DBSchemaApply';
@@ -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,7 @@
1
+ /**
2
+ * ng tag with key and value
3
+ */
4
+ export interface NgTag {
5
+ key: string;
6
+ value?: string | null;
7
+ }
@@ -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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-dbops-service-client",
3
- "version": "0.3.0",
3
+ "version": "0.4.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",
@@ -1,22 +0,0 @@
1
- import { UseQueryOptions } from '@tanstack/react-query';
2
- import type { CommandStatusOut } from '../schemas/CommandStatusOut';
3
- import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
- import type { ResponseWithPagination } from '../helpers';
5
- import { FetcherOptions } from '../../../../fetcher/index.js';
6
- export interface V1GetCommandStatusQueryPathParams {
7
- org: string;
8
- project: string;
9
- pipeline: string;
10
- }
11
- export interface V1GetCommandStatusQueryHeaderParams {
12
- 'Harness-Account'?: string;
13
- }
14
- export type V1GetCommandStatusOkResponse = ResponseWithPagination<CommandStatusOut[]>;
15
- export type V1GetCommandStatusErrorResponse = ErrorResponseResponse;
16
- export interface V1GetCommandStatusProps extends V1GetCommandStatusQueryPathParams, Omit<FetcherOptions<unknown, unknown, V1GetCommandStatusQueryHeaderParams>, 'url'> {
17
- }
18
- export declare function v1GetCommandStatus(props: V1GetCommandStatusProps): Promise<V1GetCommandStatusOkResponse>;
19
- /**
20
- * Status of changeset deployment as part of execution with comparison to earlier state.
21
- */
22
- export declare function useV1GetCommandStatusQuery(props: V1GetCommandStatusProps, options?: Omit<UseQueryOptions<V1GetCommandStatusOkResponse, V1GetCommandStatusErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<V1GetCommandStatusOkResponse, import("..").Error>;