@harnessio/react-har-service-client 0.10.0 → 0.12.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,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
+ }
@@ -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';
@@ -156,7 +159,9 @@ export type { ListRegistryArtifact } from './schemas/ListRegistryArtifact';
156
159
  export type { ListWebhooks } from './schemas/ListWebhooks';
157
160
  export type { ListWebhooksExecutions } from './schemas/ListWebhooksExecutions';
158
161
  export type { MavenArtifactDetailConfig } from './schemas/MavenArtifactDetailConfig';
162
+ export type { NpmArtifactDetailConfig } from './schemas/NpmArtifactDetailConfig';
159
163
  export type { PackageType } from './schemas/PackageType';
164
+ export type { PythonArtifactDetailConfig } from './schemas/PythonArtifactDetailConfig';
160
165
  export type { Registry } from './schemas/Registry';
161
166
  export type { RegistryArtifactMetadata } from './schemas/RegistryArtifactMetadata';
162
167
  export type { RegistryConfig } from './schemas/RegistryConfig';
@@ -171,6 +176,7 @@ export type { Status } from './schemas/Status';
171
176
  export type { StoDetails } from './schemas/StoDetails';
172
177
  export type { StoDigestMetadata } from './schemas/StoDigestMetadata';
173
178
  export type { StoMetadata } from './schemas/StoMetadata';
179
+ export type { StorageDetails } from './schemas/StorageDetails';
174
180
  export type { TabSetupStep } from './schemas/TabSetupStep';
175
181
  export type { TabSetupStepConfig } from './schemas/TabSetupStepConfig';
176
182
  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
+ }
@@ -2,11 +2,13 @@ import type { DockerArtifactDetailConfig } from '../schemas/DockerArtifactDetail
2
2
  import type { HelmArtifactDetailConfig } from '../schemas/HelmArtifactDetailConfig';
3
3
  import type { GenericArtifactDetailConfig } from '../schemas/GenericArtifactDetailConfig';
4
4
  import type { MavenArtifactDetailConfig } from '../schemas/MavenArtifactDetailConfig';
5
+ import type { NpmArtifactDetailConfig } from '../schemas/NpmArtifactDetailConfig';
6
+ import type { PythonArtifactDetailConfig } from '../schemas/PythonArtifactDetailConfig';
5
7
  import type { PackageType } from '../schemas/PackageType';
6
8
  /**
7
9
  * Artifact Detail
8
10
  */
9
- export type ArtifactDetail = (DockerArtifactDetailConfig | HelmArtifactDetailConfig | GenericArtifactDetailConfig | MavenArtifactDetailConfig) & {
11
+ export type ArtifactDetail = (DockerArtifactDetailConfig | HelmArtifactDetailConfig | GenericArtifactDetailConfig | MavenArtifactDetailConfig | NpmArtifactDetailConfig | PythonArtifactDetailConfig) & {
10
12
  createdAt?: string;
11
13
  createdBy?: string;
12
14
  /**
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Config for npm artifact details
3
+ */
4
+ export interface NpmArtifactDetailConfig {
5
+ homepage?: string;
6
+ license: string;
7
+ pullCommand: string;
8
+ repository?: string;
9
+ }
@@ -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,4 +1,4 @@
1
1
  /**
2
2
  * refers to package
3
3
  */
4
- export type PackageType = 'DOCKER' | 'GENERIC' | 'HELM' | 'MAVEN';
4
+ export type PackageType = 'DOCKER' | 'GENERIC' | 'HELM' | 'MAVEN' | 'NPM' | 'PYTHON';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Config for python artifact details
3
+ */
4
+ export interface PythonArtifactDetailConfig {
5
+ homepage?: string;
6
+ license: string;
7
+ pullCommand: string;
8
+ repository?: string;
9
+ }
@@ -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 {};
@@ -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 {};
@@ -8,6 +8,6 @@ import type { AuthType } from '../schemas/AuthType';
8
8
  export interface UpstreamConfig {
9
9
  auth?: UserPassword | Anonymous | AccessKeySecretKey;
10
10
  authType: AuthType;
11
- source?: 'AwsEcr' | 'Custom' | 'Dockerhub' | 'MavenCentral';
11
+ source?: 'AwsEcr' | 'Custom' | 'Dockerhub' | 'MavenCentral' | 'NpmJs' | 'PyPi';
12
12
  url?: string;
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-har-service-client",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Harness HAR Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",