@harnessio/react-har-service-client 0.9.0 → 0.11.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.
@@ -12,9 +12,25 @@ export interface GetArtifactFilesQueryPathParams {
12
12
  artifact: string;
13
13
  version: string;
14
14
  }
15
+ export interface GetArtifactFilesQueryQueryParams {
16
+ /**
17
+ * @format int64
18
+ * @default 1
19
+ */
20
+ page?: number;
21
+ /**
22
+ * @format int64
23
+ * @default 20
24
+ */
25
+ size?: number;
26
+ sort_order?: string;
27
+ sort_field?: string;
28
+ search_term?: string;
29
+ }
15
30
  export type GetArtifactFilesOkResponse = ResponseWithPagination<FileDetailResponseResponse>;
16
31
  export type GetArtifactFilesErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
17
- export interface GetArtifactFilesProps extends GetArtifactFilesQueryPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
32
+ export interface GetArtifactFilesProps extends GetArtifactFilesQueryPathParams, Omit<FetcherOptions<GetArtifactFilesQueryQueryParams, unknown>, 'url'> {
33
+ queryParams: GetArtifactFilesQueryQueryParams;
18
34
  }
19
35
  export declare function getArtifactFiles(props: GetArtifactFilesProps): Promise<GetArtifactFilesOkResponse>;
20
36
  /**
@@ -10,5 +10,5 @@ export function getArtifactFiles(props) {
10
10
  * Get Artifact files
11
11
  */
12
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);
13
+ return useQuery(['GetArtifactFiles', props.registry_ref, props.artifact, props.version, props.queryParams], ({ signal }) => getArtifactFiles(Object.assign(Object.assign({}, props), { signal })), options);
14
14
  }
@@ -0,0 +1,21 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { StorageDetailsResponseResponse } from '../responses/StorageDetailsResponseResponse';
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 GetStorageDetailsQueryPathParams {
11
+ space_ref: string;
12
+ }
13
+ export type GetStorageDetailsOkResponse = ResponseWithPagination<StorageDetailsResponseResponse>;
14
+ export type GetStorageDetailsErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
15
+ export interface GetStorageDetailsProps extends GetStorageDetailsQueryPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
16
+ }
17
+ export declare function getStorageDetails(props: GetStorageDetailsProps): Promise<GetStorageDetailsOkResponse>;
18
+ /**
19
+ * Get storage details for given space
20
+ */
21
+ export declare function useGetStorageDetailsQuery(props: GetStorageDetailsProps, options?: Omit<UseQueryOptions<GetStorageDetailsOkResponse, GetStorageDetailsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetStorageDetailsOkResponse, 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 getStorageDetails(props) {
7
+ return fetcher(Object.assign({ url: `/spaces/${props.space_ref}/details`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get storage details for given space
11
+ */
12
+ export function useGetStorageDetailsQuery(props, options) {
13
+ return useQuery(['GetStorageDetails', props.space_ref], ({ signal }) => getStorageDetails(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -23,7 +23,7 @@ export type { GetArtifactDeploymentsErrorResponse, GetArtifactDeploymentsOkRespo
23
23
  export { getArtifactDeployments, useGetArtifactDeploymentsQuery, } from './hooks/useGetArtifactDeploymentsQuery';
24
24
  export type { GetArtifactDetailsErrorResponse, GetArtifactDetailsOkResponse, GetArtifactDetailsProps, GetArtifactDetailsQueryPathParams, GetArtifactDetailsQueryQueryParams, } from './hooks/useGetArtifactDetailsQuery';
25
25
  export { getArtifactDetails, useGetArtifactDetailsQuery } from './hooks/useGetArtifactDetailsQuery';
26
- export type { GetArtifactFilesErrorResponse, GetArtifactFilesOkResponse, GetArtifactFilesProps, GetArtifactFilesQueryPathParams, } from './hooks/useGetArtifactFilesQuery';
26
+ export type { GetArtifactFilesErrorResponse, GetArtifactFilesOkResponse, GetArtifactFilesProps, GetArtifactFilesQueryPathParams, GetArtifactFilesQueryQueryParams, } from './hooks/useGetArtifactFilesQuery';
27
27
  export { getArtifactFiles, useGetArtifactFilesQuery } from './hooks/useGetArtifactFilesQuery';
28
28
  export type { GetArtifactStatsForRegistryErrorResponse, GetArtifactStatsForRegistryOkResponse, GetArtifactStatsForRegistryProps, GetArtifactStatsForRegistryQueryPathParams, GetArtifactStatsForRegistryQueryQueryParams, } from './hooks/useGetArtifactStatsForRegistryQuery';
29
29
  export { getArtifactStatsForRegistry, useGetArtifactStatsForRegistryQuery, } from './hooks/useGetArtifactStatsForRegistryQuery';
@@ -53,6 +53,8 @@ export type { GetHelmArtifactManifestErrorResponse, GetHelmArtifactManifestOkRes
53
53
  export { getHelmArtifactManifest, useGetHelmArtifactManifestQuery, } from './hooks/useGetHelmArtifactManifestQuery';
54
54
  export type { GetRegistryErrorResponse, GetRegistryOkResponse, GetRegistryProps, GetRegistryQueryPathParams, } from './hooks/useGetRegistryQuery';
55
55
  export { getRegistry, useGetRegistryQuery } from './hooks/useGetRegistryQuery';
56
+ export type { GetStorageDetailsErrorResponse, GetStorageDetailsOkResponse, GetStorageDetailsProps, GetStorageDetailsQueryPathParams, } from './hooks/useGetStorageDetailsQuery';
57
+ export { getStorageDetails, useGetStorageDetailsQuery } from './hooks/useGetStorageDetailsQuery';
56
58
  export type { GetWebhookExecutionErrorResponse, GetWebhookExecutionOkResponse, GetWebhookExecutionProps, GetWebhookExecutionQueryPathParams, } from './hooks/useGetWebhookExecutionQuery';
57
59
  export { getWebhookExecution, useGetWebhookExecutionQuery, } from './hooks/useGetWebhookExecutionQuery';
58
60
  export type { GetWebhookErrorResponse, GetWebhookOkResponse, GetWebhookProps, GetWebhookQueryPathParams, } from './hooks/useGetWebhookQuery';
@@ -103,6 +105,7 @@ export type { ListWebhooksResponseResponse } from './responses/ListWebhooksRespo
103
105
  export type { NotFoundResponse } from './responses/NotFoundResponse';
104
106
  export type { RedirectResponse } from './responses/RedirectResponse';
105
107
  export type { RegistryResponseResponse } from './responses/RegistryResponseResponse';
108
+ export type { StorageDetailsResponseResponse } from './responses/StorageDetailsResponseResponse';
106
109
  export type { SuccessResponse } from './responses/SuccessResponse';
107
110
  export type { UnauthenticatedResponse } from './responses/UnauthenticatedResponse';
108
111
  export type { UnauthorizedResponse } from './responses/UnauthorizedResponse';
@@ -171,6 +174,7 @@ export type { Status } from './schemas/Status';
171
174
  export type { StoDetails } from './schemas/StoDetails';
172
175
  export type { StoDigestMetadata } from './schemas/StoDigestMetadata';
173
176
  export type { StoMetadata } from './schemas/StoMetadata';
177
+ export type { StorageDetails } from './schemas/StorageDetails';
174
178
  export type { TabSetupStep } from './schemas/TabSetupStep';
175
179
  export type { TabSetupStepConfig } from './schemas/TabSetupStepConfig';
176
180
  export type { Trigger } from './schemas/Trigger';
@@ -25,6 +25,7 @@ export { getDockerArtifactManifests, useGetDockerArtifactManifestsQuery, } from
25
25
  export { getHelmArtifactDetails, useGetHelmArtifactDetailsQuery, } from './hooks/useGetHelmArtifactDetailsQuery';
26
26
  export { getHelmArtifactManifest, useGetHelmArtifactManifestQuery, } from './hooks/useGetHelmArtifactManifestQuery';
27
27
  export { getRegistry, useGetRegistryQuery } from './hooks/useGetRegistryQuery';
28
+ export { getStorageDetails, useGetStorageDetailsQuery } from './hooks/useGetStorageDetailsQuery';
28
29
  export { getWebhookExecution, useGetWebhookExecutionQuery, } from './hooks/useGetWebhookExecutionQuery';
29
30
  export { getWebhook, useGetWebhookQuery } from './hooks/useGetWebhookQuery';
30
31
  export { listArtifactLabels, useListArtifactLabelsQuery } from './hooks/useListArtifactLabelsQuery';
@@ -0,0 +1,6 @@
1
+ import type { StorageDetails } from '../schemas/StorageDetails';
2
+ import type { Status } from '../schemas/Status';
3
+ export interface StorageDetailsResponseResponse {
4
+ data: StorageDetails;
5
+ status: Status;
6
+ }
@@ -13,6 +13,10 @@ export interface ArtifactVersionMetadata {
13
13
  * @format int64
14
14
  */
15
15
  downloadsCount?: number;
16
+ /**
17
+ * @format int64
18
+ */
19
+ fileCount?: number;
16
20
  islatestVersion?: boolean;
17
21
  lastModified?: string;
18
22
  name: string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * storage details
3
+ */
4
+ export interface StorageDetails {
5
+ totalSize: string;
6
+ }
@@ -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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-har-service-client",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "Harness HAR Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",