@harnessio/react-dbops-service-client 0.2.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.
Files changed (62) hide show
  1. package/dist/dbops-service/src/services/hooks/useConsumeV1StepPluginResponseMutation.d.ts +19 -0
  2. package/dist/dbops-service/src/services/hooks/useConsumeV1StepPluginResponseMutation.js +14 -0
  3. package/dist/dbops-service/src/services/hooks/useV1GetCommandStatusMutation.d.ts +25 -0
  4. package/dist/dbops-service/src/services/hooks/useV1GetCommandStatusMutation.js +14 -0
  5. package/dist/dbops-service/src/services/hooks/useV1GetDbOverviewQuery.d.ts +21 -0
  6. package/dist/dbops-service/src/services/hooks/useV1GetDbOverviewQuery.js +14 -0
  7. package/dist/dbops-service/src/services/hooks/useV1GetDbinstanceLogQuery.d.ts +3 -0
  8. package/dist/dbops-service/src/services/hooks/useV1GetDbinstanceLogQuery.js +9 -2
  9. package/dist/dbops-service/src/services/hooks/useV1IngestLogsMutation.d.ts +3 -0
  10. package/dist/dbops-service/src/services/hooks/useV1IngestLogsMutation.js +1 -1
  11. package/dist/dbops-service/src/services/hooks/useV1ListProjDbSchemaInstanceQuery.d.ts +1 -1
  12. package/dist/dbops-service/src/services/hooks/useV1ListProjDbSchemaQuery.d.ts +1 -1
  13. package/dist/dbops-service/src/services/hooks/useV1MigrationStateProjDbSchemaQuery.d.ts +37 -0
  14. package/dist/dbops-service/src/services/hooks/useV1MigrationStateProjDbSchemaQuery.js +20 -0
  15. package/dist/dbops-service/src/services/index.d.ts +25 -0
  16. package/dist/dbops-service/src/services/index.js +4 -0
  17. package/dist/dbops-service/src/services/requestBodies/ConsumePluginRespRequestRequestBody.d.ts +31 -0
  18. package/dist/dbops-service/src/services/requestBodies/ConsumePluginRespRequestRequestBody.js +1 -0
  19. package/dist/dbops-service/src/services/requestBodies/DbInstanceFilterRequestRequestBody.d.ts +2 -0
  20. package/dist/dbops-service/src/services/requestBodies/DbInstanceFilterRequestRequestBody.js +1 -0
  21. package/dist/dbops-service/src/services/requestBodies/DbInstanceUpdateRequestRequestBody.d.ts +4 -0
  22. package/dist/dbops-service/src/services/requestBodies/DbSchemaUpdateRequestRequestBody.d.ts +8 -0
  23. package/dist/dbops-service/src/services/requestBodies/MigrationStateGetRequestRequestBody.d.ts +2 -0
  24. package/dist/dbops-service/src/services/requestBodies/MigrationStateGetRequestRequestBody.js +1 -0
  25. package/dist/dbops-service/src/services/requestBodies/PluginStepInputsRequestRequestBody.d.ts +15 -2
  26. package/dist/dbops-service/src/services/responses/MigrationStateResponseResponse.d.ts +2 -0
  27. package/dist/dbops-service/src/services/responses/MigrationStateResponseResponse.js +1 -0
  28. package/dist/dbops-service/src/services/responses/OverviewResponseResponse.d.ts +6 -0
  29. package/dist/dbops-service/src/services/responses/OverviewResponseResponse.js +1 -0
  30. package/dist/dbops-service/src/services/responses/PluginInputsResponseResponse.d.ts +13 -0
  31. package/dist/dbops-service/src/services/responses/PluginInputsResponseResponse.js +0 -3
  32. package/dist/dbops-service/src/services/schemas/ChangeSetDeploymentStatus.d.ts +4 -0
  33. package/dist/dbops-service/src/services/schemas/ChangeSetDeploymentStatus.js +4 -0
  34. package/dist/dbops-service/src/services/schemas/Changelog.d.ts +9 -0
  35. package/dist/dbops-service/src/services/schemas/Command.d.ts +1 -1
  36. package/dist/dbops-service/src/services/schemas/CommandExecutionStatus.d.ts +1 -0
  37. package/dist/dbops-service/src/services/schemas/CommandExecutionStatus.js +4 -0
  38. package/dist/dbops-service/src/services/schemas/CommandStatusIn.d.ts +9 -0
  39. package/dist/dbops-service/src/services/schemas/CommandStatusIn.js +1 -0
  40. package/dist/dbops-service/src/services/schemas/CommandStatusOut.d.ts +21 -0
  41. package/dist/dbops-service/src/services/schemas/CommandStatusOut.js +1 -0
  42. package/dist/dbops-service/src/services/schemas/DbInstanceFilterIn.d.ts +15 -0
  43. package/dist/dbops-service/src/services/schemas/DbInstanceFilterIn.js +1 -0
  44. package/dist/dbops-service/src/services/schemas/DbInstanceIn.d.ts +1 -1
  45. package/dist/dbops-service/src/services/schemas/DbInstanceOut.d.ts +6 -1
  46. package/dist/dbops-service/src/services/schemas/DbSchemaOut.d.ts +6 -0
  47. package/dist/dbops-service/src/services/schemas/DbStepType.d.ts +1 -0
  48. package/dist/dbops-service/src/services/schemas/DbStepType.js +4 -0
  49. package/dist/dbops-service/src/services/schemas/MigrationStateChangeSet.d.ts +19 -0
  50. package/dist/dbops-service/src/services/schemas/MigrationStateChangeSet.js +1 -0
  51. package/dist/dbops-service/src/services/schemas/MigrationStateIn.d.ts +9 -0
  52. package/dist/dbops-service/src/services/schemas/MigrationStateIn.js +4 -0
  53. package/dist/dbops-service/src/services/schemas/MigrationStateInstance.d.ts +17 -0
  54. package/dist/dbops-service/src/services/schemas/MigrationStateInstance.js +1 -0
  55. package/dist/dbops-service/src/services/schemas/MigrationStateOut.d.ts +12 -0
  56. package/dist/dbops-service/src/services/schemas/MigrationStateOut.js +1 -0
  57. package/dist/dbops-service/src/services/schemas/NgTag.d.ts +7 -0
  58. package/dist/dbops-service/src/services/schemas/NgTag.js +4 -0
  59. package/dist/dbops-service/src/services/schemas/OverviewOut.d.ts +10 -0
  60. package/dist/dbops-service/src/services/schemas/OverviewOut.js +4 -0
  61. package/dist/dbops-service/src/services/schemas/ParsedLogOut.d.ts +4 -0
  62. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
3
+ import type { ConsumePluginRespRequestRequestBody } from '../requestBodies/ConsumePluginRespRequestRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface ConsumeV1StepPluginResponseMutationHeaderParams {
7
+ 'Harness-Account'?: string;
8
+ }
9
+ export type ConsumeV1StepPluginResponseRequestBody = ConsumePluginRespRequestRequestBody;
10
+ export type ConsumeV1StepPluginResponseOkResponse = ResponseWithPagination<unknown>;
11
+ export type ConsumeV1StepPluginResponseErrorResponse = ErrorResponseResponse;
12
+ export interface ConsumeV1StepPluginResponseProps extends Omit<FetcherOptions<unknown, ConsumeV1StepPluginResponseRequestBody, ConsumeV1StepPluginResponseMutationHeaderParams>, 'url'> {
13
+ body: ConsumeV1StepPluginResponseRequestBody;
14
+ }
15
+ export declare function consumeV1StepPluginResponse(props: ConsumeV1StepPluginResponseProps): Promise<ConsumeV1StepPluginResponseOkResponse>;
16
+ /**
17
+ * Consume Plugin Execution Response
18
+ */
19
+ export declare function useConsumeV1StepPluginResponseMutation(options?: Omit<UseMutationOptions<ConsumeV1StepPluginResponseOkResponse, ConsumeV1StepPluginResponseErrorResponse, ConsumeV1StepPluginResponseProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ConsumeV1StepPluginResponseOkResponse, import("..").Error, ConsumeV1StepPluginResponseProps, 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 consumeV1StepPluginResponse(props) {
7
+ return fetcher(Object.assign({ url: `/v1/step/plugin-response`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Consume Plugin Execution Response
11
+ */
12
+ export function useConsumeV1StepPluginResponseMutation(options) {
13
+ return useMutation((mutateProps) => consumeV1StepPluginResponse(mutateProps), options);
14
+ }
@@ -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>;
@@ -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 v1GetCommandStatus(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/pipeline/${props.pipeline}/deployedState`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Status of changeset deployment as part of execution with comparison to earlier state.
11
+ */
12
+ export function useV1GetCommandStatusMutation(options) {
13
+ return useMutation((mutateProps) => v1GetCommandStatus(mutateProps), options);
14
+ }
@@ -0,0 +1,21 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { OverviewResponseResponse } from '../responses/OverviewResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface V1GetDbOverviewQueryPathParams {
7
+ org: string;
8
+ project: string;
9
+ }
10
+ export interface V1GetDbOverviewQueryHeaderParams {
11
+ 'Harness-Account'?: string;
12
+ }
13
+ export type V1GetDbOverviewOkResponse = ResponseWithPagination<OverviewResponseResponse>;
14
+ export type V1GetDbOverviewErrorResponse = ErrorResponseResponse;
15
+ export interface V1GetDbOverviewProps extends V1GetDbOverviewQueryPathParams, Omit<FetcherOptions<unknown, unknown, V1GetDbOverviewQueryHeaderParams>, 'url'> {
16
+ }
17
+ export declare function v1GetDbOverview(props: V1GetDbOverviewProps): Promise<V1GetDbOverviewOkResponse>;
18
+ /**
19
+ * retrieves total dbSchemas, dbInstances and the latest 5 instances deployed
20
+ */
21
+ export declare function useV1GetDbOverviewQuery(props: V1GetDbOverviewProps, options?: Omit<UseQueryOptions<V1GetDbOverviewOkResponse, V1GetDbOverviewErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<V1GetDbOverviewOkResponse, import("..").Error>;
@@ -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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function v1GetDbOverview(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/overview`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * retrieves total dbSchemas, dbInstances and the latest 5 instances deployed
11
+ */
12
+ export function useV1GetDbOverviewQuery(props, options) {
13
+ return useQuery(['v1-get-db-overview', props.org, props.project], ({ signal }) => v1GetDbOverview(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -4,6 +4,9 @@ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
4
  import type { ResponseWithPagination } from '../helpers';
5
5
  import { FetcherOptions } from '../../../../fetcher/index.js';
6
6
  export interface V1GetDbinstanceLogQueryPathParams {
7
+ org: string;
8
+ project: string;
9
+ dbschema: string;
7
10
  dbinstance: string;
8
11
  log: string;
9
12
  }
@@ -4,11 +4,18 @@
4
4
  import { useQuery } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function v1GetDbinstanceLog(props) {
7
- return fetcher(Object.assign({ url: `/v1/dbinstance/${props.dbinstance}/logs/${props.log}`, method: 'GET' }, props));
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/dbschema/${props.dbschema}/instance/${props.dbinstance}/logs/${props.log}`, method: 'GET' }, props));
8
8
  }
9
9
  /**
10
10
  * Retrieves the specified log event
11
11
  */
12
12
  export function useV1GetDbinstanceLogQuery(props, options) {
13
- return useQuery(['v1-get-dbinstance-log', props.dbinstance, props.log], ({ signal }) => v1GetDbinstanceLog(Object.assign(Object.assign({}, props), { signal })), options);
13
+ return useQuery([
14
+ 'v1-get-dbinstance-log',
15
+ props.org,
16
+ props.project,
17
+ props.dbschema,
18
+ props.dbinstance,
19
+ props.log,
20
+ ], ({ signal }) => v1GetDbinstanceLog(Object.assign(Object.assign({}, props), { signal })), options);
14
21
  }
@@ -5,6 +5,9 @@ import type { LogIngestRequestRequestBody } from '../requestBodies/LogIngestRequ
5
5
  import type { ResponseWithPagination } from '../helpers';
6
6
  import { FetcherOptions } from '../../../../fetcher/index.js';
7
7
  export interface V1IngestLogsMutationPathParams {
8
+ org: string;
9
+ project: string;
10
+ dbschema: string;
8
11
  dbinstance: string;
9
12
  }
10
13
  export interface V1IngestLogsMutationHeaderParams {
@@ -4,7 +4,7 @@
4
4
  import { useMutation } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function v1IngestLogs(props) {
7
- return fetcher(Object.assign({ url: `/v1/dbinstance/${props.dbinstance}/logs`, method: 'POST' }, props));
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/dbschema/${props.dbschema}/instance/${props.dbinstance}/logs`, method: 'POST' }, props));
8
8
  }
9
9
  /**
10
10
  * Ingest database migration logs to update the state of the database
@@ -19,7 +19,7 @@ export interface V1ListProjDbSchemaInstanceQueryQueryParams {
19
19
  */
20
20
  limit?: number;
21
21
  search_term?: string;
22
- sort?: 'name' | 'updated';
22
+ sort?: 'created' | 'name' | 'updated';
23
23
  order?: 'ASC' | 'DESC';
24
24
  }
25
25
  export interface V1ListProjDbSchemaInstanceQueryHeaderParams {
@@ -18,7 +18,7 @@ export interface V1ListProjDbSchemaQueryQueryParams {
18
18
  */
19
19
  limit?: number;
20
20
  search_term?: string;
21
- sort?: 'name' | 'updated';
21
+ sort?: 'created' | 'name' | 'updated';
22
22
  order?: 'ASC' | 'DESC';
23
23
  }
24
24
  export interface V1ListProjDbSchemaQueryHeaderParams {
@@ -0,0 +1,37 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { MigrationStateResponseResponse } from '../responses/MigrationStateResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface V1MigrationStateProjDbSchemaQueryPathParams {
7
+ org: string;
8
+ project: string;
9
+ dbschema: string;
10
+ }
11
+ export interface V1MigrationStateProjDbSchemaQueryQueryParams {
12
+ /**
13
+ * @format int64
14
+ * @default 0
15
+ */
16
+ page?: number;
17
+ /**
18
+ * @default 10
19
+ */
20
+ limit?: number;
21
+ search_term?: string;
22
+ sort?: 'changeSet' | 'updated';
23
+ order?: 'ASC' | 'DESC';
24
+ }
25
+ export interface V1MigrationStateProjDbSchemaQueryHeaderParams {
26
+ 'Harness-Account'?: string;
27
+ }
28
+ export type V1MigrationStateProjDbSchemaOkResponse = ResponseWithPagination<MigrationStateResponseResponse>;
29
+ export type V1MigrationStateProjDbSchemaErrorResponse = ErrorResponseResponse;
30
+ export interface V1MigrationStateProjDbSchemaProps extends V1MigrationStateProjDbSchemaQueryPathParams, Omit<FetcherOptions<V1MigrationStateProjDbSchemaQueryQueryParams, unknown, V1MigrationStateProjDbSchemaQueryHeaderParams>, 'url'> {
31
+ queryParams: V1MigrationStateProjDbSchemaQueryQueryParams;
32
+ }
33
+ export declare function v1MigrationStateProjDbSchema(props: V1MigrationStateProjDbSchemaProps): Promise<V1MigrationStateProjDbSchemaOkResponse>;
34
+ /**
35
+ * Migration state of a schema
36
+ */
37
+ export declare function useV1MigrationStateProjDbSchemaQuery(props: V1MigrationStateProjDbSchemaProps, options?: Omit<UseQueryOptions<V1MigrationStateProjDbSchemaOkResponse, V1MigrationStateProjDbSchemaErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<V1MigrationStateProjDbSchemaOkResponse, import("..").Error>;
@@ -0,0 +1,20 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ import { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function v1MigrationStateProjDbSchema(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/dbschema/${props.dbschema}/migrationstate`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Migration state of a schema
11
+ */
12
+ export function useV1MigrationStateProjDbSchemaQuery(props, options) {
13
+ return useQuery([
14
+ 'v1-migration-state-proj-db-schema',
15
+ props.org,
16
+ props.project,
17
+ props.dbschema,
18
+ props.queryParams,
19
+ ], ({ signal }) => v1MigrationStateProjDbSchema(Object.assign(Object.assign({}, props), { signal })), options);
20
+ }
@@ -1,4 +1,6 @@
1
1
  export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
+ export type { ConsumeV1StepPluginResponseErrorResponse, ConsumeV1StepPluginResponseOkResponse, ConsumeV1StepPluginResponseProps, ConsumeV1StepPluginResponseRequestBody, } from './hooks/useConsumeV1StepPluginResponseMutation';
3
+ export { consumeV1StepPluginResponse, useConsumeV1StepPluginResponseMutation, } from './hooks/useConsumeV1StepPluginResponseMutation';
2
4
  export type { CreateV1StepPluginInputsErrorResponse, CreateV1StepPluginInputsOkResponse, CreateV1StepPluginInputsProps, CreateV1StepPluginInputsRequestBody, } from './hooks/useCreateV1StepPluginInputsMutation';
3
5
  export { createV1StepPluginInputs, useCreateV1StepPluginInputsMutation, } from './hooks/useCreateV1StepPluginInputsMutation';
4
6
  export type { V1CreateProjDbSchemaInstanceErrorResponse, V1CreateProjDbSchemaInstanceMutationPathParams, V1CreateProjDbSchemaInstanceOkResponse, V1CreateProjDbSchemaInstanceProps, V1CreateProjDbSchemaInstanceRequestBody, } from './hooks/useV1CreateProjDbSchemaInstanceMutation';
@@ -9,6 +11,10 @@ export type { V1DeleteProjDbSchemaInstanceErrorResponse, V1DeleteProjDbSchemaIns
9
11
  export { useV1DeleteProjDbSchemaInstanceMutation, v1DeleteProjDbSchemaInstance, } from './hooks/useV1DeleteProjDbSchemaInstanceMutation';
10
12
  export type { V1DeleteProjDbSchemaErrorResponse, V1DeleteProjDbSchemaMutationPathParams, V1DeleteProjDbSchemaOkResponse, V1DeleteProjDbSchemaProps, } from './hooks/useV1DeleteProjDbSchemaMutation';
11
13
  export { useV1DeleteProjDbSchemaMutation, v1DeleteProjDbSchema, } from './hooks/useV1DeleteProjDbSchemaMutation';
14
+ export type { V1GetCommandStatusErrorResponse, V1GetCommandStatusMutationPathParams, V1GetCommandStatusOkResponse, V1GetCommandStatusProps, V1GetCommandStatusRequestBody, } from './hooks/useV1GetCommandStatusMutation';
15
+ export { useV1GetCommandStatusMutation, v1GetCommandStatus, } from './hooks/useV1GetCommandStatusMutation';
16
+ export type { V1GetDbOverviewErrorResponse, V1GetDbOverviewOkResponse, V1GetDbOverviewProps, V1GetDbOverviewQueryPathParams, } from './hooks/useV1GetDbOverviewQuery';
17
+ export { useV1GetDbOverviewQuery, v1GetDbOverview } from './hooks/useV1GetDbOverviewQuery';
12
18
  export type { V1GetDbinstanceLogErrorResponse, V1GetDbinstanceLogOkResponse, V1GetDbinstanceLogProps, V1GetDbinstanceLogQueryPathParams, } from './hooks/useV1GetDbinstanceLogQuery';
13
19
  export { useV1GetDbinstanceLogQuery, v1GetDbinstanceLog } from './hooks/useV1GetDbinstanceLogQuery';
14
20
  export type { V1GetProjDbSchemaInstanceErrorResponse, V1GetProjDbSchemaInstanceOkResponse, V1GetProjDbSchemaInstanceProps, V1GetProjDbSchemaInstanceQueryPathParams, } from './hooks/useV1GetProjDbSchemaInstanceQuery';
@@ -21,28 +27,47 @@ export type { V1ListProjDbSchemaInstanceErrorResponse, V1ListProjDbSchemaInstanc
21
27
  export { useV1ListProjDbSchemaInstanceQuery, v1ListProjDbSchemaInstance, } from './hooks/useV1ListProjDbSchemaInstanceQuery';
22
28
  export type { V1ListProjDbSchemaErrorResponse, V1ListProjDbSchemaOkResponse, V1ListProjDbSchemaProps, V1ListProjDbSchemaQueryPathParams, V1ListProjDbSchemaQueryQueryParams, } from './hooks/useV1ListProjDbSchemaQuery';
23
29
  export { useV1ListProjDbSchemaQuery, v1ListProjDbSchema } from './hooks/useV1ListProjDbSchemaQuery';
30
+ export type { V1MigrationStateProjDbSchemaErrorResponse, V1MigrationStateProjDbSchemaOkResponse, V1MigrationStateProjDbSchemaProps, V1MigrationStateProjDbSchemaQueryPathParams, V1MigrationStateProjDbSchemaQueryQueryParams, } from './hooks/useV1MigrationStateProjDbSchemaQuery';
31
+ export { useV1MigrationStateProjDbSchemaQuery, v1MigrationStateProjDbSchema, } from './hooks/useV1MigrationStateProjDbSchemaQuery';
24
32
  export type { V1UpdateProjDbSchemaInstanceErrorResponse, V1UpdateProjDbSchemaInstanceMutationPathParams, V1UpdateProjDbSchemaInstanceOkResponse, V1UpdateProjDbSchemaInstanceProps, V1UpdateProjDbSchemaInstanceRequestBody, } from './hooks/useV1UpdateProjDbSchemaInstanceMutation';
25
33
  export { useV1UpdateProjDbSchemaInstanceMutation, v1UpdateProjDbSchemaInstance, } from './hooks/useV1UpdateProjDbSchemaInstanceMutation';
26
34
  export type { V1UpdateProjDbSchemaErrorResponse, V1UpdateProjDbSchemaMutationPathParams, V1UpdateProjDbSchemaOkResponse, V1UpdateProjDbSchemaProps, V1UpdateProjDbSchemaRequestBody, } from './hooks/useV1UpdateProjDbSchemaMutation';
27
35
  export { useV1UpdateProjDbSchemaMutation, v1UpdateProjDbSchema, } from './hooks/useV1UpdateProjDbSchemaMutation';
36
+ export type { ConsumePluginRespRequestRequestBody } from './requestBodies/ConsumePluginRespRequestRequestBody';
28
37
  export type { DbInstanceCreateRequestRequestBody } from './requestBodies/DbInstanceCreateRequestRequestBody';
38
+ export type { DbInstanceFilterRequestRequestBody } from './requestBodies/DbInstanceFilterRequestRequestBody';
29
39
  export type { DbInstanceUpdateRequestRequestBody } from './requestBodies/DbInstanceUpdateRequestRequestBody';
30
40
  export type { DbSchemaCreateRequestRequestBody } from './requestBodies/DbSchemaCreateRequestRequestBody';
31
41
  export type { DbSchemaUpdateRequestRequestBody } from './requestBodies/DbSchemaUpdateRequestRequestBody';
32
42
  export type { LogIngestRequestRequestBody } from './requestBodies/LogIngestRequestRequestBody';
43
+ export type { MigrationStateGetRequestRequestBody } from './requestBodies/MigrationStateGetRequestRequestBody';
33
44
  export type { PluginStepInputsRequestRequestBody } from './requestBodies/PluginStepInputsRequestRequestBody';
34
45
  export type { DbInstanceListResponseResponse } from './responses/DbInstanceListResponseResponse';
35
46
  export type { DbInstanceResponseResponse } from './responses/DbInstanceResponseResponse';
36
47
  export type { DbSchemaListResponseResponse } from './responses/DbSchemaListResponseResponse';
37
48
  export type { DbSchemaResponseResponse } from './responses/DbSchemaResponseResponse';
38
49
  export type { ErrorResponseResponse } from './responses/ErrorResponseResponse';
50
+ export type { MigrationStateResponseResponse } from './responses/MigrationStateResponseResponse';
51
+ export type { OverviewResponseResponse } from './responses/OverviewResponseResponse';
39
52
  export type { ParsedLogResponseResponse } from './responses/ParsedLogResponseResponse';
40
53
  export type { PluginInputsResponseResponse } from './responses/PluginInputsResponseResponse';
54
+ export type { ChangeSetDeploymentStatus } from './schemas/ChangeSetDeploymentStatus';
41
55
  export type { Changelog } from './schemas/Changelog';
42
56
  export type { Command } from './schemas/Command';
57
+ export type { CommandExecutionStatus } from './schemas/CommandExecutionStatus';
58
+ export type { CommandStatusIn } from './schemas/CommandStatusIn';
59
+ export type { CommandStatusOut } from './schemas/CommandStatusOut';
60
+ export type { DbInstanceFilterIn } from './schemas/DbInstanceFilterIn';
43
61
  export type { DbInstanceIn } from './schemas/DbInstanceIn';
44
62
  export type { DbInstanceOut } from './schemas/DbInstanceOut';
45
63
  export type { DbSchemaIn } from './schemas/DbSchemaIn';
46
64
  export type { DbSchemaOut } from './schemas/DbSchemaOut';
65
+ export type { DbStepType } from './schemas/DbStepType';
47
66
  export type { Error } from './schemas/Error';
67
+ export type { MigrationStateChangeSet } from './schemas/MigrationStateChangeSet';
68
+ export type { MigrationStateIn } from './schemas/MigrationStateIn';
69
+ export type { MigrationStateInstance } from './schemas/MigrationStateInstance';
70
+ export type { MigrationStateOut } from './schemas/MigrationStateOut';
71
+ export type { NgTag } from './schemas/NgTag';
72
+ export type { OverviewOut } from './schemas/OverviewOut';
48
73
  export type { ParsedLogOut } from './schemas/ParsedLogOut';
@@ -1,13 +1,17 @@
1
+ export { consumeV1StepPluginResponse, useConsumeV1StepPluginResponseMutation, } from './hooks/useConsumeV1StepPluginResponseMutation';
1
2
  export { createV1StepPluginInputs, useCreateV1StepPluginInputsMutation, } from './hooks/useCreateV1StepPluginInputsMutation';
2
3
  export { useV1CreateProjDbSchemaInstanceMutation, v1CreateProjDbSchemaInstance, } from './hooks/useV1CreateProjDbSchemaInstanceMutation';
3
4
  export { useV1CreateProjDbSchemaMutation, v1CreateProjDbSchema, } from './hooks/useV1CreateProjDbSchemaMutation';
4
5
  export { useV1DeleteProjDbSchemaInstanceMutation, v1DeleteProjDbSchemaInstance, } from './hooks/useV1DeleteProjDbSchemaInstanceMutation';
5
6
  export { useV1DeleteProjDbSchemaMutation, v1DeleteProjDbSchema, } from './hooks/useV1DeleteProjDbSchemaMutation';
7
+ export { useV1GetCommandStatusMutation, v1GetCommandStatus, } from './hooks/useV1GetCommandStatusMutation';
8
+ export { useV1GetDbOverviewQuery, v1GetDbOverview } from './hooks/useV1GetDbOverviewQuery';
6
9
  export { useV1GetDbinstanceLogQuery, v1GetDbinstanceLog } from './hooks/useV1GetDbinstanceLogQuery';
7
10
  export { useV1GetProjDbSchemaInstanceQuery, v1GetProjDbSchemaInstance, } from './hooks/useV1GetProjDbSchemaInstanceQuery';
8
11
  export { useV1GetProjDbSchemaQuery, v1GetProjDbSchema } from './hooks/useV1GetProjDbSchemaQuery';
9
12
  export { useV1IngestLogsMutation, v1IngestLogs } from './hooks/useV1IngestLogsMutation';
10
13
  export { useV1ListProjDbSchemaInstanceQuery, v1ListProjDbSchemaInstance, } from './hooks/useV1ListProjDbSchemaInstanceQuery';
11
14
  export { useV1ListProjDbSchemaQuery, v1ListProjDbSchema } from './hooks/useV1ListProjDbSchemaQuery';
15
+ export { useV1MigrationStateProjDbSchemaQuery, v1MigrationStateProjDbSchema, } from './hooks/useV1MigrationStateProjDbSchemaQuery';
12
16
  export { useV1UpdateProjDbSchemaInstanceMutation, v1UpdateProjDbSchemaInstance, } from './hooks/useV1UpdateProjDbSchemaInstanceMutation';
13
17
  export { useV1UpdateProjDbSchemaMutation, v1UpdateProjDbSchema, } from './hooks/useV1UpdateProjDbSchemaMutation';
@@ -0,0 +1,31 @@
1
+ import type { Command } from '../schemas/Command';
2
+ import type { CommandExecutionStatus } from '../schemas/CommandExecutionStatus';
3
+ export interface ConsumePluginRespRequestRequestBody {
4
+ command: Command;
5
+ /**
6
+ * Data associated with command execution
7
+ */
8
+ data: {
9
+ [key: string]: any;
10
+ };
11
+ dbInstance: string;
12
+ dbSchema: string;
13
+ logs: string;
14
+ /**
15
+ * Organization identifier
16
+ */
17
+ org: string;
18
+ /**
19
+ * Identifier of the pipeline
20
+ */
21
+ pipeline?: string;
22
+ /**
23
+ * ExecutionId of the pipeline executed
24
+ */
25
+ planExecutionId?: string;
26
+ /**
27
+ * Project identifier
28
+ */
29
+ project: string;
30
+ status: CommandExecutionStatus;
31
+ }
@@ -0,0 +1,2 @@
1
+ import type { DbInstanceFilterIn } from '../schemas/DbInstanceFilterIn';
2
+ export type DbInstanceFilterRequestRequestBody = DbInstanceFilterIn;
@@ -22,4 +22,8 @@ export interface DbInstanceUpdateRequestRequestBody {
22
22
  tags?: {
23
23
  [key: string]: string;
24
24
  };
25
+ /**
26
+ * version of the changelog applied to the database
27
+ */
28
+ version?: string;
25
29
  }
@@ -4,6 +4,10 @@ export interface DbSchemaUpdateRequestRequestBody {
4
4
  *
5
5
  */
6
6
  changelog?: {
7
+ /**
8
+ * path excluding the repo till the archive file
9
+ */
10
+ archivePath?: string;
7
11
  /**
8
12
  * identifier of the harness git connector
9
13
  * @example "harness_git"
@@ -14,6 +18,10 @@ export interface DbSchemaUpdateRequestRequestBody {
14
18
  * @example "folder/changelog.yaml"
15
19
  */
16
20
  location?: string;
21
+ /**
22
+ * repo name of the git based connector when ConnectionType is Account
23
+ */
24
+ repo?: string;
17
25
  };
18
26
  /**
19
27
  * name of the database schema
@@ -0,0 +1,2 @@
1
+ import type { MigrationStateIn } from '../schemas/MigrationStateIn';
2
+ export type MigrationStateGetRequestRequestBody = MigrationStateIn;
@@ -1,19 +1,32 @@
1
1
  import type { Command } from '../schemas/Command';
2
2
  export interface PluginStepInputsRequestRequestBody {
3
+ /**
4
+ * Organization identifier
5
+ */
6
+ Org?: string;
7
+ /**
8
+ * Project identifier
9
+ */
10
+ Project?: string;
3
11
  command: Command;
4
12
  /**
5
13
  * db instance identifier
6
14
  * @example "myschema/prod-1-instance"
7
15
  */
8
16
  dbInstance: string;
17
+ /**
18
+ * dbSchema reference
19
+ */
20
+ dbSchema: string;
21
+ directory?: string;
9
22
  metadata?: {
10
23
  plan_execution?: string;
11
24
  step_identifier?: string;
12
25
  };
13
26
  /**
14
- * Tags to associate with the schema changes
27
+ * Key value mapping of user input plugin settings
15
28
  */
16
- tags?: {
29
+ settings?: {
17
30
  [key: string]: string;
18
31
  };
19
32
  }
@@ -0,0 +1,2 @@
1
+ import type { MigrationStateOut } from '../schemas/MigrationStateOut';
2
+ export type MigrationStateResponseResponse = MigrationStateOut;
@@ -0,0 +1,6 @@
1
+ import type { OverviewOut } from '../schemas/OverviewOut';
2
+ export interface OverviewResponseResponse {
3
+ dbInstanceCount: number;
4
+ dbSchemaCount: number;
5
+ recentDeployments?: OverviewOut[];
6
+ }
@@ -1,5 +1,18 @@
1
+ import type { DbInstanceOut } from '../schemas/DbInstanceOut';
2
+ import type { DbSchemaOut } from '../schemas/DbSchemaOut';
1
3
  export interface PluginInputsResponseResponse {
4
+ dbImages?: {
5
+ [key: string]: any;
6
+ };
7
+ defaultConfigs?: {
8
+ [key: string]: string;
9
+ };
10
+ downloadImages?: {
11
+ [key: string]: any;
12
+ };
2
13
  image?: string;
14
+ instance?: DbInstanceOut;
15
+ schema?: DbSchemaOut;
3
16
  settings?: {
4
17
  [key: string]: string;
5
18
  };
@@ -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,4 @@
1
+ /**
2
+ * Status of change set deployment
3
+ */
4
+ export type ChangeSetDeploymentStatus = 'Deployment_Failed' | 'Not_Deployed' | 'Rolled_Back' | 'Successfully_Deployed';
@@ -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 {};
@@ -3,6 +3,10 @@
3
3
  *
4
4
  */
5
5
  export interface Changelog {
6
+ /**
7
+ * path excluding the repo till the archive file
8
+ */
9
+ archivePath?: string;
6
10
  /**
7
11
  * identifier of the harness git connector
8
12
  * @example "harness_git"
@@ -13,4 +17,9 @@ export interface Changelog {
13
17
  * @example "folder/changelog.yaml"
14
18
  */
15
19
  location: string;
20
+ /**
21
+ * repo name of the git based connector when ConnectionType is Account
22
+ * @example "folder/changelog.yaml"
23
+ */
24
+ repo?: string;
16
25
  }
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Type of the plugin command to run
3
3
  */
4
- export type Command = 'HISTORY' | 'TAG' | 'UPDATE' | 'VALIDATE';
4
+ export type Command = 'History' | 'Rollback' | 'Tag' | 'Update' | 'UpdateSQL' | 'Validate';
@@ -0,0 +1 @@
1
+ export type CommandExecutionStatus = 'FAILURE' | 'IN_PROGRESS' | 'SUCCESS';
@@ -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,9 @@
1
+ import type { DbStepType } from '../schemas/DbStepType';
2
+ /**
3
+ * Input for getting command execution status
4
+ */
5
+ export interface CommandStatusIn {
6
+ planExecutionId: string;
7
+ stageExecutionId: string;
8
+ stepType: DbStepType;
9
+ }
@@ -0,0 +1,21 @@
1
+ import type { Command } from '../schemas/Command';
2
+ import type { CommandExecutionStatus } from '../schemas/CommandExecutionStatus';
3
+ /**
4
+ * The status of changeset deployment
5
+ */
6
+ export interface CommandStatusOut {
7
+ author: string;
8
+ changeSetId: string;
9
+ command: Command;
10
+ /**
11
+ * @format int64
12
+ */
13
+ deployedAt?: number;
14
+ fileName: string;
15
+ /**
16
+ * if changeset run as part of current execution or belong to previous state
17
+ */
18
+ fromCurrentExecution: boolean;
19
+ status: CommandExecutionStatus;
20
+ tag?: string;
21
+ }
@@ -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
+ }
@@ -7,7 +7,7 @@ export interface DbInstanceIn {
7
7
  *
8
8
  * @example "main"
9
9
  */
10
- branch: string;
10
+ branch?: string;
11
11
  /**
12
12
  * DB Connector
13
13
  * @example "postgres-connector"
@@ -5,7 +5,7 @@ export interface DbInstanceOut {
5
5
  /**
6
6
  * branch where the instance is stored
7
7
  */
8
- branch: string;
8
+ branch?: string;
9
9
  /**
10
10
  * DB Connector
11
11
  */
@@ -23,6 +23,10 @@ export interface DbInstanceOut {
23
23
  * identifier of the database instance
24
24
  */
25
25
  identifier: string;
26
+ /**
27
+ * Most recent tag applied to the database
28
+ */
29
+ lastAppliedTag?: string;
26
30
  /**
27
31
  * name of the database instance
28
32
  */
@@ -33,6 +37,7 @@ export interface DbInstanceOut {
33
37
  tags?: {
34
38
  [key: string]: string;
35
39
  };
40
+ toOnboard?: boolean;
36
41
  /**
37
42
  * epoch seconds when the database instance was last updated
38
43
  * @format int64
@@ -13,10 +13,16 @@ export interface DbSchemaOut {
13
13
  * identifier of the database schema
14
14
  */
15
15
  identifier: string;
16
+ /**
17
+ * number of database instances corresponding to database schema
18
+ * @format int64
19
+ */
20
+ instanceCount: number;
16
21
  /**
17
22
  * name of the database schema
18
23
  */
19
24
  name: string;
25
+ schemaSourceType?: 'Artifactory' | 'Git';
20
26
  /**
21
27
  * harness service corresponding to database schema
22
28
  */
@@ -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,19 @@
1
+ import type { MigrationStateInstance } from '../schemas/MigrationStateInstance';
2
+ /**
3
+ * Deployment info of Change Sets across instances
4
+ */
5
+ export interface MigrationStateChangeSet {
6
+ /**
7
+ * Identifier of the Change Set
8
+ */
9
+ changeSet: string;
10
+ instances: MigrationStateInstance[];
11
+ /**
12
+ * If Change Set is successfully deployed to all instances
13
+ */
14
+ synced: boolean;
15
+ /**
16
+ * @format int64
17
+ */
18
+ updated: number;
19
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Get migration state request input
3
+ */
4
+ export interface MigrationStateIn {
5
+ /**
6
+ * List of instances for which migration state to be shown
7
+ */
8
+ instances?: 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 {};
@@ -0,0 +1,17 @@
1
+ import type { ChangeSetDeploymentStatus } from '../schemas/ChangeSetDeploymentStatus';
2
+ /**
3
+ * Change Set Deployment info of instance
4
+ */
5
+ export interface MigrationStateInstance {
6
+ error?: string;
7
+ /**
8
+ * Identfier of the instance
9
+ */
10
+ instance: string;
11
+ status: ChangeSetDeploymentStatus;
12
+ /**
13
+ * Time of last Change Set Deployment/Rollback attempt
14
+ * @format int64
15
+ */
16
+ updated?: number;
17
+ }
@@ -0,0 +1,12 @@
1
+ import type { MigrationStateChangeSet } from '../schemas/MigrationStateChangeSet';
2
+ /**
3
+ * Change Set deployment info for a schema
4
+ */
5
+ export interface MigrationStateOut {
6
+ changeSets?: MigrationStateChangeSet[];
7
+ instances?: string[];
8
+ /**
9
+ * Identifier of the Schema
10
+ */
11
+ schema: string;
12
+ }
@@ -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 {};
@@ -0,0 +1,10 @@
1
+ export interface OverviewOut {
2
+ dbInstanceIdentifier: string;
3
+ dbInstanceName: string;
4
+ dbSchemaIdentifier: string;
5
+ dbSchemaName: string;
6
+ /**
7
+ * @format int64
8
+ */
9
+ lastDeployed: number;
10
+ }
@@ -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,8 @@
1
1
  export interface ParsedLogOut {
2
2
  command: string;
3
+ /**
4
+ * identifier of the logIngest entity
5
+ */
6
+ id: string;
3
7
  success: boolean;
4
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-dbops-service-client",
3
- "version": "0.2.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",