@harnessio/react-rmg-service-client 0.60.0 → 0.62.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/rmg-service/src/services/hooks/useIngestWebhookSignalMutation.d.ts +21 -0
- package/dist/rmg-service/src/services/hooks/useIngestWebhookSignalMutation.js +14 -0
- package/dist/rmg-service/src/services/hooks/usePostOrchestrationProcessInputValidateMutation.d.ts +26 -0
- package/dist/rmg-service/src/services/hooks/usePostOrchestrationProcessInputValidateMutation.js +14 -0
- package/dist/rmg-service/src/services/index.d.ts +10 -3
- package/dist/rmg-service/src/services/index.js +2 -1
- package/dist/rmg-service/src/services/responses/ValidateOrchestrationProcessInputResponseResponse.d.ts +2 -0
- package/dist/rmg-service/src/services/responses/ValidateOrchestrationProcessInputResponseResponse.js +1 -0
- package/dist/rmg-service/src/services/schemas/CreateOrchestrationActivityRequestType.d.ts +1 -1
- package/dist/rmg-service/src/services/schemas/OrchestrationActivityWebhookYaml.d.ts +46 -0
- package/dist/rmg-service/src/services/schemas/OrchestrationActivityYaml.d.ts +2 -0
- package/dist/rmg-service/src/services/schemas/ProcessInputValidationResponse.d.ts +13 -0
- package/dist/rmg-service/src/services/schemas/ProcessInputValidationResponse.js +4 -0
- package/dist/rmg-service/src/services/schemas/ReleaseApprovalType.d.ts +1 -1
- package/dist/rmg-service/src/services/schemas/StepInfoType.d.ts +1 -1
- package/dist/rmg-service/src/services/schemas/WebhookErrorResponse.d.ts +12 -0
- package/dist/rmg-service/src/services/schemas/WebhookErrorResponse.js +4 -0
- package/dist/rmg-service/src/services/schemas/WebhookEventType.d.ts +4 -0
- package/dist/rmg-service/src/services/schemas/WebhookEventType.js +4 -0
- package/dist/rmg-service/src/services/schemas/WebhookSignalRequest.d.ts +4 -8
- package/dist/rmg-service/src/services/schemas/WebhookSignalResponse.d.ts +4 -3
- package/dist/rmg-service/src/services/schemas/WebhookSignalResponse.js +0 -3
- package/dist/rmg-service/src/services/schemas/WebhookSignalStatus.d.ts +4 -0
- package/dist/rmg-service/src/services/schemas/WebhookSignalStatus.js +4 -0
- package/package.json +1 -1
- package/dist/rmg-service/src/services/hooks/useReceiveWebhookSignalMutation.d.ts +0 -21
- package/dist/rmg-service/src/services/hooks/useReceiveWebhookSignalMutation.js +0 -15
- package/dist/rmg-service/src/services/schemas/WebhookPipeline.d.ts +0 -6
- /package/dist/rmg-service/src/services/schemas/{WebhookPipeline.js → OrchestrationActivityWebhookYaml.js} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { WebhookSignalResponse } from '../schemas/WebhookSignalResponse';
|
|
3
|
+
import type { WebhookErrorResponse } from '../schemas/WebhookErrorResponse';
|
|
4
|
+
import type { WebhookSignalRequest } from '../schemas/WebhookSignalRequest';
|
|
5
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
+
export interface IngestWebhookSignalMutationHeaderParams {
|
|
8
|
+
'Harness-Account': string;
|
|
9
|
+
'X-Idempotency-Key': string;
|
|
10
|
+
}
|
|
11
|
+
export type IngestWebhookSignalRequestBody = WebhookSignalRequest;
|
|
12
|
+
export type IngestWebhookSignalOkResponse = ResponseWithPagination<WebhookSignalResponse>;
|
|
13
|
+
export type IngestWebhookSignalErrorResponse = WebhookErrorResponse;
|
|
14
|
+
export interface IngestWebhookSignalProps extends Omit<FetcherOptions<unknown, IngestWebhookSignalRequestBody, IngestWebhookSignalMutationHeaderParams>, 'url'> {
|
|
15
|
+
body: IngestWebhookSignalRequestBody;
|
|
16
|
+
}
|
|
17
|
+
export declare function ingestWebhookSignal(props: IngestWebhookSignalProps): Promise<IngestWebhookSignalOkResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Receives an inbound webhook signal, validates it, and queues it for processing via the outbox.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useIngestWebhookSignalMutation(options?: Omit<UseMutationOptions<IngestWebhookSignalOkResponse, IngestWebhookSignalErrorResponse, IngestWebhookSignalProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<IngestWebhookSignalOkResponse, WebhookErrorResponse, IngestWebhookSignalProps, 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 ingestWebhookSignal(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/webhook/signal`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Receives an inbound webhook signal, validates it, and queues it for processing via the outbox.
|
|
11
|
+
*/
|
|
12
|
+
export function useIngestWebhookSignalMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => ingestWebhookSignal(mutateProps), options);
|
|
14
|
+
}
|
package/dist/rmg-service/src/services/hooks/usePostOrchestrationProcessInputValidateMutation.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ValidateOrchestrationProcessInputResponseResponse } from '../responses/ValidateOrchestrationProcessInputResponseResponse';
|
|
3
|
+
import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface PostOrchestrationProcessInputValidateMutationPathParams {
|
|
7
|
+
processIdentifier: string;
|
|
8
|
+
identifier: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PostOrchestrationProcessInputValidateMutationQueryParams {
|
|
11
|
+
orgIdentifier?: string;
|
|
12
|
+
projectIdentifier?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface PostOrchestrationProcessInputValidateMutationHeaderParams {
|
|
15
|
+
'Harness-Account': string;
|
|
16
|
+
}
|
|
17
|
+
export type PostOrchestrationProcessInputValidateOkResponse = ResponseWithPagination<ValidateOrchestrationProcessInputResponseResponse>;
|
|
18
|
+
export type PostOrchestrationProcessInputValidateErrorResponse = ErrorResponseResponse;
|
|
19
|
+
export interface PostOrchestrationProcessInputValidateProps extends PostOrchestrationProcessInputValidateMutationPathParams, Omit<FetcherOptions<PostOrchestrationProcessInputValidateMutationQueryParams, unknown, PostOrchestrationProcessInputValidateMutationHeaderParams>, 'url'> {
|
|
20
|
+
queryParams: PostOrchestrationProcessInputValidateMutationQueryParams;
|
|
21
|
+
}
|
|
22
|
+
export declare function postOrchestrationProcessInputValidate(props: PostOrchestrationProcessInputValidateProps): Promise<PostOrchestrationProcessInputValidateOkResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* On-demand cross-entity validation for a process input. Checks that all activity `with` keys are recognised (X4 warning) and that all required activity inputs are covered (X5 error). Returns HTTP 200 with a validation report regardless of outcome — never modifies any state.
|
|
25
|
+
*/
|
|
26
|
+
export declare function usePostOrchestrationProcessInputValidateMutation(options?: Omit<UseMutationOptions<PostOrchestrationProcessInputValidateOkResponse, PostOrchestrationProcessInputValidateErrorResponse, PostOrchestrationProcessInputValidateProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PostOrchestrationProcessInputValidateOkResponse, import("..").Error, PostOrchestrationProcessInputValidateProps, unknown>;
|
package/dist/rmg-service/src/services/hooks/usePostOrchestrationProcessInputValidateMutation.js
ADDED
|
@@ -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 postOrchestrationProcessInputValidate(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/orchestration/process/${props.processIdentifier}/input/${props.identifier}/validate`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* On-demand cross-entity validation for a process input. Checks that all activity `with` keys are recognised (X4 warning) and that all required activity inputs are covered (X5 error). Returns HTTP 200 with a validation report regardless of outcome — never modifies any state.
|
|
11
|
+
*/
|
|
12
|
+
export function usePostOrchestrationProcessInputValidateMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => postOrchestrationProcessInputValidate(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -87,6 +87,8 @@ export type { GetTaskCommentsSummaryErrorResponse, GetTaskCommentsSummaryOkRespo
|
|
|
87
87
|
export { getTaskCommentsSummary, useGetTaskCommentsSummaryQuery, } from './hooks/useGetTaskCommentsSummaryQuery';
|
|
88
88
|
export type { GetYamlSchemaErrorResponse, GetYamlSchemaOkResponse, GetYamlSchemaProps, GetYamlSchemaQueryQueryParams, } from './hooks/useGetYamlSchemaQuery';
|
|
89
89
|
export { getYamlSchema, useGetYamlSchemaQuery } from './hooks/useGetYamlSchemaQuery';
|
|
90
|
+
export type { IngestWebhookSignalErrorResponse, IngestWebhookSignalOkResponse, IngestWebhookSignalProps, IngestWebhookSignalRequestBody, } from './hooks/useIngestWebhookSignalMutation';
|
|
91
|
+
export { ingestWebhookSignal, useIngestWebhookSignalMutation, } from './hooks/useIngestWebhookSignalMutation';
|
|
90
92
|
export type { PatchReleaseGroupErrorResponse, PatchReleaseGroupMutationPathParams, PatchReleaseGroupMutationQueryParams, PatchReleaseGroupOkResponse, PatchReleaseGroupProps, PatchReleaseGroupRequestBody, } from './hooks/usePatchReleaseGroupMutation';
|
|
91
93
|
export { patchReleaseGroup, usePatchReleaseGroupMutation, } from './hooks/usePatchReleaseGroupMutation';
|
|
92
94
|
export type { PostActivityExecutionOutputErrorResponse, PostActivityExecutionOutputMutationPathParams, PostActivityExecutionOutputMutationQueryParams, PostActivityExecutionOutputOkResponse, PostActivityExecutionOutputProps, PostActivityExecutionOutputRequestBody, } from './hooks/usePostActivityExecutionOutputMutation';
|
|
@@ -99,6 +101,8 @@ export type { PostOrchestrationProcessAttachedReleaseGroupsErrorResponse, PostOr
|
|
|
99
101
|
export { postOrchestrationProcessAttachedReleaseGroups, usePostOrchestrationProcessAttachedReleaseGroupsMutation, } from './hooks/usePostOrchestrationProcessAttachedReleaseGroupsMutation';
|
|
100
102
|
export type { PostOrchestrationProcessInputErrorResponse, PostOrchestrationProcessInputMutationPathParams, PostOrchestrationProcessInputMutationQueryParams, PostOrchestrationProcessInputOkResponse, PostOrchestrationProcessInputProps, PostOrchestrationProcessInputRequestBody, } from './hooks/usePostOrchestrationProcessInputMutation';
|
|
101
103
|
export { postOrchestrationProcessInput, usePostOrchestrationProcessInputMutation, } from './hooks/usePostOrchestrationProcessInputMutation';
|
|
104
|
+
export type { PostOrchestrationProcessInputValidateErrorResponse, PostOrchestrationProcessInputValidateMutationPathParams, PostOrchestrationProcessInputValidateMutationQueryParams, PostOrchestrationProcessInputValidateOkResponse, PostOrchestrationProcessInputValidateProps, } from './hooks/usePostOrchestrationProcessInputValidateMutation';
|
|
105
|
+
export { postOrchestrationProcessInputValidate, usePostOrchestrationProcessInputValidateMutation, } from './hooks/usePostOrchestrationProcessInputValidateMutation';
|
|
102
106
|
export type { PostOrchestrationProcessErrorResponse, PostOrchestrationProcessMutationQueryParams, PostOrchestrationProcessOkResponse, PostOrchestrationProcessProps, PostOrchestrationProcessRequestBody, } from './hooks/usePostOrchestrationProcessMutation';
|
|
103
107
|
export { postOrchestrationProcess, usePostOrchestrationProcessMutation, } from './hooks/usePostOrchestrationProcessMutation';
|
|
104
108
|
export type { PostReleaseActionErrorResponse, PostReleaseActionMutationPathParams, PostReleaseActionMutationQueryParams, PostReleaseActionOkResponse, PostReleaseActionProps, PostReleaseActionRequestBody, } from './hooks/usePostReleaseActionMutation';
|
|
@@ -127,8 +131,6 @@ export type { PutReleaseGroupErrorResponse, PutReleaseGroupMutationPathParams, P
|
|
|
127
131
|
export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
|
|
128
132
|
export type { PutReleaseReleaseIdErrorResponse, PutReleaseReleaseIdMutationPathParams, PutReleaseReleaseIdOkResponse, PutReleaseReleaseIdProps, PutReleaseReleaseIdRequestBody, } from './hooks/usePutReleaseReleaseIdMutation';
|
|
129
133
|
export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
|
|
130
|
-
export type { ReceiveWebhookSignalErrorResponse, ReceiveWebhookSignalOkResponse, ReceiveWebhookSignalProps, ReceiveWebhookSignalRequestBody, } from './hooks/useReceiveWebhookSignalMutation';
|
|
131
|
-
export { receiveWebhookSignal, useReceiveWebhookSignalMutation, } from './hooks/useReceiveWebhookSignalMutation';
|
|
132
134
|
export type { ServeUploadErrorResponse, ServeUploadOkResponse, ServeUploadProps, ServeUploadQueryPathParams, } from './hooks/useServeUploadQuery';
|
|
133
135
|
export { serveUpload, useServeUploadQuery } from './hooks/useServeUploadQuery';
|
|
134
136
|
export type { StartReleaseExecutionErrorResponse, StartReleaseExecutionMutationPathParams, StartReleaseExecutionMutationQueryParams, StartReleaseExecutionOkResponse, StartReleaseExecutionProps, StartReleaseExecutionRequestBody, } from './hooks/useStartReleaseExecutionMutation';
|
|
@@ -210,6 +212,7 @@ export type { UpdateReleaseConflictResponseResponse } from './responses/UpdateRe
|
|
|
210
212
|
export type { UpdateReleaseGroupResponseResponse } from './responses/UpdateReleaseGroupResponseResponse';
|
|
211
213
|
export type { UpdateReleaseResponseResponse } from './responses/UpdateReleaseResponseResponse';
|
|
212
214
|
export type { UpdateTaskCommentResponseResponse } from './responses/UpdateTaskCommentResponseResponse';
|
|
215
|
+
export type { ValidateOrchestrationProcessInputResponseResponse } from './responses/ValidateOrchestrationProcessInputResponseResponse';
|
|
213
216
|
export type { ActivityCounts } from './schemas/ActivityCounts';
|
|
214
217
|
export type { ActivityExecutionInputDto } from './schemas/ActivityExecutionInputDto';
|
|
215
218
|
export type { ActivityInputYaml } from './schemas/ActivityInputYaml';
|
|
@@ -278,6 +281,7 @@ export type { OrchestrationActivityPipelineYaml } from './schemas/OrchestrationA
|
|
|
278
281
|
export type { OrchestrationActivityProcessYaml } from './schemas/OrchestrationActivityProcessYaml';
|
|
279
282
|
export type { OrchestrationActivitySubprocessYaml } from './schemas/OrchestrationActivitySubprocessYaml';
|
|
280
283
|
export type { OrchestrationActivitySummaryDto } from './schemas/OrchestrationActivitySummaryDto';
|
|
284
|
+
export type { OrchestrationActivityWebhookYaml } from './schemas/OrchestrationActivityWebhookYaml';
|
|
281
285
|
export type { OrchestrationActivityYaml } from './schemas/OrchestrationActivityYaml';
|
|
282
286
|
export type { OrchestrationActivityYamlDto } from './schemas/OrchestrationActivityYamlDto';
|
|
283
287
|
export type { OrchestrationExecutionActivity } from './schemas/OrchestrationExecutionActivity';
|
|
@@ -297,6 +301,7 @@ export type { PhaseReleaseInputYaml } from './schemas/PhaseReleaseInputYaml';
|
|
|
297
301
|
export type { PipelineActivityInfo } from './schemas/PipelineActivityInfo';
|
|
298
302
|
export type { PrimitiveInputVariable } from './schemas/PrimitiveInputVariable';
|
|
299
303
|
export type { ProcessInputSummaryDto } from './schemas/ProcessInputSummaryDto';
|
|
304
|
+
export type { ProcessInputValidationResponse } from './schemas/ProcessInputValidationResponse';
|
|
300
305
|
export type { ReleaseActionRequest } from './schemas/ReleaseActionRequest';
|
|
301
306
|
export type { ReleaseActionResponse } from './schemas/ReleaseActionResponse';
|
|
302
307
|
export type { ReleaseActivity } from './schemas/ReleaseActivity';
|
|
@@ -340,7 +345,9 @@ export type { TriggerType } from './schemas/TriggerType';
|
|
|
340
345
|
export type { TriggeredByDto } from './schemas/TriggeredByDto';
|
|
341
346
|
export type { UploadResponse } from './schemas/UploadResponse';
|
|
342
347
|
export type { User } from './schemas/User';
|
|
343
|
-
export type {
|
|
348
|
+
export type { WebhookErrorResponse } from './schemas/WebhookErrorResponse';
|
|
349
|
+
export type { WebhookEventType } from './schemas/WebhookEventType';
|
|
344
350
|
export type { WebhookSignalRequest } from './schemas/WebhookSignalRequest';
|
|
345
351
|
export type { WebhookSignalResponse } from './schemas/WebhookSignalResponse';
|
|
352
|
+
export type { WebhookSignalStatus } from './schemas/WebhookSignalStatus';
|
|
346
353
|
export type { Weekday } from './schemas/Weekday';
|
|
@@ -42,12 +42,14 @@ export { getReportDownload, useGetReportDownloadQuery } from './hooks/useGetRepo
|
|
|
42
42
|
export { getReportStatus, useGetReportStatusQuery } from './hooks/useGetReportStatusQuery';
|
|
43
43
|
export { getTaskCommentsSummary, useGetTaskCommentsSummaryQuery, } from './hooks/useGetTaskCommentsSummaryQuery';
|
|
44
44
|
export { getYamlSchema, useGetYamlSchemaQuery } from './hooks/useGetYamlSchemaQuery';
|
|
45
|
+
export { ingestWebhookSignal, useIngestWebhookSignalMutation, } from './hooks/useIngestWebhookSignalMutation';
|
|
45
46
|
export { patchReleaseGroup, usePatchReleaseGroupMutation, } from './hooks/usePatchReleaseGroupMutation';
|
|
46
47
|
export { postActivityExecutionOutput, usePostActivityExecutionOutputMutation, } from './hooks/usePostActivityExecutionOutputMutation';
|
|
47
48
|
export { postOnHoldActivityAction, usePostOnHoldActivityActionMutation, } from './hooks/usePostOnHoldActivityActionMutation';
|
|
48
49
|
export { postOrchestrationActivity, usePostOrchestrationActivityMutation, } from './hooks/usePostOrchestrationActivityMutation';
|
|
49
50
|
export { postOrchestrationProcessAttachedReleaseGroups, usePostOrchestrationProcessAttachedReleaseGroupsMutation, } from './hooks/usePostOrchestrationProcessAttachedReleaseGroupsMutation';
|
|
50
51
|
export { postOrchestrationProcessInput, usePostOrchestrationProcessInputMutation, } from './hooks/usePostOrchestrationProcessInputMutation';
|
|
52
|
+
export { postOrchestrationProcessInputValidate, usePostOrchestrationProcessInputValidateMutation, } from './hooks/usePostOrchestrationProcessInputValidateMutation';
|
|
51
53
|
export { postOrchestrationProcess, usePostOrchestrationProcessMutation, } from './hooks/usePostOrchestrationProcessMutation';
|
|
52
54
|
export { postReleaseAction, usePostReleaseActionMutation, } from './hooks/usePostReleaseActionMutation';
|
|
53
55
|
export { postReleaseAdhoc, usePostReleaseAdhocMutation } from './hooks/usePostReleaseAdhocMutation';
|
|
@@ -62,7 +64,6 @@ export { putOrchestrationProcessInput, usePutOrchestrationProcessInputMutation,
|
|
|
62
64
|
export { putOrchestrationProcess, usePutOrchestrationProcessMutation, } from './hooks/usePutOrchestrationProcessMutation';
|
|
63
65
|
export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
|
|
64
66
|
export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
|
|
65
|
-
export { receiveWebhookSignal, useReceiveWebhookSignalMutation, } from './hooks/useReceiveWebhookSignalMutation';
|
|
66
67
|
export { serveUpload, useServeUploadQuery } from './hooks/useServeUploadQuery';
|
|
67
68
|
export { startReleaseExecution, useStartReleaseExecutionMutation, } from './hooks/useStartReleaseExecutionMutation';
|
|
68
69
|
export { streamUpload, useStreamUploadMutation } from './hooks/useStreamUploadMutation';
|
package/dist/rmg-service/src/services/responses/ValidateOrchestrationProcessInputResponseResponse.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webhook configuration for orchestration activities
|
|
3
|
+
*/
|
|
4
|
+
export interface OrchestrationActivityWebhookYaml {
|
|
5
|
+
/**
|
|
6
|
+
* Filter configuration for signal matching
|
|
7
|
+
*/
|
|
8
|
+
filters?: {
|
|
9
|
+
/**
|
|
10
|
+
* List of filter expressions to evaluate against incoming signals
|
|
11
|
+
*/
|
|
12
|
+
conditions?: Array<{
|
|
13
|
+
/**
|
|
14
|
+
* Filter expression (e.g., "<+metadata.triggeredBy>==<+activityInput.triggeredBy>")
|
|
15
|
+
*/
|
|
16
|
+
expression: string;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Pipeline identifiers to listen for
|
|
21
|
+
*/
|
|
22
|
+
pipeline: {
|
|
23
|
+
/**
|
|
24
|
+
* List of fully-qualified pipeline identifiers
|
|
25
|
+
*/
|
|
26
|
+
ids: string[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Queue configuration for signal handling
|
|
30
|
+
*/
|
|
31
|
+
queue?: {
|
|
32
|
+
/**
|
|
33
|
+
* Controls automatic activity progression on signal match
|
|
34
|
+
*/
|
|
35
|
+
autostart?: {
|
|
36
|
+
/**
|
|
37
|
+
* ALWAYS auto-completes on match, ON_APPROVAL queues for user group approval
|
|
38
|
+
*/
|
|
39
|
+
condition?: 'ALWAYS' | 'ON_APPROVAL';
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* User groups that can approve queued signals
|
|
43
|
+
*/
|
|
44
|
+
userGroups?: string | string[];
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -3,6 +3,7 @@ import type { OrchestrationActivityManualYaml } from '../schemas/OrchestrationAc
|
|
|
3
3
|
import type { OutputVariable } from '../schemas/OutputVariable';
|
|
4
4
|
import type { OrchestrationActivityPipelineYaml } from '../schemas/OrchestrationActivityPipelineYaml';
|
|
5
5
|
import type { OrchestrationActivitySubprocessYaml } from '../schemas/OrchestrationActivitySubprocessYaml';
|
|
6
|
+
import type { OrchestrationActivityWebhookYaml } from '../schemas/OrchestrationActivityWebhookYaml';
|
|
6
7
|
export interface OrchestrationActivityYaml {
|
|
7
8
|
activity: {
|
|
8
9
|
/**
|
|
@@ -32,5 +33,6 @@ export interface OrchestrationActivityYaml {
|
|
|
32
33
|
};
|
|
33
34
|
pipeline?: OrchestrationActivityPipelineYaml;
|
|
34
35
|
process?: OrchestrationActivitySubprocessYaml;
|
|
36
|
+
webhook?: OrchestrationActivityWebhookYaml;
|
|
35
37
|
};
|
|
36
38
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result of an on-demand process input cross-entity validation (X4/X5)
|
|
3
|
+
*/
|
|
4
|
+
export interface ProcessInputValidationResponse {
|
|
5
|
+
/**
|
|
6
|
+
* Blocking validation errors (e.g. required activity inputs not covered by with values)
|
|
7
|
+
*/
|
|
8
|
+
errors: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Non-blocking validation warnings (e.g. with keys not present in activity inputs definitions)
|
|
11
|
+
*/
|
|
12
|
+
warnings: string[];
|
|
13
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Type of the step (e.g., Approval, JiraUpdate, JiraCreate, JiraApproval).
|
|
3
3
|
*/
|
|
4
|
-
export type StepInfoType = 'HarnessApproval' | 'JiraApproval' | 'JiraCreate' | 'JiraUpdate';
|
|
4
|
+
export type StepInfoType = 'CustomApproval' | 'HarnessApproval' | 'JiraApproval' | 'JiraCreate' | 'JiraUpdate' | 'ServiceNowApproval';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface WebhookErrorResponse {
|
|
2
|
+
/**
|
|
3
|
+
* Machine-readable error code.
|
|
4
|
+
* @example "INVALID_EVENT_TYPE"
|
|
5
|
+
*/
|
|
6
|
+
code: string;
|
|
7
|
+
/**
|
|
8
|
+
* Human-readable error description.
|
|
9
|
+
* @example "eventType 'UNKNOWN' is not a registered event type"
|
|
10
|
+
*/
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WebhookEventType } from '../schemas/WebhookEventType';
|
|
2
2
|
export interface WebhookSignalRequest {
|
|
3
|
+
eventType: WebhookEventType;
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
* Event-specific payload (validated per event type). Maximum size 1 MiB.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Optional arbitrary metadata payload from the webhook source.
|
|
9
|
-
*/
|
|
10
|
-
metadata?: {
|
|
7
|
+
payload: {
|
|
11
8
|
[key: string]: any;
|
|
12
9
|
};
|
|
13
|
-
pipeline?: WebhookPipeline;
|
|
14
10
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { WebhookSignalStatus } from '../schemas/WebhookSignalStatus';
|
|
1
2
|
export interface WebhookSignalResponse {
|
|
3
|
+
status: WebhookSignalStatus;
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @example "accepted"
|
|
5
|
+
* Unique identifier assigned to the ingested webhook signal.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
+
webhookId: string;
|
|
7
8
|
}
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { WebhookSignalResponse } from '../schemas/WebhookSignalResponse';
|
|
3
|
-
import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
|
|
4
|
-
import type { WebhookSignalRequest } from '../schemas/WebhookSignalRequest';
|
|
5
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
-
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
-
export interface ReceiveWebhookSignalMutationHeaderParams {
|
|
8
|
-
'Harness-Account': string;
|
|
9
|
-
}
|
|
10
|
-
export type ReceiveWebhookSignalRequestBody = WebhookSignalRequest;
|
|
11
|
-
export type ReceiveWebhookSignalOkResponse = ResponseWithPagination<WebhookSignalResponse>;
|
|
12
|
-
export type ReceiveWebhookSignalErrorResponse = ErrorResponseResponse;
|
|
13
|
-
export interface ReceiveWebhookSignalProps extends Omit<FetcherOptions<unknown, ReceiveWebhookSignalRequestBody, ReceiveWebhookSignalMutationHeaderParams>, 'url'> {
|
|
14
|
-
body: ReceiveWebhookSignalRequestBody;
|
|
15
|
-
}
|
|
16
|
-
export declare function receiveWebhookSignal(props: ReceiveWebhookSignalProps): Promise<ReceiveWebhookSignalOkResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Receive an inbound webhook signal from an external source (e.g. a pipeline execution completion event). Persists the signal as PENDING in the webhooks table and returns 200. Duplicate submissions with the same idempotencyKey are silently accepted (idempotent). Requires the RMG_ENABLE_WEBHOOK_QUEUE_SUPPORT feature flag to be enabled.
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
export declare function useReceiveWebhookSignalMutation(options?: Omit<UseMutationOptions<ReceiveWebhookSignalOkResponse, ReceiveWebhookSignalErrorResponse, ReceiveWebhookSignalProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ReceiveWebhookSignalOkResponse, import("..").Error, ReceiveWebhookSignalProps, unknown>;
|
|
@@ -1,15 +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 receiveWebhookSignal(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/v1/webhook/signal`, method: 'POST' }, props));
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Receive an inbound webhook signal from an external source (e.g. a pipeline execution completion event). Persists the signal as PENDING in the webhooks table and returns 200. Duplicate submissions with the same idempotencyKey are silently accepted (idempotent). Requires the RMG_ENABLE_WEBHOOK_QUEUE_SUPPORT feature flag to be enabled.
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
export function useReceiveWebhookSignalMutation(options) {
|
|
14
|
-
return useMutation((mutateProps) => receiveWebhookSignal(mutateProps), options);
|
|
15
|
-
}
|
|
File without changes
|