@harnessio/react-rmg-service-client 0.30.0 → 0.31.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.
@@ -0,0 +1,34 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ActivityRetryHistoryResponse } from '../schemas/ActivityRetryHistoryResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetActivityRetryHistoryByIdentifiersQueryPathParams {
7
+ releaseId: string;
8
+ phaseIdentifier: string;
9
+ activityIdentifier: string;
10
+ }
11
+ export interface GetActivityRetryHistoryByIdentifiersQueryQueryParams {
12
+ activityExecutionId?: string;
13
+ cursor?: string;
14
+ /**
15
+ * @default 500
16
+ */
17
+ limit?: number;
18
+ maxRetryIndex?: number;
19
+ orgIdentifier?: string;
20
+ projectIdentifier?: string;
21
+ }
22
+ export interface GetActivityRetryHistoryByIdentifiersQueryHeaderParams {
23
+ 'Harness-Account': string;
24
+ }
25
+ export type GetActivityRetryHistoryByIdentifiersOkResponse = ResponseWithPagination<ActivityRetryHistoryResponse>;
26
+ export type GetActivityRetryHistoryByIdentifiersErrorResponse = ErrorResponseResponse;
27
+ export interface GetActivityRetryHistoryByIdentifiersProps extends GetActivityRetryHistoryByIdentifiersQueryPathParams, Omit<FetcherOptions<GetActivityRetryHistoryByIdentifiersQueryQueryParams, unknown, GetActivityRetryHistoryByIdentifiersQueryHeaderParams>, 'url'> {
28
+ queryParams: GetActivityRetryHistoryByIdentifiersQueryQueryParams;
29
+ }
30
+ export declare function getActivityRetryHistoryByIdentifiers(props: GetActivityRetryHistoryByIdentifiersProps): Promise<GetActivityRetryHistoryByIdentifiersOkResponse>;
31
+ /**
32
+ * Retrieve the retry history for a specific activity by release ID, phase identifier, and activity identifier
33
+ */
34
+ export declare function useGetActivityRetryHistoryByIdentifiersQuery(props: GetActivityRetryHistoryByIdentifiersProps, options?: Omit<UseQueryOptions<GetActivityRetryHistoryByIdentifiersOkResponse, GetActivityRetryHistoryByIdentifiersErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetActivityRetryHistoryByIdentifiersOkResponse, import("..").Error>;
@@ -0,0 +1,20 @@
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 getActivityRetryHistoryByIdentifiers(props) {
7
+ return fetcher(Object.assign({ url: `/orchestration/execution/release/${props.releaseId}/phase/${props.phaseIdentifier}/activity/${props.activityIdentifier}/retry-history`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Retrieve the retry history for a specific activity by release ID, phase identifier, and activity identifier
11
+ */
12
+ export function useGetActivityRetryHistoryByIdentifiersQuery(props, options) {
13
+ return useQuery([
14
+ 'get-activity-retry-history-by-identifiers',
15
+ props.releaseId,
16
+ props.phaseIdentifier,
17
+ props.activityIdentifier,
18
+ props.queryParams,
19
+ ], ({ signal }) => getActivityRetryHistoryByIdentifiers(Object.assign(Object.assign({}, props), { signal })), options);
20
+ }
@@ -5,6 +5,8 @@ export type { DeleteReleaseGroupErrorResponse, DeleteReleaseGroupMutationPathPar
5
5
  export { deleteReleaseGroup, useDeleteReleaseGroupMutation, } from './hooks/useDeleteReleaseGroupMutation';
6
6
  export type { DeleteTaskCommentErrorResponse, DeleteTaskCommentMutationPathParams, DeleteTaskCommentMutationQueryParams, DeleteTaskCommentOkResponse, DeleteTaskCommentProps, } from './hooks/useDeleteTaskCommentMutation';
7
7
  export { deleteTaskComment, useDeleteTaskCommentMutation, } from './hooks/useDeleteTaskCommentMutation';
8
+ export type { GetActivityRetryHistoryByIdentifiersErrorResponse, GetActivityRetryHistoryByIdentifiersOkResponse, GetActivityRetryHistoryByIdentifiersProps, GetActivityRetryHistoryByIdentifiersQueryPathParams, GetActivityRetryHistoryByIdentifiersQueryQueryParams, } from './hooks/useGetActivityRetryHistoryByIdentifiersQuery';
9
+ export { getActivityRetryHistoryByIdentifiers, useGetActivityRetryHistoryByIdentifiersQuery, } from './hooks/useGetActivityRetryHistoryByIdentifiersQuery';
8
10
  export type { GetFreezeDetailsErrorResponse, GetFreezeDetailsOkResponse, GetFreezeDetailsProps, GetFreezeDetailsQueryPathParams, GetFreezeDetailsQueryQueryParams, } from './hooks/useGetFreezeDetailsQuery';
9
11
  export { getFreezeDetails, useGetFreezeDetailsQuery } from './hooks/useGetFreezeDetailsQuery';
10
12
  export type { GetFreezeListErrorResponse, GetFreezeListOkResponse, GetFreezeListProps, GetFreezeListQueryQueryParams, } from './hooks/useGetFreezeListQuery';
@@ -152,6 +154,8 @@ export type { UpdateTaskCommentResponseResponse } from './responses/UpdateTaskCo
152
154
  export type { ActivityExecutionInputDto } from './schemas/ActivityExecutionInputDto';
153
155
  export type { ActivityInputYaml } from './schemas/ActivityInputYaml';
154
156
  export type { ActivityInputsResponse } from './schemas/ActivityInputsResponse';
157
+ export type { ActivityRetryHistoryResponse } from './schemas/ActivityRetryHistoryResponse';
158
+ export type { ActivityRetryInfo } from './schemas/ActivityRetryInfo';
155
159
  export type { ActivityType } from './schemas/ActivityType';
156
160
  export type { ApprovalInfoDto } from './schemas/ApprovalInfoDto';
157
161
  export type { ApprovedByDto } from './schemas/ApprovedByDto';
@@ -168,6 +172,7 @@ export type { ExecutionConflict } from './schemas/ExecutionConflict';
168
172
  export type { ExecutionOutputDto } from './schemas/ExecutionOutputDto';
169
173
  export type { ExecutionTaskDto } from './schemas/ExecutionTaskDto';
170
174
  export type { ExecutionTaskStatus } from './schemas/ExecutionTaskStatus';
175
+ export type { FailureInfo } from './schemas/FailureInfo';
171
176
  export type { FreezeDetailsDto } from './schemas/FreezeDetailsDto';
172
177
  export type { FreezeEntitiesDto } from './schemas/FreezeEntitiesDto';
173
178
  export type { FreezeListItemDto } from './schemas/FreezeListItemDto';
@@ -1,6 +1,7 @@
1
1
  export { createTaskComment, useCreateTaskCommentMutation, } from './hooks/useCreateTaskCommentMutation';
2
2
  export { deleteReleaseGroup, useDeleteReleaseGroupMutation, } from './hooks/useDeleteReleaseGroupMutation';
3
3
  export { deleteTaskComment, useDeleteTaskCommentMutation, } from './hooks/useDeleteTaskCommentMutation';
4
+ export { getActivityRetryHistoryByIdentifiers, useGetActivityRetryHistoryByIdentifiersQuery, } from './hooks/useGetActivityRetryHistoryByIdentifiersQuery';
4
5
  export { getFreezeDetails, useGetFreezeDetailsQuery } from './hooks/useGetFreezeDetailsQuery';
5
6
  export { getFreezeList, useGetFreezeListQuery } from './hooks/useGetFreezeListQuery';
6
7
  export { getOrchestrationActivitiesByAcitivityRefs, useGetOrchestrationActivitiesByAcitivityRefsMutation, } from './hooks/useGetOrchestrationActivitiesByAcitivityRefsMutation';
@@ -0,0 +1,19 @@
1
+ import type { NextRequest } from '../schemas/NextRequest';
2
+ import type { ActivityRetryInfo } from '../schemas/ActivityRetryInfo';
3
+ /**
4
+ * Response containing the retry history for an activity execution
5
+ */
6
+ export interface ActivityRetryHistoryResponse {
7
+ /**
8
+ * Whether this is the last page of results
9
+ */
10
+ last: boolean;
11
+ /**
12
+ * Information for the next page request
13
+ */
14
+ nextRequest: NextRequest;
15
+ /**
16
+ * List of retry attempts for the activity
17
+ */
18
+ retries: ActivityRetryInfo[];
19
+ }
@@ -0,0 +1,55 @@
1
+ import type { FailureInfo } from '../schemas/FailureInfo';
2
+ import type { Status } from '../schemas/Status';
3
+ /**
4
+ * Information about a single retry attempt
5
+ */
6
+ export interface ActivityRetryInfo {
7
+ /**
8
+ * The ID of the activity execution
9
+ */
10
+ activityExecutionId: string;
11
+ /**
12
+ * The name of the activity
13
+ */
14
+ activityName: string;
15
+ /**
16
+ * Whether this activity can be retried (true if status is not RETRIED, false otherwise)
17
+ */
18
+ canRetry?: boolean;
19
+ /**
20
+ * Creation timestamp in milliseconds
21
+ * @format int64
22
+ */
23
+ createdAt: number;
24
+ /**
25
+ * End timestamp in milliseconds
26
+ * @format int64
27
+ */
28
+ endTs?: number;
29
+ /**
30
+ * Information about a failure that occurred during the retry
31
+ */
32
+ failureInfo?: FailureInfo;
33
+ /**
34
+ * The identifier of the activity
35
+ */
36
+ identifier: string;
37
+ /**
38
+ * The ID of the phase this activity belongs to
39
+ */
40
+ phaseId?: string;
41
+ /**
42
+ * The retry index (0 for original, 1+ for retries)
43
+ * @format int32
44
+ */
45
+ retryIndex: number;
46
+ /**
47
+ * Start timestamp in milliseconds
48
+ * @format int64
49
+ */
50
+ startTs?: number;
51
+ /**
52
+ * The status of this retry attempt
53
+ */
54
+ status: Status;
55
+ }
@@ -1,3 +1,4 @@
1
+ import type { FailureInfo } from '../schemas/FailureInfo';
1
2
  import type { StringOrBool } from '../schemas/StringOrBool';
2
3
  import type { ExecutionTaskStatus } from '../schemas/ExecutionTaskStatus';
3
4
  import type { StringOrStringArray } from '../schemas/StringOrStringArray';
@@ -22,6 +23,7 @@ export interface ExecutionTaskDto {
22
23
  * Expected duration for the task (e.g., "1d 12h")
23
24
  */
24
25
  expectedDuration: string;
26
+ failureInfo?: FailureInfo;
25
27
  /**
26
28
  * Unique identifier of the task
27
29
  */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Information about a failure that occurred
3
+ */
4
+ export interface FailureInfo {
5
+ /**
6
+ * The failure code indicating the type of failure
7
+ */
8
+ code?: string;
9
+ /**
10
+ * The failure message describing what went wrong
11
+ */
12
+ msg: string;
13
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -1,3 +1,4 @@
1
+ import type { FailureInfo } from '../schemas/FailureInfo';
1
2
  import type { PipelineActivityInfo } from '../schemas/PipelineActivityInfo';
2
3
  import type { Status } from '../schemas/Status';
3
4
  /**
@@ -21,6 +22,7 @@ export interface OrchestrationExecutionActivity {
21
22
  * @format int64
22
23
  */
23
24
  end_ts?: number;
25
+ failureInfo?: FailureInfo;
24
26
  /**
25
27
  * Identifier of the activity
26
28
  */
@@ -1,3 +1,4 @@
1
+ import type { FailureInfo } from '../schemas/FailureInfo';
1
2
  import type { Status } from '../schemas/Status';
2
3
  /**
3
4
  * Represents a phase in the orchestration execution
@@ -20,6 +21,7 @@ export interface OrchestrationExecutionPhase {
20
21
  * @format int64
21
22
  */
22
23
  end_ts?: number;
24
+ failureInfo?: FailureInfo;
23
25
  /**
24
26
  * Unique identifier of the phase
25
27
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-rmg-service-client",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Harness Release Management Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",