@harnessio/react-har-service-client 0.93.0 → 0.95.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.
Files changed (21) hide show
  1. package/dist/har-service/src/services/hooks/useDeleteSigningKeyV3Mutation.d.ts +2 -2
  2. package/dist/har-service/src/services/hooks/useDeleteSigningKeyV3Mutation.js +2 -2
  3. package/dist/har-service/src/services/hooks/useGetTerraformBackendStateV3Query.d.ts +23 -0
  4. package/dist/har-service/src/services/hooks/useGetTerraformBackendStateV3Query.js +15 -0
  5. package/dist/har-service/src/services/hooks/useListVersionsV3Query.d.ts +9 -0
  6. package/dist/har-service/src/services/index.d.ts +4 -2
  7. package/dist/har-service/src/services/index.js +1 -0
  8. package/dist/har-service/src/services/responses/TerraformBackendStateResponseV3Response.d.ts +4 -0
  9. package/dist/har-service/src/services/schemas/GenerateKeyRequestV3.d.ts +7 -17
  10. package/dist/har-service/src/services/schemas/ImportKeyRequestV3.d.ts +6 -2
  11. package/dist/har-service/src/services/schemas/ImportKeyRequestV3.js +3 -0
  12. package/dist/har-service/src/services/schemas/PackageV3.d.ts +2 -0
  13. package/dist/har-service/src/services/schemas/SigningKeyV3.d.ts +12 -4
  14. package/dist/har-service/src/services/schemas/UpdateKeyRequestV3.d.ts +1 -1
  15. package/dist/har-service/src/services/schemas/VersionStatsV3.d.ts +2 -0
  16. package/dist/har-service/src/services/schemas/VulnerabilityMetadataV3.d.ts +18 -0
  17. package/package.json +1 -1
  18. package/dist/har-service/src/services/schemas/SigningKeyAlgorithmV3.d.ts +0 -6
  19. package/dist/har-service/src/services/schemas/SigningKeyTypeV3.d.ts +0 -6
  20. /package/dist/har-service/src/services/{schemas/SigningKeyAlgorithmV3.js → responses/TerraformBackendStateResponseV3Response.js} +0 -0
  21. /package/dist/har-service/src/services/schemas/{SigningKeyTypeV3.js → VulnerabilityMetadataV3.js} +0 -0
@@ -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';
@@ -745,10 +748,8 @@ export type { SectionType } from './schemas/SectionType';
745
748
  export type { SecurityPolicyFailureDetailConfigV3 } from './schemas/SecurityPolicyFailureDetailConfigV3';
746
749
  export type { SecurityPolicyFailureVulnerabilityV3 } from './schemas/SecurityPolicyFailureVulnerabilityV3';
747
750
  export type { SigningConfig } from './schemas/SigningConfig';
748
- export type { SigningKeyAlgorithmV3 } from './schemas/SigningKeyAlgorithmV3';
749
751
  export type { SigningKeyStatusV3 } from './schemas/SigningKeyStatusV3';
750
752
  export type { SigningKeySummaryV3 } from './schemas/SigningKeySummaryV3';
751
- export type { SigningKeyTypeV3 } from './schemas/SigningKeyTypeV3';
752
753
  export type { SigningKeyV3 } from './schemas/SigningKeyV3';
753
754
  export type { SlsaDetails } from './schemas/SlsaDetails';
754
755
  export type { StartedAtMsV3 } from './schemas/StartedAtMsV3';
@@ -786,6 +787,7 @@ export type { VersionV3 } from './schemas/VersionV3';
786
787
  export type { VersionsStatsRequestInputV3 } from './schemas/VersionsStatsRequestInputV3';
787
788
  export type { VersionsStatsResponseBodyV3 } from './schemas/VersionsStatsResponseBodyV3';
788
789
  export type { VirtualConfig } from './schemas/VirtualConfig';
790
+ export type { VulnerabilityMetadataV3 } from './schemas/VulnerabilityMetadataV3';
789
791
  export type { Webhook } from './schemas/Webhook';
790
792
  export type { WebhookExecRequest } from './schemas/WebhookExecRequest';
791
793
  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;
@@ -23,34 +23,24 @@
23
23
  */
24
24
  export interface GenerateKeyRequestV3 {
25
25
  /**
26
- * Underlying cryptographic algorithm:
27
- * - RSA: 2048/3072/4096-bit RSA (compatible with all package types)
28
- * - Ed25519: Modern elliptic curve algorithm (GPG only, fixed size)
26
+ * Underlying cryptographic algorithm of a signing key. Known values include: RSA, ED25519, ECDSA. This field is extensible; clients must handle unknown values. Note that only RSA and ED25519 can be generated; ECDSA is only observed on imported keys.
29
27
  *
28
+ * @example "RSA"
30
29
  */
31
- algorithm: 'Ed25519' | 'RSA';
30
+ algorithm: string;
32
31
  /**
33
32
  * Optional expiration timestamp in Unix milliseconds
34
33
  * @format int64
35
34
  */
36
- expiresAt?: number | null;
35
+ expirationAt?: number | null;
37
36
  /**
38
37
  * Human-readable name for the key
39
38
  */
40
39
  name: string;
41
40
  /**
42
- * Organization identifier (optional, for org-level keys)
43
- */
44
- orgIdentifier?: string | null;
45
- /**
46
- * Project identifier (optional, for project-level keys)
47
- */
48
- projectIdentifier?: string | null;
49
- /**
50
- * Type of key to generate:
51
- * - GPG: OpenPGP key for package signing (Debian, RPM, Alpine)
52
- * - RSA: Raw RSA key for direct signing operations
41
+ * Cryptographic system of a signing key. Known values include: GPG (for Debian, RPM, Alpine), RSA (for direct signing operations). This field is extensible; clients must handle unknown values.
53
42
  *
43
+ * @example "GPG"
54
44
  */
55
- type: 'GPG' | 'RSA';
45
+ type: string;
56
46
  }
@@ -1,4 +1,3 @@
1
- import type { SigningKeyTypeV3 } from '../schemas/SigningKeyTypeV3';
2
1
  /**
3
2
  * Request to import an existing signing key from secret manager. `type` is the cryptographic system of the key being imported.
4
3
  *
@@ -41,5 +40,10 @@ export interface ImportKeyRequestV3 {
41
40
  * Space path for the private key secret (e.g., "accountId/orgId/projectId")
42
41
  */
43
42
  privateKeySecretSpacePath: string;
44
- type: SigningKeyTypeV3;
43
+ /**
44
+ * Cryptographic system of a signing key. Known values include: GPG (for Debian, RPM, Alpine), RSA (for direct signing operations). This field is extensible; clients must handle unknown values.
45
+ *
46
+ * @example "GPG"
47
+ */
48
+ type: string;
45
49
  }
@@ -1 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
1
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,14 +1,17 @@
1
- import type { SigningKeyAlgorithmV3 } from '../schemas/SigningKeyAlgorithmV3';
2
1
  import type { CreatedAtMsV3 } from '../schemas/CreatedAtMsV3';
3
2
  import type { UserInfoV3 } from '../schemas/UserInfoV3';
4
3
  import type { ModifiedAtMsV3 } from '../schemas/ModifiedAtMsV3';
5
4
  import type { SigningKeyStatusV3 } from '../schemas/SigningKeyStatusV3';
6
- import type { SigningKeyTypeV3 } from '../schemas/SigningKeyTypeV3';
7
5
  /**
8
6
  * A signing key used for repository metadata signing (Debian, Alpine, etc.)
9
7
  */
10
8
  export interface SigningKeyV3 {
11
- algorithm: SigningKeyAlgorithmV3;
9
+ /**
10
+ * Underlying cryptographic algorithm of a signing key. Known values include: RSA, ED25519, ECDSA. This field is extensible; clients must handle unknown values. Note that only RSA and ED25519 can be generated; ECDSA is only observed on imported keys.
11
+ *
12
+ * @example "RSA"
13
+ */
14
+ algorithm: string;
12
15
  createdAt: CreatedAtMsV3;
13
16
  createdBy?: UserInfoV3;
14
17
  /**
@@ -48,6 +51,11 @@ export interface SigningKeyV3 {
48
51
  */
49
52
  source: 'GENERATED' | 'IMPORTED';
50
53
  status: SigningKeyStatusV3;
51
- type: SigningKeyTypeV3;
54
+ /**
55
+ * Cryptographic system of a signing key. Known values include: GPG (for Debian, RPM, Alpine), RSA (for direct signing operations). This field is extensible; clients must handle unknown values.
56
+ *
57
+ * @example "GPG"
58
+ */
59
+ type: string;
52
60
  updatedBy?: UserInfoV3;
53
61
  }
@@ -6,5 +6,5 @@ export interface UpdateKeyRequestV3 {
6
6
  * New status for the key (cannot transition from REVOKED or DELETED). Intentionally a closed subset of `SigningKeyStatusV3` rather than an extensible enum: DELETED is reachable only via `DELETE /signing-keys/{id}`, which emits a distinct audit event.
7
7
  *
8
8
  */
9
- status: 'ACTIVE' | 'INACTIVE' | 'REVOKED' | null;
9
+ status: 'ACTIVE' | 'INACTIVE' | 'REVOKED';
10
10
  }
@@ -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
+ }
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.95.0",
4
4
  "description": "Harness HAR Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -1,6 +0,0 @@
1
- /**
2
- * Underlying cryptographic algorithm of a signing key. Known values include: RSA, ED25519, ECDSA. This field is extensible; clients must handle unknown values. Note that only RSA and ED25519 can be generated; ECDSA is only observed on imported keys.
3
- *
4
- * @example "RSA"
5
- */
6
- export type SigningKeyAlgorithmV3 = string;
@@ -1,6 +0,0 @@
1
- /**
2
- * Cryptographic system of a signing key. Known values include: GPG (for Debian, RPM, Alpine), RSA (for direct signing operations). This field is extensible; clients must handle unknown values.
3
- *
4
- * @example "GPG"
5
- */
6
- export type SigningKeyTypeV3 = string;