@harnessio/react-har-service-client 0.0.25 → 0.2.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.
- package/dist/har-service/src/services/hooks/useGetAllHarnessArtifactsQuery.d.ts +1 -0
- package/dist/har-service/src/services/hooks/useGetAllRegistriesQuery.d.ts +1 -0
- package/dist/har-service/src/services/hooks/useGetArtifactDetailsQuery.d.ts +27 -0
- package/dist/har-service/src/services/hooks/useGetArtifactDetailsQuery.js +14 -0
- package/dist/har-service/src/services/hooks/useGetArtifactFilesQuery.d.ts +23 -0
- package/dist/har-service/src/services/hooks/useGetArtifactFilesQuery.js +14 -0
- package/dist/har-service/src/services/index.d.ts +9 -0
- package/dist/har-service/src/services/index.js +2 -0
- package/dist/har-service/src/services/responses/ArtifactDetailResponseResponse.d.ts +6 -0
- package/dist/har-service/src/services/responses/ArtifactDetailResponseResponse.js +1 -0
- package/dist/har-service/src/services/schemas/ArtifactDetail.d.ts +20 -0
- package/dist/har-service/src/services/schemas/ArtifactDetail.js +1 -0
- package/dist/har-service/src/services/schemas/DockerArtifactDetailConfig.d.ts +6 -0
- package/dist/har-service/src/services/schemas/DockerArtifactDetailConfig.js +4 -0
- package/dist/har-service/src/services/schemas/DockerManifestDetails.d.ts +4 -0
- package/dist/har-service/src/services/schemas/GenericArtifactDetailConfig.d.ts +6 -0
- package/dist/har-service/src/services/schemas/GenericArtifactDetailConfig.js +4 -0
- package/dist/har-service/src/services/schemas/HelmArtifactDetailConfig.d.ts +6 -0
- package/dist/har-service/src/services/schemas/HelmArtifactDetailConfig.js +4 -0
- package/dist/har-service/src/services/schemas/RegistryConfig.d.ts +4 -1
- package/dist/har-service/src/services/schemas/UpstreamConfig.d.ts +1 -1
- package/package.json +4 -1
|
@@ -27,6 +27,7 @@ export interface GetAllHarnessArtifactsQueryQueryParams {
|
|
|
27
27
|
search_term?: string;
|
|
28
28
|
latest_version?: boolean;
|
|
29
29
|
deployed_artifact?: boolean;
|
|
30
|
+
package_type?: string[];
|
|
30
31
|
}
|
|
31
32
|
export type GetAllHarnessArtifactsOkResponse = ResponseWithPagination<ListArtifactResponseResponse>;
|
|
32
33
|
export type GetAllHarnessArtifactsErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
|
|
@@ -26,6 +26,7 @@ export interface GetAllRegistriesQueryQueryParams {
|
|
|
26
26
|
sort_order?: string;
|
|
27
27
|
sort_field?: string;
|
|
28
28
|
search_term?: string;
|
|
29
|
+
recursive?: boolean;
|
|
29
30
|
}
|
|
30
31
|
export type GetAllRegistriesOkResponse = ResponseWithPagination<ListRegistryResponseResponse>;
|
|
31
32
|
export type GetAllRegistriesErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ArtifactDetailResponseResponse } from '../responses/ArtifactDetailResponseResponse';
|
|
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 GetArtifactDetailsQueryPathParams {
|
|
11
|
+
registry_ref: string;
|
|
12
|
+
artifact: string;
|
|
13
|
+
version: string;
|
|
14
|
+
}
|
|
15
|
+
export interface GetArtifactDetailsQueryQueryParams {
|
|
16
|
+
childVersion?: string;
|
|
17
|
+
}
|
|
18
|
+
export type GetArtifactDetailsOkResponse = ResponseWithPagination<ArtifactDetailResponseResponse>;
|
|
19
|
+
export type GetArtifactDetailsErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
|
|
20
|
+
export interface GetArtifactDetailsProps extends GetArtifactDetailsQueryPathParams, Omit<FetcherOptions<GetArtifactDetailsQueryQueryParams, unknown>, 'url'> {
|
|
21
|
+
queryParams: GetArtifactDetailsQueryQueryParams;
|
|
22
|
+
}
|
|
23
|
+
export declare function getArtifactDetails(props: GetArtifactDetailsProps): Promise<GetArtifactDetailsOkResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Get Artifact Details
|
|
26
|
+
*/
|
|
27
|
+
export declare function useGetArtifactDetailsQuery(props: GetArtifactDetailsProps, options?: Omit<UseQueryOptions<GetArtifactDetailsOkResponse, GetArtifactDetailsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetArtifactDetailsOkResponse, 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 getArtifactDetails(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/registry/${props.registry_ref}/artifact/${props.artifact}/version/${props.version}/details`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get Artifact Details
|
|
11
|
+
*/
|
|
12
|
+
export function useGetArtifactDetailsQuery(props, options) {
|
|
13
|
+
return useQuery(['GetArtifactDetails', props.registry_ref, props.artifact, props.version, props.queryParams], ({ signal }) => getArtifactDetails(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ArtifactDetailResponseResponse } from '../responses/ArtifactDetailResponseResponse';
|
|
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 GetArtifactFilesQueryPathParams {
|
|
11
|
+
registry_ref: string;
|
|
12
|
+
artifact: string;
|
|
13
|
+
version: string;
|
|
14
|
+
}
|
|
15
|
+
export type GetArtifactFilesOkResponse = ResponseWithPagination<ArtifactDetailResponseResponse>;
|
|
16
|
+
export type GetArtifactFilesErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
|
|
17
|
+
export interface GetArtifactFilesProps extends GetArtifactFilesQueryPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
18
|
+
}
|
|
19
|
+
export declare function getArtifactFiles(props: GetArtifactFilesProps): Promise<GetArtifactFilesOkResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Get Artifact files
|
|
22
|
+
*/
|
|
23
|
+
export declare function useGetArtifactFilesQuery(props: GetArtifactFilesProps, options?: Omit<UseQueryOptions<GetArtifactFilesOkResponse, GetArtifactFilesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetArtifactFilesOkResponse, 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 getArtifactFiles(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/registry/${props.registry_ref}/artifact/${props.artifact}/version/${props.version}/files`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get Artifact files
|
|
11
|
+
*/
|
|
12
|
+
export function useGetArtifactFilesQuery(props, options) {
|
|
13
|
+
return useQuery(['GetArtifactFiles', props.registry_ref, props.artifact, props.version], ({ signal }) => getArtifactFiles(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -17,6 +17,10 @@ export type { GetAllRegistriesErrorResponse, GetAllRegistriesOkResponse, GetAllR
|
|
|
17
17
|
export { getAllRegistries, useGetAllRegistriesQuery } from './hooks/useGetAllRegistriesQuery';
|
|
18
18
|
export type { GetArtifactDeploymentsErrorResponse, GetArtifactDeploymentsOkResponse, GetArtifactDeploymentsProps, GetArtifactDeploymentsQueryPathParams, GetArtifactDeploymentsQueryQueryParams, } from './hooks/useGetArtifactDeploymentsQuery';
|
|
19
19
|
export { getArtifactDeployments, useGetArtifactDeploymentsQuery, } from './hooks/useGetArtifactDeploymentsQuery';
|
|
20
|
+
export type { GetArtifactDetailsErrorResponse, GetArtifactDetailsOkResponse, GetArtifactDetailsProps, GetArtifactDetailsQueryPathParams, GetArtifactDetailsQueryQueryParams, } from './hooks/useGetArtifactDetailsQuery';
|
|
21
|
+
export { getArtifactDetails, useGetArtifactDetailsQuery } from './hooks/useGetArtifactDetailsQuery';
|
|
22
|
+
export type { GetArtifactFilesErrorResponse, GetArtifactFilesOkResponse, GetArtifactFilesProps, GetArtifactFilesQueryPathParams, } from './hooks/useGetArtifactFilesQuery';
|
|
23
|
+
export { getArtifactFiles, useGetArtifactFilesQuery } from './hooks/useGetArtifactFilesQuery';
|
|
20
24
|
export type { GetArtifactStatsForRegistryErrorResponse, GetArtifactStatsForRegistryOkResponse, GetArtifactStatsForRegistryProps, GetArtifactStatsForRegistryQueryPathParams, GetArtifactStatsForRegistryQueryQueryParams, } from './hooks/useGetArtifactStatsForRegistryQuery';
|
|
21
25
|
export { getArtifactStatsForRegistry, useGetArtifactStatsForRegistryQuery, } from './hooks/useGetArtifactStatsForRegistryQuery';
|
|
22
26
|
export type { GetArtifactStatsForSpaceErrorResponse, GetArtifactStatsForSpaceOkResponse, GetArtifactStatsForSpaceProps, GetArtifactStatsForSpaceQueryPathParams, GetArtifactStatsForSpaceQueryQueryParams, } from './hooks/useGetArtifactStatsForSpaceQuery';
|
|
@@ -56,6 +60,7 @@ export { updateArtifactLabels, useUpdateArtifactLabelsMutation, } from './hooks/
|
|
|
56
60
|
export type { ArtifactLabelRequestRequestBody } from './requestBodies/ArtifactLabelRequestRequestBody';
|
|
57
61
|
export type { RegistryRequestRequestBody } from './requestBodies/RegistryRequestRequestBody';
|
|
58
62
|
export type { ArtifactDeploymentsResponseResponse } from './responses/ArtifactDeploymentsResponseResponse';
|
|
63
|
+
export type { ArtifactDetailResponseResponse } from './responses/ArtifactDetailResponseResponse';
|
|
59
64
|
export type { ArtifactLabelResponseResponse } from './responses/ArtifactLabelResponseResponse';
|
|
60
65
|
export type { ArtifactStatsResponseResponse } from './responses/ArtifactStatsResponseResponse';
|
|
61
66
|
export type { ArtifactSummaryResponseResponse } from './responses/ArtifactSummaryResponseResponse';
|
|
@@ -85,6 +90,7 @@ export type { Anonymous } from './schemas/Anonymous';
|
|
|
85
90
|
export type { ArtifactDeploymentsDetail } from './schemas/ArtifactDeploymentsDetail';
|
|
86
91
|
export type { ArtifactDeploymentsDetails } from './schemas/ArtifactDeploymentsDetails';
|
|
87
92
|
export type { ArtifactDeploymentsList } from './schemas/ArtifactDeploymentsList';
|
|
93
|
+
export type { ArtifactDetail } from './schemas/ArtifactDetail';
|
|
88
94
|
export type { ArtifactLabelRequest } from './schemas/ArtifactLabelRequest';
|
|
89
95
|
export type { ArtifactMetadata } from './schemas/ArtifactMetadata';
|
|
90
96
|
export type { ArtifactStats } from './schemas/ArtifactStats';
|
|
@@ -103,6 +109,7 @@ export type { DeploymentDetails } from './schemas/DeploymentDetails';
|
|
|
103
109
|
export type { DeploymentMetadata } from './schemas/DeploymentMetadata';
|
|
104
110
|
export type { DeploymentStats } from './schemas/DeploymentStats';
|
|
105
111
|
export type { DockerArtifactDetail } from './schemas/DockerArtifactDetail';
|
|
112
|
+
export type { DockerArtifactDetailConfig } from './schemas/DockerArtifactDetailConfig';
|
|
106
113
|
export type { DockerArtifactIntegrationDetail } from './schemas/DockerArtifactIntegrationDetail';
|
|
107
114
|
export type { DockerArtifactManifest } from './schemas/DockerArtifactManifest';
|
|
108
115
|
export type { DockerLayerEntry } from './schemas/DockerLayerEntry';
|
|
@@ -111,7 +118,9 @@ export type { DockerManifestDetails } from './schemas/DockerManifestDetails';
|
|
|
111
118
|
export type { DockerManifests } from './schemas/DockerManifests';
|
|
112
119
|
export type { EnvironmentType } from './schemas/EnvironmentType';
|
|
113
120
|
export type { Error } from './schemas/Error';
|
|
121
|
+
export type { GenericArtifactDetailConfig } from './schemas/GenericArtifactDetailConfig';
|
|
114
122
|
export type { HelmArtifactDetail } from './schemas/HelmArtifactDetail';
|
|
123
|
+
export type { HelmArtifactDetailConfig } from './schemas/HelmArtifactDetailConfig';
|
|
115
124
|
export type { HelmArtifactManifest } from './schemas/HelmArtifactManifest';
|
|
116
125
|
export type { ListArtifact } from './schemas/ListArtifact';
|
|
117
126
|
export type { ListArtifactLabel } from './schemas/ListArtifactLabel';
|
|
@@ -7,6 +7,8 @@ export { getAllArtifactsByRegistry, useGetAllArtifactsByRegistryQuery, } from '.
|
|
|
7
7
|
export { getAllHarnessArtifacts, useGetAllHarnessArtifactsQuery, } from './hooks/useGetAllHarnessArtifactsQuery';
|
|
8
8
|
export { getAllRegistries, useGetAllRegistriesQuery } from './hooks/useGetAllRegistriesQuery';
|
|
9
9
|
export { getArtifactDeployments, useGetArtifactDeploymentsQuery, } from './hooks/useGetArtifactDeploymentsQuery';
|
|
10
|
+
export { getArtifactDetails, useGetArtifactDetailsQuery } from './hooks/useGetArtifactDetailsQuery';
|
|
11
|
+
export { getArtifactFiles, useGetArtifactFilesQuery } from './hooks/useGetArtifactFilesQuery';
|
|
10
12
|
export { getArtifactStatsForRegistry, useGetArtifactStatsForRegistryQuery, } from './hooks/useGetArtifactStatsForRegistryQuery';
|
|
11
13
|
export { getArtifactStatsForSpace, useGetArtifactStatsForSpaceQuery, } from './hooks/useGetArtifactStatsForSpaceQuery';
|
|
12
14
|
export { getArtifactStats, useGetArtifactStatsQuery } from './hooks/useGetArtifactStatsQuery';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DockerArtifactDetailConfig } from '../schemas/DockerArtifactDetailConfig';
|
|
2
|
+
import type { HelmArtifactDetailConfig } from '../schemas/HelmArtifactDetailConfig';
|
|
3
|
+
import type { GenericArtifactDetailConfig } from '../schemas/GenericArtifactDetailConfig';
|
|
4
|
+
import type { PackageType } from '../schemas/PackageType';
|
|
5
|
+
/**
|
|
6
|
+
* Artifact Detail
|
|
7
|
+
*/
|
|
8
|
+
export type ArtifactDetail = (DockerArtifactDetailConfig | HelmArtifactDetailConfig | GenericArtifactDetailConfig) & {
|
|
9
|
+
createdAt?: string;
|
|
10
|
+
createdBy?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @format int64
|
|
13
|
+
*/
|
|
14
|
+
downloadCount?: number;
|
|
15
|
+
modifiedAt?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
packageType: PackageType;
|
|
18
|
+
size?: string;
|
|
19
|
+
version: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { VirtualConfig } from '../schemas/VirtualConfig';
|
|
2
2
|
import type { UpstreamConfig } from '../schemas/UpstreamConfig';
|
|
3
|
+
import type { RegistryType } from '../schemas/RegistryType';
|
|
3
4
|
/**
|
|
4
5
|
* SubConfig specific for Virtual or Upstream Registry
|
|
5
6
|
*/
|
|
6
|
-
export type RegistryConfig = VirtualConfig &
|
|
7
|
+
export type RegistryConfig = (VirtualConfig | UpstreamConfig) & {
|
|
8
|
+
type: RegistryType;
|
|
9
|
+
};
|
|
@@ -5,7 +5,7 @@ import type { AuthType } from '../schemas/AuthType';
|
|
|
5
5
|
* Configuration for Harness Artifact UpstreamProxies
|
|
6
6
|
*/
|
|
7
7
|
export interface UpstreamConfig {
|
|
8
|
-
auth?: UserPassword
|
|
8
|
+
auth?: UserPassword | Anonymous;
|
|
9
9
|
authType: AuthType;
|
|
10
10
|
source?: 'Custom' | 'Dockerhub';
|
|
11
11
|
url?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harnessio/react-har-service-client",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Harness HAR Service APIs integrated with react hooks",
|
|
5
5
|
"author": "Harness Inc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,5 +27,8 @@
|
|
|
27
27
|
"build": "yarn generate && tsc",
|
|
28
28
|
"generate": "oats import --config='./oats.config.ts'",
|
|
29
29
|
"fmt": "prettier --write ./index.ts"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@harnessio/oats-cli": "^3.0.0"
|
|
30
33
|
}
|
|
31
34
|
}
|