@harnessio/react-har-service-v2-client 0.3.0 → 0.4.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.
@@ -30,7 +30,7 @@ export function fetcher(options) {
30
30
  if (fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.urlInterceptor) {
31
31
  finalUrl = (_a = fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.urlInterceptor) === null || _a === void 0 ? void 0 : _a.call(fetcherCallbacks, finalUrl);
32
32
  }
33
- let request = new Request(finalUrl, Object.assign({ headers: Object.assign(Object.assign({ Authorization: `Bearer ${token}` }, headers), customHeaders), body: body ? JSON.stringify(body) : undefined }, rest));
33
+ let request = new Request(finalUrl, Object.assign({ headers: Object.assign(Object.assign(Object.assign({}, (token ? { Authorization: `Bearer ${token}` } : {})), headers), customHeaders), body: body ? JSON.stringify(body) : undefined }, rest));
34
34
  if (fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.requestInterceptor) {
35
35
  request = fetcherCallbacks.requestInterceptor(request.clone());
36
36
  }
@@ -7,6 +7,11 @@ import type { NotFoundResponse } from '../responses/NotFoundResponse';
7
7
  import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
8
8
  import type { ResponseWithPagination } from '../helpers';
9
9
  import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export interface RestoreArtifactMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
10
15
  export type RestoreArtifactRequestBody = {
11
16
  /**
12
17
  * Package/image identifier (can contain forward slashes)
@@ -23,7 +28,8 @@ export type RestoreArtifactRequestBody = {
23
28
  };
24
29
  export type RestoreArtifactOkResponse = ResponseWithPagination<SuccessResponse>;
25
30
  export type RestoreArtifactErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
26
- export interface RestoreArtifactProps extends Omit<FetcherOptions<unknown, RestoreArtifactRequestBody>, 'url'> {
31
+ export interface RestoreArtifactProps extends Omit<FetcherOptions<RestoreArtifactMutationQueryParams, RestoreArtifactRequestBody>, 'url'> {
32
+ queryParams: RestoreArtifactMutationQueryParams;
27
33
  body: RestoreArtifactRequestBody;
28
34
  }
29
35
  export declare function restoreArtifact(props: RestoreArtifactProps): Promise<RestoreArtifactOkResponse>;
@@ -7,6 +7,11 @@ import type { NotFoundResponse } from '../responses/NotFoundResponse';
7
7
  import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
8
8
  import type { ResponseWithPagination } from '../helpers';
9
9
  import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export interface RestorePackageMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
10
15
  export type RestorePackageRequestBody = {
11
16
  /**
12
17
  * Package/image identifier (can contain forward slashes)
@@ -19,7 +24,8 @@ export type RestorePackageRequestBody = {
19
24
  };
20
25
  export type RestorePackageOkResponse = ResponseWithPagination<SuccessResponse>;
21
26
  export type RestorePackageErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
22
- export interface RestorePackageProps extends Omit<FetcherOptions<unknown, RestorePackageRequestBody>, 'url'> {
27
+ export interface RestorePackageProps extends Omit<FetcherOptions<RestorePackageMutationQueryParams, RestorePackageRequestBody>, 'url'> {
28
+ queryParams: RestorePackageMutationQueryParams;
23
29
  body: RestorePackageRequestBody;
24
30
  }
25
31
  export declare function restorePackage(props: RestorePackageProps): Promise<RestorePackageOkResponse>;
@@ -7,6 +7,11 @@ import type { NotFoundResponse } from '../responses/NotFoundResponse';
7
7
  import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
8
8
  import type { ResponseWithPagination } from '../helpers';
9
9
  import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export interface RestoreRegistryMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
10
15
  export type RestoreRegistryRequestBody = {
11
16
  /**
12
17
  * Registry identifier (can contain forward slashes)
@@ -15,7 +20,8 @@ export type RestoreRegistryRequestBody = {
15
20
  };
16
21
  export type RestoreRegistryOkResponse = ResponseWithPagination<SuccessResponse>;
17
22
  export type RestoreRegistryErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
18
- export interface RestoreRegistryProps extends Omit<FetcherOptions<unknown, RestoreRegistryRequestBody>, 'url'> {
23
+ export interface RestoreRegistryProps extends Omit<FetcherOptions<RestoreRegistryMutationQueryParams, RestoreRegistryRequestBody>, 'url'> {
24
+ queryParams: RestoreRegistryMutationQueryParams;
19
25
  body: RestoreRegistryRequestBody;
20
26
  }
21
27
  export declare function restoreRegistry(props: RestoreRegistryProps): Promise<RestoreRegistryOkResponse>;
@@ -7,6 +7,11 @@ import type { NotFoundResponse } from '../responses/NotFoundResponse';
7
7
  import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
8
8
  import type { ResponseWithPagination } from '../helpers';
9
9
  import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export interface SoftDeleteArtifactMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
10
15
  export type SoftDeleteArtifactRequestBody = {
11
16
  /**
12
17
  * Package/image identifier (can contain forward slashes)
@@ -23,7 +28,8 @@ export type SoftDeleteArtifactRequestBody = {
23
28
  };
24
29
  export type SoftDeleteArtifactOkResponse = ResponseWithPagination<SuccessResponse>;
25
30
  export type SoftDeleteArtifactErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
26
- export interface SoftDeleteArtifactProps extends Omit<FetcherOptions<unknown, SoftDeleteArtifactRequestBody>, 'url'> {
31
+ export interface SoftDeleteArtifactProps extends Omit<FetcherOptions<SoftDeleteArtifactMutationQueryParams, SoftDeleteArtifactRequestBody>, 'url'> {
32
+ queryParams: SoftDeleteArtifactMutationQueryParams;
27
33
  body: SoftDeleteArtifactRequestBody;
28
34
  }
29
35
  export declare function softDeleteArtifact(props: SoftDeleteArtifactProps): Promise<SoftDeleteArtifactOkResponse>;
@@ -7,6 +7,11 @@ import type { NotFoundResponse } from '../responses/NotFoundResponse';
7
7
  import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
8
8
  import type { ResponseWithPagination } from '../helpers';
9
9
  import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export interface SoftDeletePackageMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
10
15
  export type SoftDeletePackageRequestBody = {
11
16
  /**
12
17
  * Package/image identifier (can contain forward slashes)
@@ -19,7 +24,8 @@ export type SoftDeletePackageRequestBody = {
19
24
  };
20
25
  export type SoftDeletePackageOkResponse = ResponseWithPagination<SuccessResponse>;
21
26
  export type SoftDeletePackageErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
22
- export interface SoftDeletePackageProps extends Omit<FetcherOptions<unknown, SoftDeletePackageRequestBody>, 'url'> {
27
+ export interface SoftDeletePackageProps extends Omit<FetcherOptions<SoftDeletePackageMutationQueryParams, SoftDeletePackageRequestBody>, 'url'> {
28
+ queryParams: SoftDeletePackageMutationQueryParams;
23
29
  body: SoftDeletePackageRequestBody;
24
30
  }
25
31
  export declare function softDeletePackage(props: SoftDeletePackageProps): Promise<SoftDeletePackageOkResponse>;
@@ -7,6 +7,11 @@ import type { NotFoundResponse } from '../responses/NotFoundResponse';
7
7
  import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
8
8
  import type { ResponseWithPagination } from '../helpers';
9
9
  import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export interface SoftDeleteRegistryMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
10
15
  export type SoftDeleteRegistryRequestBody = {
11
16
  /**
12
17
  * Registry identifier (can contain forward slashes)
@@ -15,7 +20,8 @@ export type SoftDeleteRegistryRequestBody = {
15
20
  };
16
21
  export type SoftDeleteRegistryOkResponse = ResponseWithPagination<SuccessResponse>;
17
22
  export type SoftDeleteRegistryErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
18
- export interface SoftDeleteRegistryProps extends Omit<FetcherOptions<unknown, SoftDeleteRegistryRequestBody>, 'url'> {
23
+ export interface SoftDeleteRegistryProps extends Omit<FetcherOptions<SoftDeleteRegistryMutationQueryParams, SoftDeleteRegistryRequestBody>, 'url'> {
24
+ queryParams: SoftDeleteRegistryMutationQueryParams;
19
25
  body: SoftDeleteRegistryRequestBody;
20
26
  }
21
27
  export declare function softDeleteRegistry(props: SoftDeleteRegistryProps): Promise<SoftDeleteRegistryOkResponse>;
@@ -17,17 +17,17 @@ export type { ListPackagesErrorResponse, ListPackagesOkResponse, ListPackagesPro
17
17
  export { listPackages, useListPackagesQuery } from './hooks/useListPackagesQuery';
18
18
  export type { ListRegistriesErrorResponse, ListRegistriesOkResponse, ListRegistriesProps, ListRegistriesQueryQueryParams, } from './hooks/useListRegistriesQuery';
19
19
  export { listRegistries, useListRegistriesQuery } from './hooks/useListRegistriesQuery';
20
- export type { RestoreArtifactErrorResponse, RestoreArtifactOkResponse, RestoreArtifactProps, RestoreArtifactRequestBody, } from './hooks/useRestoreArtifactMutation';
20
+ export type { RestoreArtifactErrorResponse, RestoreArtifactMutationQueryParams, RestoreArtifactOkResponse, RestoreArtifactProps, RestoreArtifactRequestBody, } from './hooks/useRestoreArtifactMutation';
21
21
  export { restoreArtifact, useRestoreArtifactMutation } from './hooks/useRestoreArtifactMutation';
22
- export type { RestorePackageErrorResponse, RestorePackageOkResponse, RestorePackageProps, RestorePackageRequestBody, } from './hooks/useRestorePackageMutation';
22
+ export type { RestorePackageErrorResponse, RestorePackageMutationQueryParams, RestorePackageOkResponse, RestorePackageProps, RestorePackageRequestBody, } from './hooks/useRestorePackageMutation';
23
23
  export { restorePackage, useRestorePackageMutation } from './hooks/useRestorePackageMutation';
24
- export type { RestoreRegistryErrorResponse, RestoreRegistryOkResponse, RestoreRegistryProps, RestoreRegistryRequestBody, } from './hooks/useRestoreRegistryMutation';
24
+ export type { RestoreRegistryErrorResponse, RestoreRegistryMutationQueryParams, RestoreRegistryOkResponse, RestoreRegistryProps, RestoreRegistryRequestBody, } from './hooks/useRestoreRegistryMutation';
25
25
  export { restoreRegistry, useRestoreRegistryMutation } from './hooks/useRestoreRegistryMutation';
26
- export type { SoftDeleteArtifactErrorResponse, SoftDeleteArtifactOkResponse, SoftDeleteArtifactProps, SoftDeleteArtifactRequestBody, } from './hooks/useSoftDeleteArtifactMutation';
26
+ export type { SoftDeleteArtifactErrorResponse, SoftDeleteArtifactMutationQueryParams, SoftDeleteArtifactOkResponse, SoftDeleteArtifactProps, SoftDeleteArtifactRequestBody, } from './hooks/useSoftDeleteArtifactMutation';
27
27
  export { softDeleteArtifact, useSoftDeleteArtifactMutation, } from './hooks/useSoftDeleteArtifactMutation';
28
- export type { SoftDeletePackageErrorResponse, SoftDeletePackageOkResponse, SoftDeletePackageProps, SoftDeletePackageRequestBody, } from './hooks/useSoftDeletePackageMutation';
28
+ export type { SoftDeletePackageErrorResponse, SoftDeletePackageMutationQueryParams, SoftDeletePackageOkResponse, SoftDeletePackageProps, SoftDeletePackageRequestBody, } from './hooks/useSoftDeletePackageMutation';
29
29
  export { softDeletePackage, useSoftDeletePackageMutation, } from './hooks/useSoftDeletePackageMutation';
30
- export type { SoftDeleteRegistryErrorResponse, SoftDeleteRegistryOkResponse, SoftDeleteRegistryProps, SoftDeleteRegistryRequestBody, } from './hooks/useSoftDeleteRegistryMutation';
30
+ export type { SoftDeleteRegistryErrorResponse, SoftDeleteRegistryMutationQueryParams, SoftDeleteRegistryOkResponse, SoftDeleteRegistryProps, SoftDeleteRegistryRequestBody, } from './hooks/useSoftDeleteRegistryMutation';
31
31
  export { softDeleteRegistry, useSoftDeleteRegistryMutation, } from './hooks/useSoftDeleteRegistryMutation';
32
32
  export type { UpdateMetadataErrorResponse, UpdateMetadataMutationQueryParams, UpdateMetadataOkResponse, UpdateMetadataProps, UpdateMetadataRequestBody, } from './hooks/useUpdateMetadataMutation';
33
33
  export { updateMetadata, useUpdateMetadataMutation } from './hooks/useUpdateMetadataMutation';
@@ -7,6 +7,11 @@ import type { PackageType } from '../schemas/PackageType';
7
7
  */
8
8
  export interface ArtifactMetadata {
9
9
  artifactType?: ArtifactType;
10
+ /**
11
+ * Timestamp when the artifact was soft-deleted
12
+ * @format date-time
13
+ */
14
+ deletedAt?: string;
10
15
  deploymentMetadata?: DeploymentMetadata;
11
16
  digestCount?: number;
12
17
  /**
@@ -14,7 +19,10 @@ export interface ArtifactMetadata {
14
19
  */
15
20
  downloadsCount?: number;
16
21
  fileCount?: number;
17
- isDeleted?: boolean;
22
+ /**
23
+ * True if the artifact, its parent package (image), or registry is soft-deleted (cascade)
24
+ */
25
+ isDeleted: boolean;
18
26
  isQuarantined?: boolean;
19
27
  lastModified: string;
20
28
  metadata?: ArtifactEntityMetadata;
@@ -5,11 +5,19 @@ import type { PackageType } from '../schemas/PackageType';
5
5
  */
6
6
  export interface PackageMetadata {
7
7
  artifactType?: ArtifactType;
8
+ /**
9
+ * Timestamp when the package (image) was soft-deleted
10
+ * @format date-time
11
+ */
12
+ deletedAt?: string;
8
13
  /**
9
14
  * @format int64
10
15
  */
11
16
  downloadsCount?: number;
12
- isDeleted?: boolean;
17
+ /**
18
+ * True if the package or its parent registry is soft-deleted (cascade)
19
+ */
20
+ isDeleted: boolean;
13
21
  isPublic: boolean;
14
22
  isQuarantined?: boolean;
15
23
  lastModified?: string;
@@ -8,13 +8,21 @@ export interface RegistryMetadata {
8
8
  * @format int64
9
9
  */
10
10
  artifactsCount?: number;
11
+ /**
12
+ * Timestamp when the registry was soft-deleted
13
+ * @format date-time
14
+ */
15
+ deletedAt?: string;
11
16
  description?: string;
12
17
  /**
13
18
  * @format int64
14
19
  */
15
20
  downloadsCount?: number;
16
21
  identifier: string;
17
- isDeleted?: boolean;
22
+ /**
23
+ * True if the registry is soft-deleted
24
+ */
25
+ isDeleted: boolean;
18
26
  isPublic: boolean;
19
27
  lastModified?: string;
20
28
  packageType: PackageType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-har-service-v2-client",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Harness HAR Service V2 APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",