@harnessio/react-har-service-client 0.62.0 → 0.63.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 (24) hide show
  1. package/dist/har-service/src/services/hooks/useGetAllArtifactVersionsQuery.d.ts +4 -0
  2. package/dist/har-service/src/services/hooks/useGetAllArtifactsQuery.d.ts +41 -0
  3. package/dist/har-service/src/services/hooks/{useGetAllHarnessArtifactsQuery.js → useGetAllArtifactsQuery.js} +4 -4
  4. package/dist/har-service/src/services/hooks/useGetLifecycleStatsV3Query.d.ts +3 -0
  5. package/dist/har-service/src/services/hooks/useListLifecycleExecutionItemsV3Query.d.ts +1 -3
  6. package/dist/har-service/src/services/hooks/useListLifecycleExecutionsV3Query.d.ts +1 -1
  7. package/dist/har-service/src/services/index.d.ts +4 -2
  8. package/dist/har-service/src/services/index.js +1 -1
  9. package/dist/har-service/src/services/schemas/ArtifactMetadata.d.ts +3 -0
  10. package/dist/har-service/src/services/schemas/ArtifactScanDetailsV3.d.ts +4 -0
  11. package/dist/har-service/src/services/schemas/LifecycleExecutionItemResponseV3.d.ts +2 -5
  12. package/dist/har-service/src/services/schemas/LifecycleExecutionResponseV3.d.ts +9 -8
  13. package/dist/har-service/src/services/schemas/LifecycleRuleResponseV3.d.ts +4 -0
  14. package/dist/har-service/src/services/schemas/LifecycleStatsResponseV3.d.ts +1 -2
  15. package/dist/har-service/src/services/schemas/OrgIdentifier.d.ts +1 -0
  16. package/dist/har-service/src/services/schemas/OrgIdentifier.js +4 -0
  17. package/dist/har-service/src/services/schemas/PipelineBuildInfoViolationV3.d.ts +5 -0
  18. package/dist/har-service/src/services/schemas/PipelineBuildInfoViolationV3.js +0 -3
  19. package/dist/har-service/src/services/schemas/ProjectIdentifier.d.ts +1 -0
  20. package/dist/har-service/src/services/schemas/ProjectIdentifier.js +4 -0
  21. package/dist/har-service/src/services/schemas/Registry.d.ts +1 -1
  22. package/dist/har-service/src/services/schemas/UserPassword.d.ts +3 -0
  23. package/package.json +1 -1
  24. package/dist/har-service/src/services/hooks/useGetAllHarnessArtifactsQuery.d.ts +0 -41
@@ -26,6 +26,10 @@ export interface GetAllArtifactVersionsQueryQueryParams {
26
26
  sort_order?: string;
27
27
  sort_field?: string;
28
28
  search_term?: string;
29
+ /**
30
+ * @default "exclude"
31
+ */
32
+ deleted?: 'exclude' | 'include' | 'only';
29
33
  }
30
34
  export type GetAllArtifactVersionsOkResponse = ResponseWithPagination<ListArtifactVersionResponseResponse>;
31
35
  export type GetAllArtifactVersionsErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
@@ -0,0 +1,41 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ListArtifactResponseResponse } from '../responses/ListArtifactResponseResponse';
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 GetAllArtifactsQueryPathParams {
11
+ space_ref: string;
12
+ }
13
+ export interface GetAllArtifactsQueryQueryParams {
14
+ reg_identifier?: string[];
15
+ /**
16
+ * @format int64
17
+ * @default 1
18
+ */
19
+ page?: number;
20
+ /**
21
+ * @format int64
22
+ * @default 20
23
+ */
24
+ size?: number;
25
+ sort_order?: string;
26
+ sort_field?: string;
27
+ search_term?: string;
28
+ latest_version?: boolean;
29
+ deployed_artifact?: boolean;
30
+ package_type?: string[];
31
+ }
32
+ export type GetAllArtifactsOkResponse = ResponseWithPagination<ListArtifactResponseResponse>;
33
+ export type GetAllArtifactsErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
34
+ export interface GetAllArtifactsProps extends GetAllArtifactsQueryPathParams, Omit<FetcherOptions<GetAllArtifactsQueryQueryParams, unknown>, 'url'> {
35
+ queryParams: GetAllArtifactsQueryQueryParams;
36
+ }
37
+ export declare function getAllArtifacts(props: GetAllArtifactsProps): Promise<GetAllArtifactsOkResponse>;
38
+ /**
39
+ * Lists all the artifacts
40
+ */
41
+ export declare function useGetAllArtifactsQuery(props: GetAllArtifactsProps, options?: Omit<UseQueryOptions<GetAllArtifactsOkResponse, GetAllArtifactsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetAllArtifactsOkResponse, import("..").Error>;
@@ -3,12 +3,12 @@
3
3
  // Please do not modify this code directly.
4
4
  import { useQuery } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
- export function getAllHarnessArtifacts(props) {
6
+ export function getAllArtifacts(props) {
7
7
  return fetcher(Object.assign({ url: `/v1/spaces/${props.space_ref}/artifacts`, method: 'GET' }, props));
8
8
  }
9
9
  /**
10
- * Lists all the Harness Artifacts.
10
+ * Lists all the artifacts
11
11
  */
12
- export function useGetAllHarnessArtifactsQuery(props, options) {
13
- return useQuery(['GetAllHarnessArtifacts', props.space_ref, props.queryParams], ({ signal }) => getAllHarnessArtifacts(Object.assign(Object.assign({}, props), { signal })), options);
12
+ export function useGetAllArtifactsQuery(props, options) {
13
+ return useQuery(['GetAllArtifacts', props.space_ref, props.queryParams], ({ signal }) => getAllArtifacts(Object.assign(Object.assign({}, props), { signal })), options);
14
14
  }
@@ -7,8 +7,11 @@ export interface GetLifecycleStatsV3QueryQueryParams {
7
7
  account_identifier: string;
8
8
  org_identifier?: string;
9
9
  project_identifier?: string;
10
+ search_term?: string;
10
11
  scope?: 'ancestors' | 'descendants' | 'none';
11
12
  package_types?: string[];
13
+ registry_ids?: string[];
14
+ action?: 'DELETE' | 'PROTECT';
12
15
  }
13
16
  export type GetLifecycleStatsV3OkResponse = ResponseWithPagination<LifecycleStatsResponseV3>;
14
17
  export type GetLifecycleStatsV3ErrorResponse = ErrorV3;
@@ -22,9 +22,7 @@ export interface ListLifecycleExecutionItemsV3QueryQueryParams {
22
22
  size?: number;
23
23
  search_term?: string;
24
24
  package_types?: string[];
25
- /**
26
- * Outcome of a lifecycle execution item.
27
- */
25
+ registry_ids?: string[];
28
26
  status?: 'DELETED' | 'PROTECTED' | 'WOULD_BE_DELETED';
29
27
  }
30
28
  export type ListLifecycleExecutionItemsV3OkResponse = ResponseWithPagination<ListLifecycleExecutionItemsResponseV3>;
@@ -17,10 +17,10 @@ export interface ListLifecycleExecutionsV3QueryQueryParams {
17
17
  * @default 20
18
18
  */
19
19
  size?: number;
20
+ search_term?: string;
20
21
  scope?: 'ancestors' | 'descendants' | 'none';
21
22
  package_types?: string[];
22
23
  registry_ids?: string[];
23
- policyId?: string;
24
24
  status?: 'FAILED' | 'INPROGRESS' | 'PENDING' | 'SUCCESS';
25
25
  }
26
26
  export type ListLifecycleExecutionsV3OkResponse = ResponseWithPagination<ListLifecycleExecutionsResponseV3Response>;
@@ -71,8 +71,8 @@ export type { GetAllArtifactVersionsErrorResponse, GetAllArtifactVersionsOkRespo
71
71
  export { getAllArtifactVersions, useGetAllArtifactVersionsQuery, } from './hooks/useGetAllArtifactVersionsQuery';
72
72
  export type { GetAllArtifactsByRegistryErrorResponse, GetAllArtifactsByRegistryOkResponse, GetAllArtifactsByRegistryProps, GetAllArtifactsByRegistryQueryPathParams, GetAllArtifactsByRegistryQueryQueryParams, } from './hooks/useGetAllArtifactsByRegistryQuery';
73
73
  export { getAllArtifactsByRegistry, useGetAllArtifactsByRegistryQuery, } from './hooks/useGetAllArtifactsByRegistryQuery';
74
- export type { GetAllHarnessArtifactsErrorResponse, GetAllHarnessArtifactsOkResponse, GetAllHarnessArtifactsProps, GetAllHarnessArtifactsQueryPathParams, GetAllHarnessArtifactsQueryQueryParams, } from './hooks/useGetAllHarnessArtifactsQuery';
75
- export { getAllHarnessArtifacts, useGetAllHarnessArtifactsQuery, } from './hooks/useGetAllHarnessArtifactsQuery';
74
+ export type { GetAllArtifactsErrorResponse, GetAllArtifactsOkResponse, GetAllArtifactsProps, GetAllArtifactsQueryPathParams, GetAllArtifactsQueryQueryParams, } from './hooks/useGetAllArtifactsQuery';
75
+ export { getAllArtifacts, useGetAllArtifactsQuery } from './hooks/useGetAllArtifactsQuery';
76
76
  export type { GetAllRegistriesErrorResponse, GetAllRegistriesOkResponse, GetAllRegistriesProps, GetAllRegistriesQueryPathParams, GetAllRegistriesQueryQueryParams, } from './hooks/useGetAllRegistriesQuery';
77
77
  export { getAllRegistries, useGetAllRegistriesQuery } from './hooks/useGetAllRegistriesQuery';
78
78
  export type { GetArtifactDeploymentsErrorResponse, GetArtifactDeploymentsOkResponse, GetArtifactDeploymentsProps, GetArtifactDeploymentsQueryPathParams, GetArtifactDeploymentsQueryQueryParams, } from './hooks/useGetArtifactDeploymentsQuery';
@@ -532,6 +532,7 @@ export type { ModifiedAtMsV3 } from './schemas/ModifiedAtMsV3';
532
532
  export type { NpmArtifactDetailConfig } from './schemas/NpmArtifactDetailConfig';
533
533
  export type { NugetArtifactDetailConfig } from './schemas/NugetArtifactDetailConfig';
534
534
  export type { OciArtifactTag } from './schemas/OciArtifactTag';
535
+ export type { OrgIdentifier } from './schemas/OrgIdentifier';
535
536
  export type { OssRiskLevelPolicyFailureDetailConfigV3 } from './schemas/OssRiskLevelPolicyFailureDetailConfigV3';
536
537
  export type { PackageAgeViolationPolicyFailureDetailConfigV3 } from './schemas/PackageAgeViolationPolicyFailureDetailConfigV3';
537
538
  export type { PackageKindV3 } from './schemas/PackageKindV3';
@@ -549,6 +550,7 @@ export type { PolicyFailureDetailCategoryV3 } from './schemas/PolicyFailureDetai
549
550
  export type { PolicyFailureDetailV3 } from './schemas/PolicyFailureDetailV3';
550
551
  export type { PolicySetFailureDetailV3 } from './schemas/PolicySetFailureDetailV3';
551
552
  export type { PolicySetsV3 } from './schemas/PolicySetsV3';
553
+ export type { ProjectIdentifier } from './schemas/ProjectIdentifier';
552
554
  export type { PuppetArtifactDetailConfig } from './schemas/PuppetArtifactDetailConfig';
553
555
  export type { PythonArtifactDetailConfig } from './schemas/PythonArtifactDetailConfig';
554
556
  export type { QuarantinePath } from './schemas/QuarantinePath';
@@ -34,7 +34,7 @@ export { evaluateArtifactScanV3, useEvaluateArtifactScanV3Mutation, } from './ho
34
34
  export { findSpaceLabel, useFindSpaceLabelQuery } from './hooks/useFindSpaceLabelQuery';
35
35
  export { getAllArtifactVersions, useGetAllArtifactVersionsQuery, } from './hooks/useGetAllArtifactVersionsQuery';
36
36
  export { getAllArtifactsByRegistry, useGetAllArtifactsByRegistryQuery, } from './hooks/useGetAllArtifactsByRegistryQuery';
37
- export { getAllHarnessArtifacts, useGetAllHarnessArtifactsQuery, } from './hooks/useGetAllHarnessArtifactsQuery';
37
+ export { getAllArtifacts, useGetAllArtifactsQuery } from './hooks/useGetAllArtifactsQuery';
38
38
  export { getAllRegistries, useGetAllRegistriesQuery } from './hooks/useGetAllRegistriesQuery';
39
39
  export { getArtifactDeployments, useGetArtifactDeploymentsQuery, } from './hooks/useGetArtifactDeploymentsQuery';
40
40
  export { getArtifactDetails, useGetArtifactDetailsQuery } from './hooks/useGetArtifactDetailsQuery';
@@ -13,6 +13,9 @@ export interface ArtifactMetadata {
13
13
  */
14
14
  deletedAt?: string;
15
15
  deploymentMetadata?: DeploymentMetadata;
16
+ /**
17
+ * @format int64
18
+ */
16
19
  digestCount?: number;
17
20
  /**
18
21
  * @format int64
@@ -38,6 +38,10 @@ export interface ArtifactScanDetailsV3 {
38
38
  */
39
39
  parentRegistryProjectId?: string;
40
40
  policySetFailureDetails: PolicySetFailureDetailV3[];
41
+ /**
42
+ * Package URL (PURL) identifying the package version
43
+ */
44
+ purl: string;
41
45
  /**
42
46
  * Registry ID
43
47
  * @format uuid
@@ -16,11 +16,8 @@ export interface LifecycleExecutionItemResponseV3 {
16
16
  */
17
17
  reason?: string;
18
18
  registryName: string;
19
- /**
20
- * Size in bytes.
21
- * @format int64
22
- */
23
- size?: number;
19
+ size?: string;
24
20
  status: LifecycleExecutionItemStatusV3;
25
21
  version: string;
22
+ versionId?: string;
26
23
  }
@@ -1,3 +1,5 @@
1
+ import type { OrgIdentifier } from '../schemas/OrgIdentifier';
2
+ import type { ProjectIdentifier } from '../schemas/ProjectIdentifier';
1
3
  import type { LifecycleExecutionStatusV3 } from '../schemas/LifecycleExecutionStatusV3';
2
4
  import type { LifecycleExecutionTriggerTypeV3 } from '../schemas/LifecycleExecutionTriggerTypeV3';
3
5
  export interface LifecycleExecutionResponseV3 {
@@ -11,11 +13,17 @@ export interface LifecycleExecutionResponseV3 {
11
13
  createdAt: number;
12
14
  id: string;
13
15
  message?: string;
16
+ orgIdentifier?: OrgIdentifier;
14
17
  /**
15
18
  * @format int64
16
19
  */
17
20
  packagesAffected: number;
18
21
  policyId: string;
22
+ /**
23
+ * Name of the lifecycle policy that triggered this execution.
24
+ */
25
+ policyName: string;
26
+ projectIdentifier?: ProjectIdentifier;
19
27
  /**
20
28
  * @format int64
21
29
  */
@@ -24,19 +32,12 @@ export interface LifecycleExecutionResponseV3 {
24
32
  * @format int64
25
33
  */
26
34
  registriesAffected: number;
27
- /**
28
- * Name of the lifecycle policy that triggered this execution.
29
- */
30
- ruleName?: string;
31
35
  /**
32
36
  * @format int64
33
37
  */
34
38
  startedAt?: number;
35
39
  status: LifecycleExecutionStatusV3;
36
- /**
37
- * @format int64
38
- */
39
- storageReclaimed: number;
40
+ storageReclaimed: string;
40
41
  triggerType: LifecycleExecutionTriggerTypeV3;
41
42
  /**
42
43
  * @format int64
@@ -2,6 +2,8 @@ import type { LifecycleRuleActionV3 } from '../schemas/LifecycleRuleActionV3';
2
2
  import type { LifecycleRuleApplyToV3 } from '../schemas/LifecycleRuleApplyToV3';
3
3
  import type { LifecycleRuleCriteriaV3 } from '../schemas/LifecycleRuleCriteriaV3';
4
4
  import type { LifecycleRuleFilterConfigV3 } from '../schemas/LifecycleRuleFilterConfigV3';
5
+ import type { OrgIdentifier } from '../schemas/OrgIdentifier';
6
+ import type { ProjectIdentifier } from '../schemas/ProjectIdentifier';
5
7
  import type { LifecycleRuleScheduleV3 } from '../schemas/LifecycleRuleScheduleV3';
6
8
  export interface LifecycleRuleResponseV3<T0 extends LifecycleRuleFilterConfigV3 = LifecycleRuleFilterConfigV3> {
7
9
  action: LifecycleRuleActionV3;
@@ -33,7 +35,9 @@ export interface LifecycleRuleResponseV3<T0 extends LifecycleRuleFilterConfigV3
33
35
  * @format int64
34
36
  */
35
37
  nextRunAt?: number;
38
+ orgIdentifier?: OrgIdentifier;
36
39
  packageType?: string;
40
+ projectIdentifier?: ProjectIdentifier;
37
41
  schedule?: LifecycleRuleScheduleV3;
38
42
  /**
39
43
  * @format int64
@@ -14,7 +14,6 @@ export interface LifecycleStatsResponseV3 {
14
14
  executionsLast30Days: number;
15
15
  /**
16
16
  * Total storage reclaimed (bytes) across all executions.
17
- * @format int64
18
17
  */
19
- storageReclaimed: number;
18
+ storageReclaimed: string;
20
19
  }
@@ -0,0 +1 @@
1
+ export type OrgIdentifier = 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,3 +1,4 @@
1
+ import type { PolicyFailureDetailCategoryV3 } from '../schemas/PolicyFailureDetailCategoryV3';
1
2
  /**
2
3
  * A violation entry mapping a package key to a scan ID.
3
4
  */
@@ -14,6 +15,10 @@ export interface PipelineBuildInfoViolationV3 {
14
15
  * Scan identifier.
15
16
  */
16
17
  scanId: string;
18
+ /**
19
+ * Policy failure categories.
20
+ */
21
+ securityViolationCategories: PolicyFailureDetailCategoryV3[];
17
22
  /**
18
23
  * Scan status
19
24
  */
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -0,0 +1 @@
1
+ export type ProjectIdentifier = 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 {};
@@ -12,7 +12,7 @@ export interface Registry<T0 extends RegistryConfig = RegistryConfig> {
12
12
  config?: T0;
13
13
  createdAt?: string;
14
14
  /**
15
- * Timestamp in milliseconds when the artifact was soft deleted. Null if not deleted.
15
+ * Timestamp in milliseconds when the registry was soft-deleted. Null if not deleted.
16
16
  */
17
17
  deletedAt?: string;
18
18
  description?: string;
@@ -1,5 +1,8 @@
1
1
  export interface UserPassword {
2
2
  secretIdentifier?: string;
3
+ /**
4
+ * @format int64
5
+ */
3
6
  secretSpaceId?: number;
4
7
  secretSpacePath?: string;
5
8
  userName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-har-service-client",
3
- "version": "0.62.0",
3
+ "version": "0.63.0",
4
4
  "description": "Harness HAR Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -1,41 +0,0 @@
1
- import { UseQueryOptions } from '@tanstack/react-query';
2
- import type { ListArtifactResponseResponse } from '../responses/ListArtifactResponseResponse';
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 GetAllHarnessArtifactsQueryPathParams {
11
- space_ref: string;
12
- }
13
- export interface GetAllHarnessArtifactsQueryQueryParams {
14
- reg_identifier?: string[];
15
- /**
16
- * @format int64
17
- * @default 1
18
- */
19
- page?: number;
20
- /**
21
- * @format int64
22
- * @default 20
23
- */
24
- size?: number;
25
- sort_order?: string;
26
- sort_field?: string;
27
- search_term?: string;
28
- latest_version?: boolean;
29
- deployed_artifact?: boolean;
30
- package_type?: string[];
31
- }
32
- export type GetAllHarnessArtifactsOkResponse = ResponseWithPagination<ListArtifactResponseResponse>;
33
- export type GetAllHarnessArtifactsErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
34
- export interface GetAllHarnessArtifactsProps extends GetAllHarnessArtifactsQueryPathParams, Omit<FetcherOptions<GetAllHarnessArtifactsQueryQueryParams, unknown>, 'url'> {
35
- queryParams: GetAllHarnessArtifactsQueryQueryParams;
36
- }
37
- export declare function getAllHarnessArtifacts(props: GetAllHarnessArtifactsProps): Promise<GetAllHarnessArtifactsOkResponse>;
38
- /**
39
- * Lists all the Harness Artifacts.
40
- */
41
- export declare function useGetAllHarnessArtifactsQuery(props: GetAllHarnessArtifactsProps, options?: Omit<UseQueryOptions<GetAllHarnessArtifactsOkResponse, GetAllHarnessArtifactsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetAllHarnessArtifactsOkResponse, import("..").Error>;