@harnessio/react-rmg-service-client 0.12.0 → 0.14.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.
Files changed (25) hide show
  1. package/dist/rmg-service/src/services/hooks/useGetReleaseConflictsQuery.d.ts +27 -0
  2. package/dist/rmg-service/src/services/hooks/useGetReleaseConflictsQuery.js +14 -0
  3. package/dist/rmg-service/src/services/hooks/usePostReleaseSummaryMutation.d.ts +1 -0
  4. package/dist/rmg-service/src/services/hooks/useUpdateReleaseConflictMutation.d.ts +30 -0
  5. package/dist/rmg-service/src/services/hooks/useUpdateReleaseConflictMutation.js +14 -0
  6. package/dist/rmg-service/src/services/index.d.ts +10 -0
  7. package/dist/rmg-service/src/services/index.js +2 -0
  8. package/dist/rmg-service/src/services/responses/ReleaseConflictListResponseResponse.d.ts +16 -0
  9. package/dist/rmg-service/src/services/responses/ReleaseConflictListResponseResponse.js +1 -0
  10. package/dist/rmg-service/src/services/responses/UpdateReleaseConflictResponseResponse.d.ts +4 -0
  11. package/dist/rmg-service/src/services/responses/UpdateReleaseConflictResponseResponse.js +4 -0
  12. package/dist/rmg-service/src/services/schemas/ConflictStatus.d.ts +1 -0
  13. package/dist/rmg-service/src/services/schemas/ConflictStatus.js +4 -0
  14. package/dist/rmg-service/src/services/schemas/ExecutionConflict.d.ts +70 -0
  15. package/dist/rmg-service/src/services/schemas/ExecutionConflict.js +1 -0
  16. package/dist/rmg-service/src/services/schemas/ReleaseConflictInfo.d.ts +7 -0
  17. package/dist/rmg-service/src/services/schemas/ReleaseConflictInfo.js +4 -0
  18. package/dist/rmg-service/src/services/schemas/ReleaseDto.d.ts +4 -0
  19. package/dist/rmg-service/src/services/schemas/ReleaseType.d.ts +1 -1
  20. package/dist/rmg-service/src/services/schemas/StageInfoDto.d.ts +8 -0
  21. package/dist/rmg-service/src/services/schemas/StageInfoType.d.ts +1 -1
  22. package/dist/rmg-service/src/services/schemas/StepInfoDto.d.ts +12 -0
  23. package/dist/rmg-service/src/services/schemas/User.d.ts +4 -0
  24. package/dist/rmg-service/src/services/schemas/User.js +4 -0
  25. package/package.json +1 -1
@@ -0,0 +1,27 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ReleaseConflictListResponseResponse } from '../responses/ReleaseConflictListResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetReleaseConflictsQueryPathParams {
7
+ releaseGroupId: string;
8
+ }
9
+ export interface GetReleaseConflictsQueryQueryParams {
10
+ conflictStatus?: string[];
11
+ page?: number;
12
+ size?: number;
13
+ sort?: string[];
14
+ }
15
+ export interface GetReleaseConflictsQueryHeaderParams {
16
+ 'Harness-Account': string;
17
+ }
18
+ export type GetReleaseConflictsOkResponse = ResponseWithPagination<ReleaseConflictListResponseResponse>;
19
+ export type GetReleaseConflictsErrorResponse = ErrorResponseResponse;
20
+ export interface GetReleaseConflictsProps extends GetReleaseConflictsQueryPathParams, Omit<FetcherOptions<GetReleaseConflictsQueryQueryParams, unknown, GetReleaseConflictsQueryHeaderParams>, 'url'> {
21
+ queryParams: GetReleaseConflictsQueryQueryParams;
22
+ }
23
+ export declare function getReleaseConflicts(props: GetReleaseConflictsProps): Promise<GetReleaseConflictsOkResponse>;
24
+ /**
25
+ * Fetch a paginated list of release conflicts for a release group with optional status filtering
26
+ */
27
+ export declare function useGetReleaseConflictsQuery(props: GetReleaseConflictsProps, options?: Omit<UseQueryOptions<GetReleaseConflictsOkResponse, GetReleaseConflictsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetReleaseConflictsOkResponse, 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 getReleaseConflicts(props) {
7
+ return fetcher(Object.assign({ url: `/releaseGroup/${props.releaseGroupId}/conflicts`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Fetch a paginated list of release conflicts for a release group with optional status filtering
11
+ */
12
+ export function useGetReleaseConflictsQuery(props, options) {
13
+ return useQuery(['getReleaseConflicts', props.releaseGroupId, props.queryParams], ({ signal }) => getReleaseConflicts(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -7,6 +7,7 @@ import { FetcherOptions } from '../../../../fetcher/index.js';
7
7
  export interface PostReleaseSummaryMutationQueryParams {
8
8
  orgIdentifier?: string;
9
9
  searchTerm?: string;
10
+ releaseGroupIds?: string[];
10
11
  }
11
12
  export interface PostReleaseSummaryMutationHeaderParams {
12
13
  'Harness-Account': string;
@@ -0,0 +1,30 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { UpdateReleaseConflictResponseResponse } from '../responses/UpdateReleaseConflictResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ReleaseType } from '../schemas/ReleaseType';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface UpdateReleaseConflictMutationPathParams {
8
+ executionId: string;
9
+ }
10
+ export interface UpdateReleaseConflictMutationHeaderParams {
11
+ 'Harness-Account': string;
12
+ }
13
+ export type UpdateReleaseConflictRequestBody = {
14
+ comments?: string;
15
+ /**
16
+ * ID of the release to associate with the execution
17
+ */
18
+ releaseId: string;
19
+ type: ReleaseType;
20
+ };
21
+ export type UpdateReleaseConflictOkResponse = ResponseWithPagination<UpdateReleaseConflictResponseResponse>;
22
+ export type UpdateReleaseConflictErrorResponse = ErrorResponseResponse;
23
+ export interface UpdateReleaseConflictProps extends UpdateReleaseConflictMutationPathParams, Omit<FetcherOptions<unknown, UpdateReleaseConflictRequestBody, UpdateReleaseConflictMutationHeaderParams>, 'url'> {
24
+ body: UpdateReleaseConflictRequestBody;
25
+ }
26
+ export declare function updateReleaseConflict(props: UpdateReleaseConflictProps): Promise<UpdateReleaseConflictOkResponse>;
27
+ /**
28
+ * Update release ID and type for a release conflict
29
+ */
30
+ export declare function useUpdateReleaseConflictMutation(options?: Omit<UseMutationOptions<UpdateReleaseConflictOkResponse, UpdateReleaseConflictErrorResponse, UpdateReleaseConflictProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdateReleaseConflictOkResponse, import("..").Error, UpdateReleaseConflictProps, 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 updateReleaseConflict(props) {
7
+ return fetcher(Object.assign({ url: `/conflicts/${props.executionId}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Update release ID and type for a release conflict
11
+ */
12
+ export function useUpdateReleaseConflictMutation(options) {
13
+ return useMutation((mutateProps) => updateReleaseConflict(mutateProps), options);
14
+ }
@@ -3,6 +3,8 @@ export type { DeleteReleaseGroupErrorResponse, DeleteReleaseGroupMutationPathPar
3
3
  export { deleteReleaseGroup, useDeleteReleaseGroupMutation, } from './hooks/useDeleteReleaseGroupMutation';
4
4
  export type { GetReleaseActivitiesErrorResponse, GetReleaseActivitiesOkResponse, GetReleaseActivitiesProps, GetReleaseActivitiesQueryPathParams, GetReleaseActivitiesQueryQueryParams, } from './hooks/useGetReleaseActivitiesQuery';
5
5
  export { getReleaseActivities, useGetReleaseActivitiesQuery, } from './hooks/useGetReleaseActivitiesQuery';
6
+ export type { GetReleaseConflictsErrorResponse, GetReleaseConflictsOkResponse, GetReleaseConflictsProps, GetReleaseConflictsQueryPathParams, GetReleaseConflictsQueryQueryParams, } from './hooks/useGetReleaseConflictsQuery';
7
+ export { getReleaseConflicts, useGetReleaseConflictsQuery, } from './hooks/useGetReleaseConflictsQuery';
6
8
  export type { GetReleaseDayActivitiesErrorResponse, GetReleaseDayActivitiesOkResponse, GetReleaseDayActivitiesProps, GetReleaseDayActivitiesQueryPathParams, GetReleaseDayActivitiesQueryQueryParams, } from './hooks/useGetReleaseDayActivitiesQuery';
7
9
  export { getReleaseDayActivities, useGetReleaseDayActivitiesQuery, } from './hooks/useGetReleaseDayActivitiesQuery';
8
10
  export type { GetReleaseGroupErrorResponse, GetReleaseGroupOkResponse, GetReleaseGroupProps, GetReleaseGroupQueryPathParams, GetReleaseGroupQueryQueryParams, } from './hooks/useGetReleaseGroupQuery';
@@ -27,6 +29,8 @@ export type { PutReleaseGroupErrorResponse, PutReleaseGroupMutationPathParams, P
27
29
  export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
28
30
  export type { PutReleaseReleaseIdErrorResponse, PutReleaseReleaseIdMutationPathParams, PutReleaseReleaseIdOkResponse, PutReleaseReleaseIdProps, PutReleaseReleaseIdRequestBody, } from './hooks/usePutReleaseReleaseIdMutation';
29
31
  export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
32
+ export type { UpdateReleaseConflictErrorResponse, UpdateReleaseConflictMutationPathParams, UpdateReleaseConflictOkResponse, UpdateReleaseConflictProps, UpdateReleaseConflictRequestBody, } from './hooks/useUpdateReleaseConflictMutation';
33
+ export { updateReleaseConflict, useUpdateReleaseConflictMutation, } from './hooks/useUpdateReleaseConflictMutation';
30
34
  export type { CreateReleaseGroupRequestRequestBody } from './requestBodies/CreateReleaseGroupRequestRequestBody';
31
35
  export type { ReleaseSummaryRequestRequestBody } from './requestBodies/ReleaseSummaryRequestRequestBody';
32
36
  export type { UpdateReleaseGroupRequestRequestBody } from './requestBodies/UpdateReleaseGroupRequestRequestBody';
@@ -39,19 +43,23 @@ export type { ErrorResponseResponse } from './responses/ErrorResponseResponse';
39
43
  export type { GetReleaseGroupResponseResponse } from './responses/GetReleaseGroupResponseResponse';
40
44
  export type { ReleaseActivitiesResponseResponse } from './responses/ReleaseActivitiesResponseResponse';
41
45
  export type { ReleaseApprovalsResponseResponse } from './responses/ReleaseApprovalsResponseResponse';
46
+ export type { ReleaseConflictListResponseResponse } from './responses/ReleaseConflictListResponseResponse';
42
47
  export type { ReleaseDetailsResponseResponse } from './responses/ReleaseDetailsResponseResponse';
43
48
  export type { ReleaseGroupComponentResponseResponse } from './responses/ReleaseGroupComponentResponseResponse';
44
49
  export type { ReleaseGroupSummaryResponseResponse } from './responses/ReleaseGroupSummaryResponseResponse';
45
50
  export type { ReleaseSummaryResponseResponse } from './responses/ReleaseSummaryResponseResponse';
51
+ export type { UpdateReleaseConflictResponseResponse } from './responses/UpdateReleaseConflictResponseResponse';
46
52
  export type { UpdateReleaseGroupResponseResponse } from './responses/UpdateReleaseGroupResponseResponse';
47
53
  export type { UpdateReleaseResponseResponse } from './responses/UpdateReleaseResponseResponse';
48
54
  export type { ActivityType } from './schemas/ActivityType';
49
55
  export type { ApprovalInfoDto } from './schemas/ApprovalInfoDto';
50
56
  export type { ApprovedByDto } from './schemas/ApprovedByDto';
57
+ export type { ConflictStatus } from './schemas/ConflictStatus';
51
58
  export type { EnvironmentDashboardDto } from './schemas/EnvironmentDashboardDto';
52
59
  export type { EnvironmentDto } from './schemas/EnvironmentDto';
53
60
  export type { EnvironmentType } from './schemas/EnvironmentType';
54
61
  export type { Error } from './schemas/Error';
62
+ export type { ExecutionConflict } from './schemas/ExecutionConflict';
55
63
  export type { Freq } from './schemas/Freq';
56
64
  export type { GetReleaseGroupResponse } from './schemas/GetReleaseGroupResponse';
57
65
  export type { NextRequest } from './schemas/NextRequest';
@@ -62,6 +70,7 @@ export type { ReleaseApprovalDto } from './schemas/ReleaseApprovalDto';
62
70
  export type { ReleaseApprovalType } from './schemas/ReleaseApprovalType';
63
71
  export type { ReleaseCadence } from './schemas/ReleaseCadence';
64
72
  export type { ReleaseComponent } from './schemas/ReleaseComponent';
73
+ export type { ReleaseConflictInfo } from './schemas/ReleaseConflictInfo';
65
74
  export type { ReleaseDto } from './schemas/ReleaseDto';
66
75
  export type { ReleaseFrequency } from './schemas/ReleaseFrequency';
67
76
  export type { ReleaseGroupDto } from './schemas/ReleaseGroupDto';
@@ -79,3 +88,4 @@ export type { StepInfoType } from './schemas/StepInfoType';
79
88
  export type { TimeRangeDto } from './schemas/TimeRangeDto';
80
89
  export type { TriggerType } from './schemas/TriggerType';
81
90
  export type { TriggeredByDto } from './schemas/TriggeredByDto';
91
+ export type { User } from './schemas/User';
@@ -1,5 +1,6 @@
1
1
  export { deleteReleaseGroup, useDeleteReleaseGroupMutation, } from './hooks/useDeleteReleaseGroupMutation';
2
2
  export { getReleaseActivities, useGetReleaseActivitiesQuery, } from './hooks/useGetReleaseActivitiesQuery';
3
+ export { getReleaseConflicts, useGetReleaseConflictsQuery, } from './hooks/useGetReleaseConflictsQuery';
3
4
  export { getReleaseDayActivities, useGetReleaseDayActivitiesQuery, } from './hooks/useGetReleaseDayActivitiesQuery';
4
5
  export { getReleaseGroup, useGetReleaseGroupQuery } from './hooks/useGetReleaseGroupQuery';
5
6
  export { getReleaseGroupReleaseGroupIdComponents, useGetReleaseGroupReleaseGroupIdComponentsQuery, } from './hooks/useGetReleaseGroupReleaseGroupIdComponentsQuery';
@@ -12,3 +13,4 @@ export { postReleaseGroup, usePostReleaseGroupMutation } from './hooks/usePostRe
12
13
  export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
13
14
  export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
14
15
  export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
16
+ export { updateReleaseConflict, useUpdateReleaseConflictMutation, } from './hooks/useUpdateReleaseConflictMutation';
@@ -0,0 +1,16 @@
1
+ import type { ExecutionConflict } from '../schemas/ExecutionConflict';
2
+ import type { Pageable } from '../schemas/Pageable';
3
+ import type { PageableSort } from '../schemas/PageableSort';
4
+ export interface ReleaseConflictListResponseResponse {
5
+ content: ExecutionConflict[];
6
+ empty: boolean;
7
+ first: boolean;
8
+ last: boolean;
9
+ number: number;
10
+ numberOfElements: number;
11
+ pageable: Pageable;
12
+ size: number;
13
+ sort: PageableSort;
14
+ totalElements: number;
15
+ totalPages: number;
16
+ }
@@ -0,0 +1,4 @@
1
+ export interface UpdateReleaseConflictResponseResponse {
2
+ executionId: string;
3
+ success: boolean;
4
+ }
@@ -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 {};
@@ -0,0 +1 @@
1
+ export type ConflictStatus = 'Conflict' | 'None' | 'Resolved';
@@ -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 {};
@@ -0,0 +1,70 @@
1
+ import type { User } from '../schemas/User';
2
+ import type { Status } from '../schemas/Status';
3
+ import type { ReleaseConflictInfo } from '../schemas/ReleaseConflictInfo';
4
+ import type { ConflictStatus } from '../schemas/ConflictStatus';
5
+ import type { TriggerType } from '../schemas/TriggerType';
6
+ import type { TriggeredByDto } from '../schemas/TriggeredByDto';
7
+ export interface ExecutionConflict {
8
+ /**
9
+ * Comment associated with the conflict
10
+ */
11
+ comment?: string;
12
+ /**
13
+ * Unix timestamp when the conflict was resolved
14
+ * @format int64
15
+ */
16
+ conflictResolvedAt?: number;
17
+ conflictResolvedBy?: User;
18
+ /**
19
+ * Unix timestamp when the conflict was created
20
+ * @format int64
21
+ */
22
+ createdAt: number;
23
+ /**
24
+ * Pipeline execution end timestamp
25
+ * @format int64
26
+ */
27
+ endTs?: number;
28
+ executionStatus: Status;
29
+ /**
30
+ * Unix timestamp when the conflict was last updated
31
+ * @format int64
32
+ */
33
+ lastUpdatedAt: number;
34
+ /**
35
+ * Organization identifier
36
+ */
37
+ orgIdentifier: string;
38
+ /**
39
+ * Identifier of the pipeline
40
+ */
41
+ pipelineIdentifier: string;
42
+ /**
43
+ * Name of the pipeline
44
+ */
45
+ pipelineName: string;
46
+ /**
47
+ * ID of the execution that caused the conflict
48
+ */
49
+ planExecutionId: string;
50
+ /**
51
+ * Project identifier
52
+ */
53
+ projectIdentifier: string;
54
+ /**
55
+ * Whether this release is recommended for resolution
56
+ */
57
+ releaseInfoList: ReleaseConflictInfo[];
58
+ /**
59
+ * Pipeline run sequence number
60
+ */
61
+ runSequenceId: number;
62
+ /**
63
+ * Pipeline execution start timestamp
64
+ * @format int64
65
+ */
66
+ startTs: number;
67
+ status: ConflictStatus;
68
+ triggerType: TriggerType;
69
+ triggeredBy: TriggeredByDto;
70
+ }
@@ -0,0 +1,7 @@
1
+ export interface ReleaseConflictInfo {
2
+ recommended: boolean;
3
+ releaseGroupId: string;
4
+ releaseId: string;
5
+ releaseName: string;
6
+ version: string;
7
+ }
@@ -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 {};
@@ -19,6 +19,10 @@ export interface ReleaseDto {
19
19
  * Expected start timestamp in milliseconds
20
20
  */
21
21
  expectedStartTs: number;
22
+ /**
23
+ * Whether the release has a conflict
24
+ */
25
+ hasConflict?: boolean;
22
26
  /**
23
27
  * Unique identifier for the release
24
28
  */
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Type of release.
3
3
  */
4
- export type ReleaseType = 'Beta' | 'Hotfix' | 'System';
4
+ export type ReleaseType = 'Beta' | 'Hotfix' | 'Patch' | 'System';
@@ -18,6 +18,14 @@ export interface StageInfoDto {
18
18
  * Name of the stage.
19
19
  */
20
20
  name: string;
21
+ /**
22
+ * Stage execution Id.
23
+ */
24
+ stageExecutionId?: string;
25
+ /**
26
+ * Node Id of the stage.
27
+ */
28
+ stageNodeId?: string;
21
29
  /**
22
30
  * Start timestamp of the stage.
23
31
  */
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Type of the stage (e.g., CD, custom)
3
3
  */
4
- export type StageInfoType = 'CD' | 'Custom';
4
+ export type StageInfoType = 'Approval' | 'CD' | 'Custom' | 'GITOPS';
@@ -18,10 +18,22 @@ export interface StepInfoDto {
18
18
  * Name of the step.
19
19
  */
20
20
  name: string;
21
+ /**
22
+ * Stage Execution Id
23
+ */
24
+ stageExecutionId?: string;
25
+ /**
26
+ * Node Id of the stage.
27
+ */
28
+ stageNodeId?: string;
21
29
  /**
22
30
  * Start timestamp of the step.
23
31
  */
24
32
  startTs: number;
25
33
  status: Status;
34
+ /**
35
+ * Step execution identifier.
36
+ */
37
+ stepExecutionId?: string;
26
38
  type: StepInfoType;
27
39
  }
@@ -0,0 +1,4 @@
1
+ export interface User {
2
+ email?: string;
3
+ identifier?: string;
4
+ }
@@ -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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-rmg-service-client",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "Harness Release Management Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",