@harnessio/react-har-service-client 0.5.0 → 0.7.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.
- package/dist/har-service/src/services/hooks/{useRetriggerWebhookExecutionQuery.d.ts → useReTriggerWebhookExecutionQuery.d.ts} +6 -6
- package/dist/har-service/src/services/hooks/{useRetriggerWebhookExecutionQuery.js → useReTriggerWebhookExecutionQuery.js} +4 -4
- package/dist/har-service/src/services/hooks/useUpdateWebhookMutation.js +1 -1
- package/dist/har-service/src/services/index.d.ts +4 -2
- package/dist/har-service/src/services/index.js +1 -1
- package/dist/har-service/src/services/schemas/ArtifactDetail.d.ts +2 -1
- package/dist/har-service/src/services/schemas/ExtraHeader.d.ts +7 -0
- package/dist/har-service/src/services/schemas/ExtraHeader.js +4 -0
- package/dist/har-service/src/services/schemas/MavenArtifactDetailConfig.d.ts +7 -0
- package/dist/har-service/src/services/schemas/MavenArtifactDetailConfig.js +4 -0
- package/dist/har-service/src/services/schemas/UpstreamConfig.d.ts +1 -1
- package/dist/har-service/src/services/schemas/Webhook.d.ts +11 -16
- package/dist/har-service/src/services/schemas/WebhookExecResponse.d.ts +1 -1
- package/dist/har-service/src/services/schemas/WebhookExecution.d.ts +3 -3
- package/dist/har-service/src/services/schemas/WebhookRequest.d.ts +8 -3
- package/package.json +1 -1
|
@@ -6,17 +6,17 @@ import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
|
|
|
6
6
|
import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
|
|
7
7
|
import type { ResponseWithPagination } from '../helpers';
|
|
8
8
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
9
|
-
export interface
|
|
9
|
+
export interface ReTriggerWebhookExecutionQueryPathParams {
|
|
10
10
|
registry_ref: string;
|
|
11
11
|
webhook_identifier: string;
|
|
12
12
|
webhook_execution_id: string;
|
|
13
13
|
}
|
|
14
|
-
export type
|
|
15
|
-
export type
|
|
16
|
-
export interface
|
|
14
|
+
export type ReTriggerWebhookExecutionOkResponse = ResponseWithPagination<WebhookExecutionResponseResponse>;
|
|
15
|
+
export type ReTriggerWebhookExecutionErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | InternalServerErrorResponse;
|
|
16
|
+
export interface ReTriggerWebhookExecutionProps extends ReTriggerWebhookExecutionQueryPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
17
17
|
}
|
|
18
|
-
export declare function
|
|
18
|
+
export declare function reTriggerWebhookExecution(props: ReTriggerWebhookExecutionProps): Promise<ReTriggerWebhookExecutionOkResponse>;
|
|
19
19
|
/**
|
|
20
20
|
* Retrigger Webhook Execution
|
|
21
21
|
*/
|
|
22
|
-
export declare function
|
|
22
|
+
export declare function useReTriggerWebhookExecutionQuery(props: ReTriggerWebhookExecutionProps, options?: Omit<UseQueryOptions<ReTriggerWebhookExecutionOkResponse, ReTriggerWebhookExecutionErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ReTriggerWebhookExecutionOkResponse, import("..").Error>;
|
|
@@ -3,17 +3,17 @@
|
|
|
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
|
|
6
|
+
export function reTriggerWebhookExecution(props) {
|
|
7
7
|
return fetcher(Object.assign({ url: `/registry/${props.registry_ref}/webhooks/${props.webhook_identifier}/executions/${props.webhook_execution_id}/retrigger`, method: 'GET' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Retrigger Webhook Execution
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
12
|
+
export function useReTriggerWebhookExecutionQuery(props, options) {
|
|
13
13
|
return useQuery([
|
|
14
|
-
'
|
|
14
|
+
'ReTriggerWebhookExecution',
|
|
15
15
|
props.registry_ref,
|
|
16
16
|
props.webhook_identifier,
|
|
17
17
|
props.webhook_execution_id,
|
|
18
|
-
], ({ signal }) =>
|
|
18
|
+
], ({ signal }) => reTriggerWebhookExecution(Object.assign(Object.assign({}, props), { signal })), options);
|
|
19
19
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { useMutation } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function updateWebhook(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/registry/${props.registry_ref}/webhooks/${props.webhook_identifier}`, method: '
|
|
7
|
+
return fetcher(Object.assign({ url: `/registry/${props.registry_ref}/webhooks/${props.webhook_identifier}`, method: 'PUT' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Returns Webhook Details
|
|
@@ -65,10 +65,10 @@ export type { ListWebhooksErrorResponse, ListWebhooksOkResponse, ListWebhooksPro
|
|
|
65
65
|
export { listWebhooks, useListWebhooksQuery } from './hooks/useListWebhooksQuery';
|
|
66
66
|
export type { ModifyRegistryErrorResponse, ModifyRegistryMutationPathParams, ModifyRegistryOkResponse, ModifyRegistryProps, ModifyRegistryRequestBody, } from './hooks/useModifyRegistryMutation';
|
|
67
67
|
export { modifyRegistry, useModifyRegistryMutation } from './hooks/useModifyRegistryMutation';
|
|
68
|
+
export type { ReTriggerWebhookExecutionErrorResponse, ReTriggerWebhookExecutionOkResponse, ReTriggerWebhookExecutionProps, ReTriggerWebhookExecutionQueryPathParams, } from './hooks/useReTriggerWebhookExecutionQuery';
|
|
69
|
+
export { reTriggerWebhookExecution, useReTriggerWebhookExecutionQuery, } from './hooks/useReTriggerWebhookExecutionQuery';
|
|
68
70
|
export type { RedirectHarnessArtifactErrorResponse, RedirectHarnessArtifactOkResponse, RedirectHarnessArtifactProps, RedirectHarnessArtifactQueryPathParams, RedirectHarnessArtifactQueryQueryParams, } from './hooks/useRedirectHarnessArtifactQuery';
|
|
69
71
|
export { redirectHarnessArtifact, useRedirectHarnessArtifactQuery, } from './hooks/useRedirectHarnessArtifactQuery';
|
|
70
|
-
export type { RetriggerWebhookExecutionErrorResponse, RetriggerWebhookExecutionOkResponse, RetriggerWebhookExecutionProps, RetriggerWebhookExecutionQueryPathParams, } from './hooks/useRetriggerWebhookExecutionQuery';
|
|
71
|
-
export { retriggerWebhookExecution, useRetriggerWebhookExecutionQuery, } from './hooks/useRetriggerWebhookExecutionQuery';
|
|
72
72
|
export type { UpdateArtifactLabelsErrorResponse, UpdateArtifactLabelsMutationPathParams, UpdateArtifactLabelsOkResponse, UpdateArtifactLabelsProps, UpdateArtifactLabelsRequestBody, } from './hooks/useUpdateArtifactLabelsMutation';
|
|
73
73
|
export { updateArtifactLabels, useUpdateArtifactLabelsMutation, } from './hooks/useUpdateArtifactLabelsMutation';
|
|
74
74
|
export type { UpdateWebhookErrorResponse, UpdateWebhookMutationPathParams, UpdateWebhookOkResponse, UpdateWebhookProps, UpdateWebhookRequestBody, } from './hooks/useUpdateWebhookMutation';
|
|
@@ -141,6 +141,7 @@ export type { DockerManifestDetails } from './schemas/DockerManifestDetails';
|
|
|
141
141
|
export type { DockerManifests } from './schemas/DockerManifests';
|
|
142
142
|
export type { EnvironmentType } from './schemas/EnvironmentType';
|
|
143
143
|
export type { Error } from './schemas/Error';
|
|
144
|
+
export type { ExtraHeader } from './schemas/ExtraHeader';
|
|
144
145
|
export type { FileDetail } from './schemas/FileDetail';
|
|
145
146
|
export type { GenericArtifactDetailConfig } from './schemas/GenericArtifactDetailConfig';
|
|
146
147
|
export type { HelmArtifactDetail } from './schemas/HelmArtifactDetail';
|
|
@@ -153,6 +154,7 @@ export type { ListRegistry } from './schemas/ListRegistry';
|
|
|
153
154
|
export type { ListRegistryArtifact } from './schemas/ListRegistryArtifact';
|
|
154
155
|
export type { ListWebhooks } from './schemas/ListWebhooks';
|
|
155
156
|
export type { ListWebhooksExecutions } from './schemas/ListWebhooksExecutions';
|
|
157
|
+
export type { MavenArtifactDetailConfig } from './schemas/MavenArtifactDetailConfig';
|
|
156
158
|
export type { PackageType } from './schemas/PackageType';
|
|
157
159
|
export type { Registry } from './schemas/Registry';
|
|
158
160
|
export type { RegistryArtifactMetadata } from './schemas/RegistryArtifactMetadata';
|
|
@@ -31,7 +31,7 @@ export { listArtifactLabels, useListArtifactLabelsQuery } from './hooks/useListA
|
|
|
31
31
|
export { listWebhookExecutions, useListWebhookExecutionsQuery, } from './hooks/useListWebhookExecutionsQuery';
|
|
32
32
|
export { listWebhooks, useListWebhooksQuery } from './hooks/useListWebhooksQuery';
|
|
33
33
|
export { modifyRegistry, useModifyRegistryMutation } from './hooks/useModifyRegistryMutation';
|
|
34
|
+
export { reTriggerWebhookExecution, useReTriggerWebhookExecutionQuery, } from './hooks/useReTriggerWebhookExecutionQuery';
|
|
34
35
|
export { redirectHarnessArtifact, useRedirectHarnessArtifactQuery, } from './hooks/useRedirectHarnessArtifactQuery';
|
|
35
|
-
export { retriggerWebhookExecution, useRetriggerWebhookExecutionQuery, } from './hooks/useRetriggerWebhookExecutionQuery';
|
|
36
36
|
export { updateArtifactLabels, useUpdateArtifactLabelsMutation, } from './hooks/useUpdateArtifactLabelsMutation';
|
|
37
37
|
export { updateWebhook, useUpdateWebhookMutation } from './hooks/useUpdateWebhookMutation';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { DockerArtifactDetailConfig } from '../schemas/DockerArtifactDetailConfig';
|
|
2
2
|
import type { HelmArtifactDetailConfig } from '../schemas/HelmArtifactDetailConfig';
|
|
3
3
|
import type { GenericArtifactDetailConfig } from '../schemas/GenericArtifactDetailConfig';
|
|
4
|
+
import type { MavenArtifactDetailConfig } from '../schemas/MavenArtifactDetailConfig';
|
|
4
5
|
import type { PackageType } from '../schemas/PackageType';
|
|
5
6
|
/**
|
|
6
7
|
* Artifact Detail
|
|
7
8
|
*/
|
|
8
|
-
export type ArtifactDetail = (DockerArtifactDetailConfig | HelmArtifactDetailConfig | GenericArtifactDetailConfig) & {
|
|
9
|
+
export type ArtifactDetail = (DockerArtifactDetailConfig | HelmArtifactDetailConfig | GenericArtifactDetailConfig | MavenArtifactDetailConfig) & {
|
|
9
10
|
createdAt?: string;
|
|
10
11
|
createdBy?: string;
|
|
11
12
|
/**
|
|
@@ -8,6 +8,6 @@ import type { AuthType } from '../schemas/AuthType';
|
|
|
8
8
|
export interface UpstreamConfig {
|
|
9
9
|
auth?: UserPassword | Anonymous | AccessKeySecretKey;
|
|
10
10
|
authType: AuthType;
|
|
11
|
-
source?: 'AwsEcr' | 'Custom' | 'Dockerhub';
|
|
11
|
+
source?: 'AwsEcr' | 'Custom' | 'Dockerhub' | 'MavenCentral';
|
|
12
12
|
url?: string;
|
|
13
13
|
}
|
|
@@ -1,31 +1,26 @@
|
|
|
1
|
+
import type { ExtraHeader } from '../schemas/ExtraHeader';
|
|
1
2
|
import type { WebhookExecResult } from '../schemas/WebhookExecResult';
|
|
2
3
|
import type { Trigger } from '../schemas/Trigger';
|
|
3
4
|
/**
|
|
4
5
|
* Harness Regstries Webhook
|
|
5
6
|
*/
|
|
6
7
|
export interface Webhook {
|
|
8
|
+
createdAt?: string;
|
|
7
9
|
/**
|
|
8
10
|
* @format int64
|
|
9
11
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
created_by?: number;
|
|
15
|
-
enabled?: boolean;
|
|
16
|
-
has_secret?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* @format int64
|
|
19
|
-
*/
|
|
20
|
-
id?: number;
|
|
12
|
+
createdBy?: number;
|
|
13
|
+
description?: string;
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
extraHeaders?: ExtraHeader[];
|
|
21
16
|
identifier: string;
|
|
22
|
-
insecure
|
|
17
|
+
insecure: boolean;
|
|
23
18
|
latestExecutionResult?: WebhookExecResult;
|
|
24
|
-
|
|
25
|
-
* @format int64
|
|
26
|
-
*/
|
|
27
|
-
modifiedAt?: number;
|
|
19
|
+
modifiedAt?: string;
|
|
28
20
|
name: string;
|
|
21
|
+
secretIdentifier?: string;
|
|
22
|
+
secretSpaceId?: number;
|
|
23
|
+
secretSpacePath?: string;
|
|
29
24
|
triggers?: Trigger[];
|
|
30
25
|
url: string;
|
|
31
26
|
/**
|
|
@@ -25,11 +25,11 @@ export interface WebhookExecution {
|
|
|
25
25
|
/**
|
|
26
26
|
* @format int64
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
retriggerOf?: number;
|
|
29
29
|
retriggerable?: boolean;
|
|
30
|
-
|
|
30
|
+
triggerType?: Trigger;
|
|
31
31
|
/**
|
|
32
32
|
* @format int64
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
webhookId?: number;
|
|
35
35
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import type { ExtraHeader } from '../schemas/ExtraHeader';
|
|
1
2
|
import type { Trigger } from '../schemas/Trigger';
|
|
2
3
|
export interface WebhookRequest {
|
|
3
4
|
description?: string;
|
|
4
|
-
enabled
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
extraHeaders?: ExtraHeader[];
|
|
5
7
|
identifier: string;
|
|
6
|
-
insecure
|
|
7
|
-
|
|
8
|
+
insecure: boolean;
|
|
9
|
+
name: string;
|
|
10
|
+
secretIdentifier?: string;
|
|
11
|
+
secretSpaceId?: number;
|
|
12
|
+
secretSpacePath?: string;
|
|
8
13
|
triggers?: Trigger[];
|
|
9
14
|
url: string;
|
|
10
15
|
}
|