@harnessio/react-har-service-client 0.0.3 → 0.0.4

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,26 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { TagSummaryResponseResponse } from '../responses/TagSummaryResponseResponse';
3
+ import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
4
+ import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
5
+ import type { NotFoundResponse } from '../responses/NotFoundResponse';
6
+ import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
7
+ import type { ResponseWithPagination } from '../helpers';
8
+ import { FetcherOptions } from '../../../../fetcher/index.js';
9
+ export interface GetArtifactTagSummaryQueryQueryParams {
10
+ repokey?: string;
11
+ artifact: string;
12
+ version: string;
13
+ }
14
+ export interface GetArtifactTagSummaryQueryHeaderParams {
15
+ 'Harness-Account'?: string;
16
+ }
17
+ export type GetArtifactTagSummaryOkResponse = ResponseWithPagination<TagSummaryResponseResponse>;
18
+ export type GetArtifactTagSummaryErrorResponse = UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
19
+ export interface GetArtifactTagSummaryProps extends Omit<FetcherOptions<GetArtifactTagSummaryQueryQueryParams, unknown, GetArtifactTagSummaryQueryHeaderParams>, 'url'> {
20
+ queryParams: GetArtifactTagSummaryQueryQueryParams;
21
+ }
22
+ export declare function getArtifactTagSummary(props: GetArtifactTagSummaryProps): Promise<GetArtifactTagSummaryOkResponse>;
23
+ /**
24
+ * Get Artifact Tag Summary
25
+ */
26
+ export declare function useGetArtifactTagSummaryQuery(props: GetArtifactTagSummaryProps, options?: Omit<UseQueryOptions<GetArtifactTagSummaryOkResponse, GetArtifactTagSummaryErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetArtifactTagSummaryOkResponse, 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 getArtifactTagSummary(props) {
7
+ return fetcher(Object.assign({ url: `/artifacts/versions/tagsummary`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get Artifact Tag Summary
11
+ */
12
+ export function useGetArtifactTagSummaryQuery(props, options) {
13
+ return useQuery(['GetArtifactTagSummary', props.queryParams], ({ signal }) => getArtifactTagSummary(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -17,12 +17,12 @@ export type { GetAllUpstreamProxiesErrorResponse, GetAllUpstreamProxiesOkRespons
17
17
  export { getAllUpstreamProxies, useGetAllUpstreamProxiesQuery, } from './hooks/useGetAllUpstreamProxiesQuery';
18
18
  export type { GetArtifactDetailsErrorResponse, GetArtifactDetailsOkResponse, GetArtifactDetailsProps, GetArtifactDetailsQueryQueryParams, } from './hooks/useGetArtifactDetailsQuery';
19
19
  export { getArtifactDetails, useGetArtifactDetailsQuery } from './hooks/useGetArtifactDetailsQuery';
20
- export type { GetArtifactLayerErrorResponse, GetArtifactLayerOkResponse, GetArtifactLayerProps, GetArtifactLayerQueryQueryParams, } from './hooks/useGetArtifactLayerQuery';
21
- export { getArtifactLayer, useGetArtifactLayerQuery } from './hooks/useGetArtifactLayerQuery';
22
20
  export type { GetArtifactManifestErrorResponse, GetArtifactManifestOkResponse, GetArtifactManifestProps, GetArtifactManifestQueryQueryParams, } from './hooks/useGetArtifactManifestQuery';
23
21
  export { getArtifactManifest, useGetArtifactManifestQuery, } from './hooks/useGetArtifactManifestQuery';
24
22
  export type { GetArtifactSummaryErrorResponse, GetArtifactSummaryOkResponse, GetArtifactSummaryProps, GetArtifactSummaryQueryQueryParams, } from './hooks/useGetArtifactSummaryQuery';
25
23
  export { getArtifactSummary, useGetArtifactSummaryQuery } from './hooks/useGetArtifactSummaryQuery';
24
+ export type { GetArtifactTagSummaryErrorResponse, GetArtifactTagSummaryOkResponse, GetArtifactTagSummaryProps, GetArtifactTagSummaryQueryQueryParams, } from './hooks/useGetArtifactTagSummaryQuery';
25
+ export { getArtifactTagSummary, useGetArtifactTagSummaryQuery, } from './hooks/useGetArtifactTagSummaryQuery';
26
26
  export type { GetArtifactVersionSummaryErrorResponse, GetArtifactVersionSummaryOkResponse, GetArtifactVersionSummaryProps, GetArtifactVersionSummaryQueryQueryParams, } from './hooks/useGetArtifactVersionSummaryQuery';
27
27
  export { getArtifactVersionSummary, useGetArtifactVersionSummaryQuery, } from './hooks/useGetArtifactVersionSummaryQuery';
28
28
  export type { GetRepositoryErrorResponse, GetRepositoryOkResponse, GetRepositoryProps, GetRepositoryQueryPathParams, GetRepositoryQueryQueryParams, } from './hooks/useGetRepositoryQuery';
@@ -36,7 +36,6 @@ export { modifyUpstreamProxy, useModifyUpstreamProxyMutation, } from './hooks/us
36
36
  export type { RepositoryRequestRequestBody } from './requestBodies/RepositoryRequestRequestBody';
37
37
  export type { UpstreamProxyRequestRequestBody } from './requestBodies/UpstreamProxyRequestRequestBody';
38
38
  export type { ArtifactDetailResponseResponse } from './responses/ArtifactDetailResponseResponse';
39
- export type { ArtifactLayersResponseResponse } from './responses/ArtifactLayersResponseResponse';
40
39
  export type { ArtifactManifestResponseResponse } from './responses/ArtifactManifestResponseResponse';
41
40
  export type { ArtifactSummaryResponseResponse } from './responses/ArtifactSummaryResponseResponse';
42
41
  export type { ArtifactVersionSummaryResponseResponse } from './responses/ArtifactVersionSummaryResponseResponse';
@@ -49,12 +48,12 @@ export type { ListUpstreamProxyResponseResponse } from './responses/ListUpstream
49
48
  export type { NotFoundResponse } from './responses/NotFoundResponse';
50
49
  export type { RepositoryResponseResponse } from './responses/RepositoryResponseResponse';
51
50
  export type { SuccessResponse } from './responses/SuccessResponse';
51
+ export type { TagSummaryResponseResponse } from './responses/TagSummaryResponseResponse';
52
52
  export type { UnauthenticatedResponse } from './responses/UnauthenticatedResponse';
53
53
  export type { UnauthorizedResponse } from './responses/UnauthorizedResponse';
54
54
  export type { UpstreamProxyResponseResponse } from './responses/UpstreamProxyResponseResponse';
55
55
  export type { Anonymous } from './schemas/Anonymous';
56
56
  export type { ArtifactDetail } from './schemas/ArtifactDetail';
57
- export type { ArtifactLayers } from './schemas/ArtifactLayers';
58
57
  export type { ArtifactManifest } from './schemas/ArtifactManifest';
59
58
  export type { ArtifactMetadata } from './schemas/ArtifactMetadata';
60
59
  export type { ArtifactSummary } from './schemas/ArtifactSummary';
@@ -63,10 +62,12 @@ export type { ArtifactVersionSummary } from './schemas/ArtifactVersionSummary';
63
62
  export type { AuthType } from './schemas/AuthType';
64
63
  export type { Error } from './schemas/Error';
65
64
  export type { Label } from './schemas/Label';
65
+ export type { LayerEntry } from './schemas/LayerEntry';
66
66
  export type { ListArtifact } from './schemas/ListArtifact';
67
67
  export type { ListArtifactVersion } from './schemas/ListArtifactVersion';
68
68
  export type { ListRepository } from './schemas/ListRepository';
69
69
  export type { ListUpstreamProxy } from './schemas/ListUpstreamProxy';
70
+ export type { ManifestDetails } from './schemas/ManifestDetails';
70
71
  export type { PackageType } from './schemas/PackageType';
71
72
  export type { Repository } from './schemas/Repository';
72
73
  export type { RepositoryCleanupPolicy } from './schemas/RepositoryCleanupPolicy';
@@ -74,6 +75,7 @@ export type { RepositoryConfig } from './schemas/RepositoryConfig';
74
75
  export type { RepositoryMetadata } from './schemas/RepositoryMetadata';
75
76
  export type { RepositoryRequest } from './schemas/RepositoryRequest';
76
77
  export type { Status } from './schemas/Status';
78
+ export type { TagSummary } from './schemas/TagSummary';
77
79
  export type { Type } from './schemas/Type';
78
80
  export type { UpstreamProxy } from './schemas/UpstreamProxy';
79
81
  export type { UpstreamProxyConfig } from './schemas/UpstreamProxyConfig';
@@ -7,9 +7,9 @@ export { getAllArtifacts, useGetAllArtifactsQuery } from './hooks/useGetAllArtif
7
7
  export { getAllRepositories, useGetAllRepositoriesQuery } from './hooks/useGetAllRepositoriesQuery';
8
8
  export { getAllUpstreamProxies, useGetAllUpstreamProxiesQuery, } from './hooks/useGetAllUpstreamProxiesQuery';
9
9
  export { getArtifactDetails, useGetArtifactDetailsQuery } from './hooks/useGetArtifactDetailsQuery';
10
- export { getArtifactLayer, useGetArtifactLayerQuery } from './hooks/useGetArtifactLayerQuery';
11
10
  export { getArtifactManifest, useGetArtifactManifestQuery, } from './hooks/useGetArtifactManifestQuery';
12
11
  export { getArtifactSummary, useGetArtifactSummaryQuery } from './hooks/useGetArtifactSummaryQuery';
12
+ export { getArtifactTagSummary, useGetArtifactTagSummaryQuery, } from './hooks/useGetArtifactTagSummaryQuery';
13
13
  export { getArtifactVersionSummary, useGetArtifactVersionSummaryQuery, } from './hooks/useGetArtifactVersionSummaryQuery';
14
14
  export { getRepository, useGetRepositoryQuery } from './hooks/useGetRepositoryQuery';
15
15
  export { getUpstreamProxy, useGetUpstreamProxyQuery } from './hooks/useGetUpstreamProxyQuery';
@@ -0,0 +1,6 @@
1
+ import type { TagSummary } from '../schemas/TagSummary';
2
+ import type { Status } from '../schemas/Status';
3
+ export interface TagSummaryResponseResponse {
4
+ data: TagSummary;
5
+ status: Status;
6
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Harness Artifact Layers
3
+ */
4
+ export interface LayerEntry {
5
+ command: string;
6
+ size?: string;
7
+ }
@@ -0,0 +1,12 @@
1
+ import type { LayerEntry } from '../schemas/LayerEntry';
2
+ /**
3
+ * Harness Artifact Layers
4
+ */
5
+ export interface ManifestDetails {
6
+ createdAt?: string;
7
+ digest: string;
8
+ layers: LayerEntry[];
9
+ modifiedAt?: string;
10
+ osArch: string;
11
+ size?: string;
12
+ }
@@ -0,0 +1,10 @@
1
+ import type { ManifestDetails } from '../schemas/ManifestDetails';
2
+ /**
3
+ * Harness Tag Summary
4
+ */
5
+ export interface TagSummary {
6
+ imageName: string;
7
+ isLatestVersion?: boolean;
8
+ manifests?: ManifestDetails[];
9
+ version: string;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-har-service-client",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Harness HAR Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -1,26 +0,0 @@
1
- import { UseQueryOptions } from '@tanstack/react-query';
2
- import type { ArtifactLayersResponseResponse } from '../responses/ArtifactLayersResponseResponse';
3
- import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
4
- import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
5
- import type { NotFoundResponse } from '../responses/NotFoundResponse';
6
- import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
7
- import type { ResponseWithPagination } from '../helpers';
8
- import { FetcherOptions } from '../../../../fetcher/index.js';
9
- export interface GetArtifactLayerQueryQueryParams {
10
- repokey?: string;
11
- artifact: string;
12
- version: string;
13
- }
14
- export interface GetArtifactLayerQueryHeaderParams {
15
- 'Harness-Account'?: string;
16
- }
17
- export type GetArtifactLayerOkResponse = ResponseWithPagination<ArtifactLayersResponseResponse>;
18
- export type GetArtifactLayerErrorResponse = UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
19
- export interface GetArtifactLayerProps extends Omit<FetcherOptions<GetArtifactLayerQueryQueryParams, unknown, GetArtifactLayerQueryHeaderParams>, 'url'> {
20
- queryParams: GetArtifactLayerQueryQueryParams;
21
- }
22
- export declare function getArtifactLayer(props: GetArtifactLayerProps): Promise<GetArtifactLayerOkResponse>;
23
- /**
24
- * Get Artifact Layer
25
- */
26
- export declare function useGetArtifactLayerQuery(props: GetArtifactLayerProps, options?: Omit<UseQueryOptions<GetArtifactLayerOkResponse, GetArtifactLayerErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetArtifactLayerOkResponse, import("..").Error>;
@@ -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 { useQuery } from '@tanstack/react-query';
5
- import { fetcher } from '../../../../fetcher/index.js';
6
- export function getArtifactLayer(props) {
7
- return fetcher(Object.assign({ url: `/artifacts/versions/layers`, method: 'GET' }, props));
8
- }
9
- /**
10
- * Get Artifact Layer
11
- */
12
- export function useGetArtifactLayerQuery(props, options) {
13
- return useQuery(['GetArtifactLayer', props.queryParams], ({ signal }) => getArtifactLayer(Object.assign(Object.assign({}, props), { signal })), options);
14
- }
@@ -1,6 +0,0 @@
1
- import type { ArtifactLayers } from '../schemas/ArtifactLayers';
2
- import type { Status } from '../schemas/Status';
3
- export interface ArtifactLayersResponseResponse {
4
- data: ArtifactLayers;
5
- status: Status;
6
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * Harness Artifact Layers
3
- */
4
- export interface ArtifactLayers {
5
- createdAt?: string;
6
- digest: string;
7
- imageName: string;
8
- isLatestVersion?: boolean;
9
- layers: string;
10
- modifiedAt?: string;
11
- osArch?: string;
12
- size?: string;
13
- version: string;
14
- }