@harnessio/react-har-service-client 0.93.0 → 0.94.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.
@@ -16,8 +16,8 @@ export interface DeleteSigningKeyV3Props extends DeleteSigningKeyV3MutationPathP
16
16
  export declare function deleteSigningKeyV3(props: DeleteSigningKeyV3Props): Promise<DeleteSigningKeyV3OkResponse>;
17
17
  /**
18
18
  * Soft-deletes a signing key by marking it as DELETED. The key metadata is retained
19
- * for audit purposes. If the key is attached to any registries, signing will be
20
- * automatically disabled on those registries.
19
+ * for audit purposes. The key must not be attached to any registry: if it is, the
20
+ * request fails with 409 and the error message lists every registry to detach first.
21
21
  *
22
22
  */
23
23
  export declare function useDeleteSigningKeyV3Mutation(options?: Omit<UseMutationOptions<DeleteSigningKeyV3OkResponse, DeleteSigningKeyV3ErrorResponse, DeleteSigningKeyV3Props>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteSigningKeyV3OkResponse, ErrorV3, DeleteSigningKeyV3Props, unknown>;
@@ -8,8 +8,8 @@ export function deleteSigningKeyV3(props) {
8
8
  }
9
9
  /**
10
10
  * Soft-deletes a signing key by marking it as DELETED. The key metadata is retained
11
- * for audit purposes. If the key is attached to any registries, signing will be
12
- * automatically disabled on those registries.
11
+ * for audit purposes. The key must not be attached to any registry: if it is, the
12
+ * request fails with 409 and the error message lists every registry to detach first.
13
13
  *
14
14
  */
15
15
  export function useDeleteSigningKeyV3Mutation(options) {
@@ -0,0 +1,23 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { TerraformBackendStateResponseV3Response } from '../responses/TerraformBackendStateResponseV3Response';
3
+ import type { RedirectV3Response } from '../responses/RedirectV3Response';
4
+ import type { ErrorV3 } from '../schemas/ErrorV3';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface GetTerraformBackendStateV3QueryPathParams {
8
+ id: string;
9
+ }
10
+ export interface GetTerraformBackendStateV3QueryQueryParams {
11
+ account_identifier: string;
12
+ }
13
+ export type GetTerraformBackendStateV3OkResponse = ResponseWithPagination<TerraformBackendStateResponseV3Response>;
14
+ export type GetTerraformBackendStateV3ErrorResponse = RedirectV3Response | ErrorV3;
15
+ export interface GetTerraformBackendStateV3Props extends GetTerraformBackendStateV3QueryPathParams, Omit<FetcherOptions<GetTerraformBackendStateV3QueryQueryParams, unknown>, 'url'> {
16
+ queryParams: GetTerraformBackendStateV3QueryQueryParams;
17
+ }
18
+ export declare function getTerraformBackendStateV3(props: GetTerraformBackendStateV3Props): Promise<GetTerraformBackendStateV3OkResponse>;
19
+ /**
20
+ * Returns the raw Terraform state (JSON) captured at a specific version of a Terraform Backend workspace. Resolves the version id to its serial and streams the state file stored at that serial, enabling a version to be diffed against an earlier one. When the content is stored remotely the response is a `302` redirect to the state file instead of the state bytes.
21
+ *
22
+ */
23
+ export declare function useGetTerraformBackendStateV3Query(props: GetTerraformBackendStateV3Props, options?: Omit<UseQueryOptions<GetTerraformBackendStateV3OkResponse, GetTerraformBackendStateV3ErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetTerraformBackendStateV3OkResponse, unknown>;
@@ -0,0 +1,15 @@
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 getTerraformBackendStateV3(props) {
7
+ return fetcher(Object.assign({ url: `/v3/versions/${props.id}/terraform-backend/state`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns the raw Terraform state (JSON) captured at a specific version of a Terraform Backend workspace. Resolves the version id to its serial and streams the state file stored at that serial, enabling a version to be diffed against an earlier one. When the content is stored remotely the response is a `302` redirect to the state file instead of the state bytes.
11
+ *
12
+ */
13
+ export function useGetTerraformBackendStateV3Query(props, options) {
14
+ return useQuery(['GetTerraformBackendStateV3', props.id, props.queryParams], ({ signal }) => getTerraformBackendStateV3(Object.assign(Object.assign({}, props), { signal })), options);
15
+ }
@@ -29,6 +29,15 @@ export interface ListVersionsV3QueryQueryParams {
29
29
  search_term?: string;
30
30
  include_meta?: boolean;
31
31
  uploaded_by?: number[];
32
+ /**
33
+ * @example "model"
34
+ */
35
+ package_kind?: string;
36
+ tags?: string[];
37
+ /**
38
+ * refers to type of registry i.e virtual or upstream
39
+ */
40
+ registry_type?: 'UPSTREAM' | 'VIRTUAL';
32
41
  }
33
42
  export type ListVersionsV3OkResponse = ResponseWithPagination<ListVersionResponseV3Response>;
34
43
  export type ListVersionsV3ErrorResponse = ErrorV3;
@@ -193,6 +193,8 @@ export type { GetStorageDetailsErrorResponse, GetStorageDetailsOkResponse, GetSt
193
193
  export { getStorageDetails, useGetStorageDetailsQuery } from './hooks/useGetStorageDetailsQuery';
194
194
  export type { GetSystemInfoV3ErrorResponse, GetSystemInfoV3OkResponse, GetSystemInfoV3Props, GetSystemInfoV3QueryQueryParams, } from './hooks/useGetSystemInfoV3Query';
195
195
  export { getSystemInfoV3, useGetSystemInfoV3Query } from './hooks/useGetSystemInfoV3Query';
196
+ export type { GetTerraformBackendStateV3ErrorResponse, GetTerraformBackendStateV3OkResponse, GetTerraformBackendStateV3Props, GetTerraformBackendStateV3QueryPathParams, GetTerraformBackendStateV3QueryQueryParams, } from './hooks/useGetTerraformBackendStateV3Query';
197
+ export { getTerraformBackendStateV3, useGetTerraformBackendStateV3Query, } from './hooks/useGetTerraformBackendStateV3Query';
196
198
  export type { GetTrigramIndexStatusV3ErrorResponse, GetTrigramIndexStatusV3OkResponse, GetTrigramIndexStatusV3Props, GetTrigramIndexStatusV3QueryQueryParams, } from './hooks/useGetTrigramIndexStatusV3Query';
197
199
  export { getTrigramIndexStatusV3, useGetTrigramIndexStatusV3Query, } from './hooks/useGetTrigramIndexStatusV3Query';
198
200
  export type { GetVersionMetadataV3ErrorResponse, GetVersionMetadataV3OkResponse, GetVersionMetadataV3Props, GetVersionMetadataV3QueryPathParams, GetVersionMetadataV3QueryQueryParams, } from './hooks/useGetVersionMetadataV3Query';
@@ -476,6 +478,7 @@ export type { SigningKeySummaryResponseV3Response } from './responses/SigningKey
476
478
  export type { StorageDetailsResponseResponse } from './responses/StorageDetailsResponseResponse';
477
479
  export type { SuccessResponse } from './responses/SuccessResponse';
478
480
  export type { SystemInfoResponseV3Response } from './responses/SystemInfoResponseV3Response';
481
+ export type { TerraformBackendStateResponseV3Response } from './responses/TerraformBackendStateResponseV3Response';
479
482
  export type { TreeResponseV3Response } from './responses/TreeResponseV3Response';
480
483
  export type { UnauthenticatedResponse } from './responses/UnauthenticatedResponse';
481
484
  export type { UnauthorizedResponse } from './responses/UnauthorizedResponse';
@@ -786,6 +789,7 @@ export type { VersionV3 } from './schemas/VersionV3';
786
789
  export type { VersionsStatsRequestInputV3 } from './schemas/VersionsStatsRequestInputV3';
787
790
  export type { VersionsStatsResponseBodyV3 } from './schemas/VersionsStatsResponseBodyV3';
788
791
  export type { VirtualConfig } from './schemas/VirtualConfig';
792
+ export type { VulnerabilityMetadataV3 } from './schemas/VulnerabilityMetadataV3';
789
793
  export type { Webhook } from './schemas/Webhook';
790
794
  export type { WebhookExecRequest } from './schemas/WebhookExecRequest';
791
795
  export type { WebhookExecResponse } from './schemas/WebhookExecResponse';
@@ -95,6 +95,7 @@ export { getSigningKeySummaryV3, useGetSigningKeySummaryV3Query, } from './hooks
95
95
  export { getSigningKeyV3, useGetSigningKeyV3Query } from './hooks/useGetSigningKeyV3Query';
96
96
  export { getStorageDetails, useGetStorageDetailsQuery } from './hooks/useGetStorageDetailsQuery';
97
97
  export { getSystemInfoV3, useGetSystemInfoV3Query } from './hooks/useGetSystemInfoV3Query';
98
+ export { getTerraformBackendStateV3, useGetTerraformBackendStateV3Query, } from './hooks/useGetTerraformBackendStateV3Query';
98
99
  export { getTrigramIndexStatusV3, useGetTrigramIndexStatusV3Query, } from './hooks/useGetTrigramIndexStatusV3Query';
99
100
  export { getVersionMetadataV3, useGetVersionMetadataV3Query, } from './hooks/useGetVersionMetadataV3Query';
100
101
  export { getVersionsStatsV3, useGetVersionsStatsV3Mutation, } from './hooks/useGetVersionsStatsV3Mutation';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @format binary
3
+ */
4
+ export type TerraformBackendStateResponseV3Response = string;
@@ -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,5 +1,6 @@
1
1
  import type { DeletedAtMsV3 } from '../schemas/DeletedAtMsV3';
2
2
  import type { UserInfoV3 } from '../schemas/UserInfoV3';
3
+ import type { ResourceMetadataV3 } from '../schemas/ResourceMetadataV3';
3
4
  import type { ModifiedAtMsV3 } from '../schemas/ModifiedAtMsV3';
4
5
  import type { OrgIdentifier } from '../schemas/OrgIdentifier';
5
6
  import type { PackageKindV3 } from '../schemas/PackageKindV3';
@@ -25,6 +26,7 @@ export interface PackageV3 {
25
26
  latestVersionArtifactKey?: {
26
27
  [key: string]: any;
27
28
  };
29
+ metadata?: ResourceMetadataV3;
28
30
  modifiedAt?: ModifiedAtMsV3;
29
31
  modifiedBy?: UserInfoV3;
30
32
  name: string;
@@ -1,6 +1,7 @@
1
1
  import type { DeploymentMetadataV3 } from '../schemas/DeploymentMetadataV3';
2
2
  import type { FirewallModeV3 } from '../schemas/FirewallModeV3';
3
3
  import type { ScanStatusV3 } from '../schemas/ScanStatusV3';
4
+ import type { VulnerabilityMetadataV3 } from '../schemas/VulnerabilityMetadataV3';
4
5
  /**
5
6
  * Statistics for a single version
6
7
  */
@@ -36,4 +37,5 @@ export interface VersionStatsV3 {
36
37
  * Total size of the version (human-readable format)
37
38
  */
38
39
  size?: string;
40
+ vulnerabilityMetadata?: VulnerabilityMetadataV3;
39
41
  }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * OSS vulnerability metadata for a version from component service
3
+ */
4
+ export interface VulnerabilityMetadataV3 {
5
+ abandoned?: boolean;
6
+ criticalVulnerabilities?: number;
7
+ highVulnerabilities?: number;
8
+ infoVulnerabilities?: number;
9
+ isMalicious?: boolean;
10
+ lowVulnerabilities?: number;
11
+ mediumVulnerabilities?: number;
12
+ ossRiskLevel?: string;
13
+ /**
14
+ * Package URL (PURL) identifying the package version
15
+ */
16
+ purl?: string;
17
+ totalVulnerabilities?: number;
18
+ }
@@ -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.93.0",
3
+ "version": "0.94.0",
4
4
  "description": "Harness HAR Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",