@harnessio/react-rmg-service-client 0.38.0 → 0.40.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/fetcher/index.js +1 -1
- package/dist/rmg-service/src/services/hooks/useGetEventsByEntityTypeAndIdQuery.d.ts +32 -0
- package/dist/rmg-service/src/services/hooks/useGetEventsByEntityTypeAndIdQuery.js +14 -0
- package/dist/rmg-service/src/services/hooks/useGetOrchestrationExecutionActivitiesPaginatedQuery.d.ts +15 -2
- package/dist/rmg-service/src/services/hooks/useGetOrchestrationExecutionActivitiesPaginatedQuery.js +7 -2
- package/dist/rmg-service/src/services/index.d.ts +9 -0
- package/dist/rmg-service/src/services/index.js +1 -0
- package/dist/rmg-service/src/services/responses/EventsResponseResponse.d.ts +13 -0
- package/dist/rmg-service/src/services/responses/EventsResponseResponse.js +1 -0
- package/dist/rmg-service/src/services/schemas/CreatedByDto.d.ts +17 -0
- package/dist/rmg-service/src/services/schemas/CreatedByDto.js +4 -0
- package/dist/rmg-service/src/services/schemas/EventDto.d.ts +34 -0
- package/dist/rmg-service/src/services/schemas/EventDto.js +1 -0
- package/dist/rmg-service/src/services/schemas/EventEntity.d.ts +4 -0
- package/dist/rmg-service/src/services/schemas/EventEntity.js +4 -0
- package/dist/rmg-service/src/services/schemas/EventMetadata.d.ts +13 -0
- package/dist/rmg-service/src/services/schemas/EventMetadata.js +4 -0
- package/dist/rmg-service/src/services/schemas/EventType.d.ts +4 -0
- package/dist/rmg-service/src/services/schemas/EventType.js +4 -0
- package/dist/rmg-service/src/services/schemas/OnHoldActivityActionRequest.d.ts +5 -0
- package/dist/rmg-service/src/services/schemas/OrchestrationStatus.d.ts +4 -0
- package/dist/rmg-service/src/services/schemas/OrchestrationStatus.js +4 -0
- package/package.json +1 -1
package/dist/fetcher/index.js
CHANGED
|
@@ -30,7 +30,7 @@ export function fetcher(options) {
|
|
|
30
30
|
if (fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.urlInterceptor) {
|
|
31
31
|
finalUrl = (_a = fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.urlInterceptor) === null || _a === void 0 ? void 0 : _a.call(fetcherCallbacks, finalUrl);
|
|
32
32
|
}
|
|
33
|
-
let request = new Request(finalUrl, Object.assign({ headers: Object.assign(Object.assign({ Authorization: `Bearer ${token}` }, headers), customHeaders), body: body ? JSON.stringify(body) : undefined }, rest));
|
|
33
|
+
let request = new Request(finalUrl, Object.assign({ headers: Object.assign(Object.assign(Object.assign({}, (token ? { Authorization: `Bearer ${token}` } : {})), headers), customHeaders), body: body ? JSON.stringify(body) : undefined }, rest));
|
|
34
34
|
if (fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.requestInterceptor) {
|
|
35
35
|
request = fetcherCallbacks.requestInterceptor(request.clone());
|
|
36
36
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { EventsResponseResponse } from '../responses/EventsResponseResponse';
|
|
3
|
+
import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface GetEventsByEntityTypeAndIdQueryPathParams {
|
|
7
|
+
entityType: 'Task';
|
|
8
|
+
entityId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface GetEventsByEntityTypeAndIdQueryQueryParams {
|
|
11
|
+
eventType?: string;
|
|
12
|
+
orgIdentifier?: string;
|
|
13
|
+
projectIdentifier?: string;
|
|
14
|
+
cursor?: string;
|
|
15
|
+
/**
|
|
16
|
+
* @default 500
|
|
17
|
+
*/
|
|
18
|
+
limit?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface GetEventsByEntityTypeAndIdQueryHeaderParams {
|
|
21
|
+
'Harness-Account': string;
|
|
22
|
+
}
|
|
23
|
+
export type GetEventsByEntityTypeAndIdOkResponse = ResponseWithPagination<EventsResponseResponse>;
|
|
24
|
+
export type GetEventsByEntityTypeAndIdErrorResponse = ErrorResponseResponse;
|
|
25
|
+
export interface GetEventsByEntityTypeAndIdProps extends GetEventsByEntityTypeAndIdQueryPathParams, Omit<FetcherOptions<GetEventsByEntityTypeAndIdQueryQueryParams, unknown, GetEventsByEntityTypeAndIdQueryHeaderParams>, 'url'> {
|
|
26
|
+
queryParams: GetEventsByEntityTypeAndIdQueryQueryParams;
|
|
27
|
+
}
|
|
28
|
+
export declare function getEventsByEntityTypeAndId(props: GetEventsByEntityTypeAndIdProps): Promise<GetEventsByEntityTypeAndIdOkResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Retrieve a cursor-based paginated list of events for a specific entity type and entity ID, sorted by created_at in descending order
|
|
31
|
+
*/
|
|
32
|
+
export declare function useGetEventsByEntityTypeAndIdQuery(props: GetEventsByEntityTypeAndIdProps, options?: Omit<UseQueryOptions<GetEventsByEntityTypeAndIdOkResponse, GetEventsByEntityTypeAndIdErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetEventsByEntityTypeAndIdOkResponse, import("..").Error>;
|
|
@@ -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 getEventsByEntityTypeAndId(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/orchestration/${props.entityType}/events/${props.entityId}`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve a cursor-based paginated list of events for a specific entity type and entity ID, sorted by created_at in descending order
|
|
11
|
+
*/
|
|
12
|
+
export function useGetEventsByEntityTypeAndIdQuery(props, options) {
|
|
13
|
+
return useQuery(['getEventsByEntityTypeAndId', props.entityType, props.entityId, props.queryParams], ({ signal }) => getEventsByEntityTypeAndId(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -12,9 +12,17 @@ export interface GetOrchestrationExecutionActivitiesPaginatedQueryQueryParams {
|
|
|
12
12
|
page?: number;
|
|
13
13
|
size?: number;
|
|
14
14
|
sort?: string[];
|
|
15
|
-
status?:
|
|
15
|
+
status?: Array<'ABORTED' | 'FAILED' | 'IGNORED' | 'ON_HOLD' | 'OUTPUT_WAITING' | 'RETRIED' | 'RUNNING' | 'SCHEDULED' | 'SKIPPED' | 'SUCCEEDED'>;
|
|
16
16
|
type?: Array<'MANUAL' | 'PIPELINE' | 'SUBPROCESS'>;
|
|
17
17
|
phaseIdentifier?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @format int64
|
|
20
|
+
*/
|
|
21
|
+
startTs?: number;
|
|
22
|
+
/**
|
|
23
|
+
* @format int64
|
|
24
|
+
*/
|
|
25
|
+
endTs?: number;
|
|
18
26
|
}
|
|
19
27
|
export interface GetOrchestrationExecutionActivitiesPaginatedQueryHeaderParams {
|
|
20
28
|
'Harness-Account': string;
|
|
@@ -26,6 +34,11 @@ export interface GetOrchestrationExecutionActivitiesPaginatedProps extends GetOr
|
|
|
26
34
|
}
|
|
27
35
|
export declare function getOrchestrationExecutionActivitiesPaginated(props: GetOrchestrationExecutionActivitiesPaginatedProps): Promise<GetOrchestrationExecutionActivitiesPaginatedOkResponse>;
|
|
28
36
|
/**
|
|
29
|
-
* Retrieve a paginated list of orchestration execution activities for a specific release with optional filters
|
|
37
|
+
* Retrieve a paginated list of orchestration execution activities for a specific release with optional filters.
|
|
38
|
+
*
|
|
39
|
+
* **Sortable fields:** `start_ts`, `startTs`, `end_ts`, `endTs`, `last_updated_at`, `lastUpdatedAt`, `created_at`, `createdAt`, `name`, `identifier`, `status`, `type`.
|
|
40
|
+
* Sort format: `sort=field_name&sort=direction` where direction is `asc` or `desc`.
|
|
41
|
+
* Examples: `sort=start_ts&sort=desc` or `sort=endTs&sort=asc`.
|
|
42
|
+
*
|
|
30
43
|
*/
|
|
31
44
|
export declare function useGetOrchestrationExecutionActivitiesPaginatedQuery(props: GetOrchestrationExecutionActivitiesPaginatedProps, options?: Omit<UseQueryOptions<GetOrchestrationExecutionActivitiesPaginatedOkResponse, GetOrchestrationExecutionActivitiesPaginatedErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetOrchestrationExecutionActivitiesPaginatedOkResponse, import("..").Error>;
|
package/dist/rmg-service/src/services/hooks/useGetOrchestrationExecutionActivitiesPaginatedQuery.js
CHANGED
|
@@ -4,10 +4,15 @@
|
|
|
4
4
|
import { useQuery } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function getOrchestrationExecutionActivitiesPaginated(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/
|
|
7
|
+
return fetcher(Object.assign({ url: `/release/${props.releaseId}/execution/activities`, method: 'GET' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Retrieve a paginated list of orchestration execution activities for a specific release with optional filters
|
|
10
|
+
* Retrieve a paginated list of orchestration execution activities for a specific release with optional filters.
|
|
11
|
+
*
|
|
12
|
+
* **Sortable fields:** `start_ts`, `startTs`, `end_ts`, `endTs`, `last_updated_at`, `lastUpdatedAt`, `created_at`, `createdAt`, `name`, `identifier`, `status`, `type`.
|
|
13
|
+
* Sort format: `sort=field_name&sort=direction` where direction is `asc` or `desc`.
|
|
14
|
+
* Examples: `sort=start_ts&sort=desc` or `sort=endTs&sort=asc`.
|
|
15
|
+
*
|
|
11
16
|
*/
|
|
12
17
|
export function useGetOrchestrationExecutionActivitiesPaginatedQuery(props, options) {
|
|
13
18
|
return useQuery(['get-orchestration-execution-activities-paginated', props.releaseId, props.queryParams], ({ signal }) => getOrchestrationExecutionActivitiesPaginated(Object.assign(Object.assign({}, props), { signal })), options);
|
|
@@ -13,6 +13,8 @@ export type { DeleteTaskCommentErrorResponse, DeleteTaskCommentMutationPathParam
|
|
|
13
13
|
export { deleteTaskComment, useDeleteTaskCommentMutation, } from './hooks/useDeleteTaskCommentMutation';
|
|
14
14
|
export type { GetActivityRetryHistoryByIdentifiersErrorResponse, GetActivityRetryHistoryByIdentifiersOkResponse, GetActivityRetryHistoryByIdentifiersProps, GetActivityRetryHistoryByIdentifiersQueryPathParams, GetActivityRetryHistoryByIdentifiersQueryQueryParams, } from './hooks/useGetActivityRetryHistoryByIdentifiersQuery';
|
|
15
15
|
export { getActivityRetryHistoryByIdentifiers, useGetActivityRetryHistoryByIdentifiersQuery, } from './hooks/useGetActivityRetryHistoryByIdentifiersQuery';
|
|
16
|
+
export type { GetEventsByEntityTypeAndIdErrorResponse, GetEventsByEntityTypeAndIdOkResponse, GetEventsByEntityTypeAndIdProps, GetEventsByEntityTypeAndIdQueryPathParams, GetEventsByEntityTypeAndIdQueryQueryParams, } from './hooks/useGetEventsByEntityTypeAndIdQuery';
|
|
17
|
+
export { getEventsByEntityTypeAndId, useGetEventsByEntityTypeAndIdQuery, } from './hooks/useGetEventsByEntityTypeAndIdQuery';
|
|
16
18
|
export type { GetFreezeDetailsErrorResponse, GetFreezeDetailsOkResponse, GetFreezeDetailsProps, GetFreezeDetailsQueryPathParams, GetFreezeDetailsQueryQueryParams, } from './hooks/useGetFreezeDetailsQuery';
|
|
17
19
|
export { getFreezeDetails, useGetFreezeDetailsQuery } from './hooks/useGetFreezeDetailsQuery';
|
|
18
20
|
export type { GetFreezeListErrorResponse, GetFreezeListOkResponse, GetFreezeListProps, GetFreezeListQueryQueryParams, } from './hooks/useGetFreezeListQuery';
|
|
@@ -138,6 +140,7 @@ export type { DeleteReleaseGroupResponseResponse } from './responses/DeleteRelea
|
|
|
138
140
|
export type { EnvironmentDashboardResponseResponse } from './responses/EnvironmentDashboardResponseResponse';
|
|
139
141
|
export type { EnvironmentListPerReleaseResponseResponse } from './responses/EnvironmentListPerReleaseResponseResponse';
|
|
140
142
|
export type { ErrorResponseResponse } from './responses/ErrorResponseResponse';
|
|
143
|
+
export type { EventsResponseResponse } from './responses/EventsResponseResponse';
|
|
141
144
|
export type { ExecutionOutputsResponseResponse } from './responses/ExecutionOutputsResponseResponse';
|
|
142
145
|
export type { ExecutionTasksListResponseResponse } from './responses/ExecutionTasksListResponseResponse';
|
|
143
146
|
export type { FreezeDetailsResponseResponse } from './responses/FreezeDetailsResponseResponse';
|
|
@@ -188,10 +191,15 @@ export type { CommentedByDto } from './schemas/CommentedByDto';
|
|
|
188
191
|
export type { ConflictStatus } from './schemas/ConflictStatus';
|
|
189
192
|
export type { CreateOrchestrationActivityInputSetRequestType } from './schemas/CreateOrchestrationActivityInputSetRequestType';
|
|
190
193
|
export type { CreateOrchestrationActivityRequestType } from './schemas/CreateOrchestrationActivityRequestType';
|
|
194
|
+
export type { CreatedByDto } from './schemas/CreatedByDto';
|
|
191
195
|
export type { EnvironmentDashboardDto } from './schemas/EnvironmentDashboardDto';
|
|
192
196
|
export type { EnvironmentDto } from './schemas/EnvironmentDto';
|
|
193
197
|
export type { EnvironmentType } from './schemas/EnvironmentType';
|
|
194
198
|
export type { Error } from './schemas/Error';
|
|
199
|
+
export type { EventDto } from './schemas/EventDto';
|
|
200
|
+
export type { EventEntity } from './schemas/EventEntity';
|
|
201
|
+
export type { EventMetadata } from './schemas/EventMetadata';
|
|
202
|
+
export type { EventType } from './schemas/EventType';
|
|
195
203
|
export type { ExecutionConflict } from './schemas/ExecutionConflict';
|
|
196
204
|
export type { ExecutionOutputDto } from './schemas/ExecutionOutputDto';
|
|
197
205
|
export type { ExecutionTaskDto } from './schemas/ExecutionTaskDto';
|
|
@@ -226,6 +234,7 @@ export type { OrchestrationPhaseYaml } from './schemas/OrchestrationPhaseYaml';
|
|
|
226
234
|
export type { OrchestrationProcessDto } from './schemas/OrchestrationProcessDto';
|
|
227
235
|
export type { OrchestrationProcessInputYaml } from './schemas/OrchestrationProcessInputYaml';
|
|
228
236
|
export type { OrchestrationReleaseProcessYaml } from './schemas/OrchestrationReleaseProcessYaml';
|
|
237
|
+
export type { OrchestrationStatus } from './schemas/OrchestrationStatus';
|
|
229
238
|
export type { Pageable } from './schemas/Pageable';
|
|
230
239
|
export type { PageableSort } from './schemas/PageableSort';
|
|
231
240
|
export type { PhaseInputYaml } from './schemas/PhaseInputYaml';
|
|
@@ -5,6 +5,7 @@ export { deleteOrchestrationProcess, useDeleteOrchestrationProcessMutation, } fr
|
|
|
5
5
|
export { deleteReleaseGroup, useDeleteReleaseGroupMutation, } from './hooks/useDeleteReleaseGroupMutation';
|
|
6
6
|
export { deleteTaskComment, useDeleteTaskCommentMutation, } from './hooks/useDeleteTaskCommentMutation';
|
|
7
7
|
export { getActivityRetryHistoryByIdentifiers, useGetActivityRetryHistoryByIdentifiersQuery, } from './hooks/useGetActivityRetryHistoryByIdentifiersQuery';
|
|
8
|
+
export { getEventsByEntityTypeAndId, useGetEventsByEntityTypeAndIdQuery, } from './hooks/useGetEventsByEntityTypeAndIdQuery';
|
|
8
9
|
export { getFreezeDetails, useGetFreezeDetailsQuery } from './hooks/useGetFreezeDetailsQuery';
|
|
9
10
|
export { getFreezeList, useGetFreezeListQuery } from './hooks/useGetFreezeListQuery';
|
|
10
11
|
export { getOrchestrationActivitiesByAcitivityRefs, useGetOrchestrationActivitiesByAcitivityRefsMutation, } from './hooks/useGetOrchestrationActivitiesByAcitivityRefsMutation';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EventDto } from '../schemas/EventDto';
|
|
2
|
+
import type { NextRequest } from '../schemas/NextRequest';
|
|
3
|
+
export interface EventsResponseResponse {
|
|
4
|
+
/**
|
|
5
|
+
* List of events
|
|
6
|
+
*/
|
|
7
|
+
events: EventDto[];
|
|
8
|
+
/**
|
|
9
|
+
* Whether this is the last page of results
|
|
10
|
+
*/
|
|
11
|
+
last: boolean;
|
|
12
|
+
nextRequest: NextRequest;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Details of the user who created the event
|
|
3
|
+
*/
|
|
4
|
+
export interface CreatedByDto {
|
|
5
|
+
/**
|
|
6
|
+
* Email of the user who created the event
|
|
7
|
+
*/
|
|
8
|
+
email: string;
|
|
9
|
+
/**
|
|
10
|
+
* Identifier of the user who created the event
|
|
11
|
+
*/
|
|
12
|
+
identifier?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Name of the user who created the event
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CreatedByDto } from '../schemas/CreatedByDto';
|
|
2
|
+
import type { EventEntity } from '../schemas/EventEntity';
|
|
3
|
+
import type { EventMetadata } from '../schemas/EventMetadata';
|
|
4
|
+
import type { EventType } from '../schemas/EventType';
|
|
5
|
+
/**
|
|
6
|
+
* Represents an event for an entity
|
|
7
|
+
*/
|
|
8
|
+
export interface EventDto {
|
|
9
|
+
/**
|
|
10
|
+
* Unix timestamp when the event was created
|
|
11
|
+
* @format int64
|
|
12
|
+
*/
|
|
13
|
+
createdAt: number;
|
|
14
|
+
/**
|
|
15
|
+
* Information about the user who created the event
|
|
16
|
+
*/
|
|
17
|
+
createdBy: CreatedByDto;
|
|
18
|
+
/**
|
|
19
|
+
* The ID of the entity
|
|
20
|
+
*/
|
|
21
|
+
entityId: string;
|
|
22
|
+
/**
|
|
23
|
+
* The type of entity
|
|
24
|
+
*/
|
|
25
|
+
entityType: EventEntity;
|
|
26
|
+
/**
|
|
27
|
+
* Event metadata containing from and to fields
|
|
28
|
+
*/
|
|
29
|
+
eventMetadata: EventMetadata;
|
|
30
|
+
/**
|
|
31
|
+
* The type of event
|
|
32
|
+
*/
|
|
33
|
+
type: EventType;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import type { ActivityExecutionInputDto } from '../schemas/ActivityExecutionInputDto';
|
|
1
2
|
import type { SubprocessInfo } from '../schemas/SubprocessInfo';
|
|
2
3
|
export interface OnHoldActivityActionRequest {
|
|
3
4
|
/**
|
|
4
5
|
* The action to perform on the on-hold activity. Must be 'retry' if retryWith is present.
|
|
5
6
|
*/
|
|
6
7
|
action: 'ignore' | 'retry';
|
|
8
|
+
/**
|
|
9
|
+
* Optional list of input values for retrying the on-hold activity. Only valid when action is 'retry'.
|
|
10
|
+
*/
|
|
11
|
+
inputs?: ActivityExecutionInputDto[];
|
|
7
12
|
/**
|
|
8
13
|
* Specifies the retry mechanism. If present, action must be 'retry'. Currently only SUBPROCESS is supported.
|
|
9
14
|
*/
|