@harnessio/react-har-service-client 0.0.23 → 0.0.25

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 (20) hide show
  1. package/dist/har-service/src/services/hooks/useDeleteArtifactMutation.d.ts +22 -0
  2. package/dist/har-service/src/services/hooks/useDeleteArtifactMutation.js +14 -0
  3. package/dist/har-service/src/services/hooks/useDeleteArtifactVersionMutation.d.ts +23 -0
  4. package/dist/har-service/src/services/hooks/useDeleteArtifactVersionMutation.js +14 -0
  5. package/dist/har-service/src/services/hooks/useGetArtifactVersionSummaryQuery.d.ts +1 -1
  6. package/dist/har-service/src/services/hooks/useRedirectHarnessArtifactQuery.d.ts +27 -0
  7. package/dist/har-service/src/services/hooks/useRedirectHarnessArtifactQuery.js +14 -0
  8. package/dist/har-service/src/services/index.d.ts +8 -0
  9. package/dist/har-service/src/services/index.js +3 -0
  10. package/dist/har-service/src/services/responses/RedirectResponse.d.ts +1 -0
  11. package/dist/har-service/src/services/responses/RedirectResponse.js +1 -0
  12. package/dist/har-service/src/services/schemas/ArtifactMetadata.d.ts +1 -9
  13. package/dist/har-service/src/services/schemas/ClientSetupStep.d.ts +2 -1
  14. package/dist/har-service/src/services/schemas/ClientSetupStepCommand.d.ts +7 -0
  15. package/dist/har-service/src/services/schemas/ClientSetupStepCommand.js +4 -0
  16. package/dist/har-service/src/services/schemas/DeploymentDetails.d.ts +3 -3
  17. package/dist/har-service/src/services/schemas/DeploymentMetadata.d.ts +2 -8
  18. package/dist/har-service/src/services/schemas/Error.d.ts +1 -1
  19. package/dist/har-service/src/services/schemas/SlsaDetails.d.ts +2 -2
  20. package/package.json +1 -1
@@ -0,0 +1,22 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { SuccessResponse } from '../responses/SuccessResponse';
3
+ import type { BadRequestResponse } from '../responses/BadRequestResponse';
4
+ import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
5
+ import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
6
+ import type { NotFoundResponse } from '../responses/NotFoundResponse';
7
+ import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
8
+ import type { ResponseWithPagination } from '../helpers';
9
+ import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export interface DeleteArtifactMutationPathParams {
11
+ registry_ref: string;
12
+ artifact: string;
13
+ }
14
+ export type DeleteArtifactOkResponse = ResponseWithPagination<SuccessResponse>;
15
+ export type DeleteArtifactErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
16
+ export interface DeleteArtifactProps extends DeleteArtifactMutationPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
17
+ }
18
+ export declare function deleteArtifact(props: DeleteArtifactProps): Promise<DeleteArtifactOkResponse>;
19
+ /**
20
+ * Delete Artifact.
21
+ */
22
+ export declare function useDeleteArtifactMutation(options?: Omit<UseMutationOptions<DeleteArtifactOkResponse, DeleteArtifactErrorResponse, DeleteArtifactProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteArtifactOkResponse, import("..").Error, DeleteArtifactProps, 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 deleteArtifact(props) {
7
+ return fetcher(Object.assign({ url: `/registry/${props.registry_ref}/artifact/${props.artifact}`, method: 'DELETE' }, props));
8
+ }
9
+ /**
10
+ * Delete Artifact.
11
+ */
12
+ export function useDeleteArtifactMutation(options) {
13
+ return useMutation((mutateProps) => deleteArtifact(mutateProps), options);
14
+ }
@@ -0,0 +1,23 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { SuccessResponse } from '../responses/SuccessResponse';
3
+ import type { BadRequestResponse } from '../responses/BadRequestResponse';
4
+ import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
5
+ import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
6
+ import type { NotFoundResponse } from '../responses/NotFoundResponse';
7
+ import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
8
+ import type { ResponseWithPagination } from '../helpers';
9
+ import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export interface DeleteArtifactVersionMutationPathParams {
11
+ registry_ref: string;
12
+ artifact: string;
13
+ version: string;
14
+ }
15
+ export type DeleteArtifactVersionOkResponse = ResponseWithPagination<SuccessResponse>;
16
+ export type DeleteArtifactVersionErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
17
+ export interface DeleteArtifactVersionProps extends DeleteArtifactVersionMutationPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
18
+ }
19
+ export declare function deleteArtifactVersion(props: DeleteArtifactVersionProps): Promise<DeleteArtifactVersionOkResponse>;
20
+ /**
21
+ * Delete Artifact Version.
22
+ */
23
+ export declare function useDeleteArtifactVersionMutation(options?: Omit<UseMutationOptions<DeleteArtifactVersionOkResponse, DeleteArtifactVersionErrorResponse, DeleteArtifactVersionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteArtifactVersionOkResponse, import("..").Error, DeleteArtifactVersionProps, 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 deleteArtifactVersion(props) {
7
+ return fetcher(Object.assign({ url: `/registry/${props.registry_ref}/artifact/${props.artifact}/version/${props.version}`, method: 'DELETE' }, props));
8
+ }
9
+ /**
10
+ * Delete Artifact Version.
11
+ */
12
+ export function useDeleteArtifactVersionMutation(options) {
13
+ return useMutation((mutateProps) => deleteArtifactVersion(mutateProps), options);
14
+ }
@@ -13,7 +13,7 @@ export interface GetArtifactVersionSummaryQueryPathParams {
13
13
  version: string;
14
14
  }
15
15
  export interface GetArtifactVersionSummaryQueryQueryParams {
16
- digest: string;
16
+ digest?: string;
17
17
  }
18
18
  export type GetArtifactVersionSummaryOkResponse = ResponseWithPagination<ArtifactVersionSummaryResponseResponse>;
19
19
  export type GetArtifactVersionSummaryErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
@@ -0,0 +1,27 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { RedirectResponse } from '../responses/RedirectResponse';
3
+ import type { BadRequestResponse } from '../responses/BadRequestResponse';
4
+ import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
5
+ import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
6
+ import type { NotFoundResponse } from '../responses/NotFoundResponse';
7
+ import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
8
+ import type { ResponseWithPagination } from '../helpers';
9
+ import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export interface RedirectHarnessArtifactQueryPathParams {
11
+ registry_identifier: string;
12
+ artifact: string;
13
+ }
14
+ export interface RedirectHarnessArtifactQueryQueryParams {
15
+ accountIdentifier?: string;
16
+ version?: string;
17
+ }
18
+ export type RedirectHarnessArtifactOkResponse = ResponseWithPagination<unknown>;
19
+ export type RedirectHarnessArtifactErrorResponse = RedirectResponse | BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
20
+ export interface RedirectHarnessArtifactProps extends RedirectHarnessArtifactQueryPathParams, Omit<FetcherOptions<RedirectHarnessArtifactQueryQueryParams, unknown>, 'url'> {
21
+ queryParams: RedirectHarnessArtifactQueryQueryParams;
22
+ }
23
+ export declare function redirectHarnessArtifact(props: RedirectHarnessArtifactProps): Promise<RedirectHarnessArtifactOkResponse>;
24
+ /**
25
+ * Redirect to Harness Artifact Page
26
+ */
27
+ export declare function useRedirectHarnessArtifactQuery(props: RedirectHarnessArtifactProps, options?: Omit<UseQueryOptions<RedirectHarnessArtifactOkResponse, RedirectHarnessArtifactErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<RedirectHarnessArtifactOkResponse, 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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function redirectHarnessArtifact(props) {
7
+ return fetcher(Object.assign({ url: `/registry/${props.registry_identifier}/artifact/${props.artifact}/redirect`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Redirect to Harness Artifact Page
11
+ */
12
+ export function useRedirectHarnessArtifactQuery(props, options) {
13
+ return useQuery(['RedirectHarnessArtifact', props.registry_identifier, props.artifact, props.queryParams], ({ signal }) => redirectHarnessArtifact(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -1,6 +1,10 @@
1
1
  export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
2
  export type { CreateRegistryErrorResponse, CreateRegistryMutationQueryParams, CreateRegistryOkResponse, CreateRegistryProps, CreateRegistryRequestBody, } from './hooks/useCreateRegistryMutation';
3
3
  export { createRegistry, useCreateRegistryMutation } from './hooks/useCreateRegistryMutation';
4
+ export type { DeleteArtifactErrorResponse, DeleteArtifactMutationPathParams, DeleteArtifactOkResponse, DeleteArtifactProps, } from './hooks/useDeleteArtifactMutation';
5
+ export { deleteArtifact, useDeleteArtifactMutation } from './hooks/useDeleteArtifactMutation';
6
+ export type { DeleteArtifactVersionErrorResponse, DeleteArtifactVersionMutationPathParams, DeleteArtifactVersionOkResponse, DeleteArtifactVersionProps, } from './hooks/useDeleteArtifactVersionMutation';
7
+ export { deleteArtifactVersion, useDeleteArtifactVersionMutation, } from './hooks/useDeleteArtifactVersionMutation';
4
8
  export type { DeleteRegistryErrorResponse, DeleteRegistryMutationPathParams, DeleteRegistryOkResponse, DeleteRegistryProps, } from './hooks/useDeleteRegistryMutation';
5
9
  export { deleteRegistry, useDeleteRegistryMutation } from './hooks/useDeleteRegistryMutation';
6
10
  export type { GetAllArtifactVersionsErrorResponse, GetAllArtifactVersionsOkResponse, GetAllArtifactVersionsProps, GetAllArtifactVersionsQueryPathParams, GetAllArtifactVersionsQueryQueryParams, } from './hooks/useGetAllArtifactVersionsQuery';
@@ -45,6 +49,8 @@ export type { ListArtifactLabelsErrorResponse, ListArtifactLabelsOkResponse, Lis
45
49
  export { listArtifactLabels, useListArtifactLabelsQuery } from './hooks/useListArtifactLabelsQuery';
46
50
  export type { ModifyRegistryErrorResponse, ModifyRegistryMutationPathParams, ModifyRegistryOkResponse, ModifyRegistryProps, ModifyRegistryRequestBody, } from './hooks/useModifyRegistryMutation';
47
51
  export { modifyRegistry, useModifyRegistryMutation } from './hooks/useModifyRegistryMutation';
52
+ export type { RedirectHarnessArtifactErrorResponse, RedirectHarnessArtifactOkResponse, RedirectHarnessArtifactProps, RedirectHarnessArtifactQueryPathParams, RedirectHarnessArtifactQueryQueryParams, } from './hooks/useRedirectHarnessArtifactQuery';
53
+ export { redirectHarnessArtifact, useRedirectHarnessArtifactQuery, } from './hooks/useRedirectHarnessArtifactQuery';
48
54
  export type { UpdateArtifactLabelsErrorResponse, UpdateArtifactLabelsMutationPathParams, UpdateArtifactLabelsOkResponse, UpdateArtifactLabelsProps, UpdateArtifactLabelsRequestBody, } from './hooks/useUpdateArtifactLabelsMutation';
49
55
  export { updateArtifactLabels, useUpdateArtifactLabelsMutation, } from './hooks/useUpdateArtifactLabelsMutation';
50
56
  export type { ArtifactLabelRequestRequestBody } from './requestBodies/ArtifactLabelRequestRequestBody';
@@ -70,6 +76,7 @@ export type { ListArtifactVersionResponseResponse } from './responses/ListArtifa
70
76
  export type { ListRegistryArtifactResponseResponse } from './responses/ListRegistryArtifactResponseResponse';
71
77
  export type { ListRegistryResponseResponse } from './responses/ListRegistryResponseResponse';
72
78
  export type { NotFoundResponse } from './responses/NotFoundResponse';
79
+ export type { RedirectResponse } from './responses/RedirectResponse';
73
80
  export type { RegistryResponseResponse } from './responses/RegistryResponseResponse';
74
81
  export type { SuccessResponse } from './responses/SuccessResponse';
75
82
  export type { UnauthenticatedResponse } from './responses/UnauthenticatedResponse';
@@ -90,6 +97,7 @@ export type { CleanupPolicy } from './schemas/CleanupPolicy';
90
97
  export type { ClientSetupDetails } from './schemas/ClientSetupDetails';
91
98
  export type { ClientSetupSection } from './schemas/ClientSetupSection';
92
99
  export type { ClientSetupStep } from './schemas/ClientSetupStep';
100
+ export type { ClientSetupStepCommand } from './schemas/ClientSetupStepCommand';
93
101
  export type { ClientSetupStepType } from './schemas/ClientSetupStepType';
94
102
  export type { DeploymentDetails } from './schemas/DeploymentDetails';
95
103
  export type { DeploymentMetadata } from './schemas/DeploymentMetadata';
@@ -1,4 +1,6 @@
1
1
  export { createRegistry, useCreateRegistryMutation } from './hooks/useCreateRegistryMutation';
2
+ export { deleteArtifact, useDeleteArtifactMutation } from './hooks/useDeleteArtifactMutation';
3
+ export { deleteArtifactVersion, useDeleteArtifactVersionMutation, } from './hooks/useDeleteArtifactVersionMutation';
2
4
  export { deleteRegistry, useDeleteRegistryMutation } from './hooks/useDeleteRegistryMutation';
3
5
  export { getAllArtifactVersions, useGetAllArtifactVersionsQuery, } from './hooks/useGetAllArtifactVersionsQuery';
4
6
  export { getAllArtifactsByRegistry, useGetAllArtifactsByRegistryQuery, } from './hooks/useGetAllArtifactsByRegistryQuery';
@@ -21,4 +23,5 @@ export { getHelmArtifactManifest, useGetHelmArtifactManifestQuery, } from './hoo
21
23
  export { getRegistry, useGetRegistryQuery } from './hooks/useGetRegistryQuery';
22
24
  export { listArtifactLabels, useListArtifactLabelsQuery } from './hooks/useListArtifactLabelsQuery';
23
25
  export { modifyRegistry, useModifyRegistryMutation } from './hooks/useModifyRegistryMutation';
26
+ export { redirectHarnessArtifact, useRedirectHarnessArtifactQuery, } from './hooks/useRedirectHarnessArtifactQuery';
24
27
  export { updateArtifactLabels, useUpdateArtifactLabelsMutation, } from './hooks/useUpdateArtifactLabelsMutation';
@@ -0,0 +1 @@
1
+ export type RedirectResponse = unknown;
@@ -15,15 +15,7 @@ export interface ArtifactMetadata {
15
15
  lastModified?: string;
16
16
  latestVersion: string;
17
17
  name: string;
18
- /**
19
- * @format int64
20
- */
21
- nonProdEnvCount?: number;
22
18
  packageType?: PackageType;
23
- /**
24
- * @format int64
25
- */
26
- prodEnvCount?: number;
27
19
  pullCommand?: string;
28
20
  registryIdentifier: string;
29
21
  registryPath: string;
@@ -37,5 +29,5 @@ export interface ArtifactMetadata {
37
29
  * @format int64
38
30
  */
39
31
  totalDigestCount?: number;
40
- version?: string;
32
+ version: string;
41
33
  }
@@ -1,9 +1,10 @@
1
+ import type { ClientSetupStepCommand } from '../schemas/ClientSetupStepCommand';
1
2
  import type { ClientSetupStepType } from '../schemas/ClientSetupStepType';
2
3
  /**
3
4
  * Client Setup Step
4
5
  */
5
6
  export interface ClientSetupStep {
6
- commands?: string[];
7
+ commands?: ClientSetupStepCommand[];
7
8
  header?: string;
8
9
  type?: ClientSetupStepType;
9
10
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Client Setup Step Command
3
+ */
4
+ export interface ClientSetupStepCommand {
5
+ label?: string;
6
+ value?: string;
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 {};
@@ -1,5 +1,5 @@
1
1
  export interface DeploymentDetails {
2
- nonProdDeployment?: number;
3
- prodDeployment?: number;
4
- totalDeployment?: number;
2
+ nonProdDeployment: number;
3
+ prodDeployment: number;
4
+ totalDeployment: number;
5
5
  }
@@ -1,10 +1,4 @@
1
1
  export interface DeploymentMetadata {
2
- /**
3
- * @format int64
4
- */
5
- nonProdEnvCount?: number;
6
- /**
7
- * @format int64
8
- */
9
- prodEnvCount?: number;
2
+ nonProdEnvCount: number;
3
+ prodEnvCount: number;
10
4
  }
@@ -1,7 +1,7 @@
1
1
  export interface Error {
2
2
  /**
3
3
  * The http error code
4
- * @example 404
4
+ * @example "404"
5
5
  */
6
6
  code: string;
7
7
  /**
@@ -1,4 +1,4 @@
1
1
  export interface SlsaDetails {
2
- provenanceId: string;
3
- status: string;
2
+ provenanceId?: string;
3
+ status?: string;
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-har-service-client",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "Harness HAR Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",