@harnessio/react-sto-core-client 0.3.2 → 0.3.3

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,55 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { Exemption } from '../schemas/Exemption';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface ExemptionsFindExemptionByIdQueryPathParams {
7
+ /**
8
+ * The ID of the Exemption to retrieve
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ id: string;
12
+ }
13
+ export interface ExemptionsFindExemptionByIdQueryQueryParams {
14
+ /**
15
+ * Harness Account ID
16
+ * @example "abcdef1234567890ghijkl"
17
+ */
18
+ accountId: string;
19
+ /**
20
+ * Harness Organization ID
21
+ * @example "example_org"
22
+ */
23
+ orgId?: string;
24
+ /**
25
+ * Harness Project ID
26
+ * @example "example_project"
27
+ */
28
+ projectId?: string;
29
+ /**
30
+ * Harness Execution ID
31
+ * @example "abcdef1234567890ghijkl"
32
+ */
33
+ executionId?: string;
34
+ /**
35
+ * Ignore scope
36
+ */
37
+ ignoreScope?: boolean;
38
+ }
39
+ export interface ExemptionsFindExemptionByIdQueryHeaderParams {
40
+ /**
41
+ * Harness personal or service access token
42
+ * @example "Et et."
43
+ */
44
+ 'X-Api-Key'?: string;
45
+ }
46
+ export type ExemptionsFindExemptionByIdOkResponse = ResponseWithPagination<Exemption>;
47
+ export type ExemptionsFindExemptionByIdErrorResponse = NotFound;
48
+ export interface ExemptionsFindExemptionByIdProps extends ExemptionsFindExemptionByIdQueryPathParams, Omit<FetcherOptions<ExemptionsFindExemptionByIdQueryQueryParams, unknown, ExemptionsFindExemptionByIdQueryHeaderParams>, 'url'> {
49
+ queryParams: ExemptionsFindExemptionByIdQueryQueryParams;
50
+ }
51
+ export declare function exemptionsFindExemptionById(props: ExemptionsFindExemptionByIdProps): Promise<ExemptionsFindExemptionByIdOkResponse>;
52
+ /**
53
+ * Find Exemption by ID
54
+ */
55
+ export declare function useExemptionsFindExemptionByIdQuery(props: ExemptionsFindExemptionByIdProps, options?: Omit<UseQueryOptions<ExemptionsFindExemptionByIdOkResponse, ExemptionsFindExemptionByIdErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ExemptionsFindExemptionByIdOkResponse, NotFound>;
@@ -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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function exemptionsFindExemptionById(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/exemptions/${props.id}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Find Exemption by ID
11
+ */
12
+ export function useExemptionsFindExemptionByIdQuery(props, options) {
13
+ return useQuery(['Exemptions#FindExemptionById', props.id, props.queryParams], ({ signal }) => exemptionsFindExemptionById(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,46 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { Target } from '../schemas/Target';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface TargetsFindTargetByIdQueryPathParams {
7
+ /**
8
+ * The ID of the Test Target to retrieve
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ id: string;
12
+ }
13
+ export interface TargetsFindTargetByIdQueryQueryParams {
14
+ /**
15
+ * Harness Account ID
16
+ * @example "abcdef1234567890ghijkl"
17
+ */
18
+ accountId: string;
19
+ /**
20
+ * Harness Organization ID
21
+ * @example "example_org"
22
+ */
23
+ orgId: string;
24
+ /**
25
+ * Harness Project ID
26
+ * @example "example_project"
27
+ */
28
+ projectId: string;
29
+ }
30
+ export interface TargetsFindTargetByIdQueryHeaderParams {
31
+ /**
32
+ * Harness personal or service access token
33
+ * @example "Esse sit consequuntur."
34
+ */
35
+ 'X-Api-Key'?: string;
36
+ }
37
+ export type TargetsFindTargetByIdOkResponse = ResponseWithPagination<Target>;
38
+ export type TargetsFindTargetByIdErrorResponse = NotFound;
39
+ export interface TargetsFindTargetByIdProps extends TargetsFindTargetByIdQueryPathParams, Omit<FetcherOptions<TargetsFindTargetByIdQueryQueryParams, unknown, TargetsFindTargetByIdQueryHeaderParams>, 'url'> {
40
+ queryParams: TargetsFindTargetByIdQueryQueryParams;
41
+ }
42
+ export declare function targetsFindTargetById(props: TargetsFindTargetByIdProps): Promise<TargetsFindTargetByIdOkResponse>;
43
+ /**
44
+ * Find Test Target by ID
45
+ */
46
+ export declare function useTargetsFindTargetByIdQuery(props: TargetsFindTargetByIdProps, options?: Omit<UseQueryOptions<TargetsFindTargetByIdOkResponse, TargetsFindTargetByIdErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<TargetsFindTargetByIdOkResponse, NotFound>;
@@ -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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function targetsFindTargetById(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/targets/${props.id}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Find Test Target by ID
11
+ */
12
+ export function useTargetsFindTargetByIdQuery(props, options) {
13
+ return useQuery(['Targets#FindTargetById', props.id, props.queryParams], ({ signal }) => targetsFindTargetById(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -1,14 +1,15 @@
1
1
  export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
- export type { ExemptionsDeleteExemptionErrorResponse, ExemptionsDeleteExemptionMutationPathParams, ExemptionsDeleteExemptionMutationQueryParams, ExemptionsDeleteExemptionOkResponse, ExemptionsDeleteExemptionProps, } from './hooks/useExemptionsDeleteExemptionMutation';
3
- export { exemptionsDeleteExemption, useExemptionsDeleteExemptionMutation, } from './hooks/useExemptionsDeleteExemptionMutation';
2
+ export type { ExemptionsFindExemptionByIdErrorResponse, ExemptionsFindExemptionByIdOkResponse, ExemptionsFindExemptionByIdProps, ExemptionsFindExemptionByIdQueryPathParams, ExemptionsFindExemptionByIdQueryQueryParams, } from './hooks/useExemptionsFindExemptionByIdQuery';
3
+ export { exemptionsFindExemptionById, useExemptionsFindExemptionByIdQuery, } from './hooks/useExemptionsFindExemptionByIdQuery';
4
4
  export type { FrontendImpactedTargetsForExemptionErrorResponse, FrontendImpactedTargetsForExemptionOkResponse, FrontendImpactedTargetsForExemptionProps, FrontendImpactedTargetsForExemptionQueryPathParams, FrontendImpactedTargetsForExemptionQueryQueryParams, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
5
5
  export { frontendImpactedTargetsForExemption, useFrontendImpactedTargetsForExemptionQuery, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
6
6
  export type { FrontendIssueForExemptionErrorResponse, FrontendIssueForExemptionOkResponse, FrontendIssueForExemptionProps, FrontendIssueForExemptionQueryPathParams, FrontendIssueForExemptionQueryQueryParams, } from './hooks/useFrontendIssueForExemptionQuery';
7
7
  export { frontendIssueForExemption, useFrontendIssueForExemptionQuery, } from './hooks/useFrontendIssueForExemptionQuery';
8
8
  export type { ScansScanIssueOccurrencesErrorResponse, ScansScanIssueOccurrencesOkResponse, ScansScanIssueOccurrencesProps, ScansScanIssueOccurrencesQueryPathParams, ScansScanIssueOccurrencesQueryQueryParams, } from './hooks/useScansScanIssueOccurrencesQuery';
9
9
  export { scansScanIssueOccurrences, useScansScanIssueOccurrencesQuery, } from './hooks/useScansScanIssueOccurrencesQuery';
10
- export type { TargetsDeleteTargetErrorResponse, TargetsDeleteTargetMutationPathParams, TargetsDeleteTargetMutationQueryParams, TargetsDeleteTargetOkResponse, TargetsDeleteTargetProps, } from './hooks/useTargetsDeleteTargetMutation';
11
- export { targetsDeleteTarget, useTargetsDeleteTargetMutation, } from './hooks/useTargetsDeleteTargetMutation';
10
+ export type { TargetsFindTargetByIdErrorResponse, TargetsFindTargetByIdOkResponse, TargetsFindTargetByIdProps, TargetsFindTargetByIdQueryPathParams, TargetsFindTargetByIdQueryQueryParams, } from './hooks/useTargetsFindTargetByIdQuery';
11
+ export { targetsFindTargetById, useTargetsFindTargetByIdQuery, } from './hooks/useTargetsFindTargetByIdQuery';
12
+ export type { Exemption } from './schemas/Exemption';
12
13
  export type { ExemptionImpactedTargetsResult } from './schemas/ExemptionImpactedTargetsResult';
13
14
  export type { FrontendExemptionTargets } from './schemas/FrontendExemptionTargets';
14
15
  export type { FrontendImpactedTargetsForExemptionResponseBody } from './schemas/FrontendImpactedTargetsForExemptionResponseBody';
@@ -18,4 +19,6 @@ export type { IssueForExemptionResult } from './schemas/IssueForExemptionResult'
18
19
  export type { IssueInScan } from './schemas/IssueInScan';
19
20
  export type { NotFound } from './schemas/NotFound';
20
21
  export type { Pagination } from './schemas/Pagination';
22
+ export type { PendingChanges } from './schemas/PendingChanges';
21
23
  export type { ScansScanIssueResponseBody } from './schemas/ScansScanIssueResponseBody';
24
+ export type { Target } from './schemas/Target';
@@ -1,5 +1,5 @@
1
- export { exemptionsDeleteExemption, useExemptionsDeleteExemptionMutation, } from './hooks/useExemptionsDeleteExemptionMutation';
1
+ export { exemptionsFindExemptionById, useExemptionsFindExemptionByIdQuery, } from './hooks/useExemptionsFindExemptionByIdQuery';
2
2
  export { frontendImpactedTargetsForExemption, useFrontendImpactedTargetsForExemptionQuery, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
3
3
  export { frontendIssueForExemption, useFrontendIssueForExemptionQuery, } from './hooks/useFrontendIssueForExemptionQuery';
4
4
  export { scansScanIssueOccurrences, useScansScanIssueOccurrencesQuery, } from './hooks/useScansScanIssueOccurrencesQuery';
5
- export { targetsDeleteTarget, useTargetsDeleteTargetMutation, } from './hooks/useTargetsDeleteTargetMutation';
5
+ export { targetsFindTargetById, useTargetsFindTargetByIdQuery, } from './hooks/useTargetsFindTargetByIdQuery';
@@ -0,0 +1,149 @@
1
+ import type { PendingChanges } from '../schemas/PendingChanges';
2
+ /**
3
+ * Information about an Exemption
4
+ * @example {"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"created":1651578240,"exemptionStatusAtScan":"Rejected","expiration":1651578240,"id":"abcdef1234567890ghijkl","isDeleted":true,"issueId":"abcdef1234567890ghijkl","lastModified":1651578240,"link":"https://example.com/ABC-1234","numOccurrences":10,"occurrences":[42,666],"orgId":"your_project","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Canceled","targetId":"abcdef1234567890ghijkl","type":"Other"}
5
+ */
6
+ export interface Exemption {
7
+ /**
8
+ * User ID the user who approved or rejected this exemptions
9
+ * @example "user111111111111111111"
10
+ */
11
+ approverId?: string;
12
+ /**
13
+ * Consists of RBAC scopes for an user associated with this Exemption
14
+ * @example ["ACCOUNT","ORG","PROJECT","PIPELINE"]
15
+ */
16
+ canApproveFor?: Array<'ACCOUNT' | 'ORG' | 'PIPELINE' | 'PROJECT' | 'TARGET'>;
17
+ /**
18
+ * States if the user can cancel the exemption
19
+ * @example true
20
+ */
21
+ canCancel?: boolean;
22
+ /**
23
+ * States whether the user can create or reopen the exemption
24
+ * @example true
25
+ */
26
+ canCreate?: boolean;
27
+ /**
28
+ * States if the user can re-approve the exemption for the exemption's scope
29
+ * @example true
30
+ */
31
+ canReApprove?: boolean;
32
+ /**
33
+ * States whether the user can reject the exemption
34
+ * @example true
35
+ */
36
+ canReject?: boolean;
37
+ /**
38
+ * Unix timestamp at which the resource was created
39
+ * @format int64
40
+ * @example 1651578240
41
+ */
42
+ created: number;
43
+ /**
44
+ * Exemption's status at the Security Scan created time
45
+ * @example "Rejected"
46
+ */
47
+ exemptionStatusAtScan?: 'Approved' | 'Expired' | 'Pending' | 'Rejected';
48
+ /**
49
+ * Unix timestamp at which this Exemption will expire
50
+ * @format int64
51
+ * @example 1651578240
52
+ */
53
+ expiration?: number;
54
+ /**
55
+ * Resource identifier
56
+ * @example "abcdef1234567890ghijkl"
57
+ */
58
+ id: string;
59
+ /**
60
+ * States if the exemption is deleted
61
+ * @example true
62
+ */
63
+ isDeleted?: boolean;
64
+ /**
65
+ * Issue ID associated with the Exemption
66
+ * @example "abcdef1234567890ghijkl"
67
+ */
68
+ issueId: string;
69
+ /**
70
+ * Unix timestamp at which the resource was most recently modified
71
+ * @format int64
72
+ * @example 1651578240
73
+ */
74
+ lastModified: number;
75
+ /**
76
+ * Link to a related ticket
77
+ * @example "https://example.com/ABC-1234"
78
+ */
79
+ link?: string;
80
+ /**
81
+ * States how may occurrences are associated with the exemption, if not an issue level exemption
82
+ * @format int64
83
+ * @default 0
84
+ * @example 10
85
+ */
86
+ numOccurrences?: number;
87
+ /**
88
+ * Array of occurrence Ids
89
+ * @example [42,666]
90
+ */
91
+ occurrences?: number[];
92
+ /**
93
+ * ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".
94
+ * @example "your_project"
95
+ */
96
+ orgId?: string;
97
+ pendingChanges: PendingChanges;
98
+ /**
99
+ * ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".
100
+ * @example "your_pipeline"
101
+ */
102
+ pipelineId?: string;
103
+ /**
104
+ * ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".
105
+ * @example "your_project"
106
+ */
107
+ projectId?: string;
108
+ /**
109
+ * Text describing why this Exemption is necessary
110
+ * @example "Waiting on upstream bug fix"
111
+ */
112
+ reason: string;
113
+ /**
114
+ * User ID of user who requested this exemptions
115
+ * @example "user111111111111111111"
116
+ */
117
+ requesterId: string;
118
+ /**
119
+ * ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".
120
+ * @example "abcdef1234567890ghijkl"
121
+ */
122
+ scanId?: string;
123
+ /**
124
+ * States the scope for the exemption
125
+ * @example "PROJECT"
126
+ */
127
+ scope?: 'ACCOUNT' | 'ORG' | 'PIPELINE' | 'PROJECT' | 'TARGET';
128
+ /**
129
+ * Search parameter to find filtered occurrences of the issue
130
+ * @example "CWE-123,5"
131
+ */
132
+ search?: string;
133
+ /**
134
+ * Approval status of Exemption
135
+ * @default "Pending"
136
+ * @example "Rejected"
137
+ */
138
+ status: 'Approved' | 'Canceled' | 'Expired' | 'Pending' | 'Rejected';
139
+ /**
140
+ * ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".
141
+ * @example "abcdef1234567890ghijkl"
142
+ */
143
+ targetId?: string;
144
+ /**
145
+ * Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)
146
+ * @example "Other"
147
+ */
148
+ type: 'Acceptable Risk' | 'Acceptable Use' | 'Compensating Controls' | 'False Positive' | 'Fix Unavailable' | 'Other';
149
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @example {"durationDays":7}
3
+ */
4
+ export interface PendingChanges {
5
+ /**
6
+ * The number of days an issue should be exempted for
7
+ * @format int64
8
+ * @example 7
9
+ */
10
+ durationDays?: number;
11
+ }
@@ -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 {};
@@ -0,0 +1,62 @@
1
+ /**
2
+ * @example {"baselineRegEx":"release_.*","baselineVariantId":"abcdef1234567890ghijkl","created":1651578240,"directory":"app/src","id":"abcdef1234567890ghijkl","lastModified":1651578240,"name":"NodeGoat","orgId":"example_org","projectId":"example_project","type":"repository","url":"https://github.com/example/repo"}
3
+ */
4
+ export interface Target {
5
+ /**
6
+ * RegEx to match for dynamically selecting the Baseline for this Scan Target. Must be compatible with the RE2 standard.
7
+ * @example "release_.*"
8
+ */
9
+ baselineRegEx?: string;
10
+ /**
11
+ * ID of baseline Target Variant for Issue comparison
12
+ * @example "abcdef1234567890ghijkl"
13
+ */
14
+ baselineVariantId?: string;
15
+ /**
16
+ * Unix timestamp at which the resource was created
17
+ * @format int64
18
+ * @example 1651578240
19
+ */
20
+ created: number;
21
+ /**
22
+ * Directory within the Test Target to be scanned
23
+ * @example "app/src"
24
+ */
25
+ directory?: string;
26
+ /**
27
+ * Resource identifier
28
+ * @example "abcdef1234567890ghijkl"
29
+ */
30
+ id: string;
31
+ /**
32
+ * Unix timestamp at which the resource was most recently modified
33
+ * @format int64
34
+ * @example 1651578240
35
+ */
36
+ lastModified: number;
37
+ /**
38
+ * Name of the Test Target
39
+ * @example "NodeGoat"
40
+ */
41
+ name: string;
42
+ /**
43
+ * Harness Organization ID
44
+ * @example "example_org"
45
+ */
46
+ orgId: string;
47
+ /**
48
+ * Harness Project ID
49
+ * @example "example_project"
50
+ */
51
+ projectId: string;
52
+ /**
53
+ * Test Target's type
54
+ * @example "repository"
55
+ */
56
+ type: 'configuration' | 'container' | 'instance' | 'repository';
57
+ /**
58
+ * URL used to access the Test Target
59
+ * @example "https://github.com/example/repo"
60
+ */
61
+ url?: string;
62
+ }
@@ -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-sto-core-client",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Harness STO service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -1,38 +0,0 @@
1
- import { UseMutationOptions } from '@tanstack/react-query';
2
- import type { NotFound } from '../schemas/NotFound';
3
- import type { ResponseWithPagination } from '../helpers';
4
- import { FetcherOptions } from '../../../../fetcher/index.js';
5
- export interface ExemptionsDeleteExemptionMutationPathParams {
6
- /**
7
- * The ID of the Exemption to delete
8
- * @example "abcdef1234567890ghijkl"
9
- */
10
- id: string;
11
- }
12
- export interface ExemptionsDeleteExemptionMutationQueryParams {
13
- /**
14
- * Harness Account ID
15
- * @example "abcdef1234567890ghijkl"
16
- */
17
- accountId: string;
18
- /**
19
- * Harness Organization ID
20
- * @example "example_org"
21
- */
22
- orgId?: string;
23
- /**
24
- * Harness Project ID
25
- * @example "example_project"
26
- */
27
- projectId?: string;
28
- }
29
- export type ExemptionsDeleteExemptionOkResponse = ResponseWithPagination<unknown>;
30
- export type ExemptionsDeleteExemptionErrorResponse = NotFound;
31
- export interface ExemptionsDeleteExemptionProps extends ExemptionsDeleteExemptionMutationPathParams, Omit<FetcherOptions<ExemptionsDeleteExemptionMutationQueryParams, unknown>, 'url'> {
32
- queryParams: ExemptionsDeleteExemptionMutationQueryParams;
33
- }
34
- export declare function exemptionsDeleteExemption(props: ExemptionsDeleteExemptionProps): Promise<ExemptionsDeleteExemptionOkResponse>;
35
- /**
36
- * Delete an existing Exemption
37
- */
38
- export declare function useExemptionsDeleteExemptionMutation(options?: Omit<UseMutationOptions<ExemptionsDeleteExemptionOkResponse, ExemptionsDeleteExemptionErrorResponse, ExemptionsDeleteExemptionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ExemptionsDeleteExemptionOkResponse, NotFound, ExemptionsDeleteExemptionProps, unknown>;
@@ -1,14 +0,0 @@
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 exemptionsDeleteExemption(props) {
7
- return fetcher(Object.assign({ url: `/api/v2/exemptions/${props.id}`, method: 'DELETE' }, props));
8
- }
9
- /**
10
- * Delete an existing Exemption
11
- */
12
- export function useExemptionsDeleteExemptionMutation(options) {
13
- return useMutation((mutateProps) => exemptionsDeleteExemption(mutateProps), options);
14
- }
@@ -1,38 +0,0 @@
1
- import { UseMutationOptions } from '@tanstack/react-query';
2
- import type { NotFound } from '../schemas/NotFound';
3
- import type { ResponseWithPagination } from '../helpers';
4
- import { FetcherOptions } from '../../../../fetcher/index.js';
5
- export interface TargetsDeleteTargetMutationPathParams {
6
- /**
7
- * The ID of the Test Target to delete
8
- * @example "abcdef1234567890ghijkl"
9
- */
10
- id: string;
11
- }
12
- export interface TargetsDeleteTargetMutationQueryParams {
13
- /**
14
- * Harness Account ID
15
- * @example "abcdef1234567890ghijkl"
16
- */
17
- accountId: string;
18
- /**
19
- * Harness Organization ID
20
- * @example "example_org"
21
- */
22
- orgId: string;
23
- /**
24
- * Harness Project ID
25
- * @example "example_project"
26
- */
27
- projectId: string;
28
- }
29
- export type TargetsDeleteTargetOkResponse = ResponseWithPagination<unknown>;
30
- export type TargetsDeleteTargetErrorResponse = NotFound;
31
- export interface TargetsDeleteTargetProps extends TargetsDeleteTargetMutationPathParams, Omit<FetcherOptions<TargetsDeleteTargetMutationQueryParams, unknown>, 'url'> {
32
- queryParams: TargetsDeleteTargetMutationQueryParams;
33
- }
34
- export declare function targetsDeleteTarget(props: TargetsDeleteTargetProps): Promise<TargetsDeleteTargetOkResponse>;
35
- /**
36
- * Delete an existing Test Target
37
- */
38
- export declare function useTargetsDeleteTargetMutation(options?: Omit<UseMutationOptions<TargetsDeleteTargetOkResponse, TargetsDeleteTargetErrorResponse, TargetsDeleteTargetProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<TargetsDeleteTargetOkResponse, NotFound, TargetsDeleteTargetProps, unknown>;
@@ -1,14 +0,0 @@
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 targetsDeleteTarget(props) {
7
- return fetcher(Object.assign({ url: `/api/v2/targets/${props.id}`, method: 'DELETE' }, props));
8
- }
9
- /**
10
- * Delete an existing Test Target
11
- */
12
- export function useTargetsDeleteTargetMutation(options) {
13
- return useMutation((mutateProps) => targetsDeleteTarget(mutateProps), options);
14
- }