@harnessio/react-rmg-service-client 0.37.0 → 0.39.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/index.d.ts +10 -1
- 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/ReleaseDetailsResponseResponse.d.ts +5 -0
- package/dist/rmg-service/src/services/schemas/{ActivitiesCounts.d.ts → ActivityCounts.d.ts} +1 -1
- package/dist/rmg-service/src/services/schemas/ActivityCounts.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/OrchestrationExecutionPhase.d.ts +2 -2
- package/dist/rmg-service/src/services/schemas/ReleaseParentDto.d.ts +26 -0
- package/dist/rmg-service/src/services/schemas/ReleaseParentDto.js +4 -0
- package/package.json +1 -1
- /package/dist/rmg-service/src/services/{schemas/ActivitiesCounts.js → responses/EventsResponseResponse.js} +0 -0
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
|
+
type?: 'Status';
|
|
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
|
+
}
|
|
@@ -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';
|
|
@@ -172,7 +175,7 @@ export type { UpdateReleaseConflictResponseResponse } from './responses/UpdateRe
|
|
|
172
175
|
export type { UpdateReleaseGroupResponseResponse } from './responses/UpdateReleaseGroupResponseResponse';
|
|
173
176
|
export type { UpdateReleaseResponseResponse } from './responses/UpdateReleaseResponseResponse';
|
|
174
177
|
export type { UpdateTaskCommentResponseResponse } from './responses/UpdateTaskCommentResponseResponse';
|
|
175
|
-
export type {
|
|
178
|
+
export type { ActivityCounts } from './schemas/ActivityCounts';
|
|
176
179
|
export type { ActivityExecutionInputDto } from './schemas/ActivityExecutionInputDto';
|
|
177
180
|
export type { ActivityInputYaml } from './schemas/ActivityInputYaml';
|
|
178
181
|
export type { ActivityInputsResponse } from './schemas/ActivityInputsResponse';
|
|
@@ -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';
|
|
@@ -245,6 +253,7 @@ export type { ReleaseFrequency } from './schemas/ReleaseFrequency';
|
|
|
245
253
|
export type { ReleaseGroupDto } from './schemas/ReleaseGroupDto';
|
|
246
254
|
export type { ReleaseGroupYaml } from './schemas/ReleaseGroupYaml';
|
|
247
255
|
export type { ReleaseInputYaml } from './schemas/ReleaseInputYaml';
|
|
256
|
+
export type { ReleaseParentDto } from './schemas/ReleaseParentDto';
|
|
248
257
|
export type { ReleaseType } from './schemas/ReleaseType';
|
|
249
258
|
export type { RepeatUnit } from './schemas/RepeatUnit';
|
|
250
259
|
export type { ServiceInfoDto } from './schemas/ServiceInfoDto';
|
|
@@ -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
|
+
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import type { ReleaseParentDto } from '../schemas/ReleaseParentDto';
|
|
1
2
|
import type { ReleaseDto } from '../schemas/ReleaseDto';
|
|
2
3
|
export interface ReleaseDetailsResponseResponse {
|
|
4
|
+
/**
|
|
5
|
+
* Ancestor releases for this release, starting from the immediate parent up to 3 levels.
|
|
6
|
+
*/
|
|
7
|
+
parentReleases?: ReleaseParentDto[];
|
|
3
8
|
releaseInfo: ReleaseDto;
|
|
4
9
|
yaml: string;
|
|
5
10
|
}
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ActivityCounts } from '../schemas/ActivityCounts';
|
|
2
2
|
import type { FailureInfo } from '../schemas/FailureInfo';
|
|
3
3
|
import type { Status } from '../schemas/Status';
|
|
4
4
|
/**
|
|
@@ -8,7 +8,7 @@ export interface OrchestrationExecutionPhase {
|
|
|
8
8
|
/**
|
|
9
9
|
* Activity counts for this phase grouped by type and status
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
activityCounts: ActivityCounts;
|
|
12
12
|
/**
|
|
13
13
|
* Number of completed activities in the phase
|
|
14
14
|
*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ReleaseParentDto {
|
|
2
|
+
/**
|
|
3
|
+
* Identifier of the subprocess activity that created this ancestor release (empty for roots)
|
|
4
|
+
*/
|
|
5
|
+
activityIdentifier?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Name of the subprocess activity that created this ancestor release (empty for roots)
|
|
8
|
+
*/
|
|
9
|
+
activityName?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Release id of the ancestor
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Release identifier of the ancestor
|
|
16
|
+
*/
|
|
17
|
+
identifier?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Identifier of the orchestration process attached to this ancestor release
|
|
20
|
+
*/
|
|
21
|
+
processIdentifier?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Name of the orchestration process attached to this ancestor release
|
|
24
|
+
*/
|
|
25
|
+
processName?: string;
|
|
26
|
+
}
|
package/package.json
CHANGED
|
File without changes
|