@harnessio/react-ssca-manager-client 0.23.0 → 0.24.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,23 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ArtifactAndDeploymentsResponseBody } from '../schemas/ArtifactAndDeploymentsResponseBody';
3
+ import type { RemediationTrackerCreateRequestBodyRequestBody } from '../requestBodies/RemediationTrackerCreateRequestBodyRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface CheckArtifactAndDeploymentsMutationPathParams {
7
+ org: string;
8
+ project: string;
9
+ }
10
+ export interface CheckArtifactAndDeploymentsMutationHeaderParams {
11
+ 'Harness-Account'?: string;
12
+ }
13
+ export type CheckArtifactAndDeploymentsRequestBody = RemediationTrackerCreateRequestBodyRequestBody;
14
+ export type CheckArtifactAndDeploymentsOkResponse = ResponseWithPagination<ArtifactAndDeploymentsResponseBody>;
15
+ export type CheckArtifactAndDeploymentsErrorResponse = unknown;
16
+ export interface CheckArtifactAndDeploymentsProps extends CheckArtifactAndDeploymentsMutationPathParams, Omit<FetcherOptions<unknown, CheckArtifactAndDeploymentsRequestBody, CheckArtifactAndDeploymentsMutationHeaderParams>, 'url'> {
17
+ body: CheckArtifactAndDeploymentsRequestBody;
18
+ }
19
+ export declare function checkArtifactAndDeployments(props: CheckArtifactAndDeploymentsProps): Promise<CheckArtifactAndDeploymentsOkResponse>;
20
+ /**
21
+ * Check Artifacts And Deployments.
22
+ */
23
+ export declare function useCheckArtifactAndDeploymentsMutation(options?: Omit<UseMutationOptions<CheckArtifactAndDeploymentsOkResponse, CheckArtifactAndDeploymentsErrorResponse, CheckArtifactAndDeploymentsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CheckArtifactAndDeploymentsOkResponse, unknown, CheckArtifactAndDeploymentsProps, unknown>;
@@ -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 { useMutation } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function checkArtifactAndDeployments(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/remediations/check-artifacts`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Check Artifacts And Deployments.
11
+ */
12
+ export function useCheckArtifactAndDeploymentsMutation(options) {
13
+ return useMutation((mutateProps) => checkArtifactAndDeployments(mutateProps), options);
14
+ }
@@ -3,6 +3,8 @@ export type { ArtifactListErrorResponse, ArtifactListOkResponse, ArtifactListPro
3
3
  export { artifactList, useArtifactListQuery } from './hooks/useArtifactListQuery';
4
4
  export type { CalculateDriftForArtifactErrorResponse, CalculateDriftForArtifactMutationPathParams, CalculateDriftForArtifactOkResponse, CalculateDriftForArtifactProps, CalculateDriftForArtifactRequestBody, } from './hooks/useCalculateDriftForArtifactMutation';
5
5
  export { calculateDriftForArtifact, useCalculateDriftForArtifactMutation, } from './hooks/useCalculateDriftForArtifactMutation';
6
+ export type { CheckArtifactAndDeploymentsErrorResponse, CheckArtifactAndDeploymentsMutationPathParams, CheckArtifactAndDeploymentsOkResponse, CheckArtifactAndDeploymentsProps, CheckArtifactAndDeploymentsRequestBody, } from './hooks/useCheckArtifactAndDeploymentsMutation';
7
+ export { checkArtifactAndDeployments, useCheckArtifactAndDeploymentsMutation, } from './hooks/useCheckArtifactAndDeploymentsMutation';
6
8
  export type { CloseRemediationTrackerErrorResponse, CloseRemediationTrackerMutationPathParams, CloseRemediationTrackerOkResponse, CloseRemediationTrackerProps, } from './hooks/useCloseRemediationTrackerMutation';
7
9
  export { closeRemediationTracker, useCloseRemediationTrackerMutation, } from './hooks/useCloseRemediationTrackerMutation';
8
10
  export type { CreateRemediationTrackerErrorResponse, CreateRemediationTrackerMutationPathParams, CreateRemediationTrackerOkResponse, CreateRemediationTrackerProps, CreateRemediationTrackerRequestBody, } from './hooks/useCreateRemediationTrackerMutation';
@@ -83,6 +85,7 @@ export type { RemediationTrackerUpdateResponseBodyResponse } from './responses/R
83
85
  export type { RemediationTrackersOverallSummaryResponseBodyResponse } from './responses/RemediationTrackersOverallSummaryResponseBodyResponse';
84
86
  export type { SaveResponseResponse } from './responses/SaveResponseResponse';
85
87
  export type { SbomScorecardResponseBodyResponse } from './responses/SbomScorecardResponseBodyResponse';
88
+ export type { ArtifactAndDeploymentsResponseBody } from './schemas/ArtifactAndDeploymentsResponseBody';
86
89
  export type { ArtifactComponentViewRequestBody } from './schemas/ArtifactComponentViewRequestBody';
87
90
  export type { ArtifactComponentViewResponse } from './schemas/ArtifactComponentViewResponse';
88
91
  export type { ArtifactDeploymentViewRequestBody } from './schemas/ArtifactDeploymentViewRequestBody';
@@ -94,6 +97,7 @@ export type { ArtifactListingResponseV2 } from './schemas/ArtifactListingRespons
94
97
  export type { ArtifactSbomDriftRequestBody } from './schemas/ArtifactSbomDriftRequestBody';
95
98
  export type { ArtifactSbomDriftResponse } from './schemas/ArtifactSbomDriftResponse';
96
99
  export type { ArtifactSbomResponseBody } from './schemas/ArtifactSbomResponseBody';
100
+ export type { ArtifactVariant } from './schemas/ArtifactVariant';
97
101
  export type { BaselineRequestBody } from './schemas/BaselineRequestBody';
98
102
  export type { BaselineResponseBody } from './schemas/BaselineResponseBody';
99
103
  export type { CategoryScorecard } from './schemas/CategoryScorecard';
@@ -1,5 +1,6 @@
1
1
  export { artifactList, useArtifactListQuery } from './hooks/useArtifactListQuery';
2
2
  export { calculateDriftForArtifact, useCalculateDriftForArtifactMutation, } from './hooks/useCalculateDriftForArtifactMutation';
3
+ export { checkArtifactAndDeployments, useCheckArtifactAndDeploymentsMutation, } from './hooks/useCheckArtifactAndDeploymentsMutation';
3
4
  export { closeRemediationTracker, useCloseRemediationTrackerMutation, } from './hooks/useCloseRemediationTrackerMutation';
4
5
  export { createRemediationTracker, useCreateRemediationTrackerMutation, } from './hooks/useCreateRemediationTrackerMutation';
5
6
  export { createTicket, useCreateTicketMutation } from './hooks/useCreateTicketMutation';
@@ -0,0 +1,4 @@
1
+ export interface ArtifactAndDeploymentsResponseBody {
2
+ is_valid?: boolean;
3
+ message?: string;
4
+ }
@@ -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 { ArtifactVariant } from '../schemas/ArtifactVariant';
1
2
  export interface ArtifactListingResponseV2 {
2
3
  /**
3
4
  * Flag denoting if current artifact is baseline
@@ -70,7 +71,7 @@ export interface ArtifactListingResponseV2 {
70
71
  /**
71
72
  * artifact type
72
73
  */
73
- type?: string;
74
+ type?: 'image' | 'repository';
74
75
  /**
75
76
  * Last updated time of the artifact
76
77
  */
@@ -79,17 +80,5 @@ export interface ArtifactListingResponseV2 {
79
80
  * Artifact Origin URL
80
81
  */
81
82
  url?: string;
82
- /**
83
- * Artifact variant details
84
- */
85
- variant?: {
86
- /**
87
- * Type of the variant.
88
- */
89
- type?: string;
90
- /**
91
- * value of the variant for the aritfact.
92
- */
93
- value?: string;
94
- };
83
+ variant?: ArtifactVariant;
95
84
  }
@@ -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,10 @@
1
+ export interface ArtifactVariant {
2
+ /**
3
+ * type of the variant of the artifact.
4
+ */
5
+ type?: 'branch' | 'commit' | 'gitTag' | 'tag';
6
+ /**
7
+ * Value of the variant of the artifact.
8
+ */
9
+ value?: string;
10
+ }
@@ -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
  export interface RemediationArtifactListingRequestBody {
2
2
  deployment_status?: 'PreProd' | 'Prod';
3
- remediation_status?: 'Completed' | 'Pending';
3
+ remediation_status?: 'Done' | 'In_Progress';
4
4
  }
@@ -15,6 +15,10 @@ export interface RemediationDetailsResponse {
15
15
  * @format int64
16
16
  */
17
17
  artifacts_excluded: number;
18
+ /**
19
+ * If Remediation Tracker was closed manually , name of the user who closed it.
20
+ */
21
+ closed_by?: string;
18
22
  /**
19
23
  * Description/comments for the tracker.
20
24
  */
@@ -9,6 +9,11 @@ export interface RemediationListingResponse {
9
9
  * @format int64
10
10
  */
11
11
  artifacts: number;
12
+ /**
13
+ * If tracker was closed manually , name of the person who closed it
14
+ *
15
+ */
16
+ closed_by?: string;
12
17
  /**
13
18
  * Component Name.
14
19
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",