@harnessio/react-ssca-manager-client 1.0.4 → 1.0.5

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,19 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { TrustedPublisherResponse } from '../schemas/TrustedPublisherResponse';
3
+ import type { TrustedPublisherUpsertRequest } from '../schemas/TrustedPublisherUpsertRequest';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface CreateTrustedPublisherMutationHeaderParams {
7
+ 'Harness-Account': string;
8
+ }
9
+ export type CreateTrustedPublisherRequestBody = TrustedPublisherUpsertRequest;
10
+ export type CreateTrustedPublisherOkResponse = ResponseWithPagination<TrustedPublisherResponse>;
11
+ export type CreateTrustedPublisherErrorResponse = unknown;
12
+ export interface CreateTrustedPublisherProps extends Omit<FetcherOptions<unknown, CreateTrustedPublisherRequestBody, CreateTrustedPublisherMutationHeaderParams>, 'url'> {
13
+ body: CreateTrustedPublisherRequestBody;
14
+ }
15
+ export declare function createTrustedPublisher(props: CreateTrustedPublisherProps): Promise<CreateTrustedPublisherOkResponse>;
16
+ /**
17
+ * Create a trusted publisher
18
+ */
19
+ export declare function useCreateTrustedPublisherMutation(options?: Omit<UseMutationOptions<CreateTrustedPublisherOkResponse, CreateTrustedPublisherErrorResponse, CreateTrustedPublisherProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateTrustedPublisherOkResponse, unknown, CreateTrustedPublisherProps, 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 createTrustedPublisher(props) {
7
+ return fetcher(Object.assign({ url: `/v1/trusted-publishers`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Create a trusted publisher
11
+ */
12
+ export function useCreateTrustedPublisherMutation(options) {
13
+ return useMutation((mutateProps) => createTrustedPublisher(mutateProps), options);
14
+ }
@@ -0,0 +1,18 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ResponseWithPagination } from '../helpers';
3
+ import { FetcherOptions } from '../../../../fetcher/index.js';
4
+ export interface DeleteTrustedPublisherMutationPathParams {
5
+ publisherId: string;
6
+ }
7
+ export interface DeleteTrustedPublisherMutationHeaderParams {
8
+ 'Harness-Account': string;
9
+ }
10
+ export type DeleteTrustedPublisherOkResponse = ResponseWithPagination<unknown>;
11
+ export type DeleteTrustedPublisherErrorResponse = unknown;
12
+ export interface DeleteTrustedPublisherProps extends DeleteTrustedPublisherMutationPathParams, Omit<FetcherOptions<unknown, unknown, DeleteTrustedPublisherMutationHeaderParams>, 'url'> {
13
+ }
14
+ export declare function deleteTrustedPublisher(props: DeleteTrustedPublisherProps): Promise<DeleteTrustedPublisherOkResponse>;
15
+ /**
16
+ * Delete a trusted publisher
17
+ */
18
+ export declare function useDeleteTrustedPublisherMutation(options?: Omit<UseMutationOptions<DeleteTrustedPublisherOkResponse, DeleteTrustedPublisherErrorResponse, DeleteTrustedPublisherProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteTrustedPublisherOkResponse, unknown, DeleteTrustedPublisherProps, 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 deleteTrustedPublisher(props) {
7
+ return fetcher(Object.assign({ url: `/v1/trusted-publishers/${props.publisherId}`, method: 'DELETE' }, props));
8
+ }
9
+ /**
10
+ * Delete a trusted publisher
11
+ */
12
+ export function useDeleteTrustedPublisherMutation(options) {
13
+ return useMutation((mutateProps) => deleteTrustedPublisher(mutateProps), options);
14
+ }
@@ -0,0 +1,28 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { TrustedPublisherListResponse } from '../schemas/TrustedPublisherListResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface ListTrustedPublishersQueryQueryParams {
6
+ search?: string;
7
+ /**
8
+ * @default 0
9
+ */
10
+ page?: number;
11
+ /**
12
+ * @default 30
13
+ */
14
+ limit?: number;
15
+ }
16
+ export interface ListTrustedPublishersQueryHeaderParams {
17
+ 'Harness-Account': string;
18
+ }
19
+ export type ListTrustedPublishersOkResponse = ResponseWithPagination<TrustedPublisherListResponse>;
20
+ export type ListTrustedPublishersErrorResponse = unknown;
21
+ export interface ListTrustedPublishersProps extends Omit<FetcherOptions<ListTrustedPublishersQueryQueryParams, unknown, ListTrustedPublishersQueryHeaderParams>, 'url'> {
22
+ queryParams: ListTrustedPublishersQueryQueryParams;
23
+ }
24
+ export declare function listTrustedPublishers(props: ListTrustedPublishersProps): Promise<ListTrustedPublishersOkResponse>;
25
+ /**
26
+ * Returns paginated trusted publisher configuration for the account. Optional search filters publishers by name (case-insensitive contains).
27
+ */
28
+ export declare function useListTrustedPublishersQuery(props: ListTrustedPublishersProps, options?: Omit<UseQueryOptions<ListTrustedPublishersOkResponse, ListTrustedPublishersErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListTrustedPublishersOkResponse, 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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function listTrustedPublishers(props) {
7
+ return fetcher(Object.assign({ url: `/v1/trusted-publishers`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns paginated trusted publisher configuration for the account. Optional search filters publishers by name (case-insensitive contains).
11
+ */
12
+ export function useListTrustedPublishersQuery(props, options) {
13
+ return useQuery(['listTrustedPublishers', props.queryParams], ({ signal }) => listTrustedPublishers(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,22 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { TrustedPublisherResponse } from '../schemas/TrustedPublisherResponse';
3
+ import type { TrustedPublisherUpsertRequest } from '../schemas/TrustedPublisherUpsertRequest';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface UpdateTrustedPublisherMutationPathParams {
7
+ publisherId: string;
8
+ }
9
+ export interface UpdateTrustedPublisherMutationHeaderParams {
10
+ 'Harness-Account': string;
11
+ }
12
+ export type UpdateTrustedPublisherRequestBody = TrustedPublisherUpsertRequest;
13
+ export type UpdateTrustedPublisherOkResponse = ResponseWithPagination<TrustedPublisherResponse>;
14
+ export type UpdateTrustedPublisherErrorResponse = unknown;
15
+ export interface UpdateTrustedPublisherProps extends UpdateTrustedPublisherMutationPathParams, Omit<FetcherOptions<unknown, UpdateTrustedPublisherRequestBody, UpdateTrustedPublisherMutationHeaderParams>, 'url'> {
16
+ body: UpdateTrustedPublisherRequestBody;
17
+ }
18
+ export declare function updateTrustedPublisher(props: UpdateTrustedPublisherProps): Promise<UpdateTrustedPublisherOkResponse>;
19
+ /**
20
+ * Update a trusted publisher
21
+ */
22
+ export declare function useUpdateTrustedPublisherMutation(options?: Omit<UseMutationOptions<UpdateTrustedPublisherOkResponse, UpdateTrustedPublisherErrorResponse, UpdateTrustedPublisherProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdateTrustedPublisherOkResponse, unknown, UpdateTrustedPublisherProps, 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 updateTrustedPublisher(props) {
7
+ return fetcher(Object.assign({ url: `/v1/trusted-publishers/${props.publisherId}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Update a trusted publisher
11
+ */
12
+ export function useUpdateTrustedPublisherMutation(options) {
13
+ return useMutation((mutateProps) => updateTrustedPublisher(mutateProps), options);
14
+ }
@@ -31,10 +31,14 @@ export type { CreateScannerConfigurationErrorResponse, CreateScannerConfiguratio
31
31
  export { createScannerConfiguration, useCreateScannerConfigurationMutation, } from './hooks/useCreateScannerConfigurationMutation';
32
32
  export type { CreateTicketErrorResponse, CreateTicketMutationPathParams, CreateTicketOkResponse, CreateTicketProps, CreateTicketRequestBody, } from './hooks/useCreateTicketMutation';
33
33
  export { createTicket, useCreateTicketMutation } from './hooks/useCreateTicketMutation';
34
+ export type { CreateTrustedPublisherErrorResponse, CreateTrustedPublisherOkResponse, CreateTrustedPublisherProps, CreateTrustedPublisherRequestBody, } from './hooks/useCreateTrustedPublisherMutation';
35
+ export { createTrustedPublisher, useCreateTrustedPublisherMutation, } from './hooks/useCreateTrustedPublisherMutation';
34
36
  export type { DeleteIntegrationErrorResponse, DeleteIntegrationMutationPathParams, DeleteIntegrationMutationQueryParams, DeleteIntegrationOkResponse, DeleteIntegrationProps, } from './hooks/useDeleteIntegrationMutation';
35
37
  export { deleteIntegration, useDeleteIntegrationMutation, } from './hooks/useDeleteIntegrationMutation';
36
38
  export type { DeleteScannerConfigurationErrorResponse, DeleteScannerConfigurationMutationPathParams, DeleteScannerConfigurationOkResponse, DeleteScannerConfigurationProps, } from './hooks/useDeleteScannerConfigurationMutation';
37
39
  export { deleteScannerConfiguration, useDeleteScannerConfigurationMutation, } from './hooks/useDeleteScannerConfigurationMutation';
40
+ export type { DeleteTrustedPublisherErrorResponse, DeleteTrustedPublisherMutationPathParams, DeleteTrustedPublisherOkResponse, DeleteTrustedPublisherProps, } from './hooks/useDeleteTrustedPublisherMutation';
41
+ export { deleteTrustedPublisher, useDeleteTrustedPublisherMutation, } from './hooks/useDeleteTrustedPublisherMutation';
38
42
  export type { DownloadAttestationErrorResponse, DownloadAttestationOkResponse, DownloadAttestationProps, DownloadAttestationQueryPathParams, DownloadAttestationQueryQueryParams, } from './hooks/useDownloadAttestationQuery';
39
43
  export { downloadAttestation, useDownloadAttestationQuery, } from './hooks/useDownloadAttestationQuery';
40
44
  export type { DownloadSbomErrorResponse, DownloadSbomOkResponse, DownloadSbomProps, DownloadSbomQueryPathParams, DownloadSbomQueryQueryParams, } from './hooks/useDownloadSbomQuery';
@@ -229,6 +233,8 @@ export type { ListScannerConfigurationIntegrationsErrorResponse, ListScannerConf
229
233
  export { listScannerConfigurationIntegrations, useListScannerConfigurationIntegrationsQuery, } from './hooks/useListScannerConfigurationIntegrationsQuery';
230
234
  export type { ListScannerConfigurationsErrorResponse, ListScannerConfigurationsOkResponse, ListScannerConfigurationsProps, ListScannerConfigurationsQueryPathParams, ListScannerConfigurationsQueryQueryParams, } from './hooks/useListScannerConfigurationsQuery';
231
235
  export { listScannerConfigurations, useListScannerConfigurationsQuery, } from './hooks/useListScannerConfigurationsQuery';
236
+ export type { ListTrustedPublishersErrorResponse, ListTrustedPublishersOkResponse, ListTrustedPublishersProps, ListTrustedPublishersQueryQueryParams, } from './hooks/useListTrustedPublishersQuery';
237
+ export { listTrustedPublishers, useListTrustedPublishersQuery, } from './hooks/useListTrustedPublishersQuery';
232
238
  export type { PostComplianceResultStatsEvaluationBreakdownArtifactTypeErrorResponse, PostComplianceResultStatsEvaluationBreakdownArtifactTypeMutationPathParams, PostComplianceResultStatsEvaluationBreakdownArtifactTypeMutationQueryParams, PostComplianceResultStatsEvaluationBreakdownArtifactTypeOkResponse, PostComplianceResultStatsEvaluationBreakdownArtifactTypeProps, PostComplianceResultStatsEvaluationBreakdownArtifactTypeRequestBody, } from './hooks/usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation';
233
239
  export { postComplianceResultStatsEvaluationBreakdownArtifactType, usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation, } from './hooks/usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation';
234
240
  export type { PostComplianceResultStatsOverviewErrorResponse, PostComplianceResultStatsOverviewMutationPathParams, PostComplianceResultStatsOverviewMutationQueryParams, PostComplianceResultStatsOverviewOkResponse, PostComplianceResultStatsOverviewProps, PostComplianceResultStatsOverviewRequestBody, } from './hooks/usePostComplianceResultStatsOverviewMutation';
@@ -271,6 +277,8 @@ export type { UpdateRemediationTrackerErrorResponse, UpdateRemediationTrackerMut
271
277
  export { updateRemediationTracker, useUpdateRemediationTrackerMutation, } from './hooks/useUpdateRemediationTrackerMutation';
272
278
  export type { UpdateScannerConfigurationErrorResponse, UpdateScannerConfigurationMutationPathParams, UpdateScannerConfigurationOkResponse, UpdateScannerConfigurationProps, UpdateScannerConfigurationRequestBody, } from './hooks/useUpdateScannerConfigurationMutation';
273
279
  export { updateScannerConfiguration, useUpdateScannerConfigurationMutation, } from './hooks/useUpdateScannerConfigurationMutation';
280
+ export type { UpdateTrustedPublisherErrorResponse, UpdateTrustedPublisherMutationPathParams, UpdateTrustedPublisherOkResponse, UpdateTrustedPublisherProps, UpdateTrustedPublisherRequestBody, } from './hooks/useUpdateTrustedPublisherMutation';
281
+ export { updateTrustedPublisher, useUpdateTrustedPublisherMutation, } from './hooks/useUpdateTrustedPublisherMutation';
274
282
  export type { UpsertEolAutoTicketConfigErrorResponse, UpsertEolAutoTicketConfigMutationPathParams, UpsertEolAutoTicketConfigOkResponse, UpsertEolAutoTicketConfigProps, UpsertEolAutoTicketConfigRequestBody, } from './hooks/useUpsertEolAutoTicketConfigMutation';
275
283
  export { upsertEolAutoTicketConfig, useUpsertEolAutoTicketConfigMutation, } from './hooks/useUpsertEolAutoTicketConfigMutation';
276
284
  export type { ValidateIntegrationNameErrorResponse, ValidateIntegrationNameOkResponse, ValidateIntegrationNameProps, ValidateIntegrationNameQueryPathParams, ValidateIntegrationNameQueryQueryParams, } from './hooks/useValidateIntegrationNameQuery';
@@ -14,8 +14,10 @@ export { createRemediationPullRequest, useCreateRemediationPullRequestMutation,
14
14
  export { createRemediationTracker, useCreateRemediationTrackerMutation, } from './hooks/useCreateRemediationTrackerMutation';
15
15
  export { createScannerConfiguration, useCreateScannerConfigurationMutation, } from './hooks/useCreateScannerConfigurationMutation';
16
16
  export { createTicket, useCreateTicketMutation } from './hooks/useCreateTicketMutation';
17
+ export { createTrustedPublisher, useCreateTrustedPublisherMutation, } from './hooks/useCreateTrustedPublisherMutation';
17
18
  export { deleteIntegration, useDeleteIntegrationMutation, } from './hooks/useDeleteIntegrationMutation';
18
19
  export { deleteScannerConfiguration, useDeleteScannerConfigurationMutation, } from './hooks/useDeleteScannerConfigurationMutation';
20
+ export { deleteTrustedPublisher, useDeleteTrustedPublisherMutation, } from './hooks/useDeleteTrustedPublisherMutation';
19
21
  export { downloadAttestation, useDownloadAttestationQuery, } from './hooks/useDownloadAttestationQuery';
20
22
  export { downloadSbom, useDownloadSbomQuery } from './hooks/useDownloadSbomQuery';
21
23
  export { excludeArtifact, useExcludeArtifactMutation } from './hooks/useExcludeArtifactMutation';
@@ -113,6 +115,7 @@ export { listRemediations, useListRemediationsQuery } from './hooks/useListRemed
113
115
  export { listRspmScanners, useListRspmScannersQuery } from './hooks/useListRspmScannersQuery';
114
116
  export { listScannerConfigurationIntegrations, useListScannerConfigurationIntegrationsQuery, } from './hooks/useListScannerConfigurationIntegrationsQuery';
115
117
  export { listScannerConfigurations, useListScannerConfigurationsQuery, } from './hooks/useListScannerConfigurationsQuery';
118
+ export { listTrustedPublishers, useListTrustedPublishersQuery, } from './hooks/useListTrustedPublishersQuery';
116
119
  export { postComplianceResultStatsEvaluationBreakdownArtifactType, usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation, } from './hooks/usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation';
117
120
  export { postComplianceResultStatsOverview, usePostComplianceResultStatsOverviewMutation, } from './hooks/usePostComplianceResultStatsOverviewMutation';
118
121
  export { remediateAffectedTarget, useRemediateAffectedTargetQuery, } from './hooks/useRemediateAffectedTargetQuery';
@@ -134,5 +137,6 @@ export { updateExemption, useUpdateExemptionMutation } from './hooks/useUpdateEx
134
137
  export { updateIntegrationRspmConfig, useUpdateIntegrationRspmConfigMutation, } from './hooks/useUpdateIntegrationRspmConfigMutation';
135
138
  export { updateRemediationTracker, useUpdateRemediationTrackerMutation, } from './hooks/useUpdateRemediationTrackerMutation';
136
139
  export { updateScannerConfiguration, useUpdateScannerConfigurationMutation, } from './hooks/useUpdateScannerConfigurationMutation';
140
+ export { updateTrustedPublisher, useUpdateTrustedPublisherMutation, } from './hooks/useUpdateTrustedPublisherMutation';
137
141
  export { upsertEolAutoTicketConfig, useUpsertEolAutoTicketConfigMutation, } from './hooks/useUpsertEolAutoTicketConfigMutation';
138
142
  export { useValidateIntegrationNameQuery, validateIntegrationName, } from './hooks/useValidateIntegrationNameQuery';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",