@harnessio/react-dbops-service-client 0.5.0 → 0.6.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,40 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { DbInstanceListResponseResponse } from '../responses/DbInstanceListResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { DbInstanceFilterRequestRequestBody } from '../requestBodies/DbInstanceFilterRequestRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface V1ListProjDbSchemaInstanceMutationPathParams {
8
+ org: string;
9
+ project: string;
10
+ dbschema: string;
11
+ }
12
+ export interface V1ListProjDbSchemaInstanceMutationQueryParams {
13
+ /**
14
+ * @format int64
15
+ * @default 0
16
+ */
17
+ page?: number;
18
+ /**
19
+ * @default 10
20
+ */
21
+ limit?: number;
22
+ search_term?: string;
23
+ sort?: 'created' | 'name' | 'updated';
24
+ order?: 'ASC' | 'DESC';
25
+ }
26
+ export interface V1ListProjDbSchemaInstanceMutationHeaderParams {
27
+ 'Harness-Account'?: string;
28
+ }
29
+ export type V1ListProjDbSchemaInstanceRequestBody = DbInstanceFilterRequestRequestBody;
30
+ export type V1ListProjDbSchemaInstanceOkResponse = ResponseWithPagination<DbInstanceListResponseResponse>;
31
+ export type V1ListProjDbSchemaInstanceErrorResponse = ErrorResponseResponse;
32
+ export interface V1ListProjDbSchemaInstanceProps extends V1ListProjDbSchemaInstanceMutationPathParams, Omit<FetcherOptions<V1ListProjDbSchemaInstanceMutationQueryParams, V1ListProjDbSchemaInstanceRequestBody, V1ListProjDbSchemaInstanceMutationHeaderParams>, 'url'> {
33
+ queryParams: V1ListProjDbSchemaInstanceMutationQueryParams;
34
+ body: V1ListProjDbSchemaInstanceRequestBody;
35
+ }
36
+ export declare function v1ListProjDbSchemaInstance(props: V1ListProjDbSchemaInstanceProps): Promise<V1ListProjDbSchemaInstanceOkResponse>;
37
+ /**
38
+ * Retrieves the specified database instances of the database schema
39
+ */
40
+ export declare function useV1ListProjDbSchemaInstanceMutation(options?: Omit<UseMutationOptions<V1ListProjDbSchemaInstanceOkResponse, V1ListProjDbSchemaInstanceErrorResponse, V1ListProjDbSchemaInstanceProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<V1ListProjDbSchemaInstanceOkResponse, import("..").Error, V1ListProjDbSchemaInstanceProps, 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 v1ListProjDbSchemaInstance(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/dbschema/${props.dbschema}/instancelist`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Retrieves the specified database instances of the database schema
11
+ */
12
+ export function useV1ListProjDbSchemaInstanceMutation(options) {
13
+ return useMutation((mutateProps) => v1ListProjDbSchemaInstance(mutateProps), options);
14
+ }
@@ -11,8 +11,6 @@ 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, V1GetCommandStatusMutationPathParams, V1GetCommandStatusOkResponse, V1GetCommandStatusProps, V1GetCommandStatusRequestBody, } from './hooks/useV1GetCommandStatusMutation';
15
- export { useV1GetCommandStatusMutation, v1GetCommandStatus, } from './hooks/useV1GetCommandStatusMutation';
16
14
  export type { V1GetDbOverviewErrorResponse, V1GetDbOverviewOkResponse, V1GetDbOverviewProps, V1GetDbOverviewQueryPathParams, } from './hooks/useV1GetDbOverviewQuery';
17
15
  export { useV1GetDbOverviewQuery, v1GetDbOverview } from './hooks/useV1GetDbOverviewQuery';
18
16
  export type { V1GetDbinstanceLogErrorResponse, V1GetDbinstanceLogOkResponse, V1GetDbinstanceLogProps, V1GetDbinstanceLogQueryPathParams, } from './hooks/useV1GetDbinstanceLogQuery';
@@ -23,8 +21,8 @@ export type { V1GetProjDbSchemaErrorResponse, V1GetProjDbSchemaOkResponse, V1Get
23
21
  export { useV1GetProjDbSchemaQuery, v1GetProjDbSchema } from './hooks/useV1GetProjDbSchemaQuery';
24
22
  export type { V1IngestLogsErrorResponse, V1IngestLogsMutationPathParams, V1IngestLogsOkResponse, V1IngestLogsProps, V1IngestLogsRequestBody, } from './hooks/useV1IngestLogsMutation';
25
23
  export { useV1IngestLogsMutation, v1IngestLogs } from './hooks/useV1IngestLogsMutation';
26
- export type { V1ListProjDbSchemaInstanceErrorResponse, V1ListProjDbSchemaInstanceOkResponse, V1ListProjDbSchemaInstanceProps, V1ListProjDbSchemaInstanceQueryPathParams, V1ListProjDbSchemaInstanceQueryQueryParams, } from './hooks/useV1ListProjDbSchemaInstanceQuery';
27
- export { useV1ListProjDbSchemaInstanceQuery, v1ListProjDbSchemaInstance, } from './hooks/useV1ListProjDbSchemaInstanceQuery';
24
+ export type { V1ListProjDbSchemaInstanceErrorResponse, V1ListProjDbSchemaInstanceMutationPathParams, V1ListProjDbSchemaInstanceMutationQueryParams, V1ListProjDbSchemaInstanceOkResponse, V1ListProjDbSchemaInstanceProps, V1ListProjDbSchemaInstanceRequestBody, } from './hooks/useV1ListProjDbSchemaInstanceMutation';
25
+ export { useV1ListProjDbSchemaInstanceMutation, v1ListProjDbSchemaInstance, } from './hooks/useV1ListProjDbSchemaInstanceMutation';
28
26
  export type { V1ListProjDbSchemaErrorResponse, V1ListProjDbSchemaOkResponse, V1ListProjDbSchemaProps, V1ListProjDbSchemaQueryPathParams, V1ListProjDbSchemaQueryQueryParams, } from './hooks/useV1ListProjDbSchemaQuery';
29
27
  export { useV1ListProjDbSchemaQuery, v1ListProjDbSchema } from './hooks/useV1ListProjDbSchemaQuery';
30
28
  export type { V1MigrationStateProjDbSchemaErrorResponse, V1MigrationStateProjDbSchemaMutationPathParams, V1MigrationStateProjDbSchemaMutationQueryParams, V1MigrationStateProjDbSchemaOkResponse, V1MigrationStateProjDbSchemaProps, V1MigrationStateProjDbSchemaRequestBody, } from './hooks/useV1MigrationStateProjDbSchemaMutation';
@@ -55,14 +53,11 @@ export type { ChangeSetDeploymentStatus } from './schemas/ChangeSetDeploymentSta
55
53
  export type { Changelog } from './schemas/Changelog';
56
54
  export type { Command } from './schemas/Command';
57
55
  export type { CommandExecutionStatus } from './schemas/CommandExecutionStatus';
58
- export type { CommandStatusIn } from './schemas/CommandStatusIn';
59
- export type { CommandStatusOut } from './schemas/CommandStatusOut';
60
56
  export type { DbInstanceFilterIn } from './schemas/DbInstanceFilterIn';
61
57
  export type { DbInstanceIn } from './schemas/DbInstanceIn';
62
58
  export type { DbInstanceOut } from './schemas/DbInstanceOut';
63
59
  export type { DbSchemaIn } from './schemas/DbSchemaIn';
64
60
  export type { DbSchemaOut } from './schemas/DbSchemaOut';
65
- export type { DbStepType } from './schemas/DbStepType';
66
61
  export type { Error } from './schemas/Error';
67
62
  export type { InstanceDetail } from './schemas/InstanceDetail';
68
63
  export type { MigrationStateChangeSet } from './schemas/MigrationStateChangeSet';
@@ -4,13 +4,12 @@ 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 { useV1GetCommandStatusMutation, v1GetCommandStatus, } from './hooks/useV1GetCommandStatusMutation';
8
7
  export { useV1GetDbOverviewQuery, v1GetDbOverview } from './hooks/useV1GetDbOverviewQuery';
9
8
  export { useV1GetDbinstanceLogQuery, v1GetDbinstanceLog } from './hooks/useV1GetDbinstanceLogQuery';
10
9
  export { useV1GetProjDbSchemaInstanceQuery, v1GetProjDbSchemaInstance, } from './hooks/useV1GetProjDbSchemaInstanceQuery';
11
10
  export { useV1GetProjDbSchemaQuery, v1GetProjDbSchema } from './hooks/useV1GetProjDbSchemaQuery';
12
11
  export { useV1IngestLogsMutation, v1IngestLogs } from './hooks/useV1IngestLogsMutation';
13
- export { useV1ListProjDbSchemaInstanceQuery, v1ListProjDbSchemaInstance, } from './hooks/useV1ListProjDbSchemaInstanceQuery';
12
+ export { useV1ListProjDbSchemaInstanceMutation, v1ListProjDbSchemaInstance, } from './hooks/useV1ListProjDbSchemaInstanceMutation';
14
13
  export { useV1ListProjDbSchemaQuery, v1ListProjDbSchema } from './hooks/useV1ListProjDbSchemaQuery';
15
14
  export { useV1MigrationStateProjDbSchemaMutation, v1MigrationStateProjDbSchema, } from './hooks/useV1MigrationStateProjDbSchemaMutation';
16
15
  export { useV1UpdateProjDbSchemaInstanceMutation, v1UpdateProjDbSchemaInstance, } from './hooks/useV1UpdateProjDbSchemaInstanceMutation';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-dbops-service-client",
3
- "version": "0.5.0",
3
+ "version": "0.6.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,27 +0,0 @@
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
- dbschema: string;
12
- dbinstance: string;
13
- }
14
- export interface V1GetCommandStatusMutationHeaderParams {
15
- 'Harness-Account'?: string;
16
- }
17
- export type V1GetCommandStatusRequestBody = CommandStatusIn;
18
- export type V1GetCommandStatusOkResponse = ResponseWithPagination<CommandStatusOut[]>;
19
- export type V1GetCommandStatusErrorResponse = ErrorResponseResponse;
20
- export interface V1GetCommandStatusProps extends V1GetCommandStatusMutationPathParams, Omit<FetcherOptions<unknown, V1GetCommandStatusRequestBody, V1GetCommandStatusMutationHeaderParams>, 'url'> {
21
- body: V1GetCommandStatusRequestBody;
22
- }
23
- export declare function v1GetCommandStatus(props: V1GetCommandStatusProps): Promise<V1GetCommandStatusOkResponse>;
24
- /**
25
- * Status of changeset deployment as part of execution with comparison to earlier state.
26
- */
27
- export declare function useV1GetCommandStatusMutation(options?: Omit<UseMutationOptions<V1GetCommandStatusOkResponse, V1GetCommandStatusErrorResponse, V1GetCommandStatusProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<V1GetCommandStatusOkResponse, import("..").Error, V1GetCommandStatusProps, unknown>;
@@ -1,14 +0,0 @@
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}/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 useV1GetCommandStatusMutation(options) {
13
- return useMutation((mutateProps) => v1GetCommandStatus(mutateProps), options);
14
- }
@@ -1,37 +0,0 @@
1
- import { UseQueryOptions } from '@tanstack/react-query';
2
- import type { DbInstanceListResponseResponse } from '../responses/DbInstanceListResponseResponse';
3
- import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
- import type { ResponseWithPagination } from '../helpers';
5
- import { FetcherOptions } from '../../../../fetcher/index.js';
6
- export interface V1ListProjDbSchemaInstanceQueryPathParams {
7
- org: string;
8
- project: string;
9
- dbschema: string;
10
- }
11
- export interface V1ListProjDbSchemaInstanceQueryQueryParams {
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?: 'created' | 'name' | 'updated';
23
- order?: 'ASC' | 'DESC';
24
- }
25
- export interface V1ListProjDbSchemaInstanceQueryHeaderParams {
26
- 'Harness-Account'?: string;
27
- }
28
- export type V1ListProjDbSchemaInstanceOkResponse = ResponseWithPagination<DbInstanceListResponseResponse>;
29
- export type V1ListProjDbSchemaInstanceErrorResponse = ErrorResponseResponse;
30
- export interface V1ListProjDbSchemaInstanceProps extends V1ListProjDbSchemaInstanceQueryPathParams, Omit<FetcherOptions<V1ListProjDbSchemaInstanceQueryQueryParams, unknown, V1ListProjDbSchemaInstanceQueryHeaderParams>, 'url'> {
31
- queryParams: V1ListProjDbSchemaInstanceQueryQueryParams;
32
- }
33
- export declare function v1ListProjDbSchemaInstance(props: V1ListProjDbSchemaInstanceProps): Promise<V1ListProjDbSchemaInstanceOkResponse>;
34
- /**
35
- * Retrieves the specified database instances of the database schema
36
- */
37
- export declare function useV1ListProjDbSchemaInstanceQuery(props: V1ListProjDbSchemaInstanceProps, options?: Omit<UseQueryOptions<V1ListProjDbSchemaInstanceOkResponse, V1ListProjDbSchemaInstanceErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<V1ListProjDbSchemaInstanceOkResponse, import("..").Error>;
@@ -1,20 +0,0 @@
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 v1ListProjDbSchemaInstance(props) {
7
- return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/dbschema/${props.dbschema}/instance`, method: 'GET' }, props));
8
- }
9
- /**
10
- * Retrieves the specified database instances of the database schema
11
- */
12
- export function useV1ListProjDbSchemaInstanceQuery(props, options) {
13
- return useQuery([
14
- 'v1-list-proj-db-schema-instance',
15
- props.org,
16
- props.project,
17
- props.dbschema,
18
- props.queryParams,
19
- ], ({ signal }) => v1ListProjDbSchemaInstance(Object.assign(Object.assign({}, props), { signal })), options);
20
- }
@@ -1,9 +0,0 @@
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
- }
@@ -1,21 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- export type DbStepType = 'DBSchemaApply';
@@ -1,4 +0,0 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
- export {};